From fb3370c514133202102ed49bd5c83e85e0767677 Mon Sep 17 00:00:00 2001 From: APTX Date: Fri, 6 Apr 2012 11:33:38 -0400 Subject: [PATCH 1/1] Import of libferris 1.5.13 --- AUTHORS | 1 + COPYING | 674 + ChangeLog | 31 + DBusGlue/Makefile.am | 90 + DBusGlue/Makefile.in | 1110 + DBusGlue/broker_adaptor.h | 100 + DBusGlue/broker_interface.h | 66 + DBusGlue/com.Libferris.Volume.Manager.service | 3 + .../com.Libferris.Volume.Manager.service.in | 3 + .../com.libferris.Metadata.Broker.service | 3 + .../com.libferris.Metadata.Broker.service.in | 3 + ...m.libferris.Metadata.Worker.imlib2.service | 3 + ...ibferris.Metadata.Worker.imlib2.service.in | 3 + .../com.libferris.Metadata.Worker.jpg.service | 3 + ...m.libferris.Metadata.Worker.jpg.service.in | 3 + ...m.libferris.Metadata.Worker.magick.service | 3 + ...ibferris.Metadata.Worker.magick.service.in | 3 + .../com.libferris.Metadata.Worker.png.service | 3 + ...m.libferris.Metadata.Worker.png.service.in | 3 + ...com.libferris.Metadata.Worker.xine.service | 3 + ....libferris.Metadata.Worker.xine.service.in | 3 + DBusGlue/com.libferris.Volume.Manager.xml | 40 + ...is_internal_metadata_broker_introspect.xml | 70 + ...is_internal_metadata_worker_introspect.xml | 23 + DBusGlue/force-header-generation.cpp | 5 + .../org.freedesktop.DBus.Introspectable.xml | 8 + DBusGlue/org.freedesktop.DBus.xml | 83 + .../org.freedesktop.Hal.Device.Volume.xml | 20 + DBusGlue/org.freedesktop.Hal.Device.xml | 160 + DBusGlue/org.freedesktop.Hal.Manager.xml | 67 + DBusGlue/org_freedesktop_DBus.h | 159 + .../org_freedesktop_DBus_Introspectable.h | 48 + DBusGlue/org_freedesktop_Hal_Device.h | 278 + DBusGlue/org_freedesktop_Hal_Device_Volume.h | 63 + DBusGlue/org_freedesktop_Hal_Manager.h | 115 + DBusGlue/worker_adaptor.h | 60 + DBusGlue/worker_interface.h | 62 + Ferris/Agent.cpp | 1041 + Ferris/Agent.hh | 196 + Ferris/AgentSVMLight.cpp | 916 + Ferris/Agent_private.hh | 233 + Ferris/All.hh | 48 + Ferris/AsyncIO.cpp | 481 + Ferris/AsyncIO.hh | 303 + Ferris/Attribute.cpp | 2890 + Ferris/Attribute.hh | 1046 + Ferris/Attribute_private.hh | 54 + Ferris/BranchContext.cpp | 612 + Ferris/BranchContext_Clients.cpp | 1248 + Ferris/BranchContext_private.hh | 155 + ...ranchRemembranceHistoryInternalContext.cpp | 194 + Ferris/BuildDependentMethods.hh | 50 + Ferris/BuildDependentMethods.hh.in | 50 + Ferris/Cache.cpp | 28 + Ferris/Cache.hh | 347 + Ferris/CacheManager.cpp | 1303 + Ferris/CacheManager_private.hh | 139 + Ferris/ChainedViewContext.cpp | 814 + Ferris/ChainedViewContext.hh | 249 + Ferris/ChildStreamServer.cpp | 274 + Ferris/ChildStreamServer.hh | 119 + Ferris/Chmod.cpp | 506 + Ferris/Chmod.hh | 119 + Ferris/ClipAPI.cpp | 611 + Ferris/ClipAPI.hh | 66 + Ferris/Configuration.cpp | 603 + Ferris/Configuration.hh | 168 + Ferris/Configuration_private.hh | 95 + Ferris/Context.cpp | 4578 + Ferris/Context.hh | 1442 + Ferris/ContextContext.cpp | 117 + Ferris/ContextContext.hh | 58 + Ferris/ContextIterator.cpp | 1068 + Ferris/ContextIterator.hh | 125 + Ferris/ContextPlugin.hh | 77 + Ferris/ContextPopt.cpp | 174 + Ferris/ContextPopt.hh | 57 + Ferris/ContextSetCompare.cpp | 1006 + Ferris/ContextSetCompare.hh | 49 + Ferris/ContextSetCompare_private.hh | 38 + Ferris/Context_private.hh | 855 + Ferris/CursorAPI.cpp | 169 + Ferris/CursorAPI.hh | 90 + Ferris/DBus.cpp | 152 + Ferris/DBus_private.hh | 98 + Ferris/Daemon.cpp | 137 + Ferris/Daemon.hh | 44 + Ferris/Debug.cpp | 104 + Ferris/Debug.hh | 40 + Ferris/DublinCore.cpp | 59 + Ferris/DublinCore.hh | 43 + Ferris/EAGenerators.hh | 152 + Ferris/EAIndexer.cpp | 1158 + Ferris/EAIndexer.hh | 418 + Ferris/EAIndexerCustomFerris.cpp | 80 + Ferris/EAIndexerMetaInterface.cpp | 1560 + Ferris/EAIndexerMetaInterface.hh | 708 + Ferris/EAIndexerSQLCommon.cpp | 108 + Ferris/EAIndexerSQLCommon_private.hh | 57 + Ferris/EAIndexer_private.hh | 84 + Ferris/EAN.cpp | 35 + Ferris/EAN.hh | 37 + Ferris/EAQuery.cpp | 835 + Ferris/EAQuery.hh | 241 + Ferris/EAQueryContext.cpp | 429 + Ferris/EAQueryContext.hh | 133 + Ferris/Enamel.cpp | 1089 + Ferris/Enamel.hh | 2082 + Ferris/Enamel_priv.hh | 46 + Ferris/EtagereContext.cpp | 663 + Ferris/EtagereContext_private.hh | 140 + Ferris/FCA.cpp | 6001 + Ferris/FCA.hh | 1105 + Ferris/FSParser.cpp | 157 + Ferris/FSParser_private.hh | 119 + Ferris/FactoriesCreationCommon_private.cpp | 48 + Ferris/FactoriesCreationCommon_private.hh | 119 + Ferris/Ferris.cpp | 12611 ++ Ferris/Ferris.hh | 3219 + Ferris/FerrisAsTextPlugin.cpp | 106 + Ferris/FerrisAsTextPlugin.hh | 97 + Ferris/FerrisBackup.cpp | 294 + Ferris/FerrisBackup.hh | 85 + Ferris/FerrisBitMagic.hh | 9836 ++ Ferris/FerrisBoost.cpp | 301 + Ferris/FerrisBoost.hh | 322 + Ferris/FerrisCLucene.hh | 91 + Ferris/FerrisContextPlugin.cpp | 32 + Ferris/FerrisCopy.cpp | 2882 + Ferris/FerrisCopy.hh | 628 + Ferris/FerrisCopy_private.hh | 364 + Ferris/FerrisCreationPlugin.cpp | 347 + Ferris/FerrisCreationPlugin.hh | 137 + Ferris/FerrisCurl.cpp | 308 + Ferris/FerrisCurl_private.hh | 95 + Ferris/FerrisDOM.cpp | 4345 + Ferris/FerrisDOM.hh | 497 + Ferris/FerrisDOM_private.hh | 276 + Ferris/FerrisDevContext.cpp | 288 + Ferris/FerrisDevContext_private.hh | 96 + Ferris/FerrisEAGeneratorPlugin.cpp | 142 + Ferris/FerrisEAGeneratorPlugin.hh | 64 + Ferris/FerrisEAGeneratorPlugin_private.hh | 56 + Ferris/FerrisEvent.cpp | 118 + Ferris/FerrisEvent.hh | 109 + Ferris/FerrisException.cpp | 108 + Ferris/FerrisException.hh | 3201 + Ferris/FerrisFileActions.cpp | 656 + Ferris/FerrisFileActions.hh | 127 + Ferris/FerrisGPG.cpp | 363 + Ferris/FerrisGPGContext.cpp | 1424 + Ferris/FerrisGPGContext_private.hh | 421 + Ferris/FerrisGPG_private.hh | 105 + Ferris/FerrisHandle.cpp | 105 + Ferris/FerrisHandle.hh | 391 + Ferris/FerrisKDE.cpp | 135 + Ferris/FerrisKDE.hh | 45 + Ferris/FerrisMove.cpp | 743 + Ferris/FerrisMove.hh | 219 + Ferris/FerrisOpenSSL.cpp | 217 + Ferris/FerrisOpenSSL.hh | 61 + Ferris/FerrisPopt.cpp | 165 + Ferris/FerrisPopt.hh | 118 + Ferris/FerrisQt.cpp | 1420 + Ferris/FerrisQt_private.hh | 247 + Ferris/FerrisRDFCore.cpp | 1352 + Ferris/FerrisRDFCore.hh | 472 + Ferris/FerrisRemove.cpp | 513 + Ferris/FerrisRemove.hh | 212 + Ferris/FerrisRemove_private.hh | 40 + Ferris/FerrisSTL.hh | 182 + Ferris/FerrisSemantic.cpp | 1251 + Ferris/FerrisSemantic.hh | 257 + Ferris/FerrisSlaveProcess.cpp | 361 + Ferris/FerrisSlaveProcess.hh | 190 + Ferris/FerrisSlaveProcess_private.hh | 34 + Ferris/FerrisSmartPointerChecker.hh | 22 + Ferris/FerrisSmartPointerChecker.hh.in | 22 + Ferris/FerrisStdHashMap.hh | 69 + Ferris/FerrisVersioning.cpp | 30 + Ferris/FerrisVersioning.hh | 92 + Ferris/FerrisWebServices.cpp | 142 + Ferris/FerrisWebServices_private.hh | 348 + Ferris/FerrisXalan.cpp | 71 + Ferris/FerrisXalan_private.hh | 48 + Ferris/Ferris_private.hh | 169 + Ferris/Ferrisls.cpp | 2168 + Ferris/Ferrisls.hh | 853 + Ferris/Ferrisls_AggregateData.cpp | 325 + Ferris/Ferrisls_AggregateData.hh | 148 + Ferris/Ferrisls_RDF.cpp | 117 + Ferris/Ferrisls_XML.cpp | 386 + Ferris/FilteredContext.cpp | 2267 + Ferris/FilteredContext.hh | 136 + Ferris/FilteredContext_private.hh | 144 + Ferris/ForwardEAIndexInterface.cpp | 74 + Ferris/ForwardEAIndexInterface.hh | 80 + Ferris/FullTextContext.cpp | 345 + Ferris/FullTextContext.hh | 142 + Ferris/FullTextIndexer.cpp | 908 + Ferris/FullTextIndexer.hh | 532 + Ferris/FullTextIndexerCustomFerris.cpp | 64 + Ferris/FullTextIndexerMetaInterface.cpp | 705 + Ferris/FullTextIndexerMetaInterface.hh | 529 + Ferris/FullTextIndexerSyntheticDocID.cpp | 68 + .../FullTextIndexerSyntheticDocID_private.hh | 99 + Ferris/FullTextIndexer_private.hh | 104 + Ferris/FullTextQuery.cpp | 864 + Ferris/FullTextQuery.hh | 175 + Ferris/General.cpp | 1837 + Ferris/General.hh | 556 + Ferris/Hashing.hh | 184 + Ferris/HiddenSymbolSupport.hh | 101 + Ferris/Image.cpp | 811 + Ferris/Image_private.hh | 42 + Ferris/Iterator.hh | 581 + Ferris/LinkContextScheme.cpp | 29 + Ferris/LinkContextScheme.hh | 81 + Ferris/LinkContextSchemeClients.cpp | 263 + Ferris/LinkContextSchemeClients.hh | 119 + Ferris/MainPageDocs.hh | 223 + Ferris/Makefile.am | 528 + Ferris/Makefile.in | 1882 + Ferris/MatchedEAGenerators.cpp | 874 + Ferris/MatchedEAGenerators.hh | 425 + Ferris/Math.cpp | 30 + Ferris/Math.hh | 52 + Ferris/Medallion.cpp | 3248 + Ferris/Medallion.hh | 1003 + Ferris/Medallion_private.hh | 67 + Ferris/MetadataServer.cpp | 346 + Ferris/MetadataServer_private.hh | 74 + Ferris/Mime.cpp | 238 + Ferris/Mime.hh | 70 + Ferris/Native.cpp | 5632 + Ferris/Native.hh | 421 + Ferris/Numeric.hh | 54 + Ferris/Personalities.cpp | 358 + Ferris/Personalities.hh | 189 + Ferris/PluginOutOfProcNotificationEngine.cpp | 735 + Ferris/PluginOutOfProcNotificationEngine.hh | 366 + Ferris/RPM.cpp | 92 + Ferris/RPMContext.cpp | 568 + Ferris/RPMContext_private.hh | 170 + Ferris/RPM_private.hh | 76 + Ferris/Regex.cpp | 171 + Ferris/Regex.hh | 141 + Ferris/RemembranceContext.cpp | 516 + Ferris/Resolver.cpp | 2755 + Ferris/Resolver.hh | 110 + Ferris/Resolver_private.hh | 329 + Ferris/RootContext.cpp | 419 + Ferris/RootContext_private.hh | 83 + Ferris/Runner.cpp | 728 + Ferris/Runner.hh | 220 + Ferris/Runner_FunctorType.hh | 42 + Ferris/SM.cpp | 34 + Ferris/SM.hh | 157 + Ferris/SM_private.hh | 40 + Ferris/SchemaManips.cpp | 135 + Ferris/SchemaManips.hh | 141 + Ferris/SchemaSupport.cpp | 602 + Ferris/SchemaSupport.hh | 287 + Ferris/SchemaSupport.hh.in | 287 + Ferris/Shell.cpp | 1140 + Ferris/Shell.hh | 292 + Ferris/SignalStreams.cpp | 754 + Ferris/SignalStreams.hh | 321 + Ferris/SpiritFFilter.cpp | 186 + Ferris/SpiritTime.cpp | 997 + Ferris/StatfsUtilities.cpp | 108 + Ferris/StatfsUtilities.hh | 45 + Ferris/SyncDelayer.cpp | 88 + Ferris/SyncDelayer.hh | 57 + Ferris/TimeDelayedAction.cpp | 128 + Ferris/TimeDelayedAction.hh | 105 + Ferris/Trimming.hh | 186 + Ferris/TypeDecl.hh | 529 + Ferris/ValueRestorer.hh | 98 + Ferris/Versioned.cpp | 80 + Ferris/Versioned.hh | 62 + Ferris/WrapXMMS.cpp | 347 + Ferris/WrapXMMS.hh | 114 + Ferris/XQilla.cpp | 3006 + Ferris/XQillaContext.cpp | 366 + Ferris/XQillaContext_private.hh | 83 + Ferris/XQilla_private.hh | 386 + ...ferris-out-of-proc-notification-deamon.cpp | 94 + ...-ferris-out-of-proc-notification-deamon.hh | 77 + Ferris/libferris.i | 302 + Ferris/libferrisocaml.i | 63 + Ferris/libferrisocaml_wrap.c | 0 Ferris/libferrisperl.i | 90 + Ferris/libferrisperl_wrap.cpp | 96607 ++++++++++++++++ Ferris/libferrispython.i | 49 + Ferris/libferrispython_wrap.cpp | 0 Ferris/libferrisxmlshared.cpp | 997 + Ferris/libferrisxmlshared.hh | 477 + Ferris/mocimpls.cpp | 0 Ferris/perl_std_list.i | 299 + Ferris/timber.cpp | 44 + Ferris/timber.hh | 436 + Ferris/xfsutil.cpp | 101 + Ferris/xfsutil.hh | 40 + FerrisGCJ/FerrisGCJ.cpp | 77 + FerrisGCJ/FerrisGCJ_private.hh | 73 + FerrisGCJ/Makefile.am | 44 + FerrisGCJ/Makefile.in | 1056 + FerrisGlue/ImageMagickNamespaceGlue.cpp | 56 + FerrisGlue/ImageMagickNamespaceGlue.hh | 49 + FerrisGlue/Makefile.am | 7 + FerrisGlue/Makefile.in | 948 + FerrisQtGui/All.hh | 0 FerrisQtGui/FerrisFileSystemModel.cpp | 272 + FerrisQtGui/FerrisFileSystemModel.hh | 83 + FerrisQtGui/FerrisQtGui.cpp | 0 FerrisQtGui/FerrisQtGui.hh | 0 FerrisQtGui/FerrisSortFilterProxyModel.cpp | 77 + FerrisQtGui/FerrisSortFilterProxyModel.hh | 61 + FerrisQtGui/Makefile.am | 65 + FerrisQtGui/Makefile.in | 1095 + FerrisQtGui/mocimpls.cpp | 0 FerrisQtGui/modeltest.cpp | 130 + FerrisQtGui/modeltestqml.qml | 0 FerrisUI/All.hh | 50 + FerrisUI/ContextPropertiesEditor.cpp | 937 + FerrisUI/ContextPropertiesEditor.hh | 185 + FerrisUI/EditSQLColumns.cpp | 309 + FerrisUI/EditSQLColumns.hh | 117 + FerrisUI/EditStringList.cpp | 279 + FerrisUI/EditStringList.hh | 118 + FerrisUI/FerrisCopyUI.cpp | 430 + FerrisUI/FerrisCopyUI.hh | 121 + FerrisUI/FerrisOptionMenu.cpp | 311 + FerrisUI/FerrisOptionMenu.hh | 107 + FerrisUI/FerrisRemoveUI.cpp | 196 + FerrisUI/FerrisRemoveUI.hh | 95 + FerrisUI/GtkFerris.cpp | 2111 + FerrisUI/GtkFerris.hh | 454 + FerrisUI/GtkFerris_private.hh | 43 + FerrisUI/Makefile.am | 68 + FerrisUI/Makefile.in | 1126 + FerrisUI/MedallionEditor.cpp | 628 + FerrisUI/MedallionEditor.hh | 131 + FerrisUI/Menus.cpp | 767 + FerrisUI/Menus.hh | 351 + FerrisUI/SubprocessButtonAndLabel.cpp | 314 + FerrisUI/SubprocessButtonAndLabel.hh | 106 + FerrisUI/TreeStoreDriver.cpp | 253 + FerrisUI/TreeStoreDriver.hh | 130 + FerrisUI/UAsyncIO.cpp | 53 + FerrisUI/UAsyncIO.hh | 101 + FerrisUI/gtkcellrendererprogress.c | 343 + FerrisUI/gtkcellrendererprogress.h | 65 + FerrisUI/gtkferriscellrenderertext.cpp | 389 + FerrisUI/gtkferriscellrenderertext.hh | 85 + FerrisUI/gtkferristreestore.cpp | 3441 + FerrisUI/gtkferristreestore.hh | 257 + INSTALL | 231 + Indexing/BoostMultiIndexLexicon.cpp | 255 + Indexing/FilesystemLexicon.cpp | 188 + Indexing/IndexPrivate.cpp | 94 + Indexing/IndexPrivate.hh | 818 + Indexing/Makefile.am | 42 + Indexing/Makefile.in | 991 + Indexing/ThreeInFourLexicon.cpp | 2486 + Indexing/UncompressedDB4.cpp | 308 + Indexing/XMLLexicon.cpp | 280 + Makefile.am | 52 + Makefile.in | 1315 + NEWS | 0 README | 147 + TODO | 1 + ThirdParty/Makefile.am | 3 + ThirdParty/Makefile.in | 1022 + ThirdParty/boost/Makefile.am | 3 + ThirdParty/boost/Makefile.in | 820 + ThirdParty/boost/utf8_codecvt_facet.cpp | 269 + ThirdParty/boost/utf8_codecvt_facet.hpp | 199 + .../2.7.0/Makefile.am | 3 + .../2.7.0/Makefile.in | 1021 + .../2.7.0/xerces/DOMAttrImpl.hpp | 126 + .../2.7.0/xerces/DOMDeepNodeListPool.hpp | 213 + .../2.7.0/xerces/DOMDocumentImpl.hpp | 398 + .../2.7.0/xerces/DOMNodeIDMap.hpp | 87 + .../2.7.0/xerces/DOMNodeImpl.hpp | 380 + .../2.7.0/xerces/DOMNodeListImpl.hpp | 72 + .../2.7.0/xerces/DOMParentNode.hpp | 111 + .../2.7.0/xerces/DOMRangeImpl.hpp | 174 + .../2.7.0/xerces/DOMTreeWalkerImpl.hpp | 167 + .../2.7.0/xerces/DOMTypeInfoImpl.hpp | 159 + .../2.7.0/xerces/Makefile.am | 2 + .../2.7.0/xerces/Makefile.in | 819 + .../2.8.0/Makefile.am | 3 + .../2.8.0/Makefile.in | 1021 + .../2.8.0/xerces/DOMAttrImpl.hpp | 127 + .../2.8.0/xerces/DOMDeepNodeListPool.hpp | 214 + .../2.8.0/xerces/DOMDocumentImpl.hpp | 400 + .../2.8.0/xerces/DOMNodeIDMap.hpp | 88 + .../2.8.0/xerces/DOMNodeImpl.hpp | 381 + .../2.8.0/xerces/DOMNodeListImpl.hpp | 73 + .../2.8.0/xerces/DOMParentNode.hpp | 116 + .../2.8.0/xerces/DOMRangeImpl.hpp | 175 + .../2.8.0/xerces/DOMTreeWalkerImpl.hpp | 168 + .../2.8.0/xerces/DOMTypeInfoImpl.hpp | 161 + .../2.8.0/xerces/Makefile.am | 2 + .../2.8.0/xerces/Makefile.in | 819 + .../3.0.0/Makefile.am | 3 + .../3.0.0/Makefile.in | 1021 + .../3.0.0/xerces/DOMAttrImpl.hpp | 137 + .../3.0.0/xerces/DOMDeepNodeListPool.hpp | 200 + .../3.0.0/xerces/DOMDocumentImpl.hpp | 507 + .../3.0.0/xerces/DOMNodeIDMap.hpp | 86 + .../3.0.0/xerces/DOMNodeImpl.hpp | 382 + .../3.0.0/xerces/DOMNodeListImpl.hpp | 73 + .../3.0.0/xerces/DOMParentNode.hpp | 114 + .../3.0.0/xerces/DOMRangeImpl.hpp | 176 + .../3.0.0/xerces/DOMStringPool.hpp | 211 + .../3.0.0/xerces/DOMTreeWalkerImpl.hpp | 168 + .../3.0.0/xerces/DOMTypeInfoImpl.hpp | 106 + .../3.0.0/xerces/Makefile.am | 2 + .../3.0.0/xerces/Makefile.in | 819 + .../3.1.0/Makefile.am | 3 + .../3.1.0/Makefile.in | 1021 + .../3.1.0/xerces/DOMAttrImpl.hpp | 137 + .../3.1.0/xerces/DOMDeepNodeListPool.hpp | 200 + .../3.1.0/xerces/DOMDocumentImpl.hpp | 507 + .../3.1.0/xerces/DOMNodeIDMap.hpp | 86 + .../3.1.0/xerces/DOMNodeImpl.hpp | 382 + .../3.1.0/xerces/DOMNodeListImpl.hpp | 73 + .../3.1.0/xerces/DOMParentNode.hpp | 114 + .../3.1.0/xerces/DOMRangeImpl.hpp | 176 + .../3.1.0/xerces/DOMStringPool.hpp | 211 + .../3.1.0/xerces/DOMTreeWalkerImpl.hpp | 168 + .../3.1.0/xerces/DOMTypeInfoImpl.hpp | 106 + .../3.1.0/xerces/Makefile.am | 2 + .../3.1.0/xerces/Makefile.in | 819 + .../internal-xerces-c-headers/Makefile.am | 1 + .../internal-xerces-c-headers/Makefile.in | 1021 + acconfig.h | 159 + aclocal.m4 | 10038 ++ apps/Makefile.am | 76 + apps/Makefile.in | 1152 + apps/ai/Makefile.am | 24 + apps/ai/Makefile.in | 1005 + apps/ai/fagent.cpp | 189 + apps/ai/fagentcreate.cpp | 176 + apps/cat/Makefile.am | 25 + apps/cat/Makefile.in | 1005 + apps/cat/fcat.cpp | 348 + apps/cat/ftee.cpp | 222 + apps/copy/Makefile.am | 21 + apps/copy/Makefile.in | 992 + apps/copy/ferriscp.cpp | 192 + apps/cursors/Makefile.am | 20 + apps/cursors/Makefile.in | 992 + apps/cursors/ferris-cursor.cpp | 232 + apps/du/Makefile.am | 15 + apps/du/Makefile.in | 987 + apps/du/fdu.cpp | 408 + apps/fca/Makefile.am | 83 + apps/fca/Makefile.in | 1220 + apps/fca/ferris-create-fca-scale-nominal.cpp | 532 + ...erris-create-fca-scale-numeric-ordinal.cpp | 129 + apps/fca/ferris-create-fca-scale-numeric.cpp | 446 + ...ris-create-fca-scale-splice-in-ffitler.cpp | 144 + apps/fca/ferris-create-fca-scale-urls.cpp | 367 + apps/fca/ferris-create-fca-tree.cpp | 1098 + ...ris-export-concept-lattice-to-toscanaj.cpp | 135 + ...is-export-formal-context-to-burmeister.cpp | 135 + apps/fca/ferris-lattice-from-cfi.cpp | 2175 + apps/fca/gf-create-fca-scale-numeric.cpp | 778 + apps/fca/libferrisfcascaling.cpp | 219 + apps/fca/libferrisfcascaling.hh | 89 + apps/fcompress/Makefile.am | 21 + apps/fcompress/Makefile.in | 993 + apps/fcompress/fcompress.cpp | 230 + apps/fedit | 21 + apps/ferris-bash-exec.sh | 5 + apps/ferris-exec-in-terminal.sh | 19 + ...erris-internal-extract-subtitles-to-format | 89 + ...-internal-remembrance-redo-batch-script.sh | 4 + ...ferris-internal-remembrance-redo-script.sh | 4 + ...erris-internal-scale-image-by-dimension.sh | 38 + apps/ferris-mount-etagere-as-kml.sh | 11 + apps/ferris-open-google-earth-for-context.pl | 92 + apps/ferris-open-google-map-for-context.sh | 24 + apps/ferris-rdfproc | 9 + ...primary-fulltext-and-eaindex-as-clucene.sh | 6 + ...mary-fulltext-and-eaindex-as-postgresql.sh | 18 + apps/ferris-setup-template-findex-database.sh | 24 + apps/ferris-setupaction.sh | 14 + apps/ferris-setupapp.sh | 12 + apps/ferris-setupopen.sh | 6 + apps/ferris-verify-dot-ferris-databases.sh | 7 + apps/ferriscd/Makefile.am | 27 + apps/ferriscd/Makefile.in | 1039 + apps/ferriscd/ferriscd | 18 + apps/ferriscd/ferriscdexe.cpp | 255 + apps/ferrisredirect/Makefile.am | 25 + apps/ferrisredirect/Makefile.in | 1062 + apps/ferrisredirect/ferris-file-to-fifo | 50 + .../ferris-internal-file-to-fifo-command.cpp | 247 + apps/ferrisredirect/ferris-redirect.cpp | 174 + apps/fileactions/Makefile.am | 21 + apps/fileactions/Makefile.in | 1001 + apps/fileactions/ferris-file-action.cpp | 163 + .../ferris-set-file-action-for-type.cpp | 136 + apps/fileclip/Makefile.am | 5 + apps/fileclip/Makefile.in | 1086 + apps/fileclip/fclipcopy/Makefile.am | 20 + apps/fileclip/fclipcopy/Makefile.in | 992 + apps/fileclip/fclipcopy/fclipcopy.cpp | 124 + apps/fileclip/fclipcut/Makefile.am | 20 + apps/fileclip/fclipcut/Makefile.in | 992 + apps/fileclip/fclipcut/fclipcut.cpp | 124 + apps/fileclip/fcliplink/Makefile.am | 20 + apps/fileclip/fcliplink/Makefile.in | 992 + apps/fileclip/fcliplink/fcliplink.cpp | 124 + apps/fileclip/fclippaste/Makefile.am | 20 + apps/fileclip/fclippaste/Makefile.in | 992 + apps/fileclip/fclippaste/fclippaste.cpp | 118 + apps/fileclip/fclipredo/Makefile.am | 20 + apps/fileclip/fclipredo/Makefile.in | 992 + apps/fileclip/fclipredo/fclipredo.cpp | 103 + apps/fileclip/fclipundo/Makefile.am | 20 + apps/fileclip/fclipundo/Makefile.in | 992 + apps/fileclip/fclipundo/fclipundo.cpp | 109 + apps/fileclip/ferris-fileclip-set-sloth.sh | 6 + apps/fmedallion/Makefile.am | 24 + apps/fmedallion/Makefile.in | 1011 + .../ferris-get-emblems-within-range.cpp | 237 + apps/fmedallion/fmedallion.cpp | 317 + apps/fmkdir/Makefile.am | 20 + apps/fmkdir/Makefile.in | 992 + apps/fmkdir/fmkdir.cpp | 176 + apps/fmodestr2octal/Makefile.am | 20 + apps/fmodestr2octal/Makefile.in | 992 + apps/fmodestr2octal/fmodestr2octal.cpp | 126 + apps/frunner/Makefile.am | 24 + apps/frunner/Makefile.in | 993 + apps/frunner/ferris-runner.cpp | 187 + apps/fschema/Makefile.am | 20 + apps/fschema/Makefile.in | 992 + apps/fschema/fschema.cpp | 122 + apps/ftouch/Makefile.am | 21 + apps/ftouch/Makefile.in | 992 + apps/ftouch/ftouch.cpp | 344 + apps/fulltextindex/DirectIndexConfigAccess.hh | 55 + apps/fulltextindex/Makefile.am | 90 + apps/fulltextindex/Makefile.in | 1284 + .../eainverted_file_to_html_table.xsl | 342 + .../feaindex-attach-fulltext-index.cpp | 139 + .../feaindex-federation-add-index.cpp | 145 + ...n-add-url-substitution-regex-for-index.cpp | 175 + ...feaindex-ldap-tivoli-objectclass-resync.sh | 19 + .../feaindex-remove-old-instances.cpp | 135 + apps/fulltextindex/feaindexadd.cpp | 227 + apps/fulltextindex/feaindexcompact.cpp | 127 + apps/fulltextindex/feaindexquery.cpp | 511 + apps/fulltextindex/feaindexremove.cpp | 142 + .../ferris-eaindex-postgresql-add-column | 23 + ...ex-postgresql-add-fulltext-index-on-column | 23 + .../ferris-eaindex-update-existing-attributes | 27 + apps/fulltextindex/ferris-find.cpp | 924 + apps/fulltextindex/ferris-index-remove | 6 + apps/fulltextindex/ferris-search.cpp | 260 + .../findex-remove-old-instances.cpp | 135 + apps/fulltextindex/findexadd.cpp | 229 + apps/fulltextindex/findexcompact.cpp | 129 + apps/fulltextindex/findexquery.cpp | 482 + apps/fulltextindex/findexremove.cpp | 142 + .../inverted_file_to_html_table.xsl | 357 + apps/head/Makefile.am | 18 + apps/head/Makefile.in | 987 + apps/head/fhead.cpp | 253 + apps/importdesktop/Makefile.am | 26 + apps/importdesktop/Makefile.in | 1208 + .../dot-desktop-files/Graphics/Makefile.am | 10 + .../dot-desktop-files/Graphics/Makefile.in | 875 + .../dot-desktop-files/Graphics/entice.desktop | 8 + .../dot-desktop-files/Graphics/feh.desktop | 8 + .../Graphics/slideshow.desktop | 8 + .../dot-desktop-files/Makefile.am | 6 + .../dot-desktop-files/Makefile.in | 1025 + .../dot-desktop-files/Multimedia/Makefile.am | 10 + .../dot-desktop-files/Multimedia/Makefile.in | 875 + .../Multimedia/mplayer-fullscreen.desktop | 8 + .../Multimedia/mplayer-nosound.desktop | 8 + .../Multimedia/mplayer-wide.desktop | 8 + .../Multimedia/mplayer-x2.desktop | 8 + .../Multimedia/mplayer-x3.desktop | 8 + .../Multimedia/mplayer.desktop | 8 + .../ferris-generate-gnome-menu.sh | 307 + .../ferris-import-desktop-file.cpp | 124 + .../ferris-import-desktop-hive.sh | 15 + apps/libferris-googleearth | 11 + apps/libferris-googleearth-bouncer.pl | 104 + apps/ls/Makefile.am | 21 + apps/ls/Makefile.in | 993 + apps/ls/ls.cpp | 1338 + apps/metadataserver/Makefile.am | 64 + apps/metadataserver/Makefile.in | 1109 + ...internal-metadata-broker-direct-client.cpp | 292 + .../ferris-internal-metadata-broker.cpp | 714 + ...internal-metadata-worker-direct-client.cpp | 180 + .../ferris-internal-metadata-worker.cpp | 284 + .../metadata-clients-common.cpp | 79 + .../metadataserver/metadata-clients-common.hh | 86 + apps/metadataserver/mocimpls.cpp | 0 apps/mv/Makefile.am | 20 + apps/mv/Makefile.in | 991 + apps/mv/ferrismv.cpp | 163 + apps/namespaces/Makefile.am | 20 + apps/namespaces/Makefile.in | 992 + apps/namespaces/fnamespace.cpp | 168 + apps/oprocdeamon/Makefile.am | 20 + apps/oprocdeamon/Makefile.in | 996 + ...ferris-out-of-proc-notification-deamon.cpp | 408 + apps/phpsearchinterface/Makefile.am | 9 + apps/phpsearchinterface/Makefile.in | 1026 + .../dhtmlxSuite/Makefile.am | 8 + .../dhtmlxSuite/Makefile.in | 823 + .../ferrisls-xml-to-dhtmlxSuite.xsl | 42 + apps/phpsearchinterface/dhtmlxSuite/index.php | 120 + apps/phpsearchinterface/dhtmlxSuite/query.php | 31 + apps/phpsearchinterface/index.php | 59 + apps/phpsearchinterface/runquery-simple.php | 18 + .../xml-results-to-xhtml.xsl | 74 + apps/rdf/Makefile.am | 41 + apps/rdf/Makefile.in | 1080 + apps/rdf/ferris-myrdf-compact.cpp | 152 + apps/rdf/ferris-myrdf-inference.cpp | 504 + apps/rdf/ferris-myrdf-query.cpp | 281 + apps/rdf/ferris-rdf-detach-by-regex.cpp | 183 + apps/rdf/ferris-rdf-smush-new-url.cpp | 138 + apps/rdf/ferris-rdf-smush-union-urls.cpp | 130 + apps/rm/Makefile.am | 19 + apps/rm/Makefile.in | 991 + apps/rm/ferrisrm.cpp | 103 + apps/scripts/Makefile.am | 4 + apps/scripts/Makefile.in | 883 + apps/scripts/ferris-emacsclient-function | 15 + apps/scripts/ferris-emacsclient-function~ | 4 + apps/scripts/ferris-open-in-text-editor | 29 + apps/scripts/ferris-open-in-text-editor~ | 2 + apps/tail/Makefile.am | 18 + apps/tail/Makefile.in | 987 + apps/tail/ftail.cpp | 487 + apps/tools/Makefile.am | 32 + apps/tools/Makefile.in | 1042 + apps/tools/fchmod.cpp | 270 + apps/tools/fchown.cpp | 355 + apps/tools/freadlink.cpp | 268 + apps/tools/fstat.cpp | 420 + apps/tools/ftest.cpp | 343 + apps/upnpserver/Makefile.am | 16 + apps/upnpserver/Makefile.in | 988 + apps/upnpserver/ferris-upnp-server.cpp | 447 + apps/volumemanager/Makefile.am | 42 + apps/volumemanager/Makefile.in | 1050 + .../ferris-internal-hal-copyto.cpp | 170 + .../volumemanager/ferris-internal-hal-els.cpp | 174 + .../ferris-internal-hal-mount-volume.cpp | 173 + apps/volumemanager/ferris-volume-manager.cpp | 570 + apps/xml/CGITransform/CGIFerrisTransform.cpp | 526 + apps/xml/CGITransform/Makefile.am | 36 + apps/xml/CGITransform/Makefile.in | 1048 + apps/xml/CGITransform/query.fxsql | 10 + apps/xml/CGITransform/query.xsl | 82 + apps/xml/CGITransform/queryform.fxsql | 6 + apps/xml/CGITransform/queryform.xsl | 43 + apps/xml/Makefile.am | 57 + apps/xml/Makefile.in | 1249 + apps/xml/XSLTransform/Makefile.am | 21 + apps/xml/XSLTransform/Makefile.in | 993 + apps/xml/XSLTransform/XSLTransform.cpp | 639 + ...em-to-xsltfs-excel-sheet-postfix.xfragment | 2 + ...tem-to-xsltfs-excel-sheet-prefix.xfragment | 64 + ...o-xsltfs-excel-sheet-rev-postfix.xfragment | 4 + ...to-xsltfs-excel-sheet-rev-prefix.xfragment | 29 + .../ferris-filesystem-to-xsltfs-sheets.cpp | 616 + apps/xml/ferris-xml-edit.cpp | 245 + apps/xml/ferris-xqilla.cpp | 504 + apps/xmmsdaemon/Makefile.am | 27 + apps/xmmsdaemon/Makefile.in | 1012 + .../ferris-internal-xmms-server.cpp | 347 + appsui/Makefile.am | 2 + appsui/Makefile.in | 1022 + appsui/gfcopy/Makefile.am | 24 + appsui/gfcopy/Makefile.in | 996 + appsui/gfcopy/gfcp.cpp | 298 + appsui/gfdl/Makefile.am | 23 + appsui/gfdl/Makefile.in | 996 + appsui/gfdl/gfdl.cpp | 288 + appsui/gfindex/Makefile.am | 24 + appsui/gfindex/Makefile.in | 996 + appsui/gfindex/gfindexadd.cpp | 299 + appsui/gfmv/Makefile.am | 23 + appsui/gfmv/Makefile.in | 996 + appsui/gfmv/gfmv.cpp | 402 + appsui/gfproperties/Makefile.am | 23 + appsui/gfproperties/Makefile.in | 996 + appsui/gfproperties/gfproperties.cpp | 208 + appsui/gfrm/Makefile.am | 23 + appsui/gfrm/Makefile.in | 996 + appsui/gfrm/gfrm.cpp | 263 + appsui/volumemanager/Makefile.am | 25 + appsui/volumemanager/Makefile.in | 997 + ...ris-volume-manager-setup-volume-wizard.cpp | 546 + cc/Ferris/Ferris.directory | 5 + cc/Ferris/Ferris.png | Bin 0 -> 3327 bytes cc/Ferris/Makefile.am | 25 + cc/Ferris/Makefile.in | 868 + cc/Ferris/agents.desktop | 7 + cc/Ferris/agents.desktop.in | 7 + cc/Ferris/auth.desktop | 7 + cc/Ferris/auth.desktop.in | 7 + cc/Ferris/curl-ftp.desktop | 7 + cc/Ferris/curl-ftp.desktop.in | 7 + cc/Ferris/ferris-agents.png | Bin 0 -> 2108 bytes cc/Ferris/ferris-auth.png | Bin 0 -> 2549 bytes cc/Ferris/ferris-curl-ftp.png | Bin 0 -> 3388 bytes cc/Ferris/ferris-general.png | Bin 0 -> 4904 bytes cc/Ferris/ferris-index.png | Bin 0 -> 4498 bytes cc/Ferris/ferris-locale.png | Bin 0 -> 2755 bytes cc/Ferris/ferris-logging.png | Bin 0 -> 2120 bytes cc/Ferris/ferris-medallion.png | Bin 0 -> 2974 bytes cc/Ferris/ferris-thumbnails.png | Bin 0 -> 3207 bytes cc/Ferris/ferris-version.png | Bin 0 -> 3742 bytes cc/Ferris/general.desktop | 7 + cc/Ferris/general.desktop.in | 7 + cc/Ferris/indexing.desktop | 7 + cc/Ferris/indexing.desktop.in | 7 + cc/Ferris/locale.desktop | 7 + cc/Ferris/locale.desktop.in | 7 + cc/Ferris/logging.desktop | 7 + cc/Ferris/logging.desktop.in | 7 + cc/Ferris/medallion.desktop | 7 + cc/Ferris/medallion.desktop.in | 7 + cc/Ferris/mysql.desktop | 7 + cc/Ferris/thumbnails.desktop | 7 + cc/Ferris/thumbnails.desktop.in | 7 + cc/Ferris/version.desktop | 7 + cc/Ferris/version.desktop.in | 7 + cc/Makefile.am | 4 + cc/Makefile.in | 1021 + cc/capplets/Makefile.am | 11 + cc/capplets/Makefile.in | 1027 + cc/capplets/agents/Makefile.am | 20 + cc/capplets/agents/Makefile.in | 991 + cc/capplets/agents/ferris-capplet-agents.cpp | 929 + cc/capplets/auth/Makefile.am | 54 + cc/capplets/auth/Makefile.in | 1026 + cc/capplets/auth/ferris-capplet-auth.cpp | 2586 + cc/capplets/curl-ftp/Makefile.am | 20 + cc/capplets/curl-ftp/Makefile.in | 994 + .../curl-ftp/ferris-capplet-curl-ftp.cpp | 374 + cc/capplets/general/Makefile.am | 20 + cc/capplets/general/Makefile.in | 991 + .../general/ferris-capplet-general.cpp | 555 + cc/capplets/index/Makefile.am | 20 + cc/capplets/index/Makefile.in | 991 + cc/capplets/index/ferris-capplet-index.cpp | 345 + cc/capplets/locale/Makefile.am | 20 + cc/capplets/locale/Makefile.in | 991 + cc/capplets/locale/ferris-capplet-locale.cpp | 184 + cc/capplets/logging/Makefile.am | 21 + cc/capplets/logging/Makefile.in | 992 + .../logging/ferris-capplet-logging.cpp | 364 + cc/capplets/medallion/Makefile.am | 20 + cc/capplets/medallion/Makefile.in | 994 + .../medallion/ferris-capplet-medallion.cpp | 1552 + cc/capplets/rdf/Makefile.am | 21 + cc/capplets/rdf/Makefile.in | 992 + cc/capplets/rdf/ferris-capplet-rdf.cpp | 896 + cc/capplets/thumbnails/Makefile.am | 20 + cc/capplets/thumbnails/Makefile.in | 994 + .../thumbnails/ferris-capplet-thumbnails.cpp | 229 + cc/capplets/version/Makefile.am | 20 + cc/capplets/version/Makefile.in | 994 + .../version/ferris-capplet-version.cpp | 243 + .../version/ferris-capplet-version.hh.in | 5 + compile | 140 + config.guess | 1501 + config.h.in | 338 + config.sub | 1705 + configure | 41348 +++++++ configure.ac | 5440 + customalloc/Makefile.am | 5 + customalloc/Makefile.in | 946 + customalloc/malloc-2.7.2.c | 5567 + depcomp | 630 + dot-ferris/Makefile.am | 13 + dot-ferris/Makefile.in | 1078 + dot-ferris/apps.db | Bin 0 -> 8192 bytes dot-ferris/bookmarks.db | Bin 0 -> 12288 bytes dot-ferris/cache.db | Bin 0 -> 8192 bytes dot-ferris/ea-index/Makefile.am | 11 + dot-ferris/ea-index/Makefile.in | 873 + dot-ferris/ea-index/attributemap.lexicon.db | Bin 0 -> 12288 bytes dot-ferris/ea-index/ea-index-config.db | Bin 0 -> 12288 bytes dot-ferris/etagere/Makefile.am | 11 + dot-ferris/etagere/Makefile.in | 873 + dot-ferris/etagere/cold-emblems.db | Bin 0 -> 12288 bytes dot-ferris/etagere/etagere.db | Bin 0 -> 12288 bytes dot-ferris/eventbind.db | Bin 0 -> 8192 bytes dot-ferris/file-clipboard.db | Bin 0 -> 8192 bytes dot-ferris/full-text-index/Makefile.am | 11 + dot-ferris/full-text-index/Makefile.in | 873 + dot-ferris/full-text-index/config.db | Bin 0 -> 8192 bytes .../full-text-index/full-text-index-config.db | Bin 0 -> 12288 bytes .../full-text-index/lexicon.prefixcoded | 0 dot-ferris/general.db | Bin 0 -> 8192 bytes dot-ferris/hal-actions.db | Bin 0 -> 12288 bytes dot-ferris/hal-user-configuration.db | Bin 0 -> 12288 bytes dot-ferris/licenses/Makefile.am | 11 + dot-ferris/licenses/Makefile.in | 873 + dot-ferris/licenses/src-c-BSD | 35 + dot-ferris/licenses/src-c-GPL | 33 + dot-ferris/licenses/src-c-LGPL | 34 + dot-ferris/licenses/src-cpp-BSD | 35 + dot-ferris/licenses/src-cpp-GPL | 33 + dot-ferris/licenses/src-cpp-LGPL | 34 + dot-ferris/licenses/src-h-BSD | 52 + dot-ferris/licenses/src-h-GPL | 49 + dot-ferris/licenses/src-h-LGPL | 50 + dot-ferris/licenses/src-hh-BSD | 45 + dot-ferris/licenses/src-hh-GPL | 44 + dot-ferris/licenses/src-hh-LGPL | 45 + dot-ferris/logging.db | Bin 0 -> 20480 bytes dot-ferris/mimebind.db | Bin 0 -> 8192 bytes dot-ferris/rdfdb/Makefile.am | 11 + dot-ferris/rdfdb/Makefile.in | 873 + dot-ferris/rdfdb/myrdf-contexts.db | Bin 0 -> 8192 bytes dot-ferris/rdfdb/myrdf-po2s.db | Bin 0 -> 8192 bytes dot-ferris/rdfdb/myrdf-so2p.db | Bin 0 -> 8192 bytes dot-ferris/rdfdb/myrdf-sp2o.db | Bin 0 -> 8192 bytes dot-ferris/recordfile-types.db | Bin 0 -> 12288 bytes dot-ferris/sane/Makefile.am | 5 + dot-ferris/sane/Makefile.in | 1023 + dot-ferris/sane/dot-discovered/Makefile.am | 3 + dot-ferris/sane/dot-discovered/Makefile.in | 1023 + .../sane/dot-discovered/color-100/Makefile.am | 3 + .../sane/dot-discovered/color-100/Makefile.in | 1023 + .../color-100/options/Makefile.am | 11 + .../color-100/options/Makefile.in | 874 + .../dot-discovered/color-100/options/mode | 1 + .../color-100/options/resolution | 1 + .../dot-discovered/color-100/options/swcrop | 1 + .../dot-discovered/color-100/options/swdeskew | 1 + .../color-100/options/y-resolution | 1 + .../sane/dot-discovered/color-300/Makefile.am | 3 + .../sane/dot-discovered/color-300/Makefile.in | 1023 + .../color-300/options/Makefile.am | 11 + .../color-300/options/Makefile.in | 874 + .../dot-discovered/color-300/options/mode | 1 + .../color-300/options/resolution | 1 + .../dot-discovered/color-300/options/swcrop | 1 + .../dot-discovered/color-300/options/swdeskew | 1 + .../color-300/options/y-resolution | 1 + .../sane/dot-discovered/color-600/Makefile.am | 3 + .../sane/dot-discovered/color-600/Makefile.in | 1023 + .../color-600/options/Makefile.am | 11 + .../color-600/options/Makefile.in | 874 + .../dot-discovered/color-600/options/mode | 1 + .../color-600/options/resolution | 1 + .../dot-discovered/color-600/options/swcrop | 1 + .../dot-discovered/color-600/options/swdeskew | 1 + .../color-600/options/y-resolution | 1 + .../dot-discovered/color-base/Makefile.am | 3 + .../dot-discovered/color-base/Makefile.in | 1023 + .../color-base/options/Makefile.am | 11 + .../color-base/options/Makefile.in | 874 + .../dot-discovered/color-base/options/mode | 1 + .../color-base/options/resolution | 1 + .../dot-discovered/color-base/options/swcrop | 1 + .../color-base/options/swdeskew | 1 + .../color-base/options/y-resolution | 1 + .../sane/dot-discovered/gray-100/Makefile.am | 3 + .../sane/dot-discovered/gray-100/Makefile.in | 1023 + .../gray-100/options/Makefile.am | 11 + .../gray-100/options/Makefile.in | 874 + .../sane/dot-discovered/gray-100/options/mode | 1 + .../gray-100/options/resolution | 1 + .../dot-discovered/gray-100/options/swcrop | 1 + .../dot-discovered/gray-100/options/swdeskew | 1 + .../gray-100/options/y-resolution | 1 + .../sane/dot-discovered/gray-300/Makefile.am | 3 + .../sane/dot-discovered/gray-300/Makefile.in | 1023 + .../gray-300/options/Makefile.am | 11 + .../gray-300/options/Makefile.in | 874 + .../sane/dot-discovered/gray-300/options/mode | 1 + .../gray-300/options/resolution | 1 + .../dot-discovered/gray-300/options/swcrop | 1 + .../dot-discovered/gray-300/options/swdeskew | 1 + .../gray-300/options/y-resolution | 1 + .../sane/dot-discovered/gray-600/Makefile.am | 3 + .../sane/dot-discovered/gray-600/Makefile.in | 1023 + .../gray-600/options/Makefile.am | 11 + .../gray-600/options/Makefile.in | 874 + .../sane/dot-discovered/gray-600/options/mode | 1 + .../gray-600/options/resolution | 1 + .../dot-discovered/gray-600/options/swcrop | 1 + .../dot-discovered/gray-600/options/swdeskew | 1 + .../gray-600/options/y-resolution | 1 + .../sane/dot-discovered/gray-base/Makefile.am | 3 + .../sane/dot-discovered/gray-base/Makefile.in | 1023 + .../gray-base/options/Makefile.am | 11 + .../gray-base/options/Makefile.in | 874 + .../dot-discovered/gray-base/options/mode | 1 + .../gray-base/options/resolution | 1 + .../dot-discovered/gray-base/options/swcrop | 1 + .../dot-discovered/gray-base/options/swdeskew | 1 + .../gray-base/options/y-resolution | 1 + dot-ferris/schema.xml | 656 + dot-ferris/schema.xml.in | 656 + dot-ferris/secure.db | Bin 0 -> 8192 bytes dot-ferris/tmp/Makefile.am | 11 + dot-ferris/tmp/Makefile.in | 873 + dot-ferris/tmp/STUB | 0 eaindexers_custom_plugin/Makefile.am | 18 + eaindexers_custom_plugin/Makefile.in | 1021 + .../libeaidxcustomferris.cpp | 2670 + .../libeaidxcustomferris.hh | 590 + .../libeaidxcustomferrisdb4tree.cpp | 1886 + .../libeaidxcustomferrisdb4tree.hh | 350 + exposures/Makefile.am | 10 + exposures/Makefile.in | 1025 + exposures/perl/Makefile.am | 9 + exposures/perl/Makefile.in | 869 + exposures/perl/libferris.pm | 196 + exposures/perl/test.pl | 38 + exposures/perl/tie.pl | 47 + exposures/plasma/Makefile.am | 28 + exposures/plasma/Makefile.in | 1068 + exposures/plasma/libferris.operations | 12 + exposures/plasma/mocimpls.cpp | 0 .../plasma/plasma-engine-libferris.desktop | 17 + exposures/plasma/plasma_engine_libferris.cpp | 233 + exposures/plasma/plasma_engine_libferris.hh | 71 + exposures/sqlitevtab/Makefile.am | 22 + exposures/sqlitevtab/Makefile.in | 1013 + .../sqlitevtab/libferrissqlitevtable.cpp | 990 + exposures/sqlitevtab/libferrissqlitevtable.hh | 0 factories/Makefile.am | 3 + factories/Makefile.in | 1021 + factories/astext/Makefile.am | 31 + factories/astext/Makefile.in | 965 + factories/astext/libastextdjvu_factory.cpp | 37 + factories/astext/libastextextern_factory.cpp | 56 + factories/astext/libastexthtml_factory.cpp | 38 + factories/astext/libastextman_factory.cpp | 91 + factories/astext/libastextpdf_factory.cpp | 37 + factories/astext/libastextwv_factory.cpp | 37 + factories/creation/Makefile.am | 44 + factories/creation/Makefile.in | 1006 + factories/creation/libcreationdb4_factory.cpp | 100 + .../creation/libcreationdbxml_factory.cpp | 80 + .../creation/libcreationdevsource_factory.cpp | 115 + .../creation/libcreationeaindex_factory.cpp | 91 + .../libcreationeaindexdb4tree_factory.cpp | 73 + .../libcreationfulltextindex_factory.cpp | 99 + .../creation/libcreationgdbm_factory.cpp | 79 + .../creation/libcreationmagick_factory.cpp | 334 + .../creation/libcreationmarkup_factory.cpp | 77 + factories/creation/libcreationmng_factory.cpp | 52 + factories/creation/libcreationmp3_factory.cpp | 46 + .../creation/libcreationmpeg2_factory.cpp | 46 + factories/creation/libcreationogg_factory.cpp | 46 + .../libcreationshellscript_factory.cpp | 56 + .../libcreationsopranoredland_factory.cpp | 98 + factories/creation/libcreationtdb_factory.cpp | 79 + factories/creation/libcreationwav_factory.cpp | 45 + factories/eagenerators/Makefile.am | 116 + factories/eagenerators/Makefile.in | 1052 + .../eagenerators/libferrisa52_factory.cpp | 71 + .../libferrisdjvulibre_factory.cpp | 53 + .../eagenerators/libferrisexifea_factory.cpp | 70 + .../libferrisextractor_factory.cpp | 48 + .../eagenerators/libferrisflac_factory.cpp | 72 + .../eagenerators/libferrisfspot_factory.cpp | 52 + .../eagenerators/libferrisid3_factory.cpp | 77 + .../eagenerators/libferrisjasper_factory.cpp | 63 + .../eagenerators/libferrisjpeg_factory.cpp | 55 + .../libferriskde3metadata_factory.cpp | 48 + .../libferrismediainfoea_factory.cpp | 92 + .../eagenerators/libferrismpeg2_factory.cpp | 73 + .../eagenerators/libferrismpeg3_factory.cpp | 77 + .../eagenerators/libferrisoggz_factory.cpp | 72 + .../eagenerators/libferrispng_factory.cpp | 52 + .../eagenerators/libferrissoprano_factory.cpp | 70 + .../eagenerators/libferrisstrigi_factory.cpp | 52 + .../libferrissubtitles_factory.cpp | 73 + .../eagenerators/libferristaglib_factory.cpp | 78 + .../eagenerators/libferrisxineea_factory.cpp | 100 + .../eagenerators/libferrisxmp_factory.cpp | 94 + factories/eagenerators/libgimp_factory.cpp | 52 + factories/eagenerators/libimlib2_factory.cpp | 52 + factories/eagenerators/libmagick_factory.cpp | 135 + .../eagenerators/libxfsnative_factory.cpp | 51 + ferris-config.in | 59 + ferris.pc | 15 + ferris.pc.in | 15 + ferrisui.pc | 15 + ferrisui.pc.in | 15 + ferrisxslt.pc | 15 + ferrisxslt.pc.in | 15 + firsttime/Makefile.am | 11 + firsttime/Makefile.in | 1027 + firsttime/console/Makefile.am | 24 + firsttime/console/Makefile.in | 1053 + firsttime/console/ferris-first-time-user.cpp | 484 + firsttime/console/ferris-setup-from-skels.sh | 5 + firsttime/ferris-first-time-user.hh | 118 + firsttime/ui/Makefile.am | 20 + firsttime/ui/Makefile.in | 995 + firsttime/ui/ferris-first-time-user-ui.cpp | 269 + fulltextindexers_custom_plugin/Makefile.am | 15 + fulltextindexers_custom_plugin/Makefile.in | 1003 + .../libftxcustomferris.cpp | 2854 + .../libftxcustomferris.hh | 978 + install-sh | 322 + ltmain.sh | 9636 ++ macros/ferrismacros.m4 | 3412 + media/Makefile.am | 4 + media/Makefile.in | 1021 + media/icons/Button-Blue-Raw.png | Bin 0 -> 1730 bytes media/icons/Button-Compress.png | Bin 0 -> 2760 bytes media/icons/Button-Decompress.png | Bin 0 -> 2806 bytes media/icons/Button-NextTrack.png | Bin 0 -> 2806 bytes media/icons/Button-Pause.png | Bin 0 -> 2638 bytes media/icons/Button-Play.png | Bin 0 -> 2684 bytes media/icons/Button-PrevTrack.png | Bin 0 -> 2760 bytes media/icons/Button-Raw.png | Bin 0 -> 2762 bytes media/icons/Button-RevPlay.png | Bin 0 -> 2756 bytes media/icons/Duct-Tape.png | Bin 0 -> 13511 bytes media/icons/HD_drive.png | Bin 0 -> 9540 bytes media/icons/Makefile.am | 11 + media/icons/Makefile.in | 873 + media/icons/asf.png | Bin 0 -> 3965 bytes media/icons/audio.png | Bin 0 -> 4979 bytes media/icons/avi.png | Bin 0 -> 3629 bytes media/icons/bmp.png | Bin 0 -> 2553 bytes media/icons/bookmarks.png | Bin 0 -> 3268 bytes media/icons/c.png | Bin 0 -> 4186 bytes media/icons/cancel-blur.png | Bin 0 -> 943 bytes media/icons/cancel.png | Bin 0 -> 309 bytes media/icons/cdrom.png | Bin 0 -> 7995 bytes media/icons/clientsocket.png | Bin 0 -> 4074 bytes media/icons/configure-dir.png | Bin 0 -> 3691 bytes media/icons/cpp.png | Bin 0 -> 1931 bytes media/icons/csh.png | Bin 0 -> 4455 bytes media/icons/debug.png | Bin 0 -> 3161 bytes media/icons/dir.png | Bin 0 -> 4393 bytes media/icons/directory.png | Bin 0 -> 13831 bytes media/icons/download-tb.png | Bin 0 -> 282 bytes media/icons/ea.png | Bin 0 -> 3971 bytes media/icons/eaindex.png | Bin 0 -> 2499 bytes media/icons/eaindexldap.png | Bin 0 -> 2499 bytes media/icons/eaindexlucene.png | Bin 0 -> 2499 bytes media/icons/eaindexodbc.png | Bin 0 -> 2499 bytes media/icons/edit.png | Bin 0 -> 1941 bytes media/icons/editor.png | Bin 0 -> 3093 bytes media/icons/ee.png | Bin 0 -> 4964 bytes media/icons/ego-desktop-apps.png | Bin 0 -> 3971 bytes media/icons/ego-desktop-bookmarks.png | Bin 0 -> 2974 bytes media/icons/ego-desktop-history.png | Bin 0 -> 3979 bytes media/icons/ego-edit-app.png | Bin 0 -> 2766 bytes media/icons/ego-loadingthumb.png | Bin 0 -> 3677 bytes media/icons/ego-mu-PackedBoxLayout.png | Bin 0 -> 234 bytes media/icons/ego-mu-edit.png | Bin 0 -> 1132 bytes media/icons/ego-mu-filter.png | Bin 0 -> 672 bytes media/icons/ego-mu-gesture.png | Bin 0 -> 670 bytes media/icons/ego-mu-giconview.png | Bin 0 -> 2974 bytes media/icons/ego-mu-gtreeview.png | Bin 0 -> 2956 bytes media/icons/ego-mu-layout.png | Bin 0 -> 497 bytes media/icons/ego-mu-mozview.png | Bin 0 -> 3075 bytes media/icons/ego-mu-new-window-here.png | Bin 0 -> 757 bytes media/icons/ego-mu-picpreview.png | Bin 0 -> 938 bytes media/icons/ego-mu-rename.png | Bin 0 -> 1003 bytes media/icons/ego-mu-scheme.png | Bin 0 -> 491 bytes media/icons/ego-mu-search.png | Bin 0 -> 672 bytes media/icons/ego-mu-select.png | Bin 0 -> 852 bytes media/icons/ego-mu-set-background.png | Bin 0 -> 3009 bytes media/icons/ego-mu-set-font.png | Bin 0 -> 2245 bytes media/icons/ego-mu-terminal.png | Bin 0 -> 1738 bytes media/icons/ego-mu-tree.png | Bin 0 -> 418 bytes media/icons/ego-mu-xemacs.png | Bin 0 -> 2752 bytes media/icons/ego-tb-bookmarks.png | Bin 0 -> 1152 bytes media/icons/ego-tb-viewtype.png | Bin 0 -> 968 bytes media/icons/entice.png | Bin 0 -> 3095 bytes media/icons/fax.png | Bin 0 -> 3469 bytes media/icons/feh.png | Bin 0 -> 3207 bytes media/icons/ferris-mu-audio.png | Bin 0 -> 449 bytes media/icons/ferris-mu-dir.png | Bin 0 -> 342 bytes media/icons/ferris-mu-file.png | Bin 0 -> 213 bytes media/icons/ferris-mu-image.png | Bin 0 -> 854 bytes .../ferris-mu-medallion-max-size-filler.png | Bin 0 -> 139 bytes .../ferris-mu-treeicon-max-size-filler.png | Bin 0 -> 139 bytes media/icons/ferris-mu-video.png | Bin 0 -> 1739 bytes media/icons/ferriscreate.png | Bin 0 -> 3323 bytes media/icons/file.png | Bin 0 -> 3323 bytes media/icons/filter.png | Bin 0 -> 2827 bytes media/icons/find-files-48.png | Bin 0 -> 2499 bytes media/icons/fits.png | Bin 0 -> 3469 bytes media/icons/folder5.png | Bin 0 -> 2946 bytes media/icons/fulltextindex.png | Bin 0 -> 2499 bytes media/icons/fulltextindexlucene.png | Bin 0 -> 2499 bytes media/icons/fulltextindexodbc.png | Bin 0 -> 2499 bytes media/icons/games.png | Bin 0 -> 2597 bytes media/icons/gif.png | Bin 0 -> 2447 bytes media/icons/gimp.png | Bin 0 -> 3410 bytes media/icons/gnome-ccbackground.png | Bin 0 -> 2743 bytes media/icons/gnome-video-quicktime-36.png | Bin 0 -> 2564 bytes media/icons/gqview-48.png | Bin 0 -> 3207 bytes media/icons/gthumb.png | Bin 0 -> 3736 bytes media/icons/h.png | Bin 0 -> 3884 bytes media/icons/hardlink.png | Bin 0 -> 2327 bytes media/icons/hh.png | Bin 0 -> 4904 bytes media/icons/home.png | Bin 0 -> 945 bytes media/icons/html.png | Bin 0 -> 3062 bytes media/icons/i-blockdev.png | Bin 0 -> 3805 bytes media/icons/i-cdrom-36.png | Bin 0 -> 2326 bytes media/icons/i-cdrom.png | Bin 0 -> 4001 bytes media/icons/i-directory-36.png | Bin 0 -> 2374 bytes media/icons/i-dvd-36.png | Bin 0 -> 3037 bytes media/icons/i-harddisk.png | Bin 0 -> 3805 bytes media/icons/i-symlink-36.png | Bin 0 -> 2327 bytes media/icons/image.png | Bin 0 -> 3469 bytes media/icons/jpeg.png | Bin 0 -> 2501 bytes media/icons/md.png | Bin 0 -> 3181 bytes media/icons/misc.png | Bin 0 -> 4904 bytes media/icons/mm-directory.png | Bin 0 -> 4204 bytes media/icons/mng.png | Bin 0 -> 3523 bytes media/icons/moonstone.png | Bin 0 -> 2956 bytes media/icons/mp3.png | Bin 0 -> 4165 bytes media/icons/mpeg.png | Bin 0 -> 4271 bytes media/icons/mpg.png | Bin 0 -> 3523 bytes media/icons/mplayer.png | Bin 0 -> 3548 bytes media/icons/music-directory.png | Bin 0 -> 4182 bytes media/icons/new-bookmark.png | Bin 0 -> 2510 bytes media/icons/ogg.png | Bin 0 -> 3929 bytes media/icons/ok-blur.png | Bin 0 -> 877 bytes media/icons/ok.png | Bin 0 -> 243 bytes media/icons/open.png | Bin 0 -> 2995 bytes media/icons/openurl.png | Bin 0 -> 13966 bytes media/icons/pcx.png | Bin 0 -> 3469 bytes media/icons/pdf.png | Bin 0 -> 2749 bytes media/icons/ping-tb.png | Bin 0 -> 3929 bytes media/icons/plain.png | Bin 0 -> 1795 bytes media/icons/png.png | Bin 0 -> 2522 bytes media/icons/pnm.png | Bin 0 -> 2574 bytes media/icons/ps.png | Bin 0 -> 2153 bytes media/icons/psd.png | Bin 0 -> 2651 bytes media/icons/queryview.png | Bin 0 -> 3869 bytes media/icons/recorder-48.png | Bin 0 -> 2189 bytes media/icons/red-switch.png | Bin 0 -> 4383 bytes media/icons/search.png | Bin 0 -> 6904 bytes media/icons/serversocket.png | Bin 0 -> 4048 bytes media/icons/sgi.png | Bin 0 -> 3469 bytes media/icons/sgml.png | Bin 0 -> 3905 bytes media/icons/sh.png | Bin 0 -> 4403 bytes media/icons/socket.png | Bin 0 -> 4074 bytes media/icons/softlink.png | Bin 0 -> 2327 bytes media/icons/special.png | Bin 0 -> 2002 bytes media/icons/sql.png | Bin 0 -> 3869 bytes media/icons/sun.png | Bin 0 -> 3469 bytes media/icons/svg.png | Bin 0 -> 4032 bytes media/icons/table.png | Bin 0 -> 2549 bytes media/icons/terminal.png | Bin 0 -> 2929 bytes media/icons/text-plain.png | Bin 0 -> 4069 bytes media/icons/text.png | Bin 0 -> 3905 bytes media/icons/tga.png | Bin 0 -> 2597 bytes media/icons/tiff.png | Bin 0 -> 3469 bytes media/icons/tmp.png | Bin 0 -> 4795 bytes media/icons/tool.png | Bin 0 -> 3732 bytes media/icons/tuple.png | Bin 0 -> 3971 bytes media/icons/unknown.png | Bin 0 -> 1795 bytes media/icons/video-dir.png | Bin 0 -> 2564 bytes media/icons/video-quicktime.png | Bin 0 -> 4330 bytes media/icons/video.png | Bin 0 -> 3523 bytes media/icons/volume2-48.png | Bin 0 -> 3643 bytes media/icons/wav.png | Bin 0 -> 3159 bytes media/icons/xemacs.png | Bin 0 -> 2752 bytes media/icons/xml.png | Bin 0 -> 3905 bytes media/icons/xmms.png | Bin 0 -> 4655 bytes media/icons/zip-dir.png | Bin 0 -> 4485 bytes media/xslt/Makefile.am | 11 + media/xslt/Makefile.in | 873 + ...s-fca-tree-to-relation-browser-cleanup.xsl | 49 + .../ferris-fca-tree-to-relation-browser.xsl | 231 + .../xslt/ferris-geospatial-emblems-to-kml.xsl | 40 + ...ris-kml-fragment-to-geospatial-emblems.xsl | 33 + .../xslt/ferris-kml-to-geospatial-emblems.xsl | 69 + media/xslt/flatten-kml-to-sql.xsl | 78 + media/xslt/flatten-kml-with-crumbs.xsl | 69 + mg/Makefile.am | 30 + mg/Makefile.in | 968 + mg/bitio_gen.c | 166 + mg/bitio_gen.h | 78 + mg/bitio_m.h | 550 + mg/bitio_m_mem.h | 200 + mg/bitio_m_mems.h | 121 + mg/bitio_m_random.h | 175 + mg/bitio_mem.c | 267 + mg/bitio_mem.h | 120 + mg/bitio_mems.c | 265 + mg/bitio_mems.h | 106 + mg/bitio_random.c | 328 + mg/bitio_random.h | 133 + mg/longlong.h | 85 + mg/memlib.c | 59 + mg/memlib.h | 57 + mg/pathmax.h | 59 + mg/stem.c | 1178 + mg/stem.h | 60 + mg/sysfuncs.h | 345 + migration/Makefile.am | 27 + migration/Makefile.in | 844 + missing | 353 + mkinstalldirs | 150 + noarch/Makefile.am | 9 + noarch/Makefile.in | 874 + noarch/libferris-emacs.el | 92 + patches/Makefile.am | 3 + patches/Makefile.in | 820 + patches/README | 11 + patches/tramp-2.1.17-ferris.patch | 203 + perl/FerrisCommonMod.pm | 89 + perl/Makefile.am | 5 + perl/Makefile.in | 883 + plugins/Makefile.am | 3 + plugins/Makefile.in | 1021 + plugins/astext/Makefile.am | 5 + plugins/astext/Makefile.in | 1022 + plugins/astext/djvu/Makefile.am | 20 + plugins/astext/djvu/Makefile.in | 1002 + plugins/astext/djvu/libastextdjvu.cpp | 80 + plugins/astext/extern/Makefile.am | 20 + plugins/astext/extern/Makefile.in | 1035 + plugins/astext/extern/libastextextern.cpp | 119 + ...bferris-astext-extern-extractor-koffice.sh | 10 + .../libferris-astext-extern-extractor-oo.sh | 10 + .../libferris-astext-extern-extractor-ps.sh | 10 + .../libferris-astext-extern-extractor-rtf.sh | 10 + .../libferris-astext-extern-extractor-tex.sh | 10 + plugins/astext/html/Makefile.am | 19 + plugins/astext/html/Makefile.in | 1000 + plugins/astext/html/libastexthtml.cpp | 118 + plugins/astext/man/Makefile.am | 16 + plugins/astext/man/Makefile.in | 998 + plugins/astext/man/libastextman.cpp | 80 + plugins/astext/msdoc/Makefile.am | 17 + plugins/astext/msdoc/Makefile.in | 998 + plugins/astext/msdoc/libastextwv.cpp | 88 + plugins/astext/pdf/Makefile.am | 19 + plugins/astext/pdf/Makefile.in | 1000 + plugins/astext/pdf/libastextpdf.cpp | 81 + plugins/context/FerrisContextPlugin.hh | 64 + plugins/context/Makefile.am | 125 + plugins/context/Makefile.in | 1071 + plugins/context/amarok/Makefile.am | 48 + plugins/context/amarok/Makefile.in | 1062 + plugins/context/amarok/dbus-extra-types.hh | 15 + plugins/context/amarok/libferrisamarok.cpp | 886 + .../amarok/libferrisamarok_factory.cpp | 59 + plugins/context/amarok/player_interface.cpp | 28 + plugins/context/amarok/player_interface.xml | 52 + .../context/amarok/tracklist_interface.cpp | 28 + .../context/amarok/tracklist_interface.xml | 34 + plugins/context/annodex/Makefile.am | 25 + plugins/context/annodex/Makefile.in | 1025 + plugins/context/annodex/libferrisannodex.cpp | 657 + .../annodex/libferrisannodex_factory.cpp | 51 + plugins/context/bibtex/Makefile.am | 24 + plugins/context/bibtex/Makefile.in | 1023 + plugins/context/bibtex/libferrisbibtex.cpp | 354 + .../bibtex/libferrisbibtex_factory.cpp | 50 + plugins/context/commondbapi/Makefile.am | 12 + plugins/context/commondbapi/Makefile.in | 952 + plugins/context/commondbapi/gdbm.h | 140 + .../context/commondbapi/libcommondbapi.cpp | 68 + plugins/context/commondbapi/libcommondbapi.hh | 843 + plugins/context/commonsqldbapi/Makefile.am | 14 + plugins/context/commonsqldbapi/Makefile.in | 953 + .../commonsqldbapi/libcommonsqldbapi.cpp | 48 + .../commonsqldbapi/libcommonsqldbapi.hh | 928 + plugins/context/db4/Makefile.am | 27 + plugins/context/db4/Makefile.in | 1021 + plugins/context/db4/libferrisdb4.cpp | 543 + plugins/context/db4/libferrisdb4_factory.cpp | 60 + plugins/context/dbus/Makefile.am | 28 + plugins/context/dbus/Makefile.in | 1024 + plugins/context/dbus/libferrisdbus.cpp | 1098 + .../context/dbus/libferrisdbus_factory.cpp | 59 + plugins/context/dbxml/Makefile.am | 19 + plugins/context/dbxml/Makefile.in | 1020 + plugins/context/dbxml/dbxmlwrappers.hh | 174 + plugins/context/dbxml/libferrisdbxml.cpp | 616 + .../context/dbxml/libferrisdbxml_factory.cpp | 56 + plugins/context/dtl/Makefile.am | 27 + plugins/context/dtl/Makefile.in | 1047 + plugins/context/dtl/libferrisdtl.cpp | 1049 + plugins/context/dtl/libferrisdtl_factory.cpp | 56 + plugins/context/dtl/libferrisdtlshared.cpp | 73 + plugins/context/dtl/libferrisdtlshared.hh | 42 + plugins/context/dvdread/Makefile.am | 20 + plugins/context/dvdread/Makefile.in | 1013 + plugins/context/dvdread/libferrisdvdread.cpp | 1489 + .../dvdread/libferrisdvdread_factory.cpp | 59 + plugins/context/edb/Makefile.am | 21 + plugins/context/edb/Makefile.in | 1011 + plugins/context/edb/libedb.cpp | 843 + plugins/context/edb/libedb_factory.cpp | 62 + plugins/context/eet/Makefile.am | 24 + plugins/context/eet/Makefile.in | 1018 + plugins/context/eet/libferriseet.cpp | 523 + plugins/context/eet/libferriseet_factory.cpp | 51 + plugins/context/emacs/Makefile.am | 23 + plugins/context/emacs/Makefile.in | 1025 + plugins/context/emacs/libferrisemacs.cpp | 679 + plugins/context/emacs/libferrisemacs.hh.in | 30 + .../context/emacs/libferrisemacs_factory.cpp | 57 + plugins/context/evolution/Makefile.am | 26 + plugins/context/evolution/Makefile.in | 1025 + .../context/evolution/libferrisevolution.cpp | 1302 + .../evolution/libferrisevolution_factory.cpp | 55 + plugins/context/external/Makefile.am | 31 + plugins/context/external/Makefile.in | 1196 + .../external/extfs_modules/FerrisExtMod.pm | 72 + .../external/extfs_modules/Makefile.am | 5 + .../external/extfs_modules/Makefile.in | 886 + .../context/external/extfs_modules/rpmfile | 200 + plugins/context/external/extfs_modules/ssh | 160 + plugins/context/external/extfs_modules/ssh.in | 160 + plugins/context/external/extfs_modules/tar | 115 + plugins/context/external/extfs_modules/zip | 97 + plugins/context/external/libexternal.cpp | 1074 + .../context/external/libexternal_factory.cpp | 68 + plugins/context/external/libssh_factory.cpp | 48 + plugins/context/external/mapping.cpp | 127 + plugins/context/external/mapping.cpp.in | 127 + plugins/context/external/mapping.hh | 47 + plugins/context/facebook/Makefile.am | 41 + plugins/context/facebook/Makefile.in | 1090 + plugins/context/facebook/facebooktest.cpp | 69 + .../context/facebook/libferrisfacebook.cpp | 845 + .../facebook/libferrisfacebook_factory.cpp | 56 + .../facebook/libferrisfacebook_shared.cpp | 1124 + .../facebook/libferrisfacebook_shared.hh | 380 + plugins/context/firefox/Makefile.am | 25 + plugins/context/firefox/Makefile.in | 1176 + .../firefox/firefox-extension/Makefile.am | 31 + .../firefox/firefox-extension/Makefile.in | 845 + .../firefox/firefox-extension/chrome.manifest | 4 + .../chrome/libferrismount/content/about.xul | 34 + .../libferrismount/content/contents.rdf | 32 + .../content/libferrismountOverlay.js | 587 + .../content/libferrismountOverlay.xul | 39 + .../firefox/firefox-extension/install.rdf | 34 + .../skin/classic/libferrismount/contents.rdf | 17 + .../skin/classic/libferrismount/libferris.png | Bin 0 -> 3323 bytes plugins/context/firefox/libferrisfirefox.cpp | 840 + .../firefox/libferrisfirefox_factory.cpp | 57 + plugins/context/gdbm/Makefile.am | 30 + plugins/context/gdbm/Makefile.in | 1044 + plugins/context/gdbm/gdbmaker.cpp | 101 + plugins/context/gdbm/libferrisgdbm.cpp | 450 + .../context/gdbm/libferrisgdbm_factory.cpp | 53 + plugins/context/google/Makefile.am | 42 + plugins/context/google/Makefile.in | 1093 + plugins/context/google/googletest.cpp | 322 + plugins/context/google/libferrisgoogle.cpp | 1133 + .../google/libferrisgoogle_factory.cpp | 56 + .../context/google/libferrisgoogle_shared.cpp | 1862 + .../context/google/libferrisgoogle_shared.hh | 377 + plugins/context/gphoto2/Makefile.am | 24 + plugins/context/gphoto2/Makefile.in | 1018 + plugins/context/gphoto2/libferrisgphoto2.cpp | 978 + .../gphoto2/libferrisgphoto2_factory.cpp | 55 + plugins/context/gstreamer/Makefile.am | 29 + plugins/context/gstreamer/Makefile.in | 1073 + plugins/context/gstreamer/gstreamertest.cpp | 46 + .../context/gstreamer/libferrisgstreamer.cpp | 367 + .../gstreamer/libferrisgstreamer_factory.cpp | 56 + .../gstreamer/libferrisgstreamer_shared.cpp | 99 + .../gstreamer/libferrisgstreamer_shared.hh | 496 + plugins/context/hal/Makefile.am | 24 + plugins/context/hal/Makefile.in | 1025 + plugins/context/hal/libferrishal.cpp | 574 + plugins/context/hal/libferrishal_factory.cpp | 59 + plugins/context/hal/libferrishal_private.hh | 39 + plugins/context/identica/Makefile.am | 42 + plugins/context/identica/Makefile.in | 1070 + .../context/identica/libferrisidentica.cpp | 1109 + .../identica/libferrisidentica_factory.cpp | 56 + .../identica/libferrisidentica_shared.cpp | 413 + .../identica/libferrisidentica_shared.hh | 155 + plugins/context/ipc/Makefile.am | 21 + plugins/context/ipc/Makefile.in | 1011 + plugins/context/ipc/libipc.cpp | 1553 + plugins/context/ipc/libipc_factory.cpp | 58 + plugins/context/ldap/Makefile.am | 26 + plugins/context/ldap/Makefile.in | 1046 + plugins/context/ldap/libferrisldap.cpp | 1168 + .../context/ldap/libferrisldap_factory.cpp | 56 + plugins/context/ldap/libferrisldapshared.cpp | 114 + plugins/context/ldap/libferrisldapshared.hh | 55 + plugins/context/libmpeg3/Makefile.am | 19 + plugins/context/libmpeg3/Makefile.in | 1009 + plugins/context/libmpeg3/libmpeg3.cpp | 341 + plugins/context/libmpeg3/libmpeg3_factory.cpp | 53 + plugins/context/nativembox/Makefile.am | 22 + plugins/context/nativembox/Makefile.in | 1033 + plugins/context/nativembox/libnativembox.cpp | 807 + .../nativembox/libnativembox_factory.cpp | 50 + plugins/context/nativembox/mbox.cpp | 99 + plugins/context/obby/Makefile.am | 27 + plugins/context/obby/Makefile.in | 1056 + plugins/context/obby/gselectorglib.hh | 201 + plugins/context/obby/libferrisobby.cpp | 554 + .../context/obby/libferrisobby_factory.cpp | 59 + plugins/context/obby/libferrisobbyshared.cpp | 75 + plugins/context/obby/libferrisobbyshared.hh | 42 + plugins/context/pastebin/Makefile.am | 31 + plugins/context/pastebin/Makefile.in | 1062 + .../context/pastebin/libferrispastebin.cpp | 1388 + .../pastebin/libferrispastebin_factory.cpp | 56 + .../pastebin/libferrispastebinshared.cpp | 80 + .../pastebin/libferrispastebinshared.hh | 97 + plugins/context/plasma/Makefile.am | 29 + plugins/context/plasma/Makefile.in | 1020 + plugins/context/plasma/libferrisplasma.cpp | 375 + .../plasma/libferrisplasma_factory.cpp | 56 + plugins/context/plasma/mocimpls.cpp | 0 plugins/context/postgresql/Makefile.am | 29 + plugins/context/postgresql/Makefile.in | 1060 + .../postgresql/libferrispostgresql.cpp | 1585 + .../libferrispostgresql_factory.cpp | 56 + .../postgresql/libferrispostgresqlshared.cpp | 80 + .../postgresql/libferrispostgresqlshared.hh | 43 + plugins/context/printer/Makefile.am | 29 + plugins/context/printer/Makefile.in | 1020 + plugins/context/printer/libferrisprinter.cpp | 520 + .../printer/libferrisprinter_factory.cpp | 56 + plugins/context/printer/mocimpls.cpp | 0 plugins/context/pulseaudio/Makefile.am | 21 + plugins/context/pulseaudio/Makefile.in | 1013 + .../pulseaudio/libferrispulseaudio.cpp | 1366 + .../libferrispulseaudio_factory.cpp | 56 + plugins/context/qtftp/Makefile.am | 31 + plugins/context/qtftp/Makefile.in | 1027 + plugins/context/qtftp/libferrisqtftp.cpp | 574 + .../context/qtftp/libferrisqtftp_factory.cpp | 59 + plugins/context/qtftp/mocimpls.cpp | 0 plugins/context/qthttp/Makefile.am | 31 + plugins/context/qthttp/Makefile.in | 1027 + plugins/context/qthttp/libferrisqthttp.cpp | 445 + .../qthttp/libferrisqthttp_factory.cpp | 59 + plugins/context/qthttp/mocimpls.cpp | 0 plugins/context/qtsql/Makefile.am | 29 + plugins/context/qtsql/Makefile.in | 1058 + plugins/context/qtsql/libferrisqtsql.cpp | 1347 + .../context/qtsql/libferrisqtsql_factory.cpp | 75 + .../context/qtsql/libferrisqtsqlshared.cpp | 80 + plugins/context/qtsql/libferrisqtsqlshared.hh | 43 + plugins/context/recordfile/Makefile.am | 19 + plugins/context/recordfile/Makefile.in | 1013 + .../recordfile/libferrisrecordfile.cpp | 527 + .../libferrisrecordfile_factory.cpp | 56 + plugins/context/sane/Makefile.am | 29 + plugins/context/sane/Makefile.in | 1020 + plugins/context/sane/libferrissane.cpp | 688 + .../context/sane/libferrissane_factory.cpp | 56 + plugins/context/sane/mocimpls.cpp | 0 plugins/context/sockets/Makefile.am | 22 + plugins/context/sockets/Makefile.in | 1010 + plugins/context/sockets/libsocket.cpp | 2325 + plugins/context/sockets/libsocket_factory.cpp | 53 + plugins/context/soprano/Makefile.am | 19 + plugins/context/soprano/Makefile.in | 1011 + plugins/context/soprano/libferrissoprano.cpp | 1757 + .../soprano/libferrissoprano_factory.cpp | 62 + plugins/context/spirit/Makefile.am | 3 + plugins/context/spirit/Makefile.in | 1022 + plugins/context/spirit/SpiritContext.hh | 282 + plugins/context/spirit/ffilter/Makefile.am | 24 + plugins/context/spirit/ffilter/Makefile.in | 1034 + .../context/spirit/ffilter/ffiltertest.cpp | 49 + .../spirit/ffilter/libffilterspirit.cpp | 140 + .../ffilter/libffilterspirit_factory.cpp | 55 + .../spirit/fulltextboolean/Makefile.am | 24 + .../spirit/fulltextboolean/Makefile.in | 1040 + .../libfulltextbooleanspirit.cpp | 111 + .../libfulltextbooleanspirit_factory.cpp | 55 + .../spirit/fulltextboolean/testapp.cpp | 43 + plugins/context/sqlplus/Makefile.am | 29 + plugins/context/sqlplus/Makefile.in | 1049 + plugins/context/sqlplus/libferrissqlplus.cpp | 1087 + .../sqlplus/libferrissqlplus_factory.cpp | 56 + .../sqlplus/libferrissqlplusshared.cpp | 81 + .../context/sqlplus/libferrissqlplusshared.hh | 40 + plugins/context/tdb/Makefile.am | 30 + plugins/context/tdb/Makefile.in | 1044 + plugins/context/tdb/libferristdb.cpp | 449 + plugins/context/tdb/libferristdb_factory.cpp | 53 + plugins/context/tdb/tdbmaker.cpp | 104 + plugins/context/upnp/Makefile.am | 20 + plugins/context/upnp/Makefile.in | 1013 + plugins/context/upnp/libferrisplatinum.cpp | 612 + .../upnp/libferrisplatinum_factory.cpp | 56 + plugins/context/vimeo/Makefile.am | 41 + plugins/context/vimeo/Makefile.in | 1089 + plugins/context/vimeo/libferrisvimeo.cpp | 232 + .../context/vimeo/libferrisvimeo_factory.cpp | 56 + .../context/vimeo/libferrisvimeo_shared.cpp | 585 + .../context/vimeo/libferrisvimeo_shared.hh | 162 + plugins/context/vimeo/vimeotest.cpp | 73 + plugins/context/webphotos/Makefile.am | 60 + plugins/context/webphotos/Makefile.in | 1181 + ...bphoto-remote-url-to-eaindex-predicate.cpp | 285 + .../webphotos/ferris-webphoto-upload.cpp | 216 + .../context/webphotos/libferriswebphotos.cpp | 1980 + .../webphotos/libferriswebphotos_factory.cpp | 56 + .../webphotos/libferriswebphotos_shared.cpp | 2558 + .../webphotos/libferriswebphotos_shared.hh | 474 + plugins/context/webphotos/webphotostest.cpp | 28 + plugins/context/wiki/Makefile.am | 31 + plugins/context/wiki/Makefile.in | 1060 + plugins/context/wiki/libferriswiki.cpp | 1296 + .../context/wiki/libferriswiki_factory.cpp | 56 + plugins/context/wiki/libferriswikishared.cpp | 80 + plugins/context/wiki/libferriswikishared.hh | 108 + plugins/context/xml/Makefile.am | 22 + plugins/context/xml/Makefile.in | 1010 + plugins/context/xml/libxml.cpp | 866 + plugins/context/xml/libxml_factory.cpp | 58 + plugins/context/xmms/Makefile.am | 26 + plugins/context/xmms/Makefile.in | 1022 + plugins/context/xmms/libferrisxmms.cpp | 791 + .../context/xmms/libferrisxmms_factory.cpp | 59 + plugins/context/xsltfs/Makefile.am | 23 + plugins/context/xsltfs/Makefile.in | 1022 + plugins/context/xsltfs/libferrisxsltfs.cpp | 1846 + .../xsltfs/libferrisxsltfs_factory.cpp | 59 + plugins/context/xwin/Makefile.am | 43 + plugins/context/xwin/Makefile.in | 1060 + plugins/context/xwin/klipper_interface.cpp | 26 + plugins/context/xwin/klipper_interface.xml | 27 + .../context/xwin/klipper_interface_public.hh | 125 + plugins/context/xwin/libferrisxwin.cpp | 163 + plugins/context/xwin/libferrisxwin_ecore.cpp | 451 + plugins/context/xwin/libferrisxwin_ecore.hh | 88 + .../context/xwin/libferrisxwin_factory.cpp | 56 + .../context/xwin/libferrisxwin_klipper.cpp | 226 + plugins/context/xwin/libferrisxwin_klipper.hh | 78 + plugins/creation/Makefile.am | 42 + plugins/creation/Makefile.in | 1048 + plugins/creation/db4/Makefile.am | 15 + plugins/creation/db4/Makefile.in | 997 + plugins/creation/db4/libcreationdb4.cpp | 165 + plugins/creation/dbxml/Makefile.am | 14 + plugins/creation/dbxml/Makefile.in | 995 + plugins/creation/dbxml/libcreationdbxml.cpp | 138 + plugins/creation/devsource/Makefile.am | 13 + plugins/creation/devsource/Makefile.in | 996 + .../devsource/libcreationdevsource.cpp | 107 + plugins/creation/eaindex/Makefile.am | 23 + plugins/creation/eaindex/Makefile.in | 1029 + .../creation/eaindex/libcreationeaindex.cpp | 79 + .../eaindex/libcreationeaindexdb4tree.cpp | 79 + .../eaindex/libcreationeaindexnull.cpp | 79 + plugins/creation/eaindexgeneric/Makefile.am | 13 + plugins/creation/eaindexgeneric/Makefile.in | 997 + .../libcreationeaindexgeneric.cpp | 81 + plugins/creation/fulltextindex/Makefile.am | 14 + plugins/creation/fulltextindex/Makefile.in | 996 + .../libcreationfulltextindex.cpp | 116 + .../creation/fulltextindexgeneric/Makefile.am | 14 + .../creation/fulltextindexgeneric/Makefile.in | 997 + .../libcreationfulltextindexgeneric.cpp | 106 + plugins/creation/gdbm/Makefile.am | 15 + plugins/creation/gdbm/Makefile.in | 997 + plugins/creation/gdbm/libcreationgdbm.cpp | 100 + plugins/creation/magickimage/Makefile.am | 15 + plugins/creation/magickimage/Makefile.in | 997 + .../magickimage/libcreationmagick.cpp | 129 + plugins/creation/markup/Makefile.am | 13 + plugins/creation/markup/Makefile.in | 994 + plugins/creation/markup/libcreationmarkup.cpp | 80 + plugins/creation/mng/Makefile.am | 13 + plugins/creation/mng/Makefile.in | 994 + plugins/creation/mng/libcreationmng.cpp | 65 + plugins/creation/mp3/Makefile.am | 15 + plugins/creation/mp3/Makefile.in | 997 + plugins/creation/mp3/libcreationmp3.cpp | 65 + plugins/creation/mpeg2/Makefile.am | 13 + plugins/creation/mpeg2/Makefile.in | 994 + plugins/creation/mpeg2/libcreationmpeg2.cpp | 64 + plugins/creation/ogg/Makefile.am | 15 + plugins/creation/ogg/Makefile.in | 997 + plugins/creation/ogg/libcreationogg.cpp | 65 + plugins/creation/shellscript/Makefile.am | 13 + plugins/creation/shellscript/Makefile.in | 996 + .../shellscript/libcreationshellscript.cpp | 68 + plugins/creation/soprano/Makefile.am | 14 + plugins/creation/soprano/Makefile.in | 998 + .../soprano/libcreationsopranoredland.cpp | 159 + plugins/creation/tdb/Makefile.am | 15 + plugins/creation/tdb/Makefile.in | 997 + plugins/creation/tdb/libcreationtdb.cpp | 105 + plugins/creation/wav/Makefile.am | 15 + plugins/creation/wav/Makefile.in | 997 + plugins/creation/wav/libcreationwav.cpp | 65 + plugins/eagenerators/FerrisEAPlugin.hh | 48 + plugins/eagenerators/Makefile.am | 11 + plugins/eagenerators/Makefile.in | 1027 + plugins/eagenerators/a52/Makefile.am | 19 + plugins/eagenerators/a52/Makefile.in | 1000 + plugins/eagenerators/a52/libferrisa52.cpp | 172 + plugins/eagenerators/djvu/Makefile.am | 21 + plugins/eagenerators/djvu/Makefile.in | 1004 + .../eagenerators/djvu/libferrisdjvulibre.cpp | 295 + plugins/eagenerators/exif/Makefile.am | 23 + plugins/eagenerators/exif/Makefile.in | 1039 + plugins/eagenerators/exif/jpeg-data.c | 497 + plugins/eagenerators/exif/jpeg-data.h | 94 + plugins/eagenerators/exif/jpeg-marker.c | 122 + plugins/eagenerators/exif/jpeg-marker.h | 105 + plugins/eagenerators/exif/libferrisexifea.cpp | 1762 + plugins/eagenerators/flac/Makefile.am | 19 + plugins/eagenerators/flac/Makefile.in | 1000 + plugins/eagenerators/flac/libferrisflac.cpp | 318 + plugins/eagenerators/fspot/Makefile.am | 18 + plugins/eagenerators/fspot/Makefile.in | 999 + plugins/eagenerators/fspot/libferrisfspot.cpp | 411 + plugins/eagenerators/gimp/Makefile.am | 28 + plugins/eagenerators/gimp/Makefile.in | 1007 + plugins/eagenerators/gimp/libgimp.cpp | 168 + plugins/eagenerators/id3/Makefile.am | 20 + plugins/eagenerators/id3/Makefile.in | 1000 + plugins/eagenerators/id3/libferrisid3.cpp | 408 + plugins/eagenerators/imlib2/Makefile.am | 19 + plugins/eagenerators/imlib2/Makefile.in | 1000 + plugins/eagenerators/imlib2/libimlib2.cpp | 204 + plugins/eagenerators/jasper/Makefile.am | 20 + plugins/eagenerators/jasper/Makefile.in | 1002 + .../eagenerators/jasper/libferrisjasper.cpp | 211 + plugins/eagenerators/jpeg/Makefile.am | 19 + plugins/eagenerators/jpeg/Makefile.in | 1000 + plugins/eagenerators/jpeg/libferrisjpeg.cpp | 481 + plugins/eagenerators/kde3metadata/Makefile.am | 17 + plugins/eagenerators/kde3metadata/Makefile.in | 1001 + .../kde3metadata/libferriskde3metadata.cpp | 351 + plugins/eagenerators/libextractor/Makefile.am | 18 + plugins/eagenerators/libextractor/Makefile.in | 1001 + .../libextractor/libferrisextractor.cpp | 217 + plugins/eagenerators/libmpeg3/Makefile.am | 20 + plugins/eagenerators/libmpeg3/Makefile.in | 1001 + .../eagenerators/libmpeg3/libferrismpeg3.cpp | 630 + plugins/eagenerators/magick/Makefile.am | 19 + plugins/eagenerators/magick/Makefile.in | 1000 + plugins/eagenerators/magick/libmagick.cpp | 309 + plugins/eagenerators/mediainfo/Makefile.am | 18 + plugins/eagenerators/mediainfo/Makefile.in | 1001 + .../mediainfo/libferrismediainfo.cpp | 233 + plugins/eagenerators/mpeg2/Makefile.am | 19 + plugins/eagenerators/mpeg2/Makefile.in | 999 + plugins/eagenerators/mpeg2/libferrismpeg2.cpp | 739 + plugins/eagenerators/oggz/Makefile.am | 18 + plugins/eagenerators/oggz/Makefile.in | 999 + plugins/eagenerators/oggz/libferrisoggz.cpp | 177 + plugins/eagenerators/png/Makefile.am | 20 + plugins/eagenerators/png/Makefile.in | 1000 + plugins/eagenerators/png/libferrispng.cpp | 533 + plugins/eagenerators/soprano/Makefile.am | 22 + plugins/eagenerators/soprano/Makefile.in | 1035 + .../eagenerators/soprano/libferrissoprano.cpp | 462 + .../soprano/libferrissopranoeashared.cpp | 221 + .../soprano/libferrissopranoeashared.hh | 100 + plugins/eagenerators/strigi/Makefile.am | 18 + plugins/eagenerators/strigi/Makefile.in | 999 + .../eagenerators/strigi/libferrisstrigi.cpp | 406 + plugins/eagenerators/subtitles/Makefile.am | 16 + plugins/eagenerators/subtitles/Makefile.in | 996 + .../subtitles/libferrissubtitles.cpp | 156 + plugins/eagenerators/taglib/Makefile.am | 18 + plugins/eagenerators/taglib/Makefile.in | 999 + .../eagenerators/taglib/libferristaglib.cpp | 434 + plugins/eagenerators/xfsnative/Makefile.am | 19 + plugins/eagenerators/xfsnative/Makefile.in | 1000 + .../eagenerators/xfsnative/libxfsnative.cpp | 873 + plugins/eagenerators/xine/Makefile.am | 17 + plugins/eagenerators/xine/Makefile.in | 999 + plugins/eagenerators/xine/libferrisxineea.cpp | 395 + plugins/eagenerators/xmp/Makefile.am | 22 + plugins/eagenerators/xmp/Makefile.in | 1003 + plugins/eagenerators/xmp/libferrisxmp.cpp | 1326 + plugins/eaindexers/Makefile.am | 39 + plugins/eaindexers/Makefile.in | 1033 + plugins/eaindexers/boost/Makefile.am | 22 + plugins/eaindexers/boost/Makefile.in | 1030 + .../eaindexers/boost/libeaindexboostmmap.cpp | 1493 + .../boost/libeaindexboostmmap_factory.cpp | 74 + .../eaindexers/boost/mmap_dynamic_bitset.hpp | 1732 + plugins/eaindexers/clucene/Makefile.am | 21 + plugins/eaindexers/clucene/Makefile.in | 1015 + .../eaindexers/clucene/libeaindexclucene.cpp | 986 + .../clucene/libeaindexclucene_factory.cpp | 70 + plugins/eaindexers/federation/Makefile.am | 18 + plugins/eaindexers/federation/Makefile.in | 1013 + .../federation/libeaindexfederation.cpp | 381 + .../libeaindexfederation_factory.cpp | 64 + plugins/eaindexers/ldap/Makefile.am | 21 + plugins/eaindexers/ldap/Makefile.in | 1023 + plugins/eaindexers/ldap/libeaindexldap.cpp | 1544 + plugins/eaindexers/ldap/libeaindexldap.hh | 50 + .../ldap/libeaindexldap_factory.cpp | 92 + plugins/eaindexers/lucene/Makefile.am | 28 + plugins/eaindexers/lucene/Makefile.in | 1019 + .../eaindexers/lucene/libeaindexlucene.cpp | 741 + .../lucene/libeaindexlucene_factory.cpp | 67 + plugins/eaindexers/null/Makefile.am | 18 + plugins/eaindexers/null/Makefile.in | 1010 + plugins/eaindexers/null/libeaindexnull.cpp | 220 + .../null/libeaindexnull_factory.cpp | 68 + plugins/eaindexers/odbc/Makefile.am | 21 + plugins/eaindexers/odbc/Makefile.in | 1014 + plugins/eaindexers/odbc/libeaindexodbc.cpp | 2435 + .../odbc/libeaindexodbc_factory.cpp | 97 + plugins/eaindexers/postgresql/Makefile.am | 22 + plugins/eaindexers/postgresql/Makefile.in | 1017 + .../postgresql/libeaindexpostgresql.cpp | 4292 + .../libeaindexpostgresql_factory.cpp | 129 + plugins/eaindexers/qtsql/Makefile.am | 21 + plugins/eaindexers/qtsql/Makefile.in | 1010 + plugins/eaindexers/qtsql/libeaindexqtsql.cpp | 1467 + .../qtsql/libeaindexqtsql_factory.cpp | 99 + plugins/eaindexers/soprano/Makefile.am | 22 + plugins/eaindexers/soprano/Makefile.in | 1015 + .../eaindexers/soprano/libeaindexsoprano.cpp | 1252 + .../soprano/libeaindexsoprano_factory.cpp | 99 + plugins/eaindexers/xapian/Makefile.am | 23 + plugins/eaindexers/xapian/Makefile.in | 1015 + .../eaindexers/xapian/libeaindexxapian.cpp | 1022 + .../xapian/libeaindexxapian_factory.cpp | 70 + plugins/fulltextindexers/Makefile.am | 38 + plugins/fulltextindexers/Makefile.in | 1033 + plugins/fulltextindexers/beagle/Makefile.am | 22 + plugins/fulltextindexers/beagle/Makefile.in | 1020 + .../beagle/libftxidxbeagle.cpp | 366 + .../beagle/libftxidxbeagle_factory.cpp | 51 + plugins/fulltextindexers/clucene/Makefile.am | 21 + plugins/fulltextindexers/clucene/Makefile.in | 1014 + .../clucene/libftxidxclucene.cpp | 543 + .../clucene/libftxidxclucene_factory.cpp | 75 + .../external/FerrisFulltextExternalIndex.pm | 53 + .../FerrisFulltextExternalIndexExample.pl | 75 + plugins/fulltextindexers/external/Makefile.am | 22 + plugins/fulltextindexers/external/Makefile.in | 1052 + .../external/libftxidxexternal.cpp | 354 + .../external/libftxidxexternal_factory.cpp | 54 + plugins/fulltextindexers/lucene/Makefile.am | 32 + plugins/fulltextindexers/lucene/Makefile.in | 1068 + .../fulltextindexers/lucene/MyAnalyzer.java | 53 + .../lucene/libftxidxlucene.cpp | 438 + .../lucene/libftxidxlucene_factory.cpp | 75 + plugins/fulltextindexers/null/Makefile.am | 18 + plugins/fulltextindexers/null/Makefile.in | 1010 + .../fulltextindexers/null/libftxidxnull.cpp | 202 + .../null/libftxidxnull_factory.cpp | 60 + plugins/fulltextindexers/odbc/Makefile.am | 21 + plugins/fulltextindexers/odbc/Makefile.in | 1023 + .../odbc/ODBCIndexHelper_private.hh | 563 + .../fulltextindexers/odbc/libftxidxodbc.cpp | 900 + .../odbc/libftxidxodbc_factory.cpp | 92 + plugins/fulltextindexers/qtsql/Makefile.am | 22 + plugins/fulltextindexers/qtsql/Makefile.in | 1024 + .../qtsql/QtSQLIndexHelper_private.hh | 413 + .../fulltextindexers/qtsql/libftxidxqtsql.cpp | 492 + .../qtsql/libftxidxqtsql_factory.cpp | 86 + plugins/fulltextindexers/strigi/Makefile.am | 22 + plugins/fulltextindexers/strigi/Makefile.in | 1015 + .../strigi/libftxidxstrigi.cpp | 363 + .../strigi/libftxidxstrigi_factory.cpp | 51 + plugins/fulltextindexers/tsearch2/Makefile.am | 20 + plugins/fulltextindexers/tsearch2/Makefile.in | 1014 + .../tsearch2/libftxidxtsearch2.cpp | 825 + .../tsearch2/libftxidxtsearch2_factory.cpp | 81 + .../fulltextindexers/uniqsorted/Makefile.am | 18 + .../fulltextindexers/uniqsorted/Makefile.in | 1011 + .../uniqsorted/libftxidxuniqsorted.cpp | 193 + .../libftxidxuniqsorted_factory.cpp | 60 + plugins/fulltextindexers/xapian/Makefile.am | 24 + plugins/fulltextindexers/xapian/Makefile.in | 1044 + .../xapian/libferrisxapianeashared.cpp | 176 + .../xapian/libferrisxapianeashared.hh | 75 + .../xapian/libftxidxxapian.cpp | 434 + .../xapian/libftxidxxapian_factory.cpp | 70 + plugins/fulltextindexers/yahoo/Makefile.am | 18 + plugins/fulltextindexers/yahoo/Makefile.in | 1010 + .../fulltextindexers/yahoo/libftxidxyahoo.cpp | 287 + .../yahoo/libftxidxyahoo_factory.cpp | 57 + tests/Makefile.am | 12 + tests/Makefile.in | 1029 + tests/comparetoy/Makefile.am | 18 + tests/comparetoy/Makefile.in | 951 + tests/comparetoy/comparetoy.cpp | 167 + tests/contextiostream/Makefile.am | 22 + tests/contextiostream/Makefile.in | 955 + tests/contextiostream/contextsweep.cpp | 209 + tests/contextiterator/Makefile.am | 48 + tests/contextiterator/Makefile.in | 1080 + tests/contextiterator/backwardsweep.cpp | 81 + tests/contextiterator/backwardsweepcre.cpp | 88 + tests/contextiterator/forwardsweep.cpp | 58 + tests/contextiterator/forwardsweepcre.cpp | 84 + .../contextiterator/itemremovedfromunder.cpp | 105 + tests/contextiterator/knightrider.cpp | 88 + tests/contextiterator/randomover.cpp | 71 + tests/extoy/Makefile.am | 19 + tests/extoy/Makefile.in | 953 + tests/extoy/extoy.cpp | 206 + tests/hiddensymbols/Makefile.am | 81 + tests/hiddensymbols/Makefile.in | 1141 + tests/hiddensymbols/hsrtest.cpp | 7 + tests/hiddensymbols/libferrishsrtest.cpp | 22 + tests/hiddensymbols/libferrishsrtest.hh | 9 + tests/hiddensymbols/libhsrmodule.cpp | 29 + tests/hiddensymbols/libhsrmodule.hh | 6 + tests/ipc/Makefile.am | 3 + tests/ipc/Makefile.in | 1022 + tests/ipc/semaphores/Makefile.am | 28 + tests/ipc/semaphores/Makefile.in | 1020 + tests/ipc/semaphores/fgetsem.cpp | 63 + tests/ipc/semaphores/fmodifysem.cpp | 64 + tests/ipc/semaphores/semrawcreate.cpp | 67 + tests/ipc/shm/Makefile.am | 37 + tests/ipc/shm/Makefile.in | 1080 + tests/ipc/shm/fshmget.cpp | 71 + tests/ipc/shm/fshmput.cpp | 115 + tests/ipc/shm/shmrawget.cpp | 77 + tests/ipc/shm/shmrawput.cpp | 64 + tests/links/Makefile.am | 23 + tests/links/Makefile.in | 954 + tests/links/linkplay.cpp | 128 + tests/logging/Makefile.am | 23 + tests/logging/Makefile.in | 965 + tests/logging/interlace.cpp | 41 + tests/logging/logtest.cpp | 226 + tests/lucene/IndexFiles.cpp | 134 + tests/lucene/Makefile.am | 34 + tests/lucene/Makefile.in | 973 + tests/lucene/SearchFiles.cpp | 123 + tests/medallions/Makefile.am | 2 + tests/medallions/Makefile.in | 1022 + tests/medallions/simpleroot/Makefile.am | 19 + tests/medallions/simpleroot/Makefile.in | 953 + tests/medallions/simpleroot/simpleroot.cpp | 143 + tests/memorymanage/Makefile.am | 2 + tests/memorymanage/Makefile.in | 1022 + tests/memorymanage/cleanuptest/Makefile.am | 41 + tests/memorymanage/cleanuptest/Makefile.in | 1025 + .../cleanuptest/chainedFilter.cpp | 83 + .../memorymanage/cleanuptest/cleanuptest.cpp | 126 + tests/memorymanage/cleanuptest/filters.cpp | 78 + .../memorymanage/cleanuptest/resolveagain.cpp | 90 + tests/memorymanage/cleanuptest/simpleSort.cpp | 80 + .../cleanuptest/singlecontext.cpp | 212 + tests/memorymanage/cleanuptest/vmdebug.cpp | 224 + tests/quoting/Makefile.am | 23 + tests/quoting/Makefile.in | 992 + tests/quoting/ftestshellquote.cpp | 60 + tests/rdf/Makefile.am | 53 + tests/rdf/Makefile.in | 1053 + tests/rdf/makeCyclicRDF.cpp | 155 + tests/rdf/rdfassert.cpp | 116 + tests/rdf/rdfexample1.cpp | 145 + tests/rdf/rdfexample2.cpp | 132 + tests/rdf/rdfexample3.cpp | 104 + tests/rdf/rdfexample4.cpp | 216 + tests/rdf/rdfsimplequery.cpp | 108 + tests/regression/Makefile.am | 63 + tests/regression/Makefile.in | 1285 + tests/regression/createdir.cpp | 62 + tests/regression/createea.cpp | 72 + tests/regression/createfile.cpp | 78 + tests/regression/plaything.cpp | 81 + tests/regression/readcontext.cpp | 62 + tests/regression/readea.cpp | 69 + tests/regression/relativePaths/Makefile.am | 20 + tests/regression/relativePaths/Makefile.in | 991 + .../relativePaths/relativePaths.cpp | 159 + tests/regression/removecontext.cpp | 73 + tests/regression/renamecontext.cpp | 60 + tests/regression/timber/Makefile.am | 21 + tests/regression/timber/Makefile.in | 954 + tests/regression/timber/timbertest.cpp | 96 + tests/regression/writecontext.cpp | 92 + tests/regression/writeea.cpp | 81 + tests/runner/Makefile.am | 21 + tests/runner/Makefile.in | 955 + tests/runner/runnertest.cpp | 80 + tests/sigtoy/Makefile.am | 22 + tests/sigtoy/Makefile.in | 954 + tests/sigtoy/sigtoy.cpp | 156 + tests/sockets/Makefile.am | 2 + tests/sockets/Makefile.in | 1022 + tests/sockets/daytime/Makefile.am | 20 + tests/sockets/daytime/Makefile.in | 991 + tests/sockets/daytime/daytimeclient.cpp | 126 + tests/sockets/echo/Makefile.am | 20 + tests/sockets/echo/Makefile.in | 991 + tests/sockets/echo/echoclient.cpp | 124 + tests/sockets/echoclienttls/Makefile.am | 20 + tests/sockets/echoclienttls/Makefile.in | 991 + tests/sockets/echoclienttls/echoclienttls.cpp | 234 + tests/sockets/echoserver/Makefile.am | 20 + tests/sockets/echoserver/Makefile.in | 991 + tests/sockets/echoserver/echoserver.cpp | 174 + tests/sockets/echoservertls/Makefile.am | 20 + tests/sockets/echoservertls/Makefile.in | 991 + tests/sockets/echoservertls/echoservertls.cpp | 195 + tests/sockets/socketops/Makefile.am | 20 + tests/sockets/socketops/Makefile.in | 991 + tests/sockets/socketops/socketopsclient.cpp | 190 + tests/sqlplus/Makefile.am | 2 + tests/sqlplus/Makefile.in | 1022 + tests/sqlplus/simplequery/Makefile.am | 21 + tests/sqlplus/simplequery/Makefile.in | 955 + tests/sqlplus/simplequery/sqlsimplequery.cpp | 125 + tests/sqlplus/simplequery/sqlsimplequery.xml | 6 + tests/streams/Makefile.am | 3 + tests/streams/Makefile.in | 1022 + tests/streams/ostream_modifiers/Makefile.am | 19 + tests/streams/ostream_modifiers/Makefile.in | 953 + .../ostream_modifiers/ostream_modifiers.cpp | 507 + tests/streams/performance/Makefile.am | 19 + tests/streams/performance/Makefile.in | 953 + tests/streams/performance/streamtimes.cpp | 92 + tests/stringtrimming/Makefile.am | 19 + tests/stringtrimming/Makefile.in | 953 + tests/stringtrimming/stringtrimming.cpp | 60 + tests/timeparsing/Makefile.am | 23 + tests/timeparsing/Makefile.in | 954 + tests/timeparsing/timeparse.cpp | 139 + tests/touch/Makefile.am | 22 + tests/touch/Makefile.in | 953 + tests/touch/touchtest.cpp | 165 + tests/trivial/Makefile.am | 20 + tests/trivial/Makefile.in | 952 + tests/trivial/test_setStrAttr.cpp | 54 + tests/xml/Makefile.am | 3 + tests/xml/Makefile.in | 1022 + tests/xml/testMakeDOM/Makefile.am | 20 + tests/xml/testMakeDOM/Makefile.in | 954 + tests/xml/testMakeDOM/testMakeDOM.cpp | 93 + xsltfunctions/FerrisXalanTransform.cpp | 165 + xsltfunctions/Makefile.am | 40 + xsltfunctions/Makefile.in | 1115 + xsltfunctions/libferrisxslt.hh | 49 + xsltfunctions/xslt_base.cpp | 59 + xsltfunctions/xslt_base.hh | 106 + xsltfunctions/xslt_ferris.cpp | 751 + xsltfunctions/xslt_fs.cpp | 111 + xsltfunctions/xslt_shell.cpp | 972 + xsltfunctions/xslt_string.cpp | 423 + 1968 files changed, 856245 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 DBusGlue/Makefile.am create mode 100644 DBusGlue/Makefile.in create mode 100644 DBusGlue/broker_adaptor.h create mode 100644 DBusGlue/broker_interface.h create mode 100644 DBusGlue/com.Libferris.Volume.Manager.service create mode 100644 DBusGlue/com.Libferris.Volume.Manager.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Broker.service create mode 100644 DBusGlue/com.libferris.Metadata.Broker.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Worker.imlib2.service create mode 100644 DBusGlue/com.libferris.Metadata.Worker.imlib2.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Worker.jpg.service create mode 100644 DBusGlue/com.libferris.Metadata.Worker.jpg.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Worker.magick.service create mode 100644 DBusGlue/com.libferris.Metadata.Worker.magick.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Worker.png.service create mode 100644 DBusGlue/com.libferris.Metadata.Worker.png.service.in create mode 100644 DBusGlue/com.libferris.Metadata.Worker.xine.service create mode 100644 DBusGlue/com.libferris.Metadata.Worker.xine.service.in create mode 100644 DBusGlue/com.libferris.Volume.Manager.xml create mode 100644 DBusGlue/ferris_internal_metadata_broker_introspect.xml create mode 100644 DBusGlue/ferris_internal_metadata_worker_introspect.xml create mode 100644 DBusGlue/force-header-generation.cpp create mode 100644 DBusGlue/org.freedesktop.DBus.Introspectable.xml create mode 100644 DBusGlue/org.freedesktop.DBus.xml create mode 100644 DBusGlue/org.freedesktop.Hal.Device.Volume.xml create mode 100644 DBusGlue/org.freedesktop.Hal.Device.xml create mode 100644 DBusGlue/org.freedesktop.Hal.Manager.xml create mode 100644 DBusGlue/org_freedesktop_DBus.h create mode 100644 DBusGlue/org_freedesktop_DBus_Introspectable.h create mode 100644 DBusGlue/org_freedesktop_Hal_Device.h create mode 100644 DBusGlue/org_freedesktop_Hal_Device_Volume.h create mode 100644 DBusGlue/org_freedesktop_Hal_Manager.h create mode 100644 DBusGlue/worker_adaptor.h create mode 100644 DBusGlue/worker_interface.h create mode 100644 Ferris/Agent.cpp create mode 100644 Ferris/Agent.hh create mode 100644 Ferris/AgentSVMLight.cpp create mode 100644 Ferris/Agent_private.hh create mode 100644 Ferris/All.hh create mode 100644 Ferris/AsyncIO.cpp create mode 100644 Ferris/AsyncIO.hh create mode 100644 Ferris/Attribute.cpp create mode 100644 Ferris/Attribute.hh create mode 100644 Ferris/Attribute_private.hh create mode 100644 Ferris/BranchContext.cpp create mode 100644 Ferris/BranchContext_Clients.cpp create mode 100644 Ferris/BranchContext_private.hh create mode 100644 Ferris/BranchRemembranceHistoryInternalContext.cpp create mode 100644 Ferris/BuildDependentMethods.hh create mode 100644 Ferris/BuildDependentMethods.hh.in create mode 100644 Ferris/Cache.cpp create mode 100644 Ferris/Cache.hh create mode 100644 Ferris/CacheManager.cpp create mode 100644 Ferris/CacheManager_private.hh create mode 100644 Ferris/ChainedViewContext.cpp create mode 100644 Ferris/ChainedViewContext.hh create mode 100644 Ferris/ChildStreamServer.cpp create mode 100644 Ferris/ChildStreamServer.hh create mode 100644 Ferris/Chmod.cpp create mode 100644 Ferris/Chmod.hh create mode 100644 Ferris/ClipAPI.cpp create mode 100644 Ferris/ClipAPI.hh create mode 100644 Ferris/Configuration.cpp create mode 100644 Ferris/Configuration.hh create mode 100644 Ferris/Configuration_private.hh create mode 100644 Ferris/Context.cpp create mode 100644 Ferris/Context.hh create mode 100644 Ferris/ContextContext.cpp create mode 100644 Ferris/ContextContext.hh create mode 100644 Ferris/ContextIterator.cpp create mode 100644 Ferris/ContextIterator.hh create mode 100644 Ferris/ContextPlugin.hh create mode 100644 Ferris/ContextPopt.cpp create mode 100644 Ferris/ContextPopt.hh create mode 100644 Ferris/ContextSetCompare.cpp create mode 100644 Ferris/ContextSetCompare.hh create mode 100644 Ferris/ContextSetCompare_private.hh create mode 100644 Ferris/Context_private.hh create mode 100644 Ferris/CursorAPI.cpp create mode 100644 Ferris/CursorAPI.hh create mode 100644 Ferris/DBus.cpp create mode 100644 Ferris/DBus_private.hh create mode 100644 Ferris/Daemon.cpp create mode 100644 Ferris/Daemon.hh create mode 100644 Ferris/Debug.cpp create mode 100644 Ferris/Debug.hh create mode 100644 Ferris/DublinCore.cpp create mode 100644 Ferris/DublinCore.hh create mode 100644 Ferris/EAGenerators.hh create mode 100644 Ferris/EAIndexer.cpp create mode 100644 Ferris/EAIndexer.hh create mode 100644 Ferris/EAIndexerCustomFerris.cpp create mode 100644 Ferris/EAIndexerMetaInterface.cpp create mode 100644 Ferris/EAIndexerMetaInterface.hh create mode 100644 Ferris/EAIndexerSQLCommon.cpp create mode 100644 Ferris/EAIndexerSQLCommon_private.hh create mode 100644 Ferris/EAIndexer_private.hh create mode 100644 Ferris/EAN.cpp create mode 100644 Ferris/EAN.hh create mode 100644 Ferris/EAQuery.cpp create mode 100644 Ferris/EAQuery.hh create mode 100644 Ferris/EAQueryContext.cpp create mode 100644 Ferris/EAQueryContext.hh create mode 100644 Ferris/Enamel.cpp create mode 100644 Ferris/Enamel.hh create mode 100644 Ferris/Enamel_priv.hh create mode 100644 Ferris/EtagereContext.cpp create mode 100644 Ferris/EtagereContext_private.hh create mode 100644 Ferris/FCA.cpp create mode 100644 Ferris/FCA.hh create mode 100644 Ferris/FSParser.cpp create mode 100644 Ferris/FSParser_private.hh create mode 100644 Ferris/FactoriesCreationCommon_private.cpp create mode 100644 Ferris/FactoriesCreationCommon_private.hh create mode 100644 Ferris/Ferris.cpp create mode 100644 Ferris/Ferris.hh create mode 100644 Ferris/FerrisAsTextPlugin.cpp create mode 100644 Ferris/FerrisAsTextPlugin.hh create mode 100644 Ferris/FerrisBackup.cpp create mode 100644 Ferris/FerrisBackup.hh create mode 100644 Ferris/FerrisBitMagic.hh create mode 100644 Ferris/FerrisBoost.cpp create mode 100644 Ferris/FerrisBoost.hh create mode 100644 Ferris/FerrisCLucene.hh create mode 100644 Ferris/FerrisContextPlugin.cpp create mode 100644 Ferris/FerrisCopy.cpp create mode 100644 Ferris/FerrisCopy.hh create mode 100644 Ferris/FerrisCopy_private.hh create mode 100644 Ferris/FerrisCreationPlugin.cpp create mode 100644 Ferris/FerrisCreationPlugin.hh create mode 100644 Ferris/FerrisCurl.cpp create mode 100644 Ferris/FerrisCurl_private.hh create mode 100644 Ferris/FerrisDOM.cpp create mode 100644 Ferris/FerrisDOM.hh create mode 100644 Ferris/FerrisDOM_private.hh create mode 100644 Ferris/FerrisDevContext.cpp create mode 100644 Ferris/FerrisDevContext_private.hh create mode 100644 Ferris/FerrisEAGeneratorPlugin.cpp create mode 100644 Ferris/FerrisEAGeneratorPlugin.hh create mode 100644 Ferris/FerrisEAGeneratorPlugin_private.hh create mode 100644 Ferris/FerrisEvent.cpp create mode 100644 Ferris/FerrisEvent.hh create mode 100644 Ferris/FerrisException.cpp create mode 100644 Ferris/FerrisException.hh create mode 100644 Ferris/FerrisFileActions.cpp create mode 100644 Ferris/FerrisFileActions.hh create mode 100644 Ferris/FerrisGPG.cpp create mode 100644 Ferris/FerrisGPGContext.cpp create mode 100644 Ferris/FerrisGPGContext_private.hh create mode 100644 Ferris/FerrisGPG_private.hh create mode 100644 Ferris/FerrisHandle.cpp create mode 100644 Ferris/FerrisHandle.hh create mode 100644 Ferris/FerrisKDE.cpp create mode 100644 Ferris/FerrisKDE.hh create mode 100644 Ferris/FerrisMove.cpp create mode 100644 Ferris/FerrisMove.hh create mode 100644 Ferris/FerrisOpenSSL.cpp create mode 100644 Ferris/FerrisOpenSSL.hh create mode 100644 Ferris/FerrisPopt.cpp create mode 100644 Ferris/FerrisPopt.hh create mode 100644 Ferris/FerrisQt.cpp create mode 100644 Ferris/FerrisQt_private.hh create mode 100644 Ferris/FerrisRDFCore.cpp create mode 100644 Ferris/FerrisRDFCore.hh create mode 100644 Ferris/FerrisRemove.cpp create mode 100644 Ferris/FerrisRemove.hh create mode 100644 Ferris/FerrisRemove_private.hh create mode 100644 Ferris/FerrisSTL.hh create mode 100644 Ferris/FerrisSemantic.cpp create mode 100644 Ferris/FerrisSemantic.hh create mode 100644 Ferris/FerrisSlaveProcess.cpp create mode 100644 Ferris/FerrisSlaveProcess.hh create mode 100644 Ferris/FerrisSlaveProcess_private.hh create mode 100644 Ferris/FerrisSmartPointerChecker.hh create mode 100644 Ferris/FerrisSmartPointerChecker.hh.in create mode 100644 Ferris/FerrisStdHashMap.hh create mode 100644 Ferris/FerrisVersioning.cpp create mode 100644 Ferris/FerrisVersioning.hh create mode 100644 Ferris/FerrisWebServices.cpp create mode 100644 Ferris/FerrisWebServices_private.hh create mode 100644 Ferris/FerrisXalan.cpp create mode 100644 Ferris/FerrisXalan_private.hh create mode 100644 Ferris/Ferris_private.hh create mode 100644 Ferris/Ferrisls.cpp create mode 100644 Ferris/Ferrisls.hh create mode 100644 Ferris/Ferrisls_AggregateData.cpp create mode 100644 Ferris/Ferrisls_AggregateData.hh create mode 100644 Ferris/Ferrisls_RDF.cpp create mode 100644 Ferris/Ferrisls_XML.cpp create mode 100644 Ferris/FilteredContext.cpp create mode 100644 Ferris/FilteredContext.hh create mode 100644 Ferris/FilteredContext_private.hh create mode 100644 Ferris/ForwardEAIndexInterface.cpp create mode 100644 Ferris/ForwardEAIndexInterface.hh create mode 100644 Ferris/FullTextContext.cpp create mode 100644 Ferris/FullTextContext.hh create mode 100644 Ferris/FullTextIndexer.cpp create mode 100644 Ferris/FullTextIndexer.hh create mode 100644 Ferris/FullTextIndexerCustomFerris.cpp create mode 100644 Ferris/FullTextIndexerMetaInterface.cpp create mode 100644 Ferris/FullTextIndexerMetaInterface.hh create mode 100644 Ferris/FullTextIndexerSyntheticDocID.cpp create mode 100644 Ferris/FullTextIndexerSyntheticDocID_private.hh create mode 100644 Ferris/FullTextIndexer_private.hh create mode 100644 Ferris/FullTextQuery.cpp create mode 100644 Ferris/FullTextQuery.hh create mode 100644 Ferris/General.cpp create mode 100644 Ferris/General.hh create mode 100644 Ferris/Hashing.hh create mode 100644 Ferris/HiddenSymbolSupport.hh create mode 100644 Ferris/Image.cpp create mode 100644 Ferris/Image_private.hh create mode 100644 Ferris/Iterator.hh create mode 100644 Ferris/LinkContextScheme.cpp create mode 100644 Ferris/LinkContextScheme.hh create mode 100644 Ferris/LinkContextSchemeClients.cpp create mode 100644 Ferris/LinkContextSchemeClients.hh create mode 100644 Ferris/MainPageDocs.hh create mode 100644 Ferris/Makefile.am create mode 100644 Ferris/Makefile.in create mode 100644 Ferris/MatchedEAGenerators.cpp create mode 100644 Ferris/MatchedEAGenerators.hh create mode 100644 Ferris/Math.cpp create mode 100644 Ferris/Math.hh create mode 100644 Ferris/Medallion.cpp create mode 100644 Ferris/Medallion.hh create mode 100644 Ferris/Medallion_private.hh create mode 100644 Ferris/MetadataServer.cpp create mode 100644 Ferris/MetadataServer_private.hh create mode 100644 Ferris/Mime.cpp create mode 100644 Ferris/Mime.hh create mode 100644 Ferris/Native.cpp create mode 100644 Ferris/Native.hh create mode 100644 Ferris/Numeric.hh create mode 100644 Ferris/Personalities.cpp create mode 100644 Ferris/Personalities.hh create mode 100644 Ferris/PluginOutOfProcNotificationEngine.cpp create mode 100644 Ferris/PluginOutOfProcNotificationEngine.hh create mode 100644 Ferris/RPM.cpp create mode 100644 Ferris/RPMContext.cpp create mode 100644 Ferris/RPMContext_private.hh create mode 100644 Ferris/RPM_private.hh create mode 100644 Ferris/Regex.cpp create mode 100644 Ferris/Regex.hh create mode 100644 Ferris/RemembranceContext.cpp create mode 100644 Ferris/Resolver.cpp create mode 100644 Ferris/Resolver.hh create mode 100644 Ferris/Resolver_private.hh create mode 100644 Ferris/RootContext.cpp create mode 100644 Ferris/RootContext_private.hh create mode 100644 Ferris/Runner.cpp create mode 100644 Ferris/Runner.hh create mode 100644 Ferris/Runner_FunctorType.hh create mode 100644 Ferris/SM.cpp create mode 100644 Ferris/SM.hh create mode 100644 Ferris/SM_private.hh create mode 100644 Ferris/SchemaManips.cpp create mode 100644 Ferris/SchemaManips.hh create mode 100644 Ferris/SchemaSupport.cpp create mode 100644 Ferris/SchemaSupport.hh create mode 100644 Ferris/SchemaSupport.hh.in create mode 100644 Ferris/Shell.cpp create mode 100644 Ferris/Shell.hh create mode 100644 Ferris/SignalStreams.cpp create mode 100644 Ferris/SignalStreams.hh create mode 100644 Ferris/SpiritFFilter.cpp create mode 100644 Ferris/SpiritTime.cpp create mode 100644 Ferris/StatfsUtilities.cpp create mode 100644 Ferris/StatfsUtilities.hh create mode 100644 Ferris/SyncDelayer.cpp create mode 100644 Ferris/SyncDelayer.hh create mode 100644 Ferris/TimeDelayedAction.cpp create mode 100644 Ferris/TimeDelayedAction.hh create mode 100644 Ferris/Trimming.hh create mode 100644 Ferris/TypeDecl.hh create mode 100644 Ferris/ValueRestorer.hh create mode 100644 Ferris/Versioned.cpp create mode 100644 Ferris/Versioned.hh create mode 100644 Ferris/WrapXMMS.cpp create mode 100644 Ferris/WrapXMMS.hh create mode 100644 Ferris/XQilla.cpp create mode 100644 Ferris/XQillaContext.cpp create mode 100644 Ferris/XQillaContext_private.hh create mode 100644 Ferris/XQilla_private.hh create mode 100644 Ferris/common-ferris-out-of-proc-notification-deamon.cpp create mode 100644 Ferris/common-ferris-out-of-proc-notification-deamon.hh create mode 100644 Ferris/libferris.i create mode 100644 Ferris/libferrisocaml.i create mode 100644 Ferris/libferrisocaml_wrap.c create mode 100644 Ferris/libferrisperl.i create mode 100644 Ferris/libferrisperl_wrap.cpp create mode 100644 Ferris/libferrispython.i create mode 100644 Ferris/libferrispython_wrap.cpp create mode 100644 Ferris/libferrisxmlshared.cpp create mode 100644 Ferris/libferrisxmlshared.hh create mode 100644 Ferris/mocimpls.cpp create mode 100644 Ferris/perl_std_list.i create mode 100644 Ferris/timber.cpp create mode 100644 Ferris/timber.hh create mode 100644 Ferris/xfsutil.cpp create mode 100644 Ferris/xfsutil.hh create mode 100644 FerrisGCJ/FerrisGCJ.cpp create mode 100644 FerrisGCJ/FerrisGCJ_private.hh create mode 100644 FerrisGCJ/Makefile.am create mode 100644 FerrisGCJ/Makefile.in create mode 100644 FerrisGlue/ImageMagickNamespaceGlue.cpp create mode 100644 FerrisGlue/ImageMagickNamespaceGlue.hh create mode 100644 FerrisGlue/Makefile.am create mode 100644 FerrisGlue/Makefile.in create mode 100644 FerrisQtGui/All.hh create mode 100644 FerrisQtGui/FerrisFileSystemModel.cpp create mode 100644 FerrisQtGui/FerrisFileSystemModel.hh create mode 100644 FerrisQtGui/FerrisQtGui.cpp create mode 100644 FerrisQtGui/FerrisQtGui.hh create mode 100644 FerrisQtGui/FerrisSortFilterProxyModel.cpp create mode 100644 FerrisQtGui/FerrisSortFilterProxyModel.hh create mode 100644 FerrisQtGui/Makefile.am create mode 100644 FerrisQtGui/Makefile.in create mode 100644 FerrisQtGui/mocimpls.cpp create mode 100644 FerrisQtGui/modeltest.cpp create mode 100644 FerrisQtGui/modeltestqml.qml create mode 100644 FerrisUI/All.hh create mode 100644 FerrisUI/ContextPropertiesEditor.cpp create mode 100644 FerrisUI/ContextPropertiesEditor.hh create mode 100644 FerrisUI/EditSQLColumns.cpp create mode 100644 FerrisUI/EditSQLColumns.hh create mode 100644 FerrisUI/EditStringList.cpp create mode 100644 FerrisUI/EditStringList.hh create mode 100644 FerrisUI/FerrisCopyUI.cpp create mode 100644 FerrisUI/FerrisCopyUI.hh create mode 100644 FerrisUI/FerrisOptionMenu.cpp create mode 100644 FerrisUI/FerrisOptionMenu.hh create mode 100644 FerrisUI/FerrisRemoveUI.cpp create mode 100644 FerrisUI/FerrisRemoveUI.hh create mode 100644 FerrisUI/GtkFerris.cpp create mode 100644 FerrisUI/GtkFerris.hh create mode 100644 FerrisUI/GtkFerris_private.hh create mode 100644 FerrisUI/Makefile.am create mode 100644 FerrisUI/Makefile.in create mode 100644 FerrisUI/MedallionEditor.cpp create mode 100644 FerrisUI/MedallionEditor.hh create mode 100644 FerrisUI/Menus.cpp create mode 100644 FerrisUI/Menus.hh create mode 100644 FerrisUI/SubprocessButtonAndLabel.cpp create mode 100644 FerrisUI/SubprocessButtonAndLabel.hh create mode 100644 FerrisUI/TreeStoreDriver.cpp create mode 100644 FerrisUI/TreeStoreDriver.hh create mode 100644 FerrisUI/UAsyncIO.cpp create mode 100644 FerrisUI/UAsyncIO.hh create mode 100644 FerrisUI/gtkcellrendererprogress.c create mode 100644 FerrisUI/gtkcellrendererprogress.h create mode 100644 FerrisUI/gtkferriscellrenderertext.cpp create mode 100644 FerrisUI/gtkferriscellrenderertext.hh create mode 100644 FerrisUI/gtkferristreestore.cpp create mode 100644 FerrisUI/gtkferristreestore.hh create mode 100644 INSTALL create mode 100644 Indexing/BoostMultiIndexLexicon.cpp create mode 100644 Indexing/FilesystemLexicon.cpp create mode 100644 Indexing/IndexPrivate.cpp create mode 100644 Indexing/IndexPrivate.hh create mode 100644 Indexing/Makefile.am create mode 100644 Indexing/Makefile.in create mode 100644 Indexing/ThreeInFourLexicon.cpp create mode 100644 Indexing/UncompressedDB4.cpp create mode 100644 Indexing/XMLLexicon.cpp create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 TODO create mode 100644 ThirdParty/Makefile.am create mode 100644 ThirdParty/Makefile.in create mode 100644 ThirdParty/boost/Makefile.am create mode 100644 ThirdParty/boost/Makefile.in create mode 100644 ThirdParty/boost/utf8_codecvt_facet.cpp create mode 100644 ThirdParty/boost/utf8_codecvt_facet.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMAttrImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDeepNodeListPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDocumentImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeIDMap.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeListImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMParentNode.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMRangeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTreeWalkerImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTypeInfoImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMAttrImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDeepNodeListPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDocumentImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeIDMap.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeListImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMParentNode.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMRangeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTreeWalkerImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTypeInfoImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMAttrImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDeepNodeListPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDocumentImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeIDMap.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeListImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMParentNode.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMRangeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMStringPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTreeWalkerImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTypeInfoImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMAttrImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDeepNodeListPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDocumentImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeIDMap.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeListImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMParentNode.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMRangeImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMStringPool.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTreeWalkerImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTypeInfoImpl.hpp create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.in create mode 100644 ThirdParty/internal-xerces-c-headers/Makefile.am create mode 100644 ThirdParty/internal-xerces-c-headers/Makefile.in create mode 100644 acconfig.h create mode 100644 aclocal.m4 create mode 100644 apps/Makefile.am create mode 100644 apps/Makefile.in create mode 100644 apps/ai/Makefile.am create mode 100644 apps/ai/Makefile.in create mode 100644 apps/ai/fagent.cpp create mode 100644 apps/ai/fagentcreate.cpp create mode 100644 apps/cat/Makefile.am create mode 100644 apps/cat/Makefile.in create mode 100644 apps/cat/fcat.cpp create mode 100644 apps/cat/ftee.cpp create mode 100644 apps/copy/Makefile.am create mode 100644 apps/copy/Makefile.in create mode 100644 apps/copy/ferriscp.cpp create mode 100644 apps/cursors/Makefile.am create mode 100644 apps/cursors/Makefile.in create mode 100644 apps/cursors/ferris-cursor.cpp create mode 100644 apps/du/Makefile.am create mode 100644 apps/du/Makefile.in create mode 100644 apps/du/fdu.cpp create mode 100644 apps/fca/Makefile.am create mode 100644 apps/fca/Makefile.in create mode 100644 apps/fca/ferris-create-fca-scale-nominal.cpp create mode 100644 apps/fca/ferris-create-fca-scale-numeric-ordinal.cpp create mode 100644 apps/fca/ferris-create-fca-scale-numeric.cpp create mode 100644 apps/fca/ferris-create-fca-scale-splice-in-ffitler.cpp create mode 100644 apps/fca/ferris-create-fca-scale-urls.cpp create mode 100644 apps/fca/ferris-create-fca-tree.cpp create mode 100644 apps/fca/ferris-export-concept-lattice-to-toscanaj.cpp create mode 100644 apps/fca/ferris-export-formal-context-to-burmeister.cpp create mode 100644 apps/fca/ferris-lattice-from-cfi.cpp create mode 100644 apps/fca/gf-create-fca-scale-numeric.cpp create mode 100644 apps/fca/libferrisfcascaling.cpp create mode 100644 apps/fca/libferrisfcascaling.hh create mode 100644 apps/fcompress/Makefile.am create mode 100644 apps/fcompress/Makefile.in create mode 100644 apps/fcompress/fcompress.cpp create mode 100755 apps/fedit create mode 100755 apps/ferris-bash-exec.sh create mode 100755 apps/ferris-exec-in-terminal.sh create mode 100755 apps/ferris-internal-extract-subtitles-to-format create mode 100755 apps/ferris-internal-remembrance-redo-batch-script.sh create mode 100755 apps/ferris-internal-remembrance-redo-script.sh create mode 100755 apps/ferris-internal-scale-image-by-dimension.sh create mode 100755 apps/ferris-mount-etagere-as-kml.sh create mode 100755 apps/ferris-open-google-earth-for-context.pl create mode 100755 apps/ferris-open-google-map-for-context.sh create mode 100755 apps/ferris-rdfproc create mode 100755 apps/ferris-recreate-primary-fulltext-and-eaindex-as-clucene.sh create mode 100755 apps/ferris-recreate-primary-fulltext-and-eaindex-as-postgresql.sh create mode 100644 apps/ferris-setup-template-findex-database.sh create mode 100755 apps/ferris-setupaction.sh create mode 100755 apps/ferris-setupapp.sh create mode 100755 apps/ferris-setupopen.sh create mode 100755 apps/ferris-verify-dot-ferris-databases.sh create mode 100644 apps/ferriscd/Makefile.am create mode 100644 apps/ferriscd/Makefile.in create mode 100644 apps/ferriscd/ferriscd create mode 100644 apps/ferriscd/ferriscdexe.cpp create mode 100644 apps/ferrisredirect/Makefile.am create mode 100644 apps/ferrisredirect/Makefile.in create mode 100755 apps/ferrisredirect/ferris-file-to-fifo create mode 100644 apps/ferrisredirect/ferris-internal-file-to-fifo-command.cpp create mode 100644 apps/ferrisredirect/ferris-redirect.cpp create mode 100644 apps/fileactions/Makefile.am create mode 100644 apps/fileactions/Makefile.in create mode 100644 apps/fileactions/ferris-file-action.cpp create mode 100644 apps/fileactions/ferris-set-file-action-for-type.cpp create mode 100644 apps/fileclip/Makefile.am create mode 100644 apps/fileclip/Makefile.in create mode 100644 apps/fileclip/fclipcopy/Makefile.am create mode 100644 apps/fileclip/fclipcopy/Makefile.in create mode 100644 apps/fileclip/fclipcopy/fclipcopy.cpp create mode 100644 apps/fileclip/fclipcut/Makefile.am create mode 100644 apps/fileclip/fclipcut/Makefile.in create mode 100644 apps/fileclip/fclipcut/fclipcut.cpp create mode 100644 apps/fileclip/fcliplink/Makefile.am create mode 100644 apps/fileclip/fcliplink/Makefile.in create mode 100644 apps/fileclip/fcliplink/fcliplink.cpp create mode 100644 apps/fileclip/fclippaste/Makefile.am create mode 100644 apps/fileclip/fclippaste/Makefile.in create mode 100644 apps/fileclip/fclippaste/fclippaste.cpp create mode 100644 apps/fileclip/fclipredo/Makefile.am create mode 100644 apps/fileclip/fclipredo/Makefile.in create mode 100644 apps/fileclip/fclipredo/fclipredo.cpp create mode 100644 apps/fileclip/fclipundo/Makefile.am create mode 100644 apps/fileclip/fclipundo/Makefile.in create mode 100644 apps/fileclip/fclipundo/fclipundo.cpp create mode 100644 apps/fileclip/ferris-fileclip-set-sloth.sh create mode 100644 apps/fmedallion/Makefile.am create mode 100644 apps/fmedallion/Makefile.in create mode 100644 apps/fmedallion/ferris-get-emblems-within-range.cpp create mode 100644 apps/fmedallion/fmedallion.cpp create mode 100644 apps/fmkdir/Makefile.am create mode 100644 apps/fmkdir/Makefile.in create mode 100644 apps/fmkdir/fmkdir.cpp create mode 100644 apps/fmodestr2octal/Makefile.am create mode 100644 apps/fmodestr2octal/Makefile.in create mode 100644 apps/fmodestr2octal/fmodestr2octal.cpp create mode 100644 apps/frunner/Makefile.am create mode 100644 apps/frunner/Makefile.in create mode 100644 apps/frunner/ferris-runner.cpp create mode 100644 apps/fschema/Makefile.am create mode 100644 apps/fschema/Makefile.in create mode 100644 apps/fschema/fschema.cpp create mode 100644 apps/ftouch/Makefile.am create mode 100644 apps/ftouch/Makefile.in create mode 100644 apps/ftouch/ftouch.cpp create mode 100644 apps/fulltextindex/DirectIndexConfigAccess.hh create mode 100644 apps/fulltextindex/Makefile.am create mode 100644 apps/fulltextindex/Makefile.in create mode 100644 apps/fulltextindex/eainverted_file_to_html_table.xsl create mode 100644 apps/fulltextindex/feaindex-attach-fulltext-index.cpp create mode 100644 apps/fulltextindex/feaindex-federation-add-index.cpp create mode 100644 apps/fulltextindex/feaindex-federation-add-url-substitution-regex-for-index.cpp create mode 100755 apps/fulltextindex/feaindex-ldap-tivoli-objectclass-resync.sh create mode 100644 apps/fulltextindex/feaindex-remove-old-instances.cpp create mode 100644 apps/fulltextindex/feaindexadd.cpp create mode 100644 apps/fulltextindex/feaindexcompact.cpp create mode 100644 apps/fulltextindex/feaindexquery.cpp create mode 100644 apps/fulltextindex/feaindexremove.cpp create mode 100755 apps/fulltextindex/ferris-eaindex-postgresql-add-column create mode 100755 apps/fulltextindex/ferris-eaindex-postgresql-add-fulltext-index-on-column create mode 100755 apps/fulltextindex/ferris-eaindex-update-existing-attributes create mode 100644 apps/fulltextindex/ferris-find.cpp create mode 100755 apps/fulltextindex/ferris-index-remove create mode 100644 apps/fulltextindex/ferris-search.cpp create mode 100644 apps/fulltextindex/findex-remove-old-instances.cpp create mode 100644 apps/fulltextindex/findexadd.cpp create mode 100644 apps/fulltextindex/findexcompact.cpp create mode 100644 apps/fulltextindex/findexquery.cpp create mode 100644 apps/fulltextindex/findexremove.cpp create mode 100644 apps/fulltextindex/inverted_file_to_html_table.xsl create mode 100644 apps/head/Makefile.am create mode 100644 apps/head/Makefile.in create mode 100644 apps/head/fhead.cpp create mode 100644 apps/importdesktop/Makefile.am create mode 100644 apps/importdesktop/Makefile.in create mode 100644 apps/importdesktop/dot-desktop-files/Graphics/Makefile.am create mode 100644 apps/importdesktop/dot-desktop-files/Graphics/Makefile.in create mode 100644 apps/importdesktop/dot-desktop-files/Graphics/entice.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Graphics/feh.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Graphics/slideshow.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Makefile.am create mode 100644 apps/importdesktop/dot-desktop-files/Makefile.in create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/Makefile.am create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/Makefile.in create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer-fullscreen.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer-nosound.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer-wide.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x2.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x3.desktop create mode 100644 apps/importdesktop/dot-desktop-files/Multimedia/mplayer.desktop create mode 100755 apps/importdesktop/ferris-generate-gnome-menu.sh create mode 100644 apps/importdesktop/ferris-import-desktop-file.cpp create mode 100755 apps/importdesktop/ferris-import-desktop-hive.sh create mode 100755 apps/libferris-googleearth create mode 100755 apps/libferris-googleearth-bouncer.pl create mode 100644 apps/ls/Makefile.am create mode 100644 apps/ls/Makefile.in create mode 100644 apps/ls/ls.cpp create mode 100644 apps/metadataserver/Makefile.am create mode 100644 apps/metadataserver/Makefile.in create mode 100644 apps/metadataserver/ferris-internal-metadata-broker-direct-client.cpp create mode 100644 apps/metadataserver/ferris-internal-metadata-broker.cpp create mode 100644 apps/metadataserver/ferris-internal-metadata-worker-direct-client.cpp create mode 100644 apps/metadataserver/ferris-internal-metadata-worker.cpp create mode 100644 apps/metadataserver/metadata-clients-common.cpp create mode 100644 apps/metadataserver/metadata-clients-common.hh create mode 100644 apps/metadataserver/mocimpls.cpp create mode 100644 apps/mv/Makefile.am create mode 100644 apps/mv/Makefile.in create mode 100644 apps/mv/ferrismv.cpp create mode 100644 apps/namespaces/Makefile.am create mode 100644 apps/namespaces/Makefile.in create mode 100644 apps/namespaces/fnamespace.cpp create mode 100644 apps/oprocdeamon/Makefile.am create mode 100644 apps/oprocdeamon/Makefile.in create mode 100644 apps/oprocdeamon/ferris-out-of-proc-notification-deamon.cpp create mode 100644 apps/phpsearchinterface/Makefile.am create mode 100644 apps/phpsearchinterface/Makefile.in create mode 100644 apps/phpsearchinterface/dhtmlxSuite/Makefile.am create mode 100644 apps/phpsearchinterface/dhtmlxSuite/Makefile.in create mode 100644 apps/phpsearchinterface/dhtmlxSuite/ferrisls-xml-to-dhtmlxSuite.xsl create mode 100644 apps/phpsearchinterface/dhtmlxSuite/index.php create mode 100755 apps/phpsearchinterface/dhtmlxSuite/query.php create mode 100644 apps/phpsearchinterface/index.php create mode 100755 apps/phpsearchinterface/runquery-simple.php create mode 100644 apps/phpsearchinterface/xml-results-to-xhtml.xsl create mode 100644 apps/rdf/Makefile.am create mode 100644 apps/rdf/Makefile.in create mode 100644 apps/rdf/ferris-myrdf-compact.cpp create mode 100644 apps/rdf/ferris-myrdf-inference.cpp create mode 100644 apps/rdf/ferris-myrdf-query.cpp create mode 100644 apps/rdf/ferris-rdf-detach-by-regex.cpp create mode 100644 apps/rdf/ferris-rdf-smush-new-url.cpp create mode 100644 apps/rdf/ferris-rdf-smush-union-urls.cpp create mode 100644 apps/rm/Makefile.am create mode 100644 apps/rm/Makefile.in create mode 100644 apps/rm/ferrisrm.cpp create mode 100644 apps/scripts/Makefile.am create mode 100644 apps/scripts/Makefile.in create mode 100755 apps/scripts/ferris-emacsclient-function create mode 100644 apps/scripts/ferris-emacsclient-function~ create mode 100755 apps/scripts/ferris-open-in-text-editor create mode 100644 apps/scripts/ferris-open-in-text-editor~ create mode 100644 apps/tail/Makefile.am create mode 100644 apps/tail/Makefile.in create mode 100644 apps/tail/ftail.cpp create mode 100644 apps/tools/Makefile.am create mode 100644 apps/tools/Makefile.in create mode 100644 apps/tools/fchmod.cpp create mode 100644 apps/tools/fchown.cpp create mode 100644 apps/tools/freadlink.cpp create mode 100644 apps/tools/fstat.cpp create mode 100644 apps/tools/ftest.cpp create mode 100644 apps/upnpserver/Makefile.am create mode 100644 apps/upnpserver/Makefile.in create mode 100644 apps/upnpserver/ferris-upnp-server.cpp create mode 100644 apps/volumemanager/Makefile.am create mode 100644 apps/volumemanager/Makefile.in create mode 100644 apps/volumemanager/ferris-internal-hal-copyto.cpp create mode 100644 apps/volumemanager/ferris-internal-hal-els.cpp create mode 100644 apps/volumemanager/ferris-internal-hal-mount-volume.cpp create mode 100644 apps/volumemanager/ferris-volume-manager.cpp create mode 100644 apps/xml/CGITransform/CGIFerrisTransform.cpp create mode 100644 apps/xml/CGITransform/Makefile.am create mode 100644 apps/xml/CGITransform/Makefile.in create mode 100644 apps/xml/CGITransform/query.fxsql create mode 100644 apps/xml/CGITransform/query.xsl create mode 100644 apps/xml/CGITransform/queryform.fxsql create mode 100644 apps/xml/CGITransform/queryform.xsl create mode 100644 apps/xml/Makefile.am create mode 100644 apps/xml/Makefile.in create mode 100644 apps/xml/XSLTransform/Makefile.am create mode 100644 apps/xml/XSLTransform/Makefile.in create mode 100644 apps/xml/XSLTransform/XSLTransform.cpp create mode 100644 apps/xml/ferris-filesystem-to-xsltfs-excel-sheet-postfix.xfragment create mode 100644 apps/xml/ferris-filesystem-to-xsltfs-excel-sheet-prefix.xfragment create mode 100644 apps/xml/ferris-filesystem-to-xsltfs-excel-sheet-rev-postfix.xfragment create mode 100644 apps/xml/ferris-filesystem-to-xsltfs-excel-sheet-rev-prefix.xfragment create mode 100644 apps/xml/ferris-filesystem-to-xsltfs-sheets.cpp create mode 100644 apps/xml/ferris-xml-edit.cpp create mode 100644 apps/xml/ferris-xqilla.cpp create mode 100644 apps/xmmsdaemon/Makefile.am create mode 100644 apps/xmmsdaemon/Makefile.in create mode 100644 apps/xmmsdaemon/ferris-internal-xmms-server.cpp create mode 100644 appsui/Makefile.am create mode 100644 appsui/Makefile.in create mode 100644 appsui/gfcopy/Makefile.am create mode 100644 appsui/gfcopy/Makefile.in create mode 100644 appsui/gfcopy/gfcp.cpp create mode 100644 appsui/gfdl/Makefile.am create mode 100644 appsui/gfdl/Makefile.in create mode 100644 appsui/gfdl/gfdl.cpp create mode 100644 appsui/gfindex/Makefile.am create mode 100644 appsui/gfindex/Makefile.in create mode 100644 appsui/gfindex/gfindexadd.cpp create mode 100644 appsui/gfmv/Makefile.am create mode 100644 appsui/gfmv/Makefile.in create mode 100644 appsui/gfmv/gfmv.cpp create mode 100644 appsui/gfproperties/Makefile.am create mode 100644 appsui/gfproperties/Makefile.in create mode 100644 appsui/gfproperties/gfproperties.cpp create mode 100644 appsui/gfrm/Makefile.am create mode 100644 appsui/gfrm/Makefile.in create mode 100644 appsui/gfrm/gfrm.cpp create mode 100644 appsui/volumemanager/Makefile.am create mode 100644 appsui/volumemanager/Makefile.in create mode 100644 appsui/volumemanager/ferris-volume-manager-setup-volume-wizard.cpp create mode 100644 cc/Ferris/Ferris.directory create mode 100644 cc/Ferris/Ferris.png create mode 100644 cc/Ferris/Makefile.am create mode 100644 cc/Ferris/Makefile.in create mode 100644 cc/Ferris/agents.desktop create mode 100644 cc/Ferris/agents.desktop.in create mode 100644 cc/Ferris/auth.desktop create mode 100644 cc/Ferris/auth.desktop.in create mode 100644 cc/Ferris/curl-ftp.desktop create mode 100644 cc/Ferris/curl-ftp.desktop.in create mode 100644 cc/Ferris/ferris-agents.png create mode 100644 cc/Ferris/ferris-auth.png create mode 100644 cc/Ferris/ferris-curl-ftp.png create mode 100644 cc/Ferris/ferris-general.png create mode 100644 cc/Ferris/ferris-index.png create mode 100644 cc/Ferris/ferris-locale.png create mode 100644 cc/Ferris/ferris-logging.png create mode 100644 cc/Ferris/ferris-medallion.png create mode 100644 cc/Ferris/ferris-thumbnails.png create mode 100644 cc/Ferris/ferris-version.png create mode 100644 cc/Ferris/general.desktop create mode 100644 cc/Ferris/general.desktop.in create mode 100644 cc/Ferris/indexing.desktop create mode 100644 cc/Ferris/indexing.desktop.in create mode 100644 cc/Ferris/locale.desktop create mode 100644 cc/Ferris/locale.desktop.in create mode 100644 cc/Ferris/logging.desktop create mode 100644 cc/Ferris/logging.desktop.in create mode 100644 cc/Ferris/medallion.desktop create mode 100644 cc/Ferris/medallion.desktop.in create mode 100644 cc/Ferris/mysql.desktop create mode 100644 cc/Ferris/thumbnails.desktop create mode 100644 cc/Ferris/thumbnails.desktop.in create mode 100644 cc/Ferris/version.desktop create mode 100644 cc/Ferris/version.desktop.in create mode 100644 cc/Makefile.am create mode 100644 cc/Makefile.in create mode 100644 cc/capplets/Makefile.am create mode 100644 cc/capplets/Makefile.in create mode 100644 cc/capplets/agents/Makefile.am create mode 100644 cc/capplets/agents/Makefile.in create mode 100644 cc/capplets/agents/ferris-capplet-agents.cpp create mode 100644 cc/capplets/auth/Makefile.am create mode 100644 cc/capplets/auth/Makefile.in create mode 100644 cc/capplets/auth/ferris-capplet-auth.cpp create mode 100644 cc/capplets/curl-ftp/Makefile.am create mode 100644 cc/capplets/curl-ftp/Makefile.in create mode 100644 cc/capplets/curl-ftp/ferris-capplet-curl-ftp.cpp create mode 100644 cc/capplets/general/Makefile.am create mode 100644 cc/capplets/general/Makefile.in create mode 100644 cc/capplets/general/ferris-capplet-general.cpp create mode 100644 cc/capplets/index/Makefile.am create mode 100644 cc/capplets/index/Makefile.in create mode 100644 cc/capplets/index/ferris-capplet-index.cpp create mode 100644 cc/capplets/locale/Makefile.am create mode 100644 cc/capplets/locale/Makefile.in create mode 100644 cc/capplets/locale/ferris-capplet-locale.cpp create mode 100644 cc/capplets/logging/Makefile.am create mode 100644 cc/capplets/logging/Makefile.in create mode 100644 cc/capplets/logging/ferris-capplet-logging.cpp create mode 100644 cc/capplets/medallion/Makefile.am create mode 100644 cc/capplets/medallion/Makefile.in create mode 100644 cc/capplets/medallion/ferris-capplet-medallion.cpp create mode 100644 cc/capplets/rdf/Makefile.am create mode 100644 cc/capplets/rdf/Makefile.in create mode 100644 cc/capplets/rdf/ferris-capplet-rdf.cpp create mode 100644 cc/capplets/thumbnails/Makefile.am create mode 100644 cc/capplets/thumbnails/Makefile.in create mode 100644 cc/capplets/thumbnails/ferris-capplet-thumbnails.cpp create mode 100644 cc/capplets/version/Makefile.am create mode 100644 cc/capplets/version/Makefile.in create mode 100644 cc/capplets/version/ferris-capplet-version.cpp create mode 100644 cc/capplets/version/ferris-capplet-version.hh.in create mode 100755 compile create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 customalloc/Makefile.am create mode 100644 customalloc/Makefile.in create mode 100644 customalloc/malloc-2.7.2.c create mode 100755 depcomp create mode 100644 dot-ferris/Makefile.am create mode 100644 dot-ferris/Makefile.in create mode 100644 dot-ferris/apps.db create mode 100644 dot-ferris/bookmarks.db create mode 100644 dot-ferris/cache.db create mode 100644 dot-ferris/ea-index/Makefile.am create mode 100644 dot-ferris/ea-index/Makefile.in create mode 100644 dot-ferris/ea-index/attributemap.lexicon.db create mode 100644 dot-ferris/ea-index/ea-index-config.db create mode 100644 dot-ferris/etagere/Makefile.am create mode 100644 dot-ferris/etagere/Makefile.in create mode 100644 dot-ferris/etagere/cold-emblems.db create mode 100644 dot-ferris/etagere/etagere.db create mode 100644 dot-ferris/eventbind.db create mode 100644 dot-ferris/file-clipboard.db create mode 100644 dot-ferris/full-text-index/Makefile.am create mode 100644 dot-ferris/full-text-index/Makefile.in create mode 100644 dot-ferris/full-text-index/config.db create mode 100644 dot-ferris/full-text-index/full-text-index-config.db create mode 100755 dot-ferris/full-text-index/lexicon.prefixcoded create mode 100644 dot-ferris/general.db create mode 100644 dot-ferris/hal-actions.db create mode 100644 dot-ferris/hal-user-configuration.db create mode 100644 dot-ferris/licenses/Makefile.am create mode 100644 dot-ferris/licenses/Makefile.in create mode 100644 dot-ferris/licenses/src-c-BSD create mode 100644 dot-ferris/licenses/src-c-GPL create mode 100644 dot-ferris/licenses/src-c-LGPL create mode 100644 dot-ferris/licenses/src-cpp-BSD create mode 100644 dot-ferris/licenses/src-cpp-GPL create mode 100644 dot-ferris/licenses/src-cpp-LGPL create mode 100644 dot-ferris/licenses/src-h-BSD create mode 100644 dot-ferris/licenses/src-h-GPL create mode 100644 dot-ferris/licenses/src-h-LGPL create mode 100644 dot-ferris/licenses/src-hh-BSD create mode 100644 dot-ferris/licenses/src-hh-GPL create mode 100644 dot-ferris/licenses/src-hh-LGPL create mode 100644 dot-ferris/logging.db create mode 100644 dot-ferris/mimebind.db create mode 100644 dot-ferris/rdfdb/Makefile.am create mode 100644 dot-ferris/rdfdb/Makefile.in create mode 100644 dot-ferris/rdfdb/myrdf-contexts.db create mode 100644 dot-ferris/rdfdb/myrdf-po2s.db create mode 100644 dot-ferris/rdfdb/myrdf-so2p.db create mode 100644 dot-ferris/rdfdb/myrdf-sp2o.db create mode 100644 dot-ferris/recordfile-types.db create mode 100644 dot-ferris/sane/Makefile.am create mode 100644 dot-ferris/sane/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-100/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-100/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/mode create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/color-100/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/color-300/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-300/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/mode create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/color-300/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/color-600/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-600/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/mode create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/color-600/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/color-base/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-base/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/mode create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/color-base/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-100/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-100/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/mode create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/gray-100/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-300/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-300/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/mode create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/gray-300/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-600/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-600/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/mode create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/gray-600/options/y-resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-base/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-base/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/Makefile.am create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/Makefile.in create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/mode create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/resolution create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/swcrop create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/swdeskew create mode 100644 dot-ferris/sane/dot-discovered/gray-base/options/y-resolution create mode 100644 dot-ferris/schema.xml create mode 100644 dot-ferris/schema.xml.in create mode 100644 dot-ferris/secure.db create mode 100644 dot-ferris/tmp/Makefile.am create mode 100644 dot-ferris/tmp/Makefile.in create mode 100644 dot-ferris/tmp/STUB create mode 100644 eaindexers_custom_plugin/Makefile.am create mode 100644 eaindexers_custom_plugin/Makefile.in create mode 100644 eaindexers_custom_plugin/libeaidxcustomferris.cpp create mode 100644 eaindexers_custom_plugin/libeaidxcustomferris.hh create mode 100644 eaindexers_custom_plugin/libeaidxcustomferrisdb4tree.cpp create mode 100644 eaindexers_custom_plugin/libeaidxcustomferrisdb4tree.hh create mode 100644 exposures/Makefile.am create mode 100644 exposures/Makefile.in create mode 100644 exposures/perl/Makefile.am create mode 100644 exposures/perl/Makefile.in create mode 100644 exposures/perl/libferris.pm create mode 100755 exposures/perl/test.pl create mode 100755 exposures/perl/tie.pl create mode 100644 exposures/plasma/Makefile.am create mode 100644 exposures/plasma/Makefile.in create mode 100644 exposures/plasma/libferris.operations create mode 100644 exposures/plasma/mocimpls.cpp create mode 100644 exposures/plasma/plasma-engine-libferris.desktop create mode 100644 exposures/plasma/plasma_engine_libferris.cpp create mode 100644 exposures/plasma/plasma_engine_libferris.hh create mode 100644 exposures/sqlitevtab/Makefile.am create mode 100644 exposures/sqlitevtab/Makefile.in create mode 100644 exposures/sqlitevtab/libferrissqlitevtable.cpp create mode 100644 exposures/sqlitevtab/libferrissqlitevtable.hh create mode 100644 factories/Makefile.am create mode 100644 factories/Makefile.in create mode 100644 factories/astext/Makefile.am create mode 100644 factories/astext/Makefile.in create mode 100644 factories/astext/libastextdjvu_factory.cpp create mode 100644 factories/astext/libastextextern_factory.cpp create mode 100644 factories/astext/libastexthtml_factory.cpp create mode 100644 factories/astext/libastextman_factory.cpp create mode 100644 factories/astext/libastextpdf_factory.cpp create mode 100644 factories/astext/libastextwv_factory.cpp create mode 100644 factories/creation/Makefile.am create mode 100644 factories/creation/Makefile.in create mode 100644 factories/creation/libcreationdb4_factory.cpp create mode 100644 factories/creation/libcreationdbxml_factory.cpp create mode 100644 factories/creation/libcreationdevsource_factory.cpp create mode 100644 factories/creation/libcreationeaindex_factory.cpp create mode 100644 factories/creation/libcreationeaindexdb4tree_factory.cpp create mode 100644 factories/creation/libcreationfulltextindex_factory.cpp create mode 100644 factories/creation/libcreationgdbm_factory.cpp create mode 100644 factories/creation/libcreationmagick_factory.cpp create mode 100644 factories/creation/libcreationmarkup_factory.cpp create mode 100644 factories/creation/libcreationmng_factory.cpp create mode 100644 factories/creation/libcreationmp3_factory.cpp create mode 100644 factories/creation/libcreationmpeg2_factory.cpp create mode 100644 factories/creation/libcreationogg_factory.cpp create mode 100644 factories/creation/libcreationshellscript_factory.cpp create mode 100644 factories/creation/libcreationsopranoredland_factory.cpp create mode 100644 factories/creation/libcreationtdb_factory.cpp create mode 100644 factories/creation/libcreationwav_factory.cpp create mode 100644 factories/eagenerators/Makefile.am create mode 100644 factories/eagenerators/Makefile.in create mode 100644 factories/eagenerators/libferrisa52_factory.cpp create mode 100644 factories/eagenerators/libferrisdjvulibre_factory.cpp create mode 100644 factories/eagenerators/libferrisexifea_factory.cpp create mode 100644 factories/eagenerators/libferrisextractor_factory.cpp create mode 100644 factories/eagenerators/libferrisflac_factory.cpp create mode 100644 factories/eagenerators/libferrisfspot_factory.cpp create mode 100644 factories/eagenerators/libferrisid3_factory.cpp create mode 100644 factories/eagenerators/libferrisjasper_factory.cpp create mode 100644 factories/eagenerators/libferrisjpeg_factory.cpp create mode 100644 factories/eagenerators/libferriskde3metadata_factory.cpp create mode 100644 factories/eagenerators/libferrismediainfoea_factory.cpp create mode 100644 factories/eagenerators/libferrismpeg2_factory.cpp create mode 100644 factories/eagenerators/libferrismpeg3_factory.cpp create mode 100644 factories/eagenerators/libferrisoggz_factory.cpp create mode 100644 factories/eagenerators/libferrispng_factory.cpp create mode 100644 factories/eagenerators/libferrissoprano_factory.cpp create mode 100644 factories/eagenerators/libferrisstrigi_factory.cpp create mode 100644 factories/eagenerators/libferrissubtitles_factory.cpp create mode 100644 factories/eagenerators/libferristaglib_factory.cpp create mode 100644 factories/eagenerators/libferrisxineea_factory.cpp create mode 100644 factories/eagenerators/libferrisxmp_factory.cpp create mode 100644 factories/eagenerators/libgimp_factory.cpp create mode 100644 factories/eagenerators/libimlib2_factory.cpp create mode 100644 factories/eagenerators/libmagick_factory.cpp create mode 100644 factories/eagenerators/libxfsnative_factory.cpp create mode 100644 ferris-config.in create mode 100644 ferris.pc create mode 100644 ferris.pc.in create mode 100644 ferrisui.pc create mode 100644 ferrisui.pc.in create mode 100644 ferrisxslt.pc create mode 100644 ferrisxslt.pc.in create mode 100644 firsttime/Makefile.am create mode 100644 firsttime/Makefile.in create mode 100644 firsttime/console/Makefile.am create mode 100644 firsttime/console/Makefile.in create mode 100644 firsttime/console/ferris-first-time-user.cpp create mode 100644 firsttime/console/ferris-setup-from-skels.sh create mode 100644 firsttime/ferris-first-time-user.hh create mode 100644 firsttime/ui/Makefile.am create mode 100644 firsttime/ui/Makefile.in create mode 100644 firsttime/ui/ferris-first-time-user-ui.cpp create mode 100644 fulltextindexers_custom_plugin/Makefile.am create mode 100644 fulltextindexers_custom_plugin/Makefile.in create mode 100644 fulltextindexers_custom_plugin/libftxcustomferris.cpp create mode 100644 fulltextindexers_custom_plugin/libftxcustomferris.hh create mode 100755 install-sh create mode 100755 ltmain.sh create mode 100644 macros/ferrismacros.m4 create mode 100644 media/Makefile.am create mode 100644 media/Makefile.in create mode 100644 media/icons/Button-Blue-Raw.png create mode 100644 media/icons/Button-Compress.png create mode 100644 media/icons/Button-Decompress.png create mode 100644 media/icons/Button-NextTrack.png create mode 100644 media/icons/Button-Pause.png create mode 100644 media/icons/Button-Play.png create mode 100644 media/icons/Button-PrevTrack.png create mode 100644 media/icons/Button-Raw.png create mode 100644 media/icons/Button-RevPlay.png create mode 100644 media/icons/Duct-Tape.png create mode 100644 media/icons/HD_drive.png create mode 100644 media/icons/Makefile.am create mode 100644 media/icons/Makefile.in create mode 100644 media/icons/asf.png create mode 100644 media/icons/audio.png create mode 100644 media/icons/avi.png create mode 100644 media/icons/bmp.png create mode 100644 media/icons/bookmarks.png create mode 100644 media/icons/c.png create mode 100644 media/icons/cancel-blur.png create mode 100644 media/icons/cancel.png create mode 100644 media/icons/cdrom.png create mode 100644 media/icons/clientsocket.png create mode 100644 media/icons/configure-dir.png create mode 100644 media/icons/cpp.png create mode 100644 media/icons/csh.png create mode 100644 media/icons/debug.png create mode 100644 media/icons/dir.png create mode 100644 media/icons/directory.png create mode 100644 media/icons/download-tb.png create mode 100644 media/icons/ea.png create mode 100644 media/icons/eaindex.png create mode 100644 media/icons/eaindexldap.png create mode 100644 media/icons/eaindexlucene.png create mode 100644 media/icons/eaindexodbc.png create mode 100644 media/icons/edit.png create mode 100644 media/icons/editor.png create mode 100644 media/icons/ee.png create mode 100644 media/icons/ego-desktop-apps.png create mode 100644 media/icons/ego-desktop-bookmarks.png create mode 100644 media/icons/ego-desktop-history.png create mode 100644 media/icons/ego-edit-app.png create mode 100644 media/icons/ego-loadingthumb.png create mode 100644 media/icons/ego-mu-PackedBoxLayout.png create mode 100644 media/icons/ego-mu-edit.png create mode 100644 media/icons/ego-mu-filter.png create mode 100644 media/icons/ego-mu-gesture.png create mode 100644 media/icons/ego-mu-giconview.png create mode 100644 media/icons/ego-mu-gtreeview.png create mode 100644 media/icons/ego-mu-layout.png create mode 100644 media/icons/ego-mu-mozview.png create mode 100644 media/icons/ego-mu-new-window-here.png create mode 100644 media/icons/ego-mu-picpreview.png create mode 100644 media/icons/ego-mu-rename.png create mode 100644 media/icons/ego-mu-scheme.png create mode 100644 media/icons/ego-mu-search.png create mode 100644 media/icons/ego-mu-select.png create mode 100644 media/icons/ego-mu-set-background.png create mode 100644 media/icons/ego-mu-set-font.png create mode 100644 media/icons/ego-mu-terminal.png create mode 100644 media/icons/ego-mu-tree.png create mode 100644 media/icons/ego-mu-xemacs.png create mode 100644 media/icons/ego-tb-bookmarks.png create mode 100644 media/icons/ego-tb-viewtype.png create mode 100644 media/icons/entice.png create mode 100644 media/icons/fax.png create mode 100644 media/icons/feh.png create mode 100644 media/icons/ferris-mu-audio.png create mode 100644 media/icons/ferris-mu-dir.png create mode 100644 media/icons/ferris-mu-file.png create mode 100644 media/icons/ferris-mu-image.png create mode 100644 media/icons/ferris-mu-medallion-max-size-filler.png create mode 100644 media/icons/ferris-mu-treeicon-max-size-filler.png create mode 100644 media/icons/ferris-mu-video.png create mode 100644 media/icons/ferriscreate.png create mode 100644 media/icons/file.png create mode 100644 media/icons/filter.png create mode 100644 media/icons/find-files-48.png create mode 100644 media/icons/fits.png create mode 100644 media/icons/folder5.png create mode 100644 media/icons/fulltextindex.png create mode 100644 media/icons/fulltextindexlucene.png create mode 100644 media/icons/fulltextindexodbc.png create mode 100644 media/icons/games.png create mode 100644 media/icons/gif.png create mode 100644 media/icons/gimp.png create mode 100644 media/icons/gnome-ccbackground.png create mode 100644 media/icons/gnome-video-quicktime-36.png create mode 100644 media/icons/gqview-48.png create mode 100644 media/icons/gthumb.png create mode 100644 media/icons/h.png create mode 100644 media/icons/hardlink.png create mode 100644 media/icons/hh.png create mode 100644 media/icons/home.png create mode 100644 media/icons/html.png create mode 100644 media/icons/i-blockdev.png create mode 100644 media/icons/i-cdrom-36.png create mode 100644 media/icons/i-cdrom.png create mode 100644 media/icons/i-directory-36.png create mode 100644 media/icons/i-dvd-36.png create mode 100644 media/icons/i-harddisk.png create mode 100644 media/icons/i-symlink-36.png create mode 100644 media/icons/image.png create mode 100644 media/icons/jpeg.png create mode 100644 media/icons/md.png create mode 100644 media/icons/misc.png create mode 100644 media/icons/mm-directory.png create mode 100644 media/icons/mng.png create mode 100644 media/icons/moonstone.png create mode 100644 media/icons/mp3.png create mode 100644 media/icons/mpeg.png create mode 100644 media/icons/mpg.png create mode 100644 media/icons/mplayer.png create mode 100644 media/icons/music-directory.png create mode 100644 media/icons/new-bookmark.png create mode 100644 media/icons/ogg.png create mode 100644 media/icons/ok-blur.png create mode 100644 media/icons/ok.png create mode 100644 media/icons/open.png create mode 100644 media/icons/openurl.png create mode 100644 media/icons/pcx.png create mode 100644 media/icons/pdf.png create mode 100644 media/icons/ping-tb.png create mode 100644 media/icons/plain.png create mode 100644 media/icons/png.png create mode 100644 media/icons/pnm.png create mode 100644 media/icons/ps.png create mode 100644 media/icons/psd.png create mode 100644 media/icons/queryview.png create mode 100644 media/icons/recorder-48.png create mode 100644 media/icons/red-switch.png create mode 100644 media/icons/search.png create mode 100644 media/icons/serversocket.png create mode 100644 media/icons/sgi.png create mode 100644 media/icons/sgml.png create mode 100644 media/icons/sh.png create mode 100644 media/icons/socket.png create mode 100644 media/icons/softlink.png create mode 100644 media/icons/special.png create mode 100644 media/icons/sql.png create mode 100644 media/icons/sun.png create mode 100644 media/icons/svg.png create mode 100644 media/icons/table.png create mode 100644 media/icons/terminal.png create mode 100644 media/icons/text-plain.png create mode 100644 media/icons/text.png create mode 100644 media/icons/tga.png create mode 100644 media/icons/tiff.png create mode 100644 media/icons/tmp.png create mode 100644 media/icons/tool.png create mode 100644 media/icons/tuple.png create mode 100644 media/icons/unknown.png create mode 100644 media/icons/video-dir.png create mode 100644 media/icons/video-quicktime.png create mode 100644 media/icons/video.png create mode 100644 media/icons/volume2-48.png create mode 100644 media/icons/wav.png create mode 100644 media/icons/xemacs.png create mode 100644 media/icons/xml.png create mode 100644 media/icons/xmms.png create mode 100644 media/icons/zip-dir.png create mode 100644 media/xslt/Makefile.am create mode 100644 media/xslt/Makefile.in create mode 100644 media/xslt/ferris-fca-tree-to-relation-browser-cleanup.xsl create mode 100644 media/xslt/ferris-fca-tree-to-relation-browser.xsl create mode 100644 media/xslt/ferris-geospatial-emblems-to-kml.xsl create mode 100644 media/xslt/ferris-kml-fragment-to-geospatial-emblems.xsl create mode 100644 media/xslt/ferris-kml-to-geospatial-emblems.xsl create mode 100644 media/xslt/flatten-kml-to-sql.xsl create mode 100644 media/xslt/flatten-kml-with-crumbs.xsl create mode 100644 mg/Makefile.am create mode 100644 mg/Makefile.in create mode 100644 mg/bitio_gen.c create mode 100644 mg/bitio_gen.h create mode 100644 mg/bitio_m.h create mode 100644 mg/bitio_m_mem.h create mode 100644 mg/bitio_m_mems.h create mode 100644 mg/bitio_m_random.h create mode 100644 mg/bitio_mem.c create mode 100644 mg/bitio_mem.h create mode 100644 mg/bitio_mems.c create mode 100644 mg/bitio_mems.h create mode 100644 mg/bitio_random.c create mode 100644 mg/bitio_random.h create mode 100644 mg/longlong.h create mode 100644 mg/memlib.c create mode 100644 mg/memlib.h create mode 100644 mg/pathmax.h create mode 100644 mg/stem.c create mode 100644 mg/stem.h create mode 100644 mg/sysfuncs.h create mode 100644 migration/Makefile.am create mode 100644 migration/Makefile.in create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 noarch/Makefile.am create mode 100644 noarch/Makefile.in create mode 100644 noarch/libferris-emacs.el create mode 100644 patches/Makefile.am create mode 100644 patches/Makefile.in create mode 100644 patches/README create mode 100644 patches/tramp-2.1.17-ferris.patch create mode 100644 perl/FerrisCommonMod.pm create mode 100644 perl/Makefile.am create mode 100644 perl/Makefile.in create mode 100644 plugins/Makefile.am create mode 100644 plugins/Makefile.in create mode 100644 plugins/astext/Makefile.am create mode 100644 plugins/astext/Makefile.in create mode 100644 plugins/astext/djvu/Makefile.am create mode 100644 plugins/astext/djvu/Makefile.in create mode 100644 plugins/astext/djvu/libastextdjvu.cpp create mode 100644 plugins/astext/extern/Makefile.am create mode 100644 plugins/astext/extern/Makefile.in create mode 100644 plugins/astext/extern/libastextextern.cpp create mode 100755 plugins/astext/extern/libferris-astext-extern-extractor-koffice.sh create mode 100755 plugins/astext/extern/libferris-astext-extern-extractor-oo.sh create mode 100755 plugins/astext/extern/libferris-astext-extern-extractor-ps.sh create mode 100755 plugins/astext/extern/libferris-astext-extern-extractor-rtf.sh create mode 100755 plugins/astext/extern/libferris-astext-extern-extractor-tex.sh create mode 100644 plugins/astext/html/Makefile.am create mode 100644 plugins/astext/html/Makefile.in create mode 100644 plugins/astext/html/libastexthtml.cpp create mode 100644 plugins/astext/man/Makefile.am create mode 100644 plugins/astext/man/Makefile.in create mode 100644 plugins/astext/man/libastextman.cpp create mode 100644 plugins/astext/msdoc/Makefile.am create mode 100644 plugins/astext/msdoc/Makefile.in create mode 100644 plugins/astext/msdoc/libastextwv.cpp create mode 100644 plugins/astext/pdf/Makefile.am create mode 100644 plugins/astext/pdf/Makefile.in create mode 100644 plugins/astext/pdf/libastextpdf.cpp create mode 100644 plugins/context/FerrisContextPlugin.hh create mode 100644 plugins/context/Makefile.am create mode 100644 plugins/context/Makefile.in create mode 100644 plugins/context/amarok/Makefile.am create mode 100644 plugins/context/amarok/Makefile.in create mode 100644 plugins/context/amarok/dbus-extra-types.hh create mode 100644 plugins/context/amarok/libferrisamarok.cpp create mode 100644 plugins/context/amarok/libferrisamarok_factory.cpp create mode 100644 plugins/context/amarok/player_interface.cpp create mode 100644 plugins/context/amarok/player_interface.xml create mode 100644 plugins/context/amarok/tracklist_interface.cpp create mode 100644 plugins/context/amarok/tracklist_interface.xml create mode 100644 plugins/context/annodex/Makefile.am create mode 100644 plugins/context/annodex/Makefile.in create mode 100644 plugins/context/annodex/libferrisannodex.cpp create mode 100644 plugins/context/annodex/libferrisannodex_factory.cpp create mode 100644 plugins/context/bibtex/Makefile.am create mode 100644 plugins/context/bibtex/Makefile.in create mode 100644 plugins/context/bibtex/libferrisbibtex.cpp create mode 100644 plugins/context/bibtex/libferrisbibtex_factory.cpp create mode 100644 plugins/context/commondbapi/Makefile.am create mode 100644 plugins/context/commondbapi/Makefile.in create mode 100644 plugins/context/commondbapi/gdbm.h create mode 100644 plugins/context/commondbapi/libcommondbapi.cpp create mode 100644 plugins/context/commondbapi/libcommondbapi.hh create mode 100644 plugins/context/commonsqldbapi/Makefile.am create mode 100644 plugins/context/commonsqldbapi/Makefile.in create mode 100644 plugins/context/commonsqldbapi/libcommonsqldbapi.cpp create mode 100644 plugins/context/commonsqldbapi/libcommonsqldbapi.hh create mode 100644 plugins/context/db4/Makefile.am create mode 100644 plugins/context/db4/Makefile.in create mode 100644 plugins/context/db4/libferrisdb4.cpp create mode 100644 plugins/context/db4/libferrisdb4_factory.cpp create mode 100644 plugins/context/dbus/Makefile.am create mode 100644 plugins/context/dbus/Makefile.in create mode 100644 plugins/context/dbus/libferrisdbus.cpp create mode 100644 plugins/context/dbus/libferrisdbus_factory.cpp create mode 100644 plugins/context/dbxml/Makefile.am create mode 100644 plugins/context/dbxml/Makefile.in create mode 100644 plugins/context/dbxml/dbxmlwrappers.hh create mode 100644 plugins/context/dbxml/libferrisdbxml.cpp create mode 100644 plugins/context/dbxml/libferrisdbxml_factory.cpp create mode 100644 plugins/context/dtl/Makefile.am create mode 100644 plugins/context/dtl/Makefile.in create mode 100644 plugins/context/dtl/libferrisdtl.cpp create mode 100644 plugins/context/dtl/libferrisdtl_factory.cpp create mode 100644 plugins/context/dtl/libferrisdtlshared.cpp create mode 100644 plugins/context/dtl/libferrisdtlshared.hh create mode 100644 plugins/context/dvdread/Makefile.am create mode 100644 plugins/context/dvdread/Makefile.in create mode 100644 plugins/context/dvdread/libferrisdvdread.cpp create mode 100644 plugins/context/dvdread/libferrisdvdread_factory.cpp create mode 100644 plugins/context/edb/Makefile.am create mode 100644 plugins/context/edb/Makefile.in create mode 100644 plugins/context/edb/libedb.cpp create mode 100644 plugins/context/edb/libedb_factory.cpp create mode 100644 plugins/context/eet/Makefile.am create mode 100644 plugins/context/eet/Makefile.in create mode 100644 plugins/context/eet/libferriseet.cpp create mode 100644 plugins/context/eet/libferriseet_factory.cpp create mode 100644 plugins/context/emacs/Makefile.am create mode 100644 plugins/context/emacs/Makefile.in create mode 100644 plugins/context/emacs/libferrisemacs.cpp create mode 100644 plugins/context/emacs/libferrisemacs.hh.in create mode 100644 plugins/context/emacs/libferrisemacs_factory.cpp create mode 100644 plugins/context/evolution/Makefile.am create mode 100644 plugins/context/evolution/Makefile.in create mode 100644 plugins/context/evolution/libferrisevolution.cpp create mode 100644 plugins/context/evolution/libferrisevolution_factory.cpp create mode 100644 plugins/context/external/Makefile.am create mode 100644 plugins/context/external/Makefile.in create mode 100644 plugins/context/external/extfs_modules/FerrisExtMod.pm create mode 100644 plugins/context/external/extfs_modules/Makefile.am create mode 100644 plugins/context/external/extfs_modules/Makefile.in create mode 100755 plugins/context/external/extfs_modules/rpmfile create mode 100644 plugins/context/external/extfs_modules/ssh create mode 100755 plugins/context/external/extfs_modules/ssh.in create mode 100755 plugins/context/external/extfs_modules/tar create mode 100755 plugins/context/external/extfs_modules/zip create mode 100644 plugins/context/external/libexternal.cpp create mode 100644 plugins/context/external/libexternal_factory.cpp create mode 100644 plugins/context/external/libssh_factory.cpp create mode 100644 plugins/context/external/mapping.cpp create mode 100644 plugins/context/external/mapping.cpp.in create mode 100644 plugins/context/external/mapping.hh create mode 100644 plugins/context/facebook/Makefile.am create mode 100644 plugins/context/facebook/Makefile.in create mode 100644 plugins/context/facebook/facebooktest.cpp create mode 100644 plugins/context/facebook/libferrisfacebook.cpp create mode 100644 plugins/context/facebook/libferrisfacebook_factory.cpp create mode 100644 plugins/context/facebook/libferrisfacebook_shared.cpp create mode 100644 plugins/context/facebook/libferrisfacebook_shared.hh create mode 100644 plugins/context/firefox/Makefile.am create mode 100644 plugins/context/firefox/Makefile.in create mode 100644 plugins/context/firefox/firefox-extension/Makefile.am create mode 100644 plugins/context/firefox/firefox-extension/Makefile.in create mode 100644 plugins/context/firefox/firefox-extension/chrome.manifest create mode 100644 plugins/context/firefox/firefox-extension/chrome/libferrismount/content/about.xul create mode 100644 plugins/context/firefox/firefox-extension/chrome/libferrismount/content/contents.rdf create mode 100644 plugins/context/firefox/firefox-extension/chrome/libferrismount/content/libferrismountOverlay.js create mode 100644 plugins/context/firefox/firefox-extension/chrome/libferrismount/content/libferrismountOverlay.xul create mode 100644 plugins/context/firefox/firefox-extension/install.rdf create mode 100644 plugins/context/firefox/firefox-extension/skin/classic/libferrismount/contents.rdf create mode 100644 plugins/context/firefox/firefox-extension/skin/classic/libferrismount/libferris.png create mode 100644 plugins/context/firefox/libferrisfirefox.cpp create mode 100644 plugins/context/firefox/libferrisfirefox_factory.cpp create mode 100644 plugins/context/gdbm/Makefile.am create mode 100644 plugins/context/gdbm/Makefile.in create mode 100644 plugins/context/gdbm/gdbmaker.cpp create mode 100644 plugins/context/gdbm/libferrisgdbm.cpp create mode 100644 plugins/context/gdbm/libferrisgdbm_factory.cpp create mode 100644 plugins/context/google/Makefile.am create mode 100644 plugins/context/google/Makefile.in create mode 100644 plugins/context/google/googletest.cpp create mode 100644 plugins/context/google/libferrisgoogle.cpp create mode 100644 plugins/context/google/libferrisgoogle_factory.cpp create mode 100644 plugins/context/google/libferrisgoogle_shared.cpp create mode 100644 plugins/context/google/libferrisgoogle_shared.hh create mode 100644 plugins/context/gphoto2/Makefile.am create mode 100644 plugins/context/gphoto2/Makefile.in create mode 100644 plugins/context/gphoto2/libferrisgphoto2.cpp create mode 100644 plugins/context/gphoto2/libferrisgphoto2_factory.cpp create mode 100644 plugins/context/gstreamer/Makefile.am create mode 100644 plugins/context/gstreamer/Makefile.in create mode 100644 plugins/context/gstreamer/gstreamertest.cpp create mode 100644 plugins/context/gstreamer/libferrisgstreamer.cpp create mode 100644 plugins/context/gstreamer/libferrisgstreamer_factory.cpp create mode 100644 plugins/context/gstreamer/libferrisgstreamer_shared.cpp create mode 100644 plugins/context/gstreamer/libferrisgstreamer_shared.hh create mode 100644 plugins/context/hal/Makefile.am create mode 100644 plugins/context/hal/Makefile.in create mode 100644 plugins/context/hal/libferrishal.cpp create mode 100644 plugins/context/hal/libferrishal_factory.cpp create mode 100644 plugins/context/hal/libferrishal_private.hh create mode 100644 plugins/context/identica/Makefile.am create mode 100644 plugins/context/identica/Makefile.in create mode 100644 plugins/context/identica/libferrisidentica.cpp create mode 100644 plugins/context/identica/libferrisidentica_factory.cpp create mode 100644 plugins/context/identica/libferrisidentica_shared.cpp create mode 100644 plugins/context/identica/libferrisidentica_shared.hh create mode 100644 plugins/context/ipc/Makefile.am create mode 100644 plugins/context/ipc/Makefile.in create mode 100644 plugins/context/ipc/libipc.cpp create mode 100644 plugins/context/ipc/libipc_factory.cpp create mode 100644 plugins/context/ldap/Makefile.am create mode 100644 plugins/context/ldap/Makefile.in create mode 100644 plugins/context/ldap/libferrisldap.cpp create mode 100644 plugins/context/ldap/libferrisldap_factory.cpp create mode 100644 plugins/context/ldap/libferrisldapshared.cpp create mode 100644 plugins/context/ldap/libferrisldapshared.hh create mode 100644 plugins/context/libmpeg3/Makefile.am create mode 100644 plugins/context/libmpeg3/Makefile.in create mode 100644 plugins/context/libmpeg3/libmpeg3.cpp create mode 100644 plugins/context/libmpeg3/libmpeg3_factory.cpp create mode 100644 plugins/context/nativembox/Makefile.am create mode 100644 plugins/context/nativembox/Makefile.in create mode 100644 plugins/context/nativembox/libnativembox.cpp create mode 100644 plugins/context/nativembox/libnativembox_factory.cpp create mode 100644 plugins/context/nativembox/mbox.cpp create mode 100644 plugins/context/obby/Makefile.am create mode 100644 plugins/context/obby/Makefile.in create mode 100644 plugins/context/obby/gselectorglib.hh create mode 100644 plugins/context/obby/libferrisobby.cpp create mode 100644 plugins/context/obby/libferrisobby_factory.cpp create mode 100644 plugins/context/obby/libferrisobbyshared.cpp create mode 100644 plugins/context/obby/libferrisobbyshared.hh create mode 100644 plugins/context/pastebin/Makefile.am create mode 100644 plugins/context/pastebin/Makefile.in create mode 100644 plugins/context/pastebin/libferrispastebin.cpp create mode 100644 plugins/context/pastebin/libferrispastebin_factory.cpp create mode 100644 plugins/context/pastebin/libferrispastebinshared.cpp create mode 100644 plugins/context/pastebin/libferrispastebinshared.hh create mode 100644 plugins/context/plasma/Makefile.am create mode 100644 plugins/context/plasma/Makefile.in create mode 100644 plugins/context/plasma/libferrisplasma.cpp create mode 100644 plugins/context/plasma/libferrisplasma_factory.cpp create mode 100644 plugins/context/plasma/mocimpls.cpp create mode 100644 plugins/context/postgresql/Makefile.am create mode 100644 plugins/context/postgresql/Makefile.in create mode 100644 plugins/context/postgresql/libferrispostgresql.cpp create mode 100644 plugins/context/postgresql/libferrispostgresql_factory.cpp create mode 100644 plugins/context/postgresql/libferrispostgresqlshared.cpp create mode 100644 plugins/context/postgresql/libferrispostgresqlshared.hh create mode 100644 plugins/context/printer/Makefile.am create mode 100644 plugins/context/printer/Makefile.in create mode 100644 plugins/context/printer/libferrisprinter.cpp create mode 100644 plugins/context/printer/libferrisprinter_factory.cpp create mode 100644 plugins/context/printer/mocimpls.cpp create mode 100644 plugins/context/pulseaudio/Makefile.am create mode 100644 plugins/context/pulseaudio/Makefile.in create mode 100644 plugins/context/pulseaudio/libferrispulseaudio.cpp create mode 100644 plugins/context/pulseaudio/libferrispulseaudio_factory.cpp create mode 100644 plugins/context/qtftp/Makefile.am create mode 100644 plugins/context/qtftp/Makefile.in create mode 100644 plugins/context/qtftp/libferrisqtftp.cpp create mode 100644 plugins/context/qtftp/libferrisqtftp_factory.cpp create mode 100644 plugins/context/qtftp/mocimpls.cpp create mode 100644 plugins/context/qthttp/Makefile.am create mode 100644 plugins/context/qthttp/Makefile.in create mode 100644 plugins/context/qthttp/libferrisqthttp.cpp create mode 100644 plugins/context/qthttp/libferrisqthttp_factory.cpp create mode 100644 plugins/context/qthttp/mocimpls.cpp create mode 100644 plugins/context/qtsql/Makefile.am create mode 100644 plugins/context/qtsql/Makefile.in create mode 100644 plugins/context/qtsql/libferrisqtsql.cpp create mode 100644 plugins/context/qtsql/libferrisqtsql_factory.cpp create mode 100644 plugins/context/qtsql/libferrisqtsqlshared.cpp create mode 100644 plugins/context/qtsql/libferrisqtsqlshared.hh create mode 100644 plugins/context/recordfile/Makefile.am create mode 100644 plugins/context/recordfile/Makefile.in create mode 100644 plugins/context/recordfile/libferrisrecordfile.cpp create mode 100644 plugins/context/recordfile/libferrisrecordfile_factory.cpp create mode 100644 plugins/context/sane/Makefile.am create mode 100644 plugins/context/sane/Makefile.in create mode 100644 plugins/context/sane/libferrissane.cpp create mode 100644 plugins/context/sane/libferrissane_factory.cpp create mode 100644 plugins/context/sane/mocimpls.cpp create mode 100644 plugins/context/sockets/Makefile.am create mode 100644 plugins/context/sockets/Makefile.in create mode 100644 plugins/context/sockets/libsocket.cpp create mode 100644 plugins/context/sockets/libsocket_factory.cpp create mode 100644 plugins/context/soprano/Makefile.am create mode 100644 plugins/context/soprano/Makefile.in create mode 100644 plugins/context/soprano/libferrissoprano.cpp create mode 100644 plugins/context/soprano/libferrissoprano_factory.cpp create mode 100644 plugins/context/spirit/Makefile.am create mode 100644 plugins/context/spirit/Makefile.in create mode 100644 plugins/context/spirit/SpiritContext.hh create mode 100644 plugins/context/spirit/ffilter/Makefile.am create mode 100644 plugins/context/spirit/ffilter/Makefile.in create mode 100644 plugins/context/spirit/ffilter/ffiltertest.cpp create mode 100644 plugins/context/spirit/ffilter/libffilterspirit.cpp create mode 100644 plugins/context/spirit/ffilter/libffilterspirit_factory.cpp create mode 100644 plugins/context/spirit/fulltextboolean/Makefile.am create mode 100644 plugins/context/spirit/fulltextboolean/Makefile.in create mode 100644 plugins/context/spirit/fulltextboolean/libfulltextbooleanspirit.cpp create mode 100644 plugins/context/spirit/fulltextboolean/libfulltextbooleanspirit_factory.cpp create mode 100644 plugins/context/spirit/fulltextboolean/testapp.cpp create mode 100644 plugins/context/sqlplus/Makefile.am create mode 100644 plugins/context/sqlplus/Makefile.in create mode 100644 plugins/context/sqlplus/libferrissqlplus.cpp create mode 100644 plugins/context/sqlplus/libferrissqlplus_factory.cpp create mode 100644 plugins/context/sqlplus/libferrissqlplusshared.cpp create mode 100644 plugins/context/sqlplus/libferrissqlplusshared.hh create mode 100644 plugins/context/tdb/Makefile.am create mode 100644 plugins/context/tdb/Makefile.in create mode 100644 plugins/context/tdb/libferristdb.cpp create mode 100644 plugins/context/tdb/libferristdb_factory.cpp create mode 100644 plugins/context/tdb/tdbmaker.cpp create mode 100644 plugins/context/upnp/Makefile.am create mode 100644 plugins/context/upnp/Makefile.in create mode 100644 plugins/context/upnp/libferrisplatinum.cpp create mode 100644 plugins/context/upnp/libferrisplatinum_factory.cpp create mode 100644 plugins/context/vimeo/Makefile.am create mode 100644 plugins/context/vimeo/Makefile.in create mode 100644 plugins/context/vimeo/libferrisvimeo.cpp create mode 100644 plugins/context/vimeo/libferrisvimeo_factory.cpp create mode 100644 plugins/context/vimeo/libferrisvimeo_shared.cpp create mode 100644 plugins/context/vimeo/libferrisvimeo_shared.hh create mode 100644 plugins/context/vimeo/vimeotest.cpp create mode 100644 plugins/context/webphotos/Makefile.am create mode 100644 plugins/context/webphotos/Makefile.in create mode 100644 plugins/context/webphotos/ferris-webphoto-remote-url-to-eaindex-predicate.cpp create mode 100644 plugins/context/webphotos/ferris-webphoto-upload.cpp create mode 100644 plugins/context/webphotos/libferriswebphotos.cpp create mode 100644 plugins/context/webphotos/libferriswebphotos_factory.cpp create mode 100644 plugins/context/webphotos/libferriswebphotos_shared.cpp create mode 100644 plugins/context/webphotos/libferriswebphotos_shared.hh create mode 100644 plugins/context/webphotos/webphotostest.cpp create mode 100644 plugins/context/wiki/Makefile.am create mode 100644 plugins/context/wiki/Makefile.in create mode 100644 plugins/context/wiki/libferriswiki.cpp create mode 100644 plugins/context/wiki/libferriswiki_factory.cpp create mode 100644 plugins/context/wiki/libferriswikishared.cpp create mode 100644 plugins/context/wiki/libferriswikishared.hh create mode 100644 plugins/context/xml/Makefile.am create mode 100644 plugins/context/xml/Makefile.in create mode 100644 plugins/context/xml/libxml.cpp create mode 100644 plugins/context/xml/libxml_factory.cpp create mode 100644 plugins/context/xmms/Makefile.am create mode 100644 plugins/context/xmms/Makefile.in create mode 100644 plugins/context/xmms/libferrisxmms.cpp create mode 100644 plugins/context/xmms/libferrisxmms_factory.cpp create mode 100644 plugins/context/xsltfs/Makefile.am create mode 100644 plugins/context/xsltfs/Makefile.in create mode 100644 plugins/context/xsltfs/libferrisxsltfs.cpp create mode 100644 plugins/context/xsltfs/libferrisxsltfs_factory.cpp create mode 100644 plugins/context/xwin/Makefile.am create mode 100644 plugins/context/xwin/Makefile.in create mode 100644 plugins/context/xwin/klipper_interface.cpp create mode 100644 plugins/context/xwin/klipper_interface.xml create mode 100644 plugins/context/xwin/klipper_interface_public.hh create mode 100644 plugins/context/xwin/libferrisxwin.cpp create mode 100644 plugins/context/xwin/libferrisxwin_ecore.cpp create mode 100644 plugins/context/xwin/libferrisxwin_ecore.hh create mode 100644 plugins/context/xwin/libferrisxwin_factory.cpp create mode 100644 plugins/context/xwin/libferrisxwin_klipper.cpp create mode 100644 plugins/context/xwin/libferrisxwin_klipper.hh create mode 100644 plugins/creation/Makefile.am create mode 100644 plugins/creation/Makefile.in create mode 100644 plugins/creation/db4/Makefile.am create mode 100644 plugins/creation/db4/Makefile.in create mode 100644 plugins/creation/db4/libcreationdb4.cpp create mode 100644 plugins/creation/dbxml/Makefile.am create mode 100644 plugins/creation/dbxml/Makefile.in create mode 100644 plugins/creation/dbxml/libcreationdbxml.cpp create mode 100644 plugins/creation/devsource/Makefile.am create mode 100644 plugins/creation/devsource/Makefile.in create mode 100644 plugins/creation/devsource/libcreationdevsource.cpp create mode 100644 plugins/creation/eaindex/Makefile.am create mode 100644 plugins/creation/eaindex/Makefile.in create mode 100644 plugins/creation/eaindex/libcreationeaindex.cpp create mode 100644 plugins/creation/eaindex/libcreationeaindexdb4tree.cpp create mode 100644 plugins/creation/eaindex/libcreationeaindexnull.cpp create mode 100644 plugins/creation/eaindexgeneric/Makefile.am create mode 100644 plugins/creation/eaindexgeneric/Makefile.in create mode 100644 plugins/creation/eaindexgeneric/libcreationeaindexgeneric.cpp create mode 100644 plugins/creation/fulltextindex/Makefile.am create mode 100644 plugins/creation/fulltextindex/Makefile.in create mode 100644 plugins/creation/fulltextindex/libcreationfulltextindex.cpp create mode 100644 plugins/creation/fulltextindexgeneric/Makefile.am create mode 100644 plugins/creation/fulltextindexgeneric/Makefile.in create mode 100644 plugins/creation/fulltextindexgeneric/libcreationfulltextindexgeneric.cpp create mode 100644 plugins/creation/gdbm/Makefile.am create mode 100644 plugins/creation/gdbm/Makefile.in create mode 100644 plugins/creation/gdbm/libcreationgdbm.cpp create mode 100644 plugins/creation/magickimage/Makefile.am create mode 100644 plugins/creation/magickimage/Makefile.in create mode 100644 plugins/creation/magickimage/libcreationmagick.cpp create mode 100644 plugins/creation/markup/Makefile.am create mode 100644 plugins/creation/markup/Makefile.in create mode 100644 plugins/creation/markup/libcreationmarkup.cpp create mode 100644 plugins/creation/mng/Makefile.am create mode 100644 plugins/creation/mng/Makefile.in create mode 100644 plugins/creation/mng/libcreationmng.cpp create mode 100644 plugins/creation/mp3/Makefile.am create mode 100644 plugins/creation/mp3/Makefile.in create mode 100644 plugins/creation/mp3/libcreationmp3.cpp create mode 100644 plugins/creation/mpeg2/Makefile.am create mode 100644 plugins/creation/mpeg2/Makefile.in create mode 100644 plugins/creation/mpeg2/libcreationmpeg2.cpp create mode 100644 plugins/creation/ogg/Makefile.am create mode 100644 plugins/creation/ogg/Makefile.in create mode 100644 plugins/creation/ogg/libcreationogg.cpp create mode 100644 plugins/creation/shellscript/Makefile.am create mode 100644 plugins/creation/shellscript/Makefile.in create mode 100644 plugins/creation/shellscript/libcreationshellscript.cpp create mode 100644 plugins/creation/soprano/Makefile.am create mode 100644 plugins/creation/soprano/Makefile.in create mode 100644 plugins/creation/soprano/libcreationsopranoredland.cpp create mode 100644 plugins/creation/tdb/Makefile.am create mode 100644 plugins/creation/tdb/Makefile.in create mode 100644 plugins/creation/tdb/libcreationtdb.cpp create mode 100644 plugins/creation/wav/Makefile.am create mode 100644 plugins/creation/wav/Makefile.in create mode 100644 plugins/creation/wav/libcreationwav.cpp create mode 100644 plugins/eagenerators/FerrisEAPlugin.hh create mode 100644 plugins/eagenerators/Makefile.am create mode 100644 plugins/eagenerators/Makefile.in create mode 100644 plugins/eagenerators/a52/Makefile.am create mode 100644 plugins/eagenerators/a52/Makefile.in create mode 100644 plugins/eagenerators/a52/libferrisa52.cpp create mode 100644 plugins/eagenerators/djvu/Makefile.am create mode 100644 plugins/eagenerators/djvu/Makefile.in create mode 100644 plugins/eagenerators/djvu/libferrisdjvulibre.cpp create mode 100644 plugins/eagenerators/exif/Makefile.am create mode 100644 plugins/eagenerators/exif/Makefile.in create mode 100644 plugins/eagenerators/exif/jpeg-data.c create mode 100644 plugins/eagenerators/exif/jpeg-data.h create mode 100644 plugins/eagenerators/exif/jpeg-marker.c create mode 100644 plugins/eagenerators/exif/jpeg-marker.h create mode 100644 plugins/eagenerators/exif/libferrisexifea.cpp create mode 100644 plugins/eagenerators/flac/Makefile.am create mode 100644 plugins/eagenerators/flac/Makefile.in create mode 100644 plugins/eagenerators/flac/libferrisflac.cpp create mode 100644 plugins/eagenerators/fspot/Makefile.am create mode 100644 plugins/eagenerators/fspot/Makefile.in create mode 100644 plugins/eagenerators/fspot/libferrisfspot.cpp create mode 100644 plugins/eagenerators/gimp/Makefile.am create mode 100644 plugins/eagenerators/gimp/Makefile.in create mode 100644 plugins/eagenerators/gimp/libgimp.cpp create mode 100644 plugins/eagenerators/id3/Makefile.am create mode 100644 plugins/eagenerators/id3/Makefile.in create mode 100644 plugins/eagenerators/id3/libferrisid3.cpp create mode 100644 plugins/eagenerators/imlib2/Makefile.am create mode 100644 plugins/eagenerators/imlib2/Makefile.in create mode 100644 plugins/eagenerators/imlib2/libimlib2.cpp create mode 100644 plugins/eagenerators/jasper/Makefile.am create mode 100644 plugins/eagenerators/jasper/Makefile.in create mode 100644 plugins/eagenerators/jasper/libferrisjasper.cpp create mode 100644 plugins/eagenerators/jpeg/Makefile.am create mode 100644 plugins/eagenerators/jpeg/Makefile.in create mode 100644 plugins/eagenerators/jpeg/libferrisjpeg.cpp create mode 100644 plugins/eagenerators/kde3metadata/Makefile.am create mode 100644 plugins/eagenerators/kde3metadata/Makefile.in create mode 100644 plugins/eagenerators/kde3metadata/libferriskde3metadata.cpp create mode 100644 plugins/eagenerators/libextractor/Makefile.am create mode 100644 plugins/eagenerators/libextractor/Makefile.in create mode 100644 plugins/eagenerators/libextractor/libferrisextractor.cpp create mode 100644 plugins/eagenerators/libmpeg3/Makefile.am create mode 100644 plugins/eagenerators/libmpeg3/Makefile.in create mode 100644 plugins/eagenerators/libmpeg3/libferrismpeg3.cpp create mode 100644 plugins/eagenerators/magick/Makefile.am create mode 100644 plugins/eagenerators/magick/Makefile.in create mode 100644 plugins/eagenerators/magick/libmagick.cpp create mode 100644 plugins/eagenerators/mediainfo/Makefile.am create mode 100644 plugins/eagenerators/mediainfo/Makefile.in create mode 100644 plugins/eagenerators/mediainfo/libferrismediainfo.cpp create mode 100644 plugins/eagenerators/mpeg2/Makefile.am create mode 100644 plugins/eagenerators/mpeg2/Makefile.in create mode 100644 plugins/eagenerators/mpeg2/libferrismpeg2.cpp create mode 100644 plugins/eagenerators/oggz/Makefile.am create mode 100644 plugins/eagenerators/oggz/Makefile.in create mode 100644 plugins/eagenerators/oggz/libferrisoggz.cpp create mode 100644 plugins/eagenerators/png/Makefile.am create mode 100644 plugins/eagenerators/png/Makefile.in create mode 100644 plugins/eagenerators/png/libferrispng.cpp create mode 100644 plugins/eagenerators/soprano/Makefile.am create mode 100644 plugins/eagenerators/soprano/Makefile.in create mode 100644 plugins/eagenerators/soprano/libferrissoprano.cpp create mode 100644 plugins/eagenerators/soprano/libferrissopranoeashared.cpp create mode 100644 plugins/eagenerators/soprano/libferrissopranoeashared.hh create mode 100644 plugins/eagenerators/strigi/Makefile.am create mode 100644 plugins/eagenerators/strigi/Makefile.in create mode 100644 plugins/eagenerators/strigi/libferrisstrigi.cpp create mode 100644 plugins/eagenerators/subtitles/Makefile.am create mode 100644 plugins/eagenerators/subtitles/Makefile.in create mode 100644 plugins/eagenerators/subtitles/libferrissubtitles.cpp create mode 100644 plugins/eagenerators/taglib/Makefile.am create mode 100644 plugins/eagenerators/taglib/Makefile.in create mode 100644 plugins/eagenerators/taglib/libferristaglib.cpp create mode 100644 plugins/eagenerators/xfsnative/Makefile.am create mode 100644 plugins/eagenerators/xfsnative/Makefile.in create mode 100644 plugins/eagenerators/xfsnative/libxfsnative.cpp create mode 100644 plugins/eagenerators/xine/Makefile.am create mode 100644 plugins/eagenerators/xine/Makefile.in create mode 100644 plugins/eagenerators/xine/libferrisxineea.cpp create mode 100644 plugins/eagenerators/xmp/Makefile.am create mode 100644 plugins/eagenerators/xmp/Makefile.in create mode 100644 plugins/eagenerators/xmp/libferrisxmp.cpp create mode 100644 plugins/eaindexers/Makefile.am create mode 100644 plugins/eaindexers/Makefile.in create mode 100644 plugins/eaindexers/boost/Makefile.am create mode 100644 plugins/eaindexers/boost/Makefile.in create mode 100644 plugins/eaindexers/boost/libeaindexboostmmap.cpp create mode 100644 plugins/eaindexers/boost/libeaindexboostmmap_factory.cpp create mode 100644 plugins/eaindexers/boost/mmap_dynamic_bitset.hpp create mode 100644 plugins/eaindexers/clucene/Makefile.am create mode 100644 plugins/eaindexers/clucene/Makefile.in create mode 100644 plugins/eaindexers/clucene/libeaindexclucene.cpp create mode 100644 plugins/eaindexers/clucene/libeaindexclucene_factory.cpp create mode 100644 plugins/eaindexers/federation/Makefile.am create mode 100644 plugins/eaindexers/federation/Makefile.in create mode 100644 plugins/eaindexers/federation/libeaindexfederation.cpp create mode 100644 plugins/eaindexers/federation/libeaindexfederation_factory.cpp create mode 100644 plugins/eaindexers/ldap/Makefile.am create mode 100644 plugins/eaindexers/ldap/Makefile.in create mode 100644 plugins/eaindexers/ldap/libeaindexldap.cpp create mode 100644 plugins/eaindexers/ldap/libeaindexldap.hh create mode 100644 plugins/eaindexers/ldap/libeaindexldap_factory.cpp create mode 100644 plugins/eaindexers/lucene/Makefile.am create mode 100644 plugins/eaindexers/lucene/Makefile.in create mode 100644 plugins/eaindexers/lucene/libeaindexlucene.cpp create mode 100644 plugins/eaindexers/lucene/libeaindexlucene_factory.cpp create mode 100644 plugins/eaindexers/null/Makefile.am create mode 100644 plugins/eaindexers/null/Makefile.in create mode 100644 plugins/eaindexers/null/libeaindexnull.cpp create mode 100644 plugins/eaindexers/null/libeaindexnull_factory.cpp create mode 100644 plugins/eaindexers/odbc/Makefile.am create mode 100644 plugins/eaindexers/odbc/Makefile.in create mode 100644 plugins/eaindexers/odbc/libeaindexodbc.cpp create mode 100644 plugins/eaindexers/odbc/libeaindexodbc_factory.cpp create mode 100644 plugins/eaindexers/postgresql/Makefile.am create mode 100644 plugins/eaindexers/postgresql/Makefile.in create mode 100644 plugins/eaindexers/postgresql/libeaindexpostgresql.cpp create mode 100644 plugins/eaindexers/postgresql/libeaindexpostgresql_factory.cpp create mode 100644 plugins/eaindexers/qtsql/Makefile.am create mode 100644 plugins/eaindexers/qtsql/Makefile.in create mode 100644 plugins/eaindexers/qtsql/libeaindexqtsql.cpp create mode 100644 plugins/eaindexers/qtsql/libeaindexqtsql_factory.cpp create mode 100644 plugins/eaindexers/soprano/Makefile.am create mode 100644 plugins/eaindexers/soprano/Makefile.in create mode 100644 plugins/eaindexers/soprano/libeaindexsoprano.cpp create mode 100644 plugins/eaindexers/soprano/libeaindexsoprano_factory.cpp create mode 100644 plugins/eaindexers/xapian/Makefile.am create mode 100644 plugins/eaindexers/xapian/Makefile.in create mode 100644 plugins/eaindexers/xapian/libeaindexxapian.cpp create mode 100644 plugins/eaindexers/xapian/libeaindexxapian_factory.cpp create mode 100644 plugins/fulltextindexers/Makefile.am create mode 100644 plugins/fulltextindexers/Makefile.in create mode 100644 plugins/fulltextindexers/beagle/Makefile.am create mode 100644 plugins/fulltextindexers/beagle/Makefile.in create mode 100644 plugins/fulltextindexers/beagle/libftxidxbeagle.cpp create mode 100644 plugins/fulltextindexers/beagle/libftxidxbeagle_factory.cpp create mode 100644 plugins/fulltextindexers/clucene/Makefile.am create mode 100644 plugins/fulltextindexers/clucene/Makefile.in create mode 100644 plugins/fulltextindexers/clucene/libftxidxclucene.cpp create mode 100644 plugins/fulltextindexers/clucene/libftxidxclucene_factory.cpp create mode 100644 plugins/fulltextindexers/external/FerrisFulltextExternalIndex.pm create mode 100755 plugins/fulltextindexers/external/FerrisFulltextExternalIndexExample.pl create mode 100644 plugins/fulltextindexers/external/Makefile.am create mode 100644 plugins/fulltextindexers/external/Makefile.in create mode 100644 plugins/fulltextindexers/external/libftxidxexternal.cpp create mode 100644 plugins/fulltextindexers/external/libftxidxexternal_factory.cpp create mode 100644 plugins/fulltextindexers/lucene/Makefile.am create mode 100644 plugins/fulltextindexers/lucene/Makefile.in create mode 100644 plugins/fulltextindexers/lucene/MyAnalyzer.java create mode 100644 plugins/fulltextindexers/lucene/libftxidxlucene.cpp create mode 100644 plugins/fulltextindexers/lucene/libftxidxlucene_factory.cpp create mode 100644 plugins/fulltextindexers/null/Makefile.am create mode 100644 plugins/fulltextindexers/null/Makefile.in create mode 100644 plugins/fulltextindexers/null/libftxidxnull.cpp create mode 100644 plugins/fulltextindexers/null/libftxidxnull_factory.cpp create mode 100644 plugins/fulltextindexers/odbc/Makefile.am create mode 100644 plugins/fulltextindexers/odbc/Makefile.in create mode 100644 plugins/fulltextindexers/odbc/ODBCIndexHelper_private.hh create mode 100644 plugins/fulltextindexers/odbc/libftxidxodbc.cpp create mode 100644 plugins/fulltextindexers/odbc/libftxidxodbc_factory.cpp create mode 100644 plugins/fulltextindexers/qtsql/Makefile.am create mode 100644 plugins/fulltextindexers/qtsql/Makefile.in create mode 100644 plugins/fulltextindexers/qtsql/QtSQLIndexHelper_private.hh create mode 100644 plugins/fulltextindexers/qtsql/libftxidxqtsql.cpp create mode 100644 plugins/fulltextindexers/qtsql/libftxidxqtsql_factory.cpp create mode 100644 plugins/fulltextindexers/strigi/Makefile.am create mode 100644 plugins/fulltextindexers/strigi/Makefile.in create mode 100644 plugins/fulltextindexers/strigi/libftxidxstrigi.cpp create mode 100644 plugins/fulltextindexers/strigi/libftxidxstrigi_factory.cpp create mode 100644 plugins/fulltextindexers/tsearch2/Makefile.am create mode 100644 plugins/fulltextindexers/tsearch2/Makefile.in create mode 100644 plugins/fulltextindexers/tsearch2/libftxidxtsearch2.cpp create mode 100644 plugins/fulltextindexers/tsearch2/libftxidxtsearch2_factory.cpp create mode 100644 plugins/fulltextindexers/uniqsorted/Makefile.am create mode 100644 plugins/fulltextindexers/uniqsorted/Makefile.in create mode 100644 plugins/fulltextindexers/uniqsorted/libftxidxuniqsorted.cpp create mode 100644 plugins/fulltextindexers/uniqsorted/libftxidxuniqsorted_factory.cpp create mode 100644 plugins/fulltextindexers/xapian/Makefile.am create mode 100644 plugins/fulltextindexers/xapian/Makefile.in create mode 100644 plugins/fulltextindexers/xapian/libferrisxapianeashared.cpp create mode 100644 plugins/fulltextindexers/xapian/libferrisxapianeashared.hh create mode 100644 plugins/fulltextindexers/xapian/libftxidxxapian.cpp create mode 100644 plugins/fulltextindexers/xapian/libftxidxxapian_factory.cpp create mode 100644 plugins/fulltextindexers/yahoo/Makefile.am create mode 100644 plugins/fulltextindexers/yahoo/Makefile.in create mode 100644 plugins/fulltextindexers/yahoo/libftxidxyahoo.cpp create mode 100644 plugins/fulltextindexers/yahoo/libftxidxyahoo_factory.cpp create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in create mode 100644 tests/comparetoy/Makefile.am create mode 100644 tests/comparetoy/Makefile.in create mode 100644 tests/comparetoy/comparetoy.cpp create mode 100644 tests/contextiostream/Makefile.am create mode 100644 tests/contextiostream/Makefile.in create mode 100644 tests/contextiostream/contextsweep.cpp create mode 100644 tests/contextiterator/Makefile.am create mode 100644 tests/contextiterator/Makefile.in create mode 100644 tests/contextiterator/backwardsweep.cpp create mode 100644 tests/contextiterator/backwardsweepcre.cpp create mode 100644 tests/contextiterator/forwardsweep.cpp create mode 100644 tests/contextiterator/forwardsweepcre.cpp create mode 100644 tests/contextiterator/itemremovedfromunder.cpp create mode 100644 tests/contextiterator/knightrider.cpp create mode 100644 tests/contextiterator/randomover.cpp create mode 100644 tests/extoy/Makefile.am create mode 100644 tests/extoy/Makefile.in create mode 100644 tests/extoy/extoy.cpp create mode 100644 tests/hiddensymbols/Makefile.am create mode 100644 tests/hiddensymbols/Makefile.in create mode 100644 tests/hiddensymbols/hsrtest.cpp create mode 100644 tests/hiddensymbols/libferrishsrtest.cpp create mode 100644 tests/hiddensymbols/libferrishsrtest.hh create mode 100644 tests/hiddensymbols/libhsrmodule.cpp create mode 100644 tests/hiddensymbols/libhsrmodule.hh create mode 100644 tests/ipc/Makefile.am create mode 100644 tests/ipc/Makefile.in create mode 100644 tests/ipc/semaphores/Makefile.am create mode 100644 tests/ipc/semaphores/Makefile.in create mode 100644 tests/ipc/semaphores/fgetsem.cpp create mode 100644 tests/ipc/semaphores/fmodifysem.cpp create mode 100644 tests/ipc/semaphores/semrawcreate.cpp create mode 100644 tests/ipc/shm/Makefile.am create mode 100644 tests/ipc/shm/Makefile.in create mode 100644 tests/ipc/shm/fshmget.cpp create mode 100644 tests/ipc/shm/fshmput.cpp create mode 100644 tests/ipc/shm/shmrawget.cpp create mode 100644 tests/ipc/shm/shmrawput.cpp create mode 100644 tests/links/Makefile.am create mode 100644 tests/links/Makefile.in create mode 100644 tests/links/linkplay.cpp create mode 100644 tests/logging/Makefile.am create mode 100644 tests/logging/Makefile.in create mode 100644 tests/logging/interlace.cpp create mode 100644 tests/logging/logtest.cpp create mode 100644 tests/lucene/IndexFiles.cpp create mode 100644 tests/lucene/Makefile.am create mode 100644 tests/lucene/Makefile.in create mode 100644 tests/lucene/SearchFiles.cpp create mode 100644 tests/medallions/Makefile.am create mode 100644 tests/medallions/Makefile.in create mode 100644 tests/medallions/simpleroot/Makefile.am create mode 100644 tests/medallions/simpleroot/Makefile.in create mode 100644 tests/medallions/simpleroot/simpleroot.cpp create mode 100644 tests/memorymanage/Makefile.am create mode 100644 tests/memorymanage/Makefile.in create mode 100644 tests/memorymanage/cleanuptest/Makefile.am create mode 100644 tests/memorymanage/cleanuptest/Makefile.in create mode 100644 tests/memorymanage/cleanuptest/chainedFilter.cpp create mode 100644 tests/memorymanage/cleanuptest/cleanuptest.cpp create mode 100644 tests/memorymanage/cleanuptest/filters.cpp create mode 100644 tests/memorymanage/cleanuptest/resolveagain.cpp create mode 100644 tests/memorymanage/cleanuptest/simpleSort.cpp create mode 100644 tests/memorymanage/cleanuptest/singlecontext.cpp create mode 100644 tests/memorymanage/cleanuptest/vmdebug.cpp create mode 100644 tests/quoting/Makefile.am create mode 100644 tests/quoting/Makefile.in create mode 100644 tests/quoting/ftestshellquote.cpp create mode 100644 tests/rdf/Makefile.am create mode 100644 tests/rdf/Makefile.in create mode 100644 tests/rdf/makeCyclicRDF.cpp create mode 100644 tests/rdf/rdfassert.cpp create mode 100644 tests/rdf/rdfexample1.cpp create mode 100644 tests/rdf/rdfexample2.cpp create mode 100644 tests/rdf/rdfexample3.cpp create mode 100644 tests/rdf/rdfexample4.cpp create mode 100644 tests/rdf/rdfsimplequery.cpp create mode 100644 tests/regression/Makefile.am create mode 100644 tests/regression/Makefile.in create mode 100644 tests/regression/createdir.cpp create mode 100644 tests/regression/createea.cpp create mode 100644 tests/regression/createfile.cpp create mode 100644 tests/regression/plaything.cpp create mode 100644 tests/regression/readcontext.cpp create mode 100644 tests/regression/readea.cpp create mode 100644 tests/regression/relativePaths/Makefile.am create mode 100644 tests/regression/relativePaths/Makefile.in create mode 100644 tests/regression/relativePaths/relativePaths.cpp create mode 100644 tests/regression/removecontext.cpp create mode 100644 tests/regression/renamecontext.cpp create mode 100644 tests/regression/timber/Makefile.am create mode 100644 tests/regression/timber/Makefile.in create mode 100644 tests/regression/timber/timbertest.cpp create mode 100644 tests/regression/writecontext.cpp create mode 100644 tests/regression/writeea.cpp create mode 100644 tests/runner/Makefile.am create mode 100644 tests/runner/Makefile.in create mode 100644 tests/runner/runnertest.cpp create mode 100644 tests/sigtoy/Makefile.am create mode 100644 tests/sigtoy/Makefile.in create mode 100644 tests/sigtoy/sigtoy.cpp create mode 100644 tests/sockets/Makefile.am create mode 100644 tests/sockets/Makefile.in create mode 100644 tests/sockets/daytime/Makefile.am create mode 100644 tests/sockets/daytime/Makefile.in create mode 100644 tests/sockets/daytime/daytimeclient.cpp create mode 100644 tests/sockets/echo/Makefile.am create mode 100644 tests/sockets/echo/Makefile.in create mode 100644 tests/sockets/echo/echoclient.cpp create mode 100644 tests/sockets/echoclienttls/Makefile.am create mode 100644 tests/sockets/echoclienttls/Makefile.in create mode 100644 tests/sockets/echoclienttls/echoclienttls.cpp create mode 100644 tests/sockets/echoserver/Makefile.am create mode 100644 tests/sockets/echoserver/Makefile.in create mode 100644 tests/sockets/echoserver/echoserver.cpp create mode 100644 tests/sockets/echoservertls/Makefile.am create mode 100644 tests/sockets/echoservertls/Makefile.in create mode 100644 tests/sockets/echoservertls/echoservertls.cpp create mode 100644 tests/sockets/socketops/Makefile.am create mode 100644 tests/sockets/socketops/Makefile.in create mode 100644 tests/sockets/socketops/socketopsclient.cpp create mode 100644 tests/sqlplus/Makefile.am create mode 100644 tests/sqlplus/Makefile.in create mode 100644 tests/sqlplus/simplequery/Makefile.am create mode 100644 tests/sqlplus/simplequery/Makefile.in create mode 100644 tests/sqlplus/simplequery/sqlsimplequery.cpp create mode 100644 tests/sqlplus/simplequery/sqlsimplequery.xml create mode 100644 tests/streams/Makefile.am create mode 100644 tests/streams/Makefile.in create mode 100644 tests/streams/ostream_modifiers/Makefile.am create mode 100644 tests/streams/ostream_modifiers/Makefile.in create mode 100644 tests/streams/ostream_modifiers/ostream_modifiers.cpp create mode 100644 tests/streams/performance/Makefile.am create mode 100644 tests/streams/performance/Makefile.in create mode 100644 tests/streams/performance/streamtimes.cpp create mode 100644 tests/stringtrimming/Makefile.am create mode 100644 tests/stringtrimming/Makefile.in create mode 100644 tests/stringtrimming/stringtrimming.cpp create mode 100644 tests/timeparsing/Makefile.am create mode 100644 tests/timeparsing/Makefile.in create mode 100644 tests/timeparsing/timeparse.cpp create mode 100644 tests/touch/Makefile.am create mode 100644 tests/touch/Makefile.in create mode 100644 tests/touch/touchtest.cpp create mode 100644 tests/trivial/Makefile.am create mode 100644 tests/trivial/Makefile.in create mode 100644 tests/trivial/test_setStrAttr.cpp create mode 100644 tests/xml/Makefile.am create mode 100644 tests/xml/Makefile.in create mode 100644 tests/xml/testMakeDOM/Makefile.am create mode 100644 tests/xml/testMakeDOM/Makefile.in create mode 100644 tests/xml/testMakeDOM/testMakeDOM.cpp create mode 100644 xsltfunctions/FerrisXalanTransform.cpp create mode 100644 xsltfunctions/Makefile.am create mode 100644 xsltfunctions/Makefile.in create mode 100644 xsltfunctions/libferrisxslt.hh create mode 100644 xsltfunctions/xslt_base.cpp create mode 100644 xsltfunctions/xslt_base.hh create mode 100644 xsltfunctions/xslt_ferris.cpp create mode 100644 xsltfunctions/xslt_fs.cpp create mode 100644 xsltfunctions/xslt_shell.cpp create mode 100644 xsltfunctions/xslt_string.cpp diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..02e48e1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Ben Martin diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..b5cde58 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,31 @@ +******************************************************************************* +1.1.50 +******************************************************************************* +2005-06-22 monkeyiq + + Ability to mount evolution email and contacts, + Native PostgreSQL mounting support, + Improvements to Shell::acquireContext(), + better whitespace handling in parseSeperatedList(), + as-text filter for Word files, + New is-dir-try-automounting EA which will attempt + to automount a file before reporting that it is not + a directory, + New size EA fallback which generates its value by + reading the byte contents of a file, + fca:// formal concepts now export their object-id as EA, + various speed improvements to FCA engine. + +******************************************************************************* +1.1.46 is below. +******************************************************************************* +ChangeLog + Adding files to PostgreSQL EA index is now significantly faster. + PostgreSQL EA indexer no longer does an analyse after adding files. + Memory leak fix in RPM EA generators. + Some fd leaks fixed in the as-text EA generators. + Bug that caused a segv in the jpeg EA generator for some jpeg files fixed. + language-human EA now uses as-text EA to dig into pdf files. + Better relative path resolution. + Added another optional MIME sniffing engine using libmagic. +------------------------------------------------------------------------------- diff --git a/DBusGlue/Makefile.am b/DBusGlue/Makefile.am new file mode 100644 index 0000000..dfa36c4 --- /dev/null +++ b/DBusGlue/Makefile.am @@ -0,0 +1,90 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +SERVICE_FILES = $(top_builddir)/DBusGlue/*.service +servicedir = $(datarootdir)/dbus-1/services +service_DATA = $(SERVICE_FILES) + +XML_FILES = $(top_srcdir)/DBusGlue/*.xml +EXTRA_DIST = $(XML_FILES) $(SERVICE_FILES) + +BUILT_SOURCES = broker_adaptor.h broker_adaptor.cpp broker_interface.h broker_interface.cpp \ + worker_adaptor.h worker_adaptor.cpp worker_interface.h worker_interface.cpp \ + org_freedesktop_DBus.h org_freedesktop_DBus.cpp \ + org_freedesktop_DBus_Introspectable.h org_freedesktop_DBus_Introspectable.cpp \ + org_freedesktop_Hal_Device.h org_freedesktop_Hal_Device.cpp \ + org_freedesktop_Hal_Device_Volume.h org_freedesktop_Hal_Device_Volume.cpp \ + org_freedesktop_Hal_Manager.h org_freedesktop_Hal_Manager.cpp \ + com_libferris_Volume_Manager.h com_libferris_Volume_Manager.cpp \ + com_libferris_Volume_Manager_adaptor.h com_libferris_Volume_Manager_adaptor.cpp + + +broker_adaptor.h broker_adaptor.cpp broker_interface.h broker_interface.cpp: ferris_internal_metadata_broker_introspect.xml + qdbusxml2cpp -N -m -c broker -p broker_interface $(srcdir)/ferris_internal_metadata_broker_introspect.xml + moc-qt4 broker_interface.h -o broker_interface.moc + qdbusxml2cpp -N -m -c broker -a broker_adaptor $(srcdir)/ferris_internal_metadata_broker_introspect.xml + moc-qt4 broker_adaptor.h -o broker_adaptor.moc + +worker_adaptor.h worker_adaptor.cpp worker_interface.h worker_interface.cpp: ferris_internal_metadata_worker_introspect.xml + qdbusxml2cpp -N -m -c worker -p worker_interface $(srcdir)/ferris_internal_metadata_worker_introspect.xml + moc-qt4 worker_interface.h -o worker_interface.moc + qdbusxml2cpp -N -m -c worker -a worker_adaptor $(srcdir)/ferris_internal_metadata_worker_introspect.xml + moc-qt4 worker_adaptor.h -o worker_adaptor.moc + + +org_freedesktop_DBus.h org_freedesktop_DBus.cpp: org.freedesktop.DBus.xml + qdbusxml2cpp -N -m -c fdoDBus -p org_freedesktop_DBus $(srcdir)/org.freedesktop.DBus.xml + moc-qt4 org_freedesktop_DBus.h -o org_freedesktop_DBus.moc + +org_freedesktop_DBus_Introspectable.h org_freedesktop_DBus_Introspectable.cpp: org.freedesktop.DBus.Introspectable.xml + qdbusxml2cpp -N -m -c fdoDBusIntrospectable -p org_freedesktop_DBus_Introspectable $(srcdir)/org.freedesktop.DBus.Introspectable.xml + moc-qt4 org_freedesktop_DBus_Introspectable.h -o org_freedesktop_DBus_Introspectable.moc + +org_freedesktop_Hal_Device.h org_freedesktop_Hal_Device.cpp: org.freedesktop.Hal.Device.xml + qdbusxml2cpp -N -m -c fdoHalDevice -p org_freedesktop_Hal_Device $(srcdir)/org.freedesktop.Hal.Device.xml + moc-qt4 org_freedesktop_Hal_Device.h -o org_freedesktop_Hal_Device.moc + +org_freedesktop_Hal_Device_Volume.h org_freedesktop_Hal_Device_Volume.cpp: org.freedesktop.Hal.Device.Volume.xml + qdbusxml2cpp -N -m -c fdoHalDeviceVolume -p org_freedesktop_Hal_Device_Volume $(srcdir)/org.freedesktop.Hal.Device.Volume.xml + moc-qt4 org_freedesktop_Hal_Device_Volume.h -o org_freedesktop_Hal_Device_Volume.moc + +org_freedesktop_Hal_Manager.h org_freedesktop_Hal_Manager.cpp: org.freedesktop.Hal.Manager.xml + qdbusxml2cpp -N -m -c fdoHalManager -p org_freedesktop_Hal_Manager $(srcdir)/org.freedesktop.Hal.Manager.xml + moc-qt4 org_freedesktop_Hal_Manager.h -o org_freedesktop_Hal_Manager.moc + + +com_libferris_Volume_Manager.h com_libferris_Volume_Manager.cpp com_libferris_Volume_Manager_adaptor.h com_libferris_Volume_Manager_adaptor.cpp: com.libferris.Volume.Manager.xml + qdbusxml2cpp -N -m -c fVolumeManager -p com_libferris_Volume_Manager $(srcdir)/com.libferris.Volume.Manager.xml + moc-qt4 com_libferris_Volume_Manager.h -o com_libferris_Volume_Manager.moc + qdbusxml2cpp -N -m -c fVolumeManager -a com_libferris_Volume_Manager_adaptor $(srcdir)/com.libferris.Volume.Manager.xml + moc-qt4 com_libferris_Volume_Manager_adaptor.h -o com_libferris_Volume_Manager_adaptor.moc + + + +METADATA_COMMANDS = force-header-generation +noinst_PROGRAMS = $(METADATA_COMMANDS) + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/eagenerators/ \ + -I/usr/local/include \ + @QTDBUS_CFLAGS@ \ + @CFLAGS@ + +force_header_generation_LDADD = -lm -lpopt +force_header_generation_LDFLAGS = @QTDBUS_LIBS@ #@LIBFERRIS_LA@ +force_header_generation_SOURCES = \ + broker_adaptor.h broker_interface.h \ + worker_adaptor.h worker_interface.h \ + org_freedesktop_DBus.h \ + org_freedesktop_DBus_Introspectable.h \ + org_freedesktop_Hal_Device.h \ + org_freedesktop_Hal_Device_Volume.h \ + org_freedesktop_Hal_Manager.h \ + force-header-generation.cpp + diff --git a/DBusGlue/Makefile.in b/DBusGlue/Makefile.in new file mode 100644 index 0000000..f8f01d7 --- /dev/null +++ b/DBusGlue/Makefile.in @@ -0,0 +1,1110 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = $(am__EXEEXT_1) +subdir = DBusGlue +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/com.Libferris.Volume.Manager.service.in \ + $(srcdir)/com.libferris.Metadata.Broker.service.in \ + $(srcdir)/com.libferris.Metadata.Worker.imlib2.service.in \ + $(srcdir)/com.libferris.Metadata.Worker.jpg.service.in \ + $(srcdir)/com.libferris.Metadata.Worker.magick.service.in \ + $(srcdir)/com.libferris.Metadata.Worker.png.service.in \ + $(srcdir)/com.libferris.Metadata.Worker.xine.service.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = com.Libferris.Volume.Manager.service \ + com.libferris.Metadata.Broker.service \ + com.libferris.Metadata.Worker.xine.service \ + com.libferris.Metadata.Worker.magick.service \ + com.libferris.Metadata.Worker.imlib2.service \ + com.libferris.Metadata.Worker.png.service \ + com.libferris.Metadata.Worker.jpg.service +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = force-header-generation$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_force_header_generation_OBJECTS = \ + force-header-generation.$(OBJEXT) +force_header_generation_OBJECTS = \ + $(am_force_header_generation_OBJECTS) +force_header_generation_DEPENDENCIES = +force_header_generation_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(force_header_generation_LDFLAGS) $(LDFLAGS) -o \ + $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(force_header_generation_SOURCES) +DIST_SOURCES = $(force_header_generation_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(servicedir)" +DATA = $(service_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +SERVICE_FILES = $(top_builddir)/DBusGlue/*.service +servicedir = $(datarootdir)/dbus-1/services +service_DATA = $(SERVICE_FILES) +XML_FILES = $(top_srcdir)/DBusGlue/*.xml +EXTRA_DIST = $(XML_FILES) $(SERVICE_FILES) +BUILT_SOURCES = broker_adaptor.h broker_adaptor.cpp broker_interface.h broker_interface.cpp \ + worker_adaptor.h worker_adaptor.cpp worker_interface.h worker_interface.cpp \ + org_freedesktop_DBus.h org_freedesktop_DBus.cpp \ + org_freedesktop_DBus_Introspectable.h org_freedesktop_DBus_Introspectable.cpp \ + org_freedesktop_Hal_Device.h org_freedesktop_Hal_Device.cpp \ + org_freedesktop_Hal_Device_Volume.h org_freedesktop_Hal_Device_Volume.cpp \ + org_freedesktop_Hal_Manager.h org_freedesktop_Hal_Manager.cpp \ + com_libferris_Volume_Manager.h com_libferris_Volume_Manager.cpp \ + com_libferris_Volume_Manager_adaptor.h com_libferris_Volume_Manager_adaptor.cpp + +METADATA_COMMANDS = force-header-generation +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/eagenerators/ \ + -I/usr/local/include \ + @QTDBUS_CFLAGS@ \ + @CFLAGS@ + +force_header_generation_LDADD = -lm -lpopt +force_header_generation_LDFLAGS = @QTDBUS_LIBS@ #@LIBFERRIS_LA@ +force_header_generation_SOURCES = \ + broker_adaptor.h broker_interface.h \ + worker_adaptor.h worker_interface.h \ + org_freedesktop_DBus.h \ + org_freedesktop_DBus_Introspectable.h \ + org_freedesktop_Hal_Device.h \ + org_freedesktop_Hal_Device_Volume.h \ + org_freedesktop_Hal_Manager.h \ + force-header-generation.cpp + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DBusGlue/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu DBusGlue/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +com.Libferris.Volume.Manager.service: $(top_builddir)/config.status $(srcdir)/com.Libferris.Volume.Manager.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Broker.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Broker.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Worker.xine.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Worker.xine.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Worker.magick.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Worker.magick.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Worker.imlib2.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Worker.imlib2.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Worker.png.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Worker.png.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +com.libferris.Metadata.Worker.jpg.service: $(top_builddir)/config.status $(srcdir)/com.libferris.Metadata.Worker.jpg.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +force-header-generation$(EXEEXT): $(force_header_generation_OBJECTS) $(force_header_generation_DEPENDENCIES) + @rm -f force-header-generation$(EXEEXT) + $(force_header_generation_LINK) $(force_header_generation_OBJECTS) $(force_header_generation_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/force-header-generation.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-serviceDATA: $(service_DATA) + @$(NORMAL_INSTALL) + test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)" + @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \ + done + +uninstall-serviceDATA: + @$(NORMAL_UNINSTALL) + @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(servicedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(servicedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-serviceDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-serviceDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-serviceDATA install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-serviceDATA + + +broker_adaptor.h broker_adaptor.cpp broker_interface.h broker_interface.cpp: ferris_internal_metadata_broker_introspect.xml + qdbusxml2cpp -N -m -c broker -p broker_interface $(srcdir)/ferris_internal_metadata_broker_introspect.xml + moc-qt4 broker_interface.h -o broker_interface.moc + qdbusxml2cpp -N -m -c broker -a broker_adaptor $(srcdir)/ferris_internal_metadata_broker_introspect.xml + moc-qt4 broker_adaptor.h -o broker_adaptor.moc + +worker_adaptor.h worker_adaptor.cpp worker_interface.h worker_interface.cpp: ferris_internal_metadata_worker_introspect.xml + qdbusxml2cpp -N -m -c worker -p worker_interface $(srcdir)/ferris_internal_metadata_worker_introspect.xml + moc-qt4 worker_interface.h -o worker_interface.moc + qdbusxml2cpp -N -m -c worker -a worker_adaptor $(srcdir)/ferris_internal_metadata_worker_introspect.xml + moc-qt4 worker_adaptor.h -o worker_adaptor.moc + +org_freedesktop_DBus.h org_freedesktop_DBus.cpp: org.freedesktop.DBus.xml + qdbusxml2cpp -N -m -c fdoDBus -p org_freedesktop_DBus $(srcdir)/org.freedesktop.DBus.xml + moc-qt4 org_freedesktop_DBus.h -o org_freedesktop_DBus.moc + +org_freedesktop_DBus_Introspectable.h org_freedesktop_DBus_Introspectable.cpp: org.freedesktop.DBus.Introspectable.xml + qdbusxml2cpp -N -m -c fdoDBusIntrospectable -p org_freedesktop_DBus_Introspectable $(srcdir)/org.freedesktop.DBus.Introspectable.xml + moc-qt4 org_freedesktop_DBus_Introspectable.h -o org_freedesktop_DBus_Introspectable.moc + +org_freedesktop_Hal_Device.h org_freedesktop_Hal_Device.cpp: org.freedesktop.Hal.Device.xml + qdbusxml2cpp -N -m -c fdoHalDevice -p org_freedesktop_Hal_Device $(srcdir)/org.freedesktop.Hal.Device.xml + moc-qt4 org_freedesktop_Hal_Device.h -o org_freedesktop_Hal_Device.moc + +org_freedesktop_Hal_Device_Volume.h org_freedesktop_Hal_Device_Volume.cpp: org.freedesktop.Hal.Device.Volume.xml + qdbusxml2cpp -N -m -c fdoHalDeviceVolume -p org_freedesktop_Hal_Device_Volume $(srcdir)/org.freedesktop.Hal.Device.Volume.xml + moc-qt4 org_freedesktop_Hal_Device_Volume.h -o org_freedesktop_Hal_Device_Volume.moc + +org_freedesktop_Hal_Manager.h org_freedesktop_Hal_Manager.cpp: org.freedesktop.Hal.Manager.xml + qdbusxml2cpp -N -m -c fdoHalManager -p org_freedesktop_Hal_Manager $(srcdir)/org.freedesktop.Hal.Manager.xml + moc-qt4 org_freedesktop_Hal_Manager.h -o org_freedesktop_Hal_Manager.moc + +com_libferris_Volume_Manager.h com_libferris_Volume_Manager.cpp com_libferris_Volume_Manager_adaptor.h com_libferris_Volume_Manager_adaptor.cpp: com.libferris.Volume.Manager.xml + qdbusxml2cpp -N -m -c fVolumeManager -p com_libferris_Volume_Manager $(srcdir)/com.libferris.Volume.Manager.xml + moc-qt4 com_libferris_Volume_Manager.h -o com_libferris_Volume_Manager.moc + qdbusxml2cpp -N -m -c fVolumeManager -a com_libferris_Volume_Manager_adaptor $(srcdir)/com.libferris.Volume.Manager.xml + moc-qt4 com_libferris_Volume_Manager_adaptor.h -o com_libferris_Volume_Manager_adaptor.moc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/DBusGlue/broker_adaptor.h b/DBusGlue/broker_adaptor.h new file mode 100644 index 0000000..5bae597 --- /dev/null +++ b/DBusGlue/broker_adaptor.h @@ -0,0 +1,100 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c broker -a broker_adaptor /ferris/DBusGlue/ferris_internal_metadata_broker_introspect.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef BROKER_ADAPTOR_H_1329958831 +#define BROKER_ADAPTOR_H_1329958831 + +#include +#include +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; + +/* + * Adaptor class for interface com.libferris.Metadata.Broker + */ +class broker: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.libferris.Metadata.Broker") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + broker(QObject *parent); + virtual ~broker(); + +public: // PROPERTIES +public Q_SLOTS: // METHODS + int Random(); + int asyncGet(const QString &earl, const QString &name); + int asyncPut(const QString &earl, const QString &name, const QByteArray &value); +Q_SIGNALS: // SIGNALS + void asyncGetFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); + void asyncGetResult(int reqid, const QString &earl, const QString &name, const QByteArray &value); + void asyncPutCommitted(int reqid, const QString &earl, const QString &name); + void asyncPutFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); +}; + +#endif diff --git a/DBusGlue/broker_interface.h b/DBusGlue/broker_interface.h new file mode 100644 index 0000000..cf92215 --- /dev/null +++ b/DBusGlue/broker_interface.h @@ -0,0 +1,66 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c broker -p broker_interface /ferris/DBusGlue/ferris_internal_metadata_broker_introspect.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef BROKER_INTERFACE_H_1329958831 +#define BROKER_INTERFACE_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface com.libferris.Metadata.Broker + */ +class broker: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "com.libferris.Metadata.Broker"; } + +public: + broker(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~broker(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply Random() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Random"), argumentList); + } + + inline QDBusPendingReply asyncGet(const QString &earl, const QString &name) + { + QList argumentList; + argumentList << QVariant::fromValue(earl) << QVariant::fromValue(name); + return asyncCallWithArgumentList(QLatin1String("asyncGet"), argumentList); + } + + inline QDBusPendingReply asyncPut(const QString &earl, const QString &name, const QByteArray &value) + { + QList argumentList; + argumentList << QVariant::fromValue(earl) << QVariant::fromValue(name) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("asyncPut"), argumentList); + } + +Q_SIGNALS: // SIGNALS + void asyncGetFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); + void asyncGetResult(int reqid, const QString &earl, const QString &name, const QByteArray &value); + void asyncPutCommitted(int reqid, const QString &earl, const QString &name); + void asyncPutFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); +}; + +#endif diff --git a/DBusGlue/com.Libferris.Volume.Manager.service b/DBusGlue/com.Libferris.Volume.Manager.service new file mode 100644 index 0000000..46ffa59 --- /dev/null +++ b/DBusGlue/com.Libferris.Volume.Manager.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.Libferris.Volume.Manager +Exec=/usr/local/bin/ferris-volume-manager diff --git a/DBusGlue/com.Libferris.Volume.Manager.service.in b/DBusGlue/com.Libferris.Volume.Manager.service.in new file mode 100644 index 0000000..99360d1 --- /dev/null +++ b/DBusGlue/com.Libferris.Volume.Manager.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.Libferris.Volume.Manager +Exec=@PREFIX@/bin/ferris-volume-manager diff --git a/DBusGlue/com.libferris.Metadata.Broker.service b/DBusGlue/com.libferris.Metadata.Broker.service new file mode 100644 index 0000000..34bc33f --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Broker.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Broker +Exec=/usr/local/bin/ferris-internal-metadata-broker diff --git a/DBusGlue/com.libferris.Metadata.Broker.service.in b/DBusGlue/com.libferris.Metadata.Broker.service.in new file mode 100644 index 0000000..43169d8 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Broker.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Broker +Exec=@PREFIX@/bin/ferris-internal-metadata-broker diff --git a/DBusGlue/com.libferris.Metadata.Worker.imlib2.service b/DBusGlue/com.libferris.Metadata.Worker.imlib2.service new file mode 100644 index 0000000..37c2135 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.imlib2.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.imlib2 +Exec=/usr/local/bin/ferris-internal-metadata-worker --plugin-names=imlib2 --dbus-server-name=com.libferris.Metadata.Worker.imlib2 diff --git a/DBusGlue/com.libferris.Metadata.Worker.imlib2.service.in b/DBusGlue/com.libferris.Metadata.Worker.imlib2.service.in new file mode 100644 index 0000000..99b28d6 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.imlib2.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.imlib2 +Exec=@PREFIX@/bin/ferris-internal-metadata-worker --plugin-names=imlib2 --dbus-server-name=com.libferris.Metadata.Worker.imlib2 diff --git a/DBusGlue/com.libferris.Metadata.Worker.jpg.service b/DBusGlue/com.libferris.Metadata.Worker.jpg.service new file mode 100644 index 0000000..578015e --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.jpg.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.jpg +Exec=/usr/local/bin/ferris-internal-metadata-worker --plugin-names=jpeg --dbus-server-name=com.libferris.Metadata.Worker.jpg diff --git a/DBusGlue/com.libferris.Metadata.Worker.jpg.service.in b/DBusGlue/com.libferris.Metadata.Worker.jpg.service.in new file mode 100644 index 0000000..3cbf6e7 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.jpg.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.jpg +Exec=@PREFIX@/bin/ferris-internal-metadata-worker --plugin-names=jpeg --dbus-server-name=com.libferris.Metadata.Worker.jpg diff --git a/DBusGlue/com.libferris.Metadata.Worker.magick.service b/DBusGlue/com.libferris.Metadata.Worker.magick.service new file mode 100644 index 0000000..3be1d79 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.magick.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.magick +Exec=/usr/local/bin/ferris-internal-metadata-worker --plugin-names=magick --dbus-server-name=com.libferris.Metadata.Worker.magick diff --git a/DBusGlue/com.libferris.Metadata.Worker.magick.service.in b/DBusGlue/com.libferris.Metadata.Worker.magick.service.in new file mode 100644 index 0000000..4b02e72 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.magick.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.magick +Exec=@PREFIX@/bin/ferris-internal-metadata-worker --plugin-names=magick --dbus-server-name=com.libferris.Metadata.Worker.magick diff --git a/DBusGlue/com.libferris.Metadata.Worker.png.service b/DBusGlue/com.libferris.Metadata.Worker.png.service new file mode 100644 index 0000000..3aa5a6c --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.png.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.png +Exec=/usr/local/bin/ferris-internal-metadata-worker --plugin-names=png --dbus-server-name=com.libferris.Metadata.Worker.png diff --git a/DBusGlue/com.libferris.Metadata.Worker.png.service.in b/DBusGlue/com.libferris.Metadata.Worker.png.service.in new file mode 100644 index 0000000..eaf557f --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.png.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.png +Exec=@PREFIX@/bin/ferris-internal-metadata-worker --plugin-names=png --dbus-server-name=com.libferris.Metadata.Worker.png diff --git a/DBusGlue/com.libferris.Metadata.Worker.xine.service b/DBusGlue/com.libferris.Metadata.Worker.xine.service new file mode 100644 index 0000000..2ab55bc --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.xine.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.xine +Exec=/usr/local/bin/ferris-internal-metadata-worker --plugin-names=xine --dbus-server-name=com.libferris.Metadata.Worker.xine diff --git a/DBusGlue/com.libferris.Metadata.Worker.xine.service.in b/DBusGlue/com.libferris.Metadata.Worker.xine.service.in new file mode 100644 index 0000000..34e33c6 --- /dev/null +++ b/DBusGlue/com.libferris.Metadata.Worker.xine.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.libferris.Metadata.Worker.xine +Exec=@PREFIX@/bin/ferris-internal-metadata-worker --plugin-names=xine --dbus-server-name=com.libferris.Metadata.Worker.xine diff --git a/DBusGlue/com.libferris.Volume.Manager.xml b/DBusGlue/com.libferris.Volume.Manager.xml new file mode 100644 index 0000000..4521a2a --- /dev/null +++ b/DBusGlue/com.libferris.Volume.Manager.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/ferris_internal_metadata_broker_introspect.xml b/DBusGlue/ferris_internal_metadata_broker_introspect.xml new file mode 100644 index 0000000..99bdc39 --- /dev/null +++ b/DBusGlue/ferris_internal_metadata_broker_introspect.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/ferris_internal_metadata_worker_introspect.xml b/DBusGlue/ferris_internal_metadata_worker_introspect.xml new file mode 100644 index 0000000..f51030c --- /dev/null +++ b/DBusGlue/ferris_internal_metadata_worker_introspect.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/force-header-generation.cpp b/DBusGlue/force-header-generation.cpp new file mode 100644 index 0000000..91b429e --- /dev/null +++ b/DBusGlue/force-header-generation.cpp @@ -0,0 +1,5 @@ + +int main( int, char** ) +{ + return 0; +} diff --git a/DBusGlue/org.freedesktop.DBus.Introspectable.xml b/DBusGlue/org.freedesktop.DBus.Introspectable.xml new file mode 100644 index 0000000..def1104 --- /dev/null +++ b/DBusGlue/org.freedesktop.DBus.Introspectable.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/DBusGlue/org.freedesktop.DBus.xml b/DBusGlue/org.freedesktop.DBus.xml new file mode 100644 index 0000000..868e948 --- /dev/null +++ b/DBusGlue/org.freedesktop.DBus.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/org.freedesktop.Hal.Device.Volume.xml b/DBusGlue/org.freedesktop.Hal.Device.Volume.xml new file mode 100644 index 0000000..93ab7c0 --- /dev/null +++ b/DBusGlue/org.freedesktop.Hal.Device.Volume.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/org.freedesktop.Hal.Device.xml b/DBusGlue/org.freedesktop.Hal.Device.xml new file mode 100644 index 0000000..c373c2c --- /dev/null +++ b/DBusGlue/org.freedesktop.Hal.Device.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/org.freedesktop.Hal.Manager.xml b/DBusGlue/org.freedesktop.Hal.Manager.xml new file mode 100644 index 0000000..078e91c --- /dev/null +++ b/DBusGlue/org.freedesktop.Hal.Manager.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBusGlue/org_freedesktop_DBus.h b/DBusGlue/org_freedesktop_DBus.h new file mode 100644 index 0000000..18123f4 --- /dev/null +++ b/DBusGlue/org_freedesktop_DBus.h @@ -0,0 +1,159 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c fdoDBus -p org_freedesktop_DBus /ferris/DBusGlue/org.freedesktop.DBus.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef ORG_FREEDESKTOP_DBUS_H_1329958831 +#define ORG_FREEDESKTOP_DBUS_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface org.freedesktop.DBus + */ +class fdoDBus: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.freedesktop.DBus"; } + +public: + fdoDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~fdoDBus(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<> AddMatch(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("AddMatch"), argumentList); + } + + inline QDBusPendingReply GetAdtAuditSessionData(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("GetAdtAuditSessionData"), argumentList); + } + + inline QDBusPendingReply GetConnectionSELinuxSecurityContext(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("GetConnectionSELinuxSecurityContext"), argumentList); + } + + inline QDBusPendingReply GetConnectionUnixProcessID(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixProcessID"), argumentList); + } + + inline QDBusPendingReply GetConnectionUnixUser(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixUser"), argumentList); + } + + inline QDBusPendingReply GetId() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("GetId"), argumentList); + } + + inline QDBusPendingReply GetNameOwner(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("GetNameOwner"), argumentList); + } + + inline QDBusPendingReply Hello() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Hello"), argumentList); + } + + inline QDBusPendingReply ListActivatableNames() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("ListActivatableNames"), argumentList); + } + + inline QDBusPendingReply ListNames() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("ListNames"), argumentList); + } + + inline QDBusPendingReply ListQueuedOwners(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("ListQueuedOwners"), argumentList); + } + + inline QDBusPendingReply NameHasOwner(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("NameHasOwner"), argumentList); + } + + inline QDBusPendingReply ReleaseName(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("ReleaseName"), argumentList); + } + + inline QDBusPendingReply<> ReloadConfig() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("ReloadConfig"), argumentList); + } + + inline QDBusPendingReply<> RemoveMatch(const QString &in0) + { + QList argumentList; + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QLatin1String("RemoveMatch"), argumentList); + } + + inline QDBusPendingReply RequestName(const QString &in0, uint in1) + { + QList argumentList; + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QLatin1String("RequestName"), argumentList); + } + + inline QDBusPendingReply StartServiceByName(const QString &in0, uint in1) + { + QList argumentList; + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QLatin1String("StartServiceByName"), argumentList); + } + +Q_SIGNALS: // SIGNALS + void NameAcquired(const QString &in0); + void NameLost(const QString &in0); + void NameOwnerChanged(const QString &in0, const QString &in1, const QString &in2); +}; + +#endif diff --git a/DBusGlue/org_freedesktop_DBus_Introspectable.h b/DBusGlue/org_freedesktop_DBus_Introspectable.h new file mode 100644 index 0000000..a33b782 --- /dev/null +++ b/DBusGlue/org_freedesktop_DBus_Introspectable.h @@ -0,0 +1,48 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c fdoDBusIntrospectable -p org_freedesktop_DBus_Introspectable /ferris/DBusGlue/org.freedesktop.DBus.Introspectable.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef ORG_FREEDESKTOP_DBUS_INTROSPECTABLE_H_1329958831 +#define ORG_FREEDESKTOP_DBUS_INTROSPECTABLE_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface org.freedesktop.DBus.Introspectable + */ +class fdoDBusIntrospectable: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.freedesktop.DBus.Introspectable"; } + +public: + fdoDBusIntrospectable(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~fdoDBusIntrospectable(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply Introspect() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Introspect"), argumentList); + } + +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/DBusGlue/org_freedesktop_Hal_Device.h b/DBusGlue/org_freedesktop_Hal_Device.h new file mode 100644 index 0000000..26f8976 --- /dev/null +++ b/DBusGlue/org_freedesktop_Hal_Device.h @@ -0,0 +1,278 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c fdoHalDevice -p org_freedesktop_Hal_Device /ferris/DBusGlue/org.freedesktop.Hal.Device.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef ORG_FREEDESKTOP_HAL_DEVICE_H_1329958831 +#define ORG_FREEDESKTOP_HAL_DEVICE_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface org.freedesktop.Hal.Device + */ +class fdoHalDevice: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.freedesktop.Hal.Device"; } + +public: + fdoHalDevice(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~fdoHalDevice(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<> AcquireInterfaceLock(const QString &interface_name, bool exclusive) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name) << QVariant::fromValue(exclusive); + return asyncCallWithArgumentList(QLatin1String("AcquireInterfaceLock"), argumentList); + } + + inline QDBusPendingReply<> AddCapability(const QString &capability) + { + QList argumentList; + argumentList << QVariant::fromValue(capability); + return asyncCallWithArgumentList(QLatin1String("AddCapability"), argumentList); + } + + inline QDBusPendingReply AddonIsReady() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("AddonIsReady"), argumentList); + } + + inline QDBusPendingReply ClaimInterface(const QString &interface_name, const QString &introspection_xml) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name) << QVariant::fromValue(introspection_xml); + return asyncCallWithArgumentList(QLatin1String("ClaimInterface"), argumentList); + } + + inline QDBusPendingReply EmitCondition(const QString &condition_name, const QString &condition_details) + { + QList argumentList; + argumentList << QVariant::fromValue(condition_name) << QVariant::fromValue(condition_details); + return asyncCallWithArgumentList(QLatin1String("EmitCondition"), argumentList); + } + + inline QDBusPendingReply GetAllProperties() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("GetAllProperties"), argumentList); + } + + inline QDBusPendingReply GetProperty(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetProperty"), argumentList); + } + + inline QDBusPendingReply GetPropertyBoolean(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyBoolean"), argumentList); + } + + inline QDBusPendingReply GetPropertyDouble(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyDouble"), argumentList); + } + + inline QDBusPendingReply GetPropertyInteger(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyInteger"), argumentList); + } + + inline QDBusPendingReply GetPropertyString(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyString"), argumentList); + } + + inline QDBusPendingReply GetPropertyStringList(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyStringList"), argumentList); + } + + inline QDBusPendingReply GetPropertyType(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("GetPropertyType"), argumentList); + } + + inline QDBusPendingReply IsCallerLockedOut(const QString &interface_name, const QString &caller_sysbus_name) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name) << QVariant::fromValue(caller_sysbus_name); + return asyncCallWithArgumentList(QLatin1String("IsCallerLockedOut"), argumentList); + } + + inline QDBusPendingReply IsCallerPrivileged(const QString &action, const QStringList &action_parameters, const QString &caller_sysbus_name) + { + QList argumentList; + argumentList << QVariant::fromValue(action) << QVariant::fromValue(action_parameters) << QVariant::fromValue(caller_sysbus_name); + return asyncCallWithArgumentList(QLatin1String("IsCallerPrivileged"), argumentList); + } + + inline QDBusPendingReply IsLockedByOthers(const QString &interface_name) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name); + return asyncCallWithArgumentList(QLatin1String("IsLockedByOthers"), argumentList); + } + + inline QDBusPendingReply Lock(const QString &reason) + { + QList argumentList; + argumentList << QVariant::fromValue(reason); + return asyncCallWithArgumentList(QLatin1String("Lock"), argumentList); + } + + inline QDBusPendingReply PropertyExists(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("PropertyExists"), argumentList); + } + + inline QDBusPendingReply QueryCapability(const QString &capability) + { + QList argumentList; + argumentList << QVariant::fromValue(capability); + return asyncCallWithArgumentList(QLatin1String("QueryCapability"), argumentList); + } + + inline QDBusPendingReply<> ReleaseInterfaceLock(const QString &interface_name) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name); + return asyncCallWithArgumentList(QLatin1String("ReleaseInterfaceLock"), argumentList); + } + + inline QDBusPendingReply<> RemoveProperty(const QString &key) + { + QList argumentList; + argumentList << QVariant::fromValue(key); + return asyncCallWithArgumentList(QLatin1String("RemoveProperty"), argumentList); + } + + inline QDBusPendingReply Reprobe() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Reprobe"), argumentList); + } + + inline QDBusPendingReply Rescan() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Rescan"), argumentList); + } + + inline QDBusPendingReply<> SetMultipleProperties(const QVariantMap &properties) + { + QList argumentList; + argumentList << QVariant::fromValue(properties); + return asyncCallWithArgumentList(QLatin1String("SetMultipleProperties"), argumentList); + } + + inline QDBusPendingReply<> SetProperty(const QString &key, const QDBusVariant &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetProperty"), argumentList); + } + + inline QDBusPendingReply<> SetPropertyBoolean(const QString &key, bool value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetPropertyBoolean"), argumentList); + } + + inline QDBusPendingReply<> SetPropertyDouble(const QString &key, double value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetPropertyDouble"), argumentList); + } + + inline QDBusPendingReply<> SetPropertyInteger(const QString &key, int value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetPropertyInteger"), argumentList); + } + + inline QDBusPendingReply<> SetPropertyString(const QString &key, const QString &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetPropertyString"), argumentList); + } + + inline QDBusPendingReply<> SetPropertyStringList(const QString &key, const QStringList &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("SetPropertyStringList"), argumentList); + } + + inline QDBusPendingReply<> StringListAppend(const QString &key, const QString &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("StringListAppend"), argumentList); + } + + inline QDBusPendingReply<> StringListPrepend(const QString &key, const QString &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("StringListPrepend"), argumentList); + } + + inline QDBusPendingReply<> StringListRemove(const QString &key, const QString &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("StringListRemove"), argumentList); + } + + inline QDBusPendingReply Unlock() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("Unlock"), argumentList); + } + +Q_SIGNALS: // SIGNALS + void Condition(const QString &cond_name, const QString &cond_details); + void InterfaceLockAcquired(const QString &interface_name, const QString &lock_holder, int num_locks); + void InterfaceLockReleased(const QString &interface_name, const QString &lock_holder, int num_locks); +}; + +#endif diff --git a/DBusGlue/org_freedesktop_Hal_Device_Volume.h b/DBusGlue/org_freedesktop_Hal_Device_Volume.h new file mode 100644 index 0000000..0bb04bb --- /dev/null +++ b/DBusGlue/org_freedesktop_Hal_Device_Volume.h @@ -0,0 +1,63 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c fdoHalDeviceVolume -p org_freedesktop_Hal_Device_Volume /ferris/DBusGlue/org.freedesktop.Hal.Device.Volume.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef ORG_FREEDESKTOP_HAL_DEVICE_VOLUME_H_1329958831 +#define ORG_FREEDESKTOP_HAL_DEVICE_VOLUME_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface org.freedesktop.Hal.Device.Volume + */ +class fdoHalDeviceVolume: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.freedesktop.Hal.Device.Volume"; } + +public: + fdoHalDeviceVolume(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~fdoHalDeviceVolume(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply Eject(const QStringList &extra_options) + { + QList argumentList; + argumentList << QVariant::fromValue(extra_options); + return asyncCallWithArgumentList(QLatin1String("Eject"), argumentList); + } + + inline QDBusPendingReply Mount(const QString &mount_point, const QString &fstype, const QStringList &extra_options) + { + QList argumentList; + argumentList << QVariant::fromValue(mount_point) << QVariant::fromValue(fstype) << QVariant::fromValue(extra_options); + return asyncCallWithArgumentList(QLatin1String("Mount"), argumentList); + } + + inline QDBusPendingReply Unmount(const QStringList &extra_options) + { + QList argumentList; + argumentList << QVariant::fromValue(extra_options); + return asyncCallWithArgumentList(QLatin1String("Unmount"), argumentList); + } + +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/DBusGlue/org_freedesktop_Hal_Manager.h b/DBusGlue/org_freedesktop_Hal_Manager.h new file mode 100644 index 0000000..2b0d813 --- /dev/null +++ b/DBusGlue/org_freedesktop_Hal_Manager.h @@ -0,0 +1,115 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c fdoHalManager -p org_freedesktop_Hal_Manager /ferris/DBusGlue/org.freedesktop.Hal.Manager.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef ORG_FREEDESKTOP_HAL_MANAGER_H_1329958831 +#define ORG_FREEDESKTOP_HAL_MANAGER_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface org.freedesktop.Hal.Manager + */ +class fdoHalManager: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.freedesktop.Hal.Manager"; } + +public: + fdoHalManager(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~fdoHalManager(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<> AcquireGlobalInterfaceLock(const QString &interface_name, bool exclusive) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name) << QVariant::fromValue(exclusive); + return asyncCallWithArgumentList(QLatin1String("AcquireGlobalInterfaceLock"), argumentList); + } + + inline QDBusPendingReply<> CommitToGdl(const QString &temporary_udi, const QString &global_udi) + { + QList argumentList; + argumentList << QVariant::fromValue(temporary_udi) << QVariant::fromValue(global_udi); + return asyncCallWithArgumentList(QLatin1String("CommitToGdl"), argumentList); + } + + inline QDBusPendingReply DeviceExists(const QDBusObjectPath &udi) + { + QList argumentList; + argumentList << QVariant::fromValue(udi); + return asyncCallWithArgumentList(QLatin1String("DeviceExists"), argumentList); + } + + inline QDBusPendingReply > FindDeviceByCapability(const QString &capability) + { + QList argumentList; + argumentList << QVariant::fromValue(capability); + return asyncCallWithArgumentList(QLatin1String("FindDeviceByCapability"), argumentList); + } + + inline QDBusPendingReply > FindDeviceStringMatch(const QString &key, const QString &value) + { + QList argumentList; + argumentList << QVariant::fromValue(key) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("FindDeviceStringMatch"), argumentList); + } + + inline QDBusPendingReply GetAllDevices() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("GetAllDevices"), argumentList); + } + + inline QDBusPendingReply NewDevice() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("NewDevice"), argumentList); + } + + inline QDBusPendingReply<> ReleaseGlobalInterfaceLock(const QString &interface_name) + { + QList argumentList; + argumentList << QVariant::fromValue(interface_name); + return asyncCallWithArgumentList(QLatin1String("ReleaseGlobalInterfaceLock"), argumentList); + } + + inline QDBusPendingReply<> Remove(const QString &udi) + { + QList argumentList; + argumentList << QVariant::fromValue(udi); + return asyncCallWithArgumentList(QLatin1String("Remove"), argumentList); + } + + inline QDBusPendingReply<> SingletonAddonIsReady(const QString &command_line) + { + QList argumentList; + argumentList << QVariant::fromValue(command_line); + return asyncCallWithArgumentList(QLatin1String("SingletonAddonIsReady"), argumentList); + } + +Q_SIGNALS: // SIGNALS + void DeviceAdded(const QString &udi); + void DeviceRemoved(const QString &udi); + void GlobalInterfaceLockAcquired(const QString &interface_name, const QString &lock_holder, int num_locks); + void GlobalInterfaceLockReleased(const QString &interface_name, const QString &lock_holder, int num_locks); + void NewCapability(const QString &udi, const QString &cap_name); +}; + +#endif diff --git a/DBusGlue/worker_adaptor.h b/DBusGlue/worker_adaptor.h new file mode 100644 index 0000000..eeb87cd --- /dev/null +++ b/DBusGlue/worker_adaptor.h @@ -0,0 +1,60 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c worker -a worker_adaptor /ferris/DBusGlue/ferris_internal_metadata_worker_introspect.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef WORKER_ADAPTOR_H_1329958831 +#define WORKER_ADAPTOR_H_1329958831 + +#include +#include +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; + +/* + * Adaptor class for interface com.libferris.Metadata.Worker + */ +class worker: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.libferris.Metadata.Worker") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + worker(QObject *parent); + virtual ~worker(); + +public: // PROPERTIES +public Q_SLOTS: // METHODS + QByteArray get(const QString &earl, const QString &name); + int ping(); + void set(const QString &earl, const QString &name, const QByteArray &value); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/DBusGlue/worker_interface.h b/DBusGlue/worker_interface.h new file mode 100644 index 0000000..211309e --- /dev/null +++ b/DBusGlue/worker_interface.h @@ -0,0 +1,62 @@ +/* + * This file was generated by qdbusxml2cpp version 0.7 + * Command line was: qdbusxml2cpp -N -m -c worker -p worker_interface /ferris/DBusGlue/ferris_internal_metadata_worker_introspect.xml + * + * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef WORKER_INTERFACE_H_1329958831 +#define WORKER_INTERFACE_H_1329958831 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Proxy class for interface com.libferris.Metadata.Worker + */ +class worker: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "com.libferris.Metadata.Worker"; } + +public: + worker(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + + ~worker(); + +public Q_SLOTS: // METHODS + inline QDBusPendingReply get(const QString &earl, const QString &name) + { + QList argumentList; + argumentList << QVariant::fromValue(earl) << QVariant::fromValue(name); + return asyncCallWithArgumentList(QLatin1String("get"), argumentList); + } + + inline QDBusPendingReply ping() + { + QList argumentList; + return asyncCallWithArgumentList(QLatin1String("ping"), argumentList); + } + + inline QDBusPendingReply<> set(const QString &earl, const QString &name, const QByteArray &value) + { + QList argumentList; + argumentList << QVariant::fromValue(earl) << QVariant::fromValue(name) << QVariant::fromValue(value); + return asyncCallWithArgumentList(QLatin1String("set"), argumentList); + } + +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/Ferris/Agent.cpp b/Ferris/Agent.cpp new file mode 100644 index 0000000..f963da6 --- /dev/null +++ b/Ferris/Agent.cpp @@ -0,0 +1,1041 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Agent.cpp,v 1.2 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "config.h" + +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace AI + { + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Synthetic agent that calls all the other agents + */ + static const string COMPLETE_AGENT_UUID = "complete agent id"; + static const string COMPLETE_AGENT_NAME = "complete agent"; + + static const string AI_AGENT_UUIDLIST_KEY = "ai_all_agent_uuid_list"; + static const string AI_AGENT_UUIDLIST_DEFAULT = ""; + + static const string AI_AGENT_NAME_KEY = "ai_agent_name"; + static const string AI_AGENT_NAME_DEFAULT = ""; + + static const string AI_AGENT_TYPE_KEY = "ai_agent_type"; + static const string AI_AGENT_TYPE_BINARY = "binary"; + static const string AI_AGENT_TYPE_DEFAULT = AI_AGENT_TYPE_BINARY; + + static const string AI_AGENT_IMPLEMENATION_KEY = "ai_agent_implemenation"; + static const string AI_AGENT_IMPLEMENATION_DEFAULT = ""; + + static const string AI_AGENT_STATEDIR_KEY = "ai_agent_statedir"; + static const string AI_AGENT_STATEDIR_DEFAULT = "/tmp"; + + static const string AI_AGENT_EMBLEMID_KEY = "ai_agent_emblemid"; + static const string AI_AGENT_EMBLEMID_DEFAULT = "0"; + + static const string AI_AGENT_PERSID_KEY = "ai_agent_personality"; + static const string AI_AGENT_PERSID_DEFAULT = "0"; + + static string getAgentConfig( const std::string& agentUUID, + const std::string& uk, + const std::string& def ) + { + string k = agentUUID + "_" + uk; + return getEDBString( FDB_GENERAL, k, def, true, true ); + } + + static void setAgentConfig( const std::string& agentUUID, + const std::string& uk, + const std::string& v ) + { + string k = agentUUID + "_" + uk; + return setEDBString( FDB_GENERAL, k, v ); + } + + typedef map< string, fh_agent > agents_t; + static agents_t& getAllAgents( bool forceReload = false ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + AgentImplemenation::AgentImplemenation( std::string stateDir ) + : + m_stateDir( stateDir ) + { + } + + void + AgentImplemenation::setStateDir( const std::string& s ) + { + fh_context c = Shell::touch( s, true, true ); + m_stateDir = s; + } + + std::string + AgentImplemenation::getStateDir() + { + return m_stateDir; + } + + void + AgentImplemenation::initialize() + { + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + BinaryClassifierAgentTrainerImplemenationStateMinder:: + BinaryClassifierAgentTrainerImplemenationStateMinder() + : + m_dirty( false ) + { + } + + void + BinaryClassifierAgentTrainerImplemenationStateMinder::load( + const std::string& stateDir ) + { + m_cases.clear(); + m_dirty = false; + + fh_ifstream iss( stateDir + "/ferris_training_model" ); + while( iss ) + { + string earl; + double sureness; + + if( iss >> sureness && iss >> earl ) + m_cases[ earl ] = sureness; + } + } + + void + BinaryClassifierAgentTrainerImplemenationStateMinder::sync( + const std::string& stateDir ) + { + if( m_dirty ) + { + fh_ofstream oss( stateDir + "/ferris_training_model" ); + for( m_cases_t::iterator ci = m_cases.begin(); ci!=m_cases.end(); ++ci ) + { + oss << ci->second << " " << ci->first << nl; + } + oss << flush; + } + } + + + void + BinaryClassifierAgentTrainerImplemenationStateMinder::addCase( + fh_context c, double desiredOutCome ) + { + m_cases.insert( make_pair( c->getURL(), desiredOutCome )); + } + + void + BinaryClassifierAgentTrainerImplemenationStateMinder::removeCase( + fh_context c ) + { + m_cases.erase( m_cases.find( c->getURL() ) ); + } + + double + BinaryClassifierAgentTrainerImplemenationStateMinder::lookup( + const std::string& earl ) + { + m_cases_t::iterator ci = m_cases.find( earl ); + if( ci != m_cases.end() ) + { + return ci->second; + } + return 0; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + Agent::Agent( const std::string& uuid, + const std::string& name, + fh_emblem em, + fh_personality pers ) + : + m_uuid( uuid ), + m_name( name ), + m_em( em ), + m_pers( pers ) + { + } + + void + Agent::save() + { + setAgentConfig( getUUID(), AI_AGENT_NAME_KEY, getName() ); + setAgentConfig( getUUID(), AI_AGENT_EMBLEMID_KEY, tostr( m_em->getID() ) ); + setAgentConfig( getUUID(), AI_AGENT_PERSID_KEY, tostr( m_pers->getID() ) ); + setAgentConfig( getUUID(), AI_AGENT_IMPLEMENATION_KEY, getAgentImplemenationName() ); + setAgentConfig( getUUID(), AI_AGENT_STATEDIR_KEY, getStateDir() ); + setAgentConfig( getUUID(), AI_AGENT_TYPE_KEY, AI_AGENT_TYPE_BINARY ); + } + + + + std::string + Agent::getUUID() + { + return m_uuid; + } + + std::string + Agent::getName() + { + return m_name; + } + + void + Agent::setName( const std::string& v ) + { + m_name = v; + setAgentConfig( getUUID(), AI_AGENT_NAME_KEY, getName() ); + } + + + + fh_emblem + Agent::getEmblem() + { + return m_em; + } + + void + Agent::setEmblem( fh_emblem em ) + { + m_em = em; + setAgentConfig( getUUID(), AI_AGENT_EMBLEMID_KEY, tostr( em->getID() ) ); + } + + bool + Agent::allowsManyEmblems() + { + return false; + } + + emblems_t + Agent::getEmblems() + { + emblems_t ret; + ret.push_back( getEmblem() ); + return ret; + } + + void + Agent::setEmblems( const emblems_t& el ) + { + if( el.size() > 1 ) + { + fh_stringstream ss; + ss << "Agent can not handle classification with a set of outcomes"; + Throw_AgentOnlyHandlesOneEmblemException( tostr(ss), 0 ); + } + if( !el.empty() ) + { + setEmblem( el.front() ); + } + } + + fh_personality + Agent::getPersonality() + { + return m_pers; + } + + void + Agent::setPersonality( fh_personality pers ) + { + m_pers = pers; + setAgentConfig( getUUID(), AI_AGENT_PERSID_KEY, tostr( pers->getID() ) ); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * This is a liaison class giving a ferris world view of binary classifier + * agents. + * + * Ferris apps should use this class, folks writing agents should use the + * BinaryClassifierAgentImplementation class. + * + * This also abstracts away the personality that the agent will be using. + * It is thus fully in libferris' control as to what agents get to + * assign what emblems and what personalities are used by those agents. + */ + class FERRISEXP_DLLLOCAL BinaryClassifierAgent + : + public Agent + { + friend fh_agent loadAgent( const std::string& agentUUID ); + friend fh_agent createBinaryAgent( const std::string& agentName, + const std::string& agentImplemenationName, + const std::string& stateDir, + fh_emblem em, + fh_personality pers ); + + fh_bAgentImpl m_agent; + fh_bTrainerImpl m_trainer; + + BinaryClassifierAgent( const std::string& uuid, + const std::string& name, + fh_bAgentImpl m_agent, + fh_emblem em, + fh_personality pers ); + + + /** + * Throw an exception if the object is not in a valid state. + * This method can be called to ensure we have bindings for + * all object variables. + */ + void assertWeAreValid(); + + public: + virtual ~BinaryClassifierAgent(); + + + virtual void addTrainingExample( fh_context c ); + virtual void train(); + virtual void classify( fh_context c ); + + std::string getAgentImplemenationName(); + void setAgentImplemenationName( const std::string& v ); + + virtual std::string getStateDir(); + virtual void setStateDir( const std::string& v ); + virtual stringlist_t getAlternateImplementationNames(); + + }; + + /** + * This class contains all the active agents and will + * classify a file using each agent that the user currently wants + * involved in classification. + */ + class FERRISEXP_DLLLOCAL CompleteAgent + : + public Agent + { + friend fh_agent getCompleteAgent(); + + typedef std::list< fh_agent > m_agents_t; + m_agents_t m_agents; + + CompleteAgent(); + public: + virtual ~CompleteAgent(); + + virtual void addTrainingExample( fh_context c ); + virtual void train(); + virtual void classify( fh_context c ); + + virtual std::string getAgentImplemenationName() + { + return "none"; + } + + virtual void setAgentImplemenationName( const std::string& v ) + { + } + virtual std::string getStateDir() + { + return ""; + } + virtual void setStateDir( const std::string& v ) + { + } + virtual stringlist_t getAlternateImplementationNames() + { + stringlist_t d; + return d; + } + + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + stringlist_t& + getBinaryAgentImplemenationNames() + { + static stringlist_t sl; + return sl; + } + + + stringlist_t& + getAgentNames() + { + static stringlist_t ret; + + ret.clear(); + agents_t::iterator end = getAllAgents().end(); + for( agents_t::iterator di = getAllAgents().begin(); di!=end; ++di ) + { + ret.push_back( di->first ); + } + + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + BinaryClassifierAgent::BinaryClassifierAgent( + const std::string& uuid, + const std::string& name, + fh_bAgentImpl m_agent, + fh_emblem em, + fh_personality pers ) + : + Agent( uuid, + name, + em, + pers ), + m_agent( m_agent ), + m_trainer( 0 ) + { + } + + BinaryClassifierAgent::~BinaryClassifierAgent() + { + } + + std::string + BinaryClassifierAgent::getAgentImplemenationName() + { + return m_agent->getImplementationName(); + } + + void + BinaryClassifierAgent::setAgentImplemenationName( const std::string& v ) + { + if( v != getAgentImplemenationName() ) + { + fh_bAgentImpl agent = + BinaryClassifierAgentImplemenationFactory::Instance().CreateObject( v ); + agent->setStateDir( m_agent->getStateDir() ); + m_agent = agent; + } + + setAgentConfig( getUUID(), AI_AGENT_IMPLEMENATION_KEY, v ); + } + + std::string + BinaryClassifierAgent::getStateDir() + { + return m_agent->getStateDir(); + } + + void + BinaryClassifierAgent::setStateDir( const std::string& v ) + { + m_agent->setStateDir( v ); + setAgentConfig( getUUID(), AI_AGENT_STATEDIR_KEY, v ); + } + + void + BinaryClassifierAgent::assertWeAreValid() + { + } + + stringlist_t + BinaryClassifierAgent::getAlternateImplementationNames() + { + stringlist_t ret; + + stringlist_t& sl = getBinaryAgentImplemenationNames(); + copy( sl.begin(), sl.end(), back_inserter( ret )); + + return ret; + } + + void + BinaryClassifierAgent::addTrainingExample( fh_context c ) + { + assertWeAreValid(); + + if( !m_trainer ) + { + m_trainer = m_agent->getTrainer(); + } + + fh_medallion med = c->getMedallion(); + bool desired = med->hasEmblem( getEmblem() ); + +// cerr << "BinaryClassifierAgent::addTrainingExample() c:" << c->getURL() +// << " desired:" << desired +// << endl; + m_trainer->addCase( c, + desired + ? MedallionBelief::SURENESS_MAX + : MedallionBelief::SURENESS_MIN ); + } + + void + BinaryClassifierAgent::train() + { + assertWeAreValid(); + + m_trainer->train(); + m_trainer = 0; + } + + void + BinaryClassifierAgent::classify( fh_context c ) + { + assertWeAreValid(); + + double sureness = m_agent->classify( c ); + fh_medallion med = c->getMedallion(); + med->addEmblem( getEmblem(), getPersonality(), sureness ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + CompleteAgent::CompleteAgent() + : + Agent( COMPLETE_AGENT_UUID, COMPLETE_AGENT_NAME, 0, 0 ) + { + stringlist_t& sl = getAgentNames(); + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + m_agents.push_back( getAgent( *si ) ); + } + } + + CompleteAgent::~CompleteAgent() + { + } + + void + CompleteAgent::addTrainingExample( fh_context c ) + { + for( m_agents_t::iterator di = m_agents.begin(); di != m_agents.end(); ++di ) + { + (*di)->addTrainingExample( c ); + } + } + + void + CompleteAgent::train() + { + for( m_agents_t::iterator di = m_agents.begin(); di != m_agents.end(); ++di ) + { + (*di)->train(); + } + } + + void + CompleteAgent::classify( fh_context c ) + { + for( m_agents_t::iterator di = m_agents.begin(); di != m_agents.end(); ++di ) + { + (*di)->classify( c ); + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_agent createBinaryAgent( const std::string& agentName, + const std::string& agentImplemenationName, + const std::string& stateDir, + fh_emblem em, + fh_personality pers ) + { + fh_agent ret = 0; + + // make sure the name is not in use + stringlist_t& sl = getBinaryAgentImplemenationNames(); + if( sl.end() != find( sl.begin(), sl.end(), agentName )) + { + fh_stringstream ss; + ss << "Can not create a new agent with name:" << agentName + << " because an agent already exists with that name" << endl; + Throw_AgentAlreadyExistsException( tostr(ss), 0 ); + } + + std::string uuid = Util::makeUUID(); + + fh_bAgentImpl agent = + BinaryClassifierAgentImplemenationFactory::Instance().CreateObject( + agentImplemenationName ); + agent->setStateDir( stateDir ); + agent->initialize(); + ret = new BinaryClassifierAgent( uuid, + agentName, + agent, + em, + pers ); + + setAgentConfig( uuid, AI_AGENT_NAME_KEY, agentName ); + setAgentConfig( uuid, AI_AGENT_IMPLEMENATION_KEY, agentImplemenationName ); + setAgentConfig( uuid, AI_AGENT_STATEDIR_KEY, stateDir ); + setAgentConfig( uuid, AI_AGENT_EMBLEMID_KEY, tostr( em->getID() ) ); + setAgentConfig( uuid, AI_AGENT_PERSID_KEY, tostr( pers->getID() ) ); + setAgentConfig( uuid, AI_AGENT_TYPE_KEY, AI_AGENT_TYPE_BINARY ); + + { + string n = getEDBString( FDB_GENERAL, + AI_AGENT_UUIDLIST_KEY, + AI_AGENT_UUIDLIST_DEFAULT ); + stringlist_t sl = Util::parseCommaSeperatedList( n ); + sl.push_back( uuid ); + setEDBString( FDB_GENERAL, AI_AGENT_UUIDLIST_KEY, Util::createCommaSeperatedList( sl )); + } + + return ret; + } + + + fh_agent getAgent( const std::string& agentName ) + { + agents_t::iterator di = getAllAgents().find( agentName ); + if( di == getAllAgents().end() ) + { + fh_stringstream ss; + ss << "No agent exists with name:" << agentName; + Throw_NoSuchAgentException( tostr(ss), 0 ); + } + return di->second; + } + + void + eraseAgent( fh_agent d ) + { + string name = d->getName(); + + string n = getEDBString( FDB_GENERAL, + AI_AGENT_UUIDLIST_KEY, + AI_AGENT_UUIDLIST_DEFAULT ); + stringlist_t sl = Util::parseCommaSeperatedList( n ); + sl.erase( find( sl.begin(), sl.end(), d->getUUID() ) ); + setEDBString( FDB_GENERAL, AI_AGENT_UUIDLIST_KEY, Util::createCommaSeperatedList( sl )); + } + + fh_agent getCompleteAgent() + { + fh_agent ret = new CompleteAgent(); + return ret; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +#ifdef HAVE_BOGOFILTER + + class BogoFilter_BinaryClassifierAgentImplemenation; + FERRIS_SMARTPTR( BogoFilter_BinaryClassifierAgentImplemenation, fh_bogoAgentImpl ); + + class FERRISEXP_DLLLOCAL BogoFilter_BinaryClassifierAgentTrainerImplemenation + : + public BinaryClassifierAgentTrainerImplemenation + { + fh_bTrainerImplStateMinder m_stateMinder; + + typedef list< pair< fh_context, double > > m_cases_t; + m_cases_t m_added_cases; + m_cases_t m_removed_cases; + + fh_bogoAgentImpl m_agent; + + public: + + BogoFilter_BinaryClassifierAgentTrainerImplemenation( fh_bogoAgentImpl agent ); + virtual void addCase( fh_context c, double desiredOutCome ); + virtual void removeCase( fh_context c ); + virtual void trainOnFile( fh_context c, + double sureness, + bool wasAdded ); + virtual void train(); + virtual void sync(); + }; + + + class FERRISEXP_DLLLOCAL BogoFilter_BinaryClassifierAgentImplemenation + : + public BinaryClassifierAgentImplemenation + { + + public: + + string getCommandName(); + void addParsingCommandLineOptions( fh_stringstream& ss, bool fileIsHTML = false ); + void addConfigfileCommandLineOptions( fh_stringstream& ss ); + fh_bTrainerImpl getTrainer(); + virtual double classify( fh_context c ); + + fh_runner getRunner(); + std::string getImplementationName() + { + return "bogofilter"; + } + }; + static bool + BogoFilter_BinaryClassifierAgentImplemenation_Registered = + RegisterBinaryClassifierAgentImplemenationFactory( +// BinaryClassifierAgentImplemenationFactory::Instance().Register( + "bogofilter", + &MakeObject< BinaryClassifierAgentImplemenation, BogoFilter_BinaryClassifierAgentImplemenation >::Create ); + + /********************/ + /********************/ + /********************/ + + BogoFilter_BinaryClassifierAgentTrainerImplemenation::BogoFilter_BinaryClassifierAgentTrainerImplemenation( + fh_bogoAgentImpl agent ) + : + m_agent( agent ) + { + m_stateMinder->load( agent->getStateDir() ); + } + + void + BogoFilter_BinaryClassifierAgentTrainerImplemenation::addCase( + fh_context c, double desiredOutCome ) + { + m_stateMinder->addCase( c, desiredOutCome ); + m_added_cases.push_back( make_pair( c, desiredOutCome )); + } + void + BogoFilter_BinaryClassifierAgentTrainerImplemenation::removeCase( fh_context c ) + { + string earl = c->getURL(); + m_removed_cases.push_back( make_pair( c, m_stateMinder->lookup( earl ) )); + m_stateMinder->removeCase( c ); + } + + void + BogoFilter_BinaryClassifierAgentTrainerImplemenation::sync() + { + m_stateMinder->sync( m_agent->getStateDir() ); + } + + void + BogoFilter_BinaryClassifierAgentTrainerImplemenation::trainOnFile( + fh_context c, double sureness, bool wasAdded ) + { +// cerr << "training on, outcome:" << sureness << " c:" << c->getURL() << endl; + + fh_stringstream ss; + ss << m_agent->getCommandName() << " "; + + if( wasAdded ) + { + if( sureness > MedallionBelief::SURENESS_NULL ) + ss << " -n "; + else + ss << " -s "; + } + else + { + if( sureness > MedallionBelief::SURENESS_NULL ) + ss << " -N "; + else + ss << " -S "; + } + + + m_agent->addConfigfileCommandLineOptions( ss ); + m_agent->addParsingCommandLineOptions( ss ); + +// cerr << "TrainCMD:" << tostr(ss) << endl; + + fh_runner r = m_agent->getRunner(); + r->setCommandLine( tostr(ss) ); + r->Run(); + { + fh_istream iss = c->getIStream(); + fh_ostream oss = r->getStdIn(); + + copy( istreambuf_iterator(iss), + istreambuf_iterator(), + ostreambuf_iterator(oss)); + oss << flush; + } + close( r->getStdInFd() ); + gint e = r->getExitStatus(); + } + + void + BogoFilter_BinaryClassifierAgentTrainerImplemenation::train() + { + for( m_cases_t::iterator ci = m_added_cases.begin(); + ci!=m_added_cases.end(); ++ci ) + { + fh_context c = ci->first; + double outcome = ci->second; + + trainOnFile( c, outcome, true ); + } + + for( m_cases_t::iterator ci = m_removed_cases.begin(); + ci!=m_removed_cases.end(); ++ci ) + { + fh_context c = ci->first; + double outcome = ci->second; + + trainOnFile( c, outcome, false ); + } + } + + + /********************/ + /********************/ + /********************/ + + string + BogoFilter_BinaryClassifierAgentImplemenation::getCommandName() + { + return "bogofilter"; + } + + void + BogoFilter_BinaryClassifierAgentImplemenation::addParsingCommandLineOptions( fh_stringstream& ss, + bool fileIsHTML ) + { + ss << " -PH -Pi "; + if( fileIsHTML ) ss << " -Pt "; + else ss << " -PT "; + } + + void + BogoFilter_BinaryClassifierAgentImplemenation::addConfigfileCommandLineOptions( fh_stringstream& ss ) + { + ss << " -d " << getStateDir(); + ss << " -W "; + } + + fh_bTrainerImpl + BogoFilter_BinaryClassifierAgentImplemenation::getTrainer() + { + return new BogoFilter_BinaryClassifierAgentTrainerImplemenation( this ); + } + + double + BogoFilter_BinaryClassifierAgentImplemenation::classify( fh_context c ) + { + fh_stringstream ss; + ss << getCommandName() << " "; + addConfigfileCommandLineOptions( ss ); + addParsingCommandLineOptions( ss ); + ss << " -T -3 "; + +// cerr << "Classify CMD:" << tostr(ss) << endl; + + double ret = 0; + + fh_runner r = getRunner(); + r->setCommandLine( tostr(ss) ); + r->Run(); + + { + fh_ostream oss = r->getStdIn(); + fh_istream iss = c->getIStream(); + +// copy( istreambuf_iterator(iss), +// istreambuf_iterator(), +// ostreambuf_iterator(oss)); +// oss << flush; + + char c; + int byteW = 0; + for( ; iss >> noskipws >> c; ++byteW ) + oss << c; + oss << flush; + + } + close( r->getStdInFd() ); + + fh_istream cmdoutput = r->getStdOut(); + char yesno = ' '; + cmdoutput >> yesno; + cmdoutput >> ret; + +// cerr << "Classify YesNo1:" << yesno << " ret:" << ret << endl; + + if( yesno == 'H' ) + { + ret *= 100; + } + else if( yesno == 'S' ) + { + ret *= -100; + } + else + ret = 0; + + gint e = r->getExitStatus(); +// cerr << "Classify(9) e:" << e << endl; +// cerr << "Classify YesNo:" << yesno << " ret:" << ret << endl; + return ret; + } + + fh_runner + BogoFilter_BinaryClassifierAgentImplemenation::getRunner() + { + fh_runner r = new Runner(); + r->setSpawnFlags( + GSpawnFlags( G_SPAWN_SEARCH_PATH | + G_SPAWN_DO_NOT_REAP_CHILD | + G_SPAWN_STDERR_TO_DEV_NULL | + r->getSpawnFlags())); + r->setConnectStdIn( true ); + + return r; + } + + +#endif + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_agent loadAgent( const std::string& agentUUID ) + { + fh_agent ret = 0; + + string agentName = getAgentConfig( agentUUID, + AI_AGENT_NAME_KEY, + AI_AGENT_NAME_DEFAULT ); + + string agentImplemenationName = getAgentConfig( agentUUID, + AI_AGENT_IMPLEMENATION_KEY, + AI_AGENT_IMPLEMENATION_DEFAULT ); + string stateDir = getAgentConfig( agentUUID, + AI_AGENT_STATEDIR_KEY, + AI_AGENT_STATEDIR_DEFAULT ); + string emblemID = getAgentConfig( agentUUID, + AI_AGENT_EMBLEMID_KEY, + AI_AGENT_EMBLEMID_DEFAULT ); + string persID = getAgentConfig( agentUUID, + AI_AGENT_PERSID_KEY, + AI_AGENT_PERSID_DEFAULT ); + + string agentType = getAgentConfig( agentUUID, + AI_AGENT_TYPE_KEY, + AI_AGENT_TYPE_DEFAULT ); + + fh_etagere et = Factory::getEtagere(); + fh_emblem em = et->getEmblemByID( toType( emblemID )); + fh_personality pers = obtainPersonality( toType( persID )); + + fh_bAgentImpl agent = + BinaryClassifierAgentImplemenationFactory::Instance().CreateObject( + agentImplemenationName ); + agent->setStateDir( stateDir ); + agent->initialize(); + + ret = new BinaryClassifierAgent( agentUUID, agentName, agent, em, pers ); + return ret; + } + + /** + * A nice little static cache of loaded persistent agents + */ + agents_t& getAllAgents( bool forceReload ) + { + static agents_t cache; + if( forceReload || cache.empty() ) + { + cache.clear(); + string n = getEDBString( FDB_GENERAL, + AI_AGENT_UUIDLIST_KEY, + AI_AGENT_UUIDLIST_DEFAULT ); + stringlist_t sl = Util::parseCommaSeperatedList( n ); + + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + fh_agent d = loadAgent( *si ); + cache.insert( make_pair( d->getName(), d )); + } + } + return cache; + } + + }; +}; diff --git a/Ferris/Agent.hh b/Ferris/Agent.hh new file mode 100644 index 0000000..c11237b --- /dev/null +++ b/Ferris/Agent.hh @@ -0,0 +1,196 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Agent.hh,v 1.2 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_AGENT_H_ +#define _ALREADY_INCLUDED_FERRIS_AGENT_H_ + +#include + +#include +#include +#include + +namespace Ferris +{ + namespace AI + { + + class Agent; + FERRIS_SMARTPTR( Agent, fh_agent ); + + /** + * Get the names of all agents that have been created. + * + * Agent creation can be done via the agent capplet or + * using one of the createBinaryAgent() type calls. + */ + FERRISEXP_API stringlist_t& getAgentNames(); + + /** + * Get a reference to an agent given its name. There will + * only be one instance of that agent in any given process + * subsequent calls to getAgent() with the same name return + * the same instance. + */ + FERRISEXP_API fh_agent getAgent( const std::string& agentName ); + + /** + * Create an agent that can apply all agents that the + * user has setup to classify a file. + */ + FERRISEXP_API fh_agent getCompleteAgent(); + + /** + * Remove an agent from the system. Future calls to + * getAgent() for this agent name will fail, future calls to + * createBinaryAgent() with this agent name will create a + * new persistant agent instance. + */ + FERRISEXP_API void eraseAgent( fh_agent d ); + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Get the names of all the binary agents the system knows about. + * These are the only valid values for agentImplemenationName in + * createBinaryAgent() + */ + FERRISEXP_API stringlist_t& getBinaryAgentImplemenationNames(); + + /** + * libferris clients wanting to run agents over a file should + * use getCompleteAgent(). This is only for creating new agent + * instances. + * + * Create a binary classification agent given the agent's + * name. This agent will be using the given emblem to assign its + * fuzzy results to and to train on. The stateDir is where this agent + * will live and it can store its learnt state in that directory. + * + * @see getAgent() + */ + FERRISEXP_API fh_agent createBinaryAgent( const std::string& agentName, + const std::string& agentImplemenationName, + const std::string& stateDir, + fh_emblem em, + fh_personality pers ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + /** + * This is a liaison class giving a ferris world view of agents. + * An agent is a persistent binding between an AgentImplementation + * where its state shall be stored, what emblem(s) to use for storing + * beliefs and what personality the agent should use when making assertion + * and retraction statements. + * + * Ferris apps should use this class, folks writing agent implemenations + * or looking to hookup their favorate AI algorithm should see Ferris/Agent.cpp + * and a subclass of AgentImplemenation for example, BinaryClassifierAgentImplemenation. + * + * As this is the primary abstraction for interacting with the agents in + * the ferris world this class gets to be called Agent. The implementation + * that an agent uses to actually perform its task is not exported to + * the ferris world and exists only as AgentImplemenation subclasses that are + * conditionally compiled within Agent.cpp + */ + class FERRISEXP_API Agent + : + public Handlable + { + + std::string m_uuid; + std::string m_name; + fh_emblem m_em; + fh_personality m_pers; + + void save(); + + public: + + Agent( const std::string& UUID, + const std::string& name, + fh_emblem em, + fh_personality pers ); + + std::string getUUID(); + std::string getName(); + void setName( const std::string& v ); + fh_emblem getEmblem(); + void setEmblem( fh_emblem em ); + + bool allowsManyEmblems(); + Ferris::emblems_t getEmblems(); + void setEmblems( const Ferris::emblems_t& el ); + + fh_personality getPersonality(); + void setPersonality( fh_personality pers ); + virtual std::string getAgentImplemenationName() = 0; + virtual void setAgentImplemenationName( const std::string& v ) = 0; + virtual std::string getStateDir() = 0; + virtual void setStateDir( const std::string& v ) = 0; + virtual stringlist_t getAlternateImplementationNames() = 0; + + + /** + * Add a training example + */ + virtual void addTrainingExample( fh_context c ) = 0; + + /** + * retain agent + */ + virtual void train() = 0; + + /** + * Attach belief to context based on what the agent thinks. + */ + virtual void classify( fh_context c ) = 0; + + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + }; +}; +#endif diff --git a/Ferris/AgentSVMLight.cpp b/Ferris/AgentSVMLight.cpp new file mode 100644 index 0000000..273a6a7 --- /dev/null +++ b/Ferris/AgentSVMLight.cpp @@ -0,0 +1,916 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: AgentSVMLight.cpp,v 1.3 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris::FullTextIndex; +using namespace STLdb4; + + +namespace Ferris +{ + + namespace AI + { + + typedef map< termid_t, double > FeatureSet_t; + + class SvmLight_BinaryClassifierAgentImplemenation; + FERRIS_SMARTPTR( SvmLight_BinaryClassifierAgentImplemenation, fh_svmLightAgentImpl ); + + class FERRISEXP_DLLLOCAL SvmLight_BinaryClassifierAgentTrainerImplemenation + : + public BinaryClassifierAgentTrainerImplemenation + { + fh_svmLightAgentImpl m_agent; + + + bool m_dirty; + FeatureSet_t m_TotalTF; // Total number of times each term appears. + + struct TrainCase + { + double desiredOutCome; + FeatureSet_t m_features; + + TrainCase( double desiredOutCome ) + : + desiredOutCome( desiredOutCome ) + { + }; + }; + typedef list< pair< string, TrainCase > > m_cases_t; + m_cases_t m_cases; + + + public: + + SvmLight_BinaryClassifierAgentTrainerImplemenation( fh_svmLightAgentImpl agent ); + virtual void addCase( fh_context c, double desiredOutCome ); + virtual void removeCase( fh_context c ); + virtual void train(); + virtual void sync(); + void load(); + }; + + + /** + * This is a binary classifier using support vector models and in particular + * the svm_light library by Thorsten Joachims to provide the core of the SVM logic. + * + * A big thanks to Thorsten Joachims for putting up with my pesky + * questions about how to feed a SVM machine :) Hopefully most of + * the little assumptions I made to avoid pestering Thorsten are + * correct enough until I get the SVM text classification book. + */ + class FERRISEXP_DLLLOCAL SvmLight_BinaryClassifierAgentImplemenation + : + public BinaryClassifierAgentImplemenation, + public PathManager + { + typedef BinaryClassifierAgentImplemenation _Base; + + friend class SvmLight_BinaryClassifierAgentTrainerImplemenation; + + fh_lexicon m_lex; + fh_database m_db; + FeatureSet_t m_overallCounts; // contains the IDF for each term known. + termid_t m_highestTermID; + + void save(); + void load(); + + public: + SvmLight_BinaryClassifierAgentImplemenation(); + ~SvmLight_BinaryClassifierAgentImplemenation(); + virtual void setStateDir( const std::string& s ); + + fh_database getDB(); + void sync(); + + void convertTermFrequencyToIDFValues( int N, FeatureSet_t& features ); + void convertIDFToTermFrequencyValues( int N, FeatureSet_t& features ); + FeatureSet_t& scaleTermFreqFeatureSetByIDFSet( FeatureSet_t& input, FeatureSet_t& scale ); + FeatureSet_t& normalize( FeatureSet_t& input ); + + + typedef map< string, termid_t > m_getTermID_Cache_t; + m_getTermID_Cache_t m_getTermID_Cache; + termid_t getTermID( const std::string& term, bool CreateIfDoesntExist = false ); + string getToken( fh_istream& iss ); + FeatureSet_t& calculateTermFreq( fh_context c, + FeatureSet_t& s, + FeatureSet_t& overallCounts, + bool CreateIfDoesntExist ); + + + double readSerializedFeatureSet( fh_istream& oss, FeatureSet_t& features ); + void writeSerializedFeatureSet( fh_ostream& oss, double choice, FeatureSet_t& features ); + + fh_bTrainerImpl getTrainer(); + virtual double classify( fh_context c ); + + + string getModelFileName(); + string getCommandName(); + fh_runner getRunner(); + std::string getImplementationName() + { + return "svm_light"; + } + + // PathManager + virtual std::string getBasePath() + { + return getStateDir(); + } + + virtual std::string getConfig( const std::string& k, const std::string& def, + bool throw_for_errors = false ) + { + return def; + } + virtual void setConfig( const std::string& k, const std::string& v ) + {} + + }; + static bool + SvmLight_BinaryClassifierAgentImplemenation_Registered = + RegisterBinaryClassifierAgentImplemenationFactory( +// BinaryClassifierAgentImplemenationFactory::Instance().Register( + "svm_light", + &MakeObject< BinaryClassifierAgentImplemenation, SvmLight_BinaryClassifierAgentImplemenation >::Create ); + + /********************/ + /********************/ + /********************/ + + + SvmLight_BinaryClassifierAgentTrainerImplemenation::SvmLight_BinaryClassifierAgentTrainerImplemenation( + fh_svmLightAgentImpl agent ) + : + m_agent( agent ), + m_dirty( false ) + { + load(); + } + + void + SvmLight_BinaryClassifierAgentTrainerImplemenation::addCase( fh_context c, double desiredOutCome ) + { + m_dirty = true; + + string earl = c->getURL(); + m_cases.push_back( make_pair( earl, TrainCase( desiredOutCome ) )); + + TrainCase& d = m_cases.back().second; + double outcome = d.desiredOutCome; + FeatureSet_t& features = d.m_features; + int numberOfDocuments = m_cases.size(); + + m_agent->calculateTermFreq( c, features, m_TotalTF, true ); + +// m_agent->convertTermFrequencyToIDFValues( numberOfDocuments, m_agent->m_overallCounts ); +// m_agent->scaleTermFreqFeatureSetByIDFSet( d.m_features, overallCounts ); +// m_agent->normalize( d.m_features ); + + } + + template< class T > + struct firstEquals + { + typedef typename T::first_type V; + + V v; + firstEquals( V& v ) : v(v) + {} + + bool operator()( T& x ) + { + return v == x.first; + } + }; + + + void + SvmLight_BinaryClassifierAgentTrainerImplemenation::removeCase( fh_context c ) + { + m_dirty = true; + + string earl = c->getURL(); + m_cases_t::iterator ci = find_if( m_cases.begin(), + m_cases.end(), + firstEquals< pair< string, TrainCase > >(earl) ); + if( ci != m_cases.end() ) + { + // + // We have to remove its effect from the TotalTF and IDF figures. + // + TrainCase& d = ci->second; + FeatureSet_t& features = d.m_features; + + for( FeatureSet_t::iterator fi = features.begin(); fi!=features.end(); ++fi ) + { + m_TotalTF[ fi->first ] -= fi->second; + } + + // + // And now we can forget about this test case. sync() will remove it for us. + // + m_cases.erase( ci ); + } + } + + + void + SvmLight_BinaryClassifierAgentTrainerImplemenation::load() + { +// cerr << "Reading the total TF FeatureSet from:" +// << m_agent->getStateDir() + "/ferris_total_tf" +// << endl; + + { + string FileName = m_agent->getStateDir() + "/ferris_total_tf"; + fh_ifstream iss( FileName ); + m_agent->readSerializedFeatureSet( iss, m_TotalTF ); +// cerr << "m_TotalTF.size:" << m_TotalTF.size() << endl; + } + + { + string FileListFileName = m_agent->getStateDir() + "/ferris_training_filelist"; + string FeaturesFileName = m_agent->getStateDir() + "/ferris_training_features"; + fh_ifstream iss_fname( FileListFileName ); + fh_ifstream iss_features( FeaturesFileName ); + string s; + + while( getline( iss_fname, s )) + { + double desiredOutCome = 0; + m_cases.push_back( make_pair( s, TrainCase( desiredOutCome ) )); + TrainCase& d = m_cases.back().second; + d.desiredOutCome = m_agent->readSerializedFeatureSet( iss_features, d.m_features ); + +// cerr << "Loaded " << d.m_features.size() << " features for:" << s << endl; + } + } + } + + void + SvmLight_BinaryClassifierAgentTrainerImplemenation::sync() + { + if( m_dirty ) + { + m_dirty = false; + + { + string FileName = m_agent->getStateDir() + "/ferris_total_tf"; + fh_ofstream oss( FileName ); + m_agent->writeSerializedFeatureSet( oss, 0, m_TotalTF ); + oss << flush; + } + + + { + string FileListFileName = m_agent->getStateDir() + "/ferris_training_filelist"; + string FeaturesFileName = m_agent->getStateDir() + "/ferris_training_features"; + fh_ofstream oss_fname( FileListFileName ); + fh_ofstream oss_features( FeaturesFileName ); + + for( m_cases_t::iterator ci = m_cases.begin(); ci!=m_cases.end(); ++ci ) + { + TrainCase& d = ci->second; + + oss_fname << ci->first << endl; + m_agent->writeSerializedFeatureSet( oss_features, + d.desiredOutCome, + d.m_features ); + } + oss_fname << flush; + oss_features << flush; + } + + + } + } + + void + SvmLight_BinaryClassifierAgentTrainerImplemenation::train() + { + int numberOfDocuments = m_cases.size(); + FeatureSet_t& overallCounts = m_agent->m_overallCounts; + overallCounts.clear(); + overallCounts = m_TotalTF; + m_agent->convertTermFrequencyToIDFValues( numberOfDocuments, overallCounts ); + m_agent->sync(); + + + // + // We want to scale the FeatureSet TF counts by the IDF and then + // normalize them for svm_learn but we then want to throw away + // that scaled data and go back to having just the TF FeatureSet values + // + sync(); + + + +// int numberOfDocuments = m_cases.size(); +// FeatureSet_t& overallCounts = m_agent->m_overallCounts; +// overallCounts.clear(); + +// for( m_cases_t::iterator ci = m_cases.begin(); ci!=m_cases.end(); ++ci ) +// { +// fh_context c = ci->first; +// TrainCase& d = ci->second; +// double outcome = d.desiredOutCome; + +// cerr << "training on, outcome:" << outcome << " c:" << c->getURL() << endl; + +// m_agent->calculateTermFreq( c, d.m_features, overallCounts, true ); +// } +// m_agent->convertTermFrequencyToIDFValues( numberOfDocuments, overallCounts ); + +// // sync all lexicon/IDF changes here while debugging. +// m_agent->sync(); + + for( m_cases_t::iterator ci = m_cases.begin(); ci!=m_cases.end(); ++ci ) + { + TrainCase& d = ci->second; + m_agent->scaleTermFreqFeatureSetByIDFSet( d.m_features, overallCounts ); + m_agent->normalize( d.m_features ); + } + + + // + // We now have the feature set which is the TF * IDF for each term in each document. + // + // For the first attempt we will create an input file that is in the format that + // the svm_learn command line tool is expecting. + // This gives the ability to debug the values while developing and the time critical + // case is by far the svm_classify() case rather than training. + // + string trainingFileName = m_agent->getStateDir() + "/tmp_svm_training_input"; + fh_ofstream oss( trainingFileName ); +// cerr << "Number of training cases:" << m_cases.size() << endl; + + for( m_cases_t::iterator ci = m_cases.begin(); ci!=m_cases.end(); ++ci ) + { + TrainCase& d = ci->second; + m_agent->writeSerializedFeatureSet( oss, d.desiredOutCome, d.m_features ); + } + oss << flush; + + // + // Throw away the scaled and normailized FeatureSets for the files + // + load(); + + + fh_stringstream ss; + ss << "svm_learn "; + ss << " " << trainingFileName << " "; + ss << m_agent->getModelFileName(); + +// cerr << "SVM CMD:" << tostr(ss) << endl; + + fh_runner r = m_agent->getRunner(); + r->setCommandLine( tostr(ss) ); + r->Run(); + gint e = r->getExitStatus(); + +// cerr << "SVM e:" << e << " for CMD:" << tostr(ss) << endl; + + sync(); + m_agent->sync(); + m_cases.clear(); + } + + /********************/ + /********************/ + /********************/ + +// const char* SVMLIGHT_LEXICON_CLASS_DEFAULT = "FrontCodedBlocks (3-in-4)"; + const char* SVMLIGHT_LEXICON_CLASS_DEFAULT = "XML"; + const char* SVMLIGHT_CFG_NEXT_TID_KEY = "config-next-termid"; + + SvmLight_BinaryClassifierAgentImplemenation::SvmLight_BinaryClassifierAgentImplemenation() + : + m_lex( 0 ), + m_highestTermID( 0 ) + { + } + + SvmLight_BinaryClassifierAgentImplemenation::~SvmLight_BinaryClassifierAgentImplemenation() + { + } + + void + SvmLight_BinaryClassifierAgentImplemenation::setStateDir( const std::string& s ) + { + _Base::setStateDir( s ); + m_lex = LexiconFactory::Instance().CreateObject( SVMLIGHT_LEXICON_CLASS_DEFAULT ); + m_lex->setPathManager( this ); + m_lex->setIndex( 0 ); + } + + + /** + * Have to save and load the IDF FeatureSet ourself :( + */ + void + SvmLight_BinaryClassifierAgentImplemenation::save() + { + fh_ofstream oss( getStateDir() + "/idf-vector" ); + writeSerializedFeatureSet( oss, 1, m_overallCounts ); + } + + /** + * Have to save and load the IDF FeatureSet ourself :( + */ + void + SvmLight_BinaryClassifierAgentImplemenation::load() + { + fh_ifstream iss( getStateDir() + "/idf-vector" ); + readSerializedFeatureSet( iss, m_overallCounts ); + } + + + void + SvmLight_BinaryClassifierAgentImplemenation::sync() + { + save(); + + if( m_lex ) + m_lex->sync(); + + if( m_highestTermID ) + { + getDB()->set( SVMLIGHT_CFG_NEXT_TID_KEY, tostr(m_highestTermID) ); + } + + if( m_db ) + m_db->sync(); + } + + + fh_database + SvmLight_BinaryClassifierAgentImplemenation::getDB() + { + if( !m_db ) + { + try + { + m_db = new Database( getStateDir() + "/ferris-svm-config.db" ); + } + catch( dbNonExist& e ) + { +// cerr << "Creating database..." << endl; + m_db = new Database( DB_HASH, getStateDir() + "/ferris-svm-config.db" ); + m_db->set( SVMLIGHT_CFG_NEXT_TID_KEY, "0" ); + m_db->sync(); +// cerr << "Created db" << endl; + } + } + return m_db; + } + + + string + SvmLight_BinaryClassifierAgentImplemenation::getModelFileName() + { + return getStateDir() + "/" + "svm_light_model"; + } + + string + SvmLight_BinaryClassifierAgentImplemenation::getCommandName() + { + return "svm_classify"; + } + + fh_bTrainerImpl + SvmLight_BinaryClassifierAgentImplemenation::getTrainer() + { + return new SvmLight_BinaryClassifierAgentTrainerImplemenation( this ); + } + + /** + * Get or create a new termid for the given term string. the Mapping is + * persistent of string -> ID + * + * @param CreateIfDoesntExist if true then create a term if its not already there. + * Its redundant to create new termIDs when classifying because the feature + * can't match what we have learned on. + */ + termid_t + SvmLight_BinaryClassifierAgentImplemenation::getTermID( + const std::string& term, + bool CreateIfDoesntExist ) + { + m_getTermID_Cache_t::iterator ci = m_getTermID_Cache.find( term ); + if( ci != m_getTermID_Cache.end() ) + { + return ci->second; + } + + termid_t tid = m_lex->lookup( term ); + + if( CreateIfDoesntExist && !tid ) + { + fh_database db = getDB(); + string tids = "1"; + + if( m_highestTermID ) + { + ++m_highestTermID; + tid = m_highestTermID; + } + else + { +// cerr << "getting next tid..." << endl; + db->get( SVMLIGHT_CFG_NEXT_TID_KEY, tids ); +// cerr << "getting next tid...2" << endl; + tid = toType( tids ) + 1; + m_highestTermID = tid; +// db->set( SVMLIGHT_CFG_NEXT_TID_KEY, tostr(tid) ); + } + + m_lex->insert( term, tid ); + } + m_getTermID_Cache.insert( make_pair( term, tid )); + return tid; + } + + /** + * Get a token from the stream that us suitable as a feature + * + * @see getTermID() for how to turn the term returned into a unique ID + * suitable for use as a feature label for svm_light + */ + string + SvmLight_BinaryClassifierAgentImplemenation::getToken( fh_istream& iss ) + { + string s; + if( iss >> s && !iss.eof() ) + { + return s; + } + return ""; + } + + double + SvmLight_BinaryClassifierAgentImplemenation::readSerializedFeatureSet( + fh_istream& user_iss, FeatureSet_t& features ) + { + double choice = 5.0; + + string line; + if( getline( user_iss, line ) ) + { + fh_stringstream iss; + iss << line; + + iss >> choice; + + while( iss ) + { + termid_t tid = 0; + char colon = ':'; + double val = 0; + + if( iss >> tid && iss >> colon && iss >> val ) + { + features[ tid ] = val; + } + } + } + +// cerr << "readSerializedFeatureSet() size:" << features.size() << endl; + + return choice; + } + + + /** + * This takes a choice and a feature set and writes a serialized version + * to the given stream in a format that the svm_light 5.00 commands understands + */ + void + SvmLight_BinaryClassifierAgentImplemenation::writeSerializedFeatureSet( + fh_ostream& oss, + double choice, + FeatureSet_t& fs ) + { + int svmchoice = 0; + + if( choice < MedallionBelief::SURENESS_NULL ) + svmchoice = -1; + if( choice > MedallionBelief::SURENESS_NULL ) + svmchoice = 1; + + // -1 1:0.43 3:0.12 9284:0.2 + oss << svmchoice << " "; + for( FeatureSet_t::iterator iter = fs.begin(); iter != fs.end(); ++iter ) + { + oss << iter->first << ":" << iter->second << " "; + } + oss << endl; + } + + + /** + * This generates a featureSet for the given context which has as its values + * the r_d_t which is 1 + ln( f_d_t ); + * the r_d_t is also known as the TF or TermFrequency. + * + * The total number of times each term occurs is accumulated in overallCounts + * for use in generating the IDF using convertTermFrequencyToIDFValues() + * + * @param CreateIfDoesntExist If a term is found in the contents of 'c' that is not + * in the lexicon should it be added to the lexicon and feature set. + */ + FeatureSet_t& + SvmLight_BinaryClassifierAgentImplemenation::calculateTermFreq( fh_context c, + FeatureSet_t& features, + FeatureSet_t& overallCounts, + bool CreateIfDoesntExist ) + { + features.clear(); + bool isCaseSensitive = true; + + + fh_istream iss; + try + { + fh_attribute a = c->getAttribute( "as-text" ); + iss = a->getIStream(); + } + catch( exception& e ) + { + iss = c->getIStream(); + } + +// { +// Time::Benchmark frbm( "Time to read in c:" + c->getURL() ); +// frbm.start(); +// for( string s; !(s = getToken( iss )).empty(); ) +// { +// if( !isCaseSensitive ) +// { +// s = foldcase( s ); +// // cerr << "case folded:" << s << endl; +// } +// } +// frbm.print(); +// } +// iss = c->getIStream(); + + + for( string s; !(s = getToken( iss )).empty(); ) + { + if( !isCaseSensitive ) + { + s = foldcase( s ); +// cerr << "case folded:" << s << endl; + } + + termid_t tid = getTermID( s, true ); //, CreateIfDoesntExist ); +// cerr << "calculateTermFreq() s:" << s << " tid:" << tid << endl; + if( tid ) + { + features[ tid ] += 1; + overallCounts[ tid ] += 1; + } + } + + for( FeatureSet_t::iterator iter = features.begin(); iter != features.end(); ++iter ) + { + double f_d_t = iter->second; + double r_d_t = 1.0 + log( f_d_t ); + + iter->second = r_d_t; + } + + return features; + } + + /** + * This assumes that "features" has been updated to contain the total number of times + * a term occurs in all the training data. + * + * The result is a map from the term to the IDF (w_t). + * + * w_t = ln( 1 + N / f_t ); + * + * @param N number of documents + */ + void + SvmLight_BinaryClassifierAgentImplemenation::convertTermFrequencyToIDFValues( + int N, + FeatureSet_t& features ) + { + for( FeatureSet_t::iterator iter = features.begin(); iter != features.end(); ++iter ) + { + double f_t = iter->second; +// double w_t = log( 1.0 + N / f_t ); + double w_t = 1.0 / f_t; + iter->second = w_t; + } + } + + /** + * Inverse operation of convertTermFrequencyToIDFValues(). + * + * For a document count N and TF FeatureSet Z + * convertTermFrequencyToIDFValues( N, Z ); + * convertIDFToTermFrequencyValues( N, Z ); + * should give back the original Z FeatureSet. + */ + void + SvmLight_BinaryClassifierAgentImplemenation::convertIDFToTermFrequencyValues( + int N, + FeatureSet_t& features ) + { + for( FeatureSet_t::iterator iter = features.begin(); iter != features.end(); ++iter ) + { + double w_t = iter->second; +// double f_t = ( exp( w_t ) - 1.0 ) / N; + double f_t = 1.0 / w_t; + iter->second = f_t; + } + } + + + + /** + * This is ment to take a FeatureSet that continas the TF value and a FeatureSet + * that contains the IDF (as scale) and modify the input featureSet to become TF * IDF + * for each term. + */ + FeatureSet_t& + SvmLight_BinaryClassifierAgentImplemenation::scaleTermFreqFeatureSetByIDFSet( + FeatureSet_t& input, FeatureSet_t& scale ) + { + for( FeatureSet_t::iterator iter = input.begin(); iter != input.end(); ++iter ) + { + double tf = iter->second; + double w_d_t = tf * scale[ iter->first ]; + iter->second = tf; + } + } + + template + struct SumSquared : public binary_function + { + double operator()( double result, const _Tp& y) const + { + return result + pow( y.second , 2.0 ); + } + }; + + template + struct ScaleByValue : public unary_function + { + double scale; + ScaleByValue( double scale ) : scale( scale ) {} + + void operator() ( T& x ) + { + x.second = x.second * scale; + } + }; + + /** + * Given the vector x=(x_1,...,x_N) from TF * IDF scores, then you compute + * the normalized vectors xx=(xx_1,...,xx_N) as + * + * xx_i = x_i/\sqrt(\sum(x_i^2)) + * (in Latex notation). + * + */ + FeatureSet_t& + SvmLight_BinaryClassifierAgentImplemenation::normalize( FeatureSet_t& input ) + { + double SumOfSquares = accumulate( input.begin(), input.end(), + 0.0, SumSquared() ); + for_each( input.begin(), input.end(), + ScaleByValue( 1.0 / sqrt( SumOfSquares ) )); + } + + double + SvmLight_BinaryClassifierAgentImplemenation::classify( fh_context c ) + { + string exampleFeatureSetFileName = getStateDir() + "/svm_files_feature_set"; + string outputFileName = getStateDir() + "/svm_classification_output"; + + + + fh_stringstream ss; + ss << getCommandName() << " "; + ss << " " << exampleFeatureSetFileName << " "; + ss << " " << getModelFileName() << " "; + ss << " " << outputFileName << " "; + + // + // FIXME: What do we do about the IDF? At current I am taking the TotalTF + // vector and adjusting it for the new file before creating a new IDF vector. + // This relies on IDF = 1 / TF. ie. the IDF calculation not needing the + // number of documents in total (N). Should be easy to change this as the + // trainer knows what N is aswell as storing TotalTF. + // + + FeatureSet_t localIDF = m_overallCounts; + convertIDFToTermFrequencyValues( 0, localIDF ); + + FeatureSet_t features; +// cerr << "generating feature set for file c:" << c->getURL() << endl; + calculateTermFreq( c, features, localIDF, false ); + + +// cerr << "file c:" << c->getURL() << " has feature count:" << features.size() << endl; + + convertTermFrequencyToIDFValues( 0, localIDF ); + scaleTermFreqFeatureSetByIDFSet( features, localIDF ); + normalize( features ); + + { + fh_ofstream oss( exampleFeatureSetFileName ); + writeSerializedFeatureSet( oss, 1, features ); + oss << flush; + } + +// cerr << "SVM CMD:" << tostr(ss) << endl; + + fh_runner r = getRunner(); + r->setCommandLine( tostr(ss) ); + r->Run(); + gint e = r->getExitStatus(); + + double ret = 0; + + if( !e ) + { + fh_ifstream iss( outputFileName ); + double reply = 0; + if( iss >> reply ) + { + ret = reply * 100.0; + ret = Numeric::clamp( ret, -100.0, 100.0 ); + } + } + +// cerr << "SVM e:" << e << " ret:" << ret << " for CMD:" << tostr(ss) << endl; + + return ret; + } + + fh_runner + SvmLight_BinaryClassifierAgentImplemenation::getRunner() + { + fh_runner r = new Runner(); + + r->setSpawnFlags( + GSpawnFlags( G_SPAWN_SEARCH_PATH | + G_SPAWN_DO_NOT_REAP_CHILD | + G_SPAWN_STDOUT_TO_DEV_NULL | + G_SPAWN_STDERR_TO_DEV_NULL | + r->getSpawnFlags())); + return r; + } + + + }; +}; diff --git a/Ferris/Agent_private.hh b/Ferris/Agent_private.hh new file mode 100644 index 0000000..6046268 --- /dev/null +++ b/Ferris/Agent_private.hh @@ -0,0 +1,233 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Agent_private.hh,v 1.4 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_AGENT_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_AGENT_PRIV_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace AI + { + template < class Base,class Sub > + struct MakeObject + { + static Base* Create() + { return new Sub(); } + }; + + /** + * Top level agent implemenation class... Mr Anderson. + * + * This class is intended for pluging in AI algorithms not direct + * use by libferris clients. + */ + class FERRISEXP_DLLLOCAL AgentImplemenation + : + public Handlable + { + friend fh_agent loadAgent( const std::string& agentUUID ); + friend fh_agent createBinaryAgent( const std::string& agentName, + const std::string& agentImplemenationName, + const std::string& stateDir, + fh_emblem em, + fh_personality pers ); + + + /** + * This is a directory that the agent can save its past learnt + * data into. The agent should leave alone a file 'ferris-agent-metadata.db' + * if such a file exists. + */ + std::string m_stateDir; + + public: + + AgentImplemenation( std::string stateDir = "" ); + + virtual std::string getImplementationName() = 0; + virtual void setStateDir( const std::string& s ); + virtual std::string getStateDir(); + + /** + * Called after all object state is set so that the agent can + * read info from m_stateDir etc and prepare for work + */ + virtual void initialize(); + }; + + + + /** + * AI plugin class for training binary classifiers + * + * Note that this is an interface that is returned from the AgentImplemenation + * itself and shouldn't be created directly by libferris code that + * is not the AgentImplemenation for this trainer. + */ + class FERRISEXP_DLLLOCAL BinaryClassifierAgentTrainerImplemenation + : + public Handlable + { + public: + + /** + * When a new test case is added for the agent to train on + * this method is called. It is here to allow the agent to + * calculate and store state relating to this new file in + * its current form. Although all the training example names + * will be available to the train() method this method allows + * the following: + * + * 1) capture of file's byte content at the time closest to + * when the uesr decides to add it as a training example. + * For example, when the user adds a website page they are + * probably only asserting that it is in a category at the + * current point in time and if the site's content changes + * it may adversely effect the agent's performance. + * + * 2) Allow caching of state for the new context to speed up + * training. For example the FeatureSet for the context will + * be calculated and persisted by this call + * + * Cases that should no longer be trained on will be submitted + * to removeCase() so that cached state for this file can be + * cleaned up. + * + * The usual pattern for use of the trainer is the addCase() one + * or more new examples for the model and then train(); Note that + * only the new cases are submitted with addCase(), it is assumed + * that the trainer remembers what cases have been submitted in the + * past. + * + * + * @param c the file to add to the training set + * @param desiredOutCome is a value in the range 0 to 100 that + * shows a how sure the file is in the class. + * Binary classifiers can just perform ">0" + * to ignore the extra data provided. + */ + virtual void addCase( fh_context c, double desiredOutCome ) = 0; + + /** + * This case is no longer part of the training data. Remove + * any cached state for that file. + */ + virtual void removeCase( fh_context c ) = 0; + + /** + * Retrain the agent with the examples provided in + * previous calls to addCase() + * + */ + virtual void train() = 0; + + /** + * Write out any changes to state + */ + virtual void sync() + {} + + }; + FERRIS_SMARTPTR( BinaryClassifierAgentTrainerImplemenation, fh_bTrainerImpl ); + + /** + * AI plugin class for doing binary classification + */ + class FERRISEXP_DLLLOCAL BinaryClassifierAgentImplemenation + : + public AgentImplemenation + { + public: + + /** + * Get a trainer for this agent + */ + virtual fh_bTrainerImpl getTrainer() = 0; + + /** + * Give the classification for this file based on previous training. + */ + virtual double classify( fh_context c ) = 0; + }; + FERRIS_SMARTPTR( BinaryClassifierAgentImplemenation, fh_bAgentImpl ); + + /** + * This keeps track of the < sureness, url > data and persists such + * information for next run. It is handy in some agents which need + * to know how a document was asserted in order to removed it from + * the system. + * + * Its a seperate class because many agents will want to have such + * functionality. + */ + class FERRISEXP_DLLLOCAL BinaryClassifierAgentTrainerImplemenationStateMinder + : + public Handlable + { + bool m_dirty; + typedef FERRIS_STD_HASH_MAP< std::string, double > m_cases_t; + m_cases_t m_cases; + + public: + BinaryClassifierAgentTrainerImplemenationStateMinder(); + void addCase( fh_context c, double desiredOutCome ); + void removeCase( fh_context c ); + double lookup( const std::string& earl ); + void load( const std::string& stateDir ); + void sync( const std::string& stateDir ); + }; + FERRIS_SMARTPTR( BinaryClassifierAgentTrainerImplemenationStateMinder, + fh_bTrainerImplStateMinder ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef Loki::SingletonHolder< + Loki::Factory< BinaryClassifierAgentImplemenation, std::string >, + Loki::CreateUsingNew, Loki::NoDestroy > + BinaryClassifierAgentImplemenationFactory; + + template< typename ProductCreator > + bool RegisterBinaryClassifierAgentImplemenationFactory( const std::string& agentName, + ProductCreator creator ) + { + getBinaryAgentImplemenationNames().push_back( agentName ); + return BinaryClassifierAgentImplemenationFactory::Instance().Register( agentName, creator ); + } + + }; +}; +#endif diff --git a/Ferris/All.hh b/Ferris/All.hh new file mode 100644 index 0000000..3333795 --- /dev/null +++ b/Ferris/All.hh @@ -0,0 +1,48 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: All.hh,v 1.2 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +/*! \file All.hh + \brief Header that includes all other public info for client use +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/Ferris/AsyncIO.cpp b/Ferris/AsyncIO.cpp new file mode 100644 index 0000000..6d11aa5 --- /dev/null +++ b/Ferris/AsyncIO.cpp @@ -0,0 +1,481 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: AsyncIO.cpp,v 1.6 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" +#include "FerrisDOM.hh" +#include "AsyncIO.hh" +#include + +using namespace std; + +namespace Ferris +{ + fh_istream null_asyncio_functor( fh_aiohandler, fh_istream s ) + { + return s; + } + + FERRISEXP_DLLLOCAL gboolean + AsyncIOHandler_async_cb( GIOChannel *source, + GIOCondition condition, + gpointer user_data ) + { + AsyncIOHandler* a = (AsyncIOHandler*)user_data; + return a->async_cb( source, condition ); + } + + /* + * group the new data into one block and call the async functor to handle it + */ + gboolean + AsyncIOHandler::async_cb( GIOChannel *source, GIOCondition condition ) + { +// cerr << "AsyncIOHandler::async_cb() pid:" << getpid() << endl; + + g_io_channel_set_flags( source, G_IO_FLAG_NONBLOCK, 0 ); + const int buf_sz = 4096; + char buf[ buf_sz + 2 ]; + gsize bytes_read = 0; + bool virgin = true; + GError* e = 0; + streamsize totalBytesRead = 0; + + buf[buf_sz + 1] = '\0'; + fh_stringstream ss; + + while( virgin || bytes_read ) + { + virgin = false; + + GIOStatus rc = g_io_channel_read_chars( source, + buf, buf_sz, + &bytes_read, &e ); + if( bytes_read ) + { + totalBytesRead += bytes_read; + ss.write( buf, bytes_read ); + } + } + + // cerr << "AsyncIOHandler::async_cb() totalBytesRead:" << totalBytesRead + // << " ss:" << tostr(ss) + // << endl; + + if( totalBytesRead ) + { +// cerr << "AsyncIOHandler::async_cb() totalBytesRead:" << totalBytesRead +// << " ss:" << tostr(ss) +// << endl; + fh_aiohandler a = this; + theFunctor( a, ss ); + } + + + return 1; // call again + + } + + AsyncIOHandler::AsyncIOHandler( int fd ) + : + m_channel( 0 ), + m_channelID( 0 ), + theFunctor( null_asyncio_functor ) + { + if( fd >= 0 ) + { + attach( fd ); + } + } + + AsyncIOHandler::~AsyncIOHandler() + { + release(); + } + + void + AsyncIOHandler::attach( int fd ) + { + release(); + + + // + // We need to attach a callback for when data is available from the + // child. + // + GIOCondition cond = GIOCondition(G_IO_IN | G_IO_ERR | G_IO_PRI); + + m_channel = g_io_channel_unix_new( fd ); +// g_io_channel_set_encoding( m_channel, 0, 0 ); + m_channelID = g_io_add_watch( m_channel, cond, + AsyncIOHandler_async_cb, this ); + g_io_channel_set_flags( m_channel, G_IO_FLAG_NONBLOCK, 0 ); +// g_io_channel_set_buffered( m_channel, 0 ); + } + + void + AsyncIOHandler::setFunctor( AsyncIOFunctor_t x ) + { + theFunctor = x; + } + + void + AsyncIOHandler::disconnect() + { + if( m_channelID ) + { +// g_io_channel_set_flags( m_channel, G_IO_FLAG_NONBLOCK, 1 ); + + g_source_remove( m_channelID ); + m_channelID = 0; + } + } + + void + AsyncIOHandler::release() + { + disconnect(); + + if( m_channel ) + { + g_io_channel_unref( m_channel ); + m_channel = 0; + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// template +// void +// StreamCollector::attach( fh_runner r ) +// { +// r->setAsyncStdOutFunctor( +// Runner::AsyncIOFunctor_t( +// this, &_Self::async_io_cb )); +// } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + XMLMsgStreamCollector::XMLMsgStreamCollector() + : + m_msg(""), + m_overflow("") + { + } + + + const std::string& + XMLMsgStreamCollector::getXMLString() + { + return m_msg; + } + + stringmap_t& + XMLMsgStreamCollector::getStringMap() + { + return m_stringmap; + } + + XMLMsgStreamCollector::MessageArrivedSig_t& + XMLMsgStreamCollector::getMessageArrivedSig() + { + return MessageArrivedSig; + } + + /** + * Given a stream that contains possibly more than + * one message, seek to the end of the first message + * + * @return a non empty string if there is another complete XML msg + * if there isn't another complete msg then m_overflow contains + * the start of the next msg and "" is returned. + */ + std::string + XMLMsgStreamCollector::getNextXMLMsg( fh_istream iss ) + { + fh_stringstream ret; + + char lastch = 0; + char ch = 0; + int bracketCount = 0; + + for( ; iss >> noskipws >> ch; lastch = ch ) + { + ret << ch; + + if( lastch == '<' ) + if( ch == '/' ) + --bracketCount; + else + ++bracketCount; + + if( ch == '>' && lastch == '?' ) + --bracketCount; + else if( ch == '>' ) + { + if( lastch == '/' ) + --bracketCount; + + if( !bracketCount ) + { + PrefixTrimmer trimmer; + trimmer.push_back( "\n" ); + trimmer.push_back( " " ); + trimmer.push_back( "\t" ); + return trimmer( tostr(ret) ); + } + } + } + m_overflow = tostr(ret); + return ""; + } + + + fh_istream + XMLMsgStreamCollector::io_cb( fh_istream iss ) + { + + // cerr << "XMLMsgStreamCollector::io_cb(begin) " + // << " p:" << m_ss.tellp() + // << " g:" << m_ss.tellg() + // << " m_ss:" << tostr(m_ss) + // << endl; + + fh_stringstream msgss; + msgss << m_overflow << StreamToString( iss ) << flush; + + m_overflow = ""; + msgss.clear(); + msgss.seekg( 0 ); + + for( m_msg = getNextXMLMsg( msgss ); !m_msg.empty() ; m_msg = getNextXMLMsg( msgss ) ) + { + try + { +// cerr << "XMLMsgStreamCollector::io_cb(iter) m_msg:" << m_msg << endl; + m_stringmap.clear(); + fh_stringstream xmlss; + xmlss << m_msg << flush; + xmlss.clear(); + xmlss.seekg( 0 ); + XML::readMessage( xmlss, m_stringmap ); +// cerr << "XMLMsgStreamCollector::io_cb(iter have msg)" << endl; + + /* + * Emit signal (m_msg and m_stringmap are assumed to be valid at this point) + */ + fh_xstreamcol h = this; + getMessageArrivedSig().emit( h ); + } + catch( XMLParse& e ) + { + m_ss.clear(); + m_ss.seekp( ios::end ); + m_ss.seekg( 0 ); +// cerr << "ERROR XMLMsgStreamCollector::async_io_cb(parse e):" << e.what() << endl; + LG_XML_ER << "XMLMsgStreamCollector::async_io_cb(parse e):" << e.what() << endl; + return iss; + } + catch( exception& e ) + { +// cerr << "ERROR XMLMsgStreamCollector::async_io_cb(parse std e):" << e.what() << endl; + LG_XML_ER << "XMLMsgStreamCollector::async_io_cb(parse std e):" << e.what() << endl; + return iss; + } + } + + return iss; + + +// m_ss.clear(); +// m_ss.seekp( ios::end ); +// // copy( istreambuf_iterator(iss), +// // istreambuf_iterator(), +// // ostreambuf_iterator(m_ss)); +// { +// cerr << "---------MANUAL_READ(start)--------------" << endl; +// char ch = 0; +// m_ss << flush; +// while( iss >> noskipws >> ch ) +// { +// cerr << ch; +// m_ss << ch; +// msgss << ch; +// } +// cerr << "---------MANUAL_READ(end)--------------" << endl; +// } + +// m_ss << flush; + +// msgss.clear(); +// msgss.seekg( 0 ); + +// while( seekToEndOfXMLMsg( msgss ) ) +// { +// try +// { +// } + +// } + + +// try +// { +// // m_ss.clear(); +// // m_ss.seekg( 0 ); +// // m_stringmap.clear(); +// // cerr << "XMLMsgStreamCollector::io_cb(readmsg) from:" << tostr(m_ss) << endl; +// // XML::readMessage( m_ss, m_stringmap ); + +// msgss.clear(); +// msgss.seekg( 0 ); +// m_stringmap.clear(); +// cerr << "XMLMsgStreamCollector::io_cb(readmsg) from:" << tostr(msgss) << endl; +// XML::readMessage( msgss, m_stringmap ); + +// } +// catch( XMLParse& e ) +// { +// m_ss.clear(); +// m_ss.seekp( ios::end ); +// m_ss.seekg( 0 ); +// cerr << "XMLMsgStreamCollector::async_io_cb(parse e):" << e.what() << endl; +// return iss; +// } +// catch( exception& e ) +// { +// LG_XML_W << "XMLMsgStreamCollector::async_io_cb(parse std e):" << e.what() << endl; +// cerr << "XMLMsgStreamCollector::async_io_cb(parse std e):" << e.what() << endl; +// return iss; +// } + +// // cerr << "XMLMsgStreamCollector::async_io_cb(cleanup) " << endl; + +// /* +// * Grab the remaining data after what the XML parse used and keep it for +// * the next XML msg. +// */ +// streamsize tellg = m_ss.tellg(); +// fh_stringstream tmp; +// copy( istreambuf_iterator(m_ss), +// istreambuf_iterator(), +// ostreambuf_iterator(tmp)); +// cerr << "XMLMsgStreamCollector::async_io_cb() tellg:" << tellg +// << " tmp:" << tostr(tmp) +// << endl; + +// /* +// * We need to read the whole XML message as a string to send to the clients +// */ +// { +// // m_ss.clear(); +// // m_ss.seekg(0); +// // m_ss.seekp(0); +// // fh_istream limitedss = Factory::MakeLimitingIStream( m_ss, 0, tellg ); + +// msgss.clear(); +// msgss.seekg(0); +// msgss.seekp(0); +// fh_istream limitedss = Factory::MakeLimitingIStream( msgss, 0, tellg ); + +// fh_stringstream z; +// copy( istreambuf_iterator(limitedss), +// istreambuf_iterator(), +// ostreambuf_iterator(z)); +// m_msg = tostr(z); +// // cerr << "XMLMsgStreamCollector::async_io_cb() tellg:" << tellg +// // << " msg:" << m_msg +// // << endl; +// } + +// m_overflow = tostr(tmp); + +// /* +// * start m_ss over with just the remaining data that was +// * not processed in the last xml msg +// */ +// m_ss = tmp; +// m_ss.clear(); +// // m_ss.str( tostr(tmp) ); +// m_ss.seekg( 0 ); +// m_ss.seekp( 0 + tostr(tmp).length() ); +// m_ss.clear(); + +// // cerr << "XMLMsgStreamCollector::async_io_cb(end) " +// // << " p:" << m_ss.tellp() +// // << " g:" << m_ss.tellg() +// // << " tostr:" << tostr(m_ss) +// // << endl; + + +// /* +// * Emit signal (m_msg and m_stringmap are assumed to be valid at this point) +// */ +// fh_xstreamcol h = this; +// getMessageArrivedSig().emit( h ); + +// return iss; + } + + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + namespace Factory + { + fh_sstreamcol MakeStringStreamCol() + { + return new StringStreamCollector(); + } + + fh_fstreamcol MakeFileStreamCol( const std::string& s, + std::ios_base::openmode m ) + { + fh_fstream ss( s, m ); + return new FileStreamCollector( ss ); + } + + fh_xstreamcol MakeXMLStreamCol() + { + return new XMLMsgStreamCollector(); + } + + + }; + +}; diff --git a/Ferris/AsyncIO.hh b/Ferris/AsyncIO.hh new file mode 100644 index 0000000..a873f9f --- /dev/null +++ b/Ferris/AsyncIO.hh @@ -0,0 +1,303 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: AsyncIO.hh,v 1.5 2010/09/24 21:30:23 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ASYNCIO_H_ +#define _ALREADY_INCLUDED_FERRIS_ASYNCIO_H_ + +#include + +#include +#include +#include +#include +#include +//#include + +#include + +#include +#include + +namespace Ferris +{ + /** + * Hookup async IO using g io channels and the main GLib loop. + */ + FERRISEXP_API fh_istream null_asyncio_functor( fh_aiohandler, fh_istream s ); + + class FERRISEXP_API AsyncIOHandler + : + public Handlable + { + GIOChannel* m_channel; + guint m_channelID; + + friend FERRISEXP_DLLLOCAL gboolean AsyncIOHandler_async_cb( GIOChannel *source, + GIOCondition condition, + gpointer user_data ); + gboolean async_cb( GIOChannel *source, GIOCondition condition ); + + + public: + + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_2( fh_aiohandler, fh_istream ) > AsyncIOFunctor_t; + AsyncIOFunctor_t theFunctor; + + AsyncIOHandler( int fd = -1 ); + virtual ~AsyncIOHandler(); + + /* + * Attach internal callbacks on the given fd + */ + void attach( int fd ); + + /* + * set functor that will be called when data is available + */ + void setFunctor( AsyncIOFunctor_t x = null_asyncio_functor ); + + /* + * disconnect gio channels for async io on child. + */ + void disconnect(); + /* + * unref and zero gio channels for async io on child. + */ + void release(); + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Use this class to collect async io to a stream, primarily useful for reading + * all the data of a child and then processing it when the child terminates. + * + * see fh_sstreamcol and fh_fstreamcol and their factory methods + * MakeStringStreamCol() and MakeFileStreamCol( ) + * + */ + template + class StreamCollector + : + public Handlable + { + typedef StreamCollector _Self; + + protected: + + StreamClass m_ss; + std::streamsize m_totalsz; + std::streamsize m_donesz; +// fh_childserv m_ChildStreamServer; + + public: + + StreamCollector( StreamClass oss = StreamClass() ) + : + m_ss( oss ), + m_totalsz( 0 ), + m_donesz( 0 ) +// m_ChildStreamServer( 0 ) + { + reset(); + } + + /* + * get the stream that has collected all the data from callbacks + */ + StreamClass& getStream() + { + return m_ss; + } + + void setStream( const StreamClass& ss ) + { + m_ss = ss; + } + + + /* + * reset internal state to starting a new collection + */ + void reset() + { + m_totalsz = 0; + m_donesz = 0; + + m_ss.clear(); + m_ss.seekg(0); + m_ss.seekp(0); + } + + + /* + * collect the data that has arrived from child process + */ + virtual fh_istream io_cb( fh_istream iss ) + { +// std::cerr << "StreamCollector::async_io_cb(top) donesz:" << this->m_donesz << std::endl; + + std::streamsize readsz = 0; + const int bufsz = 1024; + char buf[ bufsz + 1 ]; + while( true ) + { + iss.read( buf, bufsz ); + readsz = iss.gcount(); + if( !readsz ) + break; + + m_ss.write( buf, readsz ); + m_donesz += readsz; + } + + return iss; + } + + virtual fh_istream aioh_io_cb( fh_aiohandler h, fh_istream iss ) + { + return io_cb( iss ); + } + + virtual fh_istream runner_io_cb( fh_runner r, fh_istream iss ) + { + return io_cb( iss ); + } + + + + /* + * hookup to the data available signal on the given runner. + * we will collect all the information provided through this + * runners stdout + */ + void attach( fh_runner r ) + { + Private::attachStreamCollector( r, Runner_AsyncIOFunctor_t( + this, &_Self::runner_io_cb )); +// r->setAsyncStdOutFunctor( +// Runner_AsyncIOFunctor_t( +// this, &_Self::runner_io_cb )); + } + + +// void attachWithComplete( fh_runner r ) +// { +// attach( r ); +// m_ChildStreamServer = new ChildStreamServer(); +// m_ChildStreamServer->addChild( r ); +// m_ChildStreamServer->getChildCompleteSig().connect( sigc::mem_fun( *this, &_Self::OnChildComeplete ) ); +// } + + +// typedef sigc::signal4< void, ChildStreamServer*, fh_runner, int, int > ChildCompleteSig_t; +// ChildCompleteSig_t ChildCompleteSig; +// ChildCompleteSig_t& getChildCompleteSig() +// { +// return ChildCompleteSig; +// } + +// void OnChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ) +// { +// ChildCompleteSig.emit( css, r, status, estatus ); +// } + + void attach( fh_aiohandler h ) + { + h->setFunctor( AsyncIOHandler::AsyncIOFunctor_t( this, &_Self::aioh_io_cb )); + } + + + }; + + typedef StreamCollector< fh_stringstream > StringStreamCollector; + FERRIS_SMARTPTR( StringStreamCollector, fh_sstreamcol ); + + typedef StreamCollector< fh_fstream > FileStreamCollector; + FERRIS_SMARTPTR( FileStreamCollector, fh_fstreamcol ); + + + + /** + * See Factory::MakeXMLStreamCol() to create one. + * + * This manages a buffer and when a valid XML document arrives then a + * signal is emited and others can query for the data. + * + * Primarily for use with writeMessage() and readMessage(). + **/ + class FERRISEXP_API XMLMsgStreamCollector + : + public StringStreamCollector + { + typedef StringStreamCollector _Base; + typedef XMLMsgStreamCollector _Self; + + std::string m_msg; + std::string m_overflow; + stringmap_t m_stringmap; + + std::string getNextXMLMsg( fh_istream iss ); + + public: + + XMLMsgStreamCollector(); + virtual fh_istream io_cb( fh_istream iss ); + + + typedef sigc::signal1< void, fh_xstreamcol > MessageArrivedSig_t; + MessageArrivedSig_t& getMessageArrivedSig(); + + const std::string& getXMLString(); + stringmap_t& getStringMap(); + + + private: + MessageArrivedSig_t MessageArrivedSig; + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + namespace Factory + { + FERRISEXP_API fh_sstreamcol MakeStringStreamCol(); + FERRISEXP_API fh_fstreamcol MakeFileStreamCol( const std::string& s, + std::ios_base::openmode m = std::ios_base::out ); + FERRISEXP_API fh_xstreamcol MakeXMLStreamCol(); + }; +}; +#endif diff --git a/Ferris/Attribute.cpp b/Ferris/Attribute.cpp new file mode 100644 index 0000000..d265f17 --- /dev/null +++ b/Ferris/Attribute.cpp @@ -0,0 +1,2890 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Attribute.cpp,v 1.32 2011/07/31 21:30:48 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#include // VM debug +//#include // createEA +#include // + +#include + +#include + +#include + +using namespace std; + +//#define RDFCACHEATTRS_DISABLED 1 + +namespace Ferris +{ + using namespace RDFCore; + + static fh_model getRDFCacheModel() + { + static fh_model m = 0; + + if( !m ) + { + fh_context rdfdbc = Shell::acquireContext( "~/.ferris/rdfcacheattrs" ); + std::string storage_name = getStrSubCtx( rdfdbc, "ferris-storage-name", "" ); + + string dboptionsDefault = ""; + { + stringstream ss; + ss << "db-environment-dir='" << Shell::getHomeDirPath() << "/.ferris/rdfcacheattrs/" << "'"; + dboptionsDefault = tostr(ss); + } + + m = Model::FromMetadataContext( "~/.ferris/rdfcacheattrs/metadata" ); + + // if( !storage_name.empty() ) + // { + // std::string db_name = getStrSubCtx( rdfdbc, "ferris-db-name", "~/.ferris/rdfcacheattrs/cacheonly" ); + // std::string db_options = getStrSubCtx( rdfdbc, "ferris-db-options", dboptionsDefault ); + // m = Model::ObtainDB( storage_name, db_name, db_options ); + // } + // else + // { + // m = Model::ObtainDB( rdfdbc, "cacheonly", "~/.ferris/rdfcacheattrs" ); + // } + } + +// if( !m ) +// m = RDFCore::getDefaultFerrisModel(); + + return m; + } + static fh_node getRDFCacheMTimePred() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( Semantic::getPredicateURI( "rdf-cache-mtime" ) ); + return ret; + } + static fh_node getRDFCacheEANamesListPred() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( Semantic::getPredicateURI( "rdf-cache-ea-names" ) ); + return ret; + } + static string getRDFCacheNodeURIPostfix() + { + return "-rdfcache-attributes"; + } + static fh_node getRDFCacheNodeURIPostfix( AttributeCollection* c ) + { + Context* cp = dynamic_cast(c); + return Node::CreateURI( cp->getURL() + getRDFCacheNodeURIPostfix() ); + } + static fh_node tryToGetRDFCacheNode( AttributeCollection* c ) + { + fh_model m = getRDFCacheModel(); + fh_node earlnode = getRDFCacheNodeURIPostfix( c ); + fh_node obj = m->getObject( earlnode, getRDFCacheMTimePred() ); + if( obj ) + { + LG_RDFATTRCACHE_D << "tryToGetRDFCacheNode() found node for c:" << ((Context*)c)->getURL() << endl; + return earlnode; + } + return 0; + + +// fh_node uuid = Semantic::tryToGetUUIDNode( dynamic_cast( c ) ); +// if( uuid ) +// { +// static fh_node pred = 0; +// if( !pred ) +// pred = Node::CreateURI( Semantic::getPredicateURI( "rdf-attribute-cache" ) ); + +// fh_node ret = m->getObject( uuid, pred ); +// return ret; +// } +// return 0; + } + static fh_node ensureRDFCacheNode( AttributeCollection* c ) + { + fh_node ret = tryToGetRDFCacheNode( c ); + if( !ret ) + { + LG_RDFATTRCACHE_D << "ensureRDFCacheNode() making node for c:" << ((Context*)c)->getURL() << endl; + fh_model m = getRDFCacheModel(); + ret = getRDFCacheNodeURIPostfix( c ); + m->insert( ret, + getRDFCacheMTimePred(), + Node::CreateLiteral( tostr( c->getRDFCacheMTime() ) ) ); + } + +// fh_model m = getRDFCacheModel(); +// fh_node uuid = Semantic::ensureUUIDNode( dynamic_cast( c ) ); +// static fh_node pred = 0; +// if( !pred ) +// pred = Node::CreateURI( Semantic::getPredicateURI( "rdf-attribute-cache" ) ); + +// fh_node ret = m->getObject( uuid, pred ); +// if( !ret ) +// { +// string uu = Util::makeUUID(); +// ret = RDFCore::Node::CreateURI( uu ); +// m->insert( uuid, pred, ret ); + +// // m->set( Node::CreateURI( ((Context*)c)->getURL() ), +// // getRDFCacheMTimePred(), +// // Node::CreateLiteral( tostr( c->getRDFCacheMTime() ) ) ); +// } + + + return ret; + } + static bool Inside_RDFCacheAttributes_priv_createAttributes = false; + + static void addToRDFCacheNode( AttributeCollection* c, const string& rdn ) + { + fh_model m = getRDFCacheModel(); + fh_node rdfcachenode = ensureRDFCacheNode( c ); + + LG_RDFATTRCACHE_D << "addToRDFCacheNode... rdn:" << rdn << endl; + m->insert( rdfcachenode, + getRDFCacheEANamesListPred(), + Node::CreateURI( Semantic::getPredicateURI( rdn ) ) ); + } + + + static bool isRDFCacheAttributesEnabled() + { + static bool ret = true; + static bool v = true; + if( v ) + { + v = false; + ret = isTrue( getEDBString( FDB_GENERAL, + CFG_RDFCACHE_ATTRS_ENABLED_K, + CFG_RDFCACHE_ATTRS_ENABLED_DEFAULT ) ); + } + return ret; + } + + + namespace Private + { + static bool checkOpenModeSupported( ferris_ios::openmode supported, + ferris_ios::openmode userRequested ) + { + ferris_ios::openmode r = ferris_ios::maskOffFerrisOptions( userRequested ); + // cerr << "checkOpenModeSupported() sup:" << supported + // << " UR:" << userRequested + // << " r:" << r + // << " r&s:" << (r & supported) + // << endl; + + if( (r & supported) != r ) + { + return false; + } + return true; + } + }; + + + class StaticStringGenerator + { + typedef map< const char*, string > m_cache_t; + + static m_cache_t& getCache() + { + static m_cache_t ret; + return ret; + } + + static string* getNullStringPointer() + { + static string ret; + return &ret; + } + + public: + static string* Ptr( const char* cptr ) + { + if( !cptr || cptr[0] == '\0' ) + return getNullStringPointer(); + + cerr << "StaticStringGenerator() sptr:" << cptr << endl; + + m_cache_t::iterator iter = getCache().find( cptr ); + if( iter == getCache().end() ) + { + cerr << "StaticStringGenerator() adding:" << cptr << endl; + iter = getCache().insert( make_pair( cptr, string( cptr ) ) ).first; + } + return &iter->second; + } + }; + + + + /** + * This seeks the stream to adjust for the open mode given. + */ + void + AdjustForOpenMode_Opening( fh_istream ss, ferris_ios::openmode m ) + { + ss->seekg(0, ios::cur); + if( m & ios::ate || m & ios::app ) + { + ss->clear(); + ss->seekg(0, ios::end); + ss->clear(); + } + ss->clear(); + } + + /** + * This seeks the stream to adjust for the open mode given. + */ + void + AdjustForOpenMode_Opening( fh_iostream ss, ferris_ios::openmode m ) + { + ss->seekg(0, ios::cur); + ss->clear(); + + if( m & ios::trunc ) + { + ss->clear(); + ss->seekp(0); + ss->clear(); + } + if( m & ios::ate || m & ios::app ) + { + ss->clear(); + ss->seekg(0, ios::end); + ss->seekp(0, ios::end); + ss->clear(); + } + +// AdjustForOpenMode_Opening( fh_istream(ss), m ); + } + + void + AdjustForOpenMode_Closing( fh_istream& ss, ferris_ios::openmode m, std::streamsize tellp ) + { + ss->clear(); + ss->seekg(0); + + if( m & ios::trunc ) + { + std::streampos be = 0; + std::streampos en = tellp; +// cerr << "AdjustForOpenMode_Closing() be:" << be << " en:" << en << endl; + ss = Factory::MakeLimitingIStream( ss, be, en ); + } + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + /** + * Create a new attribute. + */ + Attribute::Attribute( Parent_t parent ) + : + theParent( parent ) + { + } + + /** + * Clean up the attribute + */ + Attribute::~Attribute() + { + } + + /** + * Get the parent attribute. + * + * @throws FerrisParentNotSetError If there is no parent set. + * @see isParentBound() + * @return The parent attribute + */ + Attribute::Parent_t + Attribute::getParent() throw (FerrisParentNotSetError) + { + if( !isParentBound() ) + { + LG_ATTR_ER << "Parent context is not bound when it should be!" << endl; + cerr << "Parent context is not bound when it should be! this:" << toVoid(this) << endl; + DEBUG_dumpcl("Parent context is not bound when it should be!"); + BackTrace(); + g_on_error_query(0); + + LG_ATTR_ER << "Parent context is not bound when it should be!" << endl; + Throw_FerrisParentNotSetError("", this); + } + return theParent; + } + + /** + * Check to see if this attribute is part of a tree or not. + * + * @return true if this attribute knows what its parent attribute is. + */ + bool + Attribute::isParentBound() + { + return theParent != 0; + } + + + + /** + * Set the parent context and rdn of this attribute. Note that this method + * is a needed call for the lifetime of any useful attribute or context. + * + * @param parent The parent attribute or context. This can be NULL. + * @param rdn Name of this context. Note that rdn must not clash with + * any of the other siblings in parent. This should be checked before + * calling this method. + * @param emit If true then a getDirNameInitiallySet_Sig() signal is emmited to + * signal the addition of this new context. + * + */ + void + Attribute::setAttributeContext( Parent_t parent ) + { +// if( rdn ) +// { +// LG_ATTR_D << "Attribute::setAttributeContext() this:" << this +// << " rdn:" << rdn +// << endl; +// } + + theParent = parent; + } + + + + const std::string& + Attribute::getDirName() const + { + stringstream ss; + ss << "Getting the name of an Attribute class object. Should never happen" << endl; + Throw_FerrisInternalError( tostr(ss), 0 ); + } + + + + /** + * Get the entire path for this attribute. + * + * @throws FerrisParentNotSetError if called on a contex that does not know its + * parent + * @see getDirName() + * @returns The fully resolved path for this attribute. + */ + std::string + Attribute::getDirPath() throw (FerrisParentNotSetError) + { + try + { + if( isParentBound() ) + { + return appendToPath( getParent()->getDirPath(), getDirName()); + } + else + { + return getDirName(); + } + } + catch( FerrisParentNotSetError& e ) + { + throw; + } + catch( exception& e ) + { + LG_ATTR_ER + << "getDirPath() cought a unchecked excpetion that it should not have" + << endl + << "e:" << e.what() + << endl; + } + LG_ATTR_ER << "Returning default value of nothing." << endl; + return ""; + } + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + template< class T > T Attribute::copyTo( fh_istream iss, T oss ) + { + LG_ATTR_D << "---------Start copy-----------" << endl; + LG_ATTR_D << " oss is good():"<< oss->good() << endl; + copy( istreambuf_iterator(iss), + istreambuf_iterator(), + ostreambuf_iterator(oss)); + + LG_ATTR_D << " iss is good():"<< iss->good() << endl; + LG_ATTR_D << " iss is eof():"<< iss->eof() << endl; + LG_ATTR_D << " oss is good():"<< oss->good() << endl; + LG_ATTR_D << " iss is state:"<< iss->rdstate() << endl; + LG_ATTR_D << " oss is state:"<< oss->rdstate() << endl; + + char xch; + iss >> xch; + if( !iss->eof() ) + { + fh_stringstream ss; + ss << "Failed to copy file, path: " << getDirPath() + << " iss is not at eof."; + Throw_CopyFailed( tostr(ss), this ); + } + return oss; + } + + fh_iostream + Attribute::copyTo( fh_iostream oss ) + { + fh_istream iss = getIStream(); + return copyTo( iss, oss ); + } + + fh_ostream + Attribute::copyTo( fh_ostream oss ) + { + fh_istream iss = getIStream(); + return copyTo( iss, oss ); + } + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * Get the openmodes that this object supports. + * + * @see checkOpenModeSupported() + * @return The supported open modes. + */ + ferris_ios::openmode + Attribute::getSupportedOpenModes() + { +// cerr << "Attribute::getSupportedOpenModes() path:" << getDirPath() << endl; + return + ios_base::in | + ios_base::binary ; + } + + + /** + * Check if this attribute supports the openmode userm. + * + * @see getSupportedOpenModes() + * @param userm The openmode to check support for + * @return true if this attribute supports that openmode. + */ + bool + Attribute::checkOpenModeSupported( ferris_ios::openmode userm ) + { + ferris_ios::openmode m = getSupportedOpenModes(); + + LG_ATTR_D << "Attribute::checkOpenModeSupported() m:" << m << endl; + LG_ATTR_D << "Attribute::checkOpenModeSupported() userm:" << userm << endl; + LG_ATTR_D << "Attribute::checkOpenModeSupported() :" << (userm & m) << endl; + +// cerr << "Attribute::checkOpenModeSupported() path:" << getDirPath() << endl; +// cerr << "Attribute::checkOpenModeSupported() m:" << m << endl; +// cerr << "Attribute::checkOpenModeSupported() userm:" << userm << endl; +// cerr << "Attribute::checkOpenModeSupported() :" << (userm & m) << endl; +// cerr << "Attribute::checkOpenModeSupported() ret :" +// << Private::checkOpenModeSupported( m, userm ) << endl; + + return Private::checkOpenModeSupported( m, userm ); + } + + void + Attribute::RegisterStreamWithContextMemoryManagement( fh_istream ss ) + { + if( isParentBound() ) + { + /* Parent is always a context, so this will not recurse */ + getParent()->RegisterStreamWithContextMemoryManagement( ss ); + } + } + + /** + * Get a IStream from this attribute. + * + * @see getIOStream() + * @see getLocalIStream() + * + * @param m Standard IO openmode that is desired for this stream + * note that a mode of ios::app is generally not supported + * + * @throws FerrisParentNotSetError + * @throws CanNotGetStream Creating the stream failed + * @throws exception + * @returns a IStream + */ + fh_istream + Attribute::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + if( !checkOpenModeSupported(m)) + Throw_CanNotGetStream("openmode not supported", this); + + if( Context* c = dynamic_cast(this)) + { + LG_ATTR_D << "getIStream() url:" << c->getURL() + << " isCompressed:" << isCompressedContext( c ) + << endl; + + if( isCompressedContext( c ) ) + { + return Factory::getCompressedChunkIOStream( c ); + } + } + + + /* + * handle download-if-mtime-since EA in a global fashion + */ + if( Context* c = dynamic_cast< Context* >( this ) ) + { + c->testDownloadIfMTimeSince( 0, false ); + } + +// cerr << "Attribute::getIStream(2) p:" << getDirPath() << endl; + +// if( time_t dlt = getDownloadIfMTimeSince() ) +// { +// if( Context* c = dynamic_cast< Context* >( this ) ) +// { +// if( c->isAttributeBound( "mtime", false ) ) +// { +// time_t m = toType< time_t >(getStrAttr( c, "mtime", "0" )); +// if( m <= dlt ) +// { +// fh_stringstream ss; +// ss << "Remote document not modified, no source for:" +// << c->getURL() << endl; +// Throw_ContentNotModified( tostr(ss), 0 ); +// } +// } +// } +// } + + + fh_istream ret = priv_getIStream(m); + + AdjustForOpenMode_Opening( ret, m ); + RegisterStreamWithContextMemoryManagement( ret ); + + LG_ATTR_D << "Attribute::getIStream() m & o_nouncrypt:" << (m & ferris_ios::o_nouncrypt) + << " castable:" << toVoid( dynamic_cast< Context* >( this ) ) + << " ends_with:" << ends_with( getDirName(), ".gpg" ) + << endl; + + if( (m & ferris_ios::o_nouncrypt) == 0 ) + { + LG_ATTR_D << "Attribute::getIStream(1)." << endl; + if( Context* c = dynamic_cast< Context* >( this ) ) + { + LG_ATTR_D << "Attribute::getIStream(2)." << endl; + if( ends_with( getDirName(), ".gpg" )) + { + LG_ATTR_D << "Attribute::getIStream(3)." << endl; + LG_ATTR_D << "Attribute::getIStream() getting signed document stream." << endl; + fh_istream cc = getSignedDocumentStream( c->ThisContext(), ret ); + return cc; + } + } + } + + LG_ATTR_D << "Attribute::getIStream(no gpg returning raw stream)." << endl; + return ret; + } + + /** + * If getIStream() was going to return an IStream that was not on local + * disk, then this method creates a proxy IStream that is on local disk + * from the attribute. + * + * @param new_dn Contains the name of the local disk file. This can be + * used to pass data to a non-ferris API that requires a local + * disk file name. + * @param m Standard IO openmode that is desired for this stream + * @see getIOStream() + * @see getIStream() + * @return Local stream + */ + fh_istream + Attribute::getLocalIStream( std::string& new_dn, ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + fh_istream ret = getIStream(m); + + if( !g_file_test( getDirPath().c_str(), + GFileTest( + G_FILE_TEST_IS_REGULAR | + G_FILE_TEST_EXISTS) )) + { + f_ififostream fifos(ret); + new_dn = fifos.getFileName(); + return fifos; + } + + new_dn = getDirPath(); + return ret; + } + + + /** + * Get a IOStream from this attribute. + * + * @see getIStream() + * @see getLocalIStream() + * + * @param m Standard IO openmode that is desired for this stream + * @throws FerrisParentNotSetError + * @throws CanNotGetStream Creating the stream failed + * @throws exception + * @returns a IOStream + */ + fh_iostream + Attribute::getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + AttributeNotWritable, + exception) + { +// LG_ATTR_D << "Attribute::getIOStream() m:" << int(m) << endl; + + if( !checkOpenModeSupported(m)) + { +// BackTrace(); + stringstream ss; + ss << "openmode not supported m:" << m + << " m.masked:" << ferris_ios::maskOffFerrisOptions( m ) + << " suported modes are:" << getSupportedOpenModes() << endl + << " standard modes are... " + << " in:" << ios::in + << " out:" << ios::out + << " ate:" << ios::ate + << " app:" << ios::app + << " trunc:" << ios::trunc + << " bin:" << ios::binary + << " o_mseq:" << ferris_ios::o_mseq + << endl; + Throw_CanNotGetStream( ss.str(), this); + } + + + if( Context* c = dynamic_cast(this)) + { + if( isCompressedContext( c ) ) + { + return Factory::getCompressedChunkIOStream( c ); + } + } + + /* + * We want to throw an exception if there is something + * wrong with the stream + */ + fh_iostream ret = priv_getIOStream(m); + LG_ATTR_D << "getIOStream() ret:" << ret << endl; + +// ret->exceptions( ios::badbit | ios::failbit ); +// ret->exceptions( ios::goodbit); + if( !ret->good() ) + { +// BackTrace(); + fh_stringstream ss; + ss << "Can not get stream for path:" << getDirPath() << endl; + Throw_CanNotGetStream(tostr(ss), this); + } + + AdjustForOpenMode_Opening( ret, m ); + RegisterStreamWithContextMemoryManagement( ret ); + return ret; + } + + + /** + * If this method is called then the specified open mode 'm' has already + * passed a check to see if the attribute supports that mode. The mode might + * still fail when the attempt is made to create the IStream. + * + * @see getSupportedOpenModes() + * @see checkOpenModeSupported() + * @see getIStream() + * @see getIOStream() + * @see priv_getIOStream() + * @param m Standard IO openmode that is desired for this stream + * @throws FerrisParentNotSetError + * @throws CanNotGetStream Creating the stream failed + * @throws exception + * @returns a IStream + */ + fh_istream + Attribute::priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + f_istringstream iss(""); + return iss; + } + + /** + * If this method is called then the specified open mode 'm' has already + * passed a check to see if the attribute supports that mode. The mode might + * still fail when the attempt is made to create the IOStream. + * + * @see getSupportedOpenModes() + * @see checkOpenModeSupported() + * @see getIOStream() + * @see getIStream() + * @see priv_getIStream() + * @param m Standard IO openmode that is desired for this stream + * @throws FerrisParentNotSetError + * @throws CanNotGetStream Creating the stream failed + * @throws exception + * @returns a IStream + */ + fh_iostream + Attribute::priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) + { + ferris_ios::openmode writeBits = ios::trunc | ios::app | ios::out; + + if( !(m & writeBits) ) + { + LG_ATTR_D << "priv_getIOStream() mode is read only and getIOStream" + << " is not valid for this context, switching to read only" + << " stream instead" << endl; + fh_istream iret = priv_getIStream( m ); + LG_ATTR_D << "priv_getIOStream() have istream" << endl; + fh_iostream ret = Factory::MakeReadOnlyIOStream( iret ); + LG_ATTR_D << "priv_getIOStream() have iostream wrapper" << endl; + return ret; + } + + fh_stringstream ss; + ss << "Attribute::priv_getIOStream() rdn:" << getDirName() + << " path:" << getDirPath() + << endl; +// BackTrace(); + Throw_AttributeNotWritable(tostr(ss),0);//this); + } + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * Split the path into two chunks: The first context level and the rest. + * This is a method of attribute because different context classes can + * handle namespace seperation differently. In particular it is not always + * the case that a "/" character is used to seperate context levels. + * + * @param s string to split into start, rest. + * @see canSplitPathAtStart() + * @return a string pair where first is the leading context name and second is + * the remaining context names strung together. + */ + std::pair + Attribute::splitPathAtStart( const std::string& s ) + { + std::pair ret; + std::string::size_type e = std::string::npos; + +// LG_ATTR_D << "Attribute::splitPathAtStart() s:" << s << endl; + + e = s.find(getSeperator()); + if( std::string::npos == e ) + { + ret.first = s; ret.second = ""; + } + else + { + ret.first = s.substr( 0, e ); + ret.second = s.substr( e+1 ); + } + + + +// LG_ATTR_D << "Attribute::splitPathAtStart() ret.first :" << ret.first << endl; +// LG_ATTR_D << "Attribute::splitPathAtStart() ret.second :" << ret.second << endl; + + return ret; + } + + + /** + * Split the path into two chunks: The first part is like dirname(1) and the + * second part is the rdn of the final context level. + * This is a method of attribute because different context classes can + * handle namespace seperation differently. In particular it is not always + * the case that a "/" character is used to seperate context levels. + * + * @param s string to split into dirname(1), rdn. + * @see canSplitPathAtEnd() + * @return a string pair where first is the dirname(1) and second is + * the rdn of the final context in s. + */ + std::pair< std::string, std::string > + Attribute::splitPathAtEnd( const std::string& s ) + { + std::pair< std::string, std::string > ret; + std::string::size_type e = std::string::npos; + +// LG_ATTR_D << "Attribute::splitPathAtEnd() s:" << s << endl; + + e = s.find_last_of(getSeperator()); + + if( std::string::npos == e || e == s.length()-1 ) + { + ret.first = s; + ret.second = ""; + } + else + { + ret.first = s.substr( 0, e ); + ret.second = s.substr( e+1 ); + } + + +// LG_ATTR_D << "Attribute::splitPathAtEnd() ret.first :" << ret.first << endl; +// LG_ATTR_D << "Attribute::splitPathAtEnd() ret.second :" << ret.second << endl; + + return ret; + } + + /** + * Check to see if a given path has enough information in it to be split + * into two chunks using splitPathAtStart(). + * + * @param s Path to split + * @return true if the path is splittable. + */ + bool + Attribute::canSplitPathAtStart( const std::string& s ) + { + std::pair sp = splitPathAtStart( s ); + + if( sp.first == s ) + return 0; + + return 1; + } + + /** + * Check to see if a given path has enough information in it to be split + * into two chunks using splitPathAtEnd(). + * + * @param s Path to split + * @return true if the path is splittable. + */ + bool + Attribute::canSplitPathAtEnd( const std::string& s ) + { + std::pair sp = splitPathAtEnd( s ); + + if( sp.first == s ) + return 0; + + return 1; + } + + + /** + * Create a copy of a path with all the leading context seperators + * removed. For a normal unix directory naming scheme this is equal to + * trimming all leading "/" characters. This method exists because "/" + * may not be the context seperator char, and indeed there may be more + * than one seperator char. + * + * @param s The path to trim leading seperators from + * @see trimTrailingSeps() + * @see trimEdgeSeps() + * @return A string without the leading seperators + */ + std::string + Attribute::trimLeadingSeps( const std::string& s ) + { + std::string::size_type e = s.find_first_not_of( getSeperator() ); + if( e == std::string::npos ) + return s; + return s.substr( e ); + } + + /** + * Create a copy of a path with all the trailing context seperators + * removed. For a normal unix directory naming scheme this is equal to + * trimming all "/" characters from the end of string. + * This method exists because "/" + * may not be the context seperator char, and indeed there may be more + * than one seperator char. + * + * @param s The path to trim trailing seperators from + * @see trimLeadingSeps() + * @see trimEdgeSeps() + * @return A string without the trailing seperators + */ + std::string + Attribute::trimTrailingSeps( const std::string& s ) + { + std::string::size_type e = s.find_last_not_of( getSeperator() ); + if( e == std::string::npos ) + return s; +// LG_ATTR_D << "trimTrailingSeps(s:" << s << ") gives:" << s.substr( e ) << endl; + return s.substr( 0, e+1 ); + } + + /** + * Create a copy of a path with all the trailing and leading context seperators + * removed. For a normal unix directory naming scheme this is equal to + * trimming all "/" characters from the end and start of string. + * This method exists because "/" + * may not be the context seperator char, and indeed there may be more + * than one seperator char. + * + * @param s The path to trim trailing seperators from + * @see trimLeadingSeps() + * @see trimTrailingSeps() + * @return A string without the trailing or leading seperators + */ + std::string + Attribute::trimEdgeSeps( const std::string& s ) + { + return trimLeadingSeps(trimTrailingSeps(s)); + } + + + /** + * Equal to basename(1). This method will return the final rdn in + * the given path, if the path only contains the final rdn and no + * context seperators then the path itself will be returned. + * + * @param s the path to get the basename of. + * @see canSplitPathAtEnd() + * @see splitPathAtEnd() + * @return rdn of the final path component of the given path. + */ + std::string + Attribute::getLastPartOfName( const std::string& s ) + { + std::pair< std::string, std::string > p = splitPathAtEnd( s ); + if( p.second.length() ) + return p.second; + return p.first; + } + + + + /** + * Append a rdn to a path. This method also handles cases where the + * given path ends in a path seperator already and ensures that only + * one path seperator component seperates the given path and rdn. + * + * @param p The path to append to + * @param d the rdn to append to p + * @param allowDirToBeAbsolute If d starts with a path seperator it is assumed + * to be an absolute path and thus the appended path is just 'd'. + * + * @see canSplitPathAtEnd() + * @see splitPathAtEnd() + * @see canSplitPathAtStart() + * @see splitPathAtStart() + * @return p + getSeperator() + d + */ + std::string + Attribute::appendToPath( const std::string& p, + const std::string& d, + bool allowDirToBeAbsolute ) + { + std::string sep = getSeperator(); + + if( allowDirToBeAbsolute && + ( starts_with( d, sep ) || + starts_with( d, "file:" ) || + starts_with( d, "x-ferris:" ))) + { + return d; + } + + if( p.empty() ) + return d; + + std::string s = p.substr( p.length() - sep.length()); + if( s == sep ) + { + return p+d; + } + else + { + return p+sep+d; + } + } + + /** + * Used to implement a bunch of functions with default code that uses one + * seperator only and allows that seperator to be a string. + * + * @see canSplitPathAtEnd() + * @see splitPathAtEnd() + * @see canSplitPathAtStart() + * @see splitPathAtStart() + * @see appendToPath() + * @return The seperator for contexts + */ + const std::string DefaultAttrSeperator = "/"; + const std::string& + Attribute::getSeperator() + { + return DefaultAttrSeperator; + } + + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + EA_Atom::EA_Atom() + { + } + + EA_Atom::~EA_Atom() + { + } + + fh_iostream + EA_Atom::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) + { + fh_stringstream ss; + ss << "Can not get stream for path:" << c->getDirPath() + << " rdn:" << rdn + << endl; + BackTrace(); + cerr << tostr(ss) << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + + bool + EA_Atom::checkOpenModeSupported( ferris_ios::openmode userm ) + { + ferris_ios::openmode m = getSupportedOpenModes(); + return Private::checkOpenModeSupported( m, userm ); + } + + ferris_ios::openmode + EA_Atom::getSupportedOpenModes() + { + return + ios_base::in | + ios_base::binary ; + } + + bool + EA_Atom::havePassedInSteamRead() + { + return false; + } + + + + + /******************************************************************************/ + /******************************************************************************/ + + EA_Atom_ReadOnly::EA_Atom_ReadOnly( GetIStream_Func_t f ) + : + GetIStream_Func( f ) + { + } + + fh_istream + EA_Atom_ReadOnly::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + return GetIStream_Func( c, rdn, this ); + } + + /******************************/ + /******************************/ + + EA_Atom_ReadOnly_PassedInStream::EA_Atom_ReadOnly_PassedInStream( GetIStream_PassedInStream_Func_t f ) + : + GetIStream_Func( f ) + { + } + + fh_istream + EA_Atom_ReadOnly_PassedInStream::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ss; + getIStream( c, rdn, m, ss ); + return ss; + } + + + fh_stringstream& + EA_Atom_ReadOnly_PassedInStream::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m, + fh_stringstream& ss ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + return GetIStream_Func( c, rdn, this, ss ); + } + + bool + EA_Atom_ReadOnly_PassedInStream::havePassedInSteamRead() + { + return true; + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + template < class ParentClass > + fh_iostream + EA_Atom_ReadWrite_Base< ParentClass >::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) + { + LG_ATTR_D << "EA_Atom_ReadWrite::getIOStream() m:" << int(m) << endl; + +// fh_stringstream ss; +// { +// fh_iostream iss = GetIOStream_Func( c, rdn, this ); + +// std::copy( std::istreambuf_iterator(iss), +// std::istreambuf_iterator(), +// std::ostreambuf_iterator(ss)); +// } + fh_iostream ss; + + if( !( m & ios::trunc )) + ss = priv_getIOStream( c, rdn ); + else + { + fh_stringstream z; + ss = z; + } + + + ss << flush; + ss->clear(); + ss->seekg(0); + ss->seekp(0); + ss->clear(); + +// cerr << "EA_Atom_ReadWrite::getIOStream c:" << c->getURL() << " rdn:" << rdn << endl; +// cerr << "EA_Atom_ReadWrite::getIOStream(7)" << endl; +// cerr << " sbuf:" << (void*)(ss->rdbuf()) +// << " rc:" << ss->getReferenceCount() +// << endl; +// cerr << "EA_Atom_ReadWrite::getIOStream(8)" << endl; +// cerr << "EA_Atom_ReadWrite::getIOStream(8) ss.rc:" << ss->rdbuf()->getReferenceCount() << endl; + ss->getCloseSig().connect( + bind( + bind( + bind( + sigc::mem_fun( *this, &_Self::On_IOStreamClosed), + rdn ), + c ), + m ) + ); + + AdjustForOpenMode_Opening( ss, m ); + return ss; + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + + EA_Atom_ReadWrite::EA_Atom_ReadWrite( + const GetIStream_Func_t& f_i, + const GetIOStream_Func_t& f_io, + const IOStreamClosed_Func_t& f_closed ) + : +// _Base( f_i ), + GetIOStream_Func( f_io ), + RWBase_t( f_i, f_closed ) + { + } + + fh_iostream + EA_Atom_ReadWrite::priv_getIOStream( Context* c, const std::string& rdn ) + { + return GetIOStream_Func( c, rdn, this ); + } + + fh_iostream + EA_Atom_ReadWrite::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + return RWBase_t::getIOStream( c, rdn, m ); + } + + + ferris_ios::openmode + EA_Atom_ReadWrite::getSupportedOpenModes() + { + return ios::in | ios::out | ios::binary; + } + + + void + EA_Atom_ReadWrite::On_IOStreamClosed( fh_istream& ss_param, + std::streamsize tellp, + ferris_ios::openmode m, + Context* c, + std::string rdn ) + { + fh_istream ss = ss_param; + + LG_ATTR_D << "EA_Atom_ReadWrite::IOStreamClosed() gtell:" << ss.tellg() << endl; + LG_ATTR_D << "EA_Atom_ReadWrite::IOStreamClosed() rdn:" << rdn << endl; + + AdjustForOpenMode_Closing( ss, m, tellp ); + EA_Atom* atom = 0; + IOStreamClosed_Func( c, rdn, atom, ss ); + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + EA_Atom_ReadWrite_PassedInStream::EA_Atom_ReadWrite_PassedInStream( + const GetIStream_PassedInStream_Func_t& f_i, + const IOStreamClosed_Func_t& f_closed ) + : + RWBase_t( f_i, f_closed ) + { + } + + fh_iostream + EA_Atom_ReadWrite_PassedInStream::priv_getIOStream( Context* c, const std::string& rdn ) + { + fh_stringstream ss; + return getIStream( c, rdn, ios::in | ios::out | ios::binary, ss ); + } + + + ferris_ios::openmode + EA_Atom_ReadWrite_PassedInStream::getSupportedOpenModes() + { + return ios::in | ios::out | ios::binary; + } + + void + EA_Atom_ReadWrite_PassedInStream::On_IOStreamClosed( fh_istream& ss_param, + std::streamsize tellp, + ferris_ios::openmode m, + Context* c, + std::string rdn ) + { + fh_istream ss = ss_param; + + LG_ATTR_D << "EA_Atom_ReadWrite::IOStreamClosed() gtell:" << ss.tellg() << endl; + LG_ATTR_D << "EA_Atom_ReadWrite::IOStreamClosed() rdn:" << rdn << endl; + + AdjustForOpenMode_Closing( ss, m, tellp ); + EA_Atom* atom = 0; + IOStreamClosed_Func( c, rdn, atom, ss ); + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + ferris_ios::openmode + EA_Atom_ReadWrite_OpenModeCached::getOpenMode() + { + return theMode; + } + + + fh_istream + EA_Atom_ReadWrite_OpenModeCached::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + theMode = m; + return _Base::getIStream( c, rdn, m ); + } + + fh_iostream EA_Atom_ReadWrite_OpenModeCached::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + theMode = m; + return _Base::getIOStream( c, rdn, m ); + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + fh_iostream + EA_Atom_ReadWrite_Contents::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + theMode = m; + fh_iostream ss = GetIOStream_Func( c, rdn, this ); + ss->clear(); + ss->seekg(0); + ss->seekp(0); + ss->clear(); + AdjustForOpenMode_Opening( ss, m ); + return ss; + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + + + EA_Atom_Static::EA_Atom_Static( const std::string& v ) + : + theValue( v ) + { + } + + fh_istream + EA_Atom_Static::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + fh_stringstream ss; + ss << theValue; + return ss; + } + + + EA_Atom_RDFCacheAttribute::EA_Atom_RDFCacheAttribute( EA_Atom* a, + bool m_shouldUpdateRDFStore ) + : + m_atom( a ), + m_shouldUpdateRDFStore( m_shouldUpdateRDFStore ) + { + } + + EA_Atom_RDFCacheAttribute::EA_Atom_RDFCacheAttribute( EA_Atom* a, + const std::string& m_cache ) + : + m_atom( a ), + m_cache( m_cache ), + m_shouldUpdateRDFStore( false ) + { + } + + fh_istream + EA_Atom_RDFCacheAttribute::getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + LG_RDFATTRCACHE_D << "getIStream() c:" << c->getURL() + << " m_shouldUpdateRDFStore:" << m_shouldUpdateRDFStore + << " rdn:" << rdn + << " rdfCacheTime:" << c->getRDFCacheMTime() + << endl; + if( m_shouldUpdateRDFStore ) + { + fh_istream iss = m_atom->getIStream( c, rdn, m ); + m_cache = StreamToString( iss ); + + fh_model m = getRDFCacheModel(); + fh_node subj = ensureRDFCacheNode( c ); + fh_node pred = Node::CreateURI( Semantic::getPredicateURI( rdn ) ); + fh_node obj = Node::CreateLiteral( m_cache ); + m->insert( subj, pred, obj ); + addToRDFCacheNode( c, rdn ); + + LG_RDFATTRCACHE_D << "getIStream() c:" << c->getURL() + << " caching rdn:" << rdn + << " value:" << m_cache + << endl; + +// m->set( Node::CreateURI( ((Context*)c)->getURL() ), +// getRDFCacheMTimePred(), +// Node::CreateLiteral( tostr( c->getRDFCacheMTime() ) ) ); + m->set( subj, getRDFCacheMTimePred(), + Node::CreateLiteral( tostr( c->getRDFCacheMTime() ) ) ); +// m->sync(); + m_shouldUpdateRDFStore = false; + } + + + LG_RDFATTRCACHE_D << "getIStream() c:" << c->getURL() + << " rdn:" << rdn + << " cache:" << m_cache + << endl; + fh_stringstream ss; + ss << m_cache; + return ss; + } + + + fh_iostream + EA_Atom_RDFCacheAttribute::getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + return m_atom->getIOStream( c, rdn, m ); + } + + ferris_ios::openmode + EA_Atom_RDFCacheAttribute::getSupportedOpenModes() + { + return ios::in | ios::out | ios::binary; + } + + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + AttributeProxy::AttributeProxy( fh_context c, + EA_Atom* _atom, + const std::string& aName ) + : + atom( _atom ), + HoldRefCountHigh( false ), + theAttributeName( aName ), + theContext( c ) + { + if( !aName.length() || aName == "." ) + { + theAttributeName = "content"; + } + + theParent = GetImpl( c ); + } + + + + Handlable::ref_count_t + AttributeProxy::AddRef() + { + if( HoldRefCountHigh ) + { + return ref_count_t(HIGH_RC); + } + return Handlable::AddRef(); + } + + Handlable::ref_count_t + AttributeProxy::Release() + { + if( HoldRefCountHigh ) + { + return ref_count_t(HIGH_RC); + } + return Handlable::Release(); + } + + + EA_Atom* + AttributeProxy::getAttr() + { + EA_Atom* ret = atom; + +// ret = theContext->getAttributePtr(theAttributeName); + + if( !ret ) + { + fh_stringstream ss; + ss << "attempt to get EA that is not existant rdn:" << theAttributeName; + Throw_NoSuchAttribute( tostr(ss), this ); + } + return ret; + } + + const std::string& + AttributeProxy::getDirName() const + { + return theAttributeName; + } + + std::string + AttributeProxy::getDirPath() throw (FerrisParentNotSetError) + { + std::string ret = theContext->getDirPath(); + ret += theAttributeName; + return ret; + } + + fh_istream + AttributeProxy::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + + fh_istream ss = getAttr()->getIStream( GetImpl(theContext), theAttributeName, m ); + ContextStreamMemoryManager::StreamIsOpeningHandler( getParent(), this, ss ); + return ss; + } + + + fh_istream AttributeProxy::getLocalIStream( std::string& new_dn, ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + fh_istream ret = getAttr()->getIStream( GetImpl(theContext), theAttributeName, m ); + ContextStreamMemoryManager::StreamIsOpeningHandler( getParent(), this, ret ); + + if( !g_file_test( getDirPath().c_str(), + GFileTest( + G_FILE_TEST_IS_REGULAR | + G_FILE_TEST_EXISTS) )) + { + f_ififostream fifos(ret); + new_dn = fifos.getFileName(); + return fifos; + } + + new_dn = getDirPath(); + return ret; + } + + fh_iostream AttributeProxy::getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) + { +// cerr << "AttributeProxy::getIOStream() m:" << int(m) << endl; + + fh_iostream ss = getAttr()->getIOStream( GetImpl(theContext), theAttributeName, m ); + ContextStreamMemoryManager::StreamIsOpeningHandler( getParent(), this, ss ); + return ss; + } + + bool + AttributeProxy::checkOpenModeSupported( ferris_ios::openmode userm ) + { + return getAttr()->checkOpenModeSupported( userm ); + } + + ferris_ios::openmode + AttributeProxy::getSupportedOpenModes() + { + return getAttr()->getSupportedOpenModes(); + } + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + typedef Loki::SingletonHolder< + Loki::AssocVector< Loki::TypeInfo, + AttributeCollection::SLAttributes_t* >, + Loki::CreateUsingNew, Loki::NoDestroy > StateLessAttrsHolder; + + typedef Loki::SingletonHolder< + AttributeCollection::SLAttributes_t, + Loki::CreateUsingNew, Loki::NoDestroy > getStateLessAttrs_NULL_Holder; + + typedef FERRIS_STD_HASH_MAP< string, AttributeCollection::SLAttributes_t* > DynamicClassStateLessAttrsHolder_t; + static DynamicClassStateLessAttrsHolder_t& getDynamicClassStateLessAttrsHolder() + { + static DynamicClassStateLessAttrsHolder_t ret; + return ret; + } + + + + AttributeCollection::AttributeCollection() + : + getStateLessAttrs_cache( &getStateLessAttrs_NULL_Holder::Instance() ), + getStateLessAttrs_cache_isRAW( true ), + m_namespaces( 0 ), + m_RDFCacheMTime( 0 ) + { + } + + AttributeCollection::~AttributeCollection() + { + clearAttributes(); + freeNamespaces(); + } + + AttributeCollection::SLAttributes_t* + AttributeCollection::getStateLessAttrs() + { + if( getStateLessAttrs_cache_isRAW ) + { + getStateLessAttrs_cache_isRAW = false; + +// cerr << "Setting up SL cache" +// << " this:" << dynamic_cast(this) +// << " deep:" << getDeepestTypeInfo().name() << endl; + SLAttributes_t* newcol = StateLessAttrsHolder::Instance()[ getDeepestTypeInfo() ]; + if( !newcol ) + { + newcol = new SLAttributes_t(); + StateLessAttrsHolder::Instance()[ getDeepestTypeInfo() ] = newcol; + } + getStateLessAttrs_cache = newcol; + } + else + { +// cerr << "getStateLessAttrs(havecache)" +// << " this:" << dynamic_cast(this) +// << " cache:" << (void*)getStateLessAttrs_cache +// << " deep:" << getDeepestTypeInfo().name() +// << " size:" << getStateLessAttrs_cache->size() +// << endl; + } + + return getStateLessAttrs_cache; + } + + + void + AttributeCollection::setup_DynamicClassedStateLessEAHolder( const std::string& className ) + { + SLAttributes_t* newcol = getDynamicClassStateLessAttrsHolder()[ className ]; +// cerr << "setup_DynamicClassedStateLessEAHolder(1) cn:" << className << " newcol:" << newcol << endl; + if( !newcol ) + { + newcol = new SLAttributes_t(); + getDynamicClassStateLessAttrsHolder()[ className ] = newcol; + } +// cerr << "setup_DynamicClassedStateLessEAHolder(2) cn:" << className << " newcol:" << newcol << endl; + getStateLessAttrs_cache = newcol; + getStateLessAttrs_cache_isRAW = false; + } + bool + AttributeCollection::isStateLessEAVirgin( const std::string& s ) + { + bool ret = !getDynamicClassStateLessAttrsHolder().count( s ); +// cerr << "isStateLessEAVirgin() s:" << s << " ret:" << ret << endl; + return ret; + } + + AttributeCollection::Attributes_t& + AttributeCollection::getAttributes() + { + return Attributes; + } + + + Loki::TypeInfo + AttributeCollection::getDeepestTypeInfo() + { + TypeInfos_t ti = getTypeInfos(); + return ti.front(); + } + + + std::list< Loki::TypeInfo > + AttributeCollection::getTypeInfos() + { + TypeInfos_t TypeInfos; + getTypeInfos( TypeInfos ); + return TypeInfos; + } + + void + AttributeCollection::callEnsureAttributesAreCreatedMarshalEToNSA( const std::string& eaname ) + throw( NoSuchAttribute ) + { + try + { + ensureAttributesAreCreated( eaname ); + } + catch( NoSuchAttribute& e ) + { + throw; + } + catch( exception& e ) + { + Throw_NoSuchAttribute( e.what(), 0);//this ); + } + } + + /** + * Get a handle for the attribute with a given rdn. If there is not attribute + * with the given rdn then NoSuchAttribute is thrown. + * + * @see getAttributeNames() + * @param rdn Name of attribute to get + * @throws NoSuchAttribute If there is no attribute with rdn + */ + fh_attribute + AttributeCollection::getAttribute( const std::string& _rdn ) + throw( NoSuchAttribute ) + { + std::string rdn = _rdn; + +// cerr << "AttributeCollection::getAttribute() this:" << (void*)this +// << " rdn:" << rdn +// << " ti.size:" << getTypeInfos().size() +// << endl; + + + if( !rdn.length() || rdn == "." ) + { + rdn = "content"; + } + + if( EA_Atom* atom = getAttributePtr( rdn ) ) + { + string rdn_exp = expandEAName( rdn, false ); +// cerr << "AttributeCollection::getAttribute() making proxy for rdn:" << rdn << endl; + return new AttributeProxy( static_cast(this), atom, rdn_exp ); + } + + std::stringstream ss; + ss << "NoSuchAttribute() for attr:" << rdn << endl; + Throw_NoSuchAttribute( tostr(ss), 0);//this ); + } + + + /** + * Returns Attribute* if its there or 0. + * + * @rdn The rdn to look for an attribute with + */ + EA_Atom* + AttributeCollection::getAttributeIfExists( const std::string& rdn ) + { + if( rdn != "mtime" ) + { +// cerr << "getAttributeIfExists() rdn:" << rdn << endl; + + m_RDFCacheAttributes_t& rca = getRDFCacheAttributes(); + m_RDFCacheAttributes_t::iterator iter = rca.find( rdn ); + if( iter != rca.end() ) + { + time_t mt = getMTime(); + if( mt <= getRDFCacheMTime() ) + { +// cerr << "getAttributeIfExists(A) rdn:" << rdn << endl; + LG_RDFATTRCACHE_D << "getAttributeIfExists() found rdfcacheAttr for rdn:" << rdn << endl; + return iter->second; + } + else + { +// cerr << "getAttributeIfExists(B) rdn:" << rdn << endl; + // Been modified! + bool hadSz = !getRDFCacheAttributes().empty(); + if( hadSz || m_RDFCacheMTime > 1 ) + { + for( m_RDFCacheAttributes_t::iterator iter = getRDFCacheAttributes().begin(); + iter != getRDFCacheAttributes().end(); iter++ ) + { + delete iter->second; + iter->second = 0; + } + getRDFCacheAttributes().clear(); + LG_RDFATTRCACHE_D << "erasing all cached RDF attributes for context" + << " c:" << ((Context*)this)->getURL() + << " mt:" << mt + << " rdf-mt:" << getRDFCacheMTime() + << endl; + m_RDFCacheMTime = mt; + + + // Wipe out the cache in the RDF store. + fh_model m = getRDFCacheModel(); + fh_node n = tryToGetRDFCacheNode( this ); + if( n ) + { + LG_RDFATTRCACHE_D << "erasing all cached RDF attributes for context c:" << ((Context*)this)->getURL() + << " subject node:" << n->toString() + << endl; + m->eraseTransitive( n ); + } + } + } + } + } + + // + //// + // These must be stateless for now. + //// + // + // LG_RDFATTRCACHE_D << "...0 inside:" << Inside_RDFCacheAttributes_priv_createAttributes << " rdn:" << rdn << endl; + // if( rdn == "subtitles" + // && !Inside_RDFCacheAttributes_priv_createAttributes ) + // { + // LG_RDFATTRCACHE_D << "...1" << endl; + // if( shouldRDFCacheAttribute( rdn ) ) + // { + // LG_RDFATTRCACHE_D << "...2" << endl; + // if( Attributes.end() != Attributes.find( rdn ) ) + // { + // EA_Atom* a = Attributes[ rdn ]; + + // LG_RDFATTRCACHE_D << "...3" << endl; + // if( !dynamic_cast( a ) ) + // { + // LG_RDFATTRCACHE_D << "...4" << endl; + // if( getRDFCacheAttributes().end() == getRDFCacheAttributes().find( rdn ) ) + // { + // EA_Atom_RDFCacheAttribute* rdfa = new EA_Atom_RDFCacheAttribute( a, true ); + // LG_RDFATTRCACHE_D << "adding rdfcache attribute for... rdn:" << rdn + // << " value reading delayed." << endl; + // getRDFCacheAttributes().insert( make_pair( rdn, rdfa ) ); + // m_RDFCacheMTime = getMTime(); + // return rdfa; + // } + // } + // } + // } + // } + + { + SLAttributes_t* sl = getStateLessAttrs(); + SLAttributes_t::iterator iter = sl->find( rdn ); +// cerr << "AttributeCollection::getAttributeIfExists() rdn:" << rdn +// << " deep:" << getDeepestTypeInfo().name() +// << " found:" << ( sl->end() != iter ) << endl; + + if( sl->end() != iter ) + { +// return iter->second; + + EA_Atom* a = iter->second; + + LG_RDFATTRCACHE_D << "getAttributeIfExists() should rdf cache the value of the given attribute." + << " rdn:" << rdn + << endl; + +#ifndef RDFCACHEATTRS_DISABLED + if( !Inside_RDFCacheAttributes_priv_createAttributes + && !dynamic_cast( a ) ) + { + if( shouldRDFCacheAttribute( rdn ) ) + { + LG_RDFATTRCACHE_D << "getAttributeIfExists() should rdf cache the value of the given attribute." + << " rdn:" << rdn + << endl; + if( getRDFCacheAttributes().end() == getRDFCacheAttributes().find( rdn ) ) + { + EA_Atom_RDFCacheAttribute* rdfa = new EA_Atom_RDFCacheAttribute( a, true ); + LG_RDFATTRCACHE_D << "adding rdfcache attribute for... rdn:" << rdn + << " value reading delayed." << endl; + getRDFCacheAttributes().insert( make_pair( rdn, rdfa ) ); + m_RDFCacheMTime = getMTime(); + return rdfa; + } + } + } +#endif + return a; + } + } + + + if( Attributes.end() != Attributes.find( rdn ) ) + { + return Attributes[ rdn ]; + } + +// cerr << "getAttributeIfExists() NOT THERE! url:" << ((dynamic_cast(this))->getURL()) +// << " rdn:" << rdn << endl; + + return 0; + } + + +// static fh_node& RDFCachePredNode() +// { +// static fh_node ret = 0; +// if( !ret ) +// ret = Node::CreateURI( getPredicateURI( "rdf-attribute-cache" ) ); +// return ret; +// } + + + + EA_Atom* + AttributeCollection::getAttributePtr( const std::string& raw_rdn ) + throw( NoSuchAttribute ) + { + string rdn = expandEAName( raw_rdn, false ); + + LG_ATTR_D << "Attribute::getAttributePtr(enter) raw_eaname:" << raw_rdn + << " namespace-expanded-eaname:" << rdn + << endl; +// cerr << "getAttributePtr(enter) raw_eaname:" << raw_rdn +// << " namespace-expanded-eaname:" << rdn +// << endl; + + + if( EA_Atom* a = getAttributeIfExists( rdn )) + { + LG_ATTR_D << "Attribute::getAttributePtr(2) raw_eaname:" << raw_rdn + << " namespace-expanded-eaname:" << rdn + << endl; + return a; + } + if( starts_with( rdn, "schema:" ) ) + { + if( Context* c = (dynamic_cast(this))) + { + if( c->isParentBound() ) + { + return c->getParent()->getAttributePtr( "subtree" + rdn ); + } + } + } + + callEnsureAttributesAreCreatedMarshalEToNSA( rdn ); + + if( EA_Atom* a = getAttributeIfExists( rdn )) + { + LG_ATTR_D << "Attribute::getAttributePtr(3) raw_eaname:" << raw_rdn + << " namespace-expanded-eaname:" << rdn + << endl; + return a; + } + + if( LG_ATTR_ACTIVE ) + { + LG_ATTR_D << "Attribute::getAttributePtr() no such attr:" << rdn + << " size:" << Attributes.size() + << " path:" << ((dynamic_cast(this))->getDirPath()) + << endl; + LG_ATTR_D << "No attr rdn:" << rdn + << " path:" << ((dynamic_cast(this))->getDirPath()) + << " deepest:" << getDeepestTypeInfo().name() + << " SL.size:" << getStateLessAttrs()->size() + << " A.size:" << Attributes.size() + << endl; + for( SLAttributes_t::iterator iter = getStateLessAttrs()->begin(); + iter != getStateLessAttrs()->end(); ++iter ) + { + LG_ATTR_D << " iter:" << iter->first << endl; + } + + for( Attributes_t::iterator iter = Attributes.begin(); + iter != Attributes.end(); ++iter ) + { + LG_ATTR_D << " iter:" << iter->first << endl; + } + } + + + std::stringstream ss; + ss << "NoSuchAttribute() for:" << rdn + << " path:" << (dynamic_cast(this))->getDirPath() + << endl; +// cerr << ss.str(); +// BackTrace(); + Throw_NoSuchAttribute( tostr(ss), 0);//this ); + } + + void + AttributeCollection::dumpAttributeNames() + { +// cerr << "========================================" << endl; +// cerr << " AttributeCollection::dumpAttributeNames()" +// << " path:" << ((dynamic_cast(this))->getDirPath()) +// << " deepest:" << getDeepestTypeInfo().name() +// << endl; +// for( SLAttributes_t::iterator iter = getStateLessAttrs()->begin(); +// iter != getStateLessAttrs()->end(); iter++ ) +// { +// cerr << " sl iter:" << iter->first << endl; +// } + +// for( Attributes_t::iterator iter = Attributes.begin(); +// iter != Attributes.end(); iter++ ) +// { +// cerr << " iter:" << iter->first << endl; +// } +// cerr << "========================================" << endl; + } + + + AttributeCollection::AttributeNames_t& + AttributeCollection::mergeAttributeNames( AttributeNames_t& ret, + const AttributeNames_t& t1, + const AttributeNames_t& t2 ) const + { + set_union( t1.begin(), t1.end(), + t2.begin(), t2.end(), + back_inserter( ret )); + return ret; + } + + /** + * Get an STL collection of all the attribute names that this context has. + * + * @see getAttributeCount() + * @return STL collection of EA names. + */ + AttributeCollection::AttributeNames_t& + AttributeCollection::getAttributeNames( AttributeNames_t& ret ) + { + ensureAttributesAreCreated(); + + for( SLAttributes_t::iterator iter = getStateLessAttrs()->begin(); + iter != getStateLessAttrs()->end(); ++iter ) + { + ret.push_back( iter->first ); + } + + for( Attributes_t::iterator iter = Attributes.begin(); + iter != Attributes.end(); ++iter ) + { + ret.push_back( iter->first ); + } + + return ret; + } + + + /** + * Get a count of how many attributes this attribute has. + * + * @see priv_getAttributeCount() + * @return Count of substtributes. + */ + int + AttributeCollection::getAttributeCount() + { + return Attributes.size() + getStateLessAttrs()->size(); + } + + /** + * Test if there is an attribute with the given name + * + * @see getAttributeNames() + * @see getAttribute() + * @param rdn Name of attribute to get + * @throws NoSuchAttribute If there is a problem creating attributes + */ + bool + AttributeCollection::isAttributeBound( const std::string& rdn_raw, bool createIfNotThere ) + throw( NoSuchAttribute ) + { + string rdn = expandEAName( rdn_raw, false ); + LG_ATTR_D << "AttributeCollection::isAttributeBound(enter) rdn:" << rdn << endl; + + if( getAttributeIfExists( rdn )) + { + return true; + } + else if( !createIfNotThere ) + { + return false; + } + + callEnsureAttributesAreCreatedMarshalEToNSA( rdn ); + try + { + return getAttributeIfExists( rdn ); + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "rdn:" << rdn << " e:" << e.what() << endl; + Throw_NoSuchAttribute( tostr(ss), 0 ); + } + + } + + bool + AttributeCollection::isStatelessAttributeBound( const std::string& rdn ) + throw( NoSuchAttribute ) + { + SLAttributes_t* sl = getStateLessAttrs(); + SLAttributes_t::iterator iter = sl->find( rdn ); + if( sl->end() != iter ) + { + return iter->second; + } + return false; + } + + + + /** + * Clear all the attributes. This method may delete attributes if a reference + * is not still held to the attributes that are cleared from the collection. + */ + void + AttributeCollection::clearAttributes() + { +// if( dynamic_cast(this) ) +// { +// cerr << "clearAttributes() c:" << ((dynamic_cast(this))->getURL()) +// << " size:" << Attributes.size() +// << " c addr:" << (void*)((dynamic_cast(this))) +// << endl; +// } + + for( Attributes_t::iterator iter = Attributes.begin(); + iter != Attributes.end(); iter++ ) + { + delete iter->second; + iter->second = 0; + } + Attributes.clear(); + } + + +// void +// AttributeCollection::tryAddExternalAttribute( +// const char* rdn, +// const EA_Atom_ReadOnly::GetIStream_Func_t& f, +// bool addToREA +// ) +// throw( CanNotAddExternalAttribute ) +// { +// fh_stringstream ss; +// ss << "Can not add a new external attribute rdn:" << rdn << endl; +// Throw_CanNotAddExternalAttribute( tostr(ss), 0 ); +// } + +// void +// AttributeCollection::tryAddWritableExternalAttribute( +// const char* rdn, +// const EA_Atom_ReadOnly::GetIStream_Func_t& f_i, +// const EA_Atom_ReadWrite::GetIOStream_Func_t& f_io, +// const EA_Atom_ReadWrite::IOStreamClosed_Func_t& f_closed, +// bool addToREA +// ) +// throw( CanNotAddExternalAttribute ) +// { +// fh_stringstream ss; +// ss << "Can not add a new external attribute rdn:" << rdn << endl; +// Throw_CanNotAddExternalAttribute( tostr(ss), 0 ); +// } + + +// void +// AttributeCollection::tryAddEA_Atom_Static( +// const std::string& rdn, +// const std::string& v, +// bool addToREA +// ) +// throw( CanNotAddExternalAttribute ) +// { +// fh_stringstream ss; +// ss << "AttributeCollection::Can not add a new fixed string attribute rdn:" << rdn << endl; +// Throw_CanNotAddExternalAttribute( tostr(ss), 0 ); +// } + + +// EA_Atom* +// AttributeCollection::tryAddHeapAttribute( const std::string& rdn, +// EA_Atom* a, +// bool addToREA = false ) +// { +// return a; +// } + + + + + bool + AttributeCollection::addAttribute( const std::string& rdn, + EA_Atom* atom, + XSDBasic_t sct, + bool addToREA ) + { + bool rc = false; + try + { + rc = setAttribute( rdn, atom, addToREA, sct ); + } + catch( std::exception& e ) + { + delete atom; + throw; + } + + if( !rc ) + { + delete atom; + } + return rc; + } + + + + /** + * Insert a new subattribute into the collection. + * + * @throws AttributeAlreadyInUse If the rdn of the new attribute is already in use. + * @param atx New attribute to add as a subattribute. + */ + bool + AttributeCollection::setAttribute( const std::string& rdn, + EA_Atom* atx, + bool addToREA, + XSDBasic_t sct, + bool isStateLess ) + throw( AttributeAlreadyInUse ) + { + if( !atx ) + { + LG_ATTR_ER << "Trying to set an unbound attribute! path" + << (dynamic_cast(this))->getDirPath() << endl; + cerr << "Trying to set an unbound attribute! path" + << (dynamic_cast(this))->getDirPath() << endl; + return false; + } + + if( isAttributeBound( rdn, false )) + { +// cerr << "Warning, attempt to add attribute rdn:" << rdn +// << " when it is already bound." << endl; +// BackTrace(); + return false; + } + + + if( isStateLess ) + { +// cerr << "Setting stateless rdn:" << rdn +// << " deepest:" << getDeepestTypeInfo().name() +// << endl; + string rdn_exp = expandEAName( rdn, false ); + if( EA_Atom* a = getAttributeIfExists( rdn_exp )) + { +// cerr << "setAttribute() AttributeAlreadyInUse:" << rdn << endl; + + std::stringstream ss; + ss << "setAttribute() AttributeAlreadyInUse:" << rdn_exp; + Throw_AttributeAlreadyInUse( tostr(ss), 0 ); + } + +// cerr << "setAttribute() adding stateless rdn:" << rdn << endl; + getStateLessAttrs()->insert( make_pair( rdn, atx ) ); + } + else + { + Attributes.insert( make_pair( rdn, atx ) ); + } + + + if( !isStateLess && !starts_with( rdn, "schema:" )) + { + if( Context* c = dynamic_cast(this)) + { + // + // Native disk EA are handled differently, see libxfsnative.cpp + // + if( sct != FXD_BINARY_NATIVE_EA ) + { + attachGenericSchema( c, rdn, sct ); + } + } + } + + bumpVersion(); + return true; + } + + void + AttributeCollection::unsetAttribute( const std::string& rdn ) + { + Attributes.erase( Attributes.find( rdn ) ); + bumpVersion(); + } + + /****************************************/ + /****************************************/ + /****************************************/ + + time_t + AttributeCollection::getMTime() + { + time_t ret = 0; + ret = toType(getStrAttr( this, "mtime", "0" ) ); + return ret; + } + + + AttributeCollection::m_RDFCacheAttributes_t& + AttributeCollection::getRDFCacheAttributes() + { + return m_RDFCacheAttributes; + } + + + bool + AttributeCollection::shouldRDFCacheAttribute( const std::string& s ) + { +// cerr << "shouldRDFCacheAttribute() s:" << s << endl; + + if( !getIsNativeContext() ) + return false; + + { + static FERRIS_STD_HASH_SET< std::string > col; + if( col.empty() ) + { + string d = getEDBString( FDB_GENERAL, + CFG_RDFCACHE_ATTRS_LIST_K, + CFG_RDFCACHE_ATTRS_LIST_DEFAULT ); + if( !d.empty() ) + { + stringlist_t sl; + Util::parseCommaSeperatedList( d, sl ); + copy( sl.begin(), sl.end(), inserter( col, col.end() )); + } + } +// cerr << "should cache:" << col.count( s ) << " s:" << s << endl; + if( col.count( s ) ) + return true; + } + + return false; + } + + time_t + AttributeCollection::getRDFCacheMTime() + { + return m_RDFCacheMTime; + } + + void + AttributeCollection::RDFCacheAttributes_priv_createAttributes() + { +#ifdef RDFCACHEATTRS_DISABLED + return; +#endif + + LG_RDFATTRCACHE_D << "RDFCacheAttrs_createAttrs() top..." + << " c:" << ((Context*)this)->getURL() + << " c.name:" << ((Context*)this)->getDirName() + << endl; + + Util::ValueRestorer< bool > x( Inside_RDFCacheAttributes_priv_createAttributes, true ); + + if( m_RDFCacheMTime==1 || !getRDFCacheAttributes().empty() ) + return; + + LG_RDFATTRCACHE_D << "RDFCacheAttrs_createAttrs() ok..." + << " c:" << ((Context*)this)->getURL() + << " c.name:" << ((Context*)this)->getDirName() + << endl; +// m_RDFCacheMTime = getMTime(); + + m_RDFCacheMTime = 1; + fh_model m = getRDFCacheModel(); + +// fh_node rdfCacheTimeObject = m->getObject( Node::CreateURI( ((Context*)this)->getURL() ), +// getRDFCacheMTimePred() ); +// if( !rdfCacheTimeObject ) +// return; + + fh_node subj = tryToGetRDFCacheNode( this ); + if( !subj ) + { + return; + } + fh_node rdfCacheTimeObject = m->getObject( subj, getRDFCacheMTimePred() ); + if( !rdfCacheTimeObject ) + { + return; + } + m_RDFCacheMTime = toint( rdfCacheTimeObject->toString() ); + +// { +// string rdn = "width"; +// fh_node obj = m->getObject( subj, Node::CreateURI( Semantic::getPredicateURI( rdn ) )); +// if( obj ) +// { +// string cache = obj->toString(); +// if( EA_Atom* a = getAttributeIfExists( rdn )) +// { +// LG_RDFATTRCACHE_D << "adding rdfcache attribute for... rdn:" << rdn +// << " value:" << cache << endl; +// EA_Atom* rdfa = new EA_Atom_RDFCacheAttribute( a, cache ); +// getRDFCacheAttributes().insert( make_pair( rdn, rdfa ) ); +// } +// } +// return; +// } + + NodeIterator end = NodeIterator(); + NodeIterator piter = m->findObjects( subj, getRDFCacheEANamesListPred() ); + for( ; piter != end; ++piter ) + { + fh_node obj = m->getObject( subj, *piter ); + + if( !obj ) + continue; + + string rdn = Semantic::stripPredicateURIPrefix( (*piter)->getURI()->toString() ); + string cache = obj->toString(); + + LG_RDFATTRCACHE_D << "read RDFCache attrs... rdn:" << rdn + << " value:" << cache << endl; + + if( EA_Atom* a = getAttributeIfExists( rdn )) + { + LG_RDFATTRCACHE_D << "adding rdfcache attribute for... rdn:" << rdn + << " value:" << cache << endl; + EA_Atom* rdfa = new EA_Atom_RDFCacheAttribute( a, cache ); + getRDFCacheAttributes().insert( make_pair( rdn, rdfa ) ); + } + } + } + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static const std::string FERRIS_NAMESPACE_BASE = "http://witme.sf.net/libferris-core/xmlns:"; + static const std::string FERRIS_NAMESPACE_SCHEMA + = "http://witme.sf.net/libferris-core/ns/xmlschema/"; + static const std::string FERRIS_NAMESPACE_EMBLEM + = "http://witme.sf.net/libferris-core/ns/emblem/"; + static const std::string FERRIS_NAMESPACE_UNKNOWN + = "http://witme.sf.net/libferris-core/ns/unknown/"; + + /** + * Expand user defined namespaces to full URI for the given attribute name + * + * @param s The name of an EA which may include a namespace prefix to expand + * @param expandInternalFerrisNamespaces (default true) if false then namespaces + * like schema: are not expanded. + * @return The expanded EA name. + */ + std::string + AttributeCollection::expandEAName( const std::string& s, + bool expandInternalFerrisNamespaces ) + { + if( !expandInternalFerrisNamespaces ) + if( starts_with( s, "schema:") + || starts_with( s, "emblem:") + || starts_with( s, "fspot:") + || starts_with( s, "http:") + || starts_with( s, "tag:") + || starts_with( s, "exif:") ) + return s; + + int colonIndex = s.find( ":" ); + if( colonIndex != string::npos ) + { + string xmlns = s.substr( 0, colonIndex ); + string rest = s.substr( colonIndex + 1 ); + + string URI = resolveNamespace( xmlns ); + if( URI.empty() ) + { + if( starts_with( s, FERRIS_NAMESPACE_UNKNOWN )) + return s; + if( starts_with( s, "http://witme.sf.net" )) + return s; + +// cerr << "expandEAName() adding unknown prefix s:" << s << endl; + return FERRIS_NAMESPACE_UNKNOWN + s; + } + + + + fh_stringstream ss; + ss << URI; + if( URI[ URI.length()-1 ] != '/' ) + ss << "/"; + ss << rest; +// cerr << "Context::expandEAName() s:" << s +// << " xmlns:" << xmlns +// << " rest:" << rest +// << " return:" << tostr(ss) +// << endl; + + return tostr(ss); + } + return s; + } + + /** + * For this context set the namespace for 'prefix' to resolve to 'URI' + */ + void + AttributeCollection::setNamespace( const std::string& prefix, + const std::string& URI ) + { + if( Context* c = dynamic_cast(this)) + { + setStrAttr( c, FERRIS_NAMESPACE_BASE + prefix, URI, true, true ); +// Shell::createEA( c, FERRIS_NAMESPACE_BASE + prefix, URI ); + } + } + + /** + * resolve the prefix to its set URI + * @return the URI for prefix or an empty string if not found + */ + std::string + AttributeCollection::resolveNamespace( const std::string& prefix ) + { + string ret = resolveFerrisXMLNamespace( prefix ); + + if( ret == FERRIS_NAMESPACE_UNKNOWN ) + return ""; + +// cerr << "resolveNamespace() prefix:" << prefix << " ret:" << ret << endl; + return ret; + } + + /** + * Remove the binding for the prefix given. + */ + void + AttributeCollection::removeNamespace( const std::string& prefix ) + { + setNamespace( prefix, "" ); + } + + stringlist_t + AttributeCollection::getNamespacePrefixes() + { + if( !m_namespaces ) + readNamespaces(); + + stringlist_t ret; + stringmap_t::const_iterator begin = m_namespaces->begin(); + stringmap_t::const_iterator end = m_namespaces->end(); + copy( map_domain_iterator(begin), map_domain_iterator(end), back_inserter( ret )); + + return ret; + } + + + /** + * Allocate m_namespaces and marshall all the attribute names that are namespace + * prefixes into the m_namespaces map. If the namespaces have already been read + * then they are cleared and reread from the current attributes for this context. + * + * When a new attribute has been created then updateNamespacesForNewAttribute() + * should be called to taint the namespaces cache. + */ + void + AttributeCollection::readNamespaces() + { + if( !m_namespaces ) + m_namespaces = new stringmap_t; + + m_namespaces->clear(); + AttributeCollection::AttributeNames_t an; + getAttributeNames( an ); + AttributeCollection::AttributeNames_t::iterator end = an.end(); + int FERRIS_NAMESPACE_BASE_LENGTH = FERRIS_NAMESPACE_BASE.length(); + + for( AttributeCollection::AttributeNames_t::iterator iter = an.begin(); + iter != end; iter++ ) + { + if( !starts_with( *iter, FERRIS_NAMESPACE_BASE )) + continue; + + + string prefix = iter->substr( FERRIS_NAMESPACE_BASE_LENGTH ); +// cerr << "readNamespaces() iter:" << *iter << endl +// << " prefix:" << prefix +// << endl; + try + { + // + // Note that we can't use getStrAttr() etc here because they + // resolve and expand prefixes for us. + // +// string URI = getStrAttr( this, *iter, "", true, true ); + string URI = ""; + if( EA_Atom* atom = getAttributeIfExists( *iter )) + { + ferris_ios::openmode m = ios::in; + fh_istream ss = atom->getIStream( (Context*)this, *iter, m ); + URI = StreamToString( ss ); + } + + m_namespaces->insert( make_pair( prefix, URI )); +// cerr << "Setting namespace:" << prefix +// << " to URI:" << URI +// << endl; + } + catch( exception& e ) + { + cerr << "error setting namespace:" << prefix + << " e:" << e.what() + << endl; + } + + +// int eqIndex = p.find( "=" ); +// if( eqIndex != string::npos ) +// { +// string prefix = p.substr( 0, eqIndex ); +// string URI = p.substr( eqIndex + 1 ); +// m_namespaces->insert( make_pair( prefix, URI )); +// } + } + } + + void + AttributeCollection::freeNamespaces() + { + if( m_namespaces ) + { + m_namespaces->clear(); + delete m_namespaces; + m_namespaces = 0; + } + } + + void + AttributeCollection::updateNamespacesForNewAttribute( const std::string& s ) + { + freeNamespaces(); + } + + + /** + * Walk up the tree looking for a user defined namespace for 's'. + * Creates a cache of all set namespaces as the tree is walked upwards. + * + * @return The URI for the namespace 's' or the URI for a unknown + * prefix which is inside the libferris URI namespace. + */ + std::string + AttributeCollection::resolveFerrisXMLNamespace( const std::string& s ) + { + if( s == "schema" ) + return FERRIS_NAMESPACE_SCHEMA; + if( s == "emblem" ) + return FERRIS_NAMESPACE_EMBLEM; + if( s == "http" ) + return FERRIS_NAMESPACE_UNKNOWN; + + if( !m_namespaces ) + readNamespaces(); + + if( m_namespaces ) + { + stringmap_t::const_iterator ni = m_namespaces->find( s ); + if( ni != m_namespaces->end() ) + { +// cerr << "resolveFerrisXMLNamespace() s:" << s +// << " ret:" << ni->second << endl; + return ni->second; + } + } + +// cerr << "resolveFerrisXMLNamespace() s:" << s +// << " ret==U:" << FERRIS_NAMESPACE_UNKNOWN << endl; + + return FERRIS_NAMESPACE_UNKNOWN; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + AttributeCollection::ensureAttributesAreCreated( const std::string& eaname ) + { + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + namespace Factory + { + + + fh_istream MakePipeEA( const fh_runner& Runner ) + throw( CanNotGetStream ) + { + try + { + fh_istream ret = Runner->RunWithStdoutAsReadablePipe(); + return ret; + +// Runner->Run(); +// fh_istream filepipe = Runner->getStdOut(); +// return filepipe; + } + catch( ProgramSpawn& e ) + { + std::stringstream ss; + ss //<< "ExecAttribute::priv_getIStream() path:" << getDirPath() + << " exec/fork was a failure." + << " ERR: " << Runner->getErrorString() + << endl; + Throw_CanNotGetStream(tostr(ss), 0); //this); + } + } + }; + + + const char* + NonVolitileStringHolder::makeNonVolitileString( const std::string& s ) + { + typedef std::list< std::string > v_t; + static v_t v; + v.push_back( s ); + return v.back().c_str(); + } + +}; diff --git a/Ferris/Attribute.hh b/Ferris/Attribute.hh new file mode 100644 index 0000000..400e869 --- /dev/null +++ b/Ferris/Attribute.hh @@ -0,0 +1,1046 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Attribute.hh,v 1.17 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include "Ferris/FerrisStdHashMap.hh" + +#ifndef _ALREADY_INCLUDED_FERRIS_ATTRIBUTE_H_ +#define _ALREADY_INCLUDED_FERRIS_ATTRIBUTE_H_ + +namespace Ferris +{ + FERRISEXP_API void AdjustForOpenMode_Opening( fh_istream ss, ferris_ios::openmode m ); + FERRISEXP_API void AdjustForOpenMode_Opening( fh_iostream ss, ferris_ios::openmode m ); + FERRISEXP_API void AdjustForOpenMode_Closing( fh_istream& ss, ferris_ios::openmode m, std::streamsize tellp ); + + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + class Attribute; + typedef Attribute* AttributePtr; + + class FERRISEXP_API Attribute + // : + // public Loki::SmallObject<> + { + private: + + // So that the proxy can set theParent and theDirName + friend class AttributeProxy; + + public: + + typedef Context* Parent_t; + friend class RootContextFactory; + + protected: + + void setAttributeContext( Parent_t parent ); + + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual fh_iostream priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual std::pair splitPathAtStart( const std::string& s ); + virtual std::pair splitPathAtEnd( const std::string& s ); + virtual bool canSplitPathAtStart( const std::string& s ); + virtual bool canSplitPathAtEnd( const std::string& s ); + virtual std::string trimLeadingSeps( const std::string& s ); + virtual std::string trimTrailingSeps( const std::string& s ); + virtual std::string trimEdgeSeps( const std::string& s ); + + const std::string& getSeperator(); + + virtual void RegisterStreamWithContextMemoryManagement( fh_istream ss ); + + public: + + // FIXME: should these two be public? Should they become Shell::Basename() + // etc and fix the seperator as a / char? what about files with / in + // thier names? + virtual std::string getLastPartOfName( const std::string& s ); + virtual std::string appendToPath( const std::string& p, + const std::string& d, + bool allowDirToBeAbsolute = false ); + + Attribute( Parent_t parent = 0 ); + virtual ~Attribute(); + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_istream getLocalIStream( std::string& new_dn, ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_iostream getIOStream( ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual bool checkOpenModeSupported( ferris_ios::openmode userm ); + virtual ferris_ios::openmode getSupportedOpenModes(); + + virtual Parent_t getParent() throw (FerrisParentNotSetError); + virtual bool isParentBound(); + + /** + * Get the rdn of this attribute + * + * @see getDirPath() + * @return The rdn. + */ + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + + virtual fh_iostream copyTo( fh_iostream oss ); + virtual fh_ostream copyTo( fh_ostream oss ); + + private: + + // kept protected for now so that I can modify the code + // and not remake all of ferris, later will be public. + template< class T > T copyTo( fh_istream iss, T oss ); + + + Parent_t theParent; + }; + + + + + class FERRISEXP_API EA_Atom + { + public: + + EA_Atom(); + virtual ~EA_Atom(); + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) = 0; + + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual bool checkOpenModeSupported( ferris_ios::openmode userm ); + virtual ferris_ios::openmode getSupportedOpenModes(); + + virtual bool havePassedInSteamRead(); + +// virtual fh_iostream copyTo( fh_iostream oss ); +// virtual fh_ostream copyTo( fh_ostream oss ); + +// private: + +// // kept protected for now so that I can modify the code +// // and not remake all of ferris, later will be public. +// template< class T > T copyTo( fh_istream iss, T oss ); + }; + + + class FERRISEXP_API EA_Atom_ReadOnly_PassedInStream; + + /** + * The functor is called when this attribute is read to get a string representing + * the ea. + */ + class FERRISEXP_API EA_Atom_ReadOnly + : + public EA_Atom + { + typedef EA_Atom_ReadOnly _Self; + typedef EA_Atom _Base; + + friend class EA_Atom_ReadOnly_PassedInStream; + EA_Atom_ReadOnly() + {} + + public: + + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > GetIStream_Func_t; + + EA_Atom_ReadOnly( GetIStream_Func_t f ); + template + inline EA_Atom_ReadOnly( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + GetIStream_Func( GetIStream_Func_t( pObj, pMemFn ) ) + { + } + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + protected: + + GetIStream_Func_t GetIStream_Func; + }; + + + /** + * Just like EA_Atom_ReadOnly only more efficient. + * For reading small EA passing in a stringstream& and using that directly + * can be much more efficient. This is particularly noticable for sorting + * where you will have many compare (getEA) operations to sort a directory. + * + * Added December-2007. + */ + class FERRISEXP_API EA_Atom_ReadOnly_PassedInStream + : + public EA_Atom_ReadOnly + { + typedef EA_Atom_ReadOnly_PassedInStream _Self; + typedef EA_Atom_ReadOnly _Base; + + public: + + typedef Loki::Functor< fh_stringstream&, + LOKI_TYPELIST_4( Context*, + const std::string&, + EA_Atom*, + fh_stringstream& ) > GetIStream_PassedInStream_Func_t; + + EA_Atom_ReadOnly_PassedInStream( GetIStream_PassedInStream_Func_t f ); + template + EA_Atom_ReadOnly_PassedInStream( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + GetIStream_Func( GetIStream_PassedInStream_Func_t( pObj, pMemFn ) ) + { + } + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual fh_stringstream& getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m, + fh_stringstream& ss ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual bool havePassedInSteamRead(); + + protected: + + GetIStream_PassedInStream_Func_t GetIStream_Func; + }; + + /******************************/ + /******************************/ + /******************************/ + /******************************/ + + template < class ParentClass > + class FERRISEXP_API EA_Atom_ReadWrite_Base + : + public ParentClass + { + typedef EA_Atom_ReadWrite_Base _Self; + + public: + typedef Loki::Functor< void, + LOKI_TYPELIST_4( Context*, + const std::string&, + EA_Atom*, + fh_istream ) > IOStreamClosed_Func_t; + + protected: + + IOStreamClosed_Func_t IOStreamClosed_Func; + virtual fh_iostream priv_getIOStream( Context* c, const std::string& rdn ) = 0; + + public: + + template + EA_Atom_ReadWrite_Base( const PointerToObj& pObj, PointerToMemFn pMemFn, + const IOStreamClosed_Func_t& f_closed ) + : + ParentClass( pObj, pMemFn ), + IOStreamClosed_Func( f_closed ) + {} + template + EA_Atom_ReadWrite_Base( functorForParent f, + const IOStreamClosed_Func_t& f_closed ) + : + ParentClass( f ), + IOStreamClosed_Func( f_closed ) + {} + + + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + + virtual void On_IOStreamClosed( fh_istream& ss_param, + std::streamsize tellp, + ferris_ios::openmode m, + Context* c, + std::string rdn ) = 0; + + + }; + + + class FERRISEXP_API EA_Atom_ReadWrite + : + public sigc::trackable, + public EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly > + { + typedef EA_Atom_ReadWrite _Self; + typedef EA_Atom_ReadOnly _Base; + + protected: + + public: + + typedef EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly > RWBase_t; + typedef RWBase_t::IOStreamClosed_Func_t IOStreamClosed_Func_t; + typedef RWBase_t::GetIStream_Func_t GetIStream_Func_t; + + typedef Loki::Functor< fh_iostream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > GetIOStream_Func_t; + + EA_Atom_ReadWrite( const GetIStream_Func_t& f_i, + const GetIOStream_Func_t& f_io, + const IOStreamClosed_Func_t& f_closed ); + template + inline EA_Atom_ReadWrite( const PointerToObj_i& pObj_i, PointerToMemFn_i pMemFn_i, + const PointerToObj_o& pObj_o, PointerToMemFn_o pMemFn_o, + const PointerToObj_c& pObj_c, PointerToMemFn_c pMemFn_c ) + : + GetIOStream_Func( GetIOStream_Func_t( pObj_o, pMemFn_o ) ), +// RWBase_t( GetIStream_Func_t( pObj_i, pMemFn_i), +// IOStreamClosed_Func_t( pObj_c, pMemFn_c ) ) + RWBase_t( pObj_i, pMemFn_i, + IOStreamClosed_Func_t( pObj_c, pMemFn_c ) ) + { + } + + virtual fh_iostream priv_getIOStream( Context* c, const std::string& rdn ); + + // breaks ambiguous selection issues for subclasses + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw ( FerrisParentNotSetError, AttributeNotWritable, CanNotGetStream, std::exception ); + + + protected: + + GetIOStream_Func_t GetIOStream_Func; + virtual ferris_ios::openmode getSupportedOpenModes(); + virtual void On_IOStreamClosed( fh_istream& ss_param, + std::streamsize tellp, + ferris_ios::openmode m, + Context* c, + std::string rdn ); + }; + + /******************************/ + /******************************/ + /******************************/ + /******************************/ + + class FERRISEXP_API EA_Atom_ReadWrite_PassedInStream + : + public sigc::trackable, + public EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly_PassedInStream > + { + typedef EA_Atom_ReadWrite_PassedInStream _Self; + typedef EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly_PassedInStream > _Base; + typedef EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly_PassedInStream > RWBase_t; + + public: + + typedef Loki::Functor< void, + LOKI_TYPELIST_4( Context*, + const std::string&, + EA_Atom*, + fh_istream ) > IOStreamClosed_Func_t; + typedef EA_Atom_ReadWrite_Base< EA_Atom_ReadOnly_PassedInStream >::GetIStream_PassedInStream_Func_t GetIStream_PassedInStream_Func_t; + + + EA_Atom_ReadWrite_PassedInStream( const GetIStream_PassedInStream_Func_t& f_i, + const IOStreamClosed_Func_t& f_closed ); + template + inline EA_Atom_ReadWrite_PassedInStream( const PointerToObj_i& pObj_i, PointerToMemFn_i pMemFn_i, + const PointerToObj_c& pObj_c, PointerToMemFn_c pMemFn_c ) + : +// _Base( GetIStream_PassedInStream_Func_t( pObj_i, pMemFn_i), +// IOStreamClosed_Func_t( pObj_c, pMemFn_c ) ) + _Base( pObj_i, pMemFn_i, + IOStreamClosed_Func_t( pObj_c, pMemFn_c ) ) + { + } + + virtual fh_iostream priv_getIOStream( Context* c, const std::string& rdn ); + + protected: + + virtual ferris_ios::openmode getSupportedOpenModes(); + virtual void On_IOStreamClosed( fh_istream& ss_param, + std::streamsize tellp, + ferris_ios::openmode m, + Context* c, + std::string rdn ); + }; + + + /******************************/ + /******************************/ + /******************************/ + /******************************/ + + /** + * This should be used sparingly as it will eat more RAM. It should be OK in + * stateless EA due to the one object per context type semantics. + * + * It was created because the "content" stateless EA needs access to the openmode + * to perform special tasks. Basically there is a cache of the openmode which can + * be obtained using atom->getOpenMode() when the functor for handling getXStream() + * is called. + */ + class FERRISEXP_API EA_Atom_ReadWrite_OpenModeCached + : + public EA_Atom_ReadWrite + { + typedef EA_Atom_ReadWrite _Base; + + protected: + ferris_ios::openmode theMode; + + public: + + EA_Atom_ReadWrite_OpenModeCached( const GetIStream_Func_t& f_i, + const GetIOStream_Func_t& f_io, + const IOStreamClosed_Func_t& f_closed ) + : + _Base( f_i, f_io, f_closed ), + theMode( 0 ) + {} + + + /** + * Get the openmode that was passed to getXStream() which has called the functor + */ + ferris_ios::openmode getOpenMode(); + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + }; + + + /** + * Special handling to not attach a closed handler for the stream + */ + class FERRISEXP_API EA_Atom_ReadWrite_Contents + : + public EA_Atom_ReadWrite_OpenModeCached + { + typedef EA_Atom_ReadWrite_Contents _Self; + typedef EA_Atom_ReadWrite_OpenModeCached _Base; + public: + + EA_Atom_ReadWrite_Contents( const GetIStream_Func_t& f_i, + const GetIOStream_Func_t& f_io ) + : + _Base( + f_i, + f_io, + IOStreamClosed_Func_t( this, &_Self::nullclosed ) ) + {} + + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + void nullclosed( Context*, const std::string&, EA_Atom*, fh_istream ) + { + } + }; + + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + /** + * Sometimes its very handy to carry a fixed string value. + */ + class FERRISEXP_API EA_Atom_Static + : + public EA_Atom + { + std::string theValue; + + public: + + EA_Atom_Static( const std::string& v ); + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + }; + + + /** + * Caching derived information in an RDF store. + */ + class FERRISEXP_API EA_Atom_RDFCacheAttribute + : + public EA_Atom + { + bool m_shouldUpdateRDFStore; + EA_Atom* m_atom; + std::string m_cache; + + public: + + EA_Atom_RDFCacheAttribute( EA_Atom* a, bool m_shouldUpdateRDFStore ); + EA_Atom_RDFCacheAttribute( EA_Atom* a, const std::string& m_cache ); + + virtual fh_istream getIStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_iostream getIOStream( Context* c, + const std::string& rdn, + ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual ferris_ios::openmode getSupportedOpenModes(); + + }; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + + class FERRISEXP_API AttributeProxy + : + public Attribute, + public Handlable + { + EA_Atom* atom; + + protected: + + enum + { + HIGH_RC = 100 + }; + + bool HoldRefCountHigh; + fh_context theContext; + std::string theAttributeName; + + virtual EA_Atom* getAttr(); + + + friend class ContextStreamMemoryManager; + + public: + + AttributeProxy( fh_context c, EA_Atom* atom, const std::string& aName ); + + virtual ref_count_t AddRef(); + virtual ref_count_t Release(); + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + + virtual fh_istream getLocalIStream( std::string& new_dn, ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_iostream getIOStream( ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + + virtual bool checkOpenModeSupported( ferris_ios::openmode userm ); + virtual ferris_ios::openmode getSupportedOpenModes(); + }; + + + /** + * A collection of attributes + * + * Note that no virtual methods are used so that there is no vtable overhead + * for Context to inherit from this class. + */ + class FERRISEXP_API AttributeCollection + : + public Versioned + { + typedef AttributeCollection _Self; + typedef Versioned _Base; + + // AddRef() and Release() access. + friend class AttributeProxy; + + public: + + AttributeCollection(); + virtual ~AttributeCollection(); + + + virtual bool getIsNativeContext() const + { + return false; + } + + + + typedef Attribute* AttributePtr; + typedef std::list< std::string > AttributeNames_t; +// typedef std::set< std::string > AttributeNames_t; + + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + protected: + AttributeNames_t& mergeAttributeNames( AttributeNames_t& ret, + const AttributeNames_t& t1, + const AttributeNames_t& t2 ) const; + public: + /** + * Get the attribute names into the 'ret' parameter and return it. + */ + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + + void dumpAttributeNames(); + + + inline bool addAttribute( const std::string& rdn, + const EA_Atom_ReadOnly::GetIStream_Func_t& f, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + return setAttribute( rdn, + new EA_Atom_ReadOnly( f ), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + template + inline bool addAttribute( const std::string& rdn, + const PointerToObj& pObj, PointerToMemFn pMemFn, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + typedef EA_Atom_ReadOnly::GetIStream_Func_t Functor_t; + return setAttribute( rdn, + new EA_Atom_ReadOnly( Functor_t( pObj, pMemFn )), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + template + < + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1, + typename PointerToMemFn_i + > + inline bool addAttribute( const std::string& rdn, + Loki::SmartPtr pObj_i, PointerToMemFn_i pMemFn_i, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + typedef EA_Atom_ReadOnly::GetIStream_Func_t Functor_t; + return setAttribute( rdn, + new EA_Atom_ReadOnly( Functor_t( GetImpl(pObj_i), pMemFn_i )), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + + + inline bool addAttribute( const std::string& rdn, + const EA_Atom_ReadOnly::GetIStream_Func_t& f_i, + const EA_Atom_ReadWrite::GetIOStream_Func_t& f_io, + const EA_Atom_ReadWrite::IOStreamClosed_Func_t& f_closed, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + return setAttribute( rdn, + new EA_Atom_ReadWrite( f_i, f_io, f_closed ), + addToREA, + sct ); + } + template + inline bool addAttribute( const std::string& rdn, + const PointerToObj_i& pObj_i, PointerToMemFn_i pMemFn_i, + const PointerToObj_o& pObj_o, PointerToMemFn_o pMemFn_o, + const PointerToObj_c& pObj_c, PointerToMemFn_c pMemFn_c, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + typedef EA_Atom_ReadOnly::GetIStream_Func_t Fi; + typedef EA_Atom_ReadWrite::GetIOStream_Func_t Fo; + typedef EA_Atom_ReadWrite::IOStreamClosed_Func_t Fc; + return setAttribute( rdn, + new EA_Atom_ReadWrite( + Fi( pObj_i, pMemFn_i ), + Fo( pObj_o, pMemFn_o ), + Fc( pObj_c, pMemFn_c ) + ), + addToREA, + sct ); + } + + /** + * If this monster overload is not here and a fh_context is passed as + * pObj_i, pObj_o or pObj_c then it will retain a reference to the + * context inside the functor binding. This method strips off the + * Loki::SmartPtr shell and uses the raw pointer to avoid such extra + * references. + */ + template + < + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1, + typename T2, + template class OP2, + class CP2, + template class KP2, + template class SP2, + typename T3, + template class OP3, + class CP3, + template class KP3, + template class SP3, + typename PointerToMemFn_i, + typename PointerToMemFn_o, + typename PointerToMemFn_c + > + inline bool addAttribute( + const std::string& rdn, + Loki::SmartPtr pObj_i, PointerToMemFn_i pMemFn_i, + Loki::SmartPtr pObj_o, PointerToMemFn_o pMemFn_o, + Loki::SmartPtr pObj_c, PointerToMemFn_c pMemFn_c, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + typedef EA_Atom_ReadOnly::GetIStream_Func_t Fi; + typedef EA_Atom_ReadWrite::GetIOStream_Func_t Fo; + typedef EA_Atom_ReadWrite::IOStreamClosed_Func_t Fc; + return setAttribute( rdn, + new EA_Atom_ReadWrite( + Fi( GetImpl(pObj_i), pMemFn_i ), + Fo( GetImpl(pObj_o), pMemFn_o ), + Fc( GetImpl(pObj_c), pMemFn_c ) + ), + addToREA, + sct ); + } + + inline bool addAttribute( const std::string& rdn, + const std::string& v, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + return setAttribute( rdn, + new EA_Atom_Static( v ), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + inline bool addAttribute( const std::string& rdn, + char* v, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + return setAttribute( rdn, + new EA_Atom_Static( v ), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + inline bool addAttribute( const std::string& rdn, + const char* v, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ) + { + return setAttribute( rdn, + new EA_Atom_Static( v ), + addToREA, + XSDBasic_t( sct | FXDC_READONLY ) ); + } + + /** + * Try to add a new Atom that is allocated on the heap. If the new atom + * can not be added then it will be deleted and false will be returned. + * Any really major problems then atom will be deleted and an exception + * will be thrown. + */ + bool addAttribute( const std::string& rdn, + EA_Atom* atom, + XSDBasic_t sct = XSD_UNKNOWN, + bool addToREA = false ); + + + /******************************************************************************/ + /******************************************************************************/ + +// virtual EA_Atom* tryAddHeapAttribute( const std::string& rdn, +// EA_Atom* a, +// bool addToREA = false ); + + /** + * This is like addAttribute except it does no checking, and can add stateless + * DONT use this method directly, either use addAttribute() or + * tryAddStateLessAttribute() + * + * returns 1 if the attribute was added + */ + virtual bool setAttribute( const std::string& rdn, + EA_Atom* atx, + bool addToREA, + XSDBasic_t sct = XSD_UNKNOWN, + bool isStateLess = false ) + throw( AttributeAlreadyInUse ); + + protected: + + /************************************************************/ + /*** namespaces *********************************************/ + /************************************************************/ + public: + std::string expandEAName( const std::string& s, + bool expandInternalFerrisNamespaces ); + void setNamespace( const std::string& prefix, const std::string& URI ); + std::string resolveNamespace( const std::string& prefix ); + void removeNamespace( const std::string& prefix ); + virtual stringlist_t getNamespacePrefixes(); + protected: + typedef stringmap_t* m_namespaces_t; + m_namespaces_t m_namespaces; + virtual std::string resolveFerrisXMLNamespace( const std::string& s ); + virtual void readNamespaces(); + void freeNamespaces(); + void updateNamespacesForNewAttribute( const std::string& s ); + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + EA_Atom* getAttributeIfExists( const std::string& rdn ); + void callEnsureAttributesAreCreatedMarshalEToNSA( const std::string& eaname = "" ) + throw( NoSuchAttribute ); + + + /** + * Returns Attribute* if its there, ensures its created if it can be + * or throws + */ + EA_Atom* getAttributePtr( const std::string& rdn ) throw( NoSuchAttribute ); + + void clearAttributes(); + + virtual void ensureAttributesAreCreated( const std::string& eaname = "" ); + + /******************************************************************************/ + public: + typedef FERRIS_STD_HASH_MAP< std::string, EA_Atom* > Attributes_t; +// typedef Loki::AssocVector< std::string, EA_Atom* > SLAttributes_t; +// typedef std::map< std::string, EA_Atom* > SLAttributes_t; + typedef FERRIS_STD_HASH_MAP< std::string, EA_Atom* > SLAttributes_t; + protected: + Attributes_t Attributes; + Attributes_t& getAttributes(); + + typedef std::list< Loki::TypeInfo > TypeInfos_t; + Loki::TypeInfo getDeepestTypeInfo(); + TypeInfos_t getTypeInfos(); + virtual void getTypeInfos( TypeInfos_t& l ) + { + l.push_back( typeid( _Self ) ); + } + + bool getStateLessAttrs_cache_isRAW; + SLAttributes_t* getStateLessAttrs_cache; + SLAttributes_t* getStateLessAttrs(); + void setup_DynamicClassedStateLessEAHolder( const std::string& className ); + bool isStateLessEAVirgin( const std::string& s ); + + + public: + /** + * Test if there is an attribute called 's' which is stateless. + * @see isAttributeBound + */ + bool isStatelessAttributeBound( const std::string& s ) throw( NoSuchAttribute ); + + /** + * Remove knowledge of a given attribute for this context. + */ + virtual void unsetAttribute( const std::string& rdn ); + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + public: + /** + * To maintain a quick cache of derived attributes read from + * the local RDF store the mtime of the collection needs to + * be able to be read quickly. NativeContext should override + * this to return part of a stat buffer. The default is to + * return the "mtime" EA of it exists and can be read or to + * return 0 to indicate no cachning. + */ + virtual time_t getMTime(); + + time_t getRDFCacheMTime(); + + protected: + + typedef FERRIS_STD_HASH_MAP< std::string, EA_Atom* > m_RDFCacheAttributes_t; + m_RDFCacheAttributes_t& getRDFCacheAttributes(); + + /** + * Should a given EA be stored into an RDF cache? + */ + virtual bool shouldRDFCacheAttribute( const std::string& s ); + + + virtual void RDFCacheAttributes_priv_createAttributes(); + + private: + m_RDFCacheAttributes_t m_RDFCacheAttributes; + time_t m_RDFCacheMTime; + friend class EA_Atom_RDFCacheAttribute; + + }; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +}; + + +#endif diff --git a/Ferris/Attribute_private.hh b/Ferris/Attribute_private.hh new file mode 100644 index 0000000..de7d54d --- /dev/null +++ b/Ferris/Attribute_private.hh @@ -0,0 +1,54 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Attribute_private.hh,v 1.2 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ATTRIBUTE_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_ATTRIBUTE_PRIVATE_H_ + +#include + +namespace Ferris +{ + + namespace Factory + { + FERRISEXP_DLLLOCAL fh_istream MakePipeEA( const fh_runner& Runner ) + throw( CanNotGetStream ); + }; + + + class FERRISEXP_DLLLOCAL NonVolitileStringHolder + { + public: + + const char* makeNonVolitileString( const std::string& s ); + }; + +}; +#endif diff --git a/Ferris/BranchContext.cpp b/Ferris/BranchContext.cpp new file mode 100644 index 0000000..4d9d318 --- /dev/null +++ b/Ferris/BranchContext.cpp @@ -0,0 +1,612 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BranchContext.cpp,v 1.9 2011/06/17 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ +#define DUBCORE_DESCRIPTION "dc:description" + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + FerrisBranchRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + + void + FerrisBranchRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + for( RootContextFactory::Droppers_t::iterator iter = RootContextFactory::getDroppers().begin(); + iter != RootContextFactory::getDroppers().end(); iter++) + { + try + { + string rdn = iter->first; + LG_CTX_D << "priv_read() rdn:" << rdn << endl; + + + if( iter->second->isTopLevel() ) + { + fh_context delegate = Resolve( rdn + "://" ); + fh_context child = m_BranchInternalContextCreatorFunctor( this, delegate, rdn ); + +// LG_CTX_D << "priv_read() adding child..." << endl +// << " child.name:" << child->getDirName() +// << " child.path:" << child->getDirPath() +// << " child.url:" << child->getURL() +// << " rdn:" << rdn +// << endl; + + addNewChild( child ); + } + } + catch( exception& e ) + { + LG_CTX_W << "priv_read() e:" << e.what() << endl; + } + } + } + } + + FerrisBranchRootContext::FerrisBranchRootContext( + BranchInternalContextCreatorFunctor_t m_BranchInternalContextCreatorFunctor ) + : + _Base( 0, "/" ), + m_BranchInternalContextCreatorFunctor( m_BranchInternalContextCreatorFunctor ) + { + createStateLessAttributes(); + } + + FerrisBranchRootContext::~FerrisBranchRootContext() + { + } + + void + FerrisBranchRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + BranchInternalContextCreatorFunctor_t& + FerrisBranchRootContext::getCreator() + { + return m_BranchInternalContextCreatorFunctor; + } + + stringset_t& + FerrisBranchRootContext::getForceLocalAttributeNames() + { + static stringset_t ret; + if( ret.empty() ) + { + ret.insert("is-active-view"); + } + return ret; + } + + + + class FERRISEXP_DLLLOCAL FerrisBranchRootContext_RootContextDropper + : + public RootContextDropper + { + public: + typedef std::map< string, BranchInternalContextCreatorFunctor_t > m_functors_t; + m_functors_t m_functors; + + typedef std::map< string, fh_context > m_cache_t; + m_cache_t m_cache; + + FerrisBranchRootContext_RootContextDropper() + { + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + string scheme = rf->getContextClass(); +// cerr << "FerrisBranchRootContext_RootContextDropper() scheme:" << scheme << endl; + + if( m_cache.end() == m_cache.find( scheme ) ) + { + if( m_functors.end() == m_functors.find( scheme )) + { + LG_CTX_ER << "BAD! can't find information about scheme:" << scheme + << " branch filesystem!" << endl; + } + m_cache.insert( make_pair( scheme, new FerrisBranchRootContext( m_functors[ scheme ] ) )); + } + return m_cache[ scheme ]; + } + }; + bool FerrisBranchRootContext_Register( + const std::string& url_scheme, + BranchInternalContextCreatorFunctor_t m_BranchInternalContextCreatorFunctor ) + { + static FerrisBranchRootContext_RootContextDropper ___FerrisBranchRootContext_static_init; + ___FerrisBranchRootContext_static_init.m_functors[ url_scheme ] = m_BranchInternalContextCreatorFunctor; + RootContextFactory::Register( url_scheme, &___FerrisBranchRootContext_static_init ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FerrisBranchInternalContext::FerrisBranchInternalContext( + Context* theParent, + const fh_context& theDelegate ) + : + ChainedViewContext( theDelegate, false ) + { + setContext( theParent, theDelegate->getDirName() ); + + createStateLessAttributes(); +// SetupEventConnections(); +// Delegate->emitExistsEventForEachItem(); + } + + FerrisBranchInternalContext::FerrisBranchInternalContext( + Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + ChainedViewContext( theDelegate, rdn, false ) + { + setContext( theParent, rdn ); + + createStateLessAttributes(); +// SetupEventConnections(); +// Delegate->emitExistsEventForEachItem(); + +// cerr << "FerrisBranchInternalContext() ctor. " +// << " path:" << getDirPath() +// << " name:" << getDirName() +// << " rdn:" << rdn +// << endl; + } + + + + FerrisBranchInternalContext::~FerrisBranchInternalContext() + { + } + + // + // Short cut loading each dir unless absolutely needed. + // + fh_context + FerrisBranchInternalContext::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + LG_CTX_D << "FerrisBranchInternalContext::priv_getSubContext() " + << " url:" << getURL() + << " rdn:" << rdn + << " priv_isBound:" << priv_isSubContextBound( rdn ) + << endl; + + if( priv_isSubContextBound( rdn ) ) + { + return _Base::priv_getSubContext( rdn ); + } + + if( rdn.empty() ) + { + // stat failed + fh_stringstream ss; + ss << "NoSuchSubContext no rdn given"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + // + // Handle a delegate that needs to overmount + // + if( !Delegate->isSubContextBound( rdn ) ) + { + if( Delegate->hasOverMounter() ) + { + Delegate->tryToOverMount(); + Delegate->read(); + } + } + + fh_context dsub = Delegate->getSubContext( rdn ); + fh_context cc = getCreator()( this, dsub, dsub->getDirName() ); + Insert( GetImpl(cc), false ); + return _Base::priv_getSubContext( rdn ); + } + catch( NoSuchSubContext& e ) + { + throw e; + } + catch( exception& e ) + { + string s = e.what(); + Throw_NoSuchSubContext( s, this ); + } + catch(...) + {} + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + + stringset_t& + FerrisBranchInternalContext::getForceLocalAttributeNames() + { + static stringset_t ret; + if( ret.empty() ) + { + ret.insert("is-dir"); + ret.insert("is-file"); + ret.insert("treeicon"); + + ret.insert("name"); + ret.insert("path"); + ret.insert("url"); + } + return ret; + } + + bool + FerrisBranchInternalContext::isDir() + { + return true; + } + + + + /** + * Either the link target's dirName() or what is set with setLocalName() + */ + const std::string& + FerrisBranchInternalContext::getDirName() const + { + const string& rdn_ddb = _DontDelegateBase::getDirName(); + const string& rdn_target = Delegate->getDirName(); + +// LG_CTX_D << "FerrisBranchInternalContext::getDirName() rdn_ddb:" << rdn_ddb +// << " rdn_target:" << rdn_target +// << " scheme:" << RootContextFactory::getRootContextClassName( this ) +// << endl; + + if( rdn_target == "/" ) + { + return rdn_ddb; +// string ret = RootContextFactory::getRootContextClassName( this ); +// return ret; + } + + + if( rdn_ddb != rdn_target ) + return rdn_ddb; + return rdn_target; + } + + std::string + FerrisBranchInternalContext::getDirPath() throw (FerrisParentNotSetError) + { +// cerr << "FerrisBranchInternalContext::getDirPath() " +// << " dele-ret:" << _Base::getDirPath() << endl +// << " nodele-ret:" << _DontDelegateBase::getDirPath() +// << endl; + +// if( isParentBound() ) +// { +// if( FerrisBranchRootContext* p = dynamic_cast(getParent())) +// { +// return "/" + getURLScheme(); +// } +// } + return _DontDelegateBase::getDirPath(); + } + + + std::string + FerrisBranchInternalContext::getURL() + { +// cerr << "FerrisBranchInternalContext::getURL() ret:" +// << _DontDelegateBase::getURL() +// << endl; + + return _DontDelegateBase::getURL(); + } + +// std::string +// FerrisBranchInternalContext::private_getStrAttr( const std::string& rdn, +// const std::string& def, +// bool getAllLines, +// bool throwEx ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::private_getStrAttr( rdn, def, getAllLines, throwEx ); + +// return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); +// } + +// fh_attribute +// FerrisBranchInternalContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::getAttribute( rdn ); + +// return Delegate->getAttribute(rdn); +// } +// AttributeCollection::AttributeNames_t& +// FerrisBranchInternalContext::getAttributeNames( AttributeNames_t& ret ) +// { +// AttributeCollection::AttributeNames_t t1; +// AttributeCollection::AttributeNames_t t2; +// Delegate->getAttributeNames( t1 ); +// _DontDelegateBase::getAttributeNames( t2 ); +// return mergeAttributeNames( ret, t1, t2 ); +// } +// int +// FerrisBranchInternalContext::getAttributeCount() +// { +// return Delegate->getAttributeCount(); +// } +// bool +// FerrisBranchInternalContext::isAttributeBound( const std::string& rdn, +// bool createIfNotThere +// ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::isAttributeBound( rdn, createIfNotThere ); + +// return Delegate->isAttributeBound( rdn, createIfNotThere ); +// } + + fh_context + FerrisBranchInternalContext::addNewChild( fh_context c ) + { + Insert( GetImpl(c), false ); + return c; + } + + void + FerrisBranchInternalContext::UnPageSubContextsIfNeeded() + { + if( isTrue( getStrAttr( Delegate, "is-file", "false" ))) + return; + +// cerr << "FerrisBranchInternalContext::UnPageSubContextsIfNeeded() url:" << getURL() << endl; + try + { + Delegate->UnPageSubContextsIfNeeded(); + } + catch( exception& e ) + { + LG_CTX_I << "non error FerrisBranchInternalContext::UnPageSubContextsIfNeeded() url:" << getURL() + << " warning:" << e.what() + << endl; + } + } + + long + FerrisBranchInternalContext::guessSize() throw() + { + return Delegate->guessSize(); + } + + void + FerrisBranchInternalContext::read( bool force ) + { + if( isTrue( getStrAttr( Delegate, "is-file", "false" ))) + { + LG_CTX_D << "FerrisBranchInternalContext::read() is-file." << endl; + if( !force && SubContextCount() ) + { + LG_CTX_D << "FerrisBranchInternalContext::read() is-file. cached" << endl; + emitExistsEventForEachItemRAII _raii1( this ); + return; + } + + priv_read_leaf(); + } + else + { + LG_CTX_D << "FerrisBranchInternalContext::read() is-dir." << endl; + + if( !force && Delegate->HaveReadDir ) + { + if( !getItems().empty() ) + { + LG_CTX_D << "FerrisBranchInternalContext::read() is-dir. cached" << endl; + HaveReadDir = true; + emitExistsEventForEachItemRAII _raii1( this ); + return; + } + } + + LG_CTX_D << "FerrisBranchInternalContext::read() Reading delegate:" << Delegate->getURL() + << " delegate.path:" << Delegate->getDirPath() + << endl; + + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + sigc::connection c = Delegate->getNamingEvent_Exists_Sig().connect( + sigc::mem_fun( *this, &_Self::OnExists)); + Delegate->read( true ); + c.disconnect(); + + HaveReadDir = true; + } + } + + fh_stringstream + FerrisBranchInternalContext::SL_getIsFile( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << !c->isDir(); + return ss; + } + + void + FerrisBranchInternalContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + tryAddStateLessAttribute( "is-file", &_Self::SL_getIsFile, XSD_BASIC_BOOL ); + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + FerrisBranchInternalContext* + FerrisBranchInternalContext::priv_CreateContext( Context* parent, std::string rdn ) + { + return 0; + } + + void + FerrisBranchInternalContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + if( isSubContextBound( olddn ) ) + { + fh_context c = getSubContext( olddn ); + Remove( GetImpl(getSubContext(olddn)) ); + } + } + + BranchInternalContextCreatorFunctor_t& + FerrisBranchInternalContext::getCreator() + { + if( isParentBound() ) + { + Context* p = getParent(); + while( p ) + { + if( FerrisBranchRootContext* cc = dynamic_cast( p )) + { + return cc->getCreator(); + } + if( !p->isParentBound() ) + break; + p = p->getParent(); + } + } + + fh_stringstream ss; + ss << "Cant get creator object for branch filesystem. url:" << getURL() << endl; + Throw_FerrisInternalError( tostr(ss), this ); + } + + + + struct FerrisBranchInternalContextCreator + { + fh_context m_delegate; + mutable BranchInternalContextCreatorFunctor_t m_createFunction; + + FerrisBranchInternalContextCreator( + BranchInternalContextCreatorFunctor_t& m_createFunction, + fh_context m_delegate + ) + : + m_createFunction( m_createFunction ), + m_delegate( m_delegate ) + {} + FerrisBranchInternalContext* create( Context* parent, const std::string& rdn ) const + { + return m_createFunction( parent, m_delegate, rdn ); + } + void setupExisting( FerrisBranchInternalContext* fc ) const + { + fc->setupState( m_delegate ); + } + void setupNew( FerrisBranchInternalContext* fc ) const + {} + }; + + void + FerrisBranchInternalContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { +// LG_CTX_D << "SortedContext::OnCreated rdn:" << olddn << endl; +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + FerrisBranchInternalContext* fc = 0; + fc = priv_ensureSubContext( subc->getDirName(), fc, + FerrisBranchInternalContextCreator( getCreator(), subc ), + true ); + + +// if( priv_isSubContextBound( olddn ) ) +// { +// return; +// } + +// fh_context cc = getCreator()( this, subc, subc->getDirName() ); +// Insert( GetImpl(cc), true ); + } + + void + FerrisBranchInternalContext::OnExists( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + LG_CTX_D << "FerrisBranchInternalContext::OnExists() subc:" << subc->getURL() << endl; + + FerrisBranchInternalContext* fc = 0; + fc = priv_ensureSubContext( subc->getDirName(), fc, + FerrisBranchInternalContextCreator( getCreator(), subc ) ); + +// if( !priv_isSubContextBound( olddn ) ) +// { +// fh_context cc = getCreator()( this, subc, subc->getDirName() ); +// Insert( GetImpl(cc), false ); +// } + } + +}; diff --git a/Ferris/BranchContext_Clients.cpp b/Ferris/BranchContext_Clients.cpp new file mode 100644 index 0000000..9151cf6 --- /dev/null +++ b/Ferris/BranchContext_Clients.cpp @@ -0,0 +1,1248 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BranchContext_Clients.cpp,v 1.11 2011/06/17 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include // VirtualSoftlinkContext +#include +#include +#include +#include + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility push(hidden) +// #endif + +#define BOOST_SPIRIT_RULE_SCANNERTYPE_LIMIT 3 +#include +using namespace boost::spirit; + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility pop +// #endif + + +using namespace std; + +namespace Ferris +{ +#define DUBCORE_DESCRIPTION "dc:description" + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL BranchParentsInternalContext + : + public FerrisBranchInternalContext + { + typedef BranchParentsInternalContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_context c = Delegate->getParent(); + fh_context child = new VirtualSoftlinkContext( this, c ); + addNewChild( child ); + + LG_CTX_D << "BranchParentsInternalContext::read_leaf()" + << " this:" << toVoid( this ) + << " c:" << toVoid( GetImpl(c) ) + << " child:" << toVoid( GetImpl( child ) ) + << " child.parent:" << toVoid( child->getParent() ) + << endl; + LG_CTX_D << " this.url :" << getURL() << endl + << " c.url :" << c->getURL() << endl + << " child.url:" << child->getURL() << endl + << " child.parent.url:" << child->getParent()->getURL() << endl; + } + + } + + public: + + BranchParentsInternalContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~BranchParentsInternalContext() + { + } + }; + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + BranchParentsInternalContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new BranchParentsInternalContext( ctx, theDelegate, rdn ); + } + + static bool BranchParentsInternalContext_Dropper = + FerrisBranchRootContext_Register( "branchfs-parents", + BranchInternalContextCreatorFunctor_t( + BranchParentsInternalContext_Creator ) ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + class FERRISEXP_DLLLOCAL BranchAttributeAsContentsContext + : + public leafContext + { + typedef BranchAttributeAsContentsContext _Self; + typedef leafContext _Base; + + protected: + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual fh_iostream priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + virtual ferris_ios::openmode getSupportedOpenModes(); + + public: + BranchAttributeAsContentsContext( Context* parent, std::string rdn ) + : + _Base( parent, rdn ) + { + setOverMountAttemptHasAlreadyFailed( true ); + } + }; + + class FERRISEXP_DLLLOCAL BranchAttributesInternalContext + : + public FerrisBranchInternalContext + { + typedef BranchAttributesInternalContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + typedef AttributeCollection::AttributeNames_t an_t; + typedef an_t::iterator ani_t; + + fh_context c = Delegate; + an_t an; + c->getAttributeNames( an ); + for( ani_t ani = an.begin(); ani != an.end(); ++ani ) + { + string rdn = *ani; + + LG_CTX_D << "BranchAttributesInternalContext::read() rdn:" << rdn << endl; + + BranchAttributeAsContentsContext* c = 0; + c = priv_ensureSubContext( rdn, c ); + +// fh_context child = new BranchAttributeAsContentsContext( this, rdn ); +// addNewChild( child ); + + LG_CTX_D << "BranchAttributesInternalContext::read_leaf()" + << " this:" << toVoid( this ) + << " child:" << c + << " child.parent:" << toVoid( c->getParent() ) + << endl; + LG_CTX_D << " this.url :" << getURL() << endl + << " child.url:" << c->getURL() << endl + << " child.parent.url:" << c->getParent()->getURL() << endl; + } + } + + public: + + BranchAttributesInternalContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~BranchAttributesInternalContext() + { + } + + fh_context getDelegate() + { + return Delegate; + } + }; + + fh_istream + BranchAttributeAsContentsContext::priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_context c = getParent(); + BranchAttributesInternalContext* baic = dynamic_cast( GetImpl(c)); + c = baic->getDelegate(); + + fh_stringstream ss; + ss << getStrAttr( c, getDirName(), "", true, true ); + return ss; + } + + fh_iostream + BranchAttributeAsContentsContext::priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + fh_context c = getParent(); + BranchAttributesInternalContext* baic = dynamic_cast( GetImpl(c)); + c = baic->getDelegate(); + + fh_attribute a = c->getAttribute( getDirName() ); + fh_iostream ret = a->getIOStream( m ); + return ret; + } + + ferris_ios::openmode + BranchAttributeAsContentsContext::getSupportedOpenModes() + { + fh_context c = getParent(); + BranchAttributesInternalContext* baic = dynamic_cast( GetImpl(c)); + c = baic->getDelegate(); + return c->getSupportedOpenModes(); + } + + + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + BranchAttributesInternalContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new BranchAttributesInternalContext( ctx, theDelegate, rdn ); + } + + static bool BranchAttributesInternalContext_Dropper = + FerrisBranchRootContext_Register( "branchfs-attributes", + BranchInternalContextCreatorFunctor_t( + BranchAttributesInternalContext_Creator ) ); + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Context showing the state of an individual emblem in the medallion + */ + class FERRISEXP_DLLLOCAL BranchMedallionEmblemContext + : + public StateLessEAHolder< BranchMedallionEmblemContext, FakeInternalContext > + { + typedef BranchMedallionEmblemContext _Self; + typedef StateLessEAHolder< BranchMedallionEmblemContext, FakeInternalContext > _Base; + + protected: + + fh_medallion m_med; + fh_emblem m_em; + + virtual void priv_read(); + + public: + + void constructObject( fh_medallion m, fh_emblem em ); + BranchMedallionEmblemContext( Context* parent, const std::string& rdn, + fh_medallion m = 0, + fh_emblem em = 0 ); + virtual ~BranchMedallionEmblemContext(); + + virtual std::string priv_getRecommendedEA(); + static fh_stringstream SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getID( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getParents( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getChildren( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPossibleParents( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPossibleChildren( Context* c, const std::string& rdn, EA_Atom* atom ); + + static fh_stringstream SL_getName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUniqueName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIconName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getLimitedViewPri( Context* c, const std::string& rdn, EA_Atom* atom ); + + void createStateLessAttributes( bool force = false ); + }; + + + /********************/ + /********************/ + + class FERRISEXP_DLLLOCAL BranchMedallionEmblemBeliefContext + : + public StateLessEAHolder< BranchMedallionEmblemBeliefContext, leafContext > + { + typedef BranchMedallionEmblemBeliefContext _Self; + typedef StateLessEAHolder< BranchMedallionEmblemBeliefContext, leafContext > _Base; + + protected: + + fh_medallionBelief m_be; + + public: + + void constructObject( fh_medallionBelief be ); + BranchMedallionEmblemBeliefContext( Context* parent, const std::string& rdn, + fh_medallionBelief be = 0 ); + virtual ~BranchMedallionEmblemBeliefContext(); + + + virtual std::string priv_getRecommendedEA(); + static fh_stringstream SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPersonalityName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPersonalityID( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getATime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getMTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getSureness( Context* c, const std::string& rdn, EA_Atom* atom ); + + void createStateLessAttributes( bool force = false ); + }; + + + /********************/ + /********************/ + + + class FERRISEXP_DLLLOCAL BranchMedallionInternalContext + : + public FerrisBranchInternalContext + { + typedef BranchMedallionInternalContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + fh_medallion m = Delegate->getMedallion(); + + emblems_t el = m->getAllEmblems(); + for( emblems_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + string rdn = em->getName(); + + BranchMedallionEmblemContext* c = 0; + c = priv_ensureSubContext( rdn, c ); + c->constructObject( m, em ); +// fh_context child = new BranchMedallionEmblemContext( this, rdn.c_str(), m, em ); +// addNewChild( child ); + } + } + + public: + + BranchMedallionInternalContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~BranchMedallionInternalContext() + { + } + }; + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + BranchMedallionInternalContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new BranchMedallionInternalContext( ctx, theDelegate, rdn ); + } + + static bool BranchMedallionInternalContext_Dropper = + FerrisBranchRootContext_Register( "branchfs-medallions", + BranchInternalContextCreatorFunctor_t( + BranchMedallionInternalContext_Creator ) ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + BranchMedallionEmblemContext::constructObject( fh_medallion m, fh_emblem em ) + { + m_med = m; + m_em = em; + } + + + BranchMedallionEmblemContext::BranchMedallionEmblemContext( + Context* parent, const std::string& rdn, + fh_medallion m, fh_emblem em ) + : + _Base( parent, rdn ), + m_med( m ), + m_em( em ) + { + createStateLessAttributes(); + } + + BranchMedallionEmblemContext::~BranchMedallionEmblemContext() + { + } + + std::string + BranchMedallionEmblemContext::priv_getRecommendedEA() + { + return "name,id,icon-name,parent-ids"; + } + + fh_stringstream + BranchMedallionEmblemContext::SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << "An emblem that has some assertion or retraction collection associated with it." << endl + << cc->m_em->getDescription(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << cc->m_em->getID(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getParents( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + emblems_t el = cc->m_em->getParents(); + ss << Util::createSeperatedList( el.begin(), el.end() ); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getChildren( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + emblems_t el = cc->m_em->getChildren(); + ss << Util::createSeperatedList( el.begin(), el.end() ); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getPossibleParents( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + emblems_t el = cc->m_em->getPossibleParents(); + ss << Util::createSeperatedList( el.begin(), el.end() ); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getPossibleChildren( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + emblems_t el = cc->m_em->getPossibleChildren(); + ss << Util::createSeperatedList( el.begin(), el.end() ); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << cc->m_em->getName(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getUniqueName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << cc->m_em->getUniqueName(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getIconName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << cc->m_em->getIconName(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemContext::SL_getLimitedViewPri( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemContext* cc = dynamic_cast(c)) + { + ss << cc->m_em->getLimitedViewPriority(); + } + return ss; + } + + void + BranchMedallionEmblemContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + + SLEA( DUBCORE_DESCRIPTION, &_Self::SL_getDesc, XSD_BASIC_STRING ); + SLEA( "id", &_Self::SL_getID, XSD_BASIC_INT ); + SLEA( "parent-ids", &_Self::SL_getParents, FXD_INTLIST ); + SLEA( "child-ids", &_Self::SL_getChildren, FXD_INTLIST ); + SLEA( "possible-parent-ids", &_Self::SL_getPossibleParents, FXD_INTLIST ); + SLEA( "possible-child-ids", &_Self::SL_getPossibleChildren, FXD_INTLIST ); + + SLEA( "name", &_Self::SL_getName, XSD_BASIC_STRING ); + SLEA( "unique-name", &_Self::SL_getUniqueName, XSD_BASIC_STRING ); + SLEA( "icon-name", &_Self::SL_getIconName, XSD_BASIC_STRING ); + SLEA( "limited-view-priority", &_Self::SL_getLimitedViewPri, XSD_BASIC_INT ); + +#undef SLEA + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + + } + + void + BranchMedallionEmblemContext::priv_read() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + typedef std::list< fh_personality > plist_t; + plist_t pl = m_med->getListOfPersonalitiesWhoHaveOpinion( m_em ); + for( plist_t::iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { + fh_medallionBelief be = m_med->getBelief( m_em, *pi ); + string rdn = (*pi)->getName(); + + BranchMedallionEmblemBeliefContext* c = 0; + c = priv_ensureSubContext( rdn, c ); + c->constructObject( be ); + +// fh_context child = new BranchMedallionEmblemBeliefContext( this, rdn.c_str(), be ); +// addNewChild( child ); + + LG_CTX_D << "priv_read() url:" << getURL() + << " rdn:" << rdn + << " child.url:" << c->getURL() + << endl; + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + BranchMedallionEmblemBeliefContext::constructObject( fh_medallionBelief be ) + { + m_be = be; + } + + + BranchMedallionEmblemBeliefContext::BranchMedallionEmblemBeliefContext( + Context* parent, const std::string& rdn, + fh_medallionBelief be ) + : + _Base( parent, rdn ), + m_be( be ) + { + createStateLessAttributes(); + } + + BranchMedallionEmblemBeliefContext::~BranchMedallionEmblemBeliefContext() + { + } + + std::string + BranchMedallionEmblemBeliefContext::priv_getRecommendedEA() + { + return "name,personality-id,sureness,atime-display,mtime-display"; + } + + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + ss << "A particular assertion or retraction of an emblem for a file."; + } + return ss; + } + + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getPersonalityName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + ss << cc->m_be->getPersonality()->getName(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getPersonalityID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + ss << cc->m_be->getPersonality()->getID(); + } + return ss; + } + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getATime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + time_t tt = cc->m_be->getTimes()->getATime(); + ss << tt; + } + return ss; + } + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getMTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + time_t tt = cc->m_be->getTimes()->getMTime(); + ss << tt; + } + return ss; + } + fh_stringstream + BranchMedallionEmblemBeliefContext::SL_getSureness( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( BranchMedallionEmblemBeliefContext* cc = dynamic_cast(c)) + { + ss << cc->m_be->getSureness(); + } + return ss; + } + + void + BranchMedallionEmblemBeliefContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + + SLEA( DUBCORE_DESCRIPTION, &_Self::SL_getDesc, XSD_BASIC_STRING ); + + SLEA( "personality-name", &_Self::SL_getPersonalityName, XSD_BASIC_STRING ); + SLEA( "personality-id", &_Self::SL_getPersonalityID, XSD_BASIC_INT ); + SLEA( "atime", &_Self::SL_getATime, FXD_UNIXEPOCH_T ); + SLEA( "mtime", &_Self::SL_getMTime, FXD_UNIXEPOCH_T ); + SLEA( "sureness", &_Self::SL_getSureness, XSD_BASIC_DOUBLE ); + +#undef SLEA + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL BranchExtentsContext_SingleExtent + : + public StateLessEAHolder< BranchExtentsContext_SingleExtent, leafContext > + { + typedef BranchExtentsContext_SingleExtent _Self; + typedef StateLessEAHolder< BranchExtentsContext_SingleExtent, leafContext > _Base; + + streamsize offbeg; + streamsize offend; + streamsize bbeg; + streamsize bend; + + protected: + std::string + priv_getRecommendedEA() + { + return "name,start-block,end-block,start-address,end-address"; + } + + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_ifstream basess( getDirPath().c_str(), ferris_ios::maskOffFerrisOptions(m) ); + fh_istream ret = Factory::MakeLimitingIStream( basess, offbeg, offend ); + return ret; + } + + static fh_stringstream + SL_getStartBlock( BranchExtentsContext_SingleExtent* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->bbeg; + return ss; + } + static fh_stringstream + SL_getEndBlock( BranchExtentsContext_SingleExtent* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->bend; + return ss; + } + static fh_stringstream + SL_getStartAddr( BranchExtentsContext_SingleExtent* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->offbeg; + return ss; + } + static fh_stringstream + SL_getEndAddr( BranchExtentsContext_SingleExtent* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->offend; + return ss; + } + + void + createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + + SLEA( "start-block", &_Self::SL_getStartBlock, XSD_BASIC_INT ); + SLEA( "end-block", &_Self::SL_getEndBlock, XSD_BASIC_INT ); + SLEA( "start-address", &_Self::SL_getStartAddr, XSD_BASIC_INT ); + SLEA( "end-address", &_Self::SL_getEndAddr, XSD_BASIC_INT ); + +#undef SLEA + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + public: + void constructObject( streamsize xoffbeg, + streamsize xoffend, + streamsize xbbeg, + streamsize xbend ) + { + offbeg = xoffbeg; + offend = xoffend; + bbeg = xbbeg; + bend = xbend; + } + + BranchExtentsContext_SingleExtent( Context* parent, std::string rdn, + streamsize offbeg = 0, + streamsize offend = 0, + streamsize bbeg = 0, + streamsize bend = 0 ) + : + _Base( parent, rdn ), + offbeg( offbeg ), offend( offend ), bbeg( bbeg ), bend( bend ) + { + createStateLessAttributes(); + } + }; + + + class BranchExtentsContext; + struct FERRISEXP_DLLLOCAL Xfs_Bmap_Functor + { + BranchExtentsContext* bec; + mutable vector< streamsize > r; + Xfs_Bmap_Functor( BranchExtentsContext* bec, vector< streamsize >& r ) + : bec(bec), r(r) + { + } + + void operator()(const char* const& , const char* const&) const; + void setupContiguous(); + }; + + class FERRISEXP_DLLLOCAL BranchExtentsContext + : + public FerrisBranchInternalContext + { + typedef BranchExtentsContext _Self; + typedef FerrisBranchInternalContext _Base; + typedef Context _DontDelegateBase; + + + friend struct Xfs_Bmap_Functor; + bool m_haveFailed; + bool m_isContiguous; + + protected: + + std::string + getRecommendedEA() + { + return "name,start-block,end-block,start-address,end-address,is-contiguous"; + } + + + virtual void priv_read_leaf() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + if( !m_haveFailed ) + { + LG_CTX_D << "priv_read_leaf()" << endl; + + fh_context c = Delegate; + m_haveFailed |= isXFS( c ); + if( m_haveFailed ) + { + return; + } + + string earl = c->getDirPath(); + stringstream ss; + + { + + fh_runner r = new Runner(); + r->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | +// G_SPAWN_STDOUT_TO_DEV_NULL | + r->getSpawnFlags())); + r->pushCommandLineArg( "xfs_bmap" ); + r->pushCommandLineArg( earl ); + + r->Run(); + fh_istream stdoutss = r->getStdOut(); + + { + string tmp; + getline(stdoutss,tmp); + } + copy( istreambuf_iterator(stdoutss), + istreambuf_iterator(), + ostreambuf_iterator(ss)); + int e = r->getExitStatus(); + } + + LG_CTX_D << "xfs_bmap output:" << ss.str() << endl; + string datastring = ss.str(); + + typedef scanner_list, phrase_scanner_t> scanners; + typedef rule< scanners > R; + + vector< streamsize > r; + Xfs_Bmap_Functor xfs_bmap_functor( this, r ); + uint_parser uint64_p; + R xfs_bmap_p + = +(uint64_p[push_back_a(r)] >> ch_p(':') + >> ch_p('[') + >> uint64_p[push_back_a(r)] + >> ch_p('.') >> ch_p('.') + >> uint64_p[push_back_a(r)] + >> ch_p(']') + >> ch_p(':') + >> uint64_p[push_back_a(r)] + >> ch_p('.') >> ch_p('.') + >> uint64_p[push_back_a(r)]) + [xfs_bmap_functor]; + + parse_info<> info = parse( + datastring.c_str(), + xfs_bmap_p, + space_p ); + + if (info.full) + { + xfs_bmap_functor.setupContiguous(); + } + else + { + m_haveFailed = true; + stringstream ss; + ss << "Parsing failed" << nl + << "input:" << datastring << nl + << "stopped at: " << info.stop << "\"" << nl + << "char offset:" << ( info.stop - datastring.c_str() ) << nl; + LG_CTX_I << ss.str() << endl; + cerr << ss.str() << endl; + } + } + } + + fh_stringstream + SL_isContiguous( Context*, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "SL_isContiguous()" << endl; + fh_stringstream ss; + read(); + ss << m_isContiguous; + return ss; + } + +// void +// createStateLessAttributes( bool force = false ) +// { +// if( force || isStateLessEAVirgin() ) +// { +// #define SLEA tryAddStateLessAttribute + +// SLEA( "is-contiguous", &_Self::SL_isContiguous, XSD_BASIC_BOOL ); + +// #undef SLEA +// _Base::createStateLessAttributes( true ); +// supplementStateLessAttributes( true ); +// } +// } + + stringset_t& + getForceLocalAttributeNames() + { + static stringset_t ret; + if( ret.empty() ) + { + ret.insert("is-contiguous"); + ret.insert("recommended-ea"); + } + return ret; + } + + void + priv_createAttributes() + { + LG_CTX_D << "priv_createAttributes(extent fs)" << endl; + addAttribute( "is-contiguous", + this, &_Self::SL_isContiguous, + XSD_BASIC_BOOL ); + _Base::priv_createAttributes(); + } + +// std::string +// private_getStrAttr( const std::string& rdn, +// const std::string& def, +// bool getAllLines, +// bool throwEx ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::private_getStrAttr( rdn, def, getAllLines, throwEx ); + +// return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); +// } +// fh_attribute +// getAttribute( const string& rdn ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::getAttribute( rdn ); + +// return Delegate->getAttribute(rdn); +// } +// AttributeCollection::AttributeNames_t& +// getAttributeNames( AttributeNames_t& ret ) +// { +// AttributeCollection::AttributeNames_t t1; +// AttributeCollection::AttributeNames_t t2; +// Delegate->getAttributeNames( t1 ); +// _DontDelegateBase::getAttributeNames( t2 ); +// return mergeAttributeNames( ret, t1, t2 ); +// } +// int +// getAttributeCount() +// { +// return Delegate->getAttributeCount(); +// } +// bool +// isAttributeBound( const std::string& rdn, +// bool createIfNotThere +// ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::isAttributeBound( rdn, createIfNotThere ); + +// return Delegate->isAttributeBound( rdn, createIfNotThere ); +// } + + public: + + BranchExtentsContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ), + m_haveFailed( false ), + m_isContiguous( false ) + { + createStateLessAttributes(); + } + + virtual ~BranchExtentsContext() + { + } + }; + + void Xfs_Bmap_Functor::operator()(const char* const& , const char* const&) const + { +// cerr << "operator()" << endl; +// for( vector< int >::const_iterator ri = r.begin(); ri!=r.end();++ri ) +// { +// cerr << *ri << endl; +// } + + if( r.size()==5 ) + { + vector< streamsize >::const_iterator ri = r.begin(); + streamsize rdn = *ri; ++ri; + streamsize offbeg = *ri; ++ri; + streamsize offend = *ri; ++ri; + streamsize bbeg = *ri; ++ri; + streamsize bend = *ri; ++ri; + + BranchExtentsContext_SingleExtent* c = 0; + c = bec->priv_ensureSubContext( tostr(rdn), c ); + c->constructObject( offbeg, offend, bbeg, bend ); +// fh_context child = new BranchExtentsContext_SingleExtent( bec, tostr(rdn), +// offbeg, offend, +// bbeg, bend ); +// bec->addNewChild( child ); + r.clear(); + } + } + + void Xfs_Bmap_Functor::setupContiguous() + { + bec->m_isContiguous = (bec->getSubContextCount()==1); + } + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + BranchExtentsContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new BranchExtentsContext( ctx, theDelegate, rdn ); + } + + static bool + BranchExtentsContext_Dropper = + FerrisBranchRootContext_Register( + "branchfs-extents", + BranchInternalContextCreatorFunctor_t( + BranchExtentsContext_Creator ) ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Context showing all the branch filesystems for a context as direct + * children. This is the context returned by Context::getBranchFileSystem(); + */ + class FERRISEXP_DLLLOCAL FerrisAllBranchesContext + : + public FerrisBranchInternalContext + { + typedef FerrisAllBranchesContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + staticDirContentsRAII _raii1( this ); + + LG_CTX_D << "priv_read_leaf() url:" << getURL() + << " empty():" << empty() + << " branches:" << getStrAttr( Delegate, "associated-branches", "" ) + << endl; + + if( empty() ) + { + fh_context theContext = Delegate; + stringlist_t sl = Util::parseCommaSeperatedList( + getStrAttr( theContext, "associated-branches", "" )); + + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + const string& name = *si; + + try + { + string earl = getStrAttr( theContext, name, "" ); + fh_context c = Resolve( earl ); + fh_context child = new VirtualSoftlinkContext( this, c, name ); + addNewChild( child ); + + LG_CTX_D << "priv_read_leaf() url:" << getURL() + << " adding child for name:" << name << endl + << " earl :" << earl << endl + << " c.url :" << c->getURL() << endl + << " child.url:" << child->getURL() << endl; + LG_CTX_D << "priv_read_leaf() url:" << child->getURL() + << " c.is-dir:" << getStrAttr( c, "is-dir", "none" ) + << " child.is-dir:" << getStrAttr( child, "is-dir", "none" ) + << endl; + + } + catch( exception& e ) + { + LG_CTX_W << "Error adding branch filesystem for:" << name << endl + << " e:" << e.what() << endl; + } + } + } + } + + public: + + FerrisAllBranchesContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~FerrisAllBranchesContext() + { + } + }; + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + FerrisAllBranchesContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new FerrisAllBranchesContext( ctx, theDelegate, rdn ); + } + + static bool FerrisAllBranchesContext_Dropper = + FerrisBranchRootContext_Register( "branches", + BranchInternalContextCreatorFunctor_t( + FerrisAllBranchesContext_Creator ) ); + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; diff --git a/Ferris/BranchContext_private.hh b/Ferris/BranchContext_private.hh new file mode 100644 index 0000000..b42c2ac --- /dev/null +++ b/Ferris/BranchContext_private.hh @@ -0,0 +1,155 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BranchContext_private.hh,v 1.5 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_BRANCH_CONTEXT_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_BRANCH_CONTEXT_PRIVH_ + +#include +#include + +namespace Ferris +{ + class FerrisBranchInternalContext; + + typedef Loki::Functor< FerrisBranchInternalContext*, + LOKI_TYPELIST_3( Context*, const fh_context&, const std::string& ) > + BranchInternalContextCreatorFunctor_t; + + /** + * Root context for branch filesystems. eg. gpg-signatures:// + */ + class FERRISEXP_DLLLOCAL FerrisBranchRootContext + : + public StateLessEAHolder< FerrisBranchRootContext, FakeInternalContext > + { + typedef FerrisBranchRootContext _Self; + typedef StateLessEAHolder< FerrisBranchRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + BranchInternalContextCreatorFunctor_t m_BranchInternalContextCreatorFunctor; + + protected: + + virtual void priv_read(); + + public: + + FerrisBranchRootContext( BranchInternalContextCreatorFunctor_t m_BranchInternalContextCreatorFunctor ); + virtual ~FerrisBranchRootContext(); + + void createStateLessAttributes( bool force = false ); + BranchInternalContextCreatorFunctor_t& getCreator(); + + virtual stringset_t& getForceLocalAttributeNames(); + }; + + FERRISEXP_DLLLOCAL bool FerrisBranchRootContext_Register( const std::string& url_scheme, + BranchInternalContextCreatorFunctor_t m_BranchInternalContextCreatorFunctor ); + + + /** + * Context to mirror the underlying filesystem and carry the base fh_context pointer + * down to the file level in the layer that is sitting above the normal filesystem. + * + * eg. gpg-signatures://file:///tmp will have a Delegate of /tmp + * + */ + class FERRISEXP_DLLLOCAL FerrisBranchInternalContext + : + public ChainedViewContext + { + typedef FerrisBranchInternalContext _Self; + typedef ChainedViewContext _Base; + typedef Context _DontDelegateBase; + + protected: + + virtual void priv_read_leaf() = 0; + + + virtual bool isDir(); + static fh_stringstream SL_getIsFile( Context* c, const std::string& rdn, EA_Atom* atom ); + + + virtual void UnPageSubContextsIfNeeded(); +// virtual std::string private_getStrAttr( const std::string& rdn, +// const std::string& def = "", +// bool getAllLines = false , +// bool throwEx = false ); + + fh_context addNewChild( fh_context c ); + + public: + + void setupState( fh_context m_delegate ) + { + setDelegate( m_delegate ); + } + FerrisBranchInternalContext( Context* theParent, const fh_context& theDelegate ); + FerrisBranchInternalContext( Context* theParent, const fh_context& theDelegate, + const std::string& rdn ); + virtual ~FerrisBranchInternalContext(); + + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + virtual std::string getURL(); + + stringset_t& getForceLocalAttributeNames(); +// virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); +// virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); +// virtual int getAttributeCount(); +// virtual bool isAttributeBound( const std::string& rdn, +// bool createIfNotThere = true +// ) throw( NoSuchAttribute ); + + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context&, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + virtual void read( bool force = 0 ); + virtual long guessSize() throw(); + + + void createStateLessAttributes( bool force = false ); + _Self* priv_CreateContext( Context* parent, std::string rdn ); + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + + BranchInternalContextCreatorFunctor_t& getCreator(); + }; + +}; +#endif + diff --git a/Ferris/BranchRemembranceHistoryInternalContext.cpp b/Ferris/BranchRemembranceHistoryInternalContext.cpp new file mode 100644 index 0000000..5ce5026 --- /dev/null +++ b/Ferris/BranchRemembranceHistoryInternalContext.cpp @@ -0,0 +1,194 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BranchRemembranceHistoryInternalContext.cpp,v 1.5 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include // VirtualSoftlinkContext + + +namespace Ferris +{ + using namespace std; + using namespace RDFCore; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL BranchRemembranceHistoryContext + : + public StateLessEAHolder< BranchRemembranceHistoryContext, VirtualSoftlinkContext > + { + typedef StateLessEAHolder< BranchRemembranceHistoryContext, VirtualSoftlinkContext > _Base; + typedef BranchRemembranceHistoryContext _Self; + + protected: + + virtual std::string getRecommendedEA() + { + return Delegate->getRecommendedEA() + ",name-display"; + } + + public: + + BranchRemembranceHistoryContext( const fh_context& parent, + const fh_context& target, + const std::string& localName, + bool setupEventConnections = true ) + : + _Base( parent, target, localName, setupEventConnections ) + { + createStateLessAttributes(); + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + supplementStateLessAttributes_timet( "name" ); + } + } + + virtual stringset_t& getForceLocalAttributeNames() + { + static stringset_t ret; + if( ret.empty() ) + { + const stringset_t& t = _Base::getForceLocalAttributeNames(); + copy( t.begin(), t.end(), inserter( ret, ret.end() ) ); + ret.insert("recommended-ea"); + ret.insert("name-display"); + } + return ret; + } + + }; + + + class FERRISEXP_DLLLOCAL BranchRemembranceHistoryInternalContext + : + public FerrisBranchInternalContext + { + typedef BranchRemembranceHistoryInternalContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_fcontext fc = new FakeInternalContext( this, "view" ); + addNewChild( fc ); + + fh_model m = RDFCore::getDefaultFerrisModel(); + string pfx = Semantic::getAttrPrefix(); +// string pfx = ""; + fh_node historyNode = RDFCore::Node::CreateURI( pfx + "ferris-file-view-history" ); + fh_node mostRecentTimeNode = RDFCore::Node::CreateURI( pfx + "most-recent-view-time" ); + fh_node originalCmdNodePred = RDFCore::Node::CreateURI( pfx + "view-command" ); + fh_node actionTime = RDFCore::Node::CreateURI( pfx + "view-time" ); + + fh_context selfc = Delegate; + fh_node selfnode = RDFCore::Node::CreateURI( selfc->getURL() ); + + LG_CTX_D << "looking up url node:" << selfnode->toString() << endl; + if( fh_node n = m->getObject( selfnode, historyNode ) ) + { + LG_CTX_D << "have n:" << n->toString() << endl; + } + + + NodeIterator iter = m->findObjects( selfnode, historyNode ); + for( ; iter != NodeIterator(); ++iter ) + { + fh_node anode = *iter; + + LG_CTX_D << "have anode:" << anode->toString() << endl; + NodeIterator atime_iter = m->findObjects( anode, actionTime ); + for( ; atime_iter != NodeIterator(); ++atime_iter ) + { + time_t tt = toType( (*atime_iter)->toString() ); + LG_CTX_D << "have tt:" << tt << endl; + + fh_context targetc = selfc; + string local_rdn = tostr( tt ); + + fh_context child = new BranchRemembranceHistoryContext( GetImpl(fc), + targetc, + local_rdn ); + fc->addNewChild( child ); + } + } + } + } + + public: + + BranchRemembranceHistoryInternalContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~BranchRemembranceHistoryInternalContext() + { + } + + fh_context getDelegate() + { + return Delegate; + } + }; + + FERRISEXP_DLLLOCAL FerrisBranchInternalContext* + BranchRemembranceHistoryInternalContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new BranchRemembranceHistoryInternalContext( ctx, theDelegate, rdn ); + } + + static bool BranchRemembranceHistoryInternalContext_Dropper = + FerrisBranchRootContext_Register( "branchfs-remembrance", + BranchInternalContextCreatorFunctor_t( + BranchRemembranceHistoryInternalContext_Creator ) ); + + +}; diff --git a/Ferris/BuildDependentMethods.hh b/Ferris/BuildDependentMethods.hh new file mode 100644 index 0000000..c92b3ac --- /dev/null +++ b/Ferris/BuildDependentMethods.hh @@ -0,0 +1,50 @@ +/* + * + * WARNING! The .hh file is generated from the .hh.in file at configure time. + * + */ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BuildDependentMethods.hh.in,v 1.2 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * + * WARNING! The .hh file is generated from the .hh.in file at configure time. + * + */ + +#ifndef _ALREADY_INCLUDED_FERRIS_BUILD_DEP_METHODS_H_ +#define _ALREADY_INCLUDED_FERRIS_BUILD_DEP_METHODS_H_ + +namespace Ferris +{ + namespace Factory + { + }; +}; +#endif diff --git a/Ferris/BuildDependentMethods.hh.in b/Ferris/BuildDependentMethods.hh.in new file mode 100644 index 0000000..c92b3ac --- /dev/null +++ b/Ferris/BuildDependentMethods.hh.in @@ -0,0 +1,50 @@ +/* + * + * WARNING! The .hh file is generated from the .hh.in file at configure time. + * + */ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BuildDependentMethods.hh.in,v 1.2 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * + * WARNING! The .hh file is generated from the .hh.in file at configure time. + * + */ + +#ifndef _ALREADY_INCLUDED_FERRIS_BUILD_DEP_METHODS_H_ +#define _ALREADY_INCLUDED_FERRIS_BUILD_DEP_METHODS_H_ + +namespace Ferris +{ + namespace Factory + { + }; +}; +#endif diff --git a/Ferris/Cache.cpp b/Ferris/Cache.cpp new file mode 100644 index 0000000..ae01eb4 --- /dev/null +++ b/Ferris/Cache.cpp @@ -0,0 +1,28 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Cache.cpp,v 1.2 2010/09/24 21:30:24 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ diff --git a/Ferris/Cache.hh b/Ferris/Cache.hh new file mode 100644 index 0000000..a359f12 --- /dev/null +++ b/Ferris/Cache.hh @@ -0,0 +1,347 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Cache.hh,v 1.6 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CACHE_H_ +#define _ALREADY_INCLUDED_FERRIS_CACHE_H_ + +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +namespace Ferris +{ + /** + * Objects that can exist inside a cache should inherit from this class + * instead of just Handlable. Note that at current a single cacheHandlable + * can only exist in one cache. + */ + class FERRISEXP_API CacheHandlable + : + public Handlable + { + typedef Handlable _Base; + + int getNumberOfCachesWeAreIn() + { + return 1; + } + + public: + typedef sigc::signal1< void, CacheHandlable* > OnlyInCacheSignal_t; + OnlyInCacheSignal_t OnlyInCacheSignal; + OnlyInCacheSignal_t& getOnlyInCacheSignal() + { + return OnlyInCacheSignal; + } + + CacheHandlable() + : + Handlable() + { + } + + virtual ref_count_t AddRef() + { + return _Base::AddRef(); + } + + virtual ref_count_t Release() + { + ref_count_t ret = _Base::Release(); + if( ret == getNumberOfCachesWeAreIn() ) + { + getOnlyInCacheSignal().emit( this ); + } + return ret; + } + + /** + * called when the ref_count drops to one to possibly save + * the state of the object to disk + */ + virtual void sync() + { + } + }; + + /** + * Create a cache of objects keyed of some data like a string or pointer. + */ + template< class Key, class Value > + class FERRISEXP_API Cache + : + public sigc::trackable + { + typedef Cache _Self; + + typedef std::map< Key, Value > m_t; + m_t m; + + typedef std::list< FerrisLoki::Handlable* > m_collectable_t; + m_collectable_t m_collectable; + + // when to start reaping collectable items + int m_max_collectable_size; + + // glib timer number + guint m_timer; + + // how many millis until timer should be called + int m_timer_interval; + + /** + * When a value drops its last reference + */ + void OnGenericCloseSignal( CacheHandlable* valueptr ) + { + m_collectable.push_back( valueptr ); + valueptr->sync(); + } + + /** + * Every so often we reclaim the cache to avoid buildup + * of many large objects in the cache that have not + * been used for a while. + */ + static gint s_timer_f(gpointer data) + { +// cerr << "s_timer_f()" << endl; + _Self* sp = (_Self*)data; + return sp->timer_f(); + } + gint timer_f() + { +// cerr << "timer_f() m.size:" << m.size() +// << " collectable.size:" << m_collectable.size() +// << endl; + maybe_collect( m_collectable.size() ); + return 0; + } + + /** + * Make the timer happen m_timer_interval in the future + */ + void reconnectTimer() + { + if( m_timer ) + { + g_source_remove( m_timer ); + m_timer = 0; + } + if( m_timer_interval ) + m_timer = g_timeout_add( m_timer_interval, + GSourceFunc(s_timer_f), this ); + } + + + /** + * if there are too many outstanding m_collectable + * then collect some of them + * + * @param count is the number of object to try to collect or zero + * if we just want to trim the cache to user prefs + */ + void maybe_collect( int count = 0 ) + { +// cerr << "maybe_collect(top) count:" << count << endl; + + if( !count ) + { + if( m_collectable.size() >= m_max_collectable_size ) + { + count = m_collectable.size() - m_max_collectable_size; + } + } +// cerr << "maybe_collect(2) count:" << count << endl; +// cerr << "maybe_collect(2) m_collectable.size:" << m_collectable.size() << endl; + + if( count > 0 && !m_collectable.empty() ) + { + count = std::min( (size_t)count, m_collectable.size() ); + + for( int i=0; i m_collectable.size:" << m_collectable.size() +// << " count:" << count +// << " h:" << toVoid( h ) +// << endl; +// cerr << " h.rc:" << h->getReferenceCount() +// << endl; + + if( h->getReferenceCount() > 1 ) + { + // it was referenced again through the cache. + continue; + } + + typedef typename m_t::iterator iterator; + for( iterator mi = m.begin(); mi!=m.end(); ) + { + FerrisLoki::Handlable* mih = GetImpl(mi->second); + if( mih == h ) + { + iterator delme = mi; + ++mi; + m.erase( delme ); + continue; + } + ++mi; + } + } + } + + if( !m_collectable.empty() ) + reconnectTimer(); + } + + public: + + Cache() + : + m_max_collectable_size( 100 ), + m_timer( 0 ), + m_timer_interval( 20000 ) + { + } + + /** + * Try to find the item in the cache. Returns 0 if the item was + * not put() or if it has been reclaimed since then + */ + Value get( const Key& k ) + { + typename m_t::iterator mi = m.find( k ); + if( mi != m.end() ) + { + // if it was claimable then we should purge it from + // the collectable list + if( mi->second->getReferenceCount() ) + { + for( m_collectable_t::iterator ci = m_collectable.begin(); + ci != m_collectable.end(); ++ci ) + { + if( *ci == dynamic_cast(GetImpl(mi->second))) + { + m_collectable.erase( ci ); + break; + } + } + } + +// cerr << "got from cache. m.sz:" << m.size() +// << " m_collectable.size:" << m_collectable.size() +// << " ref_count:" << mi->second->getReferenceCount() +// << endl; + return mi->second; + } + return 0; + } + + void put( const Key& k, Value& v ) + { + if( !isBound(v) ) + return; + + maybe_collect(); + reconnectTimer(); + v->getOnlyInCacheSignal().connect( mem_fun( *this, &_Self::OnGenericCloseSignal ) ); + m[ k ] = v; + } + + void putNoCollect( const Key& k, Value& v ) + { + if( !isBound(v) ) + return; + + v->getOnlyInCacheSignal().connect( mem_fun( *this, &_Self::OnGenericCloseSignal ) ); + m[ k ] = v; + } + + /** + * Set the number of items in the cache that are not referenced outside the + * cache that can remain in the cache without being purged + */ + void setMaxCollectableSize( int v ) + { + m_max_collectable_size = v; + } + + /** + * how many millis until timer should be called to try to reclaim cache. + */ + void setTimerInterval( int v ) + { + m_timer_interval = v; + reconnectTimer(); + } + + /********************************************************************************/ + /*** allow iteration over the cache *********************************************/ + /********************************************************************************/ + + typedef typename m_t::iterator iterator; + iterator begin() + { + return m.begin(); + } + iterator end() + { + return m.end(); + } + + + /********************************************************************************/ + /*** mainly for unit testing. non-interesting otherwise *************************/ + /********************************************************************************/ + + int getCollectableSize() + { + return m_collectable.size(); + } + }; + +}; +#endif diff --git a/Ferris/CacheManager.cpp b/Ferris/CacheManager.cpp new file mode 100644 index 0000000..6a5c4da --- /dev/null +++ b/Ferris/CacheManager.cpp @@ -0,0 +1,1303 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: CacheManager.cpp,v 1.8 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" +#include "Ferris/FilteredContext.hh" +#include "Ferris/FilteredContext_private.hh" + +#include "config.h" +#define CERR cerr + +#include "Ferris_private.hh" +#include "CacheManager_private.hh" +#include "PluginOutOfProcNotificationEngine.hh" +#include "Cache.hh" + +using namespace std; + +/* + * Have to free PCCTS mounts top down because of InOrder child lists and such. + */ +//#include + +// lstat +#include +#include +#include + + +namespace Ferris +{ +#ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT + + debug_mm_contexts_t& getMMCtx() + { + static debug_mm_contexts_t v; + return v; + } + + void addContextToMemoryManagementData( Context* c ) + { + static int num=0; + getMMCtx()[c] = ++num; + } + + void remContextToMemoryManagementData( Context* c ) + { + if( !getMMCtx().empty() ) + { + getMMCtx().erase(c); + } + } + +#endif + + void DEBUG_dumpcl( string s ) + { + fh_stringstream ss; + dumpEntireContextListMemoryManagementData( ss ); + cerr << "-- BEGIN DEBUG_dumpcl s:" << s << "--\n" + << StreamToString(ss) + << "-- END DEBUG_dumpMemc s:" << s << "--\n" + << endl; + } + + void DEBUG_dumpcl_to_file( const std::string& filenamePrefix ) + { + time_t now = Time::getTime(); + string filename = filenamePrefix + "_" + tostr(now) + ".fmemd"; + + struct stat statbuf; + if( !lstat( filename.c_str(), &statbuf ) ) + { + cerr << "DEBUG_dumpcl_to_file() refusing to override existing file:" << filename << endl; + return; + } + + fh_context c = Shell::acquireContext( filename, 0, false ); + fh_iostream ioss = c->getIOStream( ios::out | ios::trunc ); + dumpEntireContextListMemoryManagementData( ioss ); + + ioss << "-------------------------------------------------------------------------------\n" << endl; + CacheManager* cc = getCacheManager(); + cc->dumpFreeListTo( ioss ); + ioss << "-------------------------------------------------------------------------------\n" << endl; + } + + + void dumpEntireContextListMemoryManagementData( fh_ostream ss ) + { +#ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT + ss << "dumpEntireContextListMemoryManagementData() CList start" << endl; + for( debug_mm_contexts_t::iterator iter = getMMCtx().begin(); + iter != getMMCtx().end(); iter++ ) + { + if( iter->first ) + { + iter->first->dumpRefDebugData(ss); + } + } + ss << "dumpEntireContextListMemoryManagementData() CList end" << endl; +#endif + } + + /** + * Note that this method fails if the client is running any filtered contexts. + * + * It is only here for low level testing. + */ + FERRISEXP_DLLLOCAL void debug_ferris_check_for_single_ctx_violation( Context* parentc, + Context* childc ) + { +// #define FERRIS_CHECK_FOR_SINGLE_CTX_VIOLATION 1 + +// #ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT +// #ifdef FERRIS_CHECK_FOR_SINGLE_CTX_VIOLATION + +// cerr << "debug_ferris_check_for_single_ctx_violation() CList start" +// << " childc:" << childc->getDirPath() +// << endl; + +// int c = 0; + +// for( debug_mm_contexts_t::iterator iter = getMMCtx().begin(); +// iter != getMMCtx().end(); iter++ ) +// { +// // if( iter->first->getURL() == childc->getURL() ) + +// cerr << "testing iter:" << iter->first->getDirPath() << endl; + +// if( iter->first->getDirPath() == childc->getDirPath() ) +// { +// ++c; +// } + +// } + +// if( c > 1 ) +// { +// DEBUG_dumpcl( "debug_ferris_check_for_single_ctx_violation( LIST )" ); +// cerr << "debug_ferris_check_for_single_ctx_violation( PROBLEM ) c:" << c << endl; +// fh_stringstream ss; +// for( debug_mm_contexts_t::iterator iter = getMMCtx().begin(); +// iter != getMMCtx().end(); iter++ ) +// { +// if( iter->first->getDirPath() == childc->getDirPath() ) +// { +// fh_stringstream ss; +// ss << "iter:" << endl; +// iter->first->dumpRefDebugData(ss); +// } +// } +// ss << "child:" << endl; +// childc->dumpRefDebugData(ss); +// ss << "parent:" << endl; +// parentc->dumpRefDebugData(ss); +// cerr << tostr(ss) << endl; +// g_on_error_query(0); +// } + +// cerr << "debug_ferris_check_for_single_ctx_violation() CList end" << endl; +// #endif +// #endif + } + + namespace Private + { + static bool haveAnyContextReferenceWatches_Result = false; + static bool haveAnyContextReferenceWatchesByName_Result = false; + static bool haveAnyContextParentReferenceWatches_Result = false; + + static bool _isFilter( Context* c ) + { + if( dynamic_cast(c) ) + return true; + return false; + } + + + static bool _isSorter( Context* c ) + { + if( dynamic_cast(c) ) + return true; + return false; + } + + CacheManagerContextStateInTime::CacheManagerContextStateInTime( Context* c ) + : + ref_count( c->ref_count ), + NumberOfSubContexts( c->NumberOfSubContexts ), + ItemsSz( c->getItems().size() ), + isReClaimable( c->isReClaimable() ), + WeAreInFreeList( c->WeAreInFreeList ), + MinimumReferenceCount( c->getMinimumReferenceCount() ), + ContextThisPtr( c ), + isFilter( _isFilter(c) ), + isSorter( _isSorter(c) ), + HasBeenDeleted( HasBeenDeleted ), + isInheritingContext( isInheritingContext ), + cvc( dynamic_cast( c ) ), + CoveredContext( GetImpl( c->CoveredContext ) ), + OverMountContext_Delegate( GetImpl( c->OverMountContext_Delegate ) ), + isParentBound( c->isParentBound() ), + parent( 0 ), parentR( 0 ), Delegate( 0 ) + { + if( cvc ) + { + Delegate = GetImpl(cvc->Delegate); + } + if( isParentBound ) + parent = c->getParent(); + + if( isBound( c->ParentContext ) + && c->isParentBound() + && GetImpl(c->ParentContext) != c->getParent() ) + { + parentR = GetImpl(c->ParentContext); + } + + name = c->getDirName(); + path = c->getDirPath(); + } + + CacheManagerContextStateInTime::~CacheManagerContextStateInTime() + { + } + + string CacheManagerContextStateInTime::str() const + { + stringstream ss; + + ss << "C" + << " rc:" << ref_count + << " numSc:" << NumberOfSubContexts + << " item.sz:" << ItemsSz + << " claim:" << isReClaimable + << " frel:" << WeAreInFreeList + << " mRC:" << MinimumReferenceCount + << " this:" << (void*)ContextThisPtr + << " isF:" << isFilter + << " isS:" << isSorter; + if( HasBeenDeleted ) + ss << " DEL"; + if( isInheritingContext ) + ss << " inh"; + if( Delegate ) + { + ss << " D:" << toVoid(Delegate); + } + if( CoveredContext ) + { + ss << " cc:" << toVoid( CoveredContext ); + } + if( OverMountContext_Delegate ) + { + ss << " om:" << toVoid( OverMountContext_Delegate ); + } + + if( parent ) + ss << " pnt:" << (void*)parent; + if( parentR ) + ss << " pnt:" << (void*)parentR; + + ss << " n:" << name; + ss << " p:" << path; + + return ss.str(); + } + + void dumpTo( fh_ostream oss, CacheManagerContextStateInTimeList_t& list, const std::string& hdr ) + { + oss << "+++START DUMP+++" << hdr << endl; + CacheManagerContextStateInTimeList_t::iterator iter = list.begin(); + CacheManagerContextStateInTimeList_t::iterator e = list.end(); + + for( ; iter != e ; ++iter ) + { + oss << iter->str() << endl; + } + oss << "+++END DUMP+++" << hdr << endl; + } + + Private::CacheManagerContextStateInTimeList_t& + createMMCtxInTimeList( Private::CacheManagerContextStateInTimeList_t& ret ) + { + for( debug_mm_contexts_t::iterator iter = getMMCtx().begin(); + iter != getMMCtx().end(); iter++ ) + { + if( iter->first ) + { + ret.push_back( iter->first ); + } + } + } + + CacheManagerContextStateInTimeIndexSet_t toIndexSet( CacheManagerContextStateInTimeList_t& l ) + { + CacheManagerContextStateInTimeIndexSet_t ret; + + CacheManagerContextStateInTimeList_t::iterator iter = l.begin(); + CacheManagerContextStateInTimeList_t::iterator e = l.end(); + for( ; iter!=e ; ++iter ) + { + ret.insert( (*iter) ); + } + return ret; + } + + + bool operator<( const CacheManagerContextStateInTime& a, const CacheManagerContextStateInTime& b ) + { + if( a.ContextThisPtr && b.ContextThisPtr ) + return a.ContextThisPtr < b.ContextThisPtr; + if( a.cvc && b.cvc ) + return a.cvc < b.cvc; + return &a < &b; + } + + bool operator==( const CacheManagerContextStateInTime& a, const CacheManagerContextStateInTime& b ) + { + if( a.ContextThisPtr && b.ContextThisPtr ) + return a.ContextThisPtr == b.ContextThisPtr; + if( a.cvc && b.cvc ) + return a.cvc == b.cvc; + return &a == &b; + } + struct CacheManagerContextStateInTime_hash : public std::unary_function< CacheManagerContextStateInTime, size_t > + { + inline size_t operator()( const CacheManagerContextStateInTime& s ) const + { + if( s.ContextThisPtr ) + return size_t(s.ContextThisPtr); + if( s.cvc ) + return size_t(s.cvc); + return size_t(&s); + } + }; + struct CacheManagerContextStateInTime_equal_to : public std::binary_function< CacheManagerContextStateInTime&, CacheManagerContextStateInTime&, bool> + { + inline bool operator()( const CacheManagerContextStateInTime& a, const CacheManagerContextStateInTime& b ) const + { + if( a.ContextThisPtr && b.ContextThisPtr ) + return a.ContextThisPtr == b.ContextThisPtr; + if( a.cvc && b.cvc ) + return a.cvc == b.cvc; + return &a == &b; + } + }; + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + CacheManagerImpl::addToFreeList( Context* a ) + { +// cerr << "addToFreeList() a:" << toVoid(a) << endl; + + a->WeAreInFreeList = true; +#ifdef FERRIS_DEBUG_VM + if( a ) + LG_VM_D << "CacheManagerImpl::addToFreeList() c:" << toVoid(a) + << " " << a->getDirPath() << endl; +#endif + + getFreeList().insert(a); + +// if( autoCleanUpCall ) +// { +// cleanUp( false ); +// } + } + + void + CacheManagerImpl::removeFromFreeList( Context* a, bool quiet ) + { + a->WeAreInFreeList = false; + +#ifdef FERRIS_DEBUG_VM + if( !quiet && a ) + LG_VM_D << "CacheManagerImpl::removeFromFreeList() c:" << toVoid(a) + << " " << a->getDirPath() << endl; +#endif + + getFreeList().erase( a ); + } + + void + CacheManagerImpl::AutoClean() + { + if( shouldAutoCleanUp() ) + { + cleanUp( false ); + } + } + + Private::CacheManagerContextStateInTimeList_t& + CacheManagerImpl::createCacheManagerContextStateInTimeList( + Private::CacheManagerContextStateInTimeList_t& ret ) + { + LG_VM_D << "CacheManager::createCacheManagerContextStateInTimeList() size:" << getFreeList().size() << endl; + + for( freelist_t::iterator iter = getFreeList().begin(); + iter != getFreeList().end(); iter++ ) + { + Context* c = (*iter); + if( c ) + { + LG_VM_D << "CacheManager::createCacheManagerContextStateInTimeList() c:" << (void*)c << endl; + if( c ) + { + ret.push_back( Private::CacheManagerContextStateInTime( c ) ); + } + } + } + } + +// typedef Loki::SingletonHolder< CacheManagerImpl > CacheManagerSingleton; + + CacheManagerImpl* getCacheManagerImpl() + { + static CacheManagerImpl* ret = 0; + if( !ret ) + { + ret = new CacheManagerImpl(); + } + return ret; + +// static CacheManagerImpl ret; +// return &ret; +// return &CacheManagerSingleton::Instance(); + } + }; + + + CacheManager* getCacheManager() + { + return Private::getCacheManagerImpl(); + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + CacheManager::CacheManager() + : +// numberOfAllowedPermanentContextsInFreeList(100), +// maxNumberOfContextsToFreeAtOnce(100), +// maxNumberOfContextsInFreeList(500), +// autoCleanUpCall(true) + numberOfAllowedPermanentContextsInFreeList(-1), + maxNumberOfContextsToFreeAtOnce( + toint( getEDBString( FDB_GENERAL, "vm-auto-cleanup-maxfreeatonce", "100" ))), + maxNumberOfContextsInFreeList( + toint( getEDBString( FDB_GENERAL, "vm-auto-cleanup-maxnumberinfreelist", "15" ))), + autoCleanUpCall( toint( getEDBString( FDB_GENERAL, "vm-auto-cleanup", "0" ))), + m_insideResolveCall( 0 ), + m_insideCleanupCall( false ) + { +#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager() autoCleanUpCall:" << autoCleanUpCall << endl; +#endif + if( getenv( "LIBFERRIS_VM_AUTO_CLEANUP" ) != 0 ) + autoCleanUpCall = true; + } + + CacheManager::~CacheManager() + { +// cerr << "CacheManager::~CacheManager()" << endl; + } + + + CacheManager::freelist_t& + CacheManager::getFreeList() + { + return m_freelist; + } + + + + void + CacheManager::dumpFreeListTo( fh_ostream ss ) + { + LG_VM_D << "CacheManager::dumpFreeListTo() size:" << getFreeList().size() << endl; + + ss << "CacheManager::dumpFreeListTo() CList start" << endl; + for( freelist_t::iterator iter = getFreeList().begin(); + iter != getFreeList().end(); iter++ ) + { + Context* c = (*iter); + if( c ) + { + LG_VM_D << "CacheManager::dumpFreeListTo() c:" << (void*)c << endl; + if( c ) + c->dumpRefDebugData( ss ); + } + } + ss << "CacheManager::dumpFreeListTo() CList end" << endl; + } + + + + + bool + CacheManager::shouldAutoCleanUp() + { + return autoCleanUpCall; + } + + struct FERRISEXP_DLLLOCAL IgnoreCallsWhileExists + { + bool* val; + bool WasAlreadySet; + + IgnoreCallsWhileExists( bool* v ) + : + val(v), + WasAlreadySet( *v ) + { +// cerr << "Creating IgnoreCallsWhileExists v:" << (*val) << endl; + *val = true; + } + + bool operator()() + { + return WasAlreadySet; + } + + ~IgnoreCallsWhileExists() + { +// cerr << "Destroy IgnoreCallsWhileExists v:" << (*val) << endl; + if( !WasAlreadySet ) + { + *val = false; + } + } + }; + + +// typedef list< Context* > cptrlist_t; + FERRISEXP_DLLLOCAL void DepthFirstDelete( CacheManager::freelist_t& fl, + Context* cc, + Context::cptrlist_t& l, + bool callReclaimContextObject ) + { + cerr << "DepthFirstDelete(1) cc:" << cc << endl; + + for( Context::Items_t::iterator iter = cc->getItems().begin(); iter != cc->getItems().end(); ) + { + Context* c = GetImpl(*iter); + ++iter; + DepthFirstDelete( fl, c, l ); + } + +// callReclaimContextObject = false; + cerr << "DepthFirstDelete(2) cc:" << cc << endl; + + if( cc->isParentBound() ) + { + l.push_back( cc ); + if( callReclaimContextObject ) + { + cerr << "DepthFirstDelete() cc:" << toVoid(cc) << endl; + if( !cc->getParent()->reclaimContextObject( cc ) ) + { + cerr << "Failed to DepthFirstDelete() context cc:" << toVoid(cc) << endl; + } + else + { + } + } + } + else + { + l.push_back( cc ); + if( callReclaimContextObject ) + { + fl.erase( cc ); + delete cc; + } + } +#ifdef FERRIS_DEBUG_VM + cerr << "DepthFirstDelete() returning a level" << endl; +#endif + } + + FERRISEXP_DLLLOCAL void DepthFirstDelete( CacheManager::freelist_t& fl, + Context* cc, bool callReclaimContextObject ) + { + Context::cptrlist_t l; + cerr << "DepthFirstDelete(wrapper) calling recursive function" << endl; + DepthFirstDelete( fl, cc, l, callReclaimContextObject ); + cerr << "DepthFirstDelete(wrapper) cleanup of freelist" << endl; + + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + for( Context::cptrlist_t::iterator iter = l.begin(); iter != l.end(); ++iter ) + { +// cerr << "DepthFirstDelete(wrapper) cleanup of freelist:" << toVoid(*iter) << endl; + cm->removeFromFreeList( *iter, true ); + } +// cerr << "DepthFirstDelete(wrapper) done" << endl; + cerr << "DepthFirstDelete(wrapper) ending" << endl; + } + +#ifdef PCCTSCTX + FERRISEXP_DLLLOCAL void DepthFirstDeletePCCTS_DropInOderList( childContext* cc ) + { + for( Context::Items_t::iterator ci = cc->getItems().begin(); + ci != cc->getItems().end(); ++ci ) + { + childContext* c = dynamic_cast(GetImpl(*ci)); + DepthFirstDeletePCCTS_DropInOderList( c ); + } + cc->InOrderInsertList.clear(); + } + + + /** + * Delete a PCCTS mount point. We must delete children first, but also first + * drop InOrderList references. + */ + FERRISEXP_DLLLOCAL void DepthFirstDeletePCCTS( CacheManager::freelist_t& fl, childContext* cc ) + { +#ifdef FERRIS_DEBUG_VM + cerr << "DepthFirstDeletePCCTS(1) cc:" << cc->getDirPath() << endl; +#endif + DepthFirstDeletePCCTS_DropInOderList( cc ); + +#ifdef FERRIS_DEBUG_VM + cerr << "DepthFirstDeletePCCTS(2) cc:" << cc->getDirPath() << endl; + DEBUG_dumpcl("DepthFirstDeletePCCTS()"); + cerr << "DepthFirstDeletePCCTS(3) cc:" << cc->getDirPath() << endl; +#endif + + DepthFirstDelete( fl, cc ); + +#ifdef FERRIS_DEBUG_VM + cerr << "DepthFirstDeletePCCTS(end)" << endl; + DEBUG_dumpcl("DepthFirstDeletePCCTS(end)"); +#endif + } +#endif + + CacheManager::fh_insideResolve + CacheManager::getInsideResolve() + { + return new InsideResolve( this ); + } + + bool + CacheManager::insideCleanupCall() + { + return m_insideCleanupCall; + } + + + int + CacheManager::cleanUp_only_CreateMetaDataContext( bool force ) + { + int ret = 0; + + cerr << "CacheManager::cleanUp_only_CreateMetaDataContext(T)" << endl; + Util::ValueRestorer< bool > _obj_insideCleanupCall( m_insideCleanupCall, true ); + if( m_insideResolveCall ) + { + return ret; + } + + CacheManager::freelist_t ctxlist = getFreeList(); + int ctxlistsize = ctxlist.size(); + cerr << "CacheManager::cleanUp_only_CreateMetaDataContext() ctxlistsize:" << ctxlistsize << endl; + + for( freelist_t::iterator iter = ctxlist.begin(); iter != ctxlist.end(); ++iter ) + { + Context* c = (*iter); + if( !c ) + continue; + + if( !c->isParentBound() ) + { + cerr << "no parent bound.... c:" << (void*)c << endl; + cerr << "type:" << Loki::TypeInfo( typeid(c) ).name() << endl; + cerr << "url:" << c->getURL() << endl; + + if( f_mdcontext* cc = dynamic_cast(c) ) + { + cerr << "SHOULD FREE xCMDC:" << (void*)cc << endl; + } + + /** + * Freeing a metadata context tree which is out of scope. + */ + if( CreateMetaDataContext* cc = dynamic_cast( c ) ) + { + cerr << "SHOULD FREE CMDC:" << (void*)cc << endl; + if( !c->getItems().empty() ) + { + cerr << "VM ERROR. Attempt to free a cmdc which still has children." + << " cc:" << (void*)cc << endl; + continue; + } + + ++ret; + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + cm->removeFromFreeList( cc, true ); + delete cc; + getFreeList().erase(c); + continue; + } + } + } + return ret; + } + + + /** + * Remove any contexts that are not needed and can be recreated. + */ + int + CacheManager::cleanUp( bool force ) + { + Util::ValueRestorer< bool > _obj_insideCleanupCall( m_insideCleanupCall, true ); + +#ifdef FERRIS_DEBUG_VM + LG_VM_D << "CacheManager::cleanUp( force=" << force << " )" << endl; +#endif + + if( m_insideResolveCall ) + { +#ifdef FERRIS_DEBUG_VM + LG_VM_D << "CacheManager::cleanUp( inside resolve() by:" << m_insideResolveCall + << " returning )" << endl; +#endif + return 0; + } + + + /* + * Only allow one call to cleanup to process at once, any other calls + * happening at the same time are expected to be generated by the + * system while processing this cleanup. + */ + static bool IgnoreCallsWhileExists_ignoring = false; + IgnoreCallsWhileExists IgnoreCallsWhileExists_obj( &IgnoreCallsWhileExists_ignoring ); + if( IgnoreCallsWhileExists_obj() ) + return 0; + + int ret = 0; + freelist_t rejects; + + /* + * Copy and clear the free list so that in the course of freeing contexts + * new ones can be added to the free list for next round. + */ + CacheManager::freelist_t ctxlist = getFreeList(); + int ctxlistsize = ctxlist.size(); + + +#ifdef FERRIS_DEBUG_VM + LG_VM_D << "CacheManager::cleanUp(starting) existing freelist sz:" + << ctxlist.size() << endl; + for( freelist_t::iterator iter = ctxlist.begin(); iter != ctxlist.end(); ++iter ) + { + LG_VM_D << "CacheManager::cleanUp(starting) item:" << toVoid( *iter ) + << " rdn:" << (*iter)->getDirName() << endl; + } + LG_VM_D << "CacheManager::cleanUp( ctxlistsize.sz:" << ctxlistsize << " )" << endl; +#endif + + if( !force && maxNumberOfContextsInFreeList > 0 + && ctxlistsize <= maxNumberOfContextsInFreeList ) + { +#ifdef FERRIS_DEBUG_VM + LG_VM_D << "CacheManager::cleanUp(ret) not doing anything this call" + << " force:" << force + << " maxNumberOfContextsInFreeList:" << maxNumberOfContextsInFreeList + << " ctxlistsize:" << ctxlistsize + << endl; +#endif + return 0; + } + + if( numberOfAllowedPermanentContextsInFreeList > 0 ) + { + if( ctxlistsize <= numberOfAllowedPermanentContextsInFreeList ) + { +#ifdef FERRIS_DEBUG_VM + LG_VM_D << "CacheManager::cleanUp(ret) not doing anything this call2 " + << " force:" << force + << " numberOfAllowedPermanentContextsInFreeList:" << numberOfAllowedPermanentContextsInFreeList + << " ctxlistsize:" << ctxlistsize + << endl; +#endif + return 0; + } + } + +#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager::cleanUp() starting work..." << endl; +#endif + getFreeList().clear(); + LG_VM_D << "--------------------------------------------------------------------------------\n"; + LG_VM_D << "VM Autocleanup call all.contexts:" << getMMCtx().size() << endl; + LG_VM_D << "--------------------------------------------------------------------------------\n"; + for( freelist_t::iterator iter = ctxlist.begin(); iter != ctxlist.end(); ++iter ) + { + Context* c = (*iter); + LG_VM_D << " ctxlist.iter:" << toVoid(c) << " rdn:" << c->getDirName() << endl; + } + LG_VM_D << "--------------------------------------------------------------------------------\n"; + + for( freelist_t::iterator iter = ctxlist.begin(); iter != ctxlist.end(); ) + { + bool itermoved = false; + LG_CTX_D << "CacheManager::cleanUp(A) " << endl; + + if( maxNumberOfContextsToFreeAtOnce > 0 + && ret >= maxNumberOfContextsToFreeAtOnce ) + { + copy( iter, ctxlist.end(), inserter( rejects, rejects.end() ) ); + LG_VM_D << "Freed all we should at one time." << endl; + cerr << "Freed all we should at one time." << endl; + break; + } + +// DEBUG_dumpcl("CacheManager::cleanUp(iteration...)"); + + +// if( *iter ) + { + Context* c = (*iter); + { + freelist_t::iterator t = iter; + ++iter; + itermoved = true; + ctxlist.erase( t ); + } +// cerr << "starting with c:" << (void*)c << endl; + + LG_CTX_D << "CacheManager::cleanUp(B) " << endl; + if( !c ) + continue; + + c->WeAreInFreeList = false; + +#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager::cleanUp( 8 ) c:" << toVoid(c) << endl; + cerr << "CacheManager::cleanUp( 8 ) rc:" << c->ref_count << endl; + cerr << "CacheManager::cleanUp( 8 ) rdn:" << c->getDirName() << endl; +// DEBUG_dumpcl("CacheManager::cleanUp"); +#endif + + cerr << "CacheManager::cleanUp0 c:" << (void*)c << endl; + if( c ) + { + cerr << "CacheManager::cleanUp0 c.rc:" << c->ref_count << endl; + } + + + +// This block was uncommented but seems incorrect. +// /* +// * An overmount for something like XML will have a CoveredContext +// * and no OverMountContext. +// * +// * Call the OverMountContext OMC and the XML base context CC +// * +// * The CC context will have all of its children claimable and +// * the CC will have a single outstanding reference (from the OMC to CC). +// */ +// if( c->isParentBound() ) +// { +// Context* omc = c->getParent(); + +// LG_VM_D << "Perhaps have found the root of an overmount tree." +// << " c:" << toVoid(omc) +// << " rdn:" << omc->getDirName() +// << " cc:" << isBound( omc->CoveredContext ) +// << " omc:" << isBound( omc->OverMountContext_Delegate ) +// << " c.rc:" << omc->ref_count +// << " c.mRC:" << omc->getMinimumReferenceCount() +// << endl; + +// if( isBound( omc->OverMountContext_Delegate ) && !isBound( omc->CoveredContext ) ) +// { +// Context* cc = GetImpl( omc->OverMountContext_Delegate ); + +// LG_VM_D << "Have found the root of an overmount tree." +// << " c:" << toVoid(cc) +// << " c.rc:" << cc->ref_count +// << " c.mRC:" << cc->getMinimumReferenceCount() +// << endl; +// cerr << "Have found the root of an overmount tree." +// << " c:" << toVoid(cc) +// << " c.rc:" << cc->ref_count +// << " c.mRC:" << cc->getMinimumReferenceCount() +// << endl; +// if( cc->ref_count = (cc->getMinimumReferenceCount()+1) ) +// { +// LG_VM_D << "Calling depthFirstDelete on whole overmount tree:" +// << toVoid(cc) +// << " cc.items().size:" << cc->getItems().size() +// << " omc.items().size:" << omc->getItems().size() +// << endl; + +// // DepthFirstDelete( cc, false ); +// cerr << "About to unOverMount()" << endl; +// fh_context base = cc->CoveredContext; +// base->unOverMount( ctxlist ); +// cerr << "Done with to unOverMount()" << endl; +// base->NumberOfSubContexts = 0; +// DEBUG_dumpcl("CacheManager::cleanUp(overmount)"); +// LG_VM_D << "Cleaned up1 whole overmount tree:" << toVoid(cc) << endl; +// // Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); +// // cm->removeFromFreeList( cc, true ); +// // delete cc; +// LG_VM_D << "Cleaned up2 whole overmount tree:" << toVoid(cc) << endl; +// // continue; + +// iter = ctxlist.begin(); +// continue; +// // copy( iter, ctxlist.end(), inserter( rejects, rejects.end() ) ); +// // copy( rejects.begin(), rejects.end(), +// // inserter(getFreeList(), getFreeList().end() )); + +// // return 1; +// } +// } +// } + + + + if( !c->isParentBound() ) + { + cerr << "no parent bound.... c:" << (void*)c << endl; + /** + * Freeing a metadata context tree which is out of scope. + */ + if( CreateMetaDataContext* cc = dynamic_cast( c ) ) + { + cerr << "SHOULD FREE CMDC:" << (void*)cc << endl; + if( !c->getItems().empty() ) + { + cerr << "VM ERROR. Attempt to free a cmdc which still has children." + << " cc:" << (void*)cc << endl; + continue; + } + + ++ret; + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + cm->removeFromFreeList( cc, true ); + delete cc; + continue; + } + + cerr << "no parent bound c:" << (void*)c << " have-cc:" << isBound( c->CoveredContext ) << endl; + if( !isBound( c->CoveredContext ) ) + { +#ifdef PCCTSCTX + /* + * Freeing a whole PCCTS mount + */ + if( childContext* cc = dynamic_cast(c)) + { +//#ifdef FERRIS_DEBUG_VM + cerr << "Freeing PCCTS mount rooted at cc:" << toVoid(cc) << endl; +//#endif + DepthFirstDeletePCCTS( ctxlist, cc ); + iter = ctxlist.begin(); + continue; + } +#endif + LG_VM_D << "Not freeing root node:" << c->getDirPath() << endl; + continue; + } + + + /* + * VM.clean.3: Can cleanup a overmount tree when the root node has rc=2 + */ + LG_VM_D << "Cleaning up overmount tree p:" << c->getDirPath() << endl; + + /* + * UnOvermount the context + */ + cerr << " unovermount cc:" << (void*)GetImpl(c->CoveredContext) << endl; + fh_context base = c->CoveredContext; + freelist_t deletedItems; + base->unOverMount( deletedItems ); + cerr << " called base->unovermount cc:" << (void*)GetImpl(c->CoveredContext) << endl; + + cerr << "deletedItems.size:" << deletedItems.size() << endl; + + { + // delete the contexts from the ctxlist which were already + // deleted by unOverMount() + for( freelist_t::iterator iter = deletedItems.begin(); + iter != deletedItems.end(); ++iter ) + { + ctxlist.erase( *iter ); + } + cerr << "erased deleted items" << endl; + + // Now, build a lookup from the parent -> context of all the existing + // contexts on ctxlist. Then make sure that anything which has a parent + // that was deleted is also deleted. + // This will happen for example if there is a ./foo.db/a/b + // which was remove()d. + typedef std::map< Context*, Context* > parent_lookup_t; + parent_lookup_t parent_lookup; + for( freelist_t::iterator iter = ctxlist.begin(); + iter != ctxlist.end(); ++iter ) + { + Context* c = (*iter); + if( c && c->isParentBound() ) + { + cerr << "adding to pl:" << c->getParent() << " c:" << c << endl; + parent_lookup.insert( make_pair( c->getParent(), c ) ); + } + } + cerr << "build parent lookup..." << endl; + for( freelist_t::iterator iter = deletedItems.begin(); + iter != deletedItems.end(); ++iter ) + { + cerr << "deletedItem...:" << *iter << endl; + parent_lookup_t::iterator pi = parent_lookup.find( *iter ); + if( parent_lookup.end() != pi ) + { + cerr << "found c:" << pi->second << " with a deleted parent!" << endl; + cerr << " 1ctxlist.size:" << ctxlist.size() << endl; + Context* cc = pi->second; + ctxlist.erase( cc ); + cerr << " 2ctxlist.size:" << ctxlist.size() << endl; + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + cm->removeFromFreeList( cc, true ); + cc->ParentContext.ExplicitlyLeakPointer(); + cc->CoveredContext.ExplicitlyLeakPointer(); + cc->OverMountContext_Delegate.ExplicitlyLeakPointer(); + Factory::getPluginOutOfProcNotificationEngine().forgetContext( cc ); + delete cc; + } + } +// for( freelist_t::iterator iter = deletedItems.begin(); iter != deletedItems.end(); ) +// { +// Context* cc = *iter; +// ++iter; +// cerr << "finally deleting cc:" << (void*)cc << endl; +// delete cc; +// } + } + + + iter = ctxlist.begin(); + continue; + } + + string path = c->getDirPath(); + LG_VM_D << "CacheManager::cleanUp c:" << (void*)c + << " path:" << path + << " supportsReClaim:" << c->supportsReClaim() + << endl; + cerr << "CacheManager::cleanUp1 has-parent:" << c->isParentBound() + << " c:" << (void*)c + << " path:" << path + << " supportsReClaim:" << c->supportsReClaim() + << endl; + + // Lets remove the overmount context before the coveredcontext. + if( isBound( c->OverMountContext_Delegate ) ) + continue; + + if( !c->supportsReClaim() ) + { + LG_CTX_D << "CacheManager::cleanUp() removing context from freelist " + << "due to lack of reclaim in VFS module for path:" + << c->getDirPath() + << endl; +#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager::cleanUp() removing context from freelist " + << "due to lack of reclaim in VFS module for path:" + << c->getDirPath() + << endl; +#endif + continue; + } + + + + try + { + /* + * delete from children to parents. If this is able to be cleaned up + * but has children which can be cleaned up too, we don't clean the + * parent until next time. + */ + if( !c->getItems().empty() ) + { + LG_VM_D << "cleanup() skipping context with children c:" << toVoid(c) << endl; + cerr << "cleanup() skipping context with children c:" << toVoid(c) << endl; + c->WeAreInFreeList = 1; + rejects.insert( c ); + continue; + } + + + /* + * Quick check to make sure they are ready to die + */ + if( c->ref_count > c->getMinimumReferenceCount() ) + { + c->WeAreInFreeList = 1; + rejects.insert( c ); + stringstream ss; + ss << "VM ERROR: object in the freelist with high reference count: " + << toVoid(c); + cerr << ss.str() << endl; + LG_VM_W << ss.str() << endl; + continue; + } + + // Note that we hit the parent directly to avoid bump/drop of the ref for + // the parent and subsequent parent tree add/remove from the free list. + Context* p = c->getParent(); + + cerr << "CacheManager::cleanUp2 c:" << (void*)c + << " p:" << (void*)p + << " path:" << path + << " supportsReClaim:" << c->supportsReClaim() + << endl; + + LG_VM_D << "CacheManager::cleanUp() path: " << path << endl; + if( p ) + { +// DEBUG_dumpcl("CacheManager::cleanUp(about to reclaim)"); + if( !p->reclaimContextObject( c ) ) + { + LG_VM_D << "CacheManager::cleanUp(remove rejected)" + << " path:" << path << " c:" << toVoid(c) << endl; +//#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager::cleanUp(remove rejected)" + << " path:" << path << endl; +//#endif + c->WeAreInFreeList=1; + rejects.insert( c ); + } + else + { + cerr << "CacheManager::cleanUp(reclaim was ok) freelist sz:" + << getFreeList().size() << endl; +#ifdef FERRIS_DEBUG_VM + cerr << "CacheManager::cleanUp(reclaim was ok) freelist sz:" + << getFreeList().size() << endl; + for( freelist_t::iterator iter = getFreeList().begin(); iter != getFreeList().end(); ++iter ) + { + cerr << "CacheManager::cleanUp(reclaim was ok) item:" << toVoid( *iter ) << endl; + } + + DEBUG_dumpcl("CacheManager::cleanUp(done with reclaim)"); +#endif + LG_VM_D << "CacheManager::cleanUp(removed)" + << " path:" << path << endl; + } + } + ret++; + } + catch( exception& e ) + { + LG_CTX_ER << "CacheManager::cleanUp() clist exception:" << e.what() << endl; + cerr << "CacheManager::cleanUp() clist exception:" << e.what() << endl; + LG_CTX_ER << "CacheManager::cleanUp() path:" << path << endl; + + c->WeAreInFreeList=1; + rejects.insert( c ); + if( !itermoved ) + { + iter++; + } + } + } + + } + + LG_VM_D << "CacheManager::cleanUp(remake CList) cleaned:" + << ret << " contexts rejects.size:" << rejects.size() << endl; + +// cerr << "CacheManager::cleanUp(end) existing freelist sz:" +// << getFreeList().size() << endl; +// for( freelist_t::iterator iter = getFreeList().begin(); iter != getFreeList().end(); ++iter ) +// { +// cerr << "CacheManager::cleanUp(end) item:" << toVoid( *iter ) << endl; +// } + + + copy( rejects.begin(), rejects.end(), + inserter(getFreeList(), getFreeList().end() )); + + DEBUG_dumpcl("CacheManager::cleanUp(exiting)"); + LG_VM_D << "CacheManager::cleanUp() cleaned:" << ret << " contexts" << endl; + return ret; + } + + namespace Private + { + void addContextReferenceWatch( Context* c ) + { + getContextReferenceWatches().insert( c ); + haveAnyContextReferenceWatches_Result = true; + } + + void removeContextReferenceWatch( Context* c ) + { + getContextReferenceWatches().erase( c ); + haveAnyContextReferenceWatches_Result = !getContextReferenceWatches().empty(); + } + ContextReferenceWatches_t& getContextReferenceWatches() + { + static ContextReferenceWatches_t ret; + return ret; + } + + void addContextReferenceWatchByName( const std::string& n ) + { + getContextReferenceWatchesByName().insert( n ); + haveAnyContextReferenceWatchesByName_Result = true; + } + void removeContextReferenceWatchByName( const std::string& n ) + { + getContextReferenceWatchesByName().erase( n ); + haveAnyContextReferenceWatchesByName_Result = !getContextReferenceWatchesByName().empty(); + } + ContextReferenceWatchesByName_t& getContextReferenceWatchesByName() + { + static ContextReferenceWatchesByName_t ret; + return ret; + } + + + void addContextParentReferenceWatch( Context* c ) + { + getContextParentReferenceWatches().insert( c ); + haveAnyContextParentReferenceWatches_Result = true; + } + void removeContextParentReferenceWatch( Context* c ) + { + getContextParentReferenceWatches().erase( c ); + haveAnyContextParentReferenceWatches_Result = getContextParentReferenceWatches().empty(); + } + ContextReferenceWatches_t& getContextParentReferenceWatches() + { + static ContextReferenceWatches_t ret; + return ret; + } + + + bool haveAnyContextReferenceWatches() + { + return haveAnyContextReferenceWatches_Result; + } + + bool haveAnyContextReferenceWatchesByName() + { + return haveAnyContextReferenceWatchesByName_Result; + } + + bool haveAnyContextParentReferenceWatches() + { + return haveAnyContextParentReferenceWatches_Result; + } + + }; + + +}; + + diff --git a/Ferris/CacheManager_private.hh b/Ferris/CacheManager_private.hh new file mode 100644 index 0000000..779be2b --- /dev/null +++ b/Ferris/CacheManager_private.hh @@ -0,0 +1,139 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: CacheManager_private.hh,v 1.5 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CACHE_MGR_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_CACHE_MGR_PRIV_H_ + +namespace Ferris +{ + namespace Private + { + struct CacheManagerContextStateInTime_hash; + struct CacheManagerContextStateInTime_equal_to; + + class FERRISEXP_API CacheManagerContextStateInTime + { + public: + FerrisLoki::Handlable::ref_count_t ref_count; + gint32 NumberOfSubContexts; + gint32 ItemsSz; + bool isReClaimable; + bool WeAreInFreeList; + long MinimumReferenceCount; + Context* ContextThisPtr; + bool isFilter; + bool isSorter; + bool HasBeenDeleted; + bool isInheritingContext; + ChainedViewContext* cvc; + Context* Delegate; + Context* CoveredContext; + Context* OverMountContext_Delegate; + bool isParentBound; + Context* parent; + Context* parentR; + std::string name; + std::string path; + + friend struct CacheManagerContextStateInTime_hash; + friend struct CacheManagerContextStateInTime_equal_to; + + friend bool operator<( const CacheManagerContextStateInTime& k1, const CacheManagerContextStateInTime& k2 ); + friend bool operator==( const CacheManagerContextStateInTime& k1, const CacheManagerContextStateInTime& k2 ); + + CacheManagerContextStateInTime( Context* c ); + ~CacheManagerContextStateInTime(); + + std::string str() const; + }; + typedef std::list< CacheManagerContextStateInTime > CacheManagerContextStateInTimeList_t; + + typedef std::set CacheManagerContextStateInTimeIndexSet_t; + +// typedef FERRIS_STD_HASH_SET CacheManagerContextStateInTimeIndexSet_t; + + CacheManagerContextStateInTimeIndexSet_t toIndexSet( CacheManagerContextStateInTimeList_t& l ); + + /********************/ + /********************/ + /********************/ + + class FERRISEXP_DLLLOCAL CacheManagerImpl + : + public CacheManager + { + public: + void addToFreeList( Context* a ); + /** + * Note that if quiet is true then the object might already have + * been deleted, so no logging or examination is performed in quiet + * mode only the collection is reeped of any pointers to the old location + */ + void removeFromFreeList( Context* a, bool quiet = false ); + void AutoClean(); + + Private::CacheManagerContextStateInTimeList_t& + createCacheManagerContextStateInTimeList( Private::CacheManagerContextStateInTimeList_t& ret ); + + }; + + CacheManagerImpl* getCacheManagerImpl(); + + + void dumpTo( fh_ostream oss, CacheManagerContextStateInTimeList_t& list, const std::string& hdr ); + + Private::CacheManagerContextStateInTimeList_t& + createMMCtxInTimeList( Private::CacheManagerContextStateInTimeList_t& ret ); + + void addContextReferenceWatch( Context* c ); + void removeContextReferenceWatch( Context* c ); + typedef FERRIS_STD_HASH_SET, + f_equal_to > ContextReferenceWatches_t; + ContextReferenceWatches_t& getContextReferenceWatches(); + bool haveAnyContextReferenceWatches(); + + void addContextReferenceWatchByName( const std::string& n ); + void removeContextReferenceWatchByName( const std::string& n ); + typedef FERRIS_STD_HASH_SET< std::string > ContextReferenceWatchesByName_t; + ContextReferenceWatchesByName_t& getContextReferenceWatchesByName(); + bool haveAnyContextReferenceWatchesByName(); + + void addContextParentReferenceWatch( Context* c ); + void removeContextParentReferenceWatch( Context* c ); + ContextReferenceWatches_t& getContextParentReferenceWatches(); + bool haveAnyContextParentReferenceWatches(); + + } + +}; +#endif diff --git a/Ferris/ChainedViewContext.cpp b/Ferris/ChainedViewContext.cpp new file mode 100644 index 0000000..05e49f3 --- /dev/null +++ b/Ferris/ChainedViewContext.cpp @@ -0,0 +1,814 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ChainedViewContext.cpp,v 1.15 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include // for debug msgs (dynamic_cast<> in dump()) + +using namespace std; + + +namespace Ferris +{ + fh_context getUnderlyingContext( fh_context c ) + { + Context* ret = GetImpl(c); + + while( ChainedViewContext* rawc = dynamic_cast( ret )) + { + if( rawc->Delegate ) + ret = GetImpl( rawc->Delegate ); + else + break; + } + + return ret; + } + + +/** + * Create a new decorator for Context objects. + * + * @see SetupEventConnections() + * + * @param ctx Context to delegate actions too. + * @param setupEventConnections true if events should be setup right away. This param + * exists so that subclasses can perform work in their ctor before enabling + * event connections on the base class. + */ + ChainedViewContext::ChainedViewContext( + const fh_context& ctx, + bool setupEventConnections ) + : + Delegate(ctx) + { + if( setupEventConnections ) + { + SetupEventConnections(); + } + + if( isBound( ctx ) ) + setContext( 0, ctx->getDirName() ); + else + setContext( 0, "" ); +// remContextToMemoryManagementData( this ); + } + +/** + * Create a new decorator for Context objects. + * + * @see SetupEventConnections() + * + * @param ctx Context to delegate actions too. + * @param rdn Filename to use instead of ctx->getDirName() + * @param setupEventConnections true if events should be setup right away. This param + * exists so that subclasses can perform work in their ctor before enabling + * event connections on the base class. + */ + ChainedViewContext::ChainedViewContext( + const fh_context& ctx, + const std::string& rdn, + bool setupEventConnections ) + : + Delegate(ctx) + { + if( setupEventConnections ) + { + SetupEventConnections(); + } + + setContext( 0, rdn ); +// remContextToMemoryManagementData( this ); + } + + +/** + * Create a new decorator for Context objects. + * + * @see SetupEventConnections() + * + * @param parent Parent for new context to have + * @param delegate Context to delegate actions too. + * @param setupEventConnections true if events should be setup right away. This param + * exists so that subclasses can perform work in their ctor before enabling + * event connections on the base class. + */ + ChainedViewContext::ChainedViewContext( + const fh_context& parent, + const fh_context& delegate, + bool setupEventConnections, + bool callSetContextWithDelegateRdn ) + : + Delegate(delegate) + { + if( setupEventConnections ) + { + SetupEventConnections(); + } + + if( callSetContextWithDelegateRdn ) + setContext( parent, delegate->getDirName() ); +// remContextToMemoryManagementData( this ); + } + +/** + * Create a new decorator for Context objects. + * + * @see SetupEventConnections() + * + * @param parent Parent for new context to have + * @param delegate Context to delegate actions too. + * @param rdn Filename to use instead of ctx->getDirName() + * @param setupEventConnections true if events should be setup right away. This param + * exists so that subclasses can perform work in their ctor before enabling + * event connections on the base class. + */ + ChainedViewContext::ChainedViewContext( + const fh_context& parent, + const fh_context& delegate, + const std::string& rdn, + bool setupEventConnections ) + : + Delegate(delegate) + { + if( setupEventConnections ) + { + SetupEventConnections(); + } + setContext( parent, rdn ); + } + + + /** + * Prevent bad deletes + */ + ChainedViewContext::~ChainedViewContext() + { +// remContextToMemoryManagementData( this ); + } + + + + void + ChainedViewContext::createStateLessAttributes( bool force ) + { + static Util::SingleShot virgin; + if( force || virgin() ) + { + tryAddStateLessAttribute( "ferris-delegate-url", + &_Self::SL_getDelegateURLStream, + FXD_URL ); + tryAddStateLessAttribute( "ferris-delegate-path", + &_Self::SL_getDelegatePathStream, + FXD_URL ); + Context::createStateLessAttributes( true ); + Context::supplementStateLessAttributes( true ); + } + } + + fh_stringstream + ChainedViewContext::SL_getDelegateURLStream( Context* gc, const std::string& rdn, EA_Atom* atom ) + { + ChainedViewContext* c = (ChainedViewContext*)gc; + + fh_stringstream ss; + if( isBound( c->Delegate ) ) + { + ss << c->Delegate->getURL(); + } + return ss; + } + + fh_stringstream + ChainedViewContext::SL_getDelegatePathStream( Context* gc, const std::string& rdn, EA_Atom* atom ) + { + ChainedViewContext* c = (ChainedViewContext*)gc; + + fh_stringstream ss; + if( isBound( c->Delegate ) ) + { + ss << c->Delegate->getDirPath(); + } + return ss; + } + + + bool + ChainedViewContext::getIsNativeContext() const + { + if( Delegate ) + return Delegate->getIsNativeContext(); + return _Base::getIsNativeContext(); + } + + void + ChainedViewContext::setIsChainedViewContextRoot() + { + ref_count++; + + } + + void + ChainedViewContext::SetupEventConnections( fh_context c ) + { + if( !c ) + c = Delegate; + + if( m_ChainedViewContext_Called_SetupEventConnections ) + return; + m_ChainedViewContext_Called_SetupEventConnections = true; + + LG_SORT_I << "SetupEventConnections() c:" << c->getURL() << endl; + + c->getNamingEvent_Deleted_Sig().connect(sigc::mem_fun( *this, &ChainedViewContext::OnDeleted)); + c->getNamingEvent_Exists_Sig().connect(sigc::mem_fun( *this, &ChainedViewContext::OnExists)); + c->getNamingEvent_Created_Sig().connect(sigc::mem_fun( *this, &ChainedViewContext::OnCreated)); + c->getNamingEvent_Changed_Sig().connect(sigc::mem_fun( *this, &ChainedViewContext::OnChanged)); + c->getNamingEvent_Start_Reading_Context_Sig().connect( + sigc::mem_fun( *this, &ChainedViewContext::OnStartReading)); + c->getNamingEvent_Stop_Reading_Context_Sig().connect( + sigc::mem_fun( *this, &ChainedViewContext::OnStopReading)); + } + + void + ChainedViewContext::ensureEventConnections() + { + SetupEventConnections( 0 ); + } + + + +/** + * Called when a context in the base context has been deleted. + * + * We update local state and then emit the signal ourself to allow chaining. + */ + void + ChainedViewContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { +// Emit_Deleted( ev, newdn, olddn, 0 ); +// Remove( ev->getSource()->getSubContext( olddn ) ); + Remove( olddn ); + } + +/** + * Called when a new context has been discovered in the base context. + * + * We insert the new context and emit ourself for chaining. + */ + void + ChainedViewContext::OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { + LG_CTX_D << "ChainedViewContext::OnExists() olddn:" << olddn + << " url:" << ev->getSource()->getSubContext( olddn )->getURL() + << endl; + + fh_context c = ev->getSource(); + + bool created = false; + if( !priv_discoveredSubContext( subc->getDirName(), created ) ) + { + Insert( GetImpl( subc ) ); + } + + + +// if( !priv_isSubContextBound( olddn )) +// { +// // Insert( GetImpl( c->getSubContext( olddn )) ); +// Insert( GetImpl( subc ) ); +// LG_CTX_D << "ChainedViewContext::OnExists() olddn:" << olddn +// << " url:" << ev->getSource()->getSubContext( olddn )->getURL() +// << " inserted." +// << endl; +// } + +// // Emit_Exists( ev, newdn, olddn, 0 ); + } + + void + ChainedViewContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + LG_CTX_D << "ChainedViewContext::OnCreated" << endl; + bool created = true; + if( !priv_discoveredSubContext( subc->getDirName(), created ) ) + { + Insert( GetImpl( subc ), 1, 1 ); + } + +// Insert( GetImpl( subc ), 1, 1 ); + } + + void + ChainedViewContext::OnChanged( NamingEvent_Changed* ev, + std::string olddn, std::string newdn ) + { + LG_CTX_D << "ChainedViewContext::OnChanged old:" << olddn << " new:" << newdn + << " earl:" << getURL() << endl; + Emit_Changed( ev, getURL(), getURL(), 0 ); + } + + + +/** + * For subclasses to override if they like. + */ + void + ChainedViewContext::OnStartReading( NamingEvent_Start_Reading_Context* ) + { + } + +/** + * For subclasses to override if they like. + */ + void + ChainedViewContext::OnStopReading ( NamingEvent_Stop_Reading_Context* ) + { + } + + + /////////////////////////////////////////////////////////////////////////////// + // + // Delegating Attribute Methods. + // + /////////////////////////////////////////////////////////////////////////////// + +/** + * Passed right through to the base context. + * + * @see Context::getIStream() + */ + fh_istream + ChainedViewContext::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + return Delegate->getIStream( m ); + } + +/** + * Passed right through to the base context. + * + * @see Context::getLocalIStream() + */ + fh_istream + ChainedViewContext::getLocalIStream( string& new_dn, ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + return Delegate->getLocalIStream( new_dn, m ); + } + +/** + * Passed right through to the base context. + * + * @see Context::getIOStream() + */ + fh_iostream + ChainedViewContext::getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) + { + return Delegate->getIOStream( m ); + } + + +/** + * If we have a parent we return it as normal, + * If we have no parent, then we pass through to the base context. + * + * + * @see Context::getParent() + */ + Attribute::Parent_t + ChainedViewContext::getParent() throw (FerrisParentNotSetError) + { + return _Base::isParentBound() ? _Base::getParent() : Delegate->getParent(); + } + + +/** + * If either we have a parent or the delegate does. + * + * @see Context::isParentBound() + */ + bool + ChainedViewContext::isParentBound() + { + if( !Delegate ) + return _Base::isParentBound(); + + return _Base::isParentBound() || Delegate->isParentBound(); + } + +/** + * Passed right through to the base context. + * + * @see Context::getDirName() + */ + const std::string& + ChainedViewContext::getDirName() const + { +// cerr << "ChainedViewContext::getDirName() ret:" << Delegate->getDirName() << endl; + return Delegate->getDirName(); + } + + string + ChainedViewContext::getDirPath() throw (FerrisParentNotSetError) + { + return Delegate->getDirPath(); + } + + std::string + ChainedViewContext::getURL() + { + return Delegate->getURL(); + } + + + /** + * Subclasses can override this and supply a list of EA names which + * by default should be taken from this context instead of Delegate. + * + * By default there are no local names. + */ + stringset_t& + ChainedViewContext::getForceLocalAttributeNames() + { + static stringset_t sl; + return sl; + } + + stringset_t& + ChainedViewContext::getAugmentedForceLocalAttributeNames() + { + stringset_t& sl = getForceLocalAttributeNames(); + sl.insert("ferris-delegate-url"); + sl.insert("ferris-delegate-path"); + return sl; + } + + + + + /** + * EA names not in getAugmentedForceLocalAttributeNames() + * are passed right through to the base context. + * + * @see Context::getStrAttr() + */ + std::string + ChainedViewContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + stringset_t& sl = getAugmentedForceLocalAttributeNames(); + if( !sl.empty() ) + { + if( sl.find( rdn ) != sl.end() ) + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + return Delegate->private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + + + /** + * EA names not in getAugmentedForceLocalAttributeNames() + * are passed right through to the base context. + * + * @see Context::getAttribute() + */ + fh_attribute + ChainedViewContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) + { + stringset_t& sl = getAugmentedForceLocalAttributeNames(); + if( !sl.empty() ) + { + if( sl.find( rdn ) != sl.end() ) + return _Base::getAttribute( rdn ); + } + return Delegate->getAttribute(rdn); + } + + /** + * EA names not in getAugmentedForceLocalAttributeNames() + * are passed right through to the base context. + * + * @see Context::getAttributeNames() + */ + AttributeCollection::AttributeNames_t& + ChainedViewContext::getAttributeNames( AttributeNames_t& ret ) + { + stringset_t& sl = getAugmentedForceLocalAttributeNames(); + if( !sl.empty() ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + Delegate->getAttributeNames( t1 ); + _Base::getAttributeNames( t2 ); + return mergeAttributeNames( ret, t1, t2 ); + } + + return Delegate->getAttributeNames( ret ); + } + + /** + * EA names not in getAugmentedForceLocalAttributeNames() + * are passed right through to the base context. + * + * @see Context::getAttributeCount() + */ + int + ChainedViewContext::getAttributeCount() + { + stringset_t& sl = getAugmentedForceLocalAttributeNames(); + if( !sl.empty() ) + { + AttributeNames_t tmp; + getAttributeNames( tmp ); + return tmp.size(); + } + return Delegate->getAttributeCount(); + } + + /** + * EA names not in getAugmentedForceLocalAttributeNames() + * are passed right through to the base context. + * + * @see Context::isAttributeBound() + */ + bool + ChainedViewContext::isAttributeBound( const std::string& rdn, + bool createIfNotThere + ) throw( NoSuchAttribute ) + { + stringset_t& sl = getAugmentedForceLocalAttributeNames(); + if( !sl.empty() ) + { + if( sl.find( rdn ) != sl.end() ) + return _Base::isAttributeBound( rdn, createIfNotThere ); + } + + if( !Delegate ) + return false; + return Delegate->isAttributeBound( rdn, createIfNotThere ); + } + + + +/** + * Handlable::AddRef(); + */ + Handlable::ref_count_t + ChainedViewContext::AddRef() + { + if( ref_count >= ImplementationDetail::MAX_REF_COUNT ) + return ref_count; + return Handlable::AddRef(); + } + +/** + * Handlable::Release(); + */ + Handlable::ref_count_t + ChainedViewContext::Release() + { + if( ref_count >= ImplementationDetail::MAX_REF_COUNT ) + return ref_count; + return Handlable::Release(); + } + +/** + * Always false; + */ + bool + ChainedViewContext::all_attributes_have_single_ref_count() + { + return false; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// Delegating Context Methods. +// +/////////////////////////////////////////////////////////////////////////////// + + fh_attribute + ChainedViewContext::createAttribute( const string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported, + AttributeAlreadyInUse ) + { + return Delegate->createAttribute( rdn ); + } + + + fh_attribute + ChainedViewContext::acquireAttribute( const string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported ) + { + return Delegate->acquireAttribute( rdn ); + } + + + +/** + * Passed right through to the base context. + * + * @see Context::createSubContext() + */ + fh_context + ChainedViewContext::createSubContext( const string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + LG_CTX_D << "ChainedViewContext::createSubContext() rdn:" << rdn << endl; + return Delegate->createSubContext( rdn, md ); + } + + fh_context + ChainedViewContext::createSubContext( const std::string& rdn, fh_mdcontext md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + LG_CTX_D << "ChainedViewContext::createSubContext() rdn:" << rdn << endl; +// fh_context c = GetImpl( md ); + fh_context c; + Upcast( c, md ); + return createSubContext( rdn, c ); + } + + + +/** + * Passed right through to the base context. + * + * @see Context::getRelativeContext() + */ + fh_context + ChainedViewContext::getRelativeContext( const string& xdn, RootContextFactory* f ) + throw( NoSuchSubContext ) + { + return Delegate->getRelativeContext(xdn,f); + } + +// Context::SubContextNames_t +// ChainedViewContext::getSubContextNames() +// { +// return Delegate->getSubContextNames(); +// } + +// fh_context +// ChainedViewContext::getSubContext( const string& rdn ) throw( NoSuchSubContext ) +// { +// return Delegate->getSubContext(rdn); +// } + +// bool +// ChainedViewContext::isSubContextBound( const string& rdn ) +// { +// return Delegate->isSubContextBound(rdn); +// } + +/** + * Nothing. Subclasses might add flavor to this if they want to force a read() + * delegation. + */ + void + ChainedViewContext::read( bool force ) + { + } + + +/** + * Always 0 + */ + long + ChainedViewContext::guessSize() throw() + { + return 0; + } + + /** + * Always true + */ + bool + ChainedViewContext::supportsReClaim() + { + return true; + } + + void + ChainedViewContext::dumpOutItems() + { + #define TARGETSTREAM cerr + + TARGETSTREAM << "ChainedViewContext::dumpOutItems( START ) url:" << getURL() + << " this:" << toVoid(dynamic_cast(this)) + << " cc:" << toVoid(dynamic_cast(GetImpl(CoveredContext))) + << " omc:" << toVoid(dynamic_cast(getOverMountContext())) + << " Delegate:" << toVoid(dynamic_cast(GetImpl(Delegate))) + << endl; + if( dynamic_cast(this) ) + TARGETSTREAM << " is-sorter " << endl; + if( dynamic_cast(this) ) + TARGETSTREAM << " is-filter " << endl; + + if( getOverMountContext() != this ) + { + getOverMountContext()->dumpOutItems(); + return; + } + + for( Items_t::iterator iter = getItems().begin(); + iter != getItems().end(); iter++ ) + { + if( isBound( *iter ) ) + { +// LG_CTX_D << " path:" << (*iter)->getDirPath(); +// cerr << " path:" << (*iter)->getDirPath() << endl; + + ChainedViewContext* cvc = dynamic_cast(GetImpl(Delegate)); + + TARGETSTREAM + << " child:" << toVoid(dynamic_cast(GetImpl(*iter))) + << " cc:" << toVoid(dynamic_cast(GetImpl((*iter)->CoveredContext))) + << " omc:" << toVoid(dynamic_cast((*iter)->getOverMountContext())); + if( cvc ) + TARGETSTREAM << " Delegate:" << toVoid(dynamic_cast(cvc)); + if( dynamic_cast(GetImpl(*iter)) ) + TARGETSTREAM << " is-sorter " << endl; + if( dynamic_cast(GetImpl(*iter)) ) + TARGETSTREAM << " is-filter " << endl; + TARGETSTREAM + << " url:" << (*iter)->getURL() + << endl; + } + else + { + TARGETSTREAM << "iteration. " + << " first:" << (*iter)->getDirName() + << " bound:" << isBound( *iter ) + << endl; + } + } + TARGETSTREAM << endl; + TARGETSTREAM << "ChainedViewContext::dumpOutItems( END )" << endl; + } + + void + ChainedViewContext::setDelegate( fh_context c ) + { + Delegate = c; + } + + fh_context + ChainedViewContext::getDelegate() + { + return Delegate; + } + + Context* + ChainedViewContext::priv_CreateContext( Context* parent, std::string rdn ) + { + return new ChainedViewContext( 0, rdn ); + } + +}; diff --git a/Ferris/ChainedViewContext.hh b/Ferris/ChainedViewContext.hh new file mode 100644 index 0000000..505a004 --- /dev/null +++ b/Ferris/ChainedViewContext.hh @@ -0,0 +1,249 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ChainedViewContext.hh,v 1.10 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CHAINED_VIEW_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_CHAINED_VIEW_CONTEXT_H_ + +#include + +#include + +#include +#include + +#include +#include +#include + +namespace Ferris +{ + fh_context getUnderlyingContext( fh_context c ); + + /** + * Decorator pattern for context objects (GoF book). + * + * Create a Context that is just a lightweight facade ontop of a base view. + * All interesting operations are delegated to the base view, so an object + * of this class appears just like an object of the base view class. + * + * This class is most useful to subclass if one is trying to seem like a + * context but add a small constraint/feature to that class. + * + * Note that the ChainedViewContext class maintains its own items_t collection, + * so that the items in the view can be different to those in the base context. + * + * @see FilteredContext for a new example of this usage. + * + */ + class FERRISEXP_API ChainedViewContext + : + public Context + { + typedef ChainedViewContext _Self; + typedef Context _Base; + + friend class Private::CacheManagerContextStateInTime; + friend class ContextIterator; + friend fh_context getUnderlyingContext( fh_context c ); + + /** + * This uses getForceLocalAttributeNames() and then adds in some EA names + * which should always be local. These are things like ferris-delegate-url. + */ + stringset_t& getAugmentedForceLocalAttributeNames(); + + protected: + // TESTING ONLY + friend class Context; + friend class ManyBaseToOneViewContext; + friend class SelectionContext; // test for two time addition of item + + fh_context Delegate; + void setDelegate( fh_context c ); + + virtual void createStateLessAttributes( bool force = false ); + public: + + ChainedViewContext( const fh_context& ctx, + bool setupEventConnections = true ); + ChainedViewContext( const fh_context& ctx, + const std::string& rdn, + bool setupEventConnections = true ); + + + ChainedViewContext( const fh_context& parent, + const fh_context& delegate, + bool setupEventConnections = true, + bool callSetContextWithDelegateRdn = true ); + ChainedViewContext( const fh_context& parent, + const fh_context& delegate, + const std::string& rdn, + bool setupEventConnections = true ); + virtual ~ChainedViewContext(); + + virtual bool getIsNativeContext() const; + + /** + * Mainly used in testing. apps shouldn't have to worry about it. + */ + fh_context getDelegate(); + + /** + * Adjust reference counting and record that this is the root of a + * chainedView tree. Made public so that factory methods can use it. + */ + void setIsChainedViewContextRoot(); + + /** + * Setup event slots on this object so that the base context signals us when it changes. + * by default we conncet to 'Delegate' or the user can supply the context to monitor + * so that ManyBaseToOneViewContext subclasses can connect on many contexts + * + * Most of the OnWhatever methods are connected in this method. + */ + void SetupEventConnections( fh_context c = 0 ); + + /** + * Ensure that SetupEventConnections() has been called if it hasn't already + * for this context. + */ + void ensureEventConnections(); + + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnChanged( NamingEvent_Changed* ev, + std::string olddn, std::string newdn ); + + void OnStartReading( NamingEvent_Start_Reading_Context* ); + void OnStopReading ( NamingEvent_Stop_Reading_Context* ); + + + /////////////////////////////////////////////////////////////////////////////// + // + // Delegating Attribute Methods. + // + /////////////////////////////////////////////////////////////////////////////// + public: + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_istream getLocalIStream( std::string& new_dn, ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + virtual fh_iostream getIOStream( ferris_ios::openmode m = std::ios::in|std::ios::out ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual Parent_t getParent() throw (FerrisParentNotSetError); + virtual bool isParentBound(); + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + virtual std::string getURL(); + + virtual stringset_t& getForceLocalAttributeNames(); + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + + virtual ref_count_t AddRef(); + virtual ref_count_t Release(); + virtual bool all_attributes_have_single_ref_count(); + + /////////////////////////////////////////////////////////////////////////////// + // + // Delegating Context Methods. + // + /////////////////////////////////////////////////////////////////////////////// + public: + + virtual fh_attribute createAttribute( const std::string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported, + AttributeAlreadyInUse ); + + virtual fh_attribute acquireAttribute( const std::string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported ); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual fh_context + createSubContext( const std::string& rdn, fh_mdcontext md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual fh_context + getRelativeContext( const std::string& xdn, RootContextFactory* f = 0 ) + throw( NoSuchSubContext ); + +// virtual SubContextNames_t getSubContextNames(); +// virtual fh_context getSubContext( const std::string& rdn ) throw( NoSuchSubContext ); +// bool isSubContextBound( const std::string& rdn ); + + virtual void read( bool force = 0 ); + virtual long guessSize() throw(); + + virtual void dumpOutItems(); + + protected: + + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + + + private: + virtual bool supportsReClaim(); + static fh_stringstream SL_getDelegateURLStream( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getDelegatePathStream( Context* gc, const std::string& rdn, EA_Atom* atom ); + + }; + FERRIS_SMARTPTR( ChainedViewContext, fh_cvc ); +}; +#endif diff --git a/Ferris/ChildStreamServer.cpp b/Ferris/ChildStreamServer.cpp new file mode 100644 index 0000000..aea1968 --- /dev/null +++ b/Ferris/ChildStreamServer.cpp @@ -0,0 +1,274 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fcat + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ChildStreamServer.cpp,v 1.5 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "ChildStreamServer.hh" + +#include +#include +#include +#include + +using namespace std; + +/* + * Maintain one single timer and demux to each ChildStreamServer from there + * maintain the list of ChildStreamServers in the ctor and dtor of ChildStreamServer + * + */ +namespace Ferris +{ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef list< ChildStreamServer* > childServers_t; + childServers_t childServers; + + + static gint childWatcher_cb( gpointer ) + { +// cerr << "libferris:childWatcher_cb" << endl; + + int status = 0; + int options = WNOHANG; + +// struct rusage rusage; +// pid_t pid = wait3( &status, options, &rusage ); + + pid_t pid = waitpid( -1, &status, options ); + + if( pid == 0 ) + { + // WNOHANG and no children ready + } + if( pid < 0 ) + { + // error + } + else + { + // valid child has died + for( childServers_t::iterator iter = childServers.begin(); + iter != childServers.end(); ++iter ) + { + (*iter)->childHasDied( pid, status ); + } + } + + return 1; + } + + + guint ChildStreamServer::s_childWatcherID = 0; + guint32 ChildStreamServer::s_childWatcherInterval = 100; + + ChildStreamServer::ChildStreamServer() + { + if( !s_childWatcherID ) + { +// s_childWatcherID = g_timeout_add( s_childWatcherInterval, +// GSourceFunc(::Ferris::childWatcher_cb), +// 0 ); + + GSource* src = g_timeout_source_new( s_childWatcherInterval ); + g_source_set_callback( src, + GSourceFunc(::Ferris::childWatcher_cb), + 0, + 0 ); + s_childWatcherID = g_source_attach( src, 0 ); + g_source_set_can_recurse( src, false ); + + } + childServers.push_back( this ); + } + + ChildStreamServer::~ChildStreamServer() + { + LG_EAIDX_D << "~ChildStreamServer()" << endl; + + childServers.remove( this ); + if( childServers.empty() ) + { + g_source_remove( s_childWatcherID ); + s_childWatcherID = 0; + } + } + + + void + ChildStreamServer::addChild( fh_runner r ) + { + r->setSpawnFlags( + GSpawnFlags( + r->getSpawnFlags() | G_SPAWN_DO_NOT_REAP_CHILD )); + m_children.push_back( r ); + } + + gint + ChildStreamServer::childHasDied( pid_t pid, int status ) + { +// int status = 0; +// int options = WNOHANG; + +// pid_t pid = waitpid( -1, &status, options ); + +// // struct rusage rusage; +// // pid_t pid = wait3( &status, options, &rusage ); + +// if( pid == 0 ) +// { +// // WNOHANG and no children ready +// } +// if( pid < 0 ) +// { +// // error +// } +// else +// { + // valid child has died + for( children_t::iterator iter = m_children.begin(); + iter != m_children.end(); ++iter ) + { + fh_runner r = *iter; + + if( r->getChildProcessID() == pid ) + { + fh_childserv serv = this; + +// cerr << "m_ChildDiedFunctors.sz:" << m_ChildDiedFunctors.size() << endl; + + // signal the user that a child has died + // copy the functor list in case the user wants to change it + // from a callback + typedef ChildDiedFunctors_t::iterator I; + ChildDiedFunctors_t lcp = m_ChildDiedFunctors; + for( I fi = lcp.begin(); fi != lcp.end(); ++fi ) + { + (*fi)( serv, r, status ); + } + + r->setExitStatus( status ); + + int estatus = WEXITSTATUS( status ); + getChildCompleteSig().emit( this, r, status, estatus ); + + // + // Reap the child. + // + int status = 0; + int options = 0; + pid_t rc = waitpid( pid, &status, options ); + } + } +// } + + return 1; // call again + } + + ChildStreamServer::ChildCompleteSig_t& + ChildStreamServer::getChildCompleteSig() + { + return ChildCompleteSig; + } + + + + void + ChildStreamServer::addDiedFunctor( ChildDiedFunctor_t f ) + { + m_ChildDiedFunctors.push_back( f ); + } + + void + ChildStreamServer::removeDiedFunctor( ChildDiedFunctor_t f ) + { + } + + void + ChildStreamServer::clearDiedFunctors() + { + m_ChildDiedFunctors.clear(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +// ChildWatcher::ChildWatcher() +// : +// m_childComplete( false ), +// m_childWasCanceled( false ), +// m_childExitStatus( -1 ) +// { +// } + +// void +// ChildWatcher::child_complete( fh_childserv serv, fh_runner r, int status ) +// { +// if( WIFEXITED( status ) ) +// { +// int s = WEXITSTATUS( status ); +// if( s != 0 ) +// m_childWasCanceled = true; +// m_childExitStatus = s; +// } + +// cerr << "ChildWatcher::child_complete() " << endl; +// m_childComplete = true; + +// // /* +// // * Make sure that all async IO calls have been accepted. +// // */ +// // Main::processAllPendingEvents(); +// serv->removeDiedFunctor( +// ChildStreamServer::ChildDiedFunctor_t( +// this, &ChildWatcher::child_complete )); + +// getChildCompleteSig().emit( this, r, status, m_childExitStatus, m_childWasCanceled ); +// } + +// void +// ChildWatcher::attach( fh_childserv serv ) +// { +// serv->addDiedFunctor( +// ChildStreamServer::ChildDiedFunctor_t( +// this, &ChildWatcher::child_complete )); +// } + +// ChildWatcher::ChildCompleteSig_t& +// ChildWatcher::getChildCompleteSig() +// { +// return ChildCompleteSig; +// } + + + +}; diff --git a/Ferris/ChildStreamServer.hh b/Ferris/ChildStreamServer.hh new file mode 100644 index 0000000..0ac6474 --- /dev/null +++ b/Ferris/ChildStreamServer.hh @@ -0,0 +1,119 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ChildStreamServer.hh,v 1.4 2010/09/24 21:30:25 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CHILD_STREAM_SERV_H_ +#define _ALREADY_INCLUDED_FERRIS_CHILD_STREAM_SERV_H_ + +#include + +#include +#include + +#include +#include + +#include + +namespace Ferris +{ + class ChildStreamServer; + FERRIS_SMARTPTR( ChildStreamServer, fh_childserv ); + + class FERRISEXP_API ChildStreamServer + : + public Handlable + { + typedef std::list< fh_runner > children_t; + children_t m_children; + + static guint s_childWatcherID; + static guint32 s_childWatcherInterval; + + public: + + ChildStreamServer(); + ~ChildStreamServer(); + + void addChild( fh_runner r ); + + typedef sigc::signal4< void, ChildStreamServer*, fh_runner, int, int > ChildCompleteSig_t; + ChildCompleteSig_t& getChildCompleteSig(); + + typedef Loki::Functor< void, + LOKI_TYPELIST_3( fh_childserv, + fh_runner, + int /* exit status */ ) > ChildDiedFunctor_t; + typedef std::list< ChildDiedFunctor_t > ChildDiedFunctors_t; + ChildDiedFunctors_t m_ChildDiedFunctors; + void addDiedFunctor( ChildDiedFunctor_t f ); + void removeDiedFunctor( ChildDiedFunctor_t f ); + void clearDiedFunctors(); + + + // private + gint childHasDied( pid_t pid, int status ); + + private: + ChildCompleteSig_t ChildCompleteSig; + }; + + /****************************************/ + /****************************************/ + /****************************************/ + +// class ChildWatcher; +// FERRIS_SMARTPTR( ChildWatcher, fh_childwatcher ); + +// class ChildWatcher +// : +// public Handlable +// { +// public: + +// ChildWatcher(); +// void attach( fh_childserv serv ); + +// typedef sigc::signal5< void, ChildWatcher*, fh_runner, int, int, bool > ChildCompleteSig_t; +// ChildCompleteSig_t& getChildCompleteSig(); + +// private: + +// bool m_childComplete; +// bool m_childWasCanceled; +// int m_childExitStatus; + +// void child_complete( fh_childserv serv, fh_runner r, int status ); + +// ChildCompleteSig_t ChildCompleteSig; +// }; + +}; + +#endif diff --git a/Ferris/Chmod.cpp b/Ferris/Chmod.cpp new file mode 100644 index 0000000..7fee0bc --- /dev/null +++ b/Ferris/Chmod.cpp @@ -0,0 +1,506 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Chmod.cpp,v 1.3 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * Based on modechange.c from fileutils 4.1 which is GPL and + * Written by David MacKenzie + * + * + * + */ +#include "Ferris.hh" +#include "Chmod.hh" + +#include +#include +#include + +using namespace std; + +/* Masks for mode_compile argument. */ +# define MODE_MASK_EQUALS 1 +# define MODE_MASK_PLUS 2 +# define MODE_MASK_MINUS 4 +# define MODE_MASK_ALL (MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS) + +/* The traditional octal values corresponding to each mode bit. */ +#define SUID 04000 +#define SGID 02000 +#define SVTX 01000 +#define RUSR 00400 +#define WUSR 00200 +#define XUSR 00100 +#define RGRP 00040 +#define WGRP 00020 +#define XGRP 00010 +#define ROTH 00004 +#define WOTH 00002 +#define XOTH 00001 +#define ALLM 07777 /* all octal mode bits */ + + +/* All the mode bits that can be affected by chmod. */ +#define CHMOD_MODE_BITS \ + (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) + +// anything that MakeInitializationMode() should support in octal +#define MakeInitializationMode_ALLPERMS ALLPERMS // perhaps change to ? 0177777 + +namespace Ferris +{ + + ChmodOperation::ChmodOperation() + : + mode( 0 ), + XifAnyX( false ), + CopyExisting( false ), + AffectedBits( CHMOD_MODE_BITS ) + { + } + + void ChmodOperation::setMode( mode_t v ) + { + mode = v; + } + + void ChmodOperation::setModeXifAnyX( bool v ) + { + XifAnyX = v; + } + + void ChmodOperation::setCopyExisting( bool v ) + { + CopyExisting = v; + } + + void ChmodOperation::setAffectedBits( long v ) + { + AffectedBits = v; + } + + + mode_t + ChmodOperation::calcMode( mode_t existingmode, mode_t chained ) + { + mode_t value = 0; + + chained = chained & CHMOD_MODE_BITS; + + if( CopyExisting ) + { + /* Isolate in `value' the bits in `chained' to copy, given in + the mask `mode'. */ + value = chained & mode; + + if ( mode & S_IRWXU ) + /* Copy `u' permissions onto `g' and `o'. */ + value |= ((value & S_IRUSR ? S_IRGRP | S_IROTH : 0) + | (value & S_IWUSR ? S_IWGRP | S_IROTH : 0) + | (value & S_IXUSR ? S_IXGRP | S_IXOTH : 0)); + else if ( mode & S_IRWXG ) + /* Copy `g' permissions onto `u' and `o'. */ + value |= ((value & S_IRGRP ? S_IRUSR | S_IROTH : 0) + | (value & S_IWGRP ? S_IWUSR | S_IROTH : 0) + | (value & S_IXGRP ? S_IXUSR | S_IXOTH : 0)); + else + /* Copy `o' permissions onto `u' and `g'. */ + value |= ((value & S_IROTH ? S_IRUSR | S_IRGRP : 0) + | (value & S_IWOTH ? S_IWUSR | S_IRGRP : 0) + | (value & S_IXOTH ? S_IXUSR | S_IXGRP : 0)); + + /* In order to change only `u', `g', or `o' permissions, + or some combination thereof, clear unselected bits. + This cannot be done in mode_compile because the value + to which the `changes->affected' mask is applied depends + on the old mode of each file. */ + value &= AffectedBits; + + } + else + { + value = mode; + /* If `X', do not affect the execute bits if the file is not a + directory and no execute bits are already set. */ + if ( XifAnyX + && !S_ISDIR (existingmode) + && (chained & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0) + /* Clear the execute bits. */ + value &= ~ (S_IXUSR | S_IXGRP | S_IXOTH); + } + return value; + } + + + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL ChmodOperationEquals : public ChmodOperation + { + ChmodOperationEquals( mode_t v = 0 ) + { + mode = v; + } + + virtual mode_t apply( mode_t existing, mode_t chained ) + { + mode_t value = calcMode( existing, chained ); + return (chained & ~AffectedBits) | value; + } + }; + + struct FERRISEXP_DLLLOCAL ChmodOperationPlus : public ChmodOperation + { + ChmodOperationPlus( mode_t v = 0 ) + { + mode = v; + } + + virtual mode_t apply( mode_t existing, mode_t chained ) + { + mode_t value = calcMode( existing, chained ); + return chained |= value; + } + }; + + struct FERRISEXP_DLLLOCAL ChmodOperationMinus : public ChmodOperation + { + ChmodOperationMinus( mode_t v = 0 ) + { + mode = v; + } + + virtual mode_t apply( mode_t existing, mode_t chained ) + { + mode_t value = calcMode( existing, chained ); + return chained &= ~value; + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Chmod::~Chmod() + { + for( operations_t::iterator iter = operations.begin(); iter != operations.end(); ) + { + ChmodOperation* op = *iter; + ++iter; + delete op; + } + } + + mode_t + Chmod::operator()( mode_t m ) + { + mode_t chained = m; + + for( operations_t::iterator iter = operations.begin(); + iter != operations.end(); ++iter ) + { + chained = (*iter)->apply( m, chained ); + } + + return chained; + } + + mode_t + Chmod::getInitializationMode() + { + return operator()( 0 ); + } + + void + Chmod::append( ChmodOperation* o ) + { + operations.push_back( o ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Parse ugoa part and move string along to after all effected bits chars + */ + static mode_t parseAffectedBitsString( fh_iostream& ss ) + { + mode_t ret = 0; + char c; + + while( ss >> c ) + { +// cerr << " parseAffectedBitsString() c:" << c << endl; + switch( c ) + { + case ',': + break; + case 'u': + ret |= S_ISUID | S_IRWXU; + break; + case 'g': + ret |= S_ISGID | S_IRWXG; + break; + case 'o': + ret |= S_ISVTX | S_IRWXO; + break; + case 'a': + ret |= CHMOD_MODE_BITS; + break; + default: + ss.unget(); + return ret; + } + } + return ret; + } + + + static ChmodOperation* makeOp( char opcode, mode_t v ) + { + switch( opcode ) + { + case '=': return( new ChmodOperationEquals( v ) ); + case '+': return( new ChmodOperationPlus( v ) ); + case '-': return( new ChmodOperationMinus( v ) ); + } + } + + namespace Factory + { + /** + * Parse a ugoa+-rwx style string or a string with 644 octal + * to a compiled object that can perform the described actions. + */ + fh_chmod MakeChmod( const std::string& s, long masked_ops ) + { + fh_chmod ret = new Chmod(); + +// cerr << "MakeChmod() s:" << s << " isNumber:" << isNumber( s ) << endl; + + /* + * Test for plain octal first + */ + if( isNumber( s ) ) + { +// long octal_value = toType( s ); + long octal_value = 0; + { + fh_stringstream ss; + ss << s; + ss >> oct >> octal_value; + } + + octal_value &= (~S_IFMT); + + if( octal_value != (octal_value & MakeInitializationMode_ALLPERMS )) + { + fh_stringstream ss; + ss << "Invalid octal mode string given:" << s + << " contains bits outside of valid range valid range:" + << oct << MakeInitializationMode_ALLPERMS << dec << endl; + Throw_InvalidModeString( tostr(ss), 0 ); + } + + /* Help the compiler optimize the usual case where mode_t uses + the traditional octal representation. */ + mode_t mode = 0; + mode = ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX + && S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR + && S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP + && S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH) + ? octal_value + : ((octal_value & SUID ? S_ISUID : 0) + | (octal_value & SGID ? S_ISGID : 0) + | (octal_value & SVTX ? S_ISVTX : 0) + | (octal_value & RUSR ? S_IRUSR : 0) + | (octal_value & WUSR ? S_IWUSR : 0) + | (octal_value & XUSR ? S_IXUSR : 0) + | (octal_value & RGRP ? S_IRGRP : 0) + | (octal_value & WGRP ? S_IWGRP : 0) + | (octal_value & XGRP ? S_IXGRP : 0) + | (octal_value & ROTH ? S_IROTH : 0) + | (octal_value & WOTH ? S_IWOTH : 0) + | (octal_value & XOTH ? S_IXOTH : 0))); + + ret->append( new ChmodOperationEquals( mode ) ); +// cerr << "MakeChmod() s:" << s << " isNumber:" << isNumber( s ) +// << " octal_value:" << oct << octal_value << dec +// << " mode:" << mode +// << " u+rwx:" << (S_IRWXU) +// << " ug+rwx:" << (S_IRWXU|S_IRWXG) +// << endl; + + return ret; + } + + /* + * Must be of the form "ugoa...=+-rwxXstugo...[=+-rwxXstugo...]". + */ + mode_t umask_value = umask (0); + umask (umask_value); /* Restore the old value. */ + + fh_stringstream ss; + ss << s; + + while( ss.good() ) + { + + /* Operators to actually use umask on. */ + long ops_to_mask = 0; + + mode_t affectedBitmask = parseAffectedBitsString( ss ); + bool userSpecifiedUGOABits = affectedBitmask > 0; + if( !affectedBitmask ) + { + cerr << "invalid affectedBitmask, setting to default" << endl; + affectedBitmask = CHMOD_MODE_BITS; + ops_to_mask = masked_ops; + } + + + set< char > opcodes; + opcodes.insert( '=' ); + opcodes.insert( '+' ); + opcodes.insert( '-' ); + + char opcode = 0; + if( ss >> opcode && opcodes.count( opcode ) ) + { + /* Per the Single Unix Spec, if `who' is not specified and the + `=' operator is used, then clear all the bits first. */ + if (!userSpecifiedUGOABits && + ops_to_mask & (opcode == '=' ? MODE_MASK_EQUALS : 0)) + { + ret->append( new ChmodOperationEquals( 0 ) ); + } + + if (ops_to_mask & ( opcode == '=' ? MODE_MASK_EQUALS + : opcode == '+' ? MODE_MASK_PLUS + : MODE_MASK_MINUS)) + affectedBitmask &= ~umask_value; + + mode_t value = 0; + +// cerr << "MakeChmod()" +// << " opcode:" << opcode +// << " affectedBitmask:" << affectedBitmask +// << endl; + + char ch = 0; + bool gettingValues = true; + while( gettingValues && ss >> ch ) + { + ChmodOperation* op = 0; + + switch( ch ) + { + case 'r': + op = makeOp( opcode, + ((S_IRUSR | S_IRGRP | S_IROTH) & affectedBitmask)); + break; + case 'w': + op = makeOp( opcode, + ((S_IWUSR | S_IWGRP | S_IWOTH) & affectedBitmask)); + break; + case 'x': + op = makeOp( opcode, + ((S_IXUSR | S_IXGRP | S_IXOTH) & affectedBitmask)); + break; + + case 'X': + op = makeOp( + opcode, ((S_IXUSR | S_IXGRP | S_IXOTH) & affectedBitmask)); + op->setModeXifAnyX( true ); + break; + + case 's': + /* Set the setuid/gid bits if `u' or `g' is selected. */ + op = makeOp( opcode, + (S_ISUID | S_ISGID) & affectedBitmask); + break; + case 't': + /* Set the "save text image" bit if `o' is selected. */ + op = makeOp( opcode, + S_ISVTX & affectedBitmask ); + break; + case 'u': + /* Set the affected bits to the value of the `u' bits + on the same file. */ + op = makeOp( opcode, S_IRWXU ); + op->setCopyExisting( true ); + break; + case 'g': + /* Set the affected bits to the value of the `g' bits + on the same file. */ + op = makeOp( opcode, S_IRWXG ); + op->setCopyExisting( true ); + break; + case 'o': + /* Set the affected bits to the value of the `o' bits + on the same file. */ + op = makeOp( opcode, S_IRWXO ); + op->setCopyExisting( true ); + break; + default: + gettingValues = false; + } + + if( op ) + { + op->setAffectedBits( affectedBitmask ); + ret->append( op ); + } + } + if( ss.good() && ch != ',' ) + { + fh_stringstream ss; + ss << "Invalid octal mode string given:" << s + << " Read specifier opcode values but more data follows instead of comma" + << endl; + Throw_InvalidModeString( tostr(ss), 0 ); + } + } + } + } + + mode_t MakeInitializationMode( const std::string& s, long masked_ops ) + { + fh_chmod c = MakeChmod( s, masked_ops ); + mode_t ret = c->getInitializationMode(); + +// cerr << "MakeInitializationMode() s:" << s +// << " ret.oct:" << oct << ret << dec << endl; + + return ret; + } + + + }; +}; diff --git a/Ferris/Chmod.hh b/Ferris/Chmod.hh new file mode 100644 index 0000000..e949d9b --- /dev/null +++ b/Ferris/Chmod.hh @@ -0,0 +1,119 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Chmod.hh,v 1.2 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_CHMOD_H__ +#define __GTK_FERRIS_CHMOD_H__ + +#include +#include + +#include + +namespace Ferris +{ + class Chmod; + FERRIS_SMARTPTR( Chmod, fh_chmod ); + + namespace Factory + { + /** + * Make a compiled object that can transform the mode of a context as + * described by the given string + */ + FERRISEXP_API fh_chmod MakeChmod( const std::string& s, long masked_ops = 0 ); + + /** + * Make a mode_t that can be used to set the initial mode of a context to + * the mode closest to that described by the given string + */ + FERRISEXP_API mode_t MakeInitializationMode( const std::string& s, long masked_ops = 0 ); + }; + + struct FERRISEXP_DLLLOCAL ChmodOperation + { + mode_t mode; + bool XifAnyX; + bool CopyExisting; + long AffectedBits; + + void setMode( mode_t v ); + void setModeXifAnyX( bool v ); + void setCopyExisting( bool v ); + void setAffectedBits( long v ); + ChmodOperation(); + + /** + * Used by children classes to get the mode_t to affect the + * current object. + */ + mode_t calcMode( mode_t existingmode, mode_t chained ); + + + + /** + * These operations can be chained together to perform the work + * described in a string given to Factory::MakeChmod(). If a reference + * mode string is given then that is passed as 'existing' and the return + * value from one call is fed in as 'chained' to the next. + * + * The first call in the chain existing==chained. + */ + virtual mode_t apply( mode_t existing, mode_t chained ) = 0; + }; + + + class FERRISEXP_API Chmod + : + public Handlable + { + friend fh_chmod Factory::MakeChmod( const std::string& s, long ); + + typedef std::list< ChmodOperation* > operations_t; + operations_t operations; + + void append( ChmodOperation* o ); + + public: + + virtual ~Chmod(); + mode_t operator()( mode_t m ); + inline mode_t apply( mode_t m ) { return this->operator()( m ); } + + /** + * Get the mode_t that will set a new file/dir to the mode closest to + * that given by the mode string + */ + mode_t getInitializationMode(); + }; + + +}; + +#endif diff --git a/Ferris/ClipAPI.cpp b/Ferris/ClipAPI.cpp new file mode 100644 index 0000000..b00f447 --- /dev/null +++ b/Ferris/ClipAPI.cpp @@ -0,0 +1,611 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ClipAPI.cpp,v 1.7 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "Shell.hh" +#include "General.hh" + +#include + +using namespace std; + +namespace Ferris +{ + using namespace Cursor; + + string contexts_ea_name = "contexts"; + string action_ea_name = "action"; + string pasted_ea_name = "pasted"; + string mime_history_ea_prefix = "mime-history-"; + string cmds_sloth_ea_name = "commands-use-sloth"; + string cmds_autoclose_ea_name = "commands-use-auto-close"; + string cmds_extraoptions_ea_name = "commands-use-extra-options"; + + int MimeHistorySize = 20; + + static bool useXWin( fh_context clip ) + { + bool ret = true; + if( !g_getenv("DISPLAY" ) || !strlen(g_getenv("DISPLAY" ))) + { + ret = false; + } + LG_FCLIP_D << "useXWin() ret:" << ret << endl; + return ret; + } + + static void ensureEAExists( fh_context clip, const std::string& eaname ) + { + if( !clip->isAttributeBound( eaname ) ) + { + Shell::createEA( clip, eaname, "" ); + } + } + + static void clearClip( fh_context clip ) + { + setStrAttr( clip, contexts_ea_name, "", true ); + setStrAttr( clip, pasted_ea_name, "0", true ); + } + + static void setAction( fh_context clip, const std::string& newAction = "none" ) + { + string oldAction = getStrAttr( clip, action_ea_name, "none" ); +// cerr << "--- setAction() oldAction:" << oldAction +// << " newAction:" << newAction << endl; + + ensureEAExists( clip, contexts_ea_name ); + + if( "1" == getStrAttr( clip, pasted_ea_name, "1" )) + { + clearClip( clip ); + } + +// if( oldAction != "none" && oldAction != newAction ) +// { +// if( newAction == "copy" || newAction == "cut" ) +// { +// cerr << "---Trunc for new operation" << endl; +// // fh_iostream ioss = clip->getIOStream( ios::trunc ); +// setStrAttr( clip, contexts_ea_name, "" ); +// } +// } + +// cerr << "--- Setting action attribute to:" << newAction +// << " clip:" << clip->getURL() +// << " eaname:" << action_ea_name +// << endl; + setStrAttr( clip, action_ea_name, newAction, true ); +// cerr << "--- Read back action:"; +// cerr << getStrAttr( clip, action_ea_name, "" ) << endl; + } + + static void appendContext( fh_context clip, fh_context c ) + { +// cerr << "---Append context c:" << c->getURL() << endl; +// fh_iostream ioss = clip->getIOStream( ios::ate ); + ensureEAExists( clip, contexts_ea_name ); + fh_attribute a = clip->getAttribute( contexts_ea_name ); + { + fh_iostream ioss = a->getIOStream( ios::ate ); +// cerr << " -- tellp: " << ioss->tellp() << endl; + ioss << c->getURL() << endl; + } + { + fh_istream iss = a->getIStream(); +// cerr << "---Read back:" << StreamToString(iss) << endl; + } + } + + + static void exe_sync( fh_context fclip, const std::string& cmd_const ) + { + std::string cmd = cmd_const; + + if( !useXWin( fclip ) ) + { + string p; + + LG_FCLIP_D << "exe_sync not using xwin. initial cmd:" << cmd << endl; + + p = "gfcp"; + if( starts_with( cmd, p ) ) + { + cmd = "ferriscp " + cmd.substr( p.length()+1 ); + } + p = "gfmv"; + if( starts_with( cmd, p ) ) + { + cmd = "ferrismv " + cmd.substr( p.length()+1 ); + } + p = "gfrm"; + if( starts_with( cmd, p ) ) + { + cmd = "ferrisrm " + cmd.substr( p.length()+1 ); + } + + LG_FCLIP_D << "exe_sync not using xwin. final cmd:" << cmd << endl; + } + + fh_runner r = new Runner(); + r->setCommandLine( cmd ); + r->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_STDOUT_TO_DEV_NULL | + r->getSpawnFlags())); +// cerr << "WOULD BE running:" << r->getDescription() << endl; + r->Run(); +// r->getExitStatus(); + } + + namespace Factory + { + fh_context getFileClipboard( std::string s ) + { + if( !s.length() ) + { + s = "primary"; + } + + fh_stringstream ss; + ss << "file-clipboard://" << s; + LG_FCLIP_D << "Getting context at ss:" << tostr(ss) << endl; + try + { + fh_context ret = Resolve( tostr(ss) ); + LG_FCLIP_D << "Resolved file clipboard at url:" << ret->getURL() << endl; + return ret; + } + catch( NoSuchSubContext& e ) + { +// cerr << "Clipbard does not exist! creating..." +// << " s:" << s << endl; + LG_FCLIP_D << "Clipbard does not exist! creating..." + << " s:" << s << endl; + + fh_context parent = Resolve( tostr(ss), RESOLVE_PARENT ); + fh_context newc = Shell::CreateDir( parent, s ); + { +// cerr << "---Trunc new clipboard" << endl; +// fh_iostream ioss = newc->getIOStream( ios::trunc ); + setStrAttr( newc, contexts_ea_name, "", true ); + } +// cerr << "newc:" << newc->getURL() << endl; +// fh_context ret = Resolve( tostr(ss) ); + fh_context ret = Resolve( "~/.ferris/file-clipboard.db/primary" ); + + LG_FCLIP_D << "Resolved file clipboard at url:" << ret->getURL() << endl; + return ret; + } + catch( ... ) + { + throw; + } + } + }; + namespace FileClip + { + void Clear( fh_context clip ) + { + setAction( clip, "none" ); + clearClip( clip ); + } + + void Cut( fh_context clip, fh_context c ) + { + LG_FCLIP_D << "cut operation clip:" << clip->getURL() + << " c:" << c->getURL() << endl; + setAction( clip, "cut" ); + appendContext( clip, c ); + } + + void Copy( fh_context clip, fh_context c ) + { + LG_FCLIP_D << "copy operation clip:" << clip->getURL() + << " c:" << c->getURL() << endl; + setAction( clip, "copy" ); + appendContext( clip, c ); + } + + void Link( fh_context clip, fh_context c ) + { + LG_FCLIP_D << "link operation clip:" << clip->getURL() + << " c:" << c->getURL() << endl; + setAction( clip, "link" ); + appendContext( clip, c ); + } + + static string createMimeHistoryEAName( const std::string& action, + const std::string& mimetype ) + { + fh_stringstream ss; + ss << mime_history_ea_prefix << action << "-" + << Util::replace_all( mimetype, '/', '-' ); + return tostr(ss); + } + + + static void addToClipMimeHistory( fh_context clip, + fh_context dst, + string action, + string url ) + { + try + { + fh_context child = Resolve( url ); + string mimetype = getMimeName( child ); + + /* + * Prepend the destination URL for this mimetype, and truncate + * to MimeHistorySize in the EA at the same time. + */ + if( mimetype.length() ) + { + string s; + string eaname = createMimeHistoryEAName( action, mimetype ); + +// cerr << "addToClipMimeHistory() " +// << " clip:" << clip->getURL() +// << " action:" << action +// << " url:" << url +// << " dst:" << dst->getURL() +// << " eaname:" << eaname +// << endl; + + ensureEAExists( clip, eaname ); + fh_attribute a = clip->getAttribute( eaname ); + { + fh_iostream ioss = a->getIOStream(); + + list strlist; + for( int i=0; getline( ioss, s ) && i < MimeHistorySize; i++) + { + strlist.push_back(s); + } + + ioss.clear(); + ioss.seekp(0); + ioss << dst->getURL() << endl; + copy( strlist.begin(), strlist.end(), ostream_iterator(ioss, "\n") ); + ioss << flush; + } + +// cerr << "addToClipMimeHistory(2) " +// << " clip:" << clip->getURL() +// << " action:" << action +// << " url:" << url +// << " dst:" << dst->getURL() +// << " eaname:" << eaname +// << " newv:" << getStrAttr( clip, eaname, "", true ) +// << endl; + + } + } + catch(...) + {} + + } + + void setUseSloth( fh_context clip, bool v ) + { + setStrAttr( clip, cmds_sloth_ea_name, tostr(v), true ); + } + + void setUseAutoClose( fh_context clip, bool v ) + { + setStrAttr( clip, cmds_autoclose_ea_name, tostr(v), true ); + } + + static string getClipBoardCommandOptions( fh_context clip ) + { + fh_stringstream ss; + if( isTrue( getStrAttr( clip, cmds_sloth_ea_name, "" ))) + ss << " --sloth "; + if( isTrue( getStrAttr( clip, cmds_autoclose_ea_name, "" ))) + ss << " --auto-close "; + ss << " " << getStrAttr( clip, cmds_extraoptions_ea_name, "" ) << " "; + return tostr(ss); + } + + + + void Paste( fh_context clip, fh_context dst ) + { + LG_FCLIP_D << "paste operation clip:" << clip->getURL() + << " dst:" << dst->getURL() << endl; + + + string action = getStrAttr( clip, action_ea_name, "none" ); + if( action == "none" ) + { + fh_stringstream ss; + ss << "Paste requested when no previous cut or copy operation performed"; + Throw_FileClipboard( tostr(ss), GetImpl(clip) ); + } + + fh_istream iss = clip->getAttribute( contexts_ea_name )->getIStream(); + string s; + + typedef list< string > urllist_t; + urllist_t urllist; + while( getline( iss, s ) ) + { + urllist.push_back( s ); + LG_FCLIP_D << "adding object to paste, url:" << s << endl; + } + + if( urllist.empty() ) + { + fh_stringstream ss; + ss << "No files to paste"; + Throw_FileClipboard( tostr(ss), GetImpl(clip) ); + } + + string redocmd = "gfcp -av "; + string undocmd = "gfrm -rv "; + string redo = ""; + string undo = ""; + string dsturl = dst->getURL(); + + /* + * Remember where each context was moved/copyied based on its mime + * type and the operation performed + */ + for( urllist_t::iterator iter = urllist.begin(); + iter != urllist.end(); ++iter ) + { + addToClipMimeHistory( clip, dst, action, *iter ); + } + + + if( action == "copy" ) + { + // action: gfcp all src to dst; + // undo : gfrm dst/rdn(src) + + redocmd = "gfcp -av "; + undocmd = "gfrm -rv "; + + /* Make undo command */ + fh_stringstream undoss; + undoss << undocmd << getClipBoardCommandOptions( clip ); + for( urllist_t::iterator iter = urllist.begin(); + iter != urllist.end(); ++iter ) + { + fh_context src = Resolve( *iter ); + undoss << " " << Shell::quote( dsturl + "\\/" + src->getDirName() ) << " "; + } + undo = tostr( undoss ); + } + else if( action == "cut" ) + { + // action: gfmv all src to dst + // undo : gfmv dst/rdn(src) base(src); gfmv dst/rdn(src) base(src); ... + + redocmd = "gfmv -av "; + undocmd = "gfmv -av "; + + /* Make undo command */ + fh_stringstream undoss; + for( urllist_t::iterator iter = urllist.begin(); + iter != urllist.end(); ++iter ) + { + string srcurl = *iter; + + undoss << undocmd << getClipBoardCommandOptions( clip ); + int slashloc = srcurl.rfind( "/" ); + if( string::npos != slashloc ) + { + string rdn = srcurl.substr( slashloc+1 ); + string base = srcurl.substr( 0, slashloc ); + + undoss << Shell::quote( dsturl + "\\/" + rdn ) + << " " << Shell::quote( base ) << endl; + } + } + undo = StreamToString( undoss ); +// cerr << "+++ undo:" << undo << endl; + } + else if( action == "link" ) + { + // action: gfcp -s all src to dst; + // undo : gfrm dst/rdn(src) + + redocmd = "gfcp -sv "; + undocmd = "gfrm -rv "; + + /* Make undo command */ + fh_stringstream undoss; + undoss << undocmd << getClipBoardCommandOptions( clip ); + for( urllist_t::iterator iter = urllist.begin(); + iter != urllist.end(); ++iter ) + { + fh_context src = Resolve( *iter ); + undoss << " " << Shell::quote( dsturl + "\\/" + src->getDirName() ) << " "; + } + undo = tostr( undoss ); + } + else + { + fh_stringstream ss; + ss << "Paste requested when no previous cut or copy operation performed"; + Throw_FileClipboard( tostr(ss), GetImpl(clip) ); + } + + /* Make redo command */ + fh_stringstream redoss; + redoss << redocmd << getClipBoardCommandOptions( clip ); +// copy( urllist.begin(), urllist.end(), ostream_iterator(redoss, " ") ); + for( urllist_t::iterator iter = urllist.begin(); + iter != urllist.end(); ++iter ) + { + redoss << " " << Shell::quote( *iter ) << " "; + } + redoss << " " << Shell::quote( dsturl ) << " "; + redo = tostr( redoss ); + + fh_context cursor = Factory::getCursor( clip ); + fh_context entry = cursorNext( cursor ); + +// cerr << "CURSOR :" << cursor->getURL() << endl; +// cerr << "NEW ENTRY :" << entry->getURL() << endl; + setStrAttr( entry, "redo", redo, true ); + setStrAttr( entry, "undo", undo, true ); + LG_FCLIP_D << "redo command:" << redo << endl; + LG_FCLIP_D << "undo command:" << undo << endl; + + setStrAttr( clip, pasted_ea_name, "1", true ); + if( action == "cut" ) + { + LG_FCLIP_D << "cut operation, clearing clipboard contents..." << endl; + clearClip( clip ); + } + +// cerr << "WOULD BE EXECUTING redo:" << redo << endl; +// cerr << "Paste command:" << redo << endl; + LG_FCLIP_D << "performing operation:" << redo << endl; + exe_sync( clip, redo ); + } + + void Undo( fh_context cursor ) + { + fh_istream iss = cursor->getAttribute("undo")->getIStream(); + string s; + Util::SingleShot virgin; + + while( getline( iss, s ) ) + { + exe_sync( cursor->getParent(), s ); + virgin(); + } + if( virgin.value() ) + { + fh_stringstream ss; + ss << "No undo command recorded for file-clipboard:" + << cursor->getParent()->getURL() + << " for object:" << cursor->getURL(); + Throw_FileClipboard( tostr(ss), GetImpl(cursor) ); + } + + +// string undo = getStrAttr( cursor, "undo", "" ); +// if( !undo.length() ) +// { +// fh_stringstream ss; +// ss << "No undo command recorded for file-clipboard:" +// << cursor->getParent()->getURL() +// << " for object:" << cursor->getURL(); +// Throw_FileClipboard( tostr(ss), GetImpl(cursor) ); +// } +// exe_sync( undo ); + } + + void Redo( fh_context cursor ) + { + string redo = getStrAttr( cursor, "redo", "" ); + if( !redo.length() ) + { + fh_stringstream ss; + ss << "No redo command recorded for file-clipboard:" + << cursor->getParent()->getURL() + << " for object:" << cursor->getURL(); + Throw_FileClipboard( tostr(ss), GetImpl(cursor) ); + } + exe_sync( cursor->getParent(), redo ); + } + + /** + * Get a list of URLs that files with the same mimetype as 'c' had + * the given action performed on them before. + * + * ie. If .avi files were moved to 10 places in the past, then we return + * (in crono order) the list of those 10 places + * + * Duplicate URLs are pruned out + */ + stringlist_t getMimeHistory( fh_context clip, + fh_context c, + std::string action ) + { + stringlist_t ret; + + if( !action.length() ) + { + stringlist_t cpl = getMimeHistory( clip, c, "cut" ); + stringlist_t mvl = getMimeHistory( clip, c, "copy" ); + copy( cpl.begin(), cpl.end(), back_inserter(mvl)); + return mvl; + } + + try + { + + string mimetype = getMimeName( c ); + if( mimetype.length() ) + { + string s; + string eaname = createMimeHistoryEAName( action, mimetype ); +// cerr << "getMimeHistory() " +// << " clip:" << clip->getURL() +// << " c:" << c->getURL() +// << " action:" << action +// << " eaname:" << eaname +// << " value:" << getStrAttr( clip, eaname, "", true ) +// << endl; + + fh_attribute a = clip->getAttribute( eaname ); + fh_istream iss = a->getIStream(); + while( getline( iss, s ) ) + { +// cerr << "getMimeHistory() s:" << s << endl; + if( ret.end() == find( ret.begin(), ret.end(), s )) + ret.push_back(s); + } + } + } + catch( exception& e ) + { + cerr << "getMimeHistory() e:" << e.what() << endl; + } + catch(...) + {} + return ret; + } + + + }; +}; + diff --git a/Ferris/ClipAPI.hh b/Ferris/ClipAPI.hh new file mode 100644 index 0000000..4044d3a --- /dev/null +++ b/Ferris/ClipAPI.hh @@ -0,0 +1,66 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ClipAPI.hh,v 1.2 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CLIP_API_H_ +#define _ALREADY_INCLUDED_FERRIS_CLIP_API_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace Factory + { + FERRISEXP_API fh_context getFileClipboard( std::string s = "" ); + }; + namespace FileClip + { + FERRISEXP_API void Clear( fh_context clip ); + FERRISEXP_API void Cut( fh_context clip, fh_context c ); + FERRISEXP_API void Copy( fh_context clip, fh_context c ); + FERRISEXP_API void Link( fh_context clip, fh_context c ); + FERRISEXP_API void Paste( fh_context clip, fh_context dst ); + + FERRISEXP_API void Undo( fh_context cursor ); + FERRISEXP_API void Redo( fh_context cursor ); + + FERRISEXP_API stringlist_t getMimeHistory( fh_context clip, fh_context c, + std::string action = "" ); + + /* + * Setting options regarding the paste command that is executed. + */ + FERRISEXP_API void setUseSloth( fh_context clip, bool v ); + FERRISEXP_API void setUseAutoClose( fh_context clip, bool v ); + }; +}; + +#endif diff --git a/Ferris/Configuration.cpp b/Ferris/Configuration.cpp new file mode 100644 index 0000000..f1cfd0e --- /dev/null +++ b/Ferris/Configuration.cpp @@ -0,0 +1,603 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Configuration.cpp,v 1.19 2010/11/17 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +#ifdef HAVE_EDB +#include +#endif + + +namespace Ferris +{ + using namespace std; + using namespace ::STLdb4; + + std::string GET_FDB_GENERAL() + { + return "/.ferris/general.db"; + } + + const std::string FDB_GENERAL = GET_FDB_GENERAL();//"/.ferris/general.db"; + const std::string FDB_FERRISDEV = "/.ferris/general.db"; + char const FDB_LOGGING[] = "/.ferris/logging.db"; + const std::string FDB_SECURE = "/.ferris/secure.db"; + const std::string FDB_CACHE = "/.ferris/cache.db"; + const std::string CREATEHISTORY_RELATIVE = "/.ferris/cache.db/create-history"; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + string get_db4_string( fh_database db, + const string& k, + const string& def, + bool throw_for_errors ) + { + if( !db ) + { + if( !throw_for_errors ) + return def; + fh_stringstream ss; + ss << "get_db4_string() invalid database handle given." + << " k:" << k + << " def:" << def + << endl; + Throw_Db4Exception( tostr(ss), 0, 0 ); + } + + try + { + string payload; + db->get( k, payload ); +// cerr << "get_db4_string k:" << k << " ret.l:" << payload.length() << endl; + return payload; + } + catch( exception& e ) + { + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "Can not get data for db4 key:" << k + << " e:" << e.what(); + Throw_Db4KeyNotFound( tostr(ss), 0 ); + } + return def; + } + return def; + +// try +// { +// Dbt key( (void*)k.data(), k.length() ); +// Dbt data( 0, 0 ); +// int rc = db->get( 0, &key, &data, 0 ); + +// if( 0 != rc ) +// { +// if( throw_for_errors ) +// { +// fh_stringstream ss; +// ss << "Can not get data for db4 key:" << k +// << " data not found"; +// Throw_Db4KeyNotFound( tostr(ss), 0 ); +// } +// return def; +// } + +// if( data.get_size() ) +// { +// stringstream ss; +// ss.write( (const char*)data.get_data(), data.get_size() ); +// string ret = tostr(ss); +// return ret; +// } + +// } +// catch( DbException& e ) +// { +// if( throw_for_errors ) +// { +// fh_stringstream ss; +// ss << "Can not get data for db4 key:" << k; +// Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); +// } +// } +// return def; + } + + + string get_db4_string( const string& filename, + const string& k, + const string& def, + bool throw_for_errors, + bool read_only ) + { + try + { +// fh_database db = new Database( CleanupURL(filename) ); + + fh_database db = new Database( CleanupURL(filename), "", read_only ); + +// u_int32_t flags = 0; +// if( read_only ) flags |= DB_RDONLY; +// else flags |= DB_CREATE; + +// fh_database db = new Database( DB_UNKNOWN, CleanupURL(filename), "", flags ); + + + string ret = get_db4_string( db, k, def, throw_for_errors ); + return ret; + } + catch( dbException& e ) + { + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "Can not get data for db4 key:" << k + << " for file:" << filename + << " e:" << e.what(); + Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); + } + } + return def; + } + + string get_db4_string( const string& filename, + const string& k, + const string& def, + bool throw_for_errors ) + { + return get_db4_string( filename, k, def, throw_for_errors, false ); + } + + + static fh_database getCachedDb4( const string& edbname_relhome, + string filename, + const string& k, + bool throw_for_errors, + const string& opname ) + { + /* ~/ files are assumed to be config files and should thus be cached. */ + typedef map< string, fh_database > DotFileCache_t; +// static DotFileCache_t dotCache; + typedef Loki::SingletonHolder< DotFileCache_t, + Loki::CreateUsingNew, Loki::NoDestroy > dotCache; + + DotFileCache_t::iterator iter = dotCache::Instance().find( edbname_relhome ); + if( iter == dotCache::Instance().end() ) + { + fh_database db = 0; + try + { + db = new Database( filename ); +// db->set_cachesize( 0, 128*1024, 1 ); + } + catch( dbException& e ) + { + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "Can not " << opname << " data for db4 key:" << k + << " for file:" << filename; + Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); + } + return 0; + } + + iter = dotCache::Instance().insert( make_pair( edbname_relhome, db ) ).first; + } + return iter->second; + + + +// Db* db = 0; +// try +// { +// db = new Db( 0, 0 ); +// db->open( filename.c_str(), 0, DB_UNKNOWN, 0, 0 ); +// } +// catch( DbException& e ) +// { +// // cerr << "Can not " << opname << " data for db4 key:" << k +// // << " for file:" << filename +// // << " reason:" << e.what() +// // << endl; + +// if( throw_for_errors ) +// { +// fh_stringstream ss; +// ss << "Can not " << opname << " data for db4 key:" << k +// << " for file:" << filename; +// Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); +// } +// return 0; +// } + +// iter = dotCache.insert( make_pair( edbname_relhome, db ) ).first; +// } + +// // cerr << "getCachedDb4() rel:" << edbname_relhome +// // << " fn:" << filename +// // << " db:" << (void*)iter->second +// // << endl; + +// return iter->second; + } + + + /** + * Note that as this function is called from the logging code, it can not use any + * LG_XXX_D logging because it might create a cyclic loop. + * + */ + string getEDBString( const string& edbname_relhome, + const string& k, + const string& def, + bool isEdbName_RelativeToHome, + bool throw_for_errors ) + { + /* Dont cache non local files */ + if( !isEdbName_RelativeToHome ) + { + return get_db4_string( edbname_relhome, k, def, throw_for_errors ); + } + + string filename = Shell::getHomeDirPath_nochecks()+edbname_relhome; + fh_database db = getCachedDb4( edbname_relhome, filename, k, throw_for_errors, "get" ); + if( db ) + { + return get_db4_string( db, k, def, throw_for_errors ); + } + + return def; + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + void set_db4_string( fh_database db, + const string& k, + const string& v, + bool throw_for_errors ) + { + if( !db ) + { + if( !throw_for_errors ) + return; + fh_stringstream ss; + ss << "set_db4_string() invalid database handle given." + << " k:" << k + << " v:" << v + << endl; + Throw_Db4Exception( tostr(ss), 0, 0 ); + } + + + try + { + db->set( k, v ); + db->sync(); + } + catch( dbException& e ) + { + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "Can not get data for db4 key:" << k; + Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); + } + } + return; + +// try +// { +// Dbt key ( (void*)k.data(), k.length() ); +// Dbt data( (void*)v.data(), v.length() ); +// db->put( 0, &key, &data, 0 ); +// db->sync( 0 ); +// // cerr << "set_db4_string k:" << k << " v:" << v << ":" << endl; +// } +// catch( DbException& e ) +// { +// if( throw_for_errors ) +// { +// fh_stringstream ss; +// ss << "Can not get data for db4 key:" << k; +// Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); +// } +// } +// return; + } + + void set_db4_string( const string& filename, + const string& k, + const string& v, + bool throw_for_errors ) + { + fh_database db = 0; + try + { + db = new Database( CleanupURL(filename) ); + set_db4_string( db, k, v, throw_for_errors ); + } + catch( dbException& e ) + { + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "Can not set data for db4 key:" << k + << " for file:" << filename; + Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); + } + } + return; + +// Db db( 0, 0 ); +// try +// { +// db.open( CleanupURL(filename).c_str(), 0, DB_UNKNOWN, 0, 0 ); +// set_db4_string( &db, k, v, throw_for_errors ); +// db.close(0); +// } +// catch( DbException& e ) +// { +// db.close(0); +// if( throw_for_errors ) +// { +// fh_stringstream ss; +// ss << "Can not set data for db4 key:" << k +// << " for file:" << filename; +// Throw_Db4Exception( tostr(ss), 0, e.get_errno() ); +// } +// } +// return; + } + + + void setEDBString( const string& edbname_relhome, + const string& k, + const string& v, + bool isEdbName_RelativeToHome, + bool throw_for_errors ) + { + string filename = edbname_relhome; + if( isEdbName_RelativeToHome ) + { + filename = Shell::getHomeDirPath_nochecks()+edbname_relhome; + } + +// cerr << "setEDBString(A) k:" << k << " v:" << v << endl; + + /* Dont cache non local files */ + if( !isEdbName_RelativeToHome ) + { + return set_db4_string( filename, k, v, throw_for_errors ); + } + + fh_database db = getCachedDb4( edbname_relhome, filename, k, throw_for_errors, "set" ); + if( db ) + set_db4_string( db, k, v, throw_for_errors ); + } + + static STLdb4::fh_database + ensureFerrisConfigFileExists_sub( const std::string& parentPath, + const std::string& dbName_maybeWithPrefixSlashes, + const std::string& rdn ) + { + STLdb4::fh_database ret = 0; + + fh_context c = ::Ferris::Shell::acquireContext( parentPath ); + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "db4", "" ); + child->setChild( "name", rdn ); + fh_context newc = c->createSubContext( "", md ); + ret = new Database( newc->getURL() ); + return ret; + } + + STLdb4::fh_database + ensureFerrisConfigFileExists( const std::string& parentPath, + const std::string& dbName_maybeWithPrefixSlashes ) + { + STLdb4::fh_database ret = 0; + + string rdn = dbName_maybeWithPrefixSlashes; + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + rdn = trimmer( rdn ); + + try + { +// cerr << "ensureFerrisConfigFileExists() pp:" << parentPath +// << " rdn:" << rdn +// << endl; + string fullpath = parentPath + "/" + rdn; + fh_context cfg = Shell::acquireContext( parentPath ); + ret = new Database(); + ret->create( DB_HASH, fullpath ); + ret->set( "foo", "bar" ); + ret->sync(); +// cerr << "ensureFerrisConfigFileExists() pp:" << parentPath +// << " rdn:" << rdn +// << " returning1" +// << endl; + return ret; + } + catch( NoSuchSubContext& e ) + { +// cerr << "ensureFerrisConfigFileExists() pp:" << parentPath +// << " rdn:" << rdn +// << " e:" << e.what() +// << endl; + return ensureFerrisConfigFileExists_sub( parentPath, + dbName_maybeWithPrefixSlashes, + rdn ); + } + catch( dbNonExist& e ) + { +// cerr << "ensureFerrisConfigFileExists() pp:" << parentPath +// << " rdn:" << rdn +// << " e:" << e.what() +// << endl; + return ensureFerrisConfigFileExists_sub( parentPath, + dbName_maybeWithPrefixSlashes, + rdn ); + } + catch( dbOldVersionException& e ) + { +// cerr << "ensureFerrisConfigFileExists() pp:" << parentPath +// << " rdn:" << rdn +// << " e:" << e.what() +// << endl; + string temprdn = rdn + "-oldformat.db"; + +// cerr << "Old berkeley database file found at:" +// << " path:" << parentPath +// << " filename:" << rdn << endl +// << "Please db_upgrade this file. For now it will be renamed to:" +// << temprdn << endl; + rename( rdn.c_str(), temprdn.c_str() ); + + return ensureFerrisConfigFileExists_sub( parentPath, + dbName_maybeWithPrefixSlashes, + rdn ); + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + const char* COPY_INPUT_IN_MMAP_MODE_BY_DEFAULT = "copy-input-in-mmap-mode-by-default"; + const char* COPY_INPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN = "copy-input-in-mmap-mode-for-objects-larger-than"; + const char* COPY_OUTPUT_IN_MMAP_MODE_BY_DEFAULT = "copy-output-in-mmap-mode-by-default"; + const char* COPY_OUTPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN = "copy-output-in-mmap-mode-for-objects-larger-than"; + const char* USE_SENDFILE_IF_POSSIBLE = "use-sendfile-if-possible"; + const char* SENDFILE_CHUNK_SIZE = "sendfile-chunk-size"; + + + const char* CFG_ATTRIBUTES_TO_AUTO_REA_K = "cfg-attributes-to-auto-rea-k"; + const char* CFG_ATTRIBUTES_TO_AUTO_REA_DEFAULT = ""; + + const char* CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_K = "cfg-attributes-always-in-ui-model-k"; + const char* CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_DEFAULT = "width,height"; + + const char* COPY_USES_DIRECTIO_BY_DEFAULT = "copy-uses-directio-by-default"; + const char* COPY_USES_DIRECTIO_FOR_OBJECTS_LARGER_THAN = "copy-uses-directio-for-objects-larger-than"; + + const char* SHOW_LOGGING_POPT_OPTIONS_BY_DEFAULT = "show-logging-popt-options-by-default"; + const char* LOGGING_TO_FILENAME_KEY = "log-to-filename"; + + const char* CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_K = "cfg-attributes-gnu-diff-files"; + const char* CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_DEFAULT = "diff -NuarbB "; + + const char* CFG_FORCE_PASSIVE_VIEW_K = "cfg-force-passive-view"; + const char* CFG_FORCE_PASSIVE_VIEW_DEFAULT = ""; + + + const char* CFG_XSLTFS_STYLESHEET_PATH_K = "cfg-xsltfs-stylesheet-path"; + const char* CFG_XSLTFS_STYLESHEET_PATH_DEFAULT = "~/.ferris/xsltfs-stylesheets/"; + + const char* CFG_GLOB_SKIP_REGEX_LIST_K = "cfg-glob-skip-regex-list"; + const char* CFG_GLOB_SKIP_REGEX_LIST_DEFAULT = ""; + + const char* CFG_GLOB_SKIP_FILE_URLS_K = "cfg-glob-skip-file-urls"; + const char* CFG_GLOB_SKIP_FILE_URLS_DEFAULT = "0"; + + const char* CFG_PRECALCULATE_FOR_COPY_K = "cfg-precalculate-for-copy"; + const char* CFG_PRECALCULATE_FOR_COPY_DEFAULT = "1"; + + const char* CFG_RDFCACHE_ATTRS_LIST_K = "cfg-rdfcache-attrs-list-k"; + const char* CFG_RDFCACHE_ATTRS_LIST_DEFAULT = "" + "width,height,depth-per-color,depth,gamma,has-alpha,aspect-ratio," + "rpm-package,rpm-version,rpm-release," + "has-valid-signature,md5,mimetype-from-content,artist,title,album,genre,discid,track,date,cddb," + "subtitles," + ; + + const char* CFG_RDFCACHE_ATTRS_ENABLED_K = "cfg-rdfcache-attrs-enabled-k"; + const char* CFG_RDFCACHE_ATTRS_ENABLED_DEFAULT = "1"; + + const char* CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_K = "cfg-rdf-global-smush-group-leader-k"; + const char* CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_DEFAULT = ""; + + const char* CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K = "cfg-lowest-emblem-pri-to-show-in-ui"; + const char* CFG_LOWEST_EMBLEM_PRI_TO_SHOW_DEFAULT = "-1"; + + const char* CFG_THUMBNAILS_MAX_DESIRED_WIDTH_OR_HEIGHT_K = "cfg-thumbnails-max-desired-width-or-height"; + const char* CFG_THUMBNAILS_MAX_DESIRED_WIDTH_OR_HEIGHT_DEFAULT = "128"; + const char* CFG_THUMBNAILS_JPEG_IMG_QUALITY_K = "cfg-thumbnails-jpeg-img-quality"; + const char* CFG_THUMBNAILS_JPEG_IMG_QUALITY_DEFAULT = "80"; + + const std::string CFG_CDROM_SIZE_BYTES_K = "cfg-cdrom-size-bytes"; + const std::string CFG_CDROM_SIZE_BYTES_DEFAULT = "734003200"; // 700 Mb + const std::string CFG_CDROM_SIZE_BYTES_EA_POSTFIX = "-cdrom-count"; + const std::string CFG_DVD_SIZE_BYTES_K = "cfg-dvd-size-bytes"; + const std::string CFG_DVD_SIZE_BYTES_DEFAULT = "4590208000"; // 4590208 KB (kb==1000) + const std::string CFG_DVD_SIZE_BYTES_EA_POSTFIX = "-dvd-count"; + + const char* FERRIS_LUCENE_METADATA_DBNAME = "ferris-metadata.db"; + + const char* CFG_ALLOWS_KERNEL_EA_REGEX = "allows-kernel-ea-regex"; + const char* CFG_ALLOWS_KERNEL_EA_REGEX_DEFAULT = "^file://.*"; + + + const char* CFG_WEBPHOTOS_TOKEN_K = "webphotos-token"; + const char* CFG_WEBPHOTOS_TOKEN_DEFAULT = ""; + + const char* CFG_WEBPHOTOS_DEFAULT_USERNAME_KEY = "webphotos-default-username"; + const char* CFG_WEBPHOTOS_DEFAULT_USERNAME_DEFAULT = ""; + + const char* CFG_WEBPHOTOS_USERNAME_K = "webphotos-username"; + const char* CFG_WEBPHOTOS_USERNAME_DEF = ""; + const char* CFG_WEBPHOTOS_FULLNAME_K = "webphotos-fullname"; + const char* CFG_WEBPHOTOS_FULLNAME_DEF = ""; + + const char* CFG_WEBPHOTOS_LARGEST_DIM_K = "webphotos-largest-dimension"; + const char* CFG_WEBPHOTOS_LARGEST_DIM_DEF = "0"; + + const char* CFG_WEBPHOTOS_INCLUDE_EA_IS_PRESENT_REGEX_K = "webphotos-include-ea-is-present-regex"; + const char* CFG_WEBPHOTOS_INCLUDE_EA_AND_VALUE_REGEX_K = "webphotos-include-ea-and-value-regex"; + + const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_PUBLIC_K = "webphotos-default-protection-public"; + const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_FRIEND_K = "webphotos-default-protection-friend"; + const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_FAMILY_K = "webphotos-default-protection-family"; + + + const char* CFG_FSPOT_POSITIVE_OVERLAY_REGEX_K = "fspot-positive-overlay-regex"; + const char* CFG_FSPOT_POSITIVE_OVERLAY_REGEX_DEF = ""; + + const char* CFG_STRIGI_POSITIVE_OVERLAY_REGEX_K = "strigi-positive-overlay-regex"; + const char* CFG_STRIGI_POSITIVE_OVERLAY_REGEX_DEF = "^file:.*"; + +}; diff --git a/Ferris/Configuration.hh b/Ferris/Configuration.hh new file mode 100644 index 0000000..a4bd328 --- /dev/null +++ b/Ferris/Configuration.hh @@ -0,0 +1,168 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Configuration.hh,v 1.13 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONFIGURATION_H_ +#define _ALREADY_INCLUDED_FERRIS_CONFIGURATION_H_ + +#include +#include + +namespace Ferris +{ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + FERRISEXP_API std::string getEDBString( const std::string& edbname_relhome, + const std::string& k, + const std::string& def, + bool isEdbName_RelativeToHome = true, + bool throw_for_errors = false ); + + FERRISEXP_API void setEDBString( const std::string& edbname_relhome, + const std::string& k, + const std::string& v, + bool isEdbName_RelativeToHome = true, + bool throw_for_errors = false ); + + + + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + FERRISEXP_API extern std::string GET_FDB_GENERAL(); + FERRISEXP_API extern const std::string FDB_GENERAL; + FERRISEXP_API extern const std::string FDB_FERRISDEV; + + FERRISEXP_API extern const char* COPY_INPUT_IN_MMAP_MODE_BY_DEFAULT; + FERRISEXP_API extern const char* COPY_INPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN; + FERRISEXP_API extern const char* COPY_OUTPUT_IN_MMAP_MODE_BY_DEFAULT; + FERRISEXP_API extern const char* COPY_OUTPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN; + FERRISEXP_API extern const char* USE_SENDFILE_IF_POSSIBLE; + FERRISEXP_API extern const char* SENDFILE_CHUNK_SIZE; + + FERRISEXP_API extern const char* CFG_ATTRIBUTES_TO_AUTO_REA_K; + FERRISEXP_API extern const char* CFG_ATTRIBUTES_TO_AUTO_REA_DEFAULT; + + FERRISEXP_API extern const char* CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_K; + FERRISEXP_API extern const char* CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_DEFAULT; + + FERRISEXP_API extern const char* COPY_USES_DIRECTIO_BY_DEFAULT; + FERRISEXP_API extern const char* COPY_USES_DIRECTIO_FOR_OBJECTS_LARGER_THAN; + + FERRISEXP_API extern const char* SHOW_LOGGING_POPT_OPTIONS_BY_DEFAULT; + FERRISEXP_API extern const char* LOGGING_TO_FILENAME_KEY; + + FERRISEXP_API extern const char* CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_K; + FERRISEXP_API extern const char* CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_DEFAULT; + + FERRISEXP_API extern const char* CFG_FORCE_PASSIVE_VIEW_K; + FERRISEXP_API extern const char* CFG_FORCE_PASSIVE_VIEW_DEFAULT; + + FERRISEXP_API extern const char* CFG_XSLTFS_STYLESHEET_PATH_K; + FERRISEXP_API extern const char* CFG_XSLTFS_STYLESHEET_PATH_DEFAULT; + + + FERRISEXP_API extern const char* CFG_GLOB_SKIP_REGEX_LIST_K; + FERRISEXP_API extern const char* CFG_GLOB_SKIP_REGEX_LIST_DEFAULT; + + FERRISEXP_API extern const char* CFG_GLOB_SKIP_FILE_URLS_K; + FERRISEXP_API extern const char* CFG_GLOB_SKIP_FILE_URLS_DEFAULT; + + FERRISEXP_API extern const char* CFG_PRECALCULATE_FOR_COPY_K; + FERRISEXP_API extern const char* CFG_PRECALCULATE_FOR_COPY_DEFAULT; + + FERRISEXP_API extern const char* CFG_RDFCACHE_ATTRS_LIST_K; + FERRISEXP_API extern const char* CFG_RDFCACHE_ATTRS_LIST_DEFAULT; + + FERRISEXP_API extern const char* CFG_RDFCACHE_ATTRS_ENABLED_K; + FERRISEXP_API extern const char* CFG_RDFCACHE_ATTRS_ENABLED_DEFAULT; + + FERRISEXP_API extern const char* CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_K; + FERRISEXP_API extern const char* CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_DEFAULT; + + FERRISEXP_API extern const char* CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K; + FERRISEXP_API extern const char* CFG_LOWEST_EMBLEM_PRI_TO_SHOW_DEFAULT; + + FERRISEXP_API extern const char* CFG_THUMBNAILS_MAX_DESIRED_WIDTH_OR_HEIGHT_K; + FERRISEXP_API extern const char* CFG_THUMBNAILS_MAX_DESIRED_WIDTH_OR_HEIGHT_DEFAULT; + FERRISEXP_API extern const char* CFG_THUMBNAILS_JPEG_IMG_QUALITY_K; + FERRISEXP_API extern const char* CFG_THUMBNAILS_JPEG_IMG_QUALITY_DEFAULT; + + + FERRISEXP_API extern const std::string CFG_CDROM_SIZE_BYTES_K; + FERRISEXP_API extern const std::string CFG_CDROM_SIZE_BYTES_DEFAULT; + FERRISEXP_API extern const std::string CFG_CDROM_SIZE_BYTES_EA_POSTFIX; + FERRISEXP_API extern const std::string CFG_DVD_SIZE_BYTES_K; + FERRISEXP_API extern const std::string CFG_DVD_SIZE_BYTES_DEFAULT; + FERRISEXP_API extern const std::string CFG_DVD_SIZE_BYTES_EA_POSTFIX; + + FERRISEXP_API extern const char* FERRIS_LUCENE_METADATA_DBNAME; + + + FERRISEXP_API extern const char* CFG_ALLOWS_KERNEL_EA_REGEX; + FERRISEXP_API extern const char* CFG_ALLOWS_KERNEL_EA_REGEX_DEFAULT; + + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_TOKEN_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_TOKEN_DEFAULT; + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_DEFAULT_USERNAME_KEY; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_DEFAULT_USERNAME_DEFAULT; + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_USERNAME_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_USERNAME_DEF; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_FULLNAME_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_FULLNAME_DEF; + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_LARGEST_DIM_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_LARGEST_DIM_DEF; + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_INCLUDE_EA_IS_PRESENT_REGEX_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_INCLUDE_EA_AND_VALUE_REGEX_K; + + FERRISEXP_API extern const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_PUBLIC_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_FRIEND_K; + FERRISEXP_API extern const char* CFG_WEBPHOTOS_DEFAULT_PROTECTION_FAMILY_K; + + + + + FERRISEXP_API extern const char* CFG_FSPOT_POSITIVE_OVERLAY_REGEX_K; + FERRISEXP_API extern const char* CFG_FSPOT_POSITIVE_OVERLAY_REGEX_DEF; + + FERRISEXP_API extern const char* CFG_STRIGI_POSITIVE_OVERLAY_REGEX_K; + FERRISEXP_API extern const char* CFG_STRIGI_POSITIVE_OVERLAY_REGEX_DEF; + + +}; +#endif diff --git a/Ferris/Configuration_private.hh b/Ferris/Configuration_private.hh new file mode 100644 index 0000000..fb6835b --- /dev/null +++ b/Ferris/Configuration_private.hh @@ -0,0 +1,95 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Configuration_private.hh,v 1.4 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONFIGURATION_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_CONFIGURATION_PRIVATE_H_ + +#include + +#include +// #ifdef FERRIS_HAVE_DB4 +// #include +// #endif + + +namespace Ferris +{ + /* Private use only */ + + FERRISEXP_API extern char const FDB_LOGGING[]; + FERRISEXP_API extern const std::string FDB_SECURE; + FERRISEXP_API extern const std::string FDB_CACHE; + FERRISEXP_API extern const std::string CREATEHISTORY_RELATIVE; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + FERRISEXP_API std::string get_db4_string( STLdb4::fh_database db, + const std::string& k, + const std::string& def = "", + bool throw_for_errors = true ); + FERRISEXP_API std::string get_db4_string( const std::string& filename, + const std::string& k, + const std::string& def = "", + bool throw_for_errors = true ); + FERRISEXP_API std::string get_db4_string( const std::string& filename, + const std::string& k, + const std::string& def, + bool throw_for_errors, + bool read_only ); + + + FERRISEXP_API void set_db4_string( STLdb4::fh_database db, + const std::string& k, + const std::string& v, + bool throw_for_errors = true ); + FERRISEXP_API void set_db4_string( const std::string& filename, + const std::string& k, + const std::string& v, + bool throw_for_errors = true ); + + /** + * Make sure that the db4 file 'dbName' exists in the directory + * parentPath. The dir parentPath is created if it doesn't already + * exist and the db4 file is created if it doesn't already exist. + * + * @param parentPath parent dir of new config file + * @param dbName_maybeWithPrefixSlashes The rdn of the config file, + * any leading '/' chars are first stripped. + * @return The opened db file for config settings with set_db4_string() etc. + */ + FERRISEXP_API + STLdb4::fh_database + ensureFerrisConfigFileExists( const std::string& parentPath, + const std::string& dbName_maybeWithPrefixSlashes ); + +}; +#endif diff --git a/Ferris/Context.cpp b/Ferris/Context.cpp new file mode 100644 index 0000000..46278b8 --- /dev/null +++ b/Ferris/Context.cpp @@ -0,0 +1,4578 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Context.cpp,v 1.26 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ForwardEAIndexInterface.hh" +#include "Trimming.hh" + +// Used in the union context for quick unions on filtered views +#include + +#include + +// stat() +#include +#include +#include + +using namespace std; + +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS +#define ITEMS_KEY_COMP( ITEMS ) ITEMS.key_comp() +#else +#define ITEMS_KEY_COMP( ITEMS ) ITEMS.get().key_comp() +#endif + + +namespace Ferris +{ +// FERRIS_SMARTPTR( SortedContext, fh_sortedContext ); + FERRIS_CTX_SMARTPTR( SortedContext, fh_sortedContext ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + /** + * Keep appending version numbers to rdn until the context 'c' + * can have a new item inserted with the rdn, return the changed + * rdn. + */ + string monsterName( const fh_context& c, const std::string& rdn ) + { + return c->monsterName( rdn ); + } + + mtimeNotChangedChecker::mtimeNotChangedChecker() + : + m_old( 0 ) + { + } + bool + mtimeNotChangedChecker::operator()( Context* c ) + { + if( !c->getIsNativeContext() ) + return false; + + struct stat buf; + int rc = stat( c->getDirPath().c_str(), &buf ); + if( rc != 0 ) + { + return false; + } + + time_t o = m_old; + time_t n = buf.st_mtime; + m_old = n; + + return o && o == n; + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + Context* + leafContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "leafContext::priv_CreateContext() Should never happen!" << endl; + Throw_FerrisCanNotCreateLeafOfLeaf( "", this ); + } + + void + leafContext::priv_read() + { + LG_CTX_D << "leafContext::priv_read() url:" << getURL() << endl; + emitExistsEventForEachItemRAII _raii1( this ); + } + + leafContext::leafContext() + : + Context() + { + } + + leafContext::leafContext( Context* parent, std::string rdn ) + : + Context( parent, rdn ) + { + } + + leafContext::~leafContext() + { + } + + +//////////////////////// + + + std::string + leafContextWithSimpleContent::priv_getRecommendedEA() + { + static string rea = "name,content"; + return rea; + } + + ferris_ios::openmode + leafContextWithSimpleContent::getSupportedOpenModes() + { + return + ios_base::in | + ios_base::out | + std::ios::trunc | + ios_base::binary ; + } + + + + + fh_istream + leafContextWithSimpleContent::priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ret; + if( !( m & std::ios::trunc ) ) + return real_getIOStream( m ); + return ret; + } + + + + +// void +// leafContextWithSimpleContent::OnStreamClosed( const std::string& s ) +// { +// } + + void + leafContextWithSimpleContent::priv_OnStreamClosed( + fh_istream& ss, std::streamsize tellp, ferris_ios::openmode m ) + { +// cerr << "priv_OnStreamClosed()" << endl; +// if( !(m & std::ios::out) ) +// return; + AdjustForOpenMode_Closing( ss, m, tellp ); + const string s = StreamToString(ss); + OnStreamClosed( s ); + } + + + + + fh_iostream + leafContextWithSimpleContent::priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + fh_stringstream ret; + if( !( m & std::ios::trunc ) ) + ret = real_getIOStream( m ); + ret->getCloseSig().connect( bind( sigc::mem_fun(*this, &_Self::priv_OnStreamClosed ), m )); +// cerr << "priv_getIOStream()" << endl; + return ret; + } + + + + + + leafContextWithSimpleContent::leafContextWithSimpleContent( + Context* parent, std::string rdn ) + : + leafContext( parent, rdn ) + { + } + + leafContextWithSimpleContent::~leafContextWithSimpleContent() + { + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +StaticContentLeafContext::StaticContentLeafContext( Context* parent, + std::string rdn, + const std::string& content ) + : + _Base( parent, rdn ), + m_content( content ) +{ + createStateLessAttributes(); + LG_CTX_D << "StaticContentLeafContext() rdn:" << rdn << endl + << "content:" << content << endl << endl; + +} + + StaticContentLeafContext::~StaticContentLeafContext() + { + } + + fh_istream + StaticContentLeafContext::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ret; + ret << m_content; + return ret; + } + + void + StaticContentLeafContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + FakeInternalContext* + FakeInternalContext::priv_CreateContext( Context* parent, string rdn ) + { + FakeInternalContext* ret = new FakeInternalContext( parent, rdn ); + return ret; + } + + + void + FakeInternalContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + FakeInternalContext::FakeInternalContext( Context* parent, const string& rdn ) + : + Context() + { +// if( parent ) +// cerr << "FakeInternalContext::FakeInternalContext() parent:" << parent->getURL() +// << " rdn:" << rdn +// << endl; + + setContext( parent, rdn ); + +// if( parent ) +// cerr << "FakeInternalContext::FakeInternalContext() parent:" << parent->getURL() +// << " dirName:" << getDirName() +// << endl; + } + + FakeInternalContext::FakeInternalContext() + : + Context() + { + } + + FakeInternalContext::~FakeInternalContext() + { + } + + fh_fcontext + FakeInternalContext::addNewChild( const string& rdn ) + { + return priv_CreateContext( this, rdn ); + } + + fh_context + FakeInternalContext::addNewChild( fh_context c ) + { + const bool created = false; + const bool emit = true; + Insert( GetImpl(c), created, emit ); + return c; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + CreateMetaDataContext::CreateMetaDataContext() + { + setContext( 0, "" ); + setAttributesHaveBeenCreated(); +// cerr << "CreateMetaDataContext()" << endl; + } + + + CreateMetaDataContext::~CreateMetaDataContext() + { +// cerr << "DTOR!!! CreateMetaDataContext()" << endl; + } + + + void + CreateMetaDataContext::setAttr( const std::string& rdn, const std::string& v ) + { + addAttribute( rdn, v, FXD_BINARY ); + } + + + void + CreateMetaDataContext::setBody( std::string s ) + { + Body = s; + } + + fh_istream + CreateMetaDataContext::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + fh_stringstream ss; + ss << Body; + ss->seekp(0); + RegisterStreamWithContextMemoryManagement( ss ); + return ss; + } + + + fh_mdcontext + CreateMetaDataContext::setChild( const std::string& rdn, const std::string& v ) + { + { + Items_t::iterator iter; + if( priv_isSubContextBound( rdn, iter ) ) + { + CreateMetaDataContext* child = dynamic_cast( GetImpl(*iter) ); + child->setBody( v ); + return child; + } + } + + CreateMetaDataContext* child = new CreateMetaDataContext(); + child->setContext( this, rdn ); + addNewChild( child ); + child->setBody( v ); + return child; + } + + bool + CreateMetaDataContext::supportsReClaim() + { + return true; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + DelegatingCreateMetaDataContext:: + DelegatingCreateMetaDataContext( const fh_context& _shadow ) + : + shadow( _shadow ) + { + setContext( shadow->getParent(), shadow->getDirName() ); + buildCoveringTree(); + } + + DelegatingCreateMetaDataContext::DelegatingCreateMetaDataContext( + DelegatingCreateMetaDataContext* parent, + const fh_context& _shadow + ) + : + shadow( _shadow ) + { + setContext( parent, shadow->getDirName() ); + } + + void + DelegatingCreateMetaDataContext::buildCoveringTree() + { + typedef Context::SubContextNames_t cnt; + cnt cn = shadow->getSubContextNames(); + for( cnt::iterator iter = cn.begin(); iter != cn.end(); ++iter ) + { + fh_context iterc = shadow->getSubContext( *iter ); + DelegatingCreateMetaDataContext* child; + child = new DelegatingCreateMetaDataContext( this, iterc ); + addNewChild( child ); + child->buildCoveringTree(); + } + } + + DelegatingCreateMetaDataContext::~DelegatingCreateMetaDataContext() + { + } + + + fh_istream + DelegatingCreateMetaDataContext::getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) + { + if( Body.length() ) + { + fh_stringstream ss; + ss << Body; + ss->seekp(0); + RegisterStreamWithContextMemoryManagement( ss ); + return ss; + } + return shadow->getIStream(); + } + + fh_attribute + DelegatingCreateMetaDataContext::getAttribute( const std::string& rdn ) throw( NoSuchAttribute ) + { + if( _Base::isAttributeBound( rdn ) ) + { + return _Base::getAttribute( rdn ); + } + + if( isBound( shadow ) ) + { + return shadow->getAttribute(rdn); + } + + return _Base::getAttribute(rdn); + } + + bool + DelegatingCreateMetaDataContext::isAttributeBound( + const std::string& rdn, + bool createIfNotThere ) + throw( NoSuchAttribute ) + { + if( isBound( shadow ) ) + { + return + shadow->isAttributeBound( rdn ) + || _Base::isAttributeBound( rdn ); + } + return _Base::isAttributeBound( rdn ); + } + + + + AttributeCollection::AttributeNames_t& + DelegatingCreateMetaDataContext::getAttributeNames( AttributeNames_t& ret ) + { + if( isBound(shadow) ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + _Base::getAttributeNames( t1 ); + shadow->getAttributeNames( t2 ); + return mergeAttributeNames( ret, t1, t2 ); + } + + return _Base::getAttributeNames( ret ); + } + + int + DelegatingCreateMetaDataContext::getAttributeCount() + { + AttributeNames_t tmp; + getAttributeNames( tmp ); + return tmp.size(); + } + + bool + DelegatingCreateMetaDataContext::supportsReClaim() + { + return true; + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + gint CachedContext_sweeper(gpointer data); + + class FERRISEXP_DLLLOCAL CachedContext : public ChainedViewContext + { + typedef CachedContext _Self; + typedef ChainedViewContext _Base; + + guint expungeInterval_ID; + guint32 expungeInterval; + static const char* const EXPUNGEINTERVAL_KEY; + static const int expungeInterval_default = 3000; // milli seconds + static const int expungeInterval_min = 500; // milli seconds + void setup() + { + expungeInterval_ID = 0; + createStateLessAttributes(); + Delegate->getNamingEvent_Changed_Sig().connect( sigc::mem_fun( *this, &_Self::OnChanged)); + + if( Delegate->supportsMonitoring() ) + expungeInterval = 0; + + if( expungeInterval > 0 ) + { + expungeInterval = min( expungeInterval_min, expungeInterval ); + expungeInterval_ID = g_timeout_add( + expungeInterval, + GSourceFunc(CachedContext_sweeper), + this ); + } + } + + + public: + + CachedContext( const fh_context& ctx, const std::string& extradata ) + : + ChainedViewContext( ctx ), + expungeInterval( expungeInterval_default ) + { + StringMap_t m = Util::ParseKeyValueString( extradata ); + if( m.end() != m.find( EXPUNGEINTERVAL_KEY ) ) + { + string s = m[EXPUNGEINTERVAL_KEY]; + expungeInterval = Time::ParseSimpleIntervalString( s ); + } + setup(); + } + + CachedContext( const fh_context& ctx, guint32 expungeInterval = 0 ) + : + ChainedViewContext( ctx ), + expungeInterval( expungeInterval ) + { + setup(); + } + + ~CachedContext() + { + if( expungeInterval_ID ) + { + g_source_remove( expungeInterval_ID ); + } + } + + void clearCaches() + { + IStreamCache.clear(); + IOStreamCache.clear(); + } + + void + createStateLessAttributes( bool force = false ) + { + static Util::SingleShot virgin; + if( virgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + void + priv_createAttributes() + { + _Base::priv_createAttributes(); + } + + + /************************************************************* + * + * Some attribute magic + * + *************************************************************/ +// typedef Loki::AssocVector< std::string, EA_Atom* > CacheAttributes_t; +// CacheAttributes_t CacheAttributes; + +// typedef Loki::AssocVector< std::string, fh_stringstream > StreamCache_t; + typedef std::map< std::string, fh_stringstream > StreamCache_t; + StreamCache_t IStreamCache; + StreamCache_t IOStreamCache; + + string toCachedAttrName( string s ) + { + return "cached-" + s; + } + + string fromCachedAttrName( string s ) + { + return s.substr( strlen("cached-") ); + } + + fh_istream GetIStream( Context* c, const std::string& _rdn, EA_Atom* atom ) + { + string rdn = fromCachedAttrName( _rdn ); + LG_CTX_D << "CacheContext::GetIStream for rdn:" << rdn + << " this:" << getURL() + << " delegate:" << Delegate->getURL() + << " c:" << c->getURL() + << endl; + + StreamCache_t* cache = &IStreamCache; + + /* Cache hit? */ + StreamCache_t::iterator iter = cache->find( rdn ); + if( cache->end() != iter ) + { + fh_stringstream ret; + fh_istream input = iter->second; + input.clear(); + input.seekg( 0 ); + copy( istreambuf_iterator(input), + istreambuf_iterator(), + ostreambuf_iterator(ret)); + LG_CTX_D << "CacheContext::GetIStream cache hit for rdn:" << rdn + << " data:" << tostr(ret) + << endl; + return ret; + } + + /* Create new cache and return copy */ + fh_attribute attr = Delegate->getAttribute( rdn ); + fh_istream delegatess = attr->getIStream(); + + fh_stringstream cachess; + copy( istreambuf_iterator(delegatess), + istreambuf_iterator(), + ostreambuf_iterator(cachess)); + cache->insert( make_pair( rdn, cachess ) ); + + LG_CTX_D << "CacheContext::GetIStream get new data for rdn:" << rdn + << " data:" << tostr(cachess) + << endl; + + + delegatess.clear(); + delegatess.seekg( 0 ); + + /* Just return the original to them */ + return delegatess; + } + + fh_iostream GetIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + StreamCache_t* cache = &IOStreamCache; + + /* Cache hit? */ + StreamCache_t::iterator iter = cache->find( rdn ); + if( cache->end() != iter ) + { + fh_stringstream ret; + copy( istreambuf_iterator(iter->second), + istreambuf_iterator(), + ostreambuf_iterator(ret)); + return ret; + } + + /* Create new cache and return copy */ + fh_attribute attr = Delegate->getAttribute( rdn ); + fh_iostream delegatess = attr->getIOStream(); + + fh_stringstream cachess; + copy( istreambuf_iterator(delegatess), + istreambuf_iterator(), + ostreambuf_iterator(cachess)); + cache->insert( make_pair( rdn, cachess ) ); + + /* Copy data so that we always have to do work in IOStreamClosed */ + fh_stringstream ret; + copy( istreambuf_iterator(delegatess), + istreambuf_iterator(), + ostreambuf_iterator(ret)); + return ret; + } + + void IOStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream iss ) + { + fh_attribute attr = Delegate->getAttribute( rdn ); + fh_iostream oss = attr->getIOStream(); + + copy( istreambuf_iterator(iss), + istreambuf_iterator(), + ostreambuf_iterator(oss)); + } + + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ) + { + return Delegate->isAttributeBound( rdn, createIfNotThere ); + } + + XSDBasic_t getUnderlyingEAType( const std::string& rdn ) + { + return getSchemaType( this, rdn, FXD_BINARY ); + } + + virtual std::string private_getStrAttr( const std::string& const_rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ) + { + if( !const_rdn.length() || const_rdn == "." || const_rdn == "content" ) + return _Base::private_getStrAttr( const_rdn, def, getAllLines, throwEx ); + + string rdn = toCachedAttrName( const_rdn ); + LG_CTX_D << "CacheContext::getAttribute rdn:" << rdn << endl; + + /* Try for cache hit */ + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + LG_CTX_D << "CacheContext::getAttribute cached for rdn:" << rdn << endl; + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + /* Create new caching EA, attach it, and return attribute */ + LG_CTX_D << "CacheContext::getAttribute create for rdn:" << rdn << endl; + addAttribute( rdn, + this, &_Self::GetIStream, + this, &_Self::GetIOStream, + this, &_Self::IOStreamClosed, + getUnderlyingEAType( const_rdn ), + 0 ); + + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + + + fh_attribute + getAttribute( const std::string& _rdn ) throw( NoSuchAttribute ) + { + std::string rdn = _rdn; + + if( !rdn.length() || rdn == "." ) + { + rdn = "content"; + } + if( rdn == "content" ) + { + return _Base::getAttribute( rdn ); + } + + string rawrdn = rdn; + rdn = toCachedAttrName( rdn ); + LG_CTX_D << "CacheContext::getAttribute rdn:" << rdn << endl; + + /* Try for cache hit */ + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + LG_CTX_D << "CacheContext::getAttribute cached for rdn:" << rdn << endl; + return new AttributeProxy( this, atom, rdn ); + } + + LG_CTX_D << "CacheContext::getAttribute create for rdn:" << rdn << endl; + /* Create new caching EA, attach it, and return attribute */ + addAttribute( rdn, + this, &_Self::GetIStream, + this, &_Self::GetIOStream, + this, &_Self::IOStreamClosed, + getUnderlyingEAType( rawrdn ), + 0 ); + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + return new AttributeProxy( this, atom, rdn ); + } + + std::stringstream ss; + ss << "NoSuchAttribute() for attr:" << rdn << endl; + Throw_NoSuchAttribute( tostr(ss), this ); + } + + virtual void OnChanged( NamingEvent_Changed* ev, std::string olddn, std::string newdn ) + { + LG_CTX_D << "cachecontext::OnChanged c:" << getURL() << endl; + LG_CTX_D << "clearing the cache." << endl; + + clearCaches(); + Emit_Changed( 0, getDirPath(), getDirPath(), 0 ); + } + + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + LG_CTX_D << "cachecontext::OnExists new:" << subc->getURL() << endl; + string rdn = subc->getDirName(); + + bool created = false; + if( !priv_discoveredSubContext( rdn, created ) ) + { + if( canInsert( rdn ) ) + { + CachedContext* cc = new CachedContext( subc, expungeInterval ); + Insert( cc, false, !Delegate->areReadingDir() ); + LG_CTX_D << "cachecontext::Inserted cc:" << cc->getURL() << endl; + } + } + } + + void + OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + LG_CTX_D << "cachecontext::OnCreated c:" << subc->getURL() << endl; + + bool created = true; + if( !priv_discoveredSubContext( subc->getDirName(), created ) ) + { + CachedContext* cc = new CachedContext( subc, expungeInterval ); + Insert( cc, 1, 1 ); + } + } + + void + OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { +// Emit_Deleted( ev, newdn, olddn, 0 ); + Remove( olddn ); + } + + virtual void read( bool force = 0 ) + { + if( !force && Delegate->HaveReadDir && Delegate->isActiveView() ) + { + if( !getItems().empty() ) + { + LG_CTX_D << "CacheContext::read( bool force " << force << " )" + << " shorting out attempt to read() because we are already read." + << endl; + HaveReadDir = true; + emitExistsEventForEachItem(); + return; + } + } + + clearContext(); + Delegate->read( force ); + emitExistsEventForEachItem(); + } + + virtual long guessSize() throw() + { + return Delegate->guessSize(); + } + + + protected: + + virtual void emitExistsEventForEachItem() + { + for( Items_t::iterator iter = getItems().begin(); + iter != getItems().end(); ++iter ) + { + Emit_Exists( 0, *iter, (*iter)->getDirName(), (*iter)->getDirName(), 0 ); + } + +// SubContextNames_t na = getSubContextNames(); +// for( SubContextNames_t::iterator iter = na.begin(); +// iter != na.end(); ++iter ) +// { +// Emit_Exists( 0, *iter, *iter, 0 ); +// } + } + virtual void UnPageSubContextsIfNeeded() + { + LG_CTX_D << "CachedContext::UnPageSubContextsIfNeeded()" << endl; + } + + virtual Context* priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << endl; + } + }; + + const char* const CachedContext::EXPUNGEINTERVAL_KEY = "updatetime"; + + FERRIS_SMARTPTR( CachedContext, fh_cachedcontext ); + + gint CachedContext_sweeper(gpointer data) + { + CachedContext* cc = (CachedContext*)data; + cc->clearCaches(); + return 1; + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + namespace Factory + { + /** + * Wrap a context into a caching context. The return value appears just like + * the one passed in except that calls to getAttribute() etc will return cached + * data that is only updated when changed events occur from the wrapped context + * + * @param extradata This is extra info from the URL string that sets params for + * this cache. For example updatetime=300s would tell the cache to reclaim + * cached data memory after 300s thus a subsequent read of that attribute + * would require delegation to the underlying context again. + * This is in the form key=value&key2=value[...][/]. + * NOTE: unused at the moment. + */ + fh_context MakeCachedContext( fh_context& ctx, const std::string& extradata ) + { + CachedContext* ret = new CachedContext( ctx, extradata ); + + // ret is a overlay root node + ret->setIsChainedViewContextRoot(); + + return ret; + } + + }; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + +/** + * Create a sorted context that uses the base context ctx and exposes + * the contexts from the base context in sorted order + * + * @param ctx Base context + * @param sorter Sorting Predicate + */ + SortedContext::SortedContext( + const fh_context& ctx, + const std::string& s ) + : + ChainedViewContext(ctx, false), + LazySorting( false ) + { + thisIterator = getItems().end(); + +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + ItemsSorted = Items_t( ContextSetCompare(s) ); +#else + Items_t::ctor_args_list args_list= + boost::make_tuple( + + boost::make_tuple( + boost::multi_index::identity(), + ContextSetCompare(s) + ), + + // ctor_args for hash index are unchanged. + Items_t::index::type::ctor_args() + + ); + ItemsSorted = Items_t( args_list ); +#endif + + createStateLessAttributes(); + SetupEventConnections(); +// Delegate->emitExistsEventForEachItem(); + } + + /** + * The parent passes in a reference to its SortedItems set<> so that + * we can copy the sorting predicate to our SortedItems + */ + SortedContext::SortedContext( + const fh_context& ctx, + const Items_t& sorteditemscopy ) + : + ChainedViewContext(ctx, false), + LazySorting( false ) + { + thisIterator = getItems().end(); + +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + ItemsSorted = Items_t( sorteditemscopy.key_comp() ); +#else + Items_t::ctor_args_list args_list= + boost::make_tuple( + + boost::make_tuple( + boost::multi_index::identity(), + sorteditemscopy.get().key_comp() + ), + + // ctor_args for hash index are unchanged. + Items_t::index::type::ctor_args() + ); + ItemsSorted = Items_t( args_list ); +#endif + + createStateLessAttributes(); +// SetupEventConnections(); + } + + void + SortedContext::Remove( Context* ctx, bool emitdeleted ) + { + // Note, we could have gotten here based on a OnDeleted Signal handler, + // we are removing a context from ourselves which may trigger another OnDeleted + // signal handler. This other signal handler might want to use a ContextIterator + // which triggers a revalidate() and wants to use SortedItems one last time. + // + // We thus must remove ctx *after* calling the base method. + _Base::Remove( ctx, emitdeleted ); +// getSortedItems().erase( ctx ); + eraseItemByName( getSortedItems(), ctx ); + + } + + + void + SortedContext::createStateLessAttributes( bool force ) + { + static Util::SingleShot virgin; + if( virgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + SortedContext::Items_t& + SortedContext::getSortedItems() + { + return ItemsSorted; + } + + /** + * Because we keep a second index to all children then we must bump the + * reference count. + */ + int + SortedContext::getMinimumReferenceCount() + { + return _Base::getMinimumReferenceCount() + 1; + } + + + void + SortedContext::setLazySorting( bool v ) + { + LazySorting = v; + sort(); + } + + void + SortedContext::sort() + { + if( !LazySorting ) + return; + + LazySortCache.clear(); + LazySortCache = _Base::getSubContextNames(); + } + + Context::SubContextNames_t& + SortedContext::getSubContextNames() + { + if( LazySorting ) return LazySortCache; + return _Base::getSubContextNames(); + } + + + + +/** + * When a context is deleted from the base context it also gets removed from the filtering + * context. + */ + void + SortedContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + +// Emit_Deleted( ev, newdn, olddn, 0 ); +// Remove( ev->getSource()->getSubContext( olddn ) ); + +// cerr << "SortedContext::OnDeleted url:" << getURL() +// << " oldrdn:" << olddn << endl; +// dumpOutItems(); + + if( isSubContextBound( olddn ) ) + { + fh_context c = getSubContext( olddn ); + Remove( GetImpl(getSubContext(olddn)) ); +// ItemsSorted.erase( GetImpl(c) ); + eraseItemByName( ItemsSorted, GetImpl(c) ); + } + + if( LazySorting ) + { + LazySortCache.remove( olddn ); + } + } + + void + SortedContext::addToSorted( fh_context subc, bool created, bool emit ) + { + try + { + LG_CTX_D << "SortedContext::addToSorted(1)" << endl; + +// cerr << "addToSorted() subc:" << subc->getURL() << endl; + fh_sortedContext nc = new SortedContext( subc, ItemsSorted ); + LG_CTX_D << "SortedContext::addToSorted(2)" << endl; + nc->setContext( this, subc->getDirName() ); + LG_CTX_D << "SortedContext::addToSorted(3)" << endl; + +// cerr << "SortedContext::addToSorted" +// << " this:" << toVoid(this) +// << " created:" << created +// << " e:" << emit +// << " nc:" << toVoid(nc) +// << " nc.url:" << nc->getURL() +// << endl; + + + // + // NOTE: Insert() will possibly emit a signal that other things are watching, + // they in turn might want to get an iterator to this new context, which + // in turn will rely on thisIterator being set properly. + // + LG_CTX_D << "SortedContext::addToSorted(4)" << endl; + nc->thisIterator = ItemsSorted.insert( nc ).first; + LG_CTX_D << "SortedContext::addToSorted(4.2)" << endl; + Insert( GetImpl(nc), created, emit ); + LG_CTX_D << "SortedContext::addToSorted(5)" << endl; + + if( LazySorting ) + LazySortCache.push_back( nc->getDirName() ); + } + catch( exception& e ) + { + cerr << "SortedContext::addToSorted() url:" << getURL() << endl + << " child:" << subc->getURL() << endl + << " e:" << e.what() << endl; + throw; + } + } + + + + void + SortedContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + LG_CTX_D << "SortedContext::OnCreated() rdn:" << olddn << endl; +// cerr << "SortedContext::OnCreated rdn:" << olddn << endl; +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + bool created = true; + if( !priv_discoveredSubContext( subc->getDirName(), created ) ) + { + addToSorted( subc, 1, 1 ); + } + } + + +/** + * Add the newly discovered context to the view if it passes the matcher. + */ + void + SortedContext::OnExists( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { + LG_SORT_I + << "SortedContext::OnExists() enter... newdn:" << newdn + << " Delegate->areReadingDir():" << Delegate->areReadingDir() + << endl; + +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + /* + * Emit exists events, only if we are not reading the dir at this point. + * (read operations emit events in sorted order) + */ + string rdn = subc->getDirName(); + + LG_SORT_I << "SortedContext::OnExists(1)... newdn:" << newdn << endl; + + bool created = false; + if( !priv_discoveredSubContext( rdn, created ) ) + { + LG_SORT_I << "SortedContext::OnExists(2)... newdn:" << newdn << endl; + if( canInsert( rdn ) ) + { + LG_SORT_I << "SortedContext::OnExists(3)... newdn:" << newdn << endl; + LG_SORT_D + << "SortedContext::OnExists() adding... newdn:" << newdn + << " emit:" << (!Delegate->areReadingDir()) + << endl; + addToSorted( subc, false, !Delegate->areReadingDir() ); + LG_SORT_I << "SortedContext::OnExists(4)... newdn:" << newdn << endl; + } + } + } + + +/** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + SortedContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << endl; + } + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * We emit in sorted order. + */ + void + SortedContext::read( bool force ) + { + if( !force && Delegate->HaveReadDir && Delegate->isActiveView() ) + { + if( !getItems().empty() ) + { + LG_SORT_I << "SortedContext::read( bool force " << force << " )" + << " quick return " + << endl; + HaveReadDir = true; + emitExistsEventForEachItem(); + return; + } + } + + LG_SORT_I << "SortedContext::read( bool force " << force << " )" + << " Delegate:" << Delegate->getURL() + << endl; + + clearContext(); + ensureEventConnections(); + Delegate->read( true ); + emitExistsEventForEachItem(); + } + + + void + SortedContext::emitExistsEventForEachItem() + { + try + { + LG_SORT_D << "SortedContext::emitExistsEventForEachItem()" << endl; + for( Items_t::iterator iter = getSortedItems().begin(); + iter != getSortedItems().end(); ++iter ) + { + LG_SORT_D << "SortedContext::emitExists... rdn:" << (*iter)->getDirName() << endl; + Emit_Exists( 0, *iter, (*iter)->getDirName(), (*iter)->getDirName(), 0 ); + } + +// SubContextNames_t na = getSubContextNames(); +// for( SubContextNames_t::iterator iter = na.begin(); +// iter != na.end(); ++iter ) +// { +// Emit_Exists( 0, *iter, *iter, 0 ); +// } + } + catch( FerrisNotReadableAsContext& e ) + { + } + } + + void + SortedContext::UnPageSubContextsIfNeeded() + { + LG_CTX_D << "SortedContext::UnPageSubContextsIfNeeded()" << endl; + Delegate->UnPageSubContextsIfNeeded(); + } + + + + long + SortedContext::guessSize() throw() + { + return Delegate->guessSize(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + VirtualSoftlinkContext::VirtualSoftlinkContext( const fh_context& parent, + const fh_context& target, + bool setupEventConnections ) + : + _Base( parent, target, setupEventConnections ) + { + createStateLessAttributes(); + + addAttribute("is-native", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-dir", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-file", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-special",this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-link", this, &_Self::getTrueStream, XSD_BASIC_BOOL ); + + addAttribute("dontfollow-is-native", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-dir", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-file", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-special",this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-link", this, &_Self::getTrueStream, XSD_BASIC_BOOL ); + + addAttribute("link-target", this, &_Self::getDelegateURLStream, XSD_BASIC_STRING ); + addAttribute("realpath", this, &_Self::getDelegateURLStream, XSD_BASIC_STRING ); + + } + + VirtualSoftlinkContext::VirtualSoftlinkContext( const fh_context& parent, + const fh_context& target, + const std::string& localName, + bool setupEventConnections ) + : + _Base( parent, target, localName, setupEventConnections ) + { + createStateLessAttributes(); + + addAttribute("is-native", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-dir", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-file", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-special",this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("is-link", this, &_Self::getTrueStream, XSD_BASIC_BOOL ); + + addAttribute("dontfollow-is-native", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-dir", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-file", this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-special",this, &_Self::getFalseStream, XSD_BASIC_BOOL ); + addAttribute("dontfollow-is-link", this, &_Self::getTrueStream, XSD_BASIC_BOOL ); + + addAttribute("link-target", this, &_Self::getDelegateURLStream, XSD_BASIC_STRING ); + addAttribute("realpath", this, &_Self::getDelegateURLStream, XSD_BASIC_STRING ); + + LG_CTX_D << "VirtualSoftlinkContext(ctx,ln) ctx.url:" << target->getURL() + << " ln:" << localName + << " getDirName:" << getDirName() + << endl; + + } + + VirtualSoftlinkContext::~VirtualSoftlinkContext() + { + } + + std::string + VirtualSoftlinkContext::getRecommendedEA() + { + return Delegate->getRecommendedEA() + ",realpath"; + } + + /** + * Either the link target's dirName() or what is set with setLocalName() + */ + const std::string& + VirtualSoftlinkContext::getDirName() const + { + const string& rdn_ddb = _DontDelegateBase::getDirName(); + const string& rdn_target = Delegate->getDirName(); + +// cerr << "VirtualSoftlinkContext::getDirName() " +// << " rdn_ddb:" << rdn_ddb +// << " rdn_target:" << rdn_target +// << endl; + + if( rdn_ddb != rdn_target ) + return rdn_ddb; + return rdn_target; + } + + + std::string + VirtualSoftlinkContext::getDirPath() throw (FerrisParentNotSetError) + { + return _DontDelegateBase::getDirPath(); + } + + + std::string + VirtualSoftlinkContext::getURL() + { + return _DontDelegateBase::getURL(); + } + + void + VirtualSoftlinkContext::read( bool force ) + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + if( getHaveReadDir() ) + { + LG_CTX_D << "VirtualSoftlinkContext::read(have read) url:" << getURL() << endl; + emitExistsEventForEachItem(); + } + else + { + LG_CTX_D << "VirtualSoftlinkContext::read(reading) url:" << getURL() << endl; + Delegate->read( force ); + emitExistsEventForEachItem(); + } + } + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + VirtualSoftlinkContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << endl; + } + + void + VirtualSoftlinkContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + fh_istream + VirtualSoftlinkContext::getDelegateURLStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << Delegate->getURL(); + return ss; + } + + fh_istream + VirtualSoftlinkContext::getFalseStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "0"; + return ss; + } + + fh_istream + VirtualSoftlinkContext::getTrueStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "1"; + return ss; + } + + + stringset_t& + VirtualSoftlinkContext::getForceLocalAttributeNames() + { + static stringset_t ret; + if( ret.empty() ) + { +// ret.push_back("is-native"); +// ret.push_back("is-dir"); +// ret.push_back("is-file"); +// ret.push_back("is-special"); +// ret.push_back("is-link"); + +// ret.push_back("dontfollow-is-native"); +// ret.push_back("dontfollow-is-dir"); +// ret.push_back("dontfollow-is-file"); +// ret.push_back("dontfollow-is-special"); +// ret.push_back("dontfollow-is-link"); + + ret.insert("link-target"); + ret.insert("realpath"); + ret.insert("name"); + ret.insert("url"); + ret.insert("is-active-view"); + } + return ret; + } + +// std::string +// VirtualSoftlinkContext::private_getStrAttr( const std::string& rdn, +// const std::string& def, +// bool getAllLines, +// bool throwEx ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::private_getStrAttr( rdn, def, getAllLines, throwEx ); + +// return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); +// } + + + +// fh_attribute +// VirtualSoftlinkContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::getAttribute( rdn ); + +// return Delegate->getAttribute(rdn); +// } +// AttributeCollection::AttributeNames_t& +// VirtualSoftlinkContext::getAttributeNames( AttributeNames_t& ret ) +// { +// AttributeCollection::AttributeNames_t t1; +// AttributeCollection::AttributeNames_t t2; +// Delegate->getAttributeNames( t1 ); +// _DontDelegateBase::getAttributeNames( t2 ); +// return mergeAttributeNames( ret, t1, t2 ); +// } +// int +// VirtualSoftlinkContext::getAttributeCount() +// { +// return Delegate->getAttributeCount(); +// } +// bool +// VirtualSoftlinkContext::isAttributeBound( const std::string& rdn, +// bool createIfNotThere +// ) throw( NoSuchAttribute ) +// { +// stringlist_t& sl = getForceLocalAttributeNames(); +// if( sl.end() != find( sl.begin(), sl.end(), rdn ) ) +// return _DontDelegateBase::isAttributeBound( rdn, createIfNotThere ); + +// return Delegate->isAttributeBound( rdn, createIfNotThere ); +// } + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + fh_istream + SL_getNothingStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << ""; + return ss; + } + + class FERRISEXP_DLLLOCAL DirNameContext_Base + : + public StateLessEAHolder< DirNameContext_Base, ChainedViewContext > + { + typedef StateLessEAHolder< DirNameContext_Base, ChainedViewContext > _Base; + typedef DirNameContext_Base _Self; + typedef Context _BaseNoDelegate; + + guint64 m_AddedOrderID; + + stringset_t& getEANamesNotToDelegate() + { + static stringset_t ret; + static Util::SingleShot v; + if( v ) + { + ret.insert( "name" ); + ret.insert( "path" ); + ret.insert( "url" ); + ret.insert( "name-only" ); + ret.insert( "selection-added-order-id" ); + } + return ret; + } + + + bool isIndexAttribute( const std::string& rdn ) + { + return ( starts_with( rdn, "idx:" ) || starts_with( rdn, "index:" ) ); + } + + string stripIndexAttributePredix( const std::string& rdn ) + { + PrefixTrimmer trimmer; + trimmer.push_back( "idx:" ); + trimmer.push_back( "index:" ); + string ret = trimmer( rdn ); + return ret; + } + + XSDBasic_t getUnderlyingEAType( const std::string& rdn ) + { + return FXD_BINARY; // getSchemaType( this, rdn, FXD_BINARY ); + } + + protected: + + EAIndex::fh_fwdeaidx getForwardIndex() + { + if( SelectionContext* p = dynamic_cast( getParent() ) ) + { + return p->getForwardEAIndexInterface(); + } + return 0; + } + + static fh_stringstream + SL_getNameOnlyStream( _Self* c, const std::string& ean, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->Delegate->getDirName(); + return ss; + } + + static fh_stringstream + SL_getSelectionAddedOrderIDStream( DirNameContext_Base* c, const std::string& ean, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_AddedOrderID; + return ss; + } + + void createStateLessAttributes( bool force = false ) + { + static Util::SingleShot virgin; + if( virgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( "name-only", &_Self::SL_getNameOnlyStream, XSD_BASIC_STRING ); + SLEA( "selection-added-order-id", &_Self::SL_getSelectionAddedOrderIDStream, XSD_BASIC_INT ); +#undef SLEA + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + std::string private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + if( isIndexAttribute( rdn ) ) + { + if( EAIndex::fh_fwdeaidx fidx = getForwardIndex() ) + { + string trdn = stripIndexAttributePredix( rdn ); + +// cerr << "private_getStrAttr(A) rdn:" << rdn << endl +// << " rdn.trimmed:" << trdn +// << " earl:" << getURL() << endl; + return fidx->getStrAttr( this, getURL(), trdn, def, throwEx ); + } + } + if( getEANamesNotToDelegate().count( rdn ) ) + return _BaseNoDelegate::private_getStrAttr( rdn, def, getAllLines, throwEx ); + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + void setupAddedOrderID() + { + static guint64 cache = 0; + ++cache; + m_AddedOrderID = cache; + } + + DirNameContext_Base( const fh_context& ctx, + bool setupEventConnections = true ) + : _Base( ctx ), + m_AddedOrderID( 0 ) + { + setupAddedOrderID(); + } + + DirNameContext_Base( const fh_context& parent, + const fh_context& delegate, + const std::string& rdn, + bool setupEventConnections = true ) + : _Base( parent, delegate, rdn, setupEventConnections ), + m_AddedOrderID( 0 ) + { + setupAddedOrderID(); + } + + + + + + public: + + virtual bool + isAttributeBound( const std::string& rdn, + bool createIfNotThere = true ) throw( NoSuchAttribute ) + { + if( isIndexAttribute( rdn ) ) + return true; + + if( getEANamesNotToDelegate().count( rdn ) ) + return _BaseNoDelegate::isAttributeBound( rdn, createIfNotThere ); + return _Base::isAttributeBound( rdn, createIfNotThere ); + } + + fh_istream GetIStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( EAIndex::fh_fwdeaidx fidx = getForwardIndex() ) + { +// cerr << "private_getStrAttr(B) rdn:" << rdn << " earl:" << getURL() << endl; + ss << fidx->getStrAttr( this, getURL(), rdn, "", 1 ); + } + return ss; + } + + virtual fh_attribute + getAttribute( const std::string& rdn ) throw( NoSuchAttribute ) + { + if( isIndexAttribute( rdn ) ) + { + if( EAIndex::fh_fwdeaidx fidx = getForwardIndex() ) + { + /* Try for cache hit */ + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + LG_CTX_D << "CacheContext::getAttribute cached for rdn:" << rdn << endl; + return new AttributeProxy( this, atom, rdn ); + } + + LG_CTX_D << "CacheContext::getAttribute create for rdn:" << rdn << endl; + /* Create new caching EA, attach it, and return attribute */ + addAttribute( rdn, this, &_Self::GetIStream, getUnderlyingEAType( rdn ), 0 ); + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + return new AttributeProxy( this, atom, rdn ); + } + + std::stringstream ss; + ss << "NoSuchAttribute() for attr:" << rdn << endl; + Throw_NoSuchAttribute( tostr(ss), this ); + } + } + + if( getEANamesNotToDelegate().count( rdn ) ) + return _BaseNoDelegate::getAttribute( rdn ); + return _Base::getAttribute( rdn ); + } + + }; + + /** + * This class proxies for another context but changes the getDirName() function + * to return the URL of the context instead. By doing this the SelectionContext + * can have many children with the same rdn but only one child with the same URL. + * + * This lets folks copy files like + * /mnt/cdrom/file1 + * /tmp/file1 + * To some place without the selection becoming haywire because there are two files + * with the same rdn as its children. + */ + class FERRISEXP_DLLLOCAL URLIsDirNameContext + : + public DirNameContext_Base + { + typedef DirNameContext_Base _Base; + typedef URLIsDirNameContext _Self; + typedef Context _BaseNoDelegate; + + mutable string m_urlCache; + + protected: + + _Self* + priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "URLIsDirNameContext::priv_CreateContext() Should never happen!" << endl; + Throw_FerrisCanNotCreateLeafOfLeaf( "", this ); + } + + public: + + URLIsDirNameContext( fh_context parent, const fh_context& delegate ) + : + _Base( delegate ) + { + setContext( parent, delegate->getDirName() ); +// setAttributeContext( parent, Delegate->getURL() ); + createStateLessAttributes(); + } + + virtual ~URLIsDirNameContext() + {} + + virtual const std::string& getDirName() const + { + m_urlCache = Delegate->getURL(); + return m_urlCache; + } + + Parent_t + getParent() throw (FerrisParentNotSetError) + { + return Context::getParent(); + } + + }; + + + class FERRISEXP_DLLLOCAL Context_SelectionContextRDNConflictResolver_MonsterName + : + public DirNameContext_Base + { + typedef DirNameContext_Base _Base; + typedef URLIsDirNameContext _Self; + typedef Context _BaseNoDelegate; + + protected: + + _Self* + priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "Context_SelectionContextRDNConflictResolver_MonsterName::priv_CreateContext() Should never happen!" << endl; + Throw_FerrisCanNotCreateLeafOfLeaf( "", this ); + } + + public: + + Context_SelectionContextRDNConflictResolver_MonsterName( + fh_context parent, const fh_context& delegate, const std::string& rdn ) + : + _Base( parent, delegate, rdn ) + { + setContext( parent, rdn ); + createStateLessAttributes(); + } + + virtual ~Context_SelectionContextRDNConflictResolver_MonsterName() + {} + + virtual const std::string& getDirName() const + { + return Context::getDirName(); + } + + virtual std::string getURL() + { + fh_stringstream ss; + ss << getURLScheme() << "://" << getDirPath(); + return tostr(ss); + } + + virtual std::string getDirPath() throw (Ferris::FerrisParentNotSetError) + { + return Context::getDirPath(); + } + + Parent_t + getParent() throw (FerrisParentNotSetError) + { + return Context::getParent(); + } + + }; + + + + + /** + * This is the root context for selectionfactory:// + * + * The main reason for this context is to create selectionContext subcontexts + * and attach them to ourself. + */ + class FERRISEXP_DLLLOCAL SelectionFactoryContext + : + public FakeInternalContext + { + guint32 newFileNumber; + + friend class SelectionFactoryContext_RootContextDropper; + + protected: + + virtual void priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + protected: + + virtual bool isDir() + { + return true; + } + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + SelectionContext* + priv_CreateContext( Context* parent, string rdn ) + { + SelectionContext* ret = new SelectionContext( this, rdn ); +// ret->setContext( this, rdn ); + return ret; + } + + + public: + + SelectionFactoryContext(); + virtual ~SelectionFactoryContext(); + + virtual fh_context + createSubContext( const std::string& rdn, + fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + std::string getURL() + { +// cerr << "selectionfactoryctx::getURL() have-parent:" << isParentBound() +// << " path:" << getDirPath() << endl; +// BackTrace(); + fh_stringstream ss; + ss << getURLScheme() << "://" << getDirPath(); + return tostr(ss); + } + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class SelectionContextRDNConflictResolver_UseURLAsRDN : public SelectionContextRDNConflictResolver + { + public: + std::string getRDN( SelectionContext* selc, fh_context newChild ); + fh_context createChild( SelectionContext* selc, fh_context newChild ); + }; + + class SelectionContextRDNConflictResolver_MonsterName : public SelectionContextRDNConflictResolver + { + public: + std::string getRDN( SelectionContext* selc, fh_context newChild ); + fh_context createChild( SelectionContext* selc, fh_context newChild ); + }; + + std::string + SelectionContextRDNConflictResolver_UseURLAsRDN::getRDN( + SelectionContext* selc, fh_context newChild ) + { + return newChild->getURL(); + } + + fh_context + SelectionContextRDNConflictResolver_UseURLAsRDN::createChild( + SelectionContext* selc, fh_context newChild ) + { + fh_context ret = new URLIsDirNameContext( selc, newChild ); + return ret; + } + + + std::string + SelectionContextRDNConflictResolver_MonsterName::getRDN( + SelectionContext* selc, fh_context newChild ) + { + string ret = monsterName( selc, newChild->getDirName() ); + return ret; + } + + fh_context + SelectionContextRDNConflictResolver_MonsterName::createChild( + SelectionContext* selc, fh_context newChild ) + { + string rdn = monsterName( selc, newChild->getDirName() ); +// cerr << "SelectionContextRDNConflictResolver_MonsterName::createChild() rdn:" << rdn << endl; + fh_context ret = new Context_SelectionContextRDNConflictResolver_MonsterName( selc, newChild, rdn ); + return ret; + } + + + fh_SelectionContextRDNConflictResolver get_SelectionContextRDNConflictResolver_UseURLAsRDN() + { + static fh_SelectionContextRDNConflictResolver ret = 0; + if( !ret ) + { + ret = new SelectionContextRDNConflictResolver_UseURLAsRDN(); + } + return ret; + } + + fh_SelectionContextRDNConflictResolver get_SelectionContextRDNConflictResolver_MonsterName() + { + static fh_SelectionContextRDNConflictResolver ret = 0; + if( !ret ) + { + ret = new SelectionContextRDNConflictResolver_MonsterName(); + } + return ret; + } + + + SelectionContext::SelectionContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ), + m_reportedRDN( rdn ), + m_fwdidx( 0 ) + { + m_rdnConflictResolver = get_SelectionContextRDNConflictResolver_UseURLAsRDN(); + setContext( parent, rdn ); + createStateLessAttributes(); + +// cerr << "SelectionContext::ctor rdn:" << rdn << " url:" << getURL() << endl; + } + + SelectionContext::~SelectionContext() + { + } + + void + SelectionContext::setSelectionContextRDNConflictResolver( fh_SelectionContextRDNConflictResolver f ) + { + m_rdnConflictResolver = f; + } + + + + fh_context + SelectionContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_context ret; + + // + // check if the context at 'md' has already been added to this col + // + try + { + fh_context item = getItem( m_rdnConflictResolver->getRDN( this, md ) ); + if( ChainedViewContext* rawitem + = dynamic_cast( GetImpl(item) )) + { + if( GetImpl( rawitem->Delegate ) == GetImpl( md ) ) + return item; + } + } + catch( exception& e ) + { + } + + + { +/// cerr << "SelectionContext::createSubContext() md:" << md->getURL() << endl; + fh_context childc = m_rdnConflictResolver->createChild( this, md ); + ret = Insert( GetImpl(childc), true ); + } + return ret; + +// // +// // check if the context at 'md' has already been added to this col +// // +// try +// { +// fh_context item = getItem( md->getURL() ); +// if( ChainedViewContext* rawitem +// = dynamic_cast( GetImpl(item) )) +// { +// if( GetImpl( rawitem->Delegate ) == GetImpl( md ) ) +// return item; +// } +// } +// catch( exception& e ) +// { +// } + + +// { +// fh_context childc = new URLIsDirNameContext( this, md ); +// ret = Insert( GetImpl(childc) ); +// } +// return ret; + } + + void + SelectionContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator( + SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + fh_stringstream + SelectionContext::SL_getNameOnlyStream( SelectionContext* c, const std::string& ean, EA_Atom* atom ) + { +// cerr << "SelectionContext::SL_getNameOnlyStream()" << endl; + fh_stringstream ss; + ss << c->_BaseNoDelegate::private_getStrAttr( "name", "", 1, 1 ); + return ss; + } + + + void + SelectionContext::createStateLessAttributes( bool force ) + { + static Util::SingleShot virgin; + if( virgin() ) + { +// cerr << "SelectionContext::createStateLessAttributes()" << endl; +#define SLEA tryAddStateLessAttribute + SLEA( "mtime", SL_getNothingStream, FXD_UNIXEPOCH_T ); + SLEA( "atime", SL_getNothingStream, FXD_UNIXEPOCH_T ); + SLEA( "ctime", SL_getNothingStream, FXD_UNIXEPOCH_T ); + SLEA( "size", SL_getNothingStream, FXD_FILESIZE ); + SLEA( "dontfollow-size", SL_getNothingStream, FXD_FILESIZE ); + SLEA( "name-only", SL_getNameOnlyStream, XSD_BASIC_STRING ); +#undef SLEA + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + void + SelectionContext::setReportedRDN( const std::string& rdn ) + { + m_reportedRDN = rdn; + } + + bool + SelectionContext::isAttributeBound( const std::string& rdn, + bool createIfNotThere ) throw( NoSuchAttribute ) + { + if( rdn == "name" || rdn == "path" || rdn == "url" || rdn == "name-only" ) + return _BaseNoDelegate::isAttributeBound( rdn, createIfNotThere ); + return _Base::isAttributeBound( rdn, createIfNotThere ); + } + + fh_attribute + SelectionContext::getAttribute( const std::string& rdn ) throw( NoSuchAttribute ) + { +// cerr << "SelectionContext::ga() rdn:" << rdn << endl; + if( rdn == "name" || rdn == "path" || rdn == "url" || rdn == "name-only" ) + return _BaseNoDelegate::getAttribute( rdn ); + return _Base::getAttribute( rdn ); + } + + + + std::string + SelectionContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { +// cerr << "selc private_getStrAttr() rdn:" << rdn << endl; + + if( rdn == "name" || rdn == "path" || rdn == "url" || rdn == "name-only" ) + return _BaseNoDelegate::private_getStrAttr( rdn, def, getAllLines, throwEx ); + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + const std::string& SelectionContext::getDirName() const + { + return m_reportedRDN; + } + + std::string SelectionContext::getDirPath() throw (FerrisParentNotSetError) + { +// cerr << "SelectionContext::getDirPath(top)" << endl; +// if( isParentBound() ) +// { +// cerr << "p.path:" << getParent()->getDirPath() << endl; +// cerr << "p.name:" << getParent()->getDirName() << endl; +// } +// cerr << "this.name:" << getDirName() << endl; + + return Context::getDirPath(); + } + + std::string SelectionContext::getURL() + { +// cerr << "SelectionContext::getURL()" << endl; + fh_stringstream ss; + ss << getURLScheme() << "://" << getDirPath(); + return tostr(ss); + } + +// std::string +// SelectionContext::getURL() +// { +// cerr << "selectionctx::getURL() have-parent:" << isParentBound() +// << " rdn:" << getDirName() << " path:" << getDirPath() << endl; +// cerr << "selectionctx::getURL() base.url:" << _Base::getURL() << endl; + +// if( fh_context c = getCoveredContext() ) +// cerr << " cc rdn:" << c->getDirName() << " path:" << c->getDirPath() << endl; +// if( fh_context c = getOverMountContext() ) +// cerr << " om rdn:" << c->getDirName() << " path:" << c->getDirPath() << endl; + +// if( isParentBound() ) +// { +// fh_context p = getParent(); +// cerr << " parent have-parent:" << p->isParentBound() +// << " rdn:" << p->getDirName() << " path:" << p->getDirPath() << endl; +// if( fh_context c = p->getCoveredContext() ) +// cerr << " pcc rdn:" << c->getDirName() << " path:" << c->getDirPath() << endl; +// if( fh_context c = p->getOverMountContext() ) +// cerr << " pom rdn:" << c->getDirName() << " path:" << c->getDirPath() << endl; +// } + +// BackTrace(); +// cerr << endl << endl; + +// fh_stringstream ss; +// ss << getURLScheme() << "://" << getDirPath(); +// return tostr(ss); +// } + + + bool + SelectionContext::isDir() + { + return true; + } + + void + SelectionContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + fh_context + SelectionContext::insert( fh_context c ) + { + createSubContext( "", c ); + return c; + } + + void + SelectionContext::clear() + { + Items.clear(); + } + + bool + SelectionContext::empty() + { + return begin() == end(); + } + + + void + SelectionContext::setForwardEAIndexInterface( EAIndex::fh_fwdeaidx fidx ) + { + m_fwdidx = fidx; + LG_EAIDX_D << "SelectionContext::setForwardEAIndexInterface() have fidx:" << isBound(fidx) << endl; + } + + EAIndex::fh_fwdeaidx + SelectionContext::getForwardEAIndexInterface() + { + return m_fwdidx; + } + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + SelectionFactoryContext::SelectionFactoryContext() + : + newFileNumber(1) + { + setContext( 0, "/" ); + createStateLessAttributes(); + } + + + SelectionFactoryContext::~SelectionFactoryContext() + { + } + + + fh_context + SelectionFactoryContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { +// cerr << "SelectionFactoryContext::createSubContext()" +// << " newFileNumber:" << newFileNumber << endl; + + string filename = tostr(newFileNumber++); + fh_context ret = priv_readSubContext( filename, true ); + +// cerr << "SelectionFactoryContext::createSubContext()" +// << " newFileNumber:" << newFileNumber +// << " this:" << getURL() +// << " ret:" << ret->getURL() +// << " ret.rdn:" << ret->getDirName() +// << endl; + return ret; + } + + + void + SelectionFactoryContext::priv_FillCreateSubContextSchemaParts( + CreateSubContextSchemaPart_t& m ) + { +// cerr << "SelectionFactoryContext::priv_FillCreateSubContextSchemaParts()" << endl; + + m["file"] = SubContextCreator( + SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + class FERRISEXP_DLLLOCAL SelectionFactoryContext_RootContextDropper + : + public RootContextDropper + { + public: + SelectionFactoryContext_RootContextDropper() + { + RootContextFactory::Register( "selectionfactory", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + return new SelectionFactoryContext(); + } + }; + static SelectionFactoryContext_RootContextDropper ___SelectionFactoryContext_static_init; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + ManyBaseToOneViewContext::common_setup( fh_context parent, + fh_context ctx, + bool isCannibal ) + { + m_hasSetupBeenCalled = false; + m_isCannibal = isCannibal; + setContext( GetImpl( parent ), ctx->getDirName() ); + appendToBaseContexts( ctx ); + } + + ManyBaseToOneViewContext::ManyBaseToOneViewContext( fh_context parent, + fh_context ctx, + bool isCannibal ) + : + ChainedViewContext( ctx, false ) + { + common_setup( parent, ctx, isCannibal ); + } + + ManyBaseToOneViewContext::ManyBaseToOneViewContext( Context* parent, + const std::string& rdn ) + : + ChainedViewContext( parent, false ) + { + } + + + + ManyBaseToOneViewContext::~ManyBaseToOneViewContext() + { + } + + Context* + ManyBaseToOneViewContext::getUnderlyingContext( fh_context c ) + { + Context* ret = GetImpl(c); + + if( ChainedViewContext* rawc = dynamic_cast( ret )) + { + ret = GetImpl( rawc->Delegate ); + } + + return ret; + } + + + void + ManyBaseToOneViewContext::appendToBaseContexts( fh_context c ) + { + if( c ) + m_baseContexts.push_back( c ); + } + + void + ManyBaseToOneViewContext::setup() + { + m_hasSetupBeenCalled = true; + + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); + bi != m_baseContexts.end(); ++bi ) + { + SetupEventConnections( *bi ); + } + } + + bool + ManyBaseToOneViewContext::shouldInsertContext( const fh_context& c, bool created ) + { + return true; + } + + void + ManyBaseToOneViewContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + if( isSubContextBound( olddn ) ) + { + Emit_Deleted( ev, newdn, olddn, 0 ); + Remove( ev->getSource()->getSubContext( olddn ) ); + } + } + + void + ManyBaseToOneViewContext::OnExists( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + if( shouldInsertContext( subc, false ) ) + { + cascadedInsert( GetImpl(subc), false ); + } + else + { + LG_CTX_D << "OnExists() not inserting FOR N-to-1 context:" << subc->getDirPath() << endl; + } + } + + void + ManyBaseToOneViewContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + + if( shouldInsertContext( subc, true ) ) + { + cascadedInsert( GetImpl(subc), true ); + } + else + { + LG_CTX_D << "OnCreated() not inserting FOR N-to-1 context:" << subc->getDirPath() << endl; + } + } + + void + ManyBaseToOneViewContext::read( bool force ) + { + if( ReadingDir ) + return; + + EnsureStartStopReadingIsFiredRAII _raii1( this ); + ReadingDirRAII _raiird1( this, true ); + + if( !HaveReadDir ) + { + setup(); + HaveReadDir = true; + } + else + { + emitExistsEventForEachItem(); + } + } + + bool + ManyBaseToOneViewContext::allBaseContextsUseSameSorting() + { + m_baseContexts_t::iterator lastiter = m_baseContexts.begin(); + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + bool differentSorting = false; + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + if( ITEMS_KEY_COMP( (*bi)->getItems() ) + != ITEMS_KEY_COMP( (*lastiter)->getItems() ) ) + { + differentSorting = true; + break; + } + } + return differentSorting; + } + + void + ManyBaseToOneViewContext::cannibalRemove( Context* c ) + { +// cerr << "ManyBaseToOneViewContext::cannibalRemove()" +// << " filter:" << getStrAttr( this, "filter", "" ) +// << " c:" << c->getURL() << endl; + Remove( c, false ); + } + + void + ManyBaseToOneViewContext::updateViewForCannibalizm() + { + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); + bi != m_baseContexts.end(); ++bi ) + { + fh_context c = *bi; + ManyBaseToOneViewContext* bc + = dynamic_cast( GetImpl(c) ); + if( !bc ) + continue; + + for( Items_t::iterator iter = getItems().begin(); iter != getItems().end(); ++iter ) + { + bc->cannibalRemove( getUnderlyingContext( *iter ) ); + } + } + } + + + + bool + ManyBaseToOneViewContext::hasSetupBeenCalled() + { + return m_hasSetupBeenCalled; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + UnionContext::UnionContext( fh_context parent, fh_context ctx, bool isCannibal ) + : + _Base( parent, ctx, isCannibal ), + m_unionIsOverFilteredViewsOnly( false ) + {} + + UnionContext::~UnionContext() + {} + + bool + UnionContext::shouldInsertContext( const fh_context& c, bool created ) + { + LG_CTX_D << "UnionContext::shouldInsertContext() c:" << c->getURL() + << " this:" << getURL() + << " ret:" << !priv_isSubContextBound( c->getDirName() ) + << endl; + return !priv_discoveredSubContext( c->getDirName(), created ); + } + + void + UnionContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new UnionContext( this, c ); + Insert( GetImpl(cc), created ); + } + + void + UnionContext::setup() + { + if( hasSetupBeenCalled() ) + return; + + bool differentSorting = allBaseContextsUseSameSorting(); + LG_CTX_D << "UnionContext::setup() base.sz:" << m_baseContexts.size() + << " differentSorting:" << differentSorting + << endl; + + // + // Use set_union() if possible. + // + if( !differentSorting ) + { + // + // FIXME: if the underlying contexts use filtering or sorting then this method will + // not work. We need to be able to get to the "raw" context, ie the Context* + // for the transitive 'Delegate' if we are operating on ChainedContext subclasses + // + + + /** + * If all the base contexts are filtered contexts with the same path then turn on + * raw ptr comparison optimization + */ + { + m_unionIsOverFilteredViewsOnly = true; + string neededPath = Delegate->getDirPath(); + + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); bi != m_baseContexts.end(); ++bi ) + { + fh_context c = *bi; + FilteredContext* rawc = dynamic_cast( GetImpl(c) ); + if( !rawc || rawc->getDirPath() != neededPath ) + { + m_unionIsOverFilteredViewsOnly = false; + break; + } + } + } + + + + if( m_unionIsOverFilteredViewsOnly ) + { + typedef set< Context* > Tmp_t; + Tmp_t tmp1; + Tmp_t tmp2; + Tmp_t* tin = &tmp1; + Tmp_t* tout = &tmp2; + + LG_CTX_D << " m_unionIsOverFilteredViewsOnly:" << m_unionIsOverFilteredViewsOnly << endl; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + (*bi)->read(); + for( Items_t::iterator iter = (*bi)->getItems().begin(); iter != (*bi)->getItems().end(); ++iter ) + { + tin->insert( getUnderlyingContext( *iter ) ); + } + + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + Tmp_t z; + (*bi)->read(); + for( Items_t::iterator iter = (*bi)->getItems().begin(); iter != (*bi)->getItems().end(); ++iter ) + { + z.insert( getUnderlyingContext( *iter ) ); + } + + set_union( tin->begin(), tin->end(), + z.begin(), z.end(), + inserter( *tout, tout->end() ) ); + +// cerr << "union working... DUMP START (using raw ptrs)" << endl; +// for( Tmp_t::iterator ti = tout->begin(); ti != tout->end(); ++ti ) +// { +// cerr << "union working... c:" << (*ti)->getURL() << " v:" << toVoid( GetImpl(*ti) ) << endl; +// } + + swap( tin, tout ); + tout->clear(); + } + +// // PURE DEBUG +// for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) +// { +// cerr << "union result... c:" << (*ti)->getURL() << " v:" << toVoid( GetImpl(*ti) ) << endl; +// } + + + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { + cascadedInsert( *ti, false ); + } + } + else + { + + typedef list< fh_context > Tmp_t; + Tmp_t tmp1; + Tmp_t tmp2; + Tmp_t* tin = &tmp1; + Tmp_t* tout = &tmp2; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + (*bi)->read(); + copy( (*bi)->getItems().begin(), (*bi)->getItems().end(), back_inserter( *tin ) ); + + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + (*bi)->read(); + ContextSetCompare csc; + set_union( tin->begin(), tin->end(), + (*bi)->getItems().begin(), (*bi)->getItems().end(), + back_inserter( *tout ), + csc ); + +// cerr << "union working... DUMP START" << endl; +// for( Tmp_t::iterator ti = tout->begin(); ti != tout->end(); ++ti ) +// { +// cerr << "union working... c:" << (*ti)->getURL() << " v:" << toVoid( GetImpl(*ti) ) << endl; +// } + + swap( tin, tout ); + tout->clear(); + } + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { + cascadedInsert( GetImpl(*ti) , false ); + } + } + } + else + { + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); + bi != m_baseContexts.end(); bi ++ ) + { + (*bi)->read(); + Items_t& bitems = (*bi)->getItems(); + + for( Items_t::iterator iter = bitems.begin(); iter != bitems.end(); ++iter ) + { + LG_CTX_D << "UnionContext::setup() different sorting iter:" << (*iter)->getURL() << endl; + + if( shouldInsertContext( *iter, false ) ) + cascadedInsert( GetImpl(*iter) , false ); + } + } + } + + _Base::setup(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + DifferenceContext::DifferenceContext( fh_context parent, fh_context ctx, bool isCannibal ) + : + _Base( parent, ctx, isCannibal ) + {} + + DifferenceContext::~DifferenceContext() + {} + + void + DifferenceContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new DifferenceContext( this, c ); + Insert( GetImpl(cc), created ); + } + + bool + DifferenceContext::shouldInsertContext( const fh_context& c, bool created ) + { + string rdn = c->getDirName(); + + // dont bind it twice for ourself. + if( priv_discoveredSubContext( rdn, created ) ) + return false; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + if( (*bi)->isSubContextBound( rdn )) + return false; + } + return true; + } + + void + DifferenceContext::setup() + { + if( hasSetupBeenCalled() ) + return; + + LG_CTX_D << "DifferenceContext::setup() base.sz:" << m_baseContexts.size() << endl; + + bool differentSorting = allBaseContextsUseSameSorting(); + typedef list< fh_context > Tmp_t; + Tmp_t tmp1; + Tmp_t tmp2; + Tmp_t* tin = &tmp1; + Tmp_t* tout = &tmp2; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + (*bi)->read(); + copy( (*bi)->getItems().begin(), (*bi)->getItems().end(), back_inserter( *tin ) ); + + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + (*bi)->read(); + if( differentSorting ) + { + // + // We have to create a temporary set which is sorted by name and use that ordering in + // each set_intersection() call + // + typedef map< string, fh_context > SortedTemp_t; + SortedTemp_t SortedTemp; + Items_t& bitems = (*bi)->getItems(); + + for( Items_t::iterator iter = bitems.begin(); iter != bitems.end(); ++iter ) + { + SortedTemp[ (*iter)->getDirName() ] = *iter; + } + + ContextSetCompare csc; + set_difference( tin->begin(), tin->end(), + map_range_iterator( SortedTemp.begin() ), + map_range_iterator( SortedTemp.end() ), + back_inserter( *tout ), + csc ); + } + else + { + set_difference( tin->begin(), tin->end(), + (*bi)->getItems().begin(), (*bi)->getItems().end(), + back_inserter( *tout ), + ITEMS_KEY_COMP( (*bi)->getItems() ) ); + } + swap( tin, tout ); + tout->clear(); + } + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { +// if( shouldInsertContext( *ti ) ) + cascadedInsert( GetImpl(*ti) , false ); + } + + _Base::setup(); + +// Delegate->read(); + +// for( Items_t::iterator iter = Delegate->getItems().begin(); +// iter != Delegate->getItems().end(); ++iter ) +// { +// LG_CTX_D << "DifferenceContext::setup() iter:" << (*iter)->getURL() << endl; + +// if( shouldInsertContext( *iter ) ) +// cascadedInsert( GetImpl(*iter) , false ); +// } + +// _Base::setup(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + SetIntersectionContext::SetIntersectionContext( fh_context parent, + fh_context ctx, + bool isCannibal ) + : + _Base( parent, ctx, isCannibal ) + {} + + SetIntersectionContext::~SetIntersectionContext() + {} + + void + SetIntersectionContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new SetIntersectionContext( this, c ); + Insert( GetImpl(cc), created ); + } + + bool + SetIntersectionContext::shouldInsertContext( const fh_context& c, bool created ) + { + string rdn = c->getDirName(); + + // dont bind it twice for ourself. + if( priv_discoveredSubContext( rdn, created ) ) + return false; + + // only bind it if its bound in every child + bool ret = true; + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); bi != m_baseContexts.end(); ++bi ) + { + if( !(*bi)->isSubContextBound( rdn )) + { + return false; + } + } + return ret; + } + + void + SetIntersectionContext::setup() + { + if( hasSetupBeenCalled() ) + return; + + LG_CTX_D << "SetIntersectionContext::setup() base.sz:" << m_baseContexts.size() << endl; + + bool differentSorting = allBaseContextsUseSameSorting(); + typedef list< fh_context > Tmp_t; + Tmp_t tmp1; + Tmp_t tmp2; + Tmp_t* tin = &tmp1; + Tmp_t* tout = &tmp2; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + (*bi)->read(); + copy( (*bi)->getItems().begin(), (*bi)->getItems().end(), back_inserter( *tin ) ); + + for( ++bi; bi != m_baseContexts.end(); ++bi ) + { + (*bi)->read(); + if( differentSorting ) + { + LG_CTX_D << "SetIntersectionContext::setup() they use different sorting!" << endl; + // + // We have to create a temporary set which is sorted by name and use that ordering in + // each set_intersection() call + // + typedef map< string, fh_context > SortedTemp_t; + SortedTemp_t SortedTemp; + Items_t& bitems = (*bi)->getItems(); + + for( Items_t::iterator iter = bitems.begin(); iter != bitems.end(); ++iter ) + { + SortedTemp[ (*iter)->getDirName() ] = *iter; + } + + ContextSetCompare csc; + set_intersection( tin->begin(), tin->end(), + map_range_iterator( SortedTemp.begin() ), + map_range_iterator( SortedTemp.end() ), + back_inserter( *tout ), + csc ); + } + else + { + set_intersection( tin->begin(), tin->end(), + (*bi)->getItems().begin(), (*bi)->getItems().end(), + back_inserter( *tout ), + ITEMS_KEY_COMP( (*bi)->getItems() ) ); + +// for( Tmp_t::iterator ti = tout->begin(); ti != tout->end(); ++ti ) +// { +// cerr << "intersect working... c:" << (*ti)->getURL() << endl; +// } + } + tin->clear(); + swap( tin, tout ); + } + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { +// if( shouldInsertContext( *ti ) ) + cascadedInsert( GetImpl(*ti) , false ); + + if( m_isCannibal ) + { +// cerr << "SetIntersectionContext::setup() cannibal start sz:" +// << m_baseContexts.size() << endl; + + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); + bi != m_baseContexts.end(); ++bi ) + { + fh_context c = *bi; + if( ManyBaseToOneViewContext* bc + = dynamic_cast( GetImpl(c) )) + { + bc->cannibalRemove( GetImpl(*ti) ); + } + } +// cerr << "SetIntersectionContext::setup() cannibal end" << endl; + } + } + + _Base::setup(); + updateViewForCannibalizm(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + SetSymmetricDifferenceContext::SetSymmetricDifferenceContext( + fh_context parent, + fh_context ctx, + bool isCannibal ) + : + _Base( parent, ctx, isCannibal ) + {} + + SetSymmetricDifferenceContext::~SetSymmetricDifferenceContext() + {} + + void + SetSymmetricDifferenceContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new SetSymmetricDifferenceContext( this, c ); + Insert( GetImpl(cc), created ); + } + + bool + SetSymmetricDifferenceContext::shouldInsertContext( const fh_context& c, bool created ) + { + string rdn = c->getDirName(); + + // dont bind it twice for ourself. + if( priv_discoveredSubContext( rdn, created ) ) + return false; + + // + // set_sym_diff should be true if the new context is only bound in exactly + // one of the base contexts + // + int count = 0; + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); bi != m_baseContexts.end(); ++bi ) + { + if( (*bi)->isSubContextBound( rdn )) + ++count; + } + return count == 1; + } + + void + SetSymmetricDifferenceContext::setup() + { + if( hasSetupBeenCalled() ) + return; + + LG_CTX_D << "SetSymmetricDifferenceContext::setup() base.sz:" << m_baseContexts.size() << endl; + + bool differentSorting = allBaseContextsUseSameSorting(); + typedef list< fh_context > Tmp_t; + Tmp_t tmp1; + Tmp_t tmp2; + Tmp_t* tin = &tmp1; + Tmp_t* tout = &tmp2; + + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); bi != m_baseContexts.end(); ++bi ) + { + (*bi)->read(); + if( differentSorting ) + { + // + // We have to create a temporary set which is sorted by name and use that ordering in + // each set_intersection() call + // + typedef map< string, fh_context > SortedTemp_t; + SortedTemp_t SortedTemp; + Items_t& bitems = (*bi)->getItems(); + + for( Items_t::iterator iter = bitems.begin(); iter != bitems.end(); ++iter ) + { + SortedTemp[ (*iter)->getDirName() ] = *iter; + } + + ContextSetCompare csc; + set_symmetric_difference( tin->begin(), tin->end(), + map_range_iterator( SortedTemp.begin() ), + map_range_iterator( SortedTemp.end() ), + back_inserter( *tout ), + csc ); + } + else + { + LG_CTX_D << "set_symmetric_difference() same sorting order. bi:" << (*bi)->getURL() << endl; + set_symmetric_difference( tin->begin(), tin->end(), + (*bi)->getItems().begin(), (*bi)->getItems().end(), + back_inserter( *tout ), + ITEMS_KEY_COMP( (*bi)->getItems() ) ); + +// for( Tmp_t::iterator ti = tout->begin(); ti != tout->end(); ++ti ) +// { +// cerr << "sym_diff working... c:" << (*ti)->getURL() << endl; +// } + + } + swap( tin, tout ); + tout->clear(); + } + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { + LG_CTX_D << "sym_diff setup():" << (*ti)->getURL() << endl; + } + + for( Tmp_t::iterator ti = tin->begin(); ti != tin->end(); ++ti ) + { +// if( shouldInsertContext( *ti ) ) + cascadedInsert( GetImpl(*ti) , false ); + } + + _Base::setup(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ManyBaseToOneChainedViewContext::ManyBaseToOneChainedViewContext( + fh_context parent, + fh_context ctx, + bool isCannibal ) + : + _Base( parent, ctx, isCannibal ) + {} + + ManyBaseToOneChainedViewContext::~ManyBaseToOneChainedViewContext() + {} + + + void + ManyBaseToOneChainedViewContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new ManyBaseToOneChainedViewContext( this, c ); + Insert( GetImpl(cc), created ); + } + + bool + ManyBaseToOneChainedViewContext::shouldInsertContext( const fh_context& c, bool created ) + { + return priv_discoveredSubContext( c->getDirName(), created ); + } + + void + ManyBaseToOneChainedViewContext::setup() + { + if( hasSetupBeenCalled() ) + return; + + for( m_baseContexts_t::iterator bi = m_baseContexts.begin(); bi != m_baseContexts.end(); ++bi ) + { + (*bi)->read(); + Items_t& bitems = (*bi)->getItems(); + for( Items_t::iterator iter = bitems.begin(); iter != bitems.end(); ++iter ) + { + cascadedInsert( GetImpl(*iter) , false ); + } + } + + _Base::setup(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + DiffContext::DiffContext( fh_context parent, fh_context ctx, bool isCannibal ) + : +// _Base( parent, ctx, isCannibal ) + _Base( GetImpl(parent), (std::string)"" ) + { + Delegate = ctx; + setContext( 0, ctx->getDirName() ); + common_setup( parent, ctx, isCannibal ); + + m_runidiff = new Runner(); + m_runidiff->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_LEAVE_DESCRIPTORS_OPEN | +// G_SPAWN_FILE_AND_ARGV_ZERO | + G_SPAWN_STDERR_TO_DEV_NULL | +// G_SPAWN_STDOUT_TO_DEV_NULL | + m_runidiff->getSpawnFlags())); + } + + DiffContext::~DiffContext() + {} + + std::string + DiffContext::getURL() + { + fh_stringstream ss; + ss << "diff://"; + if( !m_baseContexts.empty() ) + { + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + ss << (*bi)->getURL(); + ++bi; + if( bi != m_baseContexts.end() ) + { + ss << (*bi)->getURL(); + } + } + return tostr(ss); + } + + DiffContext* + DiffContext::getParentDiffContext() + { + Context* c = getParent(); + return dynamic_cast(c); + } + + + bool + DiffContext::haveTwoContexts( DiffContext* c ) + { + bool ret = false; + string rdn = c->getDirName(); + + if( !m_baseContexts.empty() ) + { + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + if( (*bi)->isSubContextBound( rdn )) + { + ++bi; + if( (*bi)->isSubContextBound( rdn )) + { + ret = true; + } + } + } + return ret; + } + + + fh_context DiffContext::getFirstContext( DiffContext* c ) + { + if( m_baseContexts.empty() ) + return 0; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + return (*bi)->getSubContext( c->getDirName() ); + } + + fh_context DiffContext::getSecondContext( DiffContext* c ) + { + if( m_baseContexts.size() < 2 ) + return 0; + + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + ++bi; + return (*bi)->getSubContext( c->getDirName() ); + } + + + fh_stringstream + DiffContext::SL_wasCreated( DiffContext* c, const std::string& ean, EA_Atom* atom ) + { + bool ret = false; + string rdn = c->getDirName(); + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + if( !m_baseContexts.empty() ) + { + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + ++bi; + if( !(*bi)->isSubContextBound( rdn )) + { + ret = true; + } + } + + fh_stringstream ss; + ss << ret; + return ss; + } + + fh_stringstream + DiffContext::SL_wasDeleted( DiffContext* c, const std::string& ean, EA_Atom* atom ) + { + bool ret = false; + + string rdn = c->getDirName(); + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + if( !m_baseContexts.empty() ) + { + m_baseContexts_t::iterator bi = m_baseContexts.begin(); + if( !(*bi)->isSubContextBound( rdn )) + { + LG_CTX_D << "DiffContext::SL_wasDeleted bi:" << (*bi)->getURL() + << " rdn:" << rdn + << " c:" << c->getURL() << endl; + + ret = true; + } + } + + fh_stringstream ss; + ss << ret; + return ss; + } + + fh_stringstream + DiffContext::SL_isSame( DiffContext* c, const std::string& ean, EA_Atom* atom ) + { + bool ret = false; + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + if( p->haveTwoContexts( c ) ) + { + fh_stringstream cmdss; + cmdss << getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_K, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_DEFAULT ) + << " " << p->getFirstContext( c )->getDirPath() + << " " << p->getSecondContext( c )->getDirPath(); + + LG_CTX_D << "diff command:" << tostr(cmdss) << endl; + m_runidiff->setCommandLine( tostr(cmdss) ); + m_runidiff->Run(); + gint e = m_runidiff->getExitStatus(); + LG_CTX_D << "diff ret:" << e << endl; + + // e == 0 for no diff, e == 1 for diff, e == 2 for error + ret = (e==0); + } + + LG_CTX_D << "DiffContext::SL_isSame() c:" << c->getURL() << " ret:" << ret << endl; + + fh_stringstream ss; + ss << ret; + return ss; + } + + fh_stringstream + DiffContext::SL_isSameBytes( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + bool ret = true; + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + if( !p->haveTwoContexts( c ) ) + { + ret = false; + } + else + { + fh_context fc = p->getFirstContext( c ); + fh_context sc = p->getSecondContext( c ); + + fh_istream fiss = fc->getIStream(); + fh_istream siss = sc->getIStream(); + string fs; + string ss; + + // compare front (fiss) with second (siss) istreams + while( getline( fiss, fs ) && getline( siss, ss ) ) + { + if( fs != ss ) + { + ret = false; + break; + } + } + } + + fh_stringstream ss; + ss << ret; + return ss; + } + + fh_stringstream + DiffContext::SL_getUniDiff_Native( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + fh_stringstream cmdss; + cmdss << getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_K, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_DEFAULT ) + << " " << p->getFirstContext( c )->getDirPath() + << " " << p->getSecondContext( c )->getDirPath(); + m_runidiff->setCommandLine( tostr(cmdss) ); + m_runidiff->Run(); + + fh_istream outss = m_runidiff->getStdOut(); + + for( string s; getline( outss, s ); ) + { + LG_CTX_D << "diff line:" << s << endl; + ss << s << endl; + } + + LG_CTX_D << "SL_getUniDiff cmd:" << tostr(cmdss) + << " out:" << tostr(ss) + << endl; + + gint e = m_runidiff->getExitStatus(); + // e == 0 for no diff, e == 1 for diff, e == 2 for error + LG_CTX_D << "SL_getUniDiff() cmd:" << tostr(cmdss) + << " e:" << e + << endl; + +// if( e == 1 ) + + return ss; + } + + fh_stringstream + DiffContext::SL_getUniDiff_Remote( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + fh_context c1 = p->getFirstContext( c ); + fh_context c2 = p->getSecondContext( c ); + +#ifdef HAVE_NO_DEV_FD_INTERFACE + fh_stringstream ss; + ss << "System lacks support for /dev/fd so unidiffs can only be" + << " done for local files" + << " for c1:" << c1->getURL() + << " c2:" << c2->getURL() << endl; + Throw_CanNotGetStream( tostr(ss), c ); +#endif + + + // + // This seems a little tricky at first, + // basically we create two fcat subprocs: one for each of the files + // then we use /dev/fd/ to pass open file descriptors to diff which + // are connected to the stdout of each of the fcat commands. + // We then read the stdout of the diff proc to be the unidiff result + // + + fh_runner fcat_runner1 = new Runner(); + fcat_runner1->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL | fcat_runner1->getSpawnFlags())); + fh_runner fcat_runner2 = new Runner(); + fcat_runner2->setSpawnFlags( GSpawnFlags( fcat_runner1->getSpawnFlags())); + + fcat_runner1->setCommandLine( "fcat " + c1->getURL() ); + fcat_runner1->Run(); + int fcat_stdout_fd1 = fcat_runner1->getStdOutFd(); + fcat_runner2->setCommandLine( "fcat " + c2->getURL() ); + fcat_runner2->Run(); + int fcat_stdout_fd2 = fcat_runner2->getStdOutFd(); + + // + // now we need to hookup the fcat fds to the args of diff using /dev/fd/ + // and then read diffs result + // + fh_stringstream cmdss; + cmdss << getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_K, + CFG_ATTRIBUTES_GNU_DIFF_CMD_FILES_DEFAULT ) + << " /dev/fd/" << fcat_stdout_fd1 + << " /dev/fd/" << fcat_stdout_fd2; + m_runidiff->setCommandLine( tostr(cmdss) ); + m_runidiff->Run(); + + fh_istream outss = m_runidiff->getStdOut(); + for( string s; getline( outss, s ); ) + { + LG_CTX_D << "diff line:" << s << endl; + ss << s << endl; + } + gint e = m_runidiff->getExitStatus(); + // e == 0 for no diff, e == 1 for diff, e == 2 for error + if( e > 1 ) + { + // Oh no. + fh_stringstream ss; + ss << "Error getting unidiff e:" << e + << " for c1:" << c1->getURL() + << " c2:" << c2->getURL() << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + return ss; + } + + fh_stringstream + DiffContext::SL_getUniDiff( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + + if( p->haveTwoContexts( c ) ) + { + if( isTrue( getStrAttr( p->getFirstContext( c ), "is-native", "no" )) + && isTrue( getStrAttr( p->getSecondContext( c ), "is-native", "no" )) ) + { + return SL_getUniDiff_Native( c, rdn, atom ); + } + else + { + return SL_getUniDiff_Remote( c, rdn, atom ); + } + } + + fh_stringstream ss; + return ss; + } + + fh_stringstream + DiffContext::SL_getDifferentLineCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + int lineCount = 0; + string s; + + fh_stringstream unidiff = SL_getUniDiff( c, rdn, atom ); + while( getline( unidiff, s ) ) + { + if( starts_with( s, "+++ " ) || starts_with( s, "--- " ) ) + continue; + + if( starts_with( s, "+" ) || starts_with( s, "-" ) ) + { + LG_CTX_D << "lc++:" << s << endl; + ++lineCount; + } + } + + fh_stringstream ss; + ss << lineCount; + return ss; + } + + fh_stringstream + DiffContext::SL_getLinesAddedCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + int lineCount = 0; + string s; + + fh_stringstream unidiff = SL_getUniDiff( c, rdn, atom ); + while( getline( unidiff, s ) ) + { + if( starts_with( s, "+" ) && !starts_with( s, "+++" ) ) + { + ++lineCount; + } + } + + fh_stringstream ss; + ss << lineCount; + return ss; + } + + fh_stringstream + DiffContext::SL_getLinesRemovedCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ) + { + DiffContext* p = c->getParentDiffContext(); + m_baseContexts_t& m_baseContexts = p->m_baseContexts; + fh_runner& m_runidiff = p->m_runidiff; + int lineCount = 0; + string s; + + fh_stringstream unidiff = SL_getUniDiff( c, rdn, atom ); + while( getline( unidiff, s ) ) + { + if( starts_with( s, "-" ) && !starts_with( s, "---" ) ) + { + ++lineCount; + } + } + + fh_stringstream ss; + ss << lineCount; + return ss; + } + + + + + void + DiffContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + + SLEA( "was-created", &DiffContext::SL_wasCreated, XSD_BASIC_BOOL ); + SLEA( "was-deleted", &DiffContext::SL_wasDeleted, XSD_BASIC_BOOL ); + SLEA( "is-same", &DiffContext::SL_isSame, XSD_BASIC_BOOL ); + SLEA( "is-same-bytes",&DiffContext::SL_isSameBytes, XSD_BASIC_BOOL ); + SLEA( "unidiff", &DiffContext::SL_getUniDiff, XSD_BASIC_STRING ); + SLEA( "different-line-count", + &DiffContext::SL_getDifferentLineCount, XSD_BASIC_INT ); + SLEA( "lines-added-count", &DiffContext::SL_getLinesAddedCount, XSD_BASIC_INT ); + SLEA( "lines-removed-count", &DiffContext::SL_getLinesRemovedCount, XSD_BASIC_INT ); + +#undef SLEA + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + bool + DiffContext::shouldInsertContext( const fh_context& c, bool created ) + { + return _Base::shouldInsertContext( c, created ); + } + + void + DiffContext::cascadedInsert( Context* c, bool created ) + { + fh_context cc = new DiffContext( this, c ); + Insert( GetImpl(cc), created ); + } + + void + DiffContext::setup() + { + createStateLessAttributes(); + _Base::setup(); + } + + + std::string + DiffContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + std::string ret = def; + + LG_CTX_D << "DiffContext::private_getStrAttr(top) rdn:" << rdn << endl; + + if( rdn == "ea-names" ) + { + LG_CTX_D << "DiffContext::private_getStrAttr(ea-names)" << endl; + + AttributeCollection::AttributeNames_t an; + getAttributeNames( an ); + if( an.empty() ) return def; + if( !getAllLines ) return *(an.begin()); + + fh_stringstream ss; + ss << Util::createCommaSeperatedList( an ); + return tostr(ss); + } + + try + { + ret = Delegate->private_getStrAttr( rdn, def, getAllLines, true ); + return ret; + } + catch( exception& e ) + { + return _DontDelegateBase::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + } + + fh_attribute + DiffContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) + { + fh_attribute ret = 0; + + LG_CTX_D << "DiffContext::getAttribute(top) rdn:" << rdn << endl; + + if( rdn == "ea-names" ) + { + fh_attribute ret = _DontDelegateBase::getAttribute( rdn ); + fh_istream iss = ret->getIStream(); + return ret; + } + + try + { + ret = Delegate->getAttribute( rdn ); + if( ret ) + { + return ret; + } + } + catch( exception& e ) + {} + + return _DontDelegateBase::getAttribute( rdn ); + } + + AttributeCollection::AttributeNames_t& + DiffContext::getAttributeNames( AttributeNames_t& ret ) + { + LG_CTX_D << "DiffContext::getAttributeNames()" << endl; + + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + Delegate->getAttributeNames( t1 ); + _DontDelegateBase::getAttributeNames( t2 ); + return mergeAttributeNames( ret, t1, t2 ); + } + + int + DiffContext::getAttributeCount() + { + AttributeCollection::AttributeNames_t tmp; + getAttributeNames( tmp ); + return tmp.size(); + } + + bool + DiffContext::isAttributeBound( const std::string& rdn, bool createIfNotThere ) + throw( NoSuchAttribute ) + { + bool ret = Delegate->isAttributeBound( rdn, createIfNotThere ); + if( !ret ) + { + return _DontDelegateBase::isAttributeBound( rdn, createIfNotThere ); + } + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + template + fh_context MakeManyToOneContext( const fh_context& parent, + std::list< fh_context > contextList, + bool isCannibal = false ) + { + if( contextList.empty() ) + { + fh_stringstream ss; + ss << "Can't make a many to one context without any contextlist to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + + std::list< fh_context >::iterator li = contextList.begin(); + fh_context self = *li; + T* ret = new T( parent, self, isCannibal ); + + for( ++li; li != contextList.end(); ++li ) + { + ret->appendToBaseContexts( *li ); + } + + ret->setup(); + return ret; + } + + fh_context MakeUnionContext( const fh_context& parent, + std::list< fh_context > unionContexts ) + { + if( unionContexts.empty() ) + { + fh_stringstream ss; + ss << "Can't make a union context without any unionContexts to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + return MakeManyToOneContext< UnionContext >( parent, unionContexts ); + } + + fh_context MakeSetDifferenceContext( const fh_context& parent, + std::list< fh_context > sdContexts ) + { + if( sdContexts.empty() ) + { + fh_stringstream ss; + ss << "Can't make a set difference context without any sdContexts to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + return MakeManyToOneContext< DifferenceContext >( parent, sdContexts ); + } + + fh_context MakeSetIntersectionContext( const fh_context& parent, + std::list< fh_context > sdContexts, + bool isCannibal ) + { + if( sdContexts.empty() ) + { + fh_stringstream ss; + ss << "Can't make a set intersection context without any sdContexts to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + return MakeManyToOneContext< SetIntersectionContext >( parent, sdContexts, isCannibal ); + } + + fh_context MakeSetSymmetricDifferenceContext( const fh_context& parent, + std::list< fh_context > sdContexts ) + { + if( sdContexts.empty() ) + { + fh_stringstream ss; + ss << "Can't make a set symmetric difference context without any sdContexts to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + return MakeManyToOneContext< SetSymmetricDifferenceContext >( parent, sdContexts ); + } + + fh_context MakeManyBaseToOneChainedViewContext( const fh_context& c ) + { + std::list< fh_context > sdContexts; + sdContexts.push_back( c ); + return MakeManyToOneContext< ManyBaseToOneChainedViewContext > + ( c->getParent(), sdContexts ); + } + + fh_context MakeDiffContext( const fh_context& parent, + std::list< fh_context > sdContexts ) + { + if( sdContexts.size() < 2 ) + { + fh_stringstream ss; + ss << "Can't make a set diff context without 2 or more sdContexts to use" + << " as a model" << endl; + Throw_BadParam( tostr(ss), 0 ); + } + return MakeManyToOneContext< DiffContext >( parent, sdContexts ); + } + + + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * A context that will pass on requests for attributes to the parent + * if they are not bound at this context. + */ + class FERRISEXP_DLLLOCAL InheritingEAContext + : + public ChainedViewContext + { + public: + + InheritingEAContext( Context* theParent, const fh_context& ctx ); + virtual ~InheritingEAContext(); + + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + virtual void read( bool force = 0 ); + + // Setup is only to be called from the factory function! + void setup(); + + protected: + + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + void wrapInsert( const fh_context& c, bool created = false ) + { + string rdn = c->getDirName(); + + if( !priv_discoveredSubContext( rdn, created ) ) + { + fh_context cc = new InheritingEAContext( this, c ); + Insert( GetImpl(cc), created ); + } + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** Handle ability to have local attributes aswell as those of delegate ********/ + /********************************************************************************/ + + int getNumberOfLocalAttributes(); + std::list< std::string >& getLocalAttributeNames(); + + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + public: + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + }; + + FERRISEXP_DLLLOCAL bool isInheritingContext( Context* c ) + { + if( dynamic_cast(c) ) + return true; + return false; + } + + InheritingEAContext::InheritingEAContext( Context* theParent, + const fh_context& ctx ) + : + ChainedViewContext(ctx, false) + { + Context* p = theParent; + if( !p && ctx->isParentBound() ) + p = ctx->getParent(); + + setContext( p, ctx->getDirName() ); + } + + InheritingEAContext::~InheritingEAContext() + { + } + +/** + * Perform initial setup of items based on the matching predicate. Note that the + * caller *MUST* hold a reference to the object for this call to work. + */ + void + InheritingEAContext::setup() + { + LG_FILTERPARSE_D << "======= InheritingEAContext::setup() ==========" << endl; + SubContextNames_t ls = Delegate->getSubContextNames(); + + for( SubContextNames_t::iterator iter = ls.begin(); iter != ls.end(); iter++ ) + { + try { + LG_FILTERPARSE_D << "Testing name:" << *iter << endl; + fh_context c = Delegate->getSubContext( *iter ); + wrapInsert( c ); + } + catch(NoSuchSubContext& e) + { + LG_CTX_ER << "InheritingEAContext::InheritingEAContext() " + << "Context:" << *iter + << " advertised but not presentable!" + << " e:" << e.what() + << endl; + } + } + + SetupEventConnections(); + } + + void + InheritingEAContext::read( bool force ) + { + if( ReadingDir ) + return; + + EnsureStartStopReadingIsFiredRAII _raii1( this ); + ReadingDirRAII __raiird1( this, true ); + + if( !HaveReadDir ) + { + HaveReadDir = true; + Delegate->read(); + setup(); + } + else + { + emitExistsEventForEachItem(); + } + } + + void + InheritingEAContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + Emit_Deleted( ev, newdn, olddn, 0 ); + Remove( ev->getSource()->getSubContext( olddn ) ); + } + + void + InheritingEAContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + LG_CTX_D << "InheritingEAContext::OnCreated() " << endl; +// fh_context subc = ev->getSource()->getSubContext( olddn ); + wrapInsert( subc, true ); + } + + void + InheritingEAContext::OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + wrapInsert( subc ); + } + + +/** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + InheritingEAContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << endl; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + std::string + InheritingEAContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { +// cerr << "InheritingEAContext::private_getStrAttr() rdn:" << rdn << endl; + + std::string ret = def; + + try + { + ret = Delegate->private_getStrAttr( rdn, def, getAllLines, true ); + return ret; + } + catch( exception& e ) + { + if( !isParentBound() ) + throw; + return getParent()->private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + } + + fh_attribute + InheritingEAContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) + { +// cerr << "InheritingEAContext::getAttribute() rdn:" << rdn << endl; + + fh_attribute ret = 0; + + try + { + ret = Delegate->getAttribute( rdn ); + if( ret ) + { +// cerr << "InheritingEAContext::getAttribute(found in del) rdn:" << rdn +// << " value:" << getStrAttr( Delegate, rdn, "" ) +// << endl; + return ret; + } + } + catch( exception& e ) + { + if( !isParentBound() ) + throw; + } + + if( !isParentBound() ) + { + fh_stringstream ss; + ss << "No attribute found for ea:" << rdn + << " on context:" << getURL() << endl; + Throw_NoSuchAttribute( tostr(ss), 0 ); + } +// cerr << "InheritingEAContext::getAttribute(passing to pnt) rdn:" << rdn << endl; + return getParent()->getAttribute( rdn ); + } + + AttributeCollection::AttributeNames_t& + InheritingEAContext::getAttributeNames( AttributeNames_t& ret ) + { + if( isParentBound() ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + Delegate->getAttributeNames( t1 ); + getParent()->getAttributeNames( t2 ); + return mergeAttributeNames( ret, t1, t2 ); + } + return Delegate->getAttributeNames( ret ); + } + + int + InheritingEAContext::getAttributeCount() + { + AttributeCollection::AttributeNames_t tmp; + getAttributeNames( tmp ); + return tmp.size(); + } + + bool + InheritingEAContext::isAttributeBound( const std::string& rdn, bool createIfNotThere ) + throw( NoSuchAttribute ) + { +// cerr << "InheritingEAContext::isAttributeBound() rdn:" << rdn << endl; + + bool ret = Delegate->isAttributeBound( rdn, createIfNotThere ); +// // PURE DEBUG +// if( starts_with( rdn, "gtk" ) ) +// { +// cerr << "InheritingEAContext::isAttributeBound(DEBUG) rdn:" << rdn +// << " this:" << getURL() +// << " Delegate:" << Delegate->getURL() << endl +// << " d.value:" << getStrAttr( Delegate, rdn, "" ) +// << " ret:" << ret +// << " parent:" << ( isParentBound() ? getParent()->getURL() : "" ) +// << " p.value:" << ( isParentBound() ? getStrAttr( getParent(), rdn, "" ) : "" ) +// << endl; +// if( starts_with( rdn, "gtk-cell-renderer-name" )) +// cerr << "ea-names:" << getStrAttr( Delegate, "ea-names", "" ) << endl; +// } + + if( !ret && isParentBound() ) + { +// cerr << "InheritingEAContext::isAttributeBound(trying parent) rdn:" << rdn << endl; + return getParent()->isAttributeBound( rdn, createIfNotThere ); + } + return ret; + } + + + + namespace Factory + { + fh_contextlist MakeContextList() + { + std::list< fh_context > dummy; + return MakeContextList( dummy.begin(), dummy.end() ); + } + fh_context makeInheritingEAContext( fh_context ctx ) + { + InheritingEAContext* c = new InheritingEAContext( 0, ctx ); + fh_context ret; + Upcast( ret, c ); + c->setup(); + c->setIsChainedViewContextRoot(); + return ret; + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class DelayedCommitParentContext; + class FERRISEXP_API DelayedCommitContext + : + public leafContext + { + typedef DelayedCommitContext _Self; + typedef leafContext _Base; + + typedef map< string, string > m_attributesToUpdate_t; + m_attributesToUpdate_t m_attributesToUpdate; + + protected: + public: + DelayedCommitContext( Context* parent, std::string rdn, fh_context md ); + virtual ~DelayedCommitContext(); + + ferris_ios::openmode + getSupportedOpenModes() + { + return ios::in | ios::out | ios::binary | ios::ate | ios::trunc; + } + + virtual fh_iostream real_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + fh_stringstream ss; + return ss; + } + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + return real_getIOStream( m ); + } + + virtual fh_iostream priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + return real_getIOStream( m ); + } + + + virtual fh_context + createSubContext( const std::string& rdn, + fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual fh_context SubCreate_ea( fh_context c, fh_context md ) + { + LG_PG_W << "XXXXXXX SubCreate_ea() " << endl; + } + + + void + priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + LG_PG_D << "priv_FillCreateSubContextSchemaParts(SETUP)" << endl; + m["ea"] = SubContextCreator( + SL_SubCreate_ea, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + fh_iostream process_delayed_updates_GetIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + return ss; + } + + void process_delayed_updates_IOStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream iss ) + { + // now we must commit updates to the base context... + + LG_PG_D << "IOStreamClosed() MUST COMMIT" << endl; + + for( m_attributesToUpdate_t::iterator iter = m_attributesToUpdate.begin(); + iter != m_attributesToUpdate.end(); ++iter ) + { + LG_PG_D << "m_attributesToUpdate[" << iter->first << "] = " << iter->second << endl; + } + + fh_context p = getParent(); + ChainedViewContext* pcvc = dynamic_cast( GetImpl(p) ); + fh_context del = pcvc->getDelegate(); + LG_PG_D << "del:" << del->getURL() << endl; + + + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "tuple", "" ); + for( m_attributesToUpdate_t::iterator iter = m_attributesToUpdate.begin(); + iter != m_attributesToUpdate.end(); ++iter ) + { + child->setChild( iter->first, iter->second ); + } + del->createSubContext( "", md ); + LG_PG_D << "IOStreamClosed() COMMITED!" << endl; + } + + + fh_iostream attributesToUpdate_GetIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + LG_PG_D << "attributesToUpdate_GetIOStream() rdn:" << rdn << endl; + return ss; + } + + void attributesToUpdate_IOStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream iss ) + { + LG_PG_D << "attributesToUpdate_IOStreamClosed() c:" << c->getURL() << endl; + const string s = StreamToString(iss); + LG_PG_D << "attributesToUpdate_IOStreamClosed() c:" << c->getURL() + << " rdn:" << rdn << " s:" << s << endl; + m_attributesToUpdate[ rdn ] = s; + } + + }; + + DelayedCommitContext::DelayedCommitContext( Context* parent, std::string rdn, fh_context md ) + : + _Base( parent, rdn ) + { + addAttribute( (string)"ferris-process-delayed-updates", + this, &_Self::process_delayed_updates_GetIOStream, + this, &_Self::process_delayed_updates_GetIOStream, + this, &_Self::process_delayed_updates_IOStreamClosed ); + LG_PG_D << "DelayedCommitContext() rdn:" << rdn << " parent:" << parent->getURL() << endl; + } + + DelayedCommitContext::~DelayedCommitContext() + { + } + + fh_context + DelayedCommitContext::createSubContext( const std::string& _rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + LG_PG_D << "DelayedCommitContext::createSubContext(TOP) _rdn:" << _rdn << endl; + fh_context mdf = md->getSubContext("ea"); + string rdn = getStrSubCtx( mdf, "name", "" ); + string v = getStrSubCtx( mdf, "value", "" ); + LG_PG_D << "DelayedCommitContext::createSubContext(TOP) rdn:" << rdn << " v:" << v << endl; + + m_attributesToUpdate[ rdn ] = v; + addAttribute( rdn, + this, &_Self::attributesToUpdate_GetIOStream, + this, &_Self::attributesToUpdate_GetIOStream, + this, &_Self::attributesToUpdate_IOStreamClosed ); + return this; + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + class FERRISEXP_API DelayedCommitParentContext + : + public ChainedViewContext + { + typedef DelayedCommitParentContext _Self; + typedef ChainedViewContext _Base; + protected: + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + public: + DelayedCommitParentContext( const fh_context& ctx ); + virtual ~DelayedCommitParentContext(); + +// virtual fh_context +// createSubContext( const std::string& rdn, fh_context md = 0 ) +// throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual bool isDir() + { + return true; + } + + + virtual void read( bool force = 0 ); + + virtual fh_context + createSubContext( const std::string& rdn, + fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual bool supportsRemove() + { + return true; + } + + virtual void priv_remove( fh_context c_ctx ) + { + LG_PG_D << "priv_remove() c_ctx:" << c_ctx->getURL() << endl; + string rdn = c_ctx->getDirName(); + if( Delegate->isSubContextBound( rdn )) + { + fh_context subc = Delegate->getSubContext( rdn ); + Delegate->priv_remove( subc ); + } + } + + }; + + DelayedCommitParentContext::DelayedCommitParentContext( const fh_context& ctx ) + : + ChainedViewContext( ctx ) + { + LG_PG_D << "DelayedCommitParentContext(1) c:" << ctx->getURL() << endl; + createStateLessAttributes(); + LG_PG_D << "DelayedCommitParentContext(2) c:" << ctx->getURL() << endl; + } + + DelayedCommitParentContext::~DelayedCommitParentContext() + { + } + + fh_context + DelayedCommitParentContext::createSubContext( const std::string& _rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + if( md->isSubContextBound("ea")) + return this; + + fh_context mdf = md->getSubContext("file"); + string rdn = getStrSubCtx( mdf, "name", "" ); + LG_PG_D << "DelayedCommitParentContext::createSubContext(TOP) _rdn:" << _rdn << endl; + LG_PG_D << "DelayedCommitParentContext::createSubContext(TOP) rdn:" << rdn << endl; + + try + { +// LG_PG_D << "DelayedCommitParentContext::createSubContext(1) rdn:" << rdn << endl; +// fh_context dc = Delegate->createSubContext( rdn, md ); +// LG_PG_D << "DelayedCommitParentContext::createSubContext(2) rdn:" << rdn << endl; +// fh_context ret = new DelayedCommitContext( dc, this ); +// LG_PG_D << "DelayedCommitParentContext::createSubContext(3) rdn:" << rdn +// << " dc:" << GetImpl(dc) << " ret:" << GetImpl(ret) +// << endl; +// return ret; + + + LG_PG_D << "DelayedCommitParentContext::createSubContext(1) rdn:" << rdn << endl; +// fh_context dc = Delegate->createSubContext( rdn, md ); + LG_PG_D << "DelayedCommitParentContext::createSubContext(2) rdn:" << rdn << endl; + fh_context ret = new DelayedCommitContext( this, rdn, md ); + Insert( GetImpl( ret ), true ); + LG_PG_D << "DelayedCommitParentContext::createSubContext(3) rdn:" << rdn +// << " dc:" << GetImpl(dc) + << " ret:" << GetImpl(ret) + << " ret.url:" << ret->getURL() + << endl; + return ret; + + } + catch( exception& e ) + { + LG_PG_D << "error:" << e.what() << endl; + throw; + } + } + + void + DelayedCommitParentContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + Delegate->priv_FillCreateSubContextSchemaParts( m ); + } + + void + DelayedCommitParentContext::read( bool force ) + { + LG_PG_D << "DelayedCommitParentContext::priv_read()" << endl; + + if( !force && Delegate->HaveReadDir && Delegate->isActiveView() ) + { + if( !getItems().empty() ) + { + LG_CTX_D << "CacheContext::read( bool force " << force << " )" + << " shorting out attempt to read() because we are already read." + << endl; + HaveReadDir = true; + emitExistsEventForEachItem(); + return; + } + } + + clearContext(); + Delegate->read( force ); + emitExistsEventForEachItem(); + } + + + + namespace Factory + { + fh_context MakeDelayedCommitParentContext( const fh_context& c ) + { + LG_PG_D << "MakeDelayedCommitParentContext() c:" << c->getURL() << endl; + return new DelayedCommitParentContext( c ); + } + }; + + + +}; + diff --git a/Ferris/Context.hh b/Ferris/Context.hh new file mode 100644 index 0000000..437366a --- /dev/null +++ b/Ferris/Context.hh @@ -0,0 +1,1442 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Context.hh,v 1.25 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_CONTEXT_H_ + +#include +#include +#include +#include +#include +#include + +namespace Ferris +{ + FERRISEXP_API std::string monsterName( const fh_context& c, const std::string& rdn ); +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + class FERRISEXP_API mtimeNotChangedChecker + { + time_t m_old; + + public: + mtimeNotChangedChecker(); + bool operator()( Context* c ); + }; + + + + class FERRISEXP_API leafContext + : + public Context + { + protected: + + Context* priv_CreateContext( Context* parent, std::string rdn ); + virtual void priv_read(); + + leafContext(); + leafContext( Context* parent, std::string rdn ); + + + public: + + virtual ~leafContext(); + + }; + + class FERRISEXP_API leafContextWithSimpleContent + : + public leafContext + { + typedef leafContext _Base; + typedef leafContextWithSimpleContent _Self; + protected: + std::string priv_getRecommendedEA(); + virtual ferris_ios::openmode getSupportedOpenModes(); + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + void + priv_OnStreamClosed( fh_istream& ss, std::streamsize tellp, ferris_ios::openmode m ); + fh_iostream + priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + + + ////////// + + virtual fh_stringstream + real_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + std::exception) = 0; + virtual void OnStreamClosed( const std::string& s ) = 0; + + leafContextWithSimpleContent( Context* parent = 0, std::string rdn = "" ); + virtual ~leafContextWithSimpleContent(); + + public: + + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + class FakeInternalContext; +// FERRIS_SMARTPTR( FakeInternalContext, fh_fcontext ); + FERRIS_CTX_SMARTPTR( FakeInternalContext, fh_fcontext ); + + class FERRISEXP_API FakeInternalContext : + public Context + { + typedef FakeInternalContext _Self; + + protected: + + FakeInternalContext* priv_CreateContext( Context* parent, std::string rdn ); + virtual void priv_read(); + + FakeInternalContext(); + + public: + + FakeInternalContext( Context* parent, const std::string& rdn ); + virtual ~FakeInternalContext(); + + fh_fcontext addNewChild( const std::string& rdn ); + fh_context addNewChild( fh_context c ); + + /** + * If you want a new child of class T which has a constructor( pptr, rdn ) + * this method will make it for you and return an object of that class. + */ + template< class T, class ParentContext > + T* addNewChild( ParentContext* pptr, std::string rdn ) + { + T* child; + child = new T( pptr, rdn ); + fh_context cc = child; + FakeInternalContext::addNewChild( cc ); + return child; + } + + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + + /** + * This class is to be inherited from for classes that wish to create a VFS + * that has many nested subdirs and needs to be able to create files and EA + * from relative paths that point to contexts that may not yet exist. + * + * For example, calling ensureContextCreated( "usr/bin/myfile" ); + * will make usr and bin if they do not yet exist and then myfile. + */ + template < class ChildContextClass, class ParentContextClass = FakeInternalContext > + class FERRISEXP_DLLLOCAL ParentPointingTreeContext + : + public ParentContextClass + { + typedef ParentPointingTreeContext _Self; + typedef ParentPointingTreeContext< ChildContextClass, ParentContextClass > _FullSelf; + typedef ParentContextClass _Base; + + public: + + FERRIS_CTX_SMARTPTR( ChildContextClass, fh_childc ); + FERRIS_CTX_SMARTPTR( _FullSelf, fh_pptcontext ); + void ParentPointingTreeContext_clearContext() + { +// std::cerr << "ParentPointingTreeContext_clearContext() url:" << _Self::getURL() << std::endl; +// ::Ferris::BackTrace(); + _Base::clearContext(); + } + + private: + +// fh_pptcontext MainPPTContext; + +// void setMainPPTContext( fh_pptcontext v ) +// { +// MainPPTContext = v; +// } + + /** + * Create a subcontext emiting "Exists" by default or "created" signal + */ + fh_childc create( const std::string& rdn, bool created = false ) + { + if( this->priv_isSubContextBound( rdn ) ) + { + fh_context retc = this->priv_getSubContext( rdn ); + fh_childc ret = static_cast(GetImpl(retc)); + return ret; + } + + fh_childc ret = new ChildContextClass(); + { +// fh_context tmp = ret; // Hold a reference + + +// cerr << " ret:" << ((void*)GetImpl(ret)) +// << " this:" << ((void*)this) +// << " ret.rc:" << ret->ref_count +// << " this.rc:" << ref_count +// << endl; + LG_CTX_D << " ParentPointingTreeContext::create(1) this:" << (void*)this + << " omc:" << (void*)this->getOverMountContext() + << " url:" << _Self::getURL() + << " rdn:" << rdn + << std::endl; + + std::string monstered_rdn = this->monsterName( rdn ); + ret->setContext( this, monstered_rdn ); + + // Note that we REALLY can't bump the reference count up + // until the child knows its parent object so it can bump + // this->getParent() as well as itself. + fh_context tmp = ret; // Hold a reference +// cerr << " ParentPointingTreeContext::create(2) url:" << getURL() +// << " rdn:" << rdn +// << " monstered_rdn:" << monstered_rdn +// << endl; +// ret->setMainPPTContext( getMainPPTContext() ); + LG_CTX_D << "Context::create() ret:" << ret->getURL() + << " created:" << created + << std::endl; + +// cerr << "Context::create(1) ret:" << ret->getURL() +// << " created:" << created +// << std::endl; + Insert( GetImpl(ret), created, created ); +// cerr << "Context::create(2) ret:" << ret->getURL() +// << " created:" << created +// << std::endl; + this->bumpVersion(); + +// cerr << " ParentPointingTreeContext::create(3) url:" << getURL() +// << " rdn:" << rdn +// << std::endl; +// cerr << " ret:" << ((void*)GetImpl(ret)) +// << " this:" << ((void*)this) +// << " ret.rc:" << ret->ref_count +// << " this.rc:" << ref_count +// << std::endl; + } +// cerr << " ParentPointingTreeContext::create(end) url:" << getURL() +// << " rdn:" << rdn +// << std::endl; +// cerr << " ret:" << ((void*)GetImpl(ret)) +// << " this:" << ((void*)this) +// << " ret.rc:" << ret->ref_count +// << " this.rc:" << ref_count +// << std::endl; + + return ret; + } + + protected: + +// fh_pptcontext getMainPPTContext() +// { +// if( isBound( MainPPTContext )) +// return MainPPTContext; + +// return this; +// } + +// ChildContextClass* getMainContext() +// { +// if( isBound( MainPPTContext )) +// { +// Context* c = GetImpl(MainPPTContext); +// return dynamic_cast(c); +// } + +// return dynamic_cast(this); +// } + + /** + * + * @see getFirstParentOfContextClass() + */ + ChildContextClass* getBaseContext() + { + if( this->getOverMountContext() != this ) + { + ChildContextClass* c = dynamic_cast( + this->getOverMountContext()); + return c->getBaseContext(); + } + + + ChildContextClass* c = dynamic_cast(this); + while( c && c->isParentBound() ) + { + Context* p = c->getParent()->getOverMountContext(); + if(ChildContextClass* nextc = dynamic_cast( p )) + { + c = nextc; + } + else + { + return c; + } + } + return c; + } + + + virtual void ensureEACreated( + std::string xdn, + bool chopXDNatLastSlash, + fh_context md = 0, + std::list args = std::list< std::string >() + ) + { + std::string rdn = xdn; + + LG_CTX_D << "ensureEACreated() xdn:" << xdn + << " URL:" << this->getURL() << std::endl; + + if( chopXDNatLastSlash ) + { + int lastSlashPos = xdn.rfind( "/" ); + if( std::string::npos != lastSlashPos ) + { + std::string eaname = xdn.substr( lastSlashPos+1 ); + std::string path = xdn.substr( 0, lastSlashPos ); + + rdn = eaname; + } + } + +// cerr << "ensureEACreated() xdn:" << xdn +// << " rdn:" << rdn +// << " URL:" << getURL() << std::endl; + + /* If its already there, do nothing */ + if( this->isAttributeBound( rdn, false ) ) + { + LG_CTX_D << "ensureEACreated() rdn:" << rdn << " already there" << std::endl; + return; + } + + typedef EA_Atom_ReadOnly::GetIStream_Func_t FI; + typedef EA_Atom_ReadWrite::GetIOStream_Func_t FIO; + typedef EA_Atom_ReadWrite::IOStreamClosed_Func_t FCL; + + this->addAttribute( + rdn, + FI(this, &_Self::getEAStream), + FIO(this, &_Self::getEAStream), + FCL(this, &_Self::setEAStream), + FXD_BINARY, + true ); + } + + class AlreadyEmittedCacheRAII + : + public Handlable + { + Context* m_c; + public: + + typedef FERRIS_STD_HASH_SET< Context*, + f_hash, + f_equal_to > m_alreadyEmittedCache_t; + typedef FERRIS_STD_HASH_MAP< Context*, + m_alreadyEmittedCache_t*, + f_hash, + f_equal_to > s_caches_t; + AlreadyEmittedCacheRAII( ParentPointingTreeContext* c, bool clearPPTC = true ) + : + m_c( c ) + { + if( clearPPTC ) + c->ParentPointingTreeContext_clearContext(); + + //s_caches()[c].clear(); + s_caches_t::iterator sci = s_caches().find( c ); + if( sci == s_caches().end() ) + { + s_caches()[c] = new m_alreadyEmittedCache_t(); + } + else + { + s_caches()[c]->clear(); + } + ++getInstanceCount(); + +// std::cerr << "AlreadyEmittedCacheRAII::ctor() sz:" << s_caches().size() +// << " recursionCount:" << getInstanceCount() +// << " c:" << (void*)c +// << std::endl; + } + + ~AlreadyEmittedCacheRAII() + { + --getInstanceCount(); +// std::cerr << "AlreadyEmittedCacheRAII::dtor() sz:" << s_caches().size() +// << " recursionCount:" << getInstanceCount() +// << " c:" << (void*)m_c +// << std::endl; + + if( !getInstanceCount() ) + { +// for( s_caches_t::iterator ci = s_caches().begin(); +// ci != s_caches().end(); ++ci ) +// { +// Context* hc = ci->first; +// std::cerr << "AlreadyEmittedCacheRAII::dtor() hc:" << (void*)hc << std::endl; +// for( std::set< Context* >::iterator si = ci->second.begin(); +// si != ci->second.end(); ) +// { +// std::cerr << " AlreadyEmittedCacheRAII::dtor() listc:" << (void*)*si << std::endl; +// // std::set< fh_context >::iterator t = si; +// ++si; +// // ci->second.erase(t); +// } +// ci->second.clear(); +// } + + + + + +// s_caches().clear(); + s_caches_t::iterator sci = s_caches().begin(); + s_caches_t::iterator sce = s_caches().end(); + for( ; sci != sce; ) + { + m_alreadyEmittedCache_t* d = sci->second; + ++sci; + delete d; + } + s_caches().clear(); + + +// std::cerr << " AlreadyEmittedCacheRAII::dtor() cleared!" << std::endl; + } + else + { +// s_caches().erase( m_c ); + s_caches_t::iterator sci = s_caches().find( m_c ); + if( sci != s_caches().end() ) + { + m_alreadyEmittedCache_t* d = sci->second; + s_caches().erase( m_c ); + delete d; + } + } + } + + static int& getInstanceCount() + { + static int ret = 0; + return ret; + } + +// static void clearCache( Context* c ) +// { +// s_caches().erase( c ); +// } + + static m_alreadyEmittedCache_t& getCache( Context* c ) + { +// std::cerr << "getCache()" << std::endl; + +// // DEBUG +// { +// if( s_caches().end() == s_caches().find( c ) ) +// { +// std::cerr << "ERORR should have RIAA object wrapping this call!\n"; +// std::cerr << "seeking c:" << c << " earl:" << c->getURL() << std::endl; +// for( s_caches_t::iterator si = s_caches().begin(); +// si != s_caches().end(); ++si ) +// { +// std::cerr << "si:" << si->first +// << " earl:" << si->first->getURL() << std::endl; +// } +// BackTrace(); +// } +// } + +// std::cerr << "AlreadyEmittedCacheRAII::getCache() sz:" << s_caches().size() +// << " recursionCount:" << getInstanceCount() +// << " c:" << (void*)c +// << std::endl; + if( !getInstanceCount() ) + { + std::cerr << "AlreadyEmittedCacheRAII::getCache(call out of scope!)" + << " sz:" << s_caches().size() + << " recursionCount:" << getInstanceCount() + << " c:" << (void*)c + << std::endl; + ::Ferris::BackTrace(); + } +// return s_caches()[ c ]; + s_caches_t::iterator sci = s_caches().find( c ); + if( sci != s_caches().end() ) + return *sci->second; + + m_alreadyEmittedCache_t* ret = new m_alreadyEmittedCache_t(); + s_caches().insert( make_pair( c, ret )); + return *ret; + } + private: + + static s_caches_t& s_caches() + { + static s_caches_t s_caches; + return s_caches; + } + }; + FERRIS_SMARTPTR( AlreadyEmittedCacheRAII, fh_AlreadyEmittedCacheRAII ); + +// virtual void clearContext() +// { +// AlreadyEmittedCacheRAII::clearCache( this ); +// _Base::clearContext(); +// } + + void maybeEmitExists( fh_context c ) + { + if( AlreadyEmittedCacheRAII::getCache( this ).count( GetImpl(c) ) ) + { + return; + } + AlreadyEmittedCacheRAII::getCache( this ).insert( GetImpl(c) ); + + LG_CTX_D << "maybeEmitExists() this:" << this->getURL() + << " emitting exists for c:" << c->getURL() << std::endl; + this->Emit_Exists( 0, c, c->getDirName(), c->getDirName(), 0 ); + } + + + /** + * Ensure that a subcontext exists, emitting by default "existing" or if created + * is set to true, "created" signal instead. + */ + fh_childc ensureContextCreated( const std::string& xdn, bool created = false ) + { + fh_AlreadyEmittedCacheRAII _sigraii1 = 0; + if( !AlreadyEmittedCacheRAII::getInstanceCount() ) + { + _sigraii1 = new AlreadyEmittedCacheRAII( this, false ); + } + + LG_CTX_D << "ensureContextCreated xdn:" << xdn << std::endl; + + if( this->canSplitPathAtStart( xdn ) ) + { + std::pair p = this->splitPathAtStart( xdn ); + LG_CTX_D << "ensureContextCreated first:" << p.first + << " p.first.length():" << p.first.length() + << " second:" << p.second << std::endl; + + if( p.first.empty() ) + { + return ensureContextCreated( p.second, created ); + } + + fh_childc c; + Context::Items_t::iterator subc_iter; + const std::string& rdn = p.first; + + if( this->priv_isSubContextBound( rdn, subc_iter ) ) + { + LG_CTX_D << "path:" << this->getDirPath() + << " already exists for:" << rdn + << std::endl; + + fh_context child = *subc_iter; + c = dynamic_cast( GetImpl(child) ); + } + else + { + LG_CTX_D << "path:" << this->getDirPath() + << " making fake dir for:" << rdn + << std::endl; + + c = create( p.first, created ); + } + + c->setHasBeenDeleted( false ); + maybeEmitExists( c ); + return c->ensureContextCreated( p.second, created ); + } + else if( !this->priv_isSubContextBound( xdn ) ) + { + LG_CTX_D << "ensureContextCreated path:" << this->getDirPath() + << " making fake file for xdn:" << xdn + << " created:" << created + << std::endl; + + fh_childc ret = create( xdn, created ); + maybeEmitExists( ret ); +// cerr << "ensureContextCreated path:" << getDirPath() +// << " made fake file for xdn:" << xdn +// << std::endl; +// dumpOutItems(); + return ret; + } + + LG_CTX_D << "ensureContextCreated using getSubContext() xdn:" << xdn << std::endl; + + fh_context retc = this->getSubContext( xdn ); + fh_childc r = dynamic_cast(GetImpl(retc)); + + if( !isBound(r) ) + { + LG_CTX_ER << "ensureContextCreated down cast failed xdn:" << xdn + << " url:" << this->getURL() + << std::endl; +// cerr << "ensureContextCreated down cast failed xdn:" << xdn +// << " url:" << getURL() +// << std::endl; + } + r->setHasBeenDeleted( false ); + maybeEmitExists( r ); + return r; + + } + + + /** + * Create an EA or context depending on if there is a leading "/" char. + * Emit exists by default or created signal if created=true + */ + fh_childc ensureEAorContextCreated( const std::string k, bool created = false ) + { + /* EA Start with a slash and the EA rdn is the last path component */ + if( starts_with(k, "/") ) + { + std::string eaname = k; + std::string path = ""; + + int lastSlashPos = k.rfind( "/" ); + if( std::string::npos != lastSlashPos ) + { + eaname = k.substr( lastSlashPos+1 ); + path = k.substr( 0, lastSlashPos ); + } + + /* This will work because we trust that the child is who + * they claim in the code + */ + fh_childc c = dynamic_cast(this); + + if( path.length() ) + { +// cerr << "ensureEAorContextCreated() k:" << k << std::endl; +// cerr << "ensureEAorContextCreated() path:" << path << std::endl; + c = ensureContextCreated( path, created ); + } + + c->ensureEACreated( eaname, false ); + return c; + } + else + { + return ensureContextCreated( k, created ); + } + } + + + public: + + ParentPointingTreeContext( Context* parent = 0, const std::string& rdn = "" ) + : + ParentContextClass( parent, rdn ) + { + } + + virtual ~ParentPointingTreeContext() + { + } + + + virtual fh_iostream getEAStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "Attempt to get a stream from a raw getEAStream() call on " + << " a ParentPointingTreeContext. Please report this bug." + << " to create the ea:" << rdn + << " output." + << " path:" << this->getDirPath() + << std::endl; + std::cerr << tostr(ss) << std::endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + + virtual void setEAStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ) + { + } + + + }; + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + +/** + * Provides a dummy context that can have a bunch of attributes set explicity + * This is very handy for providing a coded CreateSubContext() call + */ +class FERRISEXP_API CreateMetaDataContext : + public FakeInternalContext + { + protected: + + std::string Body; + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + public: + + CreateMetaDataContext(); + virtual ~CreateMetaDataContext(); + + void setAttr( const std::string& rdn, const std::string& v ); + fh_mdcontext setChild( const std::string& rdn, const std::string& v ); + + void setBody( std::string s ); + + private: + virtual bool supportsReClaim(); +}; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * This class allows a default value to be drawn from "shadow" and that value + * to be explicitly overriden using setAttr() + */ +class FERRISEXP_API DelegatingCreateMetaDataContext : + public CreateMetaDataContext + { + typedef CreateMetaDataContext _Base; + + protected: + + fh_context shadow; + + DelegatingCreateMetaDataContext( + DelegatingCreateMetaDataContext* parent, + const fh_context& _shadow ); + + void buildCoveringTree(); + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + + public: + + DelegatingCreateMetaDataContext( const fh_context& _shadow ); + virtual ~DelegatingCreateMetaDataContext(); + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + + private: + virtual bool supportsReClaim(); + }; + + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +} + +#include + +namespace Ferris +{ + namespace Factory + { + FERRISEXP_API fh_context + MakeCachedContext( fh_context& ctx, const std::string& extradata = "" ); + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + /** + * This creates objects of type OurDirectChildrenContextClass when it needs to insert + * new elements and inherits from ParentCtx. + * + * children should call tryAugmentLocalhostNames() to add other text names for the + * localhost if they wish to add those, they can also add a host with tryAddHost() + * Both of the above calls will not add any host if TryToCheckServerExists() retuns + * an error. + * + */ + template + class FERRISEXP_DLLLOCAL networkRootContext + : + public ParentCtx + { + typedef networkRootContext _Self; + typedef ParentCtx _Base; + + + protected: + + virtual bool canInsert( const std::string& rdn ) + { + std::string s = TryToCheckServerExists( rdn ); + if( s.length() ) + { +// cerr << "networkContext::canInsert() rdn:" << rdn << " NO " << std::endl; + return false; + } + + return !_Base::priv_isSubContextBound( rdn ); + } + + + /** + * This can return a std::string with length != 0 to indicate that a server + * name is not ever going to work in the future. This is handy for database systems + * which can check somewhat quickly if a database is in existance. + * + * @returns a std::string describing the problem + */ + virtual std::string TryToCheckServerExists( const std::string& rdn ) + { + return ""; + } + + public: + + /** + * Try to add a specific host as a child. This call is + * impotent for hosts that return an error in + * TryToCheckServerExists() + * + * @throws An error if the TryToCheckServerExists() fails + */ + void tryAddHost( const std::string& hostName ) + { + LG_CTX_D << "tryAddHost() hostname:" << hostName << std::endl; + + if( canInsert( hostName )) + { + OurDirectChildrenContextClass* child; + child = new OurDirectChildrenContextClass( this, hostName ); + addNewChild( child ); + } + } + + /** + * Try to add all the text names for all interfaces of the + * local machine as subdirectories. This call is impotent for + * hosts that return an error in TryToCheckServerExists() + */ + void tryAugmentLocalhostNames() + { + LG_CTX_D << "adding localhost hostname" << std::endl; + + try + { + tryAddHost( "localhost" ); + int foo; + + } + catch( std::exception& e ) + { + LG_CTX_W << " can't add local hostname for localhost" + << " e:" << e.what() << std::endl; + } + + struct utsname buf; + if(! uname( &buf ) ) + { + std::string rdn = buf.nodename; + + LG_CTX_D << "adding localhost rdn:" << rdn << std::endl; + try + { + tryAddHost( rdn ); + } + catch( std::exception& e ) + { + LG_CTX_W << " can't add local hostname for rdn:" << rdn + << " e:" << e.what() << std::endl; + } + } + } + + + + + + virtual fh_context getSubContext( const std::string& rdn ) throw( NoSuchSubContext ) + { + if( _Base::priv_isSubContextBound( rdn )) + { + return _Base::getSubContext( rdn ); + } + + std::string s = TryToCheckServerExists( rdn ); + + if( s.length() ) + { + fh_stringstream ss; + ss << "getSubContext() can never contact the server" + << " reason:" << s + << " NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + if( !_Base::priv_isSubContextBound( rdn )) + { +// Context* c = priv_CreateContext( this, rdn ); + Context* c = new OurDirectChildrenContextClass( this, rdn ); + bool created = true; + const fh_context& ret = this->Insert( c, created ); + this->bumpVersion(); + return ret; + } + return _Base::getSubContext( rdn ); + } + + + + virtual bool isSubContextBound( const std::string& rdn ) + { + return true; + } + + networkRootContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + } + + networkRootContext( Context* parent, const std::string& rdn, bool bindall ) + : + _Base( parent, rdn ) + { + try + { + + this->AddRef(); + + if( bindall ) + { + +// cerr << " networkRootContext about to start binding all interfaces " +// << " rdn:" << rdn +// << " bindall:" << bindall +// << std::endl; + + + LG_CTX_D << "networkRootContext(enter) rdn:" << rdn << std::endl; + + OurDirectChildrenContextClass* child; + + LG_CTX_D << "adding localhost" << std::endl; + + tryAugmentLocalhostNames(); + + LG_CTX_D << "networkRootContext(done) rdn:" << rdn << std::endl; + } + + } + catch( std::exception& e ) + { + this->Release(); + throw e; + } + +// this->dumpOutItems(); + this->Release(); +// cerr << " networkRootContext DONE binding all interfaces " +// << " rdn:" << rdn +// << " bindall:" << bindall +// << std::endl; + + } + + virtual ~networkRootContext() + { + } + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + /** + * Context that allows the collection of new recommended EA when EA are + * being created. + */ + template + class FERRISEXP_DLLLOCAL RecommendedEACollectingContext + : + public ParentContext + { + typedef RecommendedEACollectingContext _Self; + typedef ParentContext _Base; + + fh_stringstream RecommentedEAStream; + + protected: + + void appendToRecommentedEA( const std::string& s ) + { + RecommentedEAStream << "," << s; + } + + virtual bool setAttribute( const std::string& rdn, + EA_Atom* atx, + bool addToREA, + XSDBasic_t sct = XSD_UNKNOWN, + bool isStateLess = false ) + throw( AttributeAlreadyInUse ) + { + bool rc = _Base::setAttribute( rdn, atx, addToREA, sct, isStateLess ); + if( rc && addToREA ) + { + appendToRecommentedEA( rdn ); + } + return rc; + } + + public: + + RecommendedEACollectingContext( Context* parent, const std::string& rdn ) + : + ParentContext( parent, rdn ) + { + RecommentedEAStream << "name"; + } + + RecommendedEACollectingContext() + { + RecommentedEAStream << "name"; + } + + virtual ~RecommendedEACollectingContext() + {} + + virtual std::string getRecommendedEA() + { + return adjustRecommendedEAForDotFiles(this, tostr(RecommentedEAStream)); + } + }; + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + template + class Statefull_Recommending_ParentPointingTree_Context + : + public + ParentPointingTreeContext< ChildContext, RecommendedEACollectingContext< ParentContext > > + { + protected: + + typedef Statefull_Recommending_ParentPointingTree_Context< + ChildContext, ParentContext > _Self; + + typedef + ParentPointingTreeContext< ChildContext, RecommendedEACollectingContext< ParentContext > > + _Base; + + public: + + Statefull_Recommending_ParentPointingTree_Context + ( Context* parent = 0, const std::string& rdn = "" ) + : + _Base( parent, rdn ) + { + /* + * NB: This line taints the ability to have stateless EA apart + * from what context et al already provide. + */ + this->createStateLessAttributes(); + } + }; + + + template + class StateLessEAHolding_Recommending_ParentPointingTree_Context + : + public + StateLessEAHolder< + /**/ ChildContext, + /**/ ParentPointingTreeContext< + /**/ ChildContext, + /**/ RecommendedEACollectingContext< ParentContext > > > + { + protected: + + typedef StateLessEAHolding_Recommending_ParentPointingTree_Context< + ChildContext, ParentContext > _Self; + + typedef + StateLessEAHolder< + /**/ ChildContext, + /**/ ParentPointingTreeContext< + /**/ ChildContext, + /**/ RecommendedEACollectingContext< ParentContext > > > + _Base; + + + public: + + StateLessEAHolding_Recommending_ParentPointingTree_Context + ( Context* parent = 0, const std::string& rdn = "" ) + : + _Base( parent, rdn ) + { + } + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + namespace Factory + { + /** + * Create a context whos parent is "parent" and whos contents is the + * set union of the children in unionContexts. + * ie. The returned context will claim to have a parent as given in "parent" + * and report the union of all the children from unionContexts as its subcontexts. + * + * The return context itself is modeled after the first context from unionContexts. + * + * parent ---------------------------- + * | \ \ + * unionContexts.1 unionContexts.2 unionContexts.3 + * | | | | | | + * uc1.a uc1.b uc2.a uc2.d uc3.b uc3.z + * + * In the above, parent is the return values parent, unionContexts.n are + * the contexts in their list order from unionContexts. The return value + * will look very similar to unionContexts.1. The children of the return + * value are groomed from ucN.x with those children sharing the same filename + * culled to only showing the first such child context. + */ + FERRISEXP_API fh_context MakeUnionContext( + const fh_context& parent, + std::list< fh_context > unionContexts ); + + + /** + * Create a context whos parent is "parent" and whos contents the result of + * applying set_difference() starting with unionContexts.1 and removing all + * contexts that appear in unionContexts.2 ... unionContexts.n + */ + FERRISEXP_API fh_context MakeSetDifferenceContext( + const fh_context& parent, + std::list< fh_context > sdContexts ); + + + /** + * Create a context whos parent is "parent" and whos contents the result of + * applying set_intersection() on all of sdContexts.1 ... sdContexts.n + */ + FERRISEXP_API fh_context MakeSetIntersectionContext( + const fh_context& parent, + std::list< fh_context > sdContexts, + bool isCannibal = false ); + + /** + * Create a context whos parent is "parent" and whos contents the result of + * applying set_symmetric_difference() on all of sdContexts.1 ... sdContexts.n + */ + FERRISEXP_API fh_context MakeSetSymmetricDifferenceContext( + const fh_context& parent, + std::list< fh_context > sdContexts ); + + /** + * Wrap the context 'c' in a simple manyToOne context. The return value + * behaves very much like the context 'c' but is a ManyBaseToOneViewContext + * subclass so that other ManyBaseToOneViewContext subclasses can have + * views based off it and cannibalize the return values contexts. + */ + FERRISEXP_API fh_context MakeManyBaseToOneChainedViewContext( + const fh_context& c ); + + + /** + * Create a context whos parent is "parent" and whos contents is the + * set union of the children in sdContexts. + * ie. The returned context will claim to have a parent as given in "parent" + * and report the union of all the children from unionContexts as its subcontexts. + * + * A "diff" style operation is performed on a per child basis and + * changes relative to the first context in sdContexts are presented as EA. + * + * parent ----------- + * | \ + * sdContexts.1 sdContexts.2 + * | | | | + * uc1.a uc1.b uc2.a uc2.d + * + * In the above, parent is the return values parent, sdContexts.n are + * the contexts in their list order from sdContexts. The return value + * will look very similar to sdContexts.1. The children of the return + * value are groomed from ucN.x with those children sharing the same filename + * culled to only showing the first such child context. + * + * The difference from the first to the second context + * object added is shown. Interesting attributes such as + * was-created + * was-deleted + * is-same + * unidiff + * different-line-count + * are added to the view and the union of both contexts is presented. + * Objects that are not in the first context will be shown with was-deleted=1 + * and new objects in the first context wil appear with was-created=1 + */ + FERRISEXP_API fh_context MakeDiffContext( + const fh_context& parent, + std::list< fh_context > sdContexts ); + + + /** + * + * Make a context which will happily "create" new files, though not pass that info + * on to the base context until later. EA can be written and updated for any new children + * and those updates will not be processed until explicitly told to do so. + * + * Note that the passed and returned context is for the parent. For example, + * passing postgresql://localhost/mydb/mytable as the argument and any new tuples + * created using the returned context will be delayed until explicitly commited. + * + * To process updates and commit then the EA ferris-process-delayed-updates must be set to 1 + * + */ + FERRISEXP_API fh_context MakeDelayedCommitParentContext( const fh_context& c ); + + }; + + class SelectionContext; + + class SelectionContextRDNConflictResolver : public Handlable + { + public: + virtual std::string getRDN( SelectionContext* selc, fh_context newChild ) = 0; + virtual fh_context createChild( SelectionContext* selc, fh_context newChild ) = 0; + }; + + FERRIS_SMARTPTR( SelectionContextRDNConflictResolver, fh_SelectionContextRDNConflictResolver ); + fh_SelectionContextRDNConflictResolver get_SelectionContextRDNConflictResolver_UseURLAsRDN(); + fh_SelectionContextRDNConflictResolver get_SelectionContextRDNConflictResolver_MonsterName(); + + + + + /** + * This context bends the rules of subcontext creation. Instead of the metadata + * context being used to describe a new context that should be created, the + * metadata context is attached as a child. + * + * This allows one to create one of these + * (via the selectionfactory://->createSubContext()) + * and then just use createSubContext on this object to attach a bunch of other + * contexts as children. Note that if one is viewing this context as a dir then + * they really should include the URL in the view so that people can see where + * the different subcontexts really come from. + */ + class FERRISEXP_API SelectionContext + : + public StateLessEAHolder< SelectionContext, FakeInternalContext > + { + typedef StateLessEAHolder< SelectionContext, FakeInternalContext > _Base; + typedef Context _BaseNoDelegate; + +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); +#endif + std::string m_reportedRDN; + fh_SelectionContextRDNConflictResolver m_rdnConflictResolver; + EAIndex::fh_fwdeaidx m_fwdidx; + + protected: + + virtual bool isDir(); + virtual void priv_read(); + + static fh_stringstream SL_getNameOnlyStream( SelectionContext* c, const std::string& ean, EA_Atom* atom ); + static fh_stringstream SL_getSelectionAddedOrderIDStream( SelectionContext* c, const std::string& ean, EA_Atom* atom ); + + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + fh_attribute + getAttribute( const std::string& _rdn ) throw( NoSuchAttribute ); + + + public: + + SelectionContext( Context* parent, const std::string& rdn ); + virtual ~SelectionContext(); + + void setSelectionContextRDNConflictResolver( fh_SelectionContextRDNConflictResolver f ); + + virtual fh_context + createSubContext( const std::string& rdn, + fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + fh_context insert( fh_context c ); + void clear(); + bool empty(); + + void createStateLessAttributes( bool force = false ); + + void setReportedRDN( const std::string& rdn ); + virtual std::string getURL(); + std::string private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ); + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (Ferris::FerrisParentNotSetError); + + void setForwardEAIndexInterface( EAIndex::fh_fwdeaidx fidx ); + EAIndex::fh_fwdeaidx getForwardEAIndexInterface(); + }; + + FERRIS_CTX_SMARTPTR( SelectionContext, fh_contextlist ); + + namespace Factory + { + /** + * Make a context that contains other contexts but doesn't really exist. + * This is very much like a "selection" as defined by + * fh_context selfactory = Resolve( "selectionfactory://" ); + * fh_context selection = selfactory->createSubContext( "" ); + * but the returned value has an explicit type and has insert() etc methods. + */ + template < class Iter > + fh_contextlist MakeContextList( Iter begin, Iter end ) + { + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + for( Iter iter = begin; iter != end; ++iter ) + selection->createSubContext( "", *iter ); + + fh_contextlist ret = dynamic_cast( GetImpl( selection )); + return ret; + } + /** + * Make an empty context list for incremental building with insert() + */ + FERRISEXP_API fh_contextlist MakeContextList(); + + + + /** + * Make a context that is like its delegate except that if an EA is not + * bound on it then it will forward the request to its parent. + * + * This method should be called on the root of a tree and it will create + * DelegatingEAContext wrappers for all of its children + * + * @param c is the delegate to use + * @return a InheritingEAContext wrapper for c. + */ + FERRISEXP_API fh_context makeInheritingEAContext( fh_context c ); + + }; + + +}; +#endif + + diff --git a/Ferris/ContextContext.cpp b/Ferris/ContextContext.cpp new file mode 100644 index 0000000..0a66707 --- /dev/null +++ b/Ferris/ContextContext.cpp @@ -0,0 +1,117 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextContext.cpp,v 1.4 2010/09/24 21:30:26 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +// required for RootContextDropper +#include + + +using namespace std; + +namespace Ferris +{ + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /** INIT STUFF ******************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ContextContext::ContextContext() + { + createStateLessAttributes(); + } + + + Context* + ContextContext::priv_CreateContext( Context* parent, string rdn ) + { + ContextContext* ret = new ContextContext(); + ret->setContext( parent, rdn ); + return ret; + } + + +class FERRISEXP_DLLLOCAL ContextVFS_RootContextDropper : public RootContextDropper +{ +public: + ContextVFS_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("context"); + RootContextFactory::Register("context", this); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static ContextContext raw_obj; + + Context* ctx = raw_obj.CreateContext( 0, "context"); + + for( RootContextFactory::Droppers_t::iterator iter = rf->getDroppers().begin(); + iter != rf->getDroppers().end(); iter++) + { +// cerr << "Adding ctx:" << iter->first << endl; + Context* child = raw_obj.CreateContext( 0, iter->first ); + ctx->Insert( child ); + } + + return ctx; + } + + +}; + +static ContextVFS_RootContextDropper ___ContextVFS_static_init; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Context names are always known. + */ +void +ContextContext::priv_read() +{ + emitExistsEventForEachItemRAII _raii1( this ); +} + + +}; diff --git a/Ferris/ContextContext.hh b/Ferris/ContextContext.hh new file mode 100644 index 0000000..cfda4cf --- /dev/null +++ b/Ferris/ContextContext.hh @@ -0,0 +1,58 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextContext.hh,v 1.2 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONTEXT_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_CONTEXT_CONTEXT_H_ + +#include +#include +#include + +namespace Ferris +{ + + + class FERRISEXP_DLLLOCAL ContextContext : public Context + { + friend class RootContextFactory; + + Context* priv_CreateContext( Context* parent, std::string rdn ); + + protected: + virtual void priv_read(); + public: + + ContextContext(); + + }; + +}; + +#endif diff --git a/Ferris/ContextIterator.cpp b/Ferris/ContextIterator.cpp new file mode 100644 index 0000000..f1254f0 --- /dev/null +++ b/Ferris/ContextIterator.cpp @@ -0,0 +1,1068 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextIterator.cpp,v 1.9 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +using namespace std; + + +namespace Ferris +{ + int ImplicitIteratorUpdateLock::lock = 0; + + ImplicitIteratorUpdateLock::ImplicitIteratorUpdateLock() + { + ++lock; + } + + ImplicitIteratorUpdateLock::~ImplicitIteratorUpdateLock() + { + --lock; + } + + bool + ImplicitIteratorUpdateLock::isTaken() + { + return lock; + } + + + template + T ForceNeg( T x ) + { + if( x >= 0 ) return -1 * x; + return x; + } + + struct FERRISEXP_DLLLOCAL ContextIteratorData_OldRdnSet : public Handlable + { + typedef vector< string > OldRdnSet_t; + OldRdnSet_t m_OldRdnSet; + VersionWatcher m_Version; + + ContextIteratorData_OldRdnSet() + { + } + + ContextIteratorData_OldRdnSet( fh_context& theParent ) + { + m_OldRdnSet.clear(); + m_OldRdnSet.reserve( theParent->getItems().size() + 2 ); + + m_Version = theParent->getDirOpVersion(); + Context::Items_t items = theParent->getSortedItems(); + Context::Items_t::iterator iter = items.begin(); + for( ; iter != items.end(); ++iter ) + { + m_OldRdnSet.push_back( (*iter)->getDirName() ); + } + } + + ContextIteratorData_OldRdnSet* + update( bool force, fh_context& theParent ) + { + if( force + || !m_Version.test( theParent->getDirOpVersion()) + || m_OldRdnSet.empty() + ) + { + return new ContextIteratorData_OldRdnSet( theParent ); + } + return 0; + } + + + string getNextRDN( const std::string& rdn ) + { + OldRdnSet_t::iterator oldrdniter + = find( m_OldRdnSet.begin(), m_OldRdnSet.end(), rdn ); + if( oldrdniter != m_OldRdnSet.end() ) + ++oldrdniter; + + string wanted_rdn = ""; + if( oldrdniter != m_OldRdnSet.end() ) + { + wanted_rdn = *oldrdniter; + } + } + }; + FERRIS_SMARTPTR( ContextIteratorData_OldRdnSet, fh_ContextIteratorData_OldRdnSet ); + + struct FERRISEXP_DLLLOCAL ContextIteratorData + { + /** + * This is what we are pointing to currently, note that we are iterating + * over the contexts in theContext's parent context. + */ + fh_context theContext; + fh_context theParent; + + /** + * A cache of theContext ie. theContext->getParent()->getSortedItems().find( rdn ); + */ + Context::Items_t::iterator theContextIterator; + + VersionWatcher Version; + std::string rdn; + bool revalidateDidntFindOldContext; + bool isSortedContext; + +// typedef vector< string > ForSortedOnly_OldRdnSet_t; +// ForSortedOnly_OldRdnSet_t ForSortedOnly_OldRdnSet; + fh_ContextIteratorData_OldRdnSet m_ForSortedOnly_OldRdnSet; + void m_ForSortedOnly_OldRdnSet_reset() + { + m_ForSortedOnly_OldRdnSet = new ContextIteratorData_OldRdnSet(); + } + + /** + * end() should be stable. We can just cache one of these for our lifetime. + */ + Context::Items_t::iterator m_endIter; + + ContextIteratorData() + : + revalidateDidntFindOldContext( false ), + isSortedContext( false ) + { + m_ForSortedOnly_OldRdnSet_reset(); + } + + bool isTheContextIteratorSet() + { + if( theContext ) + return theContextIterator != theContext->getParent()->getSortedItems().end(); + return false; + } + + gpointer getSortedItemsPointer() + { + return &theParent->getSortedItems(); + } + Context::Items_t getSortedItems() + { + return theParent->getSortedItems(); + } + + + + void dump( const std::string& s ) + { + cerr << s << endl; + fh_context c = theParent; + if( theContext && !c ) + c = theContext->getParent(); + c->dumpOutItems(); + } + + void update_OldRdnSet_cache( bool force = false ) + { + /* Only do anything if we are sorted and the version has changed */ + if( isSortedContext ) + { + if( ContextIteratorData_OldRdnSet* replacement = + m_ForSortedOnly_OldRdnSet->update( force, theParent ) ) + { + m_ForSortedOnly_OldRdnSet = replacement; + } + } + } + + + /** + * Check if the context has changed and if so reset the iterator to the correct + * location in the updated context. + */ + void revalidate( bool force = false ) + { + /* Not much to revalidate if we are at end() */ + if( !isBound( theContext )) + { + theContextIterator = theParent->getSortedItems().end(); + m_ForSortedOnly_OldRdnSet_reset(); + return; + } + + if( !ImplicitIteratorUpdateLock::isTaken() ) + { + if( theContext->supportsMonitoring() ) + { + /* Update the contexts if something has changed */ + Main::processAllPending_VFSFD_Events(); + } + } + + + revalidateDidntFindOldContext = false; + if( !force && Version( theParent->getDirOpVersion() ) ) + { + /* This are still the same */ + return; + } + + /* PURE DEBUG */ +// if( !force ) +// { +// cerr << "validate changed"; +// if( isBound( theContext ) ) +// cerr << " for c:" << theContext->getURL(); +// cerr << " force:" << force +// << " rdncache.size():" << ForSortedOnly_OldRdnSet.size() +// << endl; +// } + + +// cerr << "CI::revalidate(1)" << endl; + /* + * Quick check to see if changes are not to current iterator + */ + Context::Items_t& items = theParent->getSortedItems(); + + Context::Items_t::iterator ti = + theParent->ctx_lower_bound( theParent->getItems(), rdn ); +// Context::Items_t::iterator ti = ex_lower_bound( theParent->getItems(), +// rdn, +// items_lookup_compare() ); +// Context::Items_t::iterator ti = +// lower_bound( theParent->getItems().begin(), +// theParent->getItems().end(), +// rdn, +// items_lookup_compare() ); + + + /* Can we shortcut out of here? */ + if( !force + && ti != items.end() && GetImpl( *ti ) == GetImpl(theContext)) + { + /* We rely on Items_t being stable for both insert() and erase() + * http://www.sgi.com/tech/stl/Map.html + */ +// cerr << "base iterator still valid. " << endl; + + /* Update cache of rdn names for iterators into sorted data */ + update_OldRdnSet_cache(); +// cerr << "CI::revalidate(2)" << endl; + + return; + } + + + /* + * Sorted contexts have to be revalidated in a completely different + * way. This is because new items are inserted into their correct + * place in the list when they are discovered. + */ + if( isSortedContext ) + { +// cerr << "CI::revalidate(3)" << endl; +// cerr << "reseting a sorted iterator old rdn:" << rdn << endl; + /* + * This is a little tricky, SortedContext always wraps its + * children as sortedcontext's too. During insert() into + * SortedItems a SortedContext sets the child's thisIterator + * to the iterator for the child in SortedItems. This way we + * can use the fast set<> indexed on name to find the subcontext + * and then use thisIterator to get an iterator into the SortedItems + * collection. + */ + if( theParent->isSubContextBound( rdn ) ) + { + fh_context tmp = theParent->getItem( rdn ); + if( SortedContext* sc = dynamic_cast(GetImpl(tmp))) + { + theContextIterator = sc->thisIterator; + setContext( *theContextIterator ); +// cerr << "Reseting iterator using short cut iter:" +// << (*theContextIterator)->getURL() +// << endl; + + /* Update cache of rdn names for iterators into sorted data */ + update_OldRdnSet_cache(); + return; + } + } + +// cerr << "CI::revalidate(4)" << endl; + + + /* + * The item under the iterator has been removed. This is a very + * tricky thing for a sortedContext because the sorting function + * can be chained and rely on any EA of all the siblings to + * determine its ordering. The only safe way to handle this is + * to use a collection of the old rdn and the old rdn name and + * keep moving towards end() from where the item used to be until + * we find a context that is currently still bound. A rather costly + * solution but this only happens when the iterator is over a context + * that was deleted from under it. + * + * NOTE: theContextIterator + * MUST use getSortedItems() + * CANT use iterators into getItems() + */ + string wanted_rdn = m_ForSortedOnly_OldRdnSet->getNextRDN( rdn ); + + typedef Context::Items_t Items_t; + Context::Items_t& items = theParent->getSortedItems(); + theContextIterator = items.end(); + +// cerr << "Reseting sorted iter rdn:" << rdn +// << " wanted_rdn:" << wanted_rdn +// << " rdncache.size():" << ForSortedOnly_OldRdnSet.size() +// << endl; + + if( wanted_rdn.length() ) + { + /* Get an iterator into SortedItems pointing at wanted_rdn */ + for( Items_t::iterator iter = items.begin(); + iter != items.end(); ++iter ) + { + theContextIterator = iter; + + string iter_rdn = (*iter)->getDirName(); + if( iter_rdn == wanted_rdn ) + { +// cerr << "Breaking for iter_rdn:" << iter_rdn +// << " wanted_rdn:" << wanted_rdn +// << endl; + break; + } + } + } + + if( theContextIterator == items.end() + || (*theContextIterator)->getDirName() != rdn ) + { + /* We have moved to a different item */ + revalidateDidntFindOldContext = true; + } + + /* PURE DEBUG */ + { +// string earl = "(end)"; +// if( theContextIterator != items.end() ) +// { +// earl = (*theContextIterator)->getURL(); +// } +// cerr << "reset sorted iterator the long way " +// << " old rdn:" << rdn +// << " new c:" << earl +// << " didntfindold:" << revalidateDidntFindOldContext +// << endl; + } + + if( theContextIterator == items.end() ) + setContext( 0 ); + else + setContext( *theContextIterator ); + + /* Update cache of rdn names for iterators into sorted data */ + update_OldRdnSet_cache(); + + return; + } + + /* + * Something has changed in the parent of theContext so we + * need to revalidate all the current data and maybe reset it to + * new values. + */ +// Context::Items_t& items = theParent->getSortedItems(); +// theContextIterator = items.lower_bound( rdn ); + /* + * Reuse 'ti' value from above. + * NOTE: we have culled out SortedContext above, so we know + * that getItems() == getSortedItems() at this point. + */ + theContextIterator = ti; + if( theContextIterator == items.end() + || (*theContextIterator)->getDirName() != rdn ) + { + /* We have moved to a different item */ + revalidateDidntFindOldContext = true; + } + setContext( *theContextIterator ); + } + + void setContext_NoChecking( const fh_context& c ) + { + rdn = c->getDirName(); + theContext = c; + } + void setContext_ExplicitlyToNull() + { + rdn = ""; + theContext = 0; + } + + /** + * Set the context we are pointing to and keep enough info to + * revalidate the iterator if the dir changes. + */ + void setContext( const fh_context& c ) + { + if( isBound(c) ) + { + rdn = c->getDirName(); + theContext = c; + } + else + { + rdn = ""; + theContext = 0; + } + } + + /** + * revalidate and move the iterator by n + */ + void shiftIterator( int n ) + { + /* Are we end? */ + if( !isBound( theContext )) + { + if( n >= 0 ) + return; + } + + revalidate(); + + /* + * If we didn't refind the old context, then we are already advanced one + */ + if( revalidateDidntFindOldContext && n > 0 ) + --n; + + +// /* map<> doesn't like getting --end(); */ +// if( !isBound( theContext )) +// { +// typedef Context::SubContextNames_t cn_t; +// cn_t cn = theParent->getSubContextNames(); +// theContextIterator = theParent->getItemIter( cn.back() ); +// ++n; +// } + + + // We should check if HasBeenDeleted is set +// advance( theContextIterator, n ); + bool beginIterIsValid = false; + Context::Items_t::iterator beginIter; // = theParent->getSortedItems().begin(); +// Context::Items_t::iterator endIter = theParent->getSortedItems().end(); + +// cerr << "Advance n:" << n << endl; + + for( int i = n; i!=0; ) + { + if( n > 0 ) ++theContextIterator; + else + { + if( !beginIterIsValid ) + { + beginIterIsValid = true; + beginIter = theParent->getSortedItems().begin(); + } + + if( theContextIterator == beginIter ) + break; + --theContextIterator; + } + + if( theContextIterator == m_endIter ) + { + break; + } + if( (*theContextIterator)->HasBeenDeleted ) + continue; + + if( n > 0 ) --i; + else ++i; + +// cerr << "Advance.iter i:" << i << " n:" << n << endl; + } + + if( theContextIterator == m_endIter ) + { + rdn = ""; + theContext = 0; + } + else + { +// theContext = *theContextIterator; + theContext = GetImpl(*theContextIterator); + rdn = theContext->getDirName(); + } + } + + }; + + inline struct FERRISEXP_DLLLOCAL ContextIteratorData* Data( const ContextIterator* ci ) + { + return (ContextIteratorData*)ci->p_data; + } + #define DATA Data(this) + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ContextIterator::ContextIterator() + : + p_data(0) + { + p_data = new ContextIteratorData(); + DATA->theParent = 0; + DATA->theContext = 0; + } + + + ContextIterator::ContextIterator( fh_context parent, const std::string& rdn ) + : + p_data(0) + { + p_data = new ContextIteratorData(); + DATA->theParent = parent; + DATA->theContext = 0; + + DATA->m_endIter = parent->getSortedItems().end(); + DATA->theContextIterator = DATA->m_endIter; + if( rdn.length() ) + { + DATA->theContext = parent->getSubContext( rdn ); + } + + + /* + * This is a little icky, but the method for revalidation is + * currently different depending on if we are iterating over + * a sorted context + */ + Context* raw = GetImpl(parent); + while( ChainedViewContext* cvc = dynamic_cast( raw )) + { + if( SortedContext* sc = dynamic_cast( raw ) ) + { + DATA->isSortedContext = true; + DATA->theContextIterator = sc->thisIterator; + break; + } + raw = GetImpl( cvc->Delegate ); + } + +// cerr << "ContextIterator::ContextIterator() rdn:" << rdn +// << " parent:" << parent->getURL() +// << " parent:" << toVoid( GetImpl(parent) ) +// << " isbound:" << parent->priv_isSubContextBound( rdn ) +// << " isSorted:" << DATA->isSortedContext +// << endl; + + /* quickly set theContextIterator so that we dont have to revalidate */ + if( ! DATA->isSortedContext ) + { + if( rdn.length() ) + { + DATA->theContextIterator = parent->getItemIter( rdn ); + } + } + + + /* Force a revalidation for next operation that might want it */ + DATA->Version = parent->getDirOpVersion(); + setContext( DATA->theContext ); + + /* Try to make end() iterators fast to create */ + if( !rdn.length() ) + { + DATA->theContextIterator = DATA->theParent->getSortedItems().end(); + DATA->m_ForSortedOnly_OldRdnSet_reset(); + } + else + { + DATA->update_OldRdnSet_cache(); + DATA->revalidate( true ); + } + } + + ContextIterator::ContextIterator( const ContextIterator& ci ) + { + p_data = new ContextIteratorData(); + + ContextIteratorData* d = Data( &ci ); + DATA->theParent = d->theParent; + DATA->Version = d->Version; + DATA->isSortedContext = d->isSortedContext; + setContext( d->theContext ); + DATA->theContextIterator = d->theContextIterator; + DATA->m_endIter = d->m_endIter; + DATA->m_ForSortedOnly_OldRdnSet = d->m_ForSortedOnly_OldRdnSet; + } + + ContextIterator& + ContextIterator::operator=( const ContextIterator& ci ) + { + ContextIteratorData* d = Data( &ci ); + DATA->theParent = d->theParent; + DATA->Version = d->Version; + DATA->isSortedContext = d->isSortedContext; + setContext( d->theContext ); + DATA->theContextIterator = d->theContextIterator; + DATA->m_endIter = d->m_endIter; + DATA->m_ForSortedOnly_OldRdnSet = d->m_ForSortedOnly_OldRdnSet; + return *this; + } + + + ContextIterator::~ContextIterator() + { + if( p_data ) + { + delete DATA; + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + ContextIterator::revalidate() + { + DATA->revalidate(); + } + + void + ContextIterator::setContext( const fh_context& c ) + { + DATA->setContext( c ); + } + + void + ContextIterator::shiftIterator( int n ) + { + DATA->shiftIterator( n ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + ContextIterator::reference ContextIterator::operator*() const + { + return DATA->theContext; + } + + ContextIterator::pointer ContextIterator::operator->() + { + return DATA->theContext; + } + + ContextIterator::reference ContextIterator::operator[](difference_type n) const + { + ContextIterator tmp(*this); + tmp.shiftIterator(n); + ContextIteratorData* d = Data( &tmp ); + return d->theContext; + } + + + ContextIterator& + ContextIterator::operator++() + { + shiftIterator(1); + return *this; + } + + ContextIterator + ContextIterator::operator++(int) + { + ContextIterator tmp(*this); + shiftIterator(1); + return tmp; + } + + ContextIterator& + ContextIterator::operator--() + { + shiftIterator(-1); + return *this; + } + + ContextIterator + ContextIterator::operator--(int) + { + ContextIterator tmp(*this); + shiftIterator(-1); + return tmp; + } + + ContextIterator + ContextIterator::operator+(difference_type n) const + { + ContextIterator tmp(*this); + tmp.shiftIterator(n); + return tmp; + } + + ContextIterator& + ContextIterator::operator+=(difference_type n) + { + shiftIterator(n); + return *this; + } + + ContextIterator + ContextIterator::operator-(difference_type n) const + { + ContextIterator tmp(*this); + tmp.shiftIterator( ForceNeg(n) ); + return tmp; + } + +// ContextIterator::difference_type +// ContextIterator::operator-(const _Self& ci) const +// { +// difference_type ret = 0; +// ContextIteratorData* d = Data( &ci ); + +// ret = distance( DATA->theParent->getSortedItems().begin(), DATA->theContextIterator ); +// ret -= distance( d->theParent->getSortedItems().begin(), d->theContextIterator ); + +// return ret; +// } + + + + ContextIterator& + ContextIterator::operator-=(difference_type n) + { +// cerr << "operator-= n:" << ForceNeg(n) << endl; + shiftIterator( ForceNeg(n) ); + return *this; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ContextIterator::difference_type + operator-(const ContextIterator& x, const ContextIterator& y) + { + ContextIteratorData* xd = Data( &x ); + ContextIteratorData* yd = Data( &y ); + +// cerr << "operator-( ctxiter, ctxiter )" << endl; +// if( xd->theContext ) +// cerr << " xd.isTheContextIteratorSet():" << xd->isTheContextIteratorSet() +// << " xd.getSortedItemsPointer():" << xd->getSortedItemsPointer() +// << endl; +// if( yd->theContext ) +// cerr << " yd.isTheContextIteratorSet():" << yd->isTheContextIteratorSet() +// << " yd.getSortedItemsPointer():" << yd->getSortedItemsPointer() +// << endl; +// if( xd->theParent ) +// cerr << " xd.theParent:" << toVoid( xd->theParent ) << endl; +// if( yd->theParent ) +// cerr << " yd.theParent:" << toVoid( yd->theParent ) << endl; +// if( xd->isTheContextIteratorSet() ) +// cerr << " *xd.citer:" << toVoid( *xd->theContextIterator ) +// << " xd.citer.url:" << (*xd->theContextIterator)->getURL() +// << endl; +// if( yd->isTheContextIteratorSet() ) +// cerr << " *yd.citer:" << toVoid( *yd->theContextIterator ) +// << " yd.citer.url:" << (*yd->theContextIterator)->getURL() +// << endl; + + if( xd->theParent && xd->theParent != yd->theParent ) + { +// cerr << " different parents, should handle this vlink case seperately" << endl; +// xd->dump("xd"); +// yd->dump("yd"); +// if( xd->theParent ) +// cerr << " xd.theParent:" << toVoid( xd->theParent ) << endl; +// if( yd->theParent ) +// cerr << " yd.theParent:" << toVoid( yd->theParent ) << endl; + + { + static ContextSetCompare cssName("name"); + SortedContext* xsc = dynamic_cast( GetImpl( xd->theParent )); + SortedContext* ysc = dynamic_cast( GetImpl( yd->theParent )); + + /* PURE DEBUG */ + if( xsc ) { + LG_CTX_D << " xd.is-sorted-context" << endl; + } + if( ysc ) { + LG_CTX_D << " yd.is-sorted-context" << endl; + } + + bool usingSameSortingOrder = true; + + if( xsc && ysc ) + { + if( xsc->getSortedItems().key_comp() != ysc->getSortedItems().key_comp() ) + { + LG_CTX_D << " xd and yd are sorted but using different ordering" << endl; + usingSameSortingOrder = false; + } + } + else if( xsc ) + { + if( xsc->getSortedItems().key_comp() != cssName ) + { + LG_CTX_D << " xd is sorted yd isn't and are sorted but using different ordering" << endl; + usingSameSortingOrder = false; + } + } + else if( ysc ) + { + if( ysc->getSortedItems().key_comp() != cssName ) + { + LG_CTX_D << " xd isn't sorted yd is and are sorted but using different ordering" << endl; + usingSameSortingOrder = false; + } + } + + if( !usingSameSortingOrder ) + { + LG_CTX_D << "Using special handling for different parents that have a different" + << " sorting order." << endl; + + Context::Items_t::iterator xiter = xd->theContextIterator; + Context::Items_t::iterator yiter = yd->theContextIterator; + + // Get the xdist as an offset for xd->theContext in the ordering + // of the children of yd->theParent. This way both xdist and ydist + // are distances in the same ordering on the directory contents. + int xdist = 0; + for( Context::Items_t::iterator ci = yd->getSortedItems().begin() ; ; ++ci ) + { + if( ci != yd->getSortedItems().end() ) + { + // xd is not found in yd->theParent's children. + // something very bad has happened! + + LG_CTX_ER << "operator-(Context::iterator,Context::iterator) " + << " trying to operate on the children of a VirtualSortLink" + << " where the two parents of the child (its natural parent" + << " and the link context itself) are using different sorting" + << " and the xd parameter:" << xd->theContext->getURL() << endl + << " is not to be found in the yd directory:" + << yd->theParent->getURL() << endl; + return 0; + } + + if( *ci == *xd->theContextIterator ) + break; + + LG_CTX_D << "operator-(++xdist) xd.ci:" << toVoid( GetImpl( *ci ) ) + << " xd.ci:" << (*ci)->getURL() + << endl; + ++xdist; + } + + int ydist = 0; + for( Context::Items_t::iterator ci = yd->getSortedItems().begin(); + *ci != *yd->theContextIterator; + ++ci ) + { + LG_CTX_D << "operator-(++ydist) yd.ci:" << toVoid( GetImpl( *ci ) ) + << " yd.ci:" << (*ci)->getURL() + << endl; + ++ydist; + } + + + LG_CTX_D << " xdist:" << xdist << endl; + LG_CTX_D << " ydist:" << ydist << endl; + LG_CTX_D << " ret:" << (xdist - ydist) << endl; + return xdist - ydist; + } + } + + + int xdist = 0; + for( Context::Items_t::iterator ci = xd->getSortedItems().begin(); + *ci != *xd->theContextIterator; + ++ci ) + { +// LG_CTX_D << "operator-(++xdist) xd.ci:" << toVoid( GetImpl( *ci ) ) +// << " xd.ci:" << (*ci)->getURL() +// << endl; + ++xdist; + } + +// int xdist = distance( xd->getSortedItems().begin(), xd->theContextIterator ); +// LG_CTX_D << " different parents, should handle this vlink case seperately2" << endl; + + int ydist = 0; + for( Context::Items_t::iterator ci = yd->getSortedItems().begin(); + *ci != *yd->theContextIterator; + ++ci ) + { +// LG_CTX_D << "operator-(++ydist) yd.ci:" << toVoid( GetImpl( *ci ) ) +// << " yd.ci:" << (*ci)->getURL() +// << endl; + ++ydist; + } + +// int ydist = distance( yd->getSortedItems().begin(), yd->theContextIterator ); +// LG_CTX_D << " different parents, should handle this vlink case seperately3" << endl; +// LG_CTX_D << " xdist:" << xdist << endl; +// LG_CTX_D << " ydist:" << ydist << endl; +// LG_CTX_D << " ret:" << (xdist - ydist) << endl; + + return xdist - ydist; + } + +// if( xd->theContextIterator != xd->theParent->getSortedItems().end() ) +// LG_CTX_D << " xd context:" << (*xd->theContextIterator)->getURL() << endl; + +// if( yd->theContextIterator != yd->theParent->getSortedItems().end() ) +// LG_CTX_D << " yd context:" << (*yd->theContextIterator)->getURL() << endl; + + return distance( yd->theContextIterator, xd->theContextIterator ); + } + + bool operator==(const ContextIterator& x, const ContextIterator& y) + { + // These two say the same thing. The first version will expand + // to the second when compiler inlining is allowed. The second + // is here so that debug builds are not slowed down. +// struct ContextIteratorData* xd = Data( &x ); +// struct ContextIteratorData* yd = Data( &y ); + struct ContextIteratorData* xd = (ContextIteratorData*)x.p_data; + struct ContextIteratorData* yd = (ContextIteratorData*)y.p_data; + + +// LG_CTX_D << "operator==() xd->Context:" << toVoid( xd->theContext ) +// << " yd->Context:" << toVoid( yd->theContext ); +// if( xd->theContext ) +// LG_CTX_D << " xd->theContext->getParent():" << toVoid( xd->theContext->getParent() ); +// if( yd->theContext ) +// LG_CTX_D << " yd->theContext->getParent():" << toVoid( yd->theContext->getParent() ); +// if( xd->theContext && yd->theContext ) +// LG_CTX_D << " xd.parent==yd.parent:" +// << (xd->theContext->getParent() == yd->theContext->getParent()); +// LG_CTX_D << " xd.ci == yd.ci:" +// << (xd->theContextIterator == yd->theContextIterator) +// << endl; +// if( xd->theContext ) +// LG_CTX_D << " xd.isTheContextIteratorSet():" << xd->isTheContextIteratorSet() +// << " xd.getSortedItemsPointer():" << xd->getSortedItemsPointer() +// << endl; +// if( yd->theContext ) +// LG_CTX_D << " yd.isTheContextIteratorSet():" << yd->isTheContextIteratorSet() +// << " yd.getSortedItemsPointer():" << yd->getSortedItemsPointer() +// << endl; +// if( xd->theParent ) +// LG_CTX_D << " xd.theParent:" << toVoid( xd->theParent ) << endl; +// if( yd->theParent ) +// LG_CTX_D << " yd.theParent:" << toVoid( yd->theParent ) << endl; +// if( xd->isTheContextIteratorSet() ) +// LG_CTX_D << " *xd.citer:" << toVoid( *xd->theContextIterator ) +// << " xd.citer.url:" << (*xd->theContextIterator)->getURL() +// << endl; +// if( yd->isTheContextIteratorSet() ) +// LG_CTX_D << " *yd.citer:" << toVoid( *yd->theContextIterator ) +// << " yd.citer.url:" << (*yd->theContextIterator)->getURL() +// << endl; +// xd->dump("xd"); +// yd->dump("yd"); + + +// if( !isBound( xd->theContext ) && !isBound( yd->theContext ) ) +// return true; +// if( !isBound( xd->theContext ) || !isBound( yd->theContext ) ) +// return false; + bool xdBound = isBound( xd->theContext ); + bool ydBound = isBound( yd->theContext ); + if( !xdBound && !ydBound ) + return true; + if( !xdBound || !ydBound ) + return false; + + + if( xd->theParent && xd->theParent != yd->theParent ) + { +// LG_CTX_D << " different parents, should handle this vlink case seperately" << endl; +// LG_CTX_D << "Different SortedItemsPointers. " +// << " *xd->theContextIterator == *yd->theContextIterator:" +// << (*xd->theContextIterator == *yd->theContextIterator) +// << endl; + + return xd->theContext->getParent() == yd->theContext->getParent() + && *xd->theContextIterator == *yd->theContextIterator; + } + + return xd->theContext->getParent() == yd->theContext->getParent() + && xd->theContextIterator == yd->theContextIterator; + } + + bool operator<(const ContextIterator& x, const ContextIterator& y) + { + struct ContextIteratorData* xd = Data( &x ); + struct ContextIteratorData* yd = Data( &y ); + + int xoff = distance( xd->theContext->getParent()->getSortedItems().begin(), + xd->theContextIterator ); + int yoff = distance( yd->theContext->getParent()->getSortedItems().begin(), + yd->theContextIterator ); + + return yoff < xoff; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + bool operator>(const ContextIterator& x, const ContextIterator& y) { + return y < x; + } + + bool operator!=(const ContextIterator& x, const ContextIterator& y) { + return !(x == y); + } + + bool operator<=(const ContextIterator& x, const ContextIterator& y) { + return !(y < x); + } + + bool operator>=(const ContextIterator& x, const ContextIterator& y) { + return !(x < y); + } + + +}; + diff --git a/Ferris/ContextIterator.hh b/Ferris/ContextIterator.hh new file mode 100644 index 0000000..2a9950e --- /dev/null +++ b/Ferris/ContextIterator.hh @@ -0,0 +1,125 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextIterator.hh,v 1.6 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONTEXT_ITERATOR_H_ +#define _ALREADY_INCLUDED_FERRIS_CONTEXT_ITERATOR_H_ + +#include +#include +#include + +namespace Ferris +{ + + class FERRISEXP_API ImplicitIteratorUpdateLock + { + static int lock; + public: + ImplicitIteratorUpdateLock(); + ~ImplicitIteratorUpdateLock(); + static bool isTaken(); + }; + + + class FERRISEXP_API ContextIterator : public Handlable + { +#ifdef BUILDING_LIBFERRIS + public: +#endif + void* p_data; + private: +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend struct ContextIteratorData* Data( const ContextIterator* ci ); +#endif + void revalidate(); + void setContext( const fh_context& ); + void shiftIterator( int n ); + + public: + + typedef ContextIterator _Self; + typedef Handlable _Base; + +// typedef std::random_access_iterator_tag iterator_category; + typedef std::bidirectional_iterator_tag iterator_category; + typedef fh_context value_type; + typedef long difference_type; + typedef fh_context pointer; + typedef fh_context reference; + + + /** + * Context creates these, c is the parent, rdn is the child + * if rdn is "" then the iterator is assumed to be end() + */ + explicit ContextIterator( fh_context c, const std::string& rdn ); + // for STL + ContextIterator(); + virtual ~ContextIterator(); + ContextIterator( const ContextIterator& ci ); + ContextIterator& operator=( const ContextIterator& ci ); + + reference operator*() const; + pointer operator->(); + reference operator[](difference_type n) const; + + _Self& operator++(); + _Self operator++(int); + _Self& operator--(); + _Self operator--(int); + + _Self operator+(difference_type n) const; + _Self& operator+=(difference_type n); + _Self operator-(difference_type n) const; + _Self& operator-=(difference_type n); + +// difference_type operator-(const _Self& n) const; + }; + + FERRISEXP_API ContextIterator::difference_type + operator-(const ContextIterator& x, const ContextIterator& y); + + template < class DifferenceType > + inline ContextIterator + operator+( DifferenceType n, const ContextIterator& x) + { + return x.operator+(n); + } + + FERRISEXP_API bool operator==(const ContextIterator& x, const ContextIterator& y); + FERRISEXP_API bool operator<(const ContextIterator& x, const ContextIterator& y); + FERRISEXP_API bool operator!=(const ContextIterator& x, const ContextIterator& y); + FERRISEXP_API bool operator>(const ContextIterator& x, const ContextIterator& y); + FERRISEXP_API bool operator<=(const ContextIterator& x, const ContextIterator& y); + FERRISEXP_API bool operator>=(const ContextIterator& x, const ContextIterator& y); + +}; +#endif + diff --git a/Ferris/ContextPlugin.hh b/Ferris/ContextPlugin.hh new file mode 100644 index 0000000..5e3d6d7 --- /dev/null +++ b/Ferris/ContextPlugin.hh @@ -0,0 +1,77 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextPlugin.hh,v 1.3 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONTEXT_PLUGIN_H_ +#define _ALREADY_INCLUDED_FERRIS_CONTEXT_PLUGIN_H_ + +#include "Ferris/Ferris.hh" +#include "Ferris/Resolver_private.hh" + +namespace Ferris +{ + extern "C" + { + FERRISEXP_EXPORT fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ); + }; +}; + +#define DYNAMICLINKED_ROOTCTX_CLASSCHUNK( KLASS ) \ + friend fh_context Brew( RootContextFactory* rf ) throw( RootContextCreationFailed ); \ + KLASS* priv_CreateContext( Context* parent, string rdn ) \ + { \ + KLASS* ret = new KLASS(); \ + ret->setContext( parent, rdn ); \ + return ret; \ + } + + +#define DYNAMICLINKED_ROOTCTX_DROPPER( URISCHEME, KLASS ) \ + extern "C" \ + { \ + fh_context Brew( RootContextFactory* rf ) \ + throw( RootContextCreationFailed ) \ + { \ + try \ + { \ + static fh_context ret = new KLASS(); \ + return ret; \ + } \ + catch( exception& e ) \ + { \ + LG_CTX_ER << "Brew() e:" << e.what() << endl; \ + Throw_RootContextCreationFailed( e.what(), 0 ); \ + } \ + } \ + } + + +#endif + diff --git a/Ferris/ContextPopt.cpp b/Ferris/ContextPopt.cpp new file mode 100644 index 0000000..73995a5 --- /dev/null +++ b/Ferris/ContextPopt.cpp @@ -0,0 +1,174 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextPopt.cpp,v 1.2 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + + namespace Private + { + + static string trimdots( const string& s, int maxl=10, const string& dotss = "..." ) + { + if( s.length() > maxl ) + { + string ret = s.substr(0,maxl); + ret += dotss; + return ret; + } + return s; + } + + + class FERRISEXP_DLLLOCAL ContextPopTableCollector : public basic_PopTableCollector + { + fh_mdcontext c; + + public: + + + string makeCmdLine( const string& s ) + { + string ret = "override-"; + ret += s; + return ret; + } + + string unmakeCmdLine( const string& s ) + { + string prefix = "override-"; + return s.substr( prefix.length() ); + } + + + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + const string key = opt->longName; + typedef Context::SubContextNames_t cnt; + cnt cn = c->getSubContextNames(); +// fh_context ctx = GetImpl(c); + fh_context ctx; + Upcast( ctx, c ); + if( cn.size() < 2 ) + { + ctx = c->getSubContext( cn.front() ); + cn = ctx->getSubContextNames(); + } + + cnt::iterator iter = find( cn.begin(), cn.end(), + unmakeCmdLine(key) ); + +// cerr << "poptCallback() key1:" << key << endl; +// cerr << "poptCallback() key2:" << unmakeCmdLine(key) << endl; + + if( iter != cn.end() ) + { + + string argstr(arg); +// cerr << "poptCallback() iter:" << *iter << endl; +// cerr << "poptCallback() argstr:" << argstr << endl; + Context* childc = GetImpl(ctx->getSubContext( *iter )); + if( CreateMetaDataContext* child + = dynamic_cast(childc)) + { + child->setBody( argstr ); + } + } + } + + + + struct ::poptOption* getTable( fh_mdcontext _c ) + { + c = _c; + int extraTableLines = 5; + + + typedef Context::SubContextNames_t cnt; + cnt cn = c->getSubContextNames(); +// fh_context ctx = GetImpl(c); + fh_context ctx; + Upcast( ctx, c ); + if( cn.size() < 2 ) + { + ctx = c->getSubContext( cn.front() ); + cn = ctx->getSubContextNames(); + } + + allocTable( cn.size() + extraTableLines ); + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + for( cnt::iterator iter = cn.begin(); iter != cn.end(); ++iter ) + { + string s = getStrSubCtx( ctx, *iter, "" ); + setEntry( &table[i], makeCmdLine( *iter ), + 0, POPT_ARG_STRING, 0, + 0, + trimdots(s, 45).c_str() ); + ++i; +// cerr << "adding param(c) iter:" << *iter << endl; + } + clearEntry( &table[i] ); + return table; + } + + }; + + }; + + + + struct ::poptOption* getContextPopTableCollector( fh_mdcontext c, + fh_context& setc ) + { +// setc = GetImpl(c); + Upcast( setc, c ); + typedef Loki::SingletonHolder< + Private::ContextPopTableCollector + > ContextPopTableCollector_t; + + return ContextPopTableCollector_t::Instance().getTable( c ); + } + + + +}; + + diff --git a/Ferris/ContextPopt.hh b/Ferris/ContextPopt.hh new file mode 100644 index 0000000..b7472c5 --- /dev/null +++ b/Ferris/ContextPopt.hh @@ -0,0 +1,57 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextPopt.hh,v 1.2 2010/09/24 21:30:27 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#ifndef _ALREADY_INCLUDED_CONTEXT_POPT_H_ +#define _ALREADY_INCLUDED_CONTEXT_POPT_H_ + +#include +#include +#include + +namespace Ferris +{ + + FERRISEXP_API struct ::poptOption* getContextPopTableCollector( fh_mdcontext c, + fh_context& setc ); + + +#define FERRIS_CONTEXTPOPT_OPTIONS(c) \ +{ 0, 0, \ + POPT_ARG_INCLUDE_TABLE, \ + ::Ferris::getContextPopTableCollector( \ + new ::Ferris::DelegatingCreateMetaDataContext( c ), c ), \ + 0, "Overload context options:", 0 }, + +/***/ + }; +#endif + + diff --git a/Ferris/ContextSetCompare.cpp b/Ferris/ContextSetCompare.cpp new file mode 100644 index 0000000..9466ff9 --- /dev/null +++ b/Ferris/ContextSetCompare.cpp @@ -0,0 +1,1006 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextSetCompare.cpp,v 1.9 2010/11/19 21:30:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +#include "FSParser_private.hh" + +using namespace std; + +namespace Ferris +{ + + static std::string + adjustEANameForSorting_adjustTime( const std::string& cn, + const std::string& prefix, + const std::string& replacement ) + { + if( starts_with( cn, prefix )) + { + return replacement; + } + return cn; + } + + + + + std::string + adjustEANameForSorting( const std::string& s ) + { + std::string cn = s; + + if( starts_with( cn, "size" )) + { + cn = "size"; + } + cn = adjustEANameForSorting_adjustTime( cn, "mtime-", "mtime" ); + cn = adjustEANameForSorting_adjustTime( cn, "atime-", "atime" ); + cn = adjustEANameForSorting_adjustTime( cn, "ctime-", "ctime" ); + if( ends_with( cn, "-pixbuf" )) + { + cn = cn.substr( 0, cn.length() - strlen("-pixbuf")); + } + + return cn; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + PreprocessedSortString::PreprocessedSortString( const std::string& s ) + : + SortString( s ) + { + } + + std::string PreprocessedSortString::getString() + { + return SortString; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /* Compare S1 and S2 as strings holding name & indices/version numbers. */ + extern int strverscmp (__const char *__s1, __const char *__s2) + __THROW __attribute_pure__; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL ContextSetCompare_FunctorData + { + string eaname; + ContextSetCompare_FunctorData( string eaname ) + : + eaname( eaname ) + { + } + }; + + struct FERRISEXP_DLLLOCAL ContextSetComparePData + { + typedef Loki::Functor< bool, LOKI_TYPELIST_2( const fh_context&, + const fh_context& ) > Fun_t; + Fun_t fun; + /** + * 0 is sort by name, ie. default. otherwise it points to a string + * that shouldn't be deallocated ever + */ + const char* m_sortString; + + ContextSetComparePData() + : + m_sortString( 0 ) + {} + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /* + * Note that these functions being used in the set<> for Context::Items_t should + * not throw exceptions but quietly return default data for streams that fail to + * provide information + */ + + template + struct FERRISEXP_DLLLOCAL contextset_reverse + { + ContextSetCompare_FunctorData d; + ContextSetComparePData::Fun_t innerFunc; + + inline contextset_reverse( const ContextSetCompare_FunctorData& d, + ContextSetComparePData::Fun_t innerFunc ) + : + d( d ), + innerFunc( innerFunc ) + { + } + + bool operator()( const _Tp& xc, const _Tp& yc) + { + bool res = innerFunc( yc, xc ); +// cerr << "reverseop() ea:" << d.eaname << " res:" << res << endl; + return res; + } + }; + + /** + * Chain together sorting operations. If the 'current' predicate tests + * that xc and yc are Equivalent (in the tech sense) then we chain to + * the next sorter to make sure that we get an total order. + * + * We can be sure of a total order because the last item in the chain + * should be a 'name' based sort like :CIS:name or name and because + * there can be no two subcontexts with the same name ordering is + * ensured. + */ + template + struct FERRISEXP_DLLLOCAL contextset_cascade + { + ContextSetCompare_FunctorData d; + ContextSetComparePData::Fun_t current; + ContextSetComparePData::Fun_t next; + + contextset_cascade( + const ContextSetCompare_FunctorData& d, + ContextSetComparePData::Fun_t current, + ContextSetComparePData::Fun_t next ) + : + d( d ), + current( current ), + next( next ) + { + } + + bool operator()( const _Tp& xc, const _Tp& yc) + { + bool res = current( xc, yc ); +// cerr << "cascade() ea:" << d.eaname << " res:" << res << endl; + if( res ) + { + /* xc is definately smaller than yc */ + return res; + } + bool revres = current( yc, xc ); + + /* Test for Equivalence */ + if( !res && !revres ) + { + /* They are the same in the eyes of this sorter, chain to + * the next link */ + return next( xc, yc ); + } + + /* They are not Equivalent, yc > xc by this sorter */ + return res; + } + }; + + template + struct FERRISEXP_DLLLOCAL contextset_less_strverscmp + { + ContextSetCompare_FunctorData d; + contextset_less_strverscmp( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc) const + { + string x = getStrAttr( xc, d.eaname, "" ); + string y = getStrAttr( yc, d.eaname, "" ); + + int rc = ::strverscmp( x.c_str(), y.c_str() ); +// cerr << "strverscmp eaname:" << d.eaname +// << " x:" << x +// << " y:" << y +// << " res:" << ((rc < 0) ? true : false) +// << endl; + return (rc < 0) ? true : false; + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + template + struct FERRISEXP_DLLLOCAL contextset_less_fscmp_base + { + ContextSetCompare_FunctorData d; + contextset_less_fscmp_base( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + typedef set< char > charset_t; + charset_t& getDropSet() const + { + static charset_t ret; + if( ret.empty() ) + { + ret.insert('-'); + ret.insert(' '); + ret.insert('_'); + } + return ret; + } + + string clean( const std::string& s ) const + { + stringstream iss; + stringstream oss; + iss << s; + char ch; + const charset_t& ds = getDropSet(); + charset_t::const_iterator ds_end = ds.end(); + + bool ignore_chars = false; + while( iss >> ch ) + { + if( ds_end != ds.find( ch ) ) + { + } + else if( ch == '[' ) + { + ignore_chars = true; + } + else if( ch == ']' ) + { + ignore_chars = false; + } + else + { + if( ignore_chars ) + { + } + else + { + oss << ch; + } + } + } + return oss.str(); + } + + bool operator()( const _Tp& xc, const _Tp& yc, bool check ) const + { + string x = getStrAttr( xc, d.eaname, "" ); + string y = getStrAttr( yc, d.eaname, "" ); + + try + { + FSParser px; + FSParser py; + bool px_ok = px.parse( x ); + bool py_ok = py.parse( y ); + + if( px_ok && py_ok ) + { + if( check ) + { + string xn = tolowerstr()( px.getName() ); + string yn = tolowerstr()( py.getName() ); + int n_min = min( xn.length(), yn.length() ); + + if( xn.substr( 0, n_min ) == yn.substr( 0, n_min ) ) + { + if( px.getE() == py.getE() ) + return 0; + return px.getE() < py.getE(); + } + } + else + { + string xn = tolowerstr()( px.getName() ); + string yn = tolowerstr()( py.getName() ); + int n_min = min( xn.length(), yn.length() ); + +// cerr << "xn:" << xn << endl +// << "yn:" << yn << endl +// << " x:" << px.getE() << " y:" << py.getE() << endl << endl; + + if( px.getE() == py.getE() ) + return 0; + return px.getE() < py.getE(); + } + } + if( px_ok || py_ok ) + { + if( px_ok ) + return -1; + else + return 1; + } + } + catch( exception& e ) + { + } + + x = clean( x ); + y = clean( y ); + + int rc = ::strverscmp( x.c_str(), y.c_str() ); + return (rc < 0) ? true : false; + } + }; + + + template + struct FERRISEXP_DLLLOCAL contextset_less_fscmp + : + public contextset_less_fscmp_base< _Tp > + { + typedef contextset_less_fscmp_base< _Tp > _Base; + using _Base::d; + using _Base::clean; + + contextset_less_fscmp( const ContextSetCompare_FunctorData& d ) + : + _Base( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc ) const + { + return _Base::operator()( xc, yc, true ); + } + }; + + template + struct FERRISEXP_DLLLOCAL contextset_less_fscmp_nocheck + : + public contextset_less_fscmp_base< _Tp > + { + typedef contextset_less_fscmp_base< _Tp > _Base; + using _Base::d; + using _Base::clean; + + contextset_less_fscmp_nocheck( const ContextSetCompare_FunctorData& d ) + : + _Base( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc ) const + { + return _Base::operator()( xc, yc, false ); + } + + }; + + + + + /** + * Compares using long ints and numeric < + */ + template + struct FERRISEXP_DLLLOCAL contextset_less_numeric + { + ContextSetCompare_FunctorData d; + contextset_less_numeric( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc) const + { +// long x = 0; +// long y = 0; +// fh_attribute xa = xc->getAttribute( d.eaname ); +// fh_attribute ya = yc->getAttribute( d.eaname ); +// fh_istream xi = xa->getIStream(); +// fh_istream yi = ya->getIStream(); +// xi >> x; +// yi >> y; + + long x = toType( getStrAttr( xc, d.eaname, "0" )); + long y = toType( getStrAttr( yc, d.eaname, "0" )); + +// cerr << "numeric_compare()" +// << " xi >> x:" << (xi >> x).good() +// << " yi >> y:" << (yi >> y).good() +// << endl; + +// cerr << "numeric_compare ea:" << d.eaname +// << " xname:" << xc->getDirName() +// << " yname:" << yc->getDirName() +// << " x:" << x +// << " y:" << y +// << " res:" << (x + struct FERRISEXP_DLLLOCAL contextset_less_floating_numeric + { + ContextSetCompare_FunctorData d; + contextset_less_floating_numeric( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc) const + { + typedef long double numT; + numT x = toType( getStrAttr( xc, d.eaname, "0" )); + numT y = toType( getStrAttr( yc, d.eaname, "0" )); + return y < x; + } + }; + + /** + * Sorts the existed items before the created items. + * Note that this is the sorter that is used to create 'lazy' sorting + * even though there is actually more work being done to sort new items + * at the bottom of the order. + */ + struct FERRISEXP_DLLLOCAL contextset_less_created_or_existed + { + ContextSetCompare_FunctorData d; + contextset_less_created_or_existed( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + bool operator()( const fh_context& xc, const fh_context& yc) const + { +// cerr << "lazy_compare" +// << " xname:" << xc->getDirName() +// << " yname:" << yc->getDirName() +// << " x:" << xc->ContextWasCreatedNotDiscovered +// << " y:" << yc->ContextWasCreatedNotDiscovered +// << " res:" << ( xc->ContextWasCreatedNotDiscovered +// < yc->ContextWasCreatedNotDiscovered ) +// << endl; + return xc->ContextWasCreatedNotDiscovered + < yc->ContextWasCreatedNotDiscovered; + } + }; + + template + struct FERRISEXP_DLLLOCAL contextset_less_string + { + ContextSetCompare_FunctorData d; + contextset_less_string( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + bool operator()( const _Tp& xc, const _Tp& yc) const + { +// cerr << "normal compare() ea:" << d.eaname +// << " x:" << getStrAttr( xc, d.eaname, "" ) +// << " y:" << getStrAttr( yc, d.eaname, "" ) +// << " res:" << (getStrAttr( xc, d.eaname, "" ) + struct FERRISEXP_DLLLOCAL contextset_less_cis_string + { + ContextSetCompare_FunctorData d; + contextset_less_cis_string( const ContextSetCompare_FunctorData& d ) + : + d( d ) + {} + + inline Nocase& getCmp() const + { + static Nocase nocasefun; + return nocasefun; + } + + bool operator()( const _Tp& xc, const _Tp& yc) const + { + return getCmp()( getStrAttr( xc, d.eaname, "" ), + getStrAttr( yc, d.eaname, "" ) ); + } + }; + + struct FERRISEXP_DLLLOCAL contextset_rdn + { + contextset_rdn() + {} + + inline bool operator()( const fh_context& xc, const fh_context& yc) const + { + return xc->getDirName() < yc->getDirName(); + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + ContextSetCompare::ContextSetCompare( const std::string& s ) + : + d( new ContextSetComparePData() ) + { + setup( s ); + } + + ContextSetCompare::ContextSetCompare( fh_sorter s ) + : + d( new ContextSetComparePData() ) + { + setup( s->getString() ); + } + + ContextSetCompare::ContextSetCompare( const ContextSetCompare& ci ) + : + d( new ContextSetComparePData() ) + { + d->fun = ci.d->fun; + } + + ContextSetCompare& + ContextSetCompare::operator=( const ContextSetCompare& ci ) + { + d->fun = ci.d->fun; + return *this; + } + + ContextSetCompare::~ContextSetCompare() + { + if( d ) delete d; + } + + + static + ContextSetComparePData::Fun_t + createSortFunction( const std::string& s ) + { + typedef ContextSetComparePData::Fun_t Fun_t; + Fun_t ret; + + bool numeric = false; + bool floatingpoint = false; + bool caseSensitive = true; + bool versionCompare = false; + bool fsCompare = false; + bool fsCompareNoCheck = false; + bool reverse = false; + bool lazy = false; + string AttrName = s; + + /* + * Break out options + */ + if( s.length() > 2 && s[0] == ':' ) + { + int optionsStartPos = 1; + + if( s[1] == '!' ) + { + ++optionsStartPos; + reverse = true; + } + if( s[1] == 'L' || (s.length() > 2 && s[2] == 'L') ) + { + ++optionsStartPos; + lazy = true; + } + + string::size_type en = s.find( ":", optionsStartPos ); + if( en == string::npos ) + { + stringstream ss; + ss << "Unclosed meta info area (no second ':' found)" + << " string:" << s; + Throw_InvalidSortSpecification( tostr(ss), 0 ); + } + + string type = s.substr( optionsStartPos, en-optionsStartPos ); + AttrName = s.substr( en+1 ); + + LG_SORT_D + << " s:" << s + << " optionsStartPos:" << optionsStartPos + << " en:" << en + << " type:" << type + << " AttrName:" << AttrName + << endl; + + if( type == "#" ) + { + numeric = true; + } + else if( type == "FLOAT" ) + { + floatingpoint = true; + } + else if( type == "CIS" ) + { + caseSensitive = false; + } + else if( type == "VER" || type == "V" ) + { + versionCompare = true; + } + else if( type == "f" || type == "funsub" ) + { + fsCompare = true; + } + else if( type == "F" || type == "FUNSUB" ) + { + fsCompareNoCheck = true; + } + else + { + LG_SORT_D << "Ignoring some meta tags:" << type << endl; + } + } + + LG_SORT_D << "MakeSorter() " + << " s:" << s + << " numeric:" << numeric + << " caseSensitive:" << caseSensitive + << " reverse:" << reverse + << " vc:" << versionCompare + << " fc:" << fsCompare + << " FC:" << fsCompareNoCheck + << " lazy:" << lazy + << endl; +// cerr << "MakeSorter() " +// << " s:" << s +// << " numeric:" << numeric +// << " caseSensitive:" << caseSensitive +// << " reverse:" << reverse +// << " vc:" << versionCompare +// << " lazy:" << lazy +// << endl; + + /* + * Make sorter based on options given + */ + if( numeric ) + { + LG_SORT_D << "Making a numeric sorter for s:" << s + << " AttrName:" << AttrName + << endl; +// cerr << "Making a numeric sorter for s:" << s +// << " AttrName:" << AttrName +// << endl; + if( floatingpoint ) + ret = contextset_less_floating_numeric( AttrName ); + else + ret = contextset_less_numeric( AttrName ); + } + else if( versionCompare ) + { + LG_SORT_D << "Making a version sorter for s:" << s + << " AttrName:" << AttrName + << endl; + ret = contextset_less_strverscmp( AttrName ); + } + else if( fsCompare ) + { + ret = contextset_less_fscmp( AttrName ); + } + else if( fsCompareNoCheck ) + { + ret = contextset_less_fscmp_nocheck( AttrName ); + } + else if( caseSensitive ) + { + LG_SORT_D << "Making a case sensitive sorter for s:" << s + << " AttrName:" << AttrName + << endl; + ret = contextset_less_string( AttrName ); + } + else + { + LG_SORT_D << "Making a case NOT sensitive sorter for s:" << s + << " AttrName:" << AttrName + << endl; + ret = contextset_less_cis_string( AttrName ); + } + + if( reverse ) + { + ret = contextset_reverse( + ContextSetCompare_FunctorData(""), + ret ); + } + + if( lazy ) + { + /* + * Tack on a lazy sorting comparison function to the head + * of the list so that existing and created contexts are + * seperated before the rest of the sorting. + */ + Fun_t lazyf = + contextset_less_created_or_existed( + ContextSetCompare_FunctorData("") ); + + ret = contextset_cascade( + ContextSetCompare_FunctorData(""), + lazyf, + ret ); + } + + return ret; + } + + /** + * Allow many string pointers to share the same underlying byte contents. + */ + static const char* + makeStaticString( const std::string& s ) + { + static stringset_t cache; + stringset_t::iterator ci = cache.find( s ); + if( ci != cache.end() ) + return ci->c_str(); + + cache.insert( s ); + ci = cache.find( s ); + return ci->c_str(); + } + + + void + ContextSetCompare::setup( const std::string& s ) + { + d->m_sortString = 0; + +// cerr << "ContextSetCompare::setup() s:" << s << endl; + + if( s == "name" ) + { + d->fun = contextset_rdn(); + return; + } + d->m_sortString = makeStaticString( s ); + + typedef ContextSetComparePData::Fun_t Fun_t; + int b = s.find("("); + + /* + * Setup d->fun based on either a simple sorting predicate + * or a chained predicate. + */ + if( b == string::npos ) + { + d->fun = createSortFunction( s ); + } + else + { + string sortstring = s; + +// cerr << "Making a chained sorter for sortstring:" << sortstring << endl; + + /* Create chained sorting predicate */ + for( int i=0; string::npos != ( b = sortstring.find("(") ); ++i ) + { + /* Skip the '(' delimiter */ + ++b; + if( b > sortstring.length() ) + { + stringstream ss; + ss << "'(' char with no data after it" + << " string:" << s; + Throw_InvalidSortSpecification( tostr(ss), 0 ); + } + + /* Find the end of this part of the sort spec */ + int e = sortstring.find(")"); + if( e == string::npos || e < 1 ) + { + stringstream ss; + ss << "Unclosed meta info area (no second ')' found)" + << " string:" << s; + Throw_InvalidSortSpecification( tostr(ss), 0 ); + } + +// cerr << "Found () match b:" << b << " e:" << e << " e-b:" << (e-b) +// << " original string:" << sortstring +// << endl; + + string partialSort = sortstring.substr( b, e-b ); + sortstring = sortstring.substr( e+1 ); +// PrePostTrimmer trimmer; +// trimmer.push_back( "(" ); +// trimmer.push_back( ")" ); +// partialSort = trimmer( partialSort ); + +// cerr << "Partial:" << partialSort +// << " rest of sortstring:" << sortstring +// << endl; + + Fun_t f = createSortFunction( partialSort ); + + /* Either set d->fun for the first time or chain the new functor + * at the end of a cascade chain consisting of all the other + * functors + */ + if( !i ) + { + d->fun = f; + } + else + { + d->fun = contextset_cascade( + ContextSetCompare_FunctorData(""), d->fun, f ); + } + } + } + + /* + * Now we need to create a functor that has the user specified + * sorting predicate first, and we tack a name based sort on + * the end to ensure that sorting produces a total order. + */ + d->fun = contextset_cascade( + ContextSetCompare_FunctorData(""), + d->fun, + contextset_less_string( string("name") ) ); + } + + bool + ContextSetCompare::operator()( const fh_context& s1, const fh_context& s2 ) const + { + return d->fun( s1, s2 ); + } + bool + ContextSetCompare::operator()( const fh_context& s1, + const std::string& name ) const + { + return s1->getDirName() < name; + } + + + + bool operator==( const ContextSetCompare& a, const ContextSetCompare& b ) + { + if( !a.d->m_sortString && !b.d->m_sortString ) + return true; + + const char* astr = a.d->m_sortString ? a.d->m_sortString : "name"; + const char* bstr = b.d->m_sortString ? b.d->m_sortString : "name"; + if( !strcmp( astr, "" )) astr = "name"; + if( !strcmp( bstr, "" )) bstr = "name"; +// cerr << "csc operator==() a:" << astr << " b:" << bstr << endl; + return !strcmp( astr, bstr ); + } + bool operator!=( const ContextSetCompare& a, const ContextSetCompare& b ) + { + return !( a==b ); + } + + + namespace Factory + { + string ReverseSortStringOrder( string s ) + { + if( s[0] != ':' ) + { + string tmp = ":!:"; + tmp += s; + return tmp; + } + else if( s.length() > 1 ) + { + if( s[1] == '!' ) + { + string tmp = ":"; + tmp += s.substr(2); + return tmp; + } + else + { + string tmp = ":!"; + tmp += s.substr(1); + return tmp; + } + } + return s; + } + + fh_context MakeSortedContext( fh_context& ctx, const std::string& s ) + { + SortedContext* c = new SortedContext( ctx, s ); + fh_context ret; + Upcast( ret, c ); + + /* SortedContext assumes it is twice referenced by its parent */ + ret->AddRef(); + + c->setIsChainedViewContextRoot(); + +// cerr << "MakeSortedContext() ctx:" << ctx->getURL() +// << " s:" << s +// << " ret:" << ret->getURL() +// << endl; + + return ret; + } + + fh_context MakeSortedContext( fh_context& ctx, fh_sorter& s ) + { + SortedContext* c = new SortedContext( ctx, s->getString() ); + +// DEBUG_dumpcl("MakeSortedContext(1)"); + + fh_context ret = 0; + Upcast( ret, c ); + +// DEBUG_dumpcl("MakeSortedContext(2)"); + + /* SortedContext assumes it is twice referenced by its parent */ + ret->AddRef(); + +// DEBUG_dumpcl("MakeSortedContext(3)"); + + c->setIsChainedViewContextRoot(); +// DEBUG_dumpcl("MakeSortedContext(end)"); + +// cerr << "MakeSortedContext() ctx:" << ctx->getURL() +// << " s:" << s->getString() +// << " ret:" << ret->getURL() +// << endl; + + return ret; + } + + fh_sorter MakeSorter( const std::string& s ) + { + return new PreprocessedSortString( s ); + } + }; +}; + diff --git a/Ferris/ContextSetCompare.hh b/Ferris/ContextSetCompare.hh new file mode 100644 index 0000000..dcf9dc7 --- /dev/null +++ b/Ferris/ContextSetCompare.hh @@ -0,0 +1,49 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextSetCompare.hh,v 1.2 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SET_COMPARE_H_ +#define _ALREADY_INCLUDED_FERRIS_SET_COMPARE_H_ + +#include +#include + +namespace Ferris +{ + class FERRISEXP_API PreprocessedSortString + : + public Handlable + { + std::string SortString; + public: + PreprocessedSortString( const std::string& s ); + std::string getString(); + }; +}; +#endif diff --git a/Ferris/ContextSetCompare_private.hh b/Ferris/ContextSetCompare_private.hh new file mode 100644 index 0000000..cc797e6 --- /dev/null +++ b/Ferris/ContextSetCompare_private.hh @@ -0,0 +1,38 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextSetCompare_private.hh,v 1.2 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SET_COMPARE_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_SET_COMPARE_PRIVATE_H_ + +#include + +namespace Ferris +{ +}; +#endif diff --git a/Ferris/Context_private.hh b/Ferris/Context_private.hh new file mode 100644 index 0000000..18f85a9 --- /dev/null +++ b/Ferris/Context_private.hh @@ -0,0 +1,855 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Context_private.hh,v 1.9 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CONTEXT_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_CONTEXT_PRIVATE_H_ + +#include + +namespace Ferris +{ + +/* + * A context view that applies a particular ordering to the items in its + * filesystem. + * + * As this is a private header, some stuff like thisIterator might be + * given public access. Code should not use thisIterator unless abolutely + * needed though. + */ + class FERRISEXP_API SortedContext + : + public ChainedViewContext + { + typedef ChainedViewContext _Base; + typedef SortedContext _Self; + + bool LazySorting; + SubContextNames_t LazySortCache; + Items_t ItemsSorted; + + SortedContext( const fh_context& ctx, const Items_t& sorteditemscopy ); + void addToSorted( fh_context c, bool created, bool emit ); + + public: + Items_t::iterator thisIterator; + + SortedContext( const fh_context& ctx, const std::string& s ); + virtual void createStateLessAttributes( bool force = false ); + + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + virtual void read( bool force = 0 ); + virtual long guessSize() throw(); + + void sort(); + void setLazySorting( bool v ); + virtual SubContextNames_t& getSubContextNames(); + + virtual int getMinimumReferenceCount(); + + protected: + + friend ContextIterator::difference_type + operator-(const ContextIterator& x, const ContextIterator& y); + + virtual Items_t& getSortedItems(); // see Ferris.cpp file for doco + + virtual void emitExistsEventForEachItem(); + virtual void UnPageSubContextsIfNeeded(); + + /** + * We break the link in ItemsSorted during a remove() operation + */ + virtual void Remove( Context* ctx, bool emitdeleted = true ); + + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + }; + + /** + * A context that is like a softlink but can exist in virtual directories + */ + class FERRISEXP_API VirtualSoftlinkContext + : + public ChainedViewContext + { + typedef VirtualSoftlinkContext _Self; + typedef ChainedViewContext _Base; + typedef Context _DontDelegateBase; + + protected: + + virtual void createStateLessAttributes( bool force = false ); + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + +// virtual std::string private_getStrAttr( const std::string& rdn, +// const std::string& def = "", +// bool getAllLines = false , +// bool throwEx = false ); + + public: + + VirtualSoftlinkContext( const fh_context& parent, + const fh_context& target, + bool setupEventConnections = true ); + /** + * A link can have a different local name to its target + * localname -> target/path/target-filename + * + */ + VirtualSoftlinkContext( const fh_context& parent, + const fh_context& target, + const std::string& localName, // localName -> ctx->getURL() + bool setupEventConnections = true ); + + virtual ~VirtualSoftlinkContext(); + + virtual std::string getRecommendedEA(); + + /** + * Either the link target's dirName() or what is set with setLocalName() + */ + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + virtual std::string getURL(); + + virtual void read( bool force = 0 ); + + fh_istream getDelegateURLStream( Context* c, const std::string& rdn, EA_Atom* atom ); + fh_istream getFalseStream( Context* c, const std::string& rdn, EA_Atom* atom ); + fh_istream getTrueStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + virtual stringset_t& getForceLocalAttributeNames(); +// virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); +// virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); +// virtual int getAttributeCount(); +// virtual bool isAttributeBound( const std::string& rdn, +// bool createIfNotThere = true +// ) throw( NoSuchAttribute ); + }; + FERRIS_CTX_SMARTPTR( VirtualSoftlinkContext, fh_VirtualSoftlinkContext ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** MANY TO ONE VIEWS **********************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Context class that accumulates many base contexts and presents then as one + * directory. For example, a union context would use this to collect data from + * many directories and present only the union of those directories. + */ + class FERRISEXP_DLLLOCAL ManyBaseToOneViewContext + : + public ChainedViewContext + { + typedef ManyBaseToOneViewContext _Self; + typedef ChainedViewContext _Base; + + // testing only + friend class SetIntersectionContext; + + protected: + + typedef std::list< fh_context > m_baseContexts_t; + m_baseContexts_t m_baseContexts; + + bool m_hasSetupBeenCalled; + + /** + * true if we should cannibalize the underlying views. + */ + bool m_isCannibal; + + /** + * Keep track of if setup() has been called already + */ + bool hasSetupBeenCalled(); + + /** + * A method for sublcasses to override. If this function returns true then the + * context 'c' is inserted into the view by the default OnExists and OnCreated + * event handlers. The default is true; + */ + virtual bool shouldInsertContext( const fh_context& c, bool created ); + + /** + * Insert a wrapped version of c into this context's children. Wrap it in the + * subcontext class type. This method is used in the default event handlers + * if shouldInsertContext() == true + * + * Note that created is set to true if this method was called from OnCreated() + * so that the correct Inserted/Created event can be fired. + */ + virtual void cascadedInsert( Context* c, bool created = false ) = 0; + + /** + * return true if all m_baseContexts are sorted in the same way + */ + bool allBaseContextsUseSameSorting(); + + /** + * For views that are cannibals we allow them to remove a context from their + * base views with this method. + * + * Subclasses should call updateViewForCannibalizm on themself instead of using + * this method directly if possible. + */ + void cannibalRemove( Context* c ); + + /** + * if m_isCannibal is true then this method calls cannibalRemove() on + * the base contexts for every context that is currently in the view. + * + * Most of the time this is the method that subclasses should call + */ + void updateViewForCannibalizm(); + + /** + * Get the underlying delegate for a given filtered context + * + * ie. A filtered context view will make a FilteredContext that sits + * ontop of the underlying context. We want a pointer to the underlying + * context so that we can compare two contexts using only their base pointers. + */ + Context* getUnderlyingContext( fh_context c ); + + protected: + + /** + * diff context uses stateless EA which means it has to use a different + * constructor to the one we would perfer. The constructor code is in + * here so that subclasses can call here after they setup stateless EA + */ + void common_setup( fh_context parent, fh_context ctx, bool isCannibal = false ); + /** + * If you call this ctor then you need to call common_setup() very soon + * after to actaully setup the object. + */ + ManyBaseToOneViewContext( Context* parent, const std::string& rdn ); + + public: + + /** + * parent is the parent of ctx, or if we are wrapping a whole tree its the + * ManyBaseToOneViewContext subclass wrapper for the parent of ctx. + * + * @param isCannibal if true and ctx is a ManyBaseToOneViewContext then objects + * that are inserted into this ManyBaseToOneViewContext are + * treated differently, typically be removing them from the + * base ManyBaseToOneViewContext after insertion. + * ie. we Cannibalize the underlying view + */ + ManyBaseToOneViewContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~ManyBaseToOneViewContext(); + + /** + * Add the items in c to those reported as in this dir. Note for files + * with the same name, the first match is taken as the winner. For example + * it would be advisable to appendToBaseContexts("~/.whatever") and then + * appendToBaseContexts( "/mnt/cdrom" ); so that if there are files in the + * first pushed dir then they are shown in preference to files of the same + * DirName in the second pushed context. + */ + void appendToBaseContexts( fh_context c ); + + + /** + * When a context is deleted from the base context it also gets removed from the filtering + * context. Note that the default implementation will only fire the deleted event if + * the context was in this context's listed children + */ + void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + + + /** + * Add the newly discovered context to the view. Note that the new context is ignored + * if shouldInsertContext() returns false. + */ + void OnExists( NamingEvent_Exists* ev, + const fh_context& newc, + std::string olddn, std::string newdn ); + + /** + * Add the newly discovered context to the view. Note that the new context is ignored + * if shouldInsertContext() returns false. + */ + void OnCreated( NamingEvent_Created* ev, + const fh_context& newc, + std::string olddn, std::string newdn ); + + /** + * Default implementation relies on setup() to create the view and then just emits + * synthetic exists events on further read() calls. + */ + virtual void read( bool force = 0 ); + + + + /** + * a private method to setup the links for events on this object. Factory + * methods should worry about and call this, not developers or API users. + * + * In subclasses one should override this method and setup the context from + * the items in m_baseContexts. After adding all relavent contexts call + * SetupEventConnections() to start monitoring. Note that the default implementation + * connects to all contexts listed in m_baseContexts. + * + * Perform initial setup of items. Note that the caller *MUST* hold a + * reference to the object for this call to work. + */ + virtual void setup(); + }; + + + + /** + * Context subclass that shows the union of one or more base Context + * objects. If there are conflicts in the subcontext rdn's then the + * context whos parent was added first using appendToBaseContexts() will be presented + * and any other contexts sharing that name will be hidden from this view. + * + * Note that the ctx argument to the constructor implicitly defines the first + * backing context, ie. context added first to appendToBaseContexts(). + * + * @see Factory::MakeUnionContext() + */ + class FERRISEXP_DLLLOCAL UnionContext + : + public ManyBaseToOneViewContext + { + typedef UnionContext _Self; + typedef ManyBaseToOneViewContext _Base; + friend class DiffContext; + + friend fh_context Factory::MakeUnionContext( const fh_context& parent, + std::list< fh_context > unionContexts ); + + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + + /** + * If the union is over a bunch of filters that themself are over the same context + * object UoD then we can perform the initial set union much faster by assuming that + * if the Context* is the same then the object is the same. This will fail badly if + * the union is on fh_context objects that are in different directories or when + * two context objects can have the same rdn. + */ + bool m_unionIsOverFilteredViewsOnly; + + protected: + + /** + * Used by DiffContext so it can have stateless EA + */ + UnionContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + } + + public: + + UnionContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + + virtual ~UnionContext(); + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + return 0; + } + virtual void setup(); + }; + + + /** + * Context subclass that shows the set_difference() of one or more base Context + * objects. This is somewhat handy for removing some contexts based on a + * pre baked pattern. + * + * Note that the ctx argument to the constructor implicitly defines the first + * backing context, ie. context added first to appendToBaseContexts(). + * + * After the first context added to appendToBaseContexts(), subsequent contexts + * added with appendToBaseContexts() define contexts whos contents should be used + * as a set_difference on the first context. + * + * @see Factory::MakeSetDifferenceContext() + */ + class FERRISEXP_DLLLOCAL DifferenceContext + : + public ManyBaseToOneViewContext + { + typedef DifferenceContext _Self; + typedef ManyBaseToOneViewContext _Base; + + friend fh_context Factory::MakeSetDifferenceContext( const fh_context& parent, + std::list< fh_context > sdContexts ); + + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + public: + + DifferenceContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~DifferenceContext(); + + + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + return 0; + } + virtual void setup(); + }; + + + /** + * Context subclass that shows the set_intersection() of one or more base Context + * objects. + * + * Note that the ctx argument to the constructor implicitly defines the first + * backing context, ie. context added first to appendToBaseContexts(). + * + * After the first context added to appendToBaseContexts(), subsequent contexts + * added with appendToBaseContexts() define contexts whos contents should be used + * as a set_intersection on the first context. + * + * @see Factory::MakeSetIntersectionContext() + */ + class FERRISEXP_DLLLOCAL SetIntersectionContext + : + public ManyBaseToOneViewContext + { + typedef SetIntersectionContext _Self; + typedef ManyBaseToOneViewContext _Base; + + friend fh_context Factory::MakeSetIntersectionContext( const fh_context& parent, + std::list< fh_context > sdContexts, + bool isCannibal ); + + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + public: + + SetIntersectionContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~SetIntersectionContext(); + + + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + } + virtual void setup(); + }; + + + /** + * Context subclass that shows the set_symmetric_difference() of one or more base Context + * objects. + * + * Note that the ctx argument to the constructor implicitly defines the first + * backing context, ie. context added first to appendToBaseContexts(). + * + * After the first context added to appendToBaseContexts(), subsequent contexts + * added with appendToBaseContexts() define contexts whos contents should be used + * as a set_symmetric_difference() on the n-1th context. + * + * @see Factory::MakeSetSymmetricDifferenceContext() + */ + class FERRISEXP_DLLLOCAL SetSymmetricDifferenceContext + : + public ManyBaseToOneViewContext + { + typedef SetSymmetricDifferenceContext _Self; + typedef ManyBaseToOneViewContext _Base; + + friend fh_context Factory::MakeSetSymmetricDifferenceContext( const fh_context& parent, + std::list< fh_context > sdContexts ); + + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + public: + + SetSymmetricDifferenceContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~SetSymmetricDifferenceContext(); + + + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + } + virtual void setup(); + }; + + + /** + * Serves as a simple subclass of ManyBaseToOneViewContext that is used to delegate + * like a ChainedViewContext but allows other ManyBaseToOneViewContext subclasses + * to cannibalize the contexts in the view. + * + * @see Factory::MakeManyBaseToOneChainedViewContext() + */ + class FERRISEXP_DLLLOCAL ManyBaseToOneChainedViewContext + : + public ManyBaseToOneViewContext + { + typedef ManyBaseToOneChainedViewContext _Self; + typedef ManyBaseToOneViewContext _Base; + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + public: + + ManyBaseToOneChainedViewContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~ManyBaseToOneChainedViewContext(); + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + return 0; + } + virtual void setup(); + }; + +// class ManyBaseToOneViewContext_WithStateLessEA_TrySelf +// { +// public: +// AttributeCollection::AttributeNames_t getAttributeNames( Context* c ) +// { +// return c->Context::getAttributeNames(); +// } + +// fh_attribute getAttribute( Context* c, const std::string& rdn ) +// throw( NoSuchAttribute ) +// { +// return c->Context::getAttribute( rdn ); +// } +// }; + + +// template < class ChildContextClass, +// class ParentContextClass, +// class WhatToDoWhenDelegateIsUnboundClass +// = ManyBaseToOneViewContext_WithStateLessEA_TrySelf > +// class ManyBaseToOneViewContext_WithStateLessEA +// : +// public StateLessEAHolder< ChildContextClass, ParentContextClass >, +// public ManyBaseToOneViewContext_WithStateLessEA_TrySelf +// { +// typedef ManyBaseToOneViewContext_WithStateLessEA _Self; +// typedef StateLessEAHolder< ChildContextClass, ParentContextClass > _Base; + +// public: + +// ManyBaseToOneViewContext_WithStateLessEA( Context* parent, const std::string& rdn ) +// : +// _Base( parent, rdn ) +// {} + +// ManyBaseToOneViewContext_WithStateLessEA() +// : +// _Base() +// {} + +// protected: + +// /********************************************************************************/ +// /********************************************************************************/ +// /********************************************************************************/ +// /*** Handle ability to have local attributes aswell as those of delegate ********/ +// /********************************************************************************/ + +// virtual std::string private_getStrAttr( const std::string& rdn, +// const std::string& def = "", +// bool getAllLines = false , +// bool throwEx = false ) +// { +// std::string ret = def; + +// try +// { +// ret = Delegate->private_getStrAttr( rdn, def, getAllLines, true ); +// return ret; +// } +// catch( exception& e ) +// { +// if( !isParentBound() ) +// throw; +// return getParent()->private_getStrAttr( rdn, def, getAllLines, throwEx ); +// } + +// } + +// public: + +// virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ) +// { +// } + +// virtual AttributeNames_t getAttributeNames() +// { +// } + +// virtual int getAttributeCount() +// { +// } + +// virtual bool isAttributeBound( const std::string& rdn, +// bool createIfNotThere = true +// ) throw( NoSuchAttribute ) +// { +// } + +// }; + + + /** + * Context subclass that shows the diff of two base Context + * objects. The difference from the first to the second context + * object added is shown. Interesting attributes such as + * was-created + * was-deleted + * is-same + * unidiff + * different-line-count + * are added to the view and the union of both contexts is presented. + * Objects that are not in the first context will be shown with was-deleted=1 + * and new objects in the first context wil appear with was-created=1 + * + * Note that the ctx argument to the constructor implicitly defines the first + * backing context, ie. context added first to appendToBaseContexts(). + * + * @see Factory::MakeDiffContext() + */ + class FERRISEXP_DLLLOCAL DiffContext + : + public StateLessEAHolder< DiffContext, UnionContext > + { + typedef DiffContext _Self; + typedef StateLessEAHolder< DiffContext, UnionContext > _Base; + + fh_runner m_runidiff; + + + friend fh_context Factory::MakeDiffContext( const fh_context& parent, + std::list< fh_context > sdContexts ); + + + virtual bool shouldInsertContext( const fh_context& c, bool created ); + virtual void cascadedInsert( Context* c, bool created = false ); + + DiffContext* getParentDiffContext(); + + /** + * return true if the context exists in both the new and old + * dir + */ + bool haveTwoContexts( DiffContext* c ); + + /** + * return the context in the first dir + */ + fh_context getFirstContext( DiffContext* c ); + /** + * return the context in the second dir + */ + fh_context getSecondContext( DiffContext* c ); + + + protected: + + virtual void createStateLessAttributes( bool force = false ); + virtual void getTypeInfos( std::list< Loki::TypeInfo >& l ) + { + l.push_back( typeid( _Self ) ); + _Base::getTypeInfos( l ); + } + public: + + DiffContext( fh_context parent, fh_context ctx, bool isCannibal = false ); + virtual ~DiffContext(); + + virtual std::string getURL(); + + /** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + priv_CreateContext( Context* parent, std::string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << std::endl; + return 0; + } + virtual void setup(); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static fh_stringstream SL_wasCreated( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_wasDeleted( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_isSame( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_isSameBytes( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUniDiff_Native( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUniDiff_Remote( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUniDiff( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getDifferentLineCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + + static fh_stringstream SL_getLinesAddedCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getLinesRemovedCount( DiffContext* c, const std::string& rdn, EA_Atom* atom ); + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** Handle ability to have local attributes aswell as those of delegate ********/ + /********************************************************************************/ + + typedef Context _DontDelegateBase; + + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + public: + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +class FERRISEXP_API StaticContentLeafContext + : + public StateLessEAHolder< StaticContentLeafContext, leafContext > +{ + typedef StateLessEAHolder< StaticContentLeafContext, leafContext > _Base; + typedef StaticContentLeafContext _Self; + + std::string m_content; + +protected: + + virtual fh_istream getIStream( ferris_ios::openmode m = std::ios::in ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual void createStateLessAttributes( bool force = false ); + +public: + + StaticContentLeafContext( Context* parent, + std::string rdn, + const std::string& content ); + virtual ~StaticContentLeafContext(); +}; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; +#endif diff --git a/Ferris/CursorAPI.cpp b/Ferris/CursorAPI.cpp new file mode 100644 index 0000000..4576450 --- /dev/null +++ b/Ferris/CursorAPI.cpp @@ -0,0 +1,169 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: CursorAPI.cpp,v 1.4 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +namespace Ferris +{ + using namespace std; + + namespace Config + { + const string cursor_object_always_remake = "cursor-object-always-remake"; + const string cursor_object_list_size = "cursor-list-size"; + + void setCursorOption( fh_context parent, + const std::string& k, + const std::string& v ) + { + setStrAttr( parent, k, v, true, true ); + } + }; + using namespace Config; + + static const string cursor_object_current_rdn = "cursor-rdn"; + static const string cursor_object_list_size_default = "20"; + + static string adjustClipRdnWithPadding( const std::string& s ) + { + fh_stringstream ss; + ss << setfill('0') << setw(5) << s; + return tostr(ss); + } + + + static fh_context adjustCursor( fh_context parent, int offset ) + { + string cliprdn = getStrAttr( parent, cursor_object_current_rdn, "-1" ); + string clipsize = getStrAttr( parent, + cursor_object_list_size, + cursor_object_list_size_default ); + bool alwaysRemake = isTrue( getStrAttr( parent, cursor_object_always_remake, "0" )); + int modulas = ( toint( clipsize ) + 1 ); + + cliprdn = tostr( toint(cliprdn) + offset ); + while( toint( cliprdn ) > toint( clipsize ) ) + { +// cerr << "+++ OLD rdn:" << cliprdn << endl; + cliprdn = tostr( toint( cliprdn ) - modulas ); +// cerr << "+++ NEW rdn:" << cliprdn << endl; + } + while( toint( cliprdn ) < 0 ) + { + cliprdn = tostr( toint( cliprdn ) + modulas ); + } + + cliprdn = adjustClipRdnWithPadding( cliprdn ); + setStrAttr( parent, cursor_object_current_rdn, cliprdn, true ); + + if( parent->isSubContextBound( cliprdn ) ) + { + if( alwaysRemake && offset != 0 ) + { + cerr << "parent->remove() cliprdn:" << cliprdn << endl; + parent->remove( cliprdn ); + // fall through to the code that handles non existant cursor file + } + else + { + fh_context ret = parent->getSubContext( cliprdn ); +// cerr << "adjustCursor() parent:" << parent->getURL() +// << " ret:" << ret->getURL() +// << endl; + return ret; + } + } + + +// cerr << "--- Creating file:" << cliprdn +// << " for parent:" << parent->getURL() +// << endl; + fh_context ret = Shell::CreateFile( parent, cliprdn ); +// cerr << "adjustCursor() parent:" << parent->getURL() +// << " ret:" << ret->getURL() +// << endl; + return ret; + } + + namespace Factory + { + fh_context getCursor( fh_context parent ) + { + return adjustCursor( parent, 0 ); + } + }; + namespace Cursor + { + fh_context cursorNext( fh_context cursor ) + { +// cerr << "cursorNext(enter) cursor:" << cursor->getURL() +// << " cursor->parent:" << cursor->getParent()->getURL() +// << endl; + fh_context ret = cursorOffset( cursor, 1 ); +// cerr << "cursorNext(exit) cursor:" << cursor->getURL() +// << " ret:" << ret->getURL() +// << endl; + return ret; + } + + fh_context cursorPrev( fh_context cursor ) + { + return cursorOffset( cursor, -1 ); + } + + fh_context cursorOffset( fh_context cursor, int offset ) + { + return adjustCursor( cursor->getParent(), offset ); + } + + fh_context cursorSet( fh_context cursor, fh_context newc ) + { + fh_context parent = cursor->getParent(); + string rdn = newc->getDirName(); + + if( parent->getSubContext( rdn ) ) + { + setStrAttr( parent, cursor_object_current_rdn, rdn, true ); + } + else + { + fh_stringstream ss; + ss << "Attempt to explicitly set current object for" + << " cursored context at:" << parent->getURL() + << " to object:" << newc->getURL() + << " when object is not an active member of of the collection"; + Throw_CursorException( tostr(ss), GetImpl(newc) ); + } + } + }; +}; + + diff --git a/Ferris/CursorAPI.hh b/Ferris/CursorAPI.hh new file mode 100644 index 0000000..35730ba --- /dev/null +++ b/Ferris/CursorAPI.hh @@ -0,0 +1,90 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: CursorAPI.hh,v 1.2 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CURSOR_API_H_ +#define _ALREADY_INCLUDED_FERRIS_CURSOR_API_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace Config + { + /** + * Values are 0 or 1. If 1 and the cursor exists when moving it + * then the file is remade. + */ + FERRISEXP_API extern const std::string cursor_object_always_remake; + + /** + * Set how many objects are in the circular list before wrapping + */ + FERRISEXP_API extern const std::string cursor_object_list_size; + + /** + * Use the above strings as keys and pass the values as described + * by each + */ + FERRISEXP_API void setCursorOption( fh_context parent, + const std::string& k, + const std::string& v ); + }; + namespace Factory + { + /** + * Get the cursor for this directory. + * + * note that one can use circular_iterator from Iterator.hh to move + * from the cursor right through the collection. + * + * eg. + * fh_context parent = Resolve(...); + * fh_context cursor = Factory::getCursor( parent ); + * Context::iterator cursor_iter = parent->find( cursor->getDirName() ); + * + * for( circular_iterator< Context, Context::iterator > + * ci = make_circular_iterator( parent, cursor_iter ); + * ci != make_circular_iterator( parent ); ++ci ) + * {} + * + */ + FERRISEXP_API fh_context getCursor( fh_context parent ); + }; + namespace Cursor + { + FERRISEXP_API fh_context cursorNext( fh_context cursor ); + FERRISEXP_API fh_context cursorPrev( fh_context cursor ); + FERRISEXP_API fh_context cursorOffset( fh_context cursor, int offset ); + FERRISEXP_API fh_context cursorSet( fh_context cursor, fh_context newc ); + }; +}; + +#endif diff --git a/Ferris/DBus.cpp b/Ferris/DBus.cpp new file mode 100644 index 0000000..63d9d61 --- /dev/null +++ b/Ferris/DBus.cpp @@ -0,0 +1,152 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + DBUS private support functions. + + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: DBus.cpp,v 1.2 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace DBus + { + DBusConnection* getSessionBus() + { + DBusError err; + DBusConnection *conn; + dbus_error_init (&err); + conn = dbus_bus_get (DBUS_BUS_SESSION, &err); + if (!conn) + { + LG_DBUS_W << "DBUS: Can not get session bus" << endl; + stringstream ss; + ss << "Failed to get session bus. error:" << err.name + << " message:" << err.message << endl; + Throw_DBusConnectionException( ss.str(), 0 ); + } + return conn; + } + + void + Signal::maybe_destroy_msg() + { + if( m_msg ) + { + dbus_message_unref (m_msg); + m_msg = 0; + } + } + + Signal::Signal( string& path, string &interface, string& name ) + : + m_msg( 0 ), + m_path( path ), + m_interface( interface ), + m_name( name ) + { + m_msg = dbus_message_new_signal( + path.c_str(), interface.c_str(), name.c_str() ); + } + Signal::Signal( const char* path, const char* interface, const char* name ) + : + m_msg( 0 ), + m_path( path ), + m_interface( interface ), + m_name( name ) + { + m_msg = dbus_message_new_signal( path, interface, name ); + } + Signal::~Signal() + { + maybe_destroy_msg(); + } + + void + Signal::clear() + { + maybe_destroy_msg(); + m_msg = dbus_message_new_signal( + m_path.c_str(), m_interface.c_str(), m_name.c_str() ); + } + + + void + Signal::send( DBusConnection *conn ) + { + if (!dbus_connection_send( conn, m_msg, NULL )) + { + LG_DBUS_W << "DBUS: error sending message" << endl; + fprintf (stderr, "error sending message\n"); + } + } + + + void + Signal::append( const string& s ) + { + const char* str1 = s.c_str(); + dbus_message_append_args( m_msg, + DBUS_TYPE_STRING, &str1, + DBUS_TYPE_INVALID ); + } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + void dbus_get( DBusMessage *message, std::string& ret1, std::string& ret2 ) + { + const char* str1 = 0; + const char* str2 = 0; + dbus_bool_t rc = dbus_message_get_args( message, 0, + DBUS_TYPE_STRING, &str1, + DBUS_TYPE_STRING, &str2, + DBUS_TYPE_INVALID ); + ret1 = str1; + ret2 = str2; + } + + void dbus_get( DBusMessage *message, std::string& ret1, std::string& ret2, std::string& ret3 ) + { + const char* str1 = 0; + const char* str2 = 0; + const char* str3 = 0; + dbus_bool_t rc = dbus_message_get_args( message, 0, + DBUS_TYPE_STRING, &str1, + DBUS_TYPE_STRING, &str2, + DBUS_TYPE_STRING, &str3, + DBUS_TYPE_INVALID ); + ret1 = str1; + ret2 = str2; + ret3 = str3; + } + + }; +}; diff --git a/Ferris/DBus_private.hh b/Ferris/DBus_private.hh new file mode 100644 index 0000000..ed5748e --- /dev/null +++ b/Ferris/DBus_private.hh @@ -0,0 +1,98 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2007 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: DBus_private.hh,v 1.3 2010/09/24 21:30:28 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DBUS_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_DBUS_PRIV_H_ + +#define DBUS_API_SUBJECT_TO_CHANGE +#include +#include +#include +#include +#include + +namespace Ferris +{ + namespace DBus + { + DBusConnection* getSessionBus(); + + class Signal + { + DBusMessage* m_msg; + std::string m_path; + std::string m_interface; + std::string m_name; + + void maybe_destroy_msg(); + + public: + Signal( std::string& path, std::string &interface, std::string& name ); + Signal( const char* path, const char* interface, const char* name ); + virtual ~Signal(); + void clear(); + void send( DBusConnection *conn ); + void append( const std::string& s ); + + template < class T1 > + void append( T1& arg1 ) + { + std::stringstream ss1; + ss1 << arg1; + std::string a1 = ss1.str(); + append( (const std::string&)a1 ); + } + template < class T > + void push_back( T& v ) + { + return append( v ); + } + void push_back( const std::string& v ) + { + return append( v ); + } + }; + + /************************************************************/ + /************************************************************/ + /************************************************************/ + +// template +// void dbus_get( DBusMessage *message, T1&, T2&, T3& ) +// { +// std::cerr << "Generic dbus_get(3) called. Programming error!" << std::endl; +// } + + void dbus_get( DBusMessage *message, std::string& ret1, std::string& ret2 ); + void dbus_get( DBusMessage *message, std::string& ret1, std::string& ret2, std::string& ret3 ); + + }; +}; +#endif diff --git a/Ferris/Daemon.cpp b/Ferris/Daemon.cpp new file mode 100644 index 0000000..a60ceda --- /dev/null +++ b/Ferris/Daemon.cpp @@ -0,0 +1,137 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Daemon.cpp,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Resolver_private.hh" + +using namespace std; + +namespace Ferris +{ + /** + * Detach from the controlling shell + */ + bool SwitchToDaemonMode() + { + pid_t pid; + + if(( pid = fork() ) < 0 ) + return -1; + else if( pid != 0 ) + { + /* close the parent proc */ + exit( 0 ); + } + + /* child */ + setsid(); + chdir("/"); + umask(0); + return 0; + } + + static int lock_reg( int fd, int cmd, int type, off_t offset, int whence, off_t len ) + { + struct flock l; + + l.l_type = type; + l.l_start = offset; + l.l_whence = whence; + l.l_len = len; + + return fcntl( fd, cmd, &l ); + } + +#define write_lock( fd, offset, whence, len ) \ + lock_reg( fd, F_SETLK, F_WRLCK, offset, whence, len ) + + + /** + * Try to obtain a lock on the given path, if the file is already locked + * exit. + */ + void ExitIfAlreadyRunning( const std::string& _lockPath ) + { + string lockPath = CleanupURL( _lockPath ); + if( starts_with( lockPath, "file:" ) ) + lockPath = lockPath.substr( 5 ); + + int fd = open( lockPath.c_str(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR ); + if( fd < 0 ) + { + string es = errnum_to_string( "", errno ); + cerr << "Can't open lock file:" << lockPath + << " reason:" << es << endl + << " exiting." << endl; + exit(1); + } + + if( write_lock( fd, 0, SEEK_SET, 0 ) < 0 ) + { + if( errno == EACCES || errno == EAGAIN ) + exit(0); + else + { + string es = errnum_to_string( "Write lock error", errno ); + cerr << es << endl; + exit(1); + } + } + + int val; + if( (val = fcntl( fd, F_GETFD, 0 )) < 0 ) + { + string es = errnum_to_string( "getting fd status", errno ); + cerr << es << endl; + exit(1); + } + val |= FD_CLOEXEC; + if( fcntl( fd, F_SETFD, val ) < 0 ) + { + string es = errnum_to_string( "setting fd status", errno ); + cerr << es << endl; + exit(1); + } + + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +}; diff --git a/Ferris/Daemon.hh b/Ferris/Daemon.hh new file mode 100644 index 0000000..67b9037 --- /dev/null +++ b/Ferris/Daemon.hh @@ -0,0 +1,44 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Daemon.hh,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DEAMON_H_ +#define _ALREADY_INCLUDED_FERRIS_DEAMON_H_ + +#include +#include + +namespace Ferris +{ + + FERRISEXP_API bool SwitchToDaemonMode(); + FERRISEXP_API void ExitIfAlreadyRunning( const std::string& lockPath ); + + +}; +#endif diff --git a/Ferris/Debug.cpp b/Ferris/Debug.cpp new file mode 100644 index 0000000..cc96d32 --- /dev/null +++ b/Ferris/Debug.cpp @@ -0,0 +1,104 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Debug.cpp,v 1.3 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + void BackTrace( int fd ) + { + const int arraysz = 500; + void* array[arraysz]; + size_t size; + + size = backtrace( array, arraysz ); + write( fd, "_________________________\n", + strlen("_________________________\n") ); + write( fd, "raw symbol backtrace...\n", + strlen("raw symbol backtrace...\n") ); + backtrace_symbols_fd( array, size, fd ); + + write( fd, "\n\ndemangled symbol backtrace...\n", + strlen("\n\ndemangled symbol backtrace...\n") ); + if( char** symbarray = backtrace_symbols( array, size ) ) + { + size_t outsz = 4096; + char* out = (char*)malloc( outsz+1 ); + for( int i=0; i < size; ++i ) + { +// cerr << "sym:" << symbarray[i] << endl; + std::string s = symbarray[i]; + std::string mangled = s.substr( 0, s.find(' ') ); + mangled = mangled.substr( mangled.find('(')+1 ); + mangled = mangled.substr( 0, mangled.rfind(')') ); + mangled = mangled.substr( 0, mangled.rfind('+') ); +// cerr << "mangled:" << mangled << endl; + + int status = 0; + char* unmangled = __cxxabiv1::__cxa_demangle( mangled.c_str(), out, &outsz, &status ); +// char* unmangled = __cxxabiv1::__cxa_demangle( mangled.c_str(), 0, 0, &status ); + if( !status ) + { + out = unmangled; +// cerr << unmangled << endl; + write( fd, out, strlen(out) ); + write( fd, "\n", 1 ); + } + else + { +// cerr << "status:" << status << endl; + write( fd, mangled.c_str(), mangled.length() ); + write( fd, "\n", 1 ); + } + } + free( out ); + free( symbarray ); + } + + write( fd, "_________________________\n", + strlen("_________________________\n") ); + + } + + void BackTrace_OLD( int fd ) + { + const int arraysz = 500; + void* array[arraysz]; + size_t size; + + size = backtrace( array, arraysz ); + backtrace_symbols_fd( array, size, fd ); + } +}; diff --git a/Ferris/Debug.hh b/Ferris/Debug.hh new file mode 100644 index 0000000..9ad3ada --- /dev/null +++ b/Ferris/Debug.hh @@ -0,0 +1,40 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Debug.hh,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +#ifndef _ALREADY_INCLUDED_FERRIS_DEBUG_H_ +#define _ALREADY_INCLUDED_FERRIS_DEBUG_H_ + +#include +#include + +namespace Ferris +{ + FERRISEXP_API void BackTrace( int fd = STDERR_FILENO ); +}; +#endif + diff --git a/Ferris/DublinCore.cpp b/Ferris/DublinCore.cpp new file mode 100644 index 0000000..faf616d --- /dev/null +++ b/Ferris/DublinCore.cpp @@ -0,0 +1,59 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: DublinCore.cpp,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + const stringlist_t& getUnqualifiedDublinCoreAttributeNames() + { + static stringlist_t ret; + if( ret.empty() ) + { + ret.push_back("title"); + ret.push_back("publisher"); + ret.push_back("creator"); + ret.push_back("description"); + ret.push_back("language"); + ret.push_back("subject"); + ret.push_back("contributor"); + ret.push_back("date"); + ret.push_back("type"); + ret.push_back("format"); + ret.push_back("identifier"); + ret.push_back("source"); + ret.push_back("relation"); + ret.push_back("coverage"); + ret.push_back("rights"); + } + return ret; + } +}; + + diff --git a/Ferris/DublinCore.hh b/Ferris/DublinCore.hh new file mode 100644 index 0000000..5f31631 --- /dev/null +++ b/Ferris/DublinCore.hh @@ -0,0 +1,43 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: DublinCore.hh,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DUBLIN_CORE_H_ +#define _ALREADY_INCLUDED_FERRIS_DUBLIN_CORE_H_ + +#include +#include + +namespace Ferris +{ + + FERRISEXP_API const stringlist_t& getUnqualifiedDublinCoreAttributeNames(); + +}; +#endif + diff --git a/Ferris/EAGenerators.hh b/Ferris/EAGenerators.hh new file mode 100644 index 0000000..a8b6679 --- /dev/null +++ b/Ferris/EAGenerators.hh @@ -0,0 +1,152 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAGenerators.hh,v 1.2 2010/09/24 21:30:29 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#include +#include + +#ifndef _ALREADY_INCLUDED_EA_GENERATORS_H_ +#define _ALREADY_INCLUDED_EA_GENERATORS_H_ 1 + +namespace Ferris +{ + + +// class EAGenerator : public Versioned +// { +// protected: + +// Attribute* Ctx; + +// virtual std::string priv_str() = 0; + +// public: + +// EAGenerator( Attribute* ctx ); +// std::string str(); + + +// }; + + +// template +// class WrEAGenerator : public EAGenerator +// { +// protected: + +// Attribute* Ctx; + +// virtual void priv_fromT( const T& s ) +// { +// } + +// public: + +// WrEAGenerator( Attribute* ctx ) +// : EAGenerator( ctx ) +// {} + +// void fromT( const T& s ) +// { +// priv_fromT(s); +// } + + + +// }; + +// /////////////////////////////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////////////////////////////// + + +// class Digest_EAGenerator : public EAGenerator +// { +// protected: + +// virtual std::string priv_str(); +// std::string DigestName; + +// public: + +// Digest_EAGenerator( Attribute* ctx, std::string _DigestName ); +// std::string getDigestName() +// { +// return DigestName; +// } + +// }; + +// /////////////////////////////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////////////////////////////// + + +// class Head_EAGenerator : public WrEAGenerator +// { +// protected: virtual std::string priv_str(); +// public: + +// Head_EAGenerator( Attribute* ctx ) +// : WrEAGenerator( ctx ) +// {} + + +// }; + +// class HeadRadix_EAGenerator : public WrEAGenerator +// { +// long V; + +// long getParam() +// { +// return V; +// } + +// protected: virtual std::string priv_str(); +// public: + +// HeadRadix_EAGenerator( Attribute* ctx ) +// : WrEAGenerator( ctx ), V(16) +// {} + +// typedef long value_t; + +// }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +}; + + +#endif // #ifndef _ALREADY_INCLUDED_EA_GENERATORS_H_ diff --git a/Ferris/EAIndexer.cpp b/Ferris/EAIndexer.cpp new file mode 100644 index 0000000..b8b0929 --- /dev/null +++ b/Ferris/EAIndexer.cpp @@ -0,0 +1,1158 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexer.cpp,v 1.19 2010/09/24 21:30:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace EAIndex + { + const string IDXMGR_EXPLICIT_EANAMES_TO_INDEX_K = "idxmgr-explicit-eanames-to-index-k"; + + const string IDXMGR_EANAMES_TO_INDEX_REGEX_K = "idxmgr-eanames-to-index-regex-k"; + + + const string IDXMGR_EANAMES_IGNORE_K = "idxmgr-eanames-ignore-k"; +// const string IDXMGR_EANAMES_IGNORE_DEFAULT = "as-xml,as-text,content," +// /**/ "block-count,dontfollow-block-count,inode,dontfollow-inode,dontfollow-size," +// /**/ "fs-available-block-count,fs-file-nodes-free,fs-free-block-count," +// /**/ "size-human-readable,atime-ctime,ctime-ctime,mtime-ctime," +// /**/ "atime-display,ctime-display,mtime-display," +// /**/ "md2,mdc2,attribute-count,block-size,device-type," +// /**/ "fs-block-count,fs-block-size,fs-file-name-length-maximum,fs-file-nodes-total," +// /**/ "fs-type,protection-ls,force-passive-view," +// /**/ "recommended-ea,recommended-ea-union,recommended-ea-union-view," +// /**/ "download-if-mtime-since-ctime,download-if-mtime-since-display" +// /**/ ""; + + const string IDXMGR_EANAMES_REGEX_IGNORE_K = "idxmgr-eanames-regex-ignore-k"; +// const string IDXMGR_EANAMES_REGEX_IGNORE_DEFAULT = (string)"schema:.*" + '\0' +// /**/ + "recursive-.*" + '\0' +// /**/ + "dontfollow-.*" + '\0' +// /**/ + "subcontext.*"; + const string IDXMGR_MAX_VALUE_SIZE_K = "idxmgr-max-value-size-k"; +// const string IDXMGR_MAX_VALUE_SIZE_DEFAULT = "200"; + + const string IDXMGR_FULLTEXT_INDEX_PATH_K = "idxmgr-fulltext-index-path-k"; + + + + void SET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT( const std::string& v ) + { + setEDBString( GET_FDB_GENERAL(), "EAINDEX_EANAMES_NOT_TO_INDEX", v ); + } + void SET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT( const std::string& v ) + { + setEDBString( GET_FDB_GENERAL(), "EAINDEX_EANAMES_REGEX_IGNORE", v ); + } + void SET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT( const std::string& v ) + { + setEDBString( GET_FDB_GENERAL(), "EAINDEX_MAX_VALUE_SIZE_TO_INDEX", v ); + } + void SET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT( const std::string& v ) + { + setEDBString( GET_FDB_GENERAL(), "EAINDEX_EANAMES_TO_INDEX_REGEX", v ); + } + + std::string GET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT() + { + return getEDBString( + GET_FDB_GENERAL(), "EAINDEX_EANAMES_NOT_TO_INDEX", + "name,language-human,content,as-xml,as-text,as-rdf," + "block-count,dontfollow-block-count,inode,dontfollow-inode,dontfollow-size," + "dontfollow-block-size,dontfollow-device,dontfollow-device-type," + "dontfollow-filesystem-filetype,dontfollow-hard-link-count," + "recommended-ea-short," + "associated-branches,depth-per-color,xfs-ea-names,exif:ea-names," + "fs-available-block-count,fs-file-nodes-free,fs-free-block-count," + "size-human-readable," + "attribute-count,block-size,device-type," + "fs-block-count,fs-block-size,fs-file-name-length-maximum,fs-file-nodes-total," + "fs-type,protection-ls,force-passive-view," + "recommended-ea,recommended-ea-union,recommended-ea-union-view," + "is-dir-try-automounting," + "rgba-32bpp,exif:thumbnail-update,exif:thumbnail-rgba-32bpp,md2,sha1,crc32,crc32-is-valid,mdc2,download-if-mtime-since,force-passive-view,path,realpath,emblem:upset,emblem:list,emblem:list-ui" ); + } + std::string GET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT( bool commaSeperated ) + { + string def = (std::string)"^schema:.*" + '\0' + /**/ + "^recursive-.*" + '\0' + /**/ + "^subcontext.*" + '\0' + /**/ + "^branchfs-.*" + '\0' + /**/ + "^associated-branches-.*" + '\0' + /**/ + "^as-.*" + '\0' + /**/ + "^medallion.*" + '\0' + /**/ + ".*-ctime$" + '\0' + /**/ + ".*-display$" + '\0' + /**/ + ".*-cdrom-count$" + '\0' + /**/ + ".*-dvd-count$" + '\0' + /**/ + ".*-human-readable$" + '\0' + /**/ + ".*-granularity$" + '\0' + /**/ + "^emblem:id-fuzzy.*$" + '\0' + /**/ + "^emblem:has-fuzzy.*$" + '\0' + /**/ + "^emblem:.*-mtime.*$" + '\0' + /**/ + "^geospatial-.*$" + '\0' + ; + + string ret = getEDBString( GET_FDB_GENERAL(), "EAINDEX_EANAMES_REGEX_IGNORE", def ); + +// cerr << "GET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT(cs:" << commaSeperated << ") " +// << " FDB_GENERAL:" << GET_FDB_GENERAL() +// << " ret:" << ret +// << endl; + if( commaSeperated ) + replace( ret.begin(), ret.end(), '\0', ',' ); + + return ret; + } + std::string GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT() + { + return getEDBString( + GET_FDB_GENERAL(), "EAINDEX_MAX_VALUE_SIZE_TO_INDEX", + "1024" ); + } + std::string GET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT() + { + return getEDBString( GET_FDB_GENERAL(), "EAINDEX_EANAMES_TO_INDEX_REGEX", ".*" ); + } + + + + + + + const string IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K = "idxmgr-nonresolvable-not-to-remove-regex-k"; + void SET_EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( const std::string& v ) + { + setEDBString( GET_FDB_GENERAL(), "EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX", v ); + } + std::string GET_EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( bool commaSeperated ) + { + string def = (std::string)"" + '\0'; + string ret = getEDBString( GET_FDB_GENERAL(), "EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX", def ); + + if( commaSeperated ) + replace( ret.begin(), ret.end(), '\0', ',' ); + + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + DocumentIndexer::DocumentIndexer( fh_idx idx ) + : + m_idx( idx ), + m_dontCheckIfAlreadyThere( false ), + m_filesIndexedCount( 0 ), + m_haveCalledPrepareForWrites( false ), + m_AddEvenIfAlreadyCurrent( false ), + m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent( false ), + m_retireNonExistentDocumentsToMuliversion( false ), + m_NonExistentDocumentsState( 0 ) + { +// cerr << "m_idx->getEANamesIgnore() s:" << m_idx->getEANamesIgnore() << endl; + setIgnoreEANames( m_idx->getEANamesIgnore() ); + appendIgnoreEARegexs( m_idx->getEANamesIgnoreRegexes() ); + setMaximunValueSize( m_idx->getMaxValueSize() ); + appendNonResolvableURLsNotToRemoveRegexes( m_idx->getNonResolvableURLsNotToRemoveRegexes() ); + setEANamesToIndexRegex( m_idx->getEANamesToIndexRegex() ); + } + + DocumentIndexer::~DocumentIndexer() + { + if( m_idx ) + m_idx->allWritesComplete(); + + if( m_idx ) + m_idx->sync(); + } + + AddToEAIndexProgress_Sig_t& + DocumentIndexer::getProgressSig() + { + return m_progressSig; + } + + + void + DocumentIndexer::setIgnoreEANames( const std::string& s ) + { + clearIgnoreEANames(); + appendIgnoreEANames( s ); + } + + void + DocumentIndexer::appendIgnoreEANames( const std::string& s ) + { + stringlist_t sl = Util::parseCommaSeperatedList( s ); + copy( sl.begin(), sl.end(), inserter( m_ignoreEANames, m_ignoreEANames.end() )); + } + + void + DocumentIndexer::clearIgnoreEANames() + { + m_ignoreEANames.clear(); + } + + stringset_t& + DocumentIndexer::getIgnoreEANames() + { + return m_ignoreEANames; + } + + + void + DocumentIndexer::appendIgnoreEARegexs( const std::string& s ) + { + m_ignoreEARegexs.append( s ); + } + + void + DocumentIndexer::appendIgnoreEARegexs( const stringlist_t& sl ) + { + m_ignoreEARegexs.append( sl ); + } + + void + DocumentIndexer::clearIgnoreEARegexs() + { + m_ignoreEARegexs.clear(); + } + + DocumentIndexer::m_ignoreEARegexs_t& + DocumentIndexer::getIgnoreEARegexs() + { + return m_ignoreEARegexs; + } + + + + + void + DocumentIndexer::appendNonResolvableURLsNotToRemoveRegexes( const std::string& s ) + { + m_nonResolvableURLsNotToRemoveRegexes.append( s ); + } + + + void DocumentIndexer::appendNonResolvableURLsNotToRemoveRegexes( const stringlist_t& sl ) + { + m_nonResolvableURLsNotToRemoveRegexes.append( sl ); + } + + void DocumentIndexer::clearNonResolvableURLsNotToRemoveRegexes() + { + m_nonResolvableURLsNotToRemoveRegexes.clear(); + } + RegexCollection& + DocumentIndexer::getNonResolvableURLsNotToRemoveRegexes() + { + return m_nonResolvableURLsNotToRemoveRegexes; + } + + void + DocumentIndexer::setEANamesToIndex( const stringlist_t& sl ) + { + m_EANamesToIndex.clear(); + copy( sl.begin(), sl.end(), inserter( m_EANamesToIndex, m_EANamesToIndex.end() ) ); + } + + stringlist_t + DocumentIndexer::getEANamesToIndex() + { + stringlist_t ret; + copy( m_EANamesToIndex.begin(), + m_EANamesToIndex.end(), + back_inserter( ret )); + return ret; + } + + bool + DocumentIndexer::EANamesToIndexContains( const std::string& s ) + { + if( !m_EANamesToIndex.empty() ) + { + if( m_EANamesToIndex.find( s ) == m_EANamesToIndex.end() ) + return false; + } + return true; + } + + + + void + DocumentIndexer::setEANamesToIndexRegex( const std::string& s ) + { + m_EANamesToIndexRegex = 0; + m_EANamesToIndexRegexString = ""; + if( !s.empty() ) + m_EANamesToIndexRegex = toregexh( s ); + m_EANamesToIndexRegexString = s; + } + + std::string& + DocumentIndexer::getEANamesToIndexRegex() + { + return m_EANamesToIndexRegexString; + } + + bool + DocumentIndexer::EANamesToIndexRegexContains( const std::string& s ) + { + if( m_EANamesToIndexRegex ) + { + if( !regex_match( s, m_EANamesToIndexRegex )) + { + return false; + } + } + return true; + } + + + + void + DocumentIndexer::setMaximunValueSize( std::streamsize sz ) + { + m_maxValueSize = sz; + } + + std::streamsize + DocumentIndexer::getMaximunValueSize() + { + return m_maxValueSize; + } + + void + DocumentIndexer::setDontCheckIfAlreadyThere( bool v ) + { + m_dontCheckIfAlreadyThere = v; + } + + bool + DocumentIndexer::getDontCheckIfAlreadyThere() + { + return m_dontCheckIfAlreadyThere; + } + + int + DocumentIndexer::getFilesIndexedCount() + { + return m_filesIndexedCount; + } + + void + DocumentIndexer::setAddEvenIfAlreadyCurrent( bool v ) + { + m_AddEvenIfAlreadyCurrent = v; + } + bool + DocumentIndexer::getAddEvenIfAlreadyCurrent() + { + return m_AddEvenIfAlreadyCurrent; + } + + + + void + DocumentIndexer::setRetireNonExistentDocumentsToMuliversion( bool v ) + { + m_retireNonExistentDocumentsToMuliversion = v; + } + + + class NonExistentDocumentsState + : + public Handlable + { + fh_context m_dirContext; + + stringset_t m_indexedDocs; + public: + NonExistentDocumentsState( fh_context dc ); + void add( fh_context c ); + void retire( fh_context dc, fh_docindexer di ); + }; + + NonExistentDocumentsState::NonExistentDocumentsState( fh_context dc ) + : + m_dirContext( dc ) + { + LG_EAIDX_D << "NonExistentDocumentsState(ctor) dc:" << dc->getURL() << endl; + } + + void + NonExistentDocumentsState::add( fh_context c ) + { + LG_EAIDX_D << "NonExistentDocumentsState::add() c:" << c->getURL() << endl; + m_indexedDocs.insert( c->getURL() ); + } + + void + NonExistentDocumentsState::retire( fh_context dc, fh_docindexer di ) + { + LG_EAIDX_D << "NonExistentDocumentsState::retire() dc:" << dc->getURL() << endl; + // Steps: + // find all the filenames for directory dc + // remove the filenames we have seen + // retire the filenames that were there that we didn't find this time + + + // Find existing docids from database + stringset_t dbDocs; + { + stringstream qss; + qss << "(parent-url==" << dc->getURL() << ")"; + ExecuteQueryToToURLs( qss.str(), di->m_idx, dbDocs ); + } + + // Find which are in the database but not seen now. + stringset_t delme; + set_difference( dbDocs.begin(), dbDocs.end(), + m_indexedDocs.begin(), m_indexedDocs.end(), + inserter( delme, delme.end() ) ); + + // Remove old docs. + if( !delme.empty() ) + { + if( LG_EAIDX_D_ACTIVE ) + { + LG_EAIDX_D << "NonExistentDocumentsState::retire() removing docids.sz:" + << delme.size() << endl; + for( stringset_t::iterator si = delme.begin(); si!=delme.end(); ++si ) + { + LG_EAIDX_D << "retire doc:" << *si << endl; + } + } + + di->m_idx->retireDocumentsFromIndex( delme ); + } + } + + + void + DocumentIndexer::EnteringContext(fh_context ctx) + { + if( m_retireNonExistentDocumentsToMuliversion ) + { +// cerr << "DocumentIndexer::EnteringContext() ctx:" << ctx->getURL(); + m_NonExistentDocumentsState = new NonExistentDocumentsState( ctx ); + } + } + + void + DocumentIndexer::LeavingContext(fh_context ctx) + { + if( m_NonExistentDocumentsState ) + { +// cerr << "DocumentIndexer::LeavingContext() ctx:" << ctx->getURL(); + m_NonExistentDocumentsState->retire( ctx, this ); + m_NonExistentDocumentsState = 0; + } + } + + + + void + DocumentIndexer::addContextToIndex( fh_context c ) + { + if( !m_haveCalledPrepareForWrites ) + { + m_haveCalledPrepareForWrites = true; + int f = MetaEAIndexerInterface::PREPARE_FOR_WRITES_NONE; + if( !m_AddEvenIfAlreadyCurrent ) + f |= MetaEAIndexerInterface::PREPARE_FOR_WRITES_ISNEWER_TESTS; + + m_idx->prepareForWrites( f ); + } + + LG_EAIDX_D << "DocumentIndexer::addContextToIndex() c:" << c->getURL() << endl; + + try + { + LG_EAIDX_D << "DocumentIndexer::addContextToIndex(AA) c:" << c->getURL() << endl; + + if( !m_AddEvenIfAlreadyCurrent ) + { + bool sup = m_idx->getIndexMethodSupportsIsFileNewerThanIndexedVersion(); + if( !sup && !m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent ) + { + m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent = true; + cerr << "WARNING: index doesn't support isNewer() checks" << endl; + } + + if( sup ) + { + bool isNewer = m_idx->isFileNewerThanIndexedVersion( c ); + if( !isNewer ) + { + LG_EAIDX_D << "Skipping because index is current for c:" + << c->getURL() << endl; + + // retain previous metadata as is. + if( m_retireNonExistentDocumentsToMuliversion ) + { + m_NonExistentDocumentsState->add( c ); + } + + return; + } + } + + if( fh_emblem em = getShouldSkipIndexingEmblem() ) + { + if( c->hasMedallion() ) + { + fh_medallion med = c->getMedallion(); + if( med && med->hasEmblem( em ) ) + { + LG_EAIDX_D << "Context has should-skip-indexing emblem... skipping c:" << c->getURL() << endl; + cerr << "Context has should-skip-indexing emblem... skipping c:" << c->getURL() << endl; + return; + } + } + } + } + + LG_EAIDX_D << "DocumentIndexer::addContextToIndex(BB) c:" << c->getURL() << endl; + + m_idx->visitingContext( c ); + + + LG_EAIDX_D << "DocumentIndexer::addContextToIndex(calling addToIndex) c:" + << c->getURL() << endl; + + if( m_retireNonExistentDocumentsToMuliversion ) + { + m_NonExistentDocumentsState->add( c ); + } + + m_idx->addToIndex( c, this ); + ++m_filesIndexedCount; + } + catch( exception& e ) + { + // The file existed, but there was an error, don't wipe the old metadata. + if( m_retireNonExistentDocumentsToMuliversion ) + { + m_NonExistentDocumentsState->add( c ); + } + + LG_EAIDX_W << "DocumentIndexer::addContextToIndex(1) e:" << e.what() << endl; + m_idx->sync(); + LG_EAIDX_W << "DocumentIndexer::addContextToIndex(2) e:" << e.what() << endl; + throw e; + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Ferrisls_feaindexadd_display_base::Ferrisls_feaindexadd_display_base( EAIndex::fh_idx idx ) + : + m_idx( idx ), + m_contextCount( 0 ), + exit_status( 0 ), + m_TotalFilesDoneCount( 0 ), + m_TotalFilesIndexedCount( 0 ), + m_tryToAddToFulltextIndexToo( false ), + m_sloth( false ), + m_autoClose( false ), + m_hadUserInteraction( false ), + m_fullTextIndexPath(""), + m_onlyAddToFullTextIndex(false), + m_ftxidx( 0 ), + m_userSelectedTotalFilesToIndexPerRun( 0 ) + { + if( m_idx ) + m_indexer = EAIndex::Factory::makeDocumentIndexer( m_idx ); + } + + void + Ferrisls_feaindexadd_display_base::perform( const std::string& earl ) + { + if( m_verbose ) + cerr << "srcurl:" << earl << endl; + + m_ls.setURL( earl ); + m_ls(); + DetachAllSignals(); + } + + + void + Ferrisls_feaindexadd_display_base::setUserSelectedTotalFilesToIndexPerRun( int v ) + { + m_userSelectedTotalFilesToIndexPerRun = v; + } + + + + void + Ferrisls_feaindexadd_display_base::sync() + { + m_idx->sync(); + } + + void + Ferrisls_feaindexadd_display_base::printTotals() + { + if( !m_showTotals ) + return; + } + + + void + Ferrisls_feaindexadd_display_base::setVerbose( bool v ) + { + m_verbose = v; + } + + void + Ferrisls_feaindexadd_display_base::setAddEvenIfAlreadyCurrent( bool v ) + { + m_indexer->setAddEvenIfAlreadyCurrent( v ); + } + + + void + Ferrisls_feaindexadd_display_base::setShowTotals( bool v ) + { + m_showTotals = v; + } + + void + Ferrisls_feaindexadd_display_base::setIndex( EAIndex::fh_idx idx ) + { + m_idx = idx; + if( m_idx ) + m_indexer = EAIndex::Factory::makeDocumentIndexer( m_idx ); + } + + void Ferrisls_feaindexadd_display_base::setIgnoreEANames( const std::string& s ) + { + m_indexer->setIgnoreEANames( s ); + } + + void Ferrisls_feaindexadd_display_base::appendIgnoreEANames( const std::string& s ) + { + m_indexer->appendIgnoreEANames( s ); + } + void Ferrisls_feaindexadd_display_base::appendIgnoreEARegexs( const std::string& s ) + { + m_indexer->appendIgnoreEARegexs( s ); + } + + void Ferrisls_feaindexadd_display_base::setMaximunValueSize( std::streamsize sz ) + { + m_indexer->setMaximunValueSize( sz ); + } + + void Ferrisls_feaindexadd_display_base::setDontCheckIfAlreadyThere( bool v ) + { + m_indexer->setDontCheckIfAlreadyThere( v ); + } + + void Ferrisls_feaindexadd_display_base::setEANamesToIndex( const stringlist_t& sl ) + { + m_indexer->clearIgnoreEARegexs(); + m_indexer->clearIgnoreEANames(); + m_indexer->setEANamesToIndex( sl ); + } + int Ferrisls_feaindexadd_display_base::getFilesIndexedCount() + { + return m_indexer->getFilesIndexedCount(); + } + void Ferrisls_feaindexadd_display_base::setRetireNonExistentDocumentsToMuliversion( bool v ) + { + m_indexer->setRetireNonExistentDocumentsToMuliversion( v ); + } + void + Ferrisls_feaindexadd_display_base::setTryToAddToFulltextIndexToo( bool v ) + { + m_ftxidx = 0; + m_tryToAddToFulltextIndexToo = v; + if( m_tryToAddToFulltextIndexToo ) + { + if( m_idx ) + { + if( m_fullTextIndexPath.empty() ) + { + m_ftxidx = m_idx->getFulltextIndex(); + } + else + { + m_ftxidx = FullTextIndex::Factory::getFullTextIndex( m_fullTextIndexPath ); + } + } + } + } + void + Ferrisls_feaindexadd_display_base::setSloth( bool v ) + { + m_sloth = v; + } + + void + Ferrisls_feaindexadd_display_base::setAutoClose( bool v ) + { + m_autoClose = v; + } + + void + Ferrisls_feaindexadd_display_base::setFullTextIndexPath( const std::string& v ) + { + m_fullTextIndexPath = v; + if( !v.empty() ) + m_tryToAddToFulltextIndexToo = true; + } + + void + Ferrisls_feaindexadd_display_base::setOnlyAddToFullTextIndex( bool v ) + { + m_onlyAddToFullTextIndex = v; + if( v ) + m_tryToAddToFulltextIndexToo = true; + } + + + + + + FullTextIndex::fh_idx + Ferrisls_feaindexadd_display_base::getFulltextIndex() + { + return m_ftxidx; + } + + + FullTextIndex::fh_docindexer + Ferrisls_feaindexadd_display_base::getDocumentIndexer() + { + FullTextIndex::fh_docindexer ftxindexer = FullTextIndex::Factory::makeDocumentIndexer( getFulltextIndex() ); + ftxindexer->setDontCheckIfAlreadyThere( m_indexer->getDontCheckIfAlreadyThere() ); +// if( Verbose ) +// ftxindexer->getProgressSig().connect( sigc::ptr_fun( progressf ) ); + + return ftxindexer; + } + + + bool Ferrisls_feaindexadd_display_base::shouldEAtryToAddToEAIndex() + { + return !m_onlyAddToFullTextIndex; + } + + bool Ferrisls_feaindexadd_display_base::shouldEAtryToAddToFulltextIndex() + { + return m_tryToAddToFulltextIndexToo; + } + + + + + void + Ferrisls_feaindexadd_display_base::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + } + + void + Ferrisls_feaindexadd_display_base::workStarting() + { + } + + void + Ferrisls_feaindexadd_display_base::workComplete() + { + } + + void + Ferrisls_feaindexadd_display_base::addToIndexFromFileList( EAIndex::fh_idx& idx, fh_istream& fiss ) + { + string srcURL; + LG_EAIDX_D << "addToIndexFromFileList(top)" << endl; + + EAIndex::fh_docindexer indexer = EAIndex::Factory::makeDocumentIndexer( idx ); + indexer->setAddEvenIfAlreadyCurrent( m_indexer->getAddEvenIfAlreadyCurrent() ); + while( getline( fiss, srcURL ) ) + { + try + { + LG_EAIDX_D << "adding from stdin src:" << srcURL << endl; + + if( srcURL.empty() ) + continue; + + fh_context c = Resolve( srcURL ); + + if( idx->getIndexMethodSupportsIsFileNewerThanIndexedVersion() ) + { + if( !idx->isFileNewerThanIndexedVersion( c ) ) + { + if( m_verbose ) + { + cerr << "Skipping:" << srcURL << endl; + } + continue; + } + } + + cerr << "ADDING:" << srcURL << endl; + indexer->addContextToIndex( c ); + m_TotalFilesIndexedCount++; + + if( m_userSelectedTotalFilesToIndexPerRun + && m_TotalFilesIndexedCount >= m_userSelectedTotalFilesToIndexPerRun ) + { + cerr << "Have reached the selected max number of files to index for this run..." << endl; + return; + } + } + catch( exception& e ) + { + cerr << "----------------------" << endl; + cerr << "for: " << srcURL << endl; + cerr << "cought error:" << e.what() << endl; + exit_status = 1; + } + ++m_TotalFilesDoneCount; + } + LG_EAIDX_D << "addToIndexFromFileList(bottom)" << endl; + } + + int + Ferrisls_feaindexadd_display_base::getExitStatus() + { + return exit_status || m_ls.hadErrors(); + } + + + /******************************/ + /******************************/ + /******************************/ + + + + void + EAIndexAddPopTableCollector::reset() + { +// CreateTypeName_CSTR = 0; + IndexPath_CSTR = 0; + FilelistFile_CSTR = 0; + FilelistStdin = 0; + IgnoreEANames = 0; + IgnoreEANamesAppend = 0; + IgnoreEARegexsAppend = 0; + EAToIndex = 0; + Verbose = 0; + ShowVersion = 0; + EAIndexMaxValueSize = toint( EAIndex::GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT() ); + DontCheckIfAlreadyThere = 0; + ListDirectoryNodeOnly = 0; + ForceReadRootDirectoryNodes = 0; + RecursiveList = 0; + FilterStringCSTR = 0; + RetireNonExistentDocumentsToMuliversion = 0; + tryToAddToFulltextIndexToo = 0; + ShowTotals = 0; + AddEvenIfAlreadyCurrent = 0; + Sloth = 0; + AutoClose = 0; + FullTextIndexPath_CSTR = 0; + OnlyAddToFullTextIndex = 0; + userSelectedTotalFilesToIndexPerRun = 0; + } + + + void + EAIndexAddPopTableCollector::poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + const string key = opt->longName; + LG_EAIDX_D << "poptCallback() key:" << key << endl; + } + + + EAIndexAddPopTableCollector::EAIndexAddPopTableCollector() + { + reset(); + } + + void + EAIndexAddPopTableCollector::ArgProcessingDone( poptContext optCon ) + { + if( ShowVersion ) + { + cout << "feaindexadd version: $Id: EAIndexer.cpp,v 1.19 2010/09/24 21:30:30 ben Exp $\n" +// << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + EAIndex::fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( IndexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } + + string FilterString = FilterStringCSTR ? FilterStringCSTR : ""; + fh_Ferrisls_feaindexadd_display_base d = m_obj; + Ferrisls& ls = d-> getFerrisls(); + + d->setIndex( idx ); + ls.setListDirectoryNodeOnly( ListDirectoryNodeOnly ); + ls.setForceReadRootDirectoryNodes( ForceReadRootDirectoryNodes ); + ls.setRecursiveList( RecursiveList ); + ls.setDisplay( d ); + + if( FilterString.length() ) + { + ls.setFilterString( FilterString ); + } + + if( IgnoreEANames ) + d->setIgnoreEANames( IgnoreEANames ); + if( IgnoreEANamesAppend ) + d->appendIgnoreEANames( IgnoreEANamesAppend ); + if( IgnoreEARegexsAppend ) + d->appendIgnoreEARegexs( IgnoreEARegexsAppend ); + d->setMaximunValueSize( EAIndexMaxValueSize ); + d->setDontCheckIfAlreadyThere( DontCheckIfAlreadyThere ); + d->setShowTotals( ShowTotals ); + d->setAddEvenIfAlreadyCurrent( AddEvenIfAlreadyCurrent ); + d->setRetireNonExistentDocumentsToMuliversion( RetireNonExistentDocumentsToMuliversion ); + d->setTryToAddToFulltextIndexToo( tryToAddToFulltextIndexToo ); + d->setSloth( Sloth ); + d->setAutoClose( AutoClose ); + d->setUserSelectedTotalFilesToIndexPerRun( userSelectedTotalFilesToIndexPerRun ); + if( FullTextIndexPath_CSTR ) + d->setFullTextIndexPath( FullTextIndexPath_CSTR ); + d->setOnlyAddToFullTextIndex( OnlyAddToFullTextIndex ); + + if( EAToIndex ) + { + stringlist_t sl = Util::parseCommaSeperatedList( EAToIndex ); + d->setEANamesToIndex( sl ); + } + d->setVerbose( Verbose ); + + if( FilelistFile_CSTR ) + { + string filelistFile = FilelistFile_CSTR; + fh_ifstream fiss( filelistFile ); + d->addToIndexFromFileList( idx, fiss ); + exit( 0 ); + } + if( FilelistStdin ) + { + fh_istream fiss = Ferris::Factory::fcin(); + d->addToIndexFromFileList( idx, fiss ); + exit( 0 ); + } + + } + + + struct ::poptOption* + EAIndexAddPopTableCollector::getTable( fh_Ferrisls_feaindexadd_display_base obj ) + { + m_obj = obj; + allocTable( 100 ); + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + setEntry( + &table[i++], "verbose", 'v', POPT_ARG_NONE, &Verbose, + "show what is happening", "" ); + + setEntry( + &table[i++], "skip-already-indexed-check", 'S', POPT_ARG_NONE, &DontCheckIfAlreadyThere, + "don't check if the context is already indexed, just add it.", "" ); + + + setEntry( + &table[i++], "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, + "which index to use", "" ); + + setEntry( + &table[i++], "filelist-file", 'f', POPT_ARG_STRING, &FilelistFile_CSTR, + "file containing the URLs of the files to index (eg. made by find . >foo)", "" ); + + setEntry( + &table[i++], "filelist-stdin", '1', POPT_ARG_NONE, &FilelistStdin, + "read filenames from stdin to index", "" ); + + setEntry( + &table[i++], "total-files-to-index-per-run", 'N', POPT_ARG_INT, &userSelectedTotalFilesToIndexPerRun, + "only add this many files to the index and then exit. Note that skipped files do not count towards this total, files must be really (re)indexed to count.", "" ); + + setEntry( + &table[i++], "ignore-ea", 0, POPT_ARG_STRING, &IgnoreEANames, + "ignore the following attributes when creating the ea index", "" ); + + setEntry( + &table[i++], "ignore-ea-append", 0, POPT_ARG_STRING, &IgnoreEANamesAppend, + "append the following to the list of ea names to ignore when creating index", + "" ); + + setEntry( + &table[i++], "ignore-ea-regex-append", 0, POPT_ARG_STRING, &IgnoreEARegexsAppend, + "append the following to the list of regexes which select which attributes are not to be indexed", + "" ); + + setEntry( + &table[i++], "ea-value-max-size", 0, POPT_ARG_INT, &EAIndexMaxValueSize, + "largest attribute value to index", "" ); + + setEntry( + &table[i++], "ea-to-index", 0, POPT_ARG_STRING, &EAToIndex, + "index only the attributes in the comma seperated list. good for automated testing. Note that this option makes --ignore-ea-regex-append, --ignore-ea-append and --ignore-ea impotent", "" ); + + setEntry( + &table[i++], "directory", 'd', POPT_ARG_NONE, + &ListDirectoryNodeOnly, + "(like ls -d) index directory entries instead of contents", 0 ); + + setEntry( + &table[i++], "force-read-root-dir-nodes", 0, POPT_ARG_NONE, + &ForceReadRootDirectoryNodes, + "Always read the context given on cmd line." + "Handy in use with -d to force EA generation", 0 ); + + setEntry( + &table[i++], "recursive", 'R', POPT_ARG_NONE, &RecursiveList, + "index directorys recursively", 0 ); + + setEntry( + &table[i++], "ferris-filter", 0, POPT_ARG_STRING, &FilterStringCSTR, + "Only index contexts which pass given filter", + "(name=fred*)" ); + + setEntry( + &table[i++], "show-totals", 0, POPT_ARG_NONE, &ShowTotals, + "Display statistics at the end for number of files indexed etc.", 0 ); + + setEntry( + &table[i++], "force", 'F', POPT_ARG_NONE, + &AddEvenIfAlreadyCurrent, + "Add all files again even if they have not changed between indexing", 0 ); + +// setEntry( +// &table[i++], "create-type", 0, POPT_ARG_STRING, &CreateTypeName_CSTR, +// "what form of context to store the chunks in (dir/db4/gdbm/xml/etc)", 0 ); + + setEntry( + &table[i++], "retire-non-existent-to-multiversion", 'K', POPT_ARG_NONE, + &RetireNonExistentDocumentsToMuliversion, + "Move metadata about files which no longer exist into multiversion instance now.", 0 ); + + setEntry( + &table[i++], "try-to-add-to-fulltext-index-too", '2', POPT_ARG_NONE, + &tryToAddToFulltextIndexToo, + "If a file appears to be text, try to add the file to the fulltext index associated with the eaindex too.", 0 ); + + setEntry( + &table[i++], "fulltext-index-path", 0, POPT_ARG_STRING, + &FullTextIndexPath_CSTR, + "Alternative fulltext index path to use.", 0 ); + + setEntry( + &table[i++], "only-add-to-fulltext-index", 0, POPT_ARG_NONE, + &OnlyAddToFullTextIndex, + "only add to fulltext index, not to eaindex.", 0 ); + + setEntry( + &table[i++], "sloth", 0, POPT_ARG_NONE, &Sloth, + "keep the main window closed until it is needed", "" ); + + setEntry( + &table[i++], "auto-close", '0', POPT_ARG_NONE, &AutoClose, + "If there is no user interaction or objects skipped then close client automatically", "" ); + + clearEntry( &table[i] ); + return table; + } + + + fh_EAIndexAddPopTableCollector + Ferrisls_feaindexadd_display_base::getPoptCollector() + { + if( !isBound( Collector )) + { + Collector = new EAIndexAddPopTableCollector(); + } + return Collector; + } + + + + namespace Priv + { + struct ::poptOption* getEAIndexAddPopTableCollector( fh_Ferrisls_feaindexadd_display_base obj ) + { + return obj->getPoptCollector()->getTable( obj ); + } + }; + + }; +}; + diff --git a/Ferris/EAIndexer.hh b/Ferris/EAIndexer.hh new file mode 100644 index 0000000..711ae1e --- /dev/null +++ b/Ferris/EAIndexer.hh @@ -0,0 +1,418 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexer.hh,v 1.12 2010/09/24 21:30:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAIDX_H_ +#define _ALREADY_INCLUDED_FERRIS_EAIDX_H_ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + /** + * Support for indexing and querying EA + * + * Note that some functions from the FullTextIndex namespace are used here + * for things like folding case etc. + */ + namespace EAIndex + { + using namespace ::Ferris::FullTextIndex; + using namespace ::STLdb4; + + FERRISEXP_API std::string GET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT(); + FERRISEXP_API std::string GET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT( bool commaSeperated = false ); + FERRISEXP_API std::string GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT(); + FERRISEXP_API std::string GET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT(); + + class DocumentIndexer; + FERRIS_SMARTPTR( DocumentIndexer, fh_docindexer ); + + class NonExistentDocumentsState; + FERRIS_SMARTPTR( NonExistentDocumentsState, fh_NonExistentDocumentsState ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * class whos sole objective is to add new documents to the ea index. + */ + class FERRISEXP_API DocumentIndexer + : + public Handlable + { + public: + typedef RegexCollection m_ignoreEARegexs_t; + private: + AddToEAIndexProgress_Sig_t m_progressSig; + + friend fh_docindexer Factory::makeDocumentIndexer( fh_idx idx ); + DocumentIndexer( fh_idx idx ); + + fh_idx m_idx; + + int m_attributesDone; + int m_signalWindow; + + stringset_t m_ignoreEANames; + m_ignoreEARegexs_t m_ignoreEARegexs; + std::streamsize m_maxValueSize; + bool m_dontCheckIfAlreadyThere; + RegexCollection m_nonResolvableURLsNotToRemoveRegexes; + + stringset_t m_EANamesToIndex; + std::string m_EANamesToIndexRegexString; + fh_rex m_EANamesToIndexRegex; + + // total number of files added to the index via this object + int m_filesIndexedCount; + bool m_haveCalledPrepareForWrites; + + bool m_AddEvenIfAlreadyCurrent; + bool m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent; + bool m_retireNonExistentDocumentsToMuliversion; + fh_NonExistentDocumentsState m_NonExistentDocumentsState; + friend class NonExistentDocumentsState; + + public: + + /** + * syncs data to disk + */ + virtual ~DocumentIndexer(); + + /** + * A signal that is fired at intervals to allow UIs to update + * and show progress to the user when indexing a document + */ + AddToEAIndexProgress_Sig_t& getProgressSig(); + + /** + * Add the passed context to the index + */ + void addContextToIndex( fh_context c ); + + + /** + * Called whenever the directory changes. + * Used to allow the documentindexer to purge files from + * the index which are no longer present after a directory + * has been indexed. + * + * ie. for indexing a directory /foo/bar + * call EnteringContext( /foo/bar ); + * for each file in /foo/bar + * call addContextToIndex( file ) + * call LeavingContext( /foo/bar ); + * + */ + void EnteringContext(fh_context ctx); + void LeavingContext(fh_context ctx); + /** + * If this is true then the caller *must* call + * EnteringContext() and LeavingContext() and index a + * single directory at a time. + */ + void setRetireNonExistentDocumentsToMuliversion( bool v ); + + + + + /** + * Set the names of attributes to ignore to the following comma + * seperated list + */ + void setIgnoreEANames( const std::string& s ); + + /** + * Append to the names of attributes to ignore to the following comma + * seperated list + */ + void appendIgnoreEANames( const std::string& s ); + + /** + * clear the names of attributes to ignore. + */ + void clearIgnoreEANames(); + + stringset_t& getIgnoreEANames(); + + + + + /** + * Append to the list of regex strings which if one passes will cause the + * attribute named to not be indexed + * example: schema:.* + */ + void appendIgnoreEARegexs( const std::string& s ); + void appendIgnoreEARegexs( const stringlist_t& sl ); + void clearIgnoreEARegexs(); + m_ignoreEARegexs_t& getIgnoreEARegexs(); + + + /** + * Regular expressions for URLs which do not resolve at query time + * but should not be automatically removed from the index. + */ + void appendNonResolvableURLsNotToRemoveRegexes( const std::string& s ); + void appendNonResolvableURLsNotToRemoveRegexes( const stringlist_t& sl ); + void clearNonResolvableURLsNotToRemoveRegexes(); + RegexCollection& getNonResolvableURLsNotToRemoveRegexes(); + + + /** + * If this is set then an attribute must have one of the names in the passed stringlist + * to be indexed. Note that if an attribute appears in one of the + * appendIgnoreEARegexs() then it will still be ignored. This should be considered another + * way to limit which attributes are indexed, ie. for an attribute to be indexed it should + * appear in this list but if it is in setIgnoreEANames(), appendIgnoreEANames() + * or appendIgnoreEARegexs() then it will still be ignored. + * You may consider calling clearIgnoreEARegexs(), clearIgnoreEANames() to make + * this list the definitive list of EA to index. + * + * @see clearIgnoreEARegexs() + * @see clearIgnoreEANames() + */ + void setEANamesToIndex( const stringlist_t& sl ); + stringlist_t getEANamesToIndex(); + bool EANamesToIndexContains( const std::string& s ); + + /** + * Regex version of setEANamesToIndex() + */ + void setEANamesToIndexRegex( const std::string& s ); + std::string& getEANamesToIndexRegex(); + bool EANamesToIndexRegexContains( const std::string& s ); + + + /** + * Max size for an attribute value to be indexed. + */ + void setMaximunValueSize( std::streamsize sz ); + std::streamsize getMaximunValueSize(); + + /** + * This option can cause problems because its use allows + * the possibility for many items in the document map to + * exist numerous times. It is handy for building indexes + * when one is sure that a document is only going to be + * added once. Example: making a index for a cdrom before + * burning it to disk. + * + * Leave it as the default which is false, ie. a check is + * performed before a new docID is allocated. The only + * problem with this is that it can be slow to check if + * a URL has a docid without a reverse document map. + */ + void setDontCheckIfAlreadyThere( bool v ); + bool getDontCheckIfAlreadyThere(); + + /** + * Get the total number of files that were added to the index + */ + int getFilesIndexedCount(); + + /** + * Should files be added to the index even if they have not + * changed since they were last indexed. + * + * Default: false + */ + void setAddEvenIfAlreadyCurrent( bool v = false ); + bool getAddEvenIfAlreadyCurrent(); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class EAIndexAddPopTableCollector; + FERRIS_SMARTPTR( EAIndexAddPopTableCollector, fh_EAIndexAddPopTableCollector ); + + class Ferrisls_feaindexadd_display_base; + FERRIS_SMARTPTR( Ferrisls_feaindexadd_display_base, fh_Ferrisls_feaindexadd_display_base ); + class FERRISEXP_API Ferrisls_feaindexadd_display_base + : + public Ferrisls_display + { + typedef Ferrisls_display _Base; + + fh_EAIndexAddPopTableCollector Collector; + + protected: + + FullTextIndex::fh_idx m_ftxidx; + + EAIndex::fh_idx m_idx; + EAIndex::fh_docindexer m_indexer; + bool m_verbose; + bool m_showTotals; + int m_contextCount; + int exit_status; + int m_TotalFilesDoneCount; //< All files seen + int m_TotalFilesIndexedCount; //< All files actually added to index (not skipped) + bool m_tryToAddToFulltextIndexToo; + bool m_sloth; + bool m_autoClose; + bool m_hadUserInteraction; + std::string m_fullTextIndexPath; + bool m_onlyAddToFullTextIndex; + int m_userSelectedTotalFilesToIndexPerRun; + + Ferrisls m_ls; + + virtual void workStarting(); + virtual void workComplete(); + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + + FullTextIndex::fh_idx getFulltextIndex(); + FullTextIndex::fh_docindexer getDocumentIndexer(); + + bool shouldEAtryToAddToEAIndex(); + bool shouldEAtryToAddToFulltextIndex(); + + public: + + Ferrisls_feaindexadd_display_base( EAIndex::fh_idx idx ); + + void perform( const std::string& earl ); + void addToIndexFromFileList( EAIndex::fh_idx& idx, fh_istream& fiss ); + int getExitStatus(); + + void sync(); + void printTotals(); + void setVerbose( bool v ); + void setAddEvenIfAlreadyCurrent( bool v ); + void setShowTotals( bool v ); + void setIndex( EAIndex::fh_idx idx ); + void setIgnoreEANames( const std::string& s ); + void appendIgnoreEANames( const std::string& s ); + void appendIgnoreEARegexs( const std::string& s ); + void setMaximunValueSize( std::streamsize sz ); + void setDontCheckIfAlreadyThere( bool v ); + void setEANamesToIndex( const stringlist_t& sl ); + int getFilesIndexedCount(); + void setRetireNonExistentDocumentsToMuliversion( bool v ); + void setTryToAddToFulltextIndexToo( bool v ); + void setSloth( bool v ); + void setAutoClose( bool v ); + void setFullTextIndexPath( const std::string& v ); + void setOnlyAddToFullTextIndex( bool v ); + void setUserSelectedTotalFilesToIndexPerRun( int v ); + + fh_EAIndexAddPopTableCollector getPoptCollector(); + + Ferrisls& getFerrisls() + { + return m_ls; + } + }; + + + class FERRISEXP_API EAIndexAddPopTableCollector + : + public basic_PopTableCollector, + public Handlable + { + fh_Ferrisls_feaindexadd_display_base m_obj; + +// const char* CreateTypeName_CSTR ; + const char* IndexPath_CSTR ; + const char* FilelistFile_CSTR ; + unsigned long FilelistStdin ; + const char* IgnoreEANames ; + const char* IgnoreEANamesAppend ; + const char* IgnoreEARegexsAppend ; + const char* EAToIndex ; + unsigned long Verbose ; + unsigned long ShowVersion ; + unsigned long EAIndexMaxValueSize ; + + unsigned long DontCheckIfAlreadyThere ; + unsigned long ListDirectoryNodeOnly ; + unsigned long ForceReadRootDirectoryNodes ; + unsigned long RecursiveList ; + const char* FilterStringCSTR ; + unsigned long RetireNonExistentDocumentsToMuliversion ; + + unsigned long ShowTotals ; + unsigned long AddEvenIfAlreadyCurrent; + unsigned long tryToAddToFulltextIndexToo; + unsigned long Sloth; + unsigned long AutoClose ; + const char* FullTextIndexPath_CSTR; + unsigned long OnlyAddToFullTextIndex; + unsigned long userSelectedTotalFilesToIndexPerRun; + + void reset(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data); + + public: + EAIndexAddPopTableCollector(); + struct ::poptOption* getTable( fh_Ferrisls_feaindexadd_display_base obj ); + void ArgProcessingDone( poptContext optCon ); + + }; + + namespace Priv + { + FERRISEXP_API struct ::poptOption* getEAIndexAddPopTableCollector( fh_Ferrisls_feaindexadd_display_base obj ); + }; + +#define FERRIS_EAINDEXADD_OPTIONS(obj) { 0, 0, POPT_ARG_INCLUDE_TABLE, \ + /**/ ::Ferris::EAIndex::Priv::getEAIndexAddPopTableCollector(obj), \ + /**/ 0, "common eaindex add options:", 0 }, + + }; +}; +#endif + diff --git a/Ferris/EAIndexerCustomFerris.cpp b/Ferris/EAIndexerCustomFerris.cpp new file mode 100644 index 0000000..92ac201 --- /dev/null +++ b/Ferris/EAIndexerCustomFerris.cpp @@ -0,0 +1,80 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2004 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexerCustomFerris.cpp,v 1.4 2010/09/24 21:30:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "config.h" +#include "EAIndexerMetaInterface.hh" + +using namespace std; + +namespace Ferris +{ + namespace EAIndex + { + /************************************************************/ + /************************************************************/ + /************************************************************/ + + namespace + { + MetaEAIndexerInterface* CreateEAIndexer() + { + return CreateEAIndexerFromLibrary( "libeaidxcustomferris.so" ); + } + + static const std::string MetaIndexClassName = "db4"; + static bool reged = MetaEAIndexerInterfaceFactory::Instance(). + Register( MetaIndexClassName, &CreateEAIndexer ); + static bool regedx = appendToMetaEAIndexClassNames( MetaIndexClassName ); + } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + namespace + { + MetaEAIndexerInterface* CreateEAIndexer_db4tree() + { + return CreateEAIndexerFromLibrary( "libeaidxcustomferrisdb4tree.so" ); + } + + static const std::string MetaIndexClassName_db4tree = "db4tree"; + static bool reged_db4tree = MetaEAIndexerInterfaceFactory::Instance(). + Register( MetaIndexClassName_db4tree, &CreateEAIndexer_db4tree ); + static bool regedx_db4tree = appendToMetaEAIndexClassNames( MetaIndexClassName_db4tree ); + } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + }; +}; + + diff --git a/Ferris/EAIndexerMetaInterface.cpp b/Ferris/EAIndexerMetaInterface.cpp new file mode 100644 index 0000000..18796dc --- /dev/null +++ b/Ferris/EAIndexerMetaInterface.cpp @@ -0,0 +1,1560 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexerMetaInterface.cpp,v 1.30 2011/05/03 21:30:20 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +// guessComparisonOperatorFromData +#include "FilteredContext_private.hh" + +#include +#include + +#include "config.h" + +using namespace std; + +#include + +namespace Ferris +{ + + namespace EAIndex + { + using namespace ::STLdb4; + + const string EAINDEXROOT = "~/.ferris/ea-index"; + const string DB_EAINDEX = "ea-index-config.db"; + + class FERRISEXP_DLLLOCAL MetaEAIndexerInterfacePriv + { + public: + MetaEAIndexerInterfacePriv() + : + m_config( 0 ), m_configNotAvailable( false ), m_base( 0 ), + m_indexingNativeContext( false ), + m_configShouldBeReadOnly( false ), + have_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST( false ), + virgin_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST( true ), + m_filesIndexedCount( 0 ) +// m_dontStoreZeroIntegerAttributes( -1 ), +// m_dontStoreEmptyStringAttributes( -1 ) + {} + + stringmap_t m_configCache; + fh_database m_config; + bool m_configNotAvailable; + bool m_configShouldBeReadOnly; + bool m_indexingNativeContext; + fh_database getConfigDB(); + fh_context m_base; + Time::RelativeTimeOrIntegerStringParser m_timeOrIntParser; +// int m_dontStoreZeroIntegerAttributes; +// int m_dontStoreEmptyStringAttributes; + + bool virgin_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST; + bool have_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST; + stringlist_t m_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST; + int m_filesIndexedCount; + + /** + * Ensure that there is a db4 file there for setConfig() / getConfig() to use + */ + void ensureConfigFileCreated() + { + if( !m_config ) + { + m_config = ensureFerrisConfigFileExists( m_base->getDirPath(), DB_EAINDEX ); + set_db4_string( getConfigDB(), "foo1", "bar" ); + getConfigDB()->sync(); + } + } + }; + + fh_database + MetaEAIndexerInterfacePriv::getConfigDB() + { + if( m_config || m_configNotAvailable ) + return m_config; + + string dbfilename = CleanupURL( m_base->getDirPath() + "/" + DB_EAINDEX ); +// cerr << "CONFIG FILE AT:" << dbfilename << endl; + + try + { +// m_config = new Database( dbfilename ); + + bool readOnly = m_configShouldBeReadOnly; +// cerr << "m_configShouldBeReadOnly:" << m_configShouldBeReadOnly << endl; + if( !access( dbfilename.c_str(), W_OK ) ) + readOnly = false; + + + m_config = new Database( dbfilename, "", readOnly ); + +// u_int32_t flags = 0; +// if( m_configShouldBeReadOnly ) flags |= DB_RDONLY; +// else flags |= DB_CREATE; + +// m_config = new Database( DB_UNKNOWN, dbfilename, "", flags ); + } + catch( exception& e ) + { + m_configNotAvailable = true; + } + return m_config; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + MetaEAIndexerInterface::addDocID( docNumSet_t& output, docid_t v ) + { + output.insert( v ); + } + + MetaEAIndexerInterface::MetaEAIndexerInterface() + : + P( new MetaEAIndexerInterfacePriv() ) + { + } + + MetaEAIndexerInterface::~MetaEAIndexerInterface() + { + delete P; + } + + void + MetaEAIndexerInterface::LocalCommonConstruction() + { + P->ensureConfigFileCreated(); + } + + void + MetaEAIndexerInterface::private_initialize( const std::string& basepath ) + { + P->m_base = Shell::acquireContext( basepath ); + Setup(); + } + + std::string + MetaEAIndexerInterface::getPath() + { + return P->m_base->getDirPath(); + } + + std::string + MetaEAIndexerInterface::getURL() + { + return P->m_base->getURL(); + } + + static int TMP_VISITINGCONTEXT_SLEA_COUNT = 0; + static int TMP_VISITINGCONTEXT_STATEEA_COUNT = 0; + + void + MetaEAIndexerInterface::visitingContext( const fh_context& c ) + { +// cerr << "MetaEAIndexerInterface::visitingContext() " +// << " SLEA#:" << TMP_VISITINGCONTEXT_SLEA_COUNT +// << " NONSL#:" << TMP_VISITINGCONTEXT_STATEEA_COUNT +// << endl; + TMP_VISITINGCONTEXT_SLEA_COUNT = 0; + TMP_VISITINGCONTEXT_STATEEA_COUNT = 0; + + Context* cp = GetImpl( c ); + P->m_indexingNativeContext = dynamic_cast< NativeContext* >( cp ); + } + + static bool + haveEAIndexExplicitWhiteListFromEnv() + { + static bool ret = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_WHITELIST") != 0; + return ret; + } + + static stringset_t& + getEAIndexExplicitWhiteListFromEnv() + { + static stringset_t cache; + + if( const gchar* p = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_WHITELIST") ) + { + LG_EAIDX_D << "Should only accept EA in list:" << p << endl; + + if( strlen(p) && cache.empty() ) + { + Util::parseSeperatedList( p, cache, inserter(cache,cache.end()) ); + } + } + return cache; + } + + static bool + haveEAIndexExplicitWhiteListRegexFromEnv() + { + static bool ret = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_WHITELIST_REGEX") != 0; + return ret; + } + + static fh_rex& + getEAIndexExplicitWhiteListRegexFromEnv() + { + static fh_rex cache = 0; + + if( !cache ) + { + if( const gchar* p = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_WHITELIST_REGEX") ) + { + LG_EAIDX_D << "Should only accept EA in list:" << p << endl; + + if( strlen(p) ) + { + cache = toregexh( p, boost::regex::optimize ); + } + } + } + return cache; + } + + static stringset_t getDigestEANames() + { + static stringset_t ret; + + if( ret.empty() ) + { + ret.insert("md2"); + ret.insert("md5"); + ret.insert("sha1"); + ret.insert("mdc2"); + ret.insert("crc32"); + ret.insert("crc"); + } + return ret; + } + + static bool + haveEAIndexExplicitBlackListFromEnv() + { + static bool ret = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_BLACKLIST") != 0; + return ret; + } + + static stringset_t& + getEAIndexExplicitBlackListFromEnv() + { + static stringset_t cache; + + if( const gchar* p = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_BLACKLIST") ) + { + LG_EAIDX_D << "Should only accept EA in list:" << p << endl; + + if( strlen(p) && cache.empty() ) + { + Util::parseSeperatedList( p, cache, inserter(cache,cache.end()) ); + } + } + return cache; + } + + static bool + haveEAIndexExplicitBlackListDigestsFromEnv() + { + static bool ret = g_getenv ("LIBFERRIS_EAINDEX_EXPLICIT_BLACKLIST_DIGESTS") != 0; + return ret; + } + + bool + MetaEAIndexerInterface::shouldIndex( fh_context c, fh_docindexer di, + const std::string& attributeName ) + { +// cerr << "MetaEAIndexerInterface::shouldIndex() di->getIgnoreEANames().sz:" +// << di->getIgnoreEANames().size() << endl; +// cerr << "beg:" << *(di->getIgnoreEANames().begin()) << endl; + + if( haveEAIndexExplicitWhiteListFromEnv() ) + { + stringset_t& cache = getEAIndexExplicitWhiteListFromEnv(); + + if( cache.count( attributeName ) ) + { + return true; + } + return false; + } + + if( haveEAIndexExplicitWhiteListRegexFromEnv() ) + { + fh_rex r = getEAIndexExplicitWhiteListRegexFromEnv(); + if( regex_match( attributeName, r ) ) + return true; + + return false; + } + + + if( haveEAIndexExplicitBlackListFromEnv() ) + { + if( getEAIndexExplicitBlackListFromEnv().count( attributeName ) ) + { + return false; + } + } + if( haveEAIndexExplicitBlackListDigestsFromEnv() ) + { + if( getDigestEANames().count( attributeName ) ) + { + return false; + } + } + + + + if( di->getIgnoreEANames().find( attributeName ) + != di->getIgnoreEANames().end() ) + { + LG_EAIDX_D << "shouldIndex attr:" << attributeName + << " is in ignoreEANames, skipping it" << endl; + return false; + } + + if( fh_rex r = di->getIgnoreEARegexs().getRegex() ) + { + if( regex_match( attributeName, r, boost::match_any ) ) + { +// cerr << "shouldIndex attr:" << attributeName << " is in ignoreEANames Regex" << endl; + return false; + } + } + + if( !di->EANamesToIndexContains( attributeName )) + return false; + + if( !di->EANamesToIndexRegexContains( attributeName )) + return false; + + return true; + } + + bool + MetaEAIndexerInterface::obtainValueIfShouldIndex( fh_context c, fh_docindexer di, + const std::string& attributeName, + std::string& v ) + { + bool acceptNullValues = false; + bool dummy; + return obtainValueIfShouldIndex( c, di, attributeName, v, acceptNullValues, dummy ); + } + + + bool + MetaEAIndexerInterface::obtainValueIfShouldIndex( + fh_context c, fh_docindexer di, + const std::string& attributeName, + std::string& v, + bool acceptNullValues, + bool& isNULL ) + { + LG_EAIDX_D << " start, attr:" << attributeName << endl; + + if( attributeName == "subtitles-local" ) + return false; + + if( !shouldIndex( c, di, attributeName )) + return false; + + LG_EAIDX_D << " should read, attr:" << attributeName << endl; + + string k = attributeName; + v.clear(); + bool CanReadValue = true; + try + { + LG_EAIDX_D << "Getting attribute:" << k << endl; + v = getStrAttr( c, k, "", true, true ); + LG_EAIDX_D << "Got attribute:" << k << endl; +// if( k == "ctime" || k == "mtime" || k == "atime" ) +// LG_EAIDX_D << "Got value:" << v << endl; + } + catch( exception& e ) + { + LG_EAIDX_D << "error getting attribute:" << k + << " e:" << e.what() + << endl; + CanReadValue = false; + } + + + if( !CanReadValue ) + { + if( acceptNullValues ) + { + isNULL = true; + return true; + } + LG_EAIDX_D << "Failed to read attribute:" << k << endl; + return false; + } + if( v.length() > di->getMaximunValueSize() ) + { + LG_EAIDX_W << "value to large for attribute:" << k + << " max allowed:" << di->getMaximunValueSize() + << " v.size:" << v.length() + << endl; + if( k == "subtitles" ) + { + if( v.length() > 1024*1024 ) + { + return false; + } + } + else + { + return false; + } + } + if( v.empty() ) + return false; + + +// if( getDontStoreEmptyStringAttributes() +// || getDontStoreZeroIntegerAttributes() ) +// { +// IndexableValue iv = getIndexableValue( c, k, v ); +// AttrType_t att = iv.getAttrTypeID(); + +// if( getDontStoreEmptyStringAttributes() && +// ( att == ATTRTYPEID_STR || att == ATTRTYPEID_CIS ) +// && v.empty() ) +// { +// return false; +// } +// else if( getDontStoreZeroIntegerAttributes() +// && v == "0" ) +// { +// return false; +// } +// } + + isNULL = false; + return true; + } + +// static const char* IDXMGR_DONT_STORE_ZERO_INTEGER_ATTRIBUTES_K +// = "idxmgr_dont_store_zero_integer_attributes_k"; +// static const char* IDXMGR_DONT_STORE_EMPTY_STRING_ATTRIBUTES_K +// = "idxmgr_dont_store_empty_string_attributes_k"; + +// bool MetaEAIndexerInterface::getDontStoreZeroIntegerAttributes() +// { +// if( P->m_dontStoreZeroIntegerAttributes < 0 ) +// { +// P->m_dontStoreZeroIntegerAttributes +// = isTrue( +// getConfig( +// IDXMGR_DONT_STORE_ZERO_INTEGER_ATTRIBUTES_K, "0" )); +// } + +// return P->m_dontStoreEmptyStringAttributes; +// } + +// bool MetaEAIndexerInterface::getDontStoreEmptyStringAttributes() +// { +// if( P->m_dontStoreEmptyStringAttributes < 0 ) +// { +// P->m_dontStoreEmptyStringAttributes +// = isTrue( +// getConfig( +// IDXMGR_DONT_STORE_EMPTY_STRING_ATTRIBUTES_K, "0" )); +// } +// return P->m_dontStoreEmptyStringAttributes; +// } + +// void MetaEAIndexerInterface::setDontStoreZeroIntegerAttributes( bool v ) +// { +// P->m_dontStoreZeroIntegerAttributes = v; +// setConfig( IDXMGR_DONT_STORE_ZERO_INTEGER_ATTRIBUTES_K, +// tostr( v ) ); +// } + +// void MetaEAIndexerInterface::setDontStoreEmptyStringAttributes( bool v ) +// { +// P->m_dontStoreEmptyStringAttributes = v; +// setConfig( IDXMGR_DONT_STORE_EMPTY_STRING_ATTRIBUTES_K, +// tostr( v ) ); +// } + + + stringlist_t& + MetaEAIndexerInterface::getEANamesToIndex( fh_context& c, stringlist_t& ret ) + { + if( haveEAIndexExplicitWhiteListFromEnv() ) + { + LG_EAIDX_D << "getEANamesToIndex() explicit from env." << endl; + stringset_t& cache = getEAIndexExplicitWhiteListFromEnv(); + copy( cache.begin(), cache.end(), back_inserter( ret )); + return ret; + } + + if( P->virgin_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST ) + { + P->virgin_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST = false; + string s = getConfig( IDXMGR_EXPLICIT_EANAMES_TO_INDEX_K, "" ); + stringlist_t& sl = P->m_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST; + Util::parseCommaSeperatedList( s, sl ); + if( !sl.empty() ) + { + LG_EAIDX_D << "Have explicit eanames stringlist! s:" << s << endl; + P->have_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST = true; + } + } + + if( P->have_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST ) + { + stringlist_t& an = P->m_EXPLICIT_EANAMES_TO_INDEX_STRINGLIST; + copy( an.begin(), an.end(), back_inserter( ret )); + LG_EAIDX_D << "Have explicit names to index... an.size:" << an.size() << endl; + } + else + { + AttributeCollection::AttributeNames_t an; + c->getAttributeNames( an ); + copy( an.begin(), an.end(), back_inserter( ret )); +// Util::parseCommaSeperatedList( getStrAttr( c, "ea-names", "" ), ret ); + } + + + if( haveEAIndexExplicitBlackListFromEnv() || haveEAIndexExplicitBlackListDigestsFromEnv() ) + { + if( haveEAIndexExplicitBlackListFromEnv() ) + { + stringlist_t tmp; + + stringset_t blackset = getEAIndexExplicitBlackListFromEnv(); + if( haveEAIndexExplicitBlackListDigestsFromEnv() ) + blackset.insert( getDigestEANames().begin(), getDigestEANames().end() ); + + for( stringlist_t::iterator iter = ret.begin(); iter != ret.end(); ++iter ) + { + if( !blackset.count( *iter ) ) + { + tmp.push_back( *iter ); + } + } + ret.clear(); + copy( tmp.begin(), tmp.end(), back_inserter( ret ) ); + } + } + + if( haveEAIndexExplicitWhiteListRegexFromEnv() ) + { + stringlist_t tmp; + fh_rex r = getEAIndexExplicitWhiteListRegexFromEnv(); + + for( stringlist_t::iterator iter = ret.begin(); iter != ret.end(); ++iter ) + { + if( regex_match( *iter, r ) ) + tmp.push_back( *iter ); + } + ret.clear(); + copy( tmp.begin(), tmp.end(), back_inserter( ret ) ); + } + + return ret; + } + + + + + + std::string + MetaEAIndexerInterface::getConfig( const std::string& k, const std::string& def, bool throw_for_errors ) + { + fh_database db = P->getConfigDB(); + +// cerr << "getConfig() k:" << k << " P->m_configNotAvailable:" << P->m_configNotAvailable << endl; + + if( P->m_configNotAvailable && !throw_for_errors ) + return def; + + stringmap_t::const_iterator ci = P->m_configCache.find( k ); + if( ci != P->m_configCache.end() ) + return ci->second; + +// cerr << "getConfig() k:" << k << endl; + string ret = get_db4_string( db, k, def, throw_for_errors ); + P->m_configCache[ k ] = ret; + +// cerr << "getConfig() k:" << k << " ret.sz:" << ret.length() << endl; +// cerr << "getConfig() k:" << k << " ret:" << ret << endl; + + return ret; + } + + void + MetaEAIndexerInterface::setConfig( const std::string& k, const std::string& v ) + { +// cerr << "MetaEAIndexerInterface::setConfig() k:" << k +// << " v:" << v << endl; + + P->m_configCache[ k ] = v; + + fh_database db = P->getConfigDB(); + set_db4_string( db, k, v ); + db->sync(); + } + + guint64 + MetaEAIndexerInterface::convertStringToInteger( const std::string& v ) + { + if( v.empty() ) + return 0; + return P->m_timeOrIntParser.convert( v ); + } + + void + MetaEAIndexerInterface::setFulltextIndex( const std::string& path ) + { + FullTextIndex::fh_idx fidx = FullTextIndex::Factory::getFullTextIndex( path ); + setFulltextIndex( fidx ); + } + void + MetaEAIndexerInterface::setFulltextIndex( FullTextIndex::fh_idx fidx ) + { + setConfig( IDXMGR_FULLTEXT_INDEX_PATH_K, fidx->getPath() ); + } + + FullTextIndex::fh_idx + MetaEAIndexerInterface::getFulltextIndex() + { + string p = getFulltextIndexPath(); + return FullTextIndex::Factory::getFullTextIndex( p ); + } + + + + std::string + MetaEAIndexerInterface::getFulltextIndexPath() + { + return getConfig( IDXMGR_FULLTEXT_INDEX_PATH_K, "" ); + } + + + std::string + MetaEAIndexerInterface::getEANamesIgnore() + { +// cerr << "MetaEAIndexerInterface::getEANamesIgnore() s:" +// << getConfig( IDXMGR_EANAMES_IGNORE_K, "can't read" ) +// << endl; + return getConfig( IDXMGR_EANAMES_IGNORE_K, + GET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT() ); + } + + void + MetaEAIndexerInterface::appendToEANamesIgnore( const std::string& s ) + { + fh_stringstream ss; + ss << getEANamesIgnore() << "," << s; + setConfig( IDXMGR_EANAMES_IGNORE_K, tostr(ss) ); + } + + stringlist_t + MetaEAIndexerInterface::getEANamesIgnoreRegexes() + { + string t = getConfig( IDXMGR_EANAMES_REGEX_IGNORE_K, + GET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT() ); + stringlist_t ret; + Util::parseNullSeperatedList( t, ret ); + return ret; + } + + std::string + MetaEAIndexerInterface::getEANamesToIndexRegex() + { + return getConfig( IDXMGR_EANAMES_TO_INDEX_REGEX_K, + GET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT() ); + } + + + stringlist_t + MetaEAIndexerInterface::getNonResolvableURLsNotToRemoveRegexes() + { + string t = getConfig( IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K, + GET_EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT() ); + stringlist_t ret; + Util::parseNullSeperatedList( t, ret ); + return ret; + } + + + std::streamsize + MetaEAIndexerInterface::getMaxValueSize() + { + string def = GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT(); + return toType( + getConfig( IDXMGR_MAX_VALUE_SIZE_K, def )); + } + + + + static fh_idx createEAIndexInstance( const std::string& index_classname ) + { + ensureEAIndexPluginFactoriesAreLoaded(); + + fh_idx idx = MetaEAIndexerInterfaceFactory::Instance(). + CreateObject( index_classname ); + + return idx; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + static fh_idx& getDefaultEAIndexSingleton() + { + static fh_idx ret = 0; + return ret; + } + + fh_idx getDefaultEAIndex() + { + fh_idx& o = getDefaultEAIndexSingleton(); + if( !o ) + { + o = getEAIndex( EAINDEXROOT ); + } + return o; + } + + void + setDefaultEAIndexPath( const char* EAIndexPath_CSTR ) + { + if( EAIndexPath_CSTR ) + { + fh_idx idx = getEAIndex( EAIndexPath_CSTR ); + getDefaultEAIndexSingleton() = idx; + } + } + + + + /** + * Get the lexicon, inverted file and document map rooted + * at the given path. + */ + fh_idx getEAIndex( const std::string& basepath_const ) + { + string basepath = basepath_const; + LG_IDX_D << "getEAIndex(1) basepath:" << basepath << endl; + if( starts_with( basepath, "eaindexes:" ) ) + { + fh_context c = Resolve( basepath ); + basepath = c->getDirPath(); + LG_IDX_D << "getEAIndex(2) basepath:" << basepath << endl; + } + else if( !starts_with( basepath, "/" ) ) + { + try + { + fh_context c = Resolve( basepath ); + } + catch( exception& e ) + { + try + { + stringstream ss; + ss << "eaindexes://" << basepath; + fh_context c = Resolve( ss.str() ); + basepath = c->getDirPath(); + } + catch( exception& e ) + { + } + } + } + LG_IDX_D << "getEAIndex(3) basepath:" << basepath << endl; + + + string index_classname = get_db4_string( basepath + "/" + DB_EAINDEX, + EAIDXMGR_INDEX_CLASS_K, + EAIDXMGR_INDEX_CLASS_DEFAULT, + true, true ); + LG_IDX_D << "getEAIndex(3.1) classname:" << index_classname << endl; + + fh_idx idx = createEAIndexInstance( index_classname ); + idx->private_initialize( basepath ); + idx->LocalCommonConstruction(); + idx->CommonConstruction(); + return idx; + } + + fh_docindexer makeDocumentIndexer( fh_idx idx ) + { + if( !idx ) + idx = getDefaultEAIndex(); + + return new DocumentIndexer( idx ); + } + }; + + fh_idx createEAIndex( const std::string& index_classname, + fh_context c, + fh_context md ) + { + if( !md ) + { + md = new CreateMetaDataContext(); + } + + LG_IDX_D << "createEAIndex(top)" << endl; + LG_IDX_D << "createEAIndex() className:" << index_classname + << endl; + + fh_idx idx = createEAIndexInstance( index_classname ); + idx->P->m_base = c; + idx->CreateIndexBeforeConfig( c, md ); + + idx->P->ensureConfigFileCreated(); + idx->setConfig( EAIDXMGR_INDEX_CLASS_K, index_classname ); + + string attributesNotToIndex + = getStrSubCtx( md, "attributes-not-to-index", + GET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT() ); + string attributesNotToIndexRegex + = getStrSubCtx( md, "attributes-not-to-index-regex", + GET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT() ); + replace( attributesNotToIndexRegex.begin(), attributesNotToIndexRegex.end(), + ',','\0' ); + { + string s = getStrSubCtx( md, "attributes-not-to-index-regex-append", "" ); + if( !s.empty() ) + { + LG_EAIDX_D << "append-attr-notToIndexRegex:" << s << endl; + cerr << "append-attr-notToIndexRegex:" << s << endl; + replace( s.begin(), s.end(), ',','\0' ); + stringstream ss; + if( !attributesNotToIndexRegex.empty() ) + ss << "(" << attributesNotToIndexRegex << "|"; + ss << s; + if( !attributesNotToIndexRegex.empty() ) + ss << ")"; + attributesNotToIndexRegex = ss.str(); + cerr << "append-attr-notToIndexRegex2. new attributesNotToIndexRegex:" << attributesNotToIndexRegex << endl; + + // PURE DEBUG + { + string t = attributesNotToIndexRegex; + replace( t.begin(), t.end(), '\0', ',' ); + LG_EAIDX_D << "final-appended-attributesNotToIndexRegex:" << t << endl; + } + } + } + + string maxValueSize = + getStrSubCtx( md, "max-value-size-to-index", + GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT() ); + + idx->setConfig( IDXMGR_EANAMES_IGNORE_K, attributesNotToIndex ); + idx->setConfig( IDXMGR_EANAMES_REGEX_IGNORE_K, attributesNotToIndexRegex ); + idx->setConfig( IDXMGR_MAX_VALUE_SIZE_K, maxValueSize ); + + string attributesToIndexRegex + = getStrSubCtx( md, "attributes-to-index-regex", + GET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT() ); + idx->setConfig( IDXMGR_EANAMES_TO_INDEX_REGEX_K, attributesToIndexRegex ); + + idx->CreateIndex( c, md ); + + idx->LocalCommonConstruction(); + idx->CommonConstruction(); + + return idx; + } + + namespace Factory + { + fh_idx createTemporaryEAIndexFederation( ctxlist_t eaindexctxlist, fh_context md ) + { + ctxlist_t::iterator iter = eaindexctxlist.begin(); + ctxlist_t::iterator e = eaindexctxlist.end(); + + eaidxlist_t eaindexlist; + for( ; iter != e; ++iter ) + { + fh_idx idx = getEAIndex( (*iter)->getURL() ); + eaindexlist.push_back( idx ); + } + return createTemporaryEAIndexFederation( eaindexlist, md ); + } + + fh_idx createTemporaryEAIndexFederation( eaidxlist_t eaindexlist, fh_context mdx ) + { + string ts = "-tmp-eaindexfederation-"; + fh_context tc = Shell::generateTempDir( ts ); + + LG_IDX_D << "createTemporaryEAIndexFederation(1)" << endl; + // + // make the new federation ea index + // + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "eaindexfederation", "" ); + child->setChild( "rdn", "eaindexfederation" ); + child->setChild( "name", ts ); + child->setChild( "primary-write-index-url", "~/.ferris/ea-index" ); + tc->createSubContext( "", md ); + LG_IDX_D << "createTemporaryEAIndexFederation(2)" << endl; + + fh_idx fedidx = getEAIndex( ts ); + LG_IDX_D << "createTemporaryEAIndexFederation(3)" << endl; + + eaidxlist_t::iterator iter = eaindexlist.begin(); + eaidxlist_t::iterator e = eaindexlist.end(); + for( ; iter != e; ++iter ) + { + fh_idx subidx = *iter; + addToTemporaryEAIndexFederation( fedidx, subidx ); + } + + LG_IDX_D << "createTemporaryEAIndexFederation(done)" << endl; + return fedidx; + } + } + + static const char* CFG_IDX_FEDERATION_URLS_K = "cfg-idx-federation-urls-k"; + + static fh_database getDB( EAIndex::fh_idx eidx ) + { + string dbfilename = CleanupURL( eidx->getPath() + "/" + EAIndex::DB_EAINDEX ); + fh_database db = new Database( dbfilename ); + return db; + } + + static string getConfig( fh_database db, const std::string& k, const std::string& def ) + { + string ret = get_db4_string( db, k, def, true ); + return ret; + } + + static void setConfig( fh_database db, const std::string& k, const std::string& v ) + { + set_db4_string( db, k, v ); + db->sync(); + } + + void addToTemporaryEAIndexFederation( fh_idx fedidx, fh_idx subidx ) + { + fh_database db = getDB( fedidx ); + + stringlist_t sl = Util::parseSeperatedList( getConfig( db, CFG_IDX_FEDERATION_URLS_K, "" ) ); + sl.push_back( subidx->getURL() ); + setConfig( db, CFG_IDX_FEDERATION_URLS_K, Util::createSeperatedList( sl ) ); + } + + + + stringlist_t& getMetaEAIndexClassNames() + { + static stringlist_t sl; + return sl; + } + + bool appendToMetaEAIndexClassNames( const std::string& s ) + { + getMetaEAIndexClassNames().push_back( s ); + return true; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static fh_regex getIsCaseSensitiveRegex() + { + fh_regex ret = 0; + if( !ret ) + { +// ret = new Regex("^[a-zA-Z0-9\\'\\.\\*\\-\\_\\ ]+$"); + ret = new Regex(".*[A-Z]+.*"); + } + return ret; + } + + MetaEAIndexerInterface::AttrType_t + MetaEAIndexerInterface::IndexableValue::getAttrTypeID() const + { + return att; + } + + XSDBasic_t + MetaEAIndexerInterface::IndexableValue::getSchemaType() const + { + return sct; + } + + bool + MetaEAIndexerInterface::IndexableValue::isCaseSensitive() const + { + return getAttrTypeID() != ATTRTYPEID_CIS; + } + + const string& + MetaEAIndexerInterface::IndexableValue::rawValueString() const + { + return value; + } + + const std::string& + MetaEAIndexerInterface::IndexableValue::rawEANameString() const + { + return eaname; + } + + MetaEAIndexerInterface::IndexableValue::IndexableValue( MetaEAIndexerInterface* midx, + const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( value ), + sct( XSD_UNKNOWN ) + { + att = midx->inferAttrTypeID( eaname, value ); + LG_EAIDX_D << "IndexableValue() eaname:" << eaname + << " att:" << att + // << " value:" << value + << endl; + } + + struct FERRISEXP_DLLLOCAL StatelessEAMetaData + { + MetaEAIndexerInterface::AttrType_t att; + XSDBasic_t sct; + StatelessEAMetaData( XSDBasic_t sct = XSD_UNKNOWN, + MetaEAIndexerInterface::AttrType_t att + = MetaEAIndexerInterface::ATTRTYPEID_CIS ) + : sct( sct ), att( att ) + { + } + }; + typedef map< string, StatelessEAMetaData > StatelessEAMetaDataCache_t; + StatelessEAMetaDataCache_t& + getStatelessEAMetaDataCache() + { + static StatelessEAMetaDataCache_t ret; + return ret; + } + + + void + MetaEAIndexerInterface::ensureStatelessEAMetaDataCachePopulated( + fh_context& c, const stringset_t& sl ) + { + for( stringset_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + string eaname = *si; + MetaEAIndexerInterface::AttrType_t att; + XSDBasic_t sct; + + fh_context sc = c->getSchema( eaname ); + sct = ::Ferris::getSchemaType( sc, XSD_UNKNOWN ); + string cop = getSchemaDefaultSort( sc ); + att = inferAttrTypeID( eaname, "", cop ); + + getStatelessEAMetaDataCache()[ eaname ] = + StatelessEAMetaData( sct, att ); + } + } + + + void + MetaEAIndexerInterface::ensureStatelessEAMetaDataCachePopulated( fh_context& c ) + { + static bool virgin = true; + if( virgin ) + { + virgin = false; + ensureStatelessEAMetaDataCachePopulated( + c, getNativeStatelessEANames() ); + ensureStatelessEAMetaDataCachePopulated( + c, Context::getContextClassStatelessEANames() ); + } + } + + + MetaEAIndexerInterface::IndexableValue::IndexableValue( MetaEAIndexerInterface* midx, + fh_context c, + const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( value ), + sct( XSD_UNKNOWN ), + att( ATTRTYPEID_CIS ) + { + midx->ensureStatelessEAMetaDataCachePopulated( c ); + + bool haveSchemaData = false; + + if( midx->P->m_indexingNativeContext ) + { + StatelessEAMetaDataCache_t::const_iterator sleaiter = + getStatelessEAMetaDataCache().find( eaname ); + if( sleaiter != getStatelessEAMetaDataCache().end() ) + { + sct = sleaiter->second.sct; + att = sleaiter->second.att; + haveSchemaData = true; + TMP_VISITINGCONTEXT_SLEA_COUNT++; + } + } + if( !haveSchemaData ) + { + TMP_VISITINGCONTEXT_STATEEA_COUNT++; +// cerr << "NONSL:" << eaname << endl; + fh_context sc = c->getSchema( eaname ); + sct = ::Ferris::getSchemaType( sc, XSD_UNKNOWN ); + string cop = getSchemaDefaultSort( sc ); + att = midx->inferAttrTypeID( eaname, value, cop ); + } + + +// LG_EAIDX_D << "IndexableValue() ea:" << eaname +// << " value:" << value +// << " sct:" << sct +// << " att:" << att +// << endl; + + + if( sct == XSD_BASIC_DOUBLE || sct == XSD_BASIC_FLOAT ) + att = ATTRTYPEID_DBL; + if( sct == FXD_UNIXEPOCH_T ) + att = ATTRTYPEID_TIME; + } + + MetaEAIndexerInterface::AttrTypeList_t + MetaEAIndexerInterface::getAllAttrTypes() + { + AttrTypeList_t ret; + + ret.push_back( ATTRTYPEID_STR ); + ret.push_back( ATTRTYPEID_INT ); + ret.push_back( ATTRTYPEID_DBL ); + ret.push_back( ATTRTYPEID_TIME ); + + return ret; + } + + MetaEAIndexerInterface::IndexableValue + MetaEAIndexerInterface::getIndexableValueFromToken( const std::string& eaname, + fh_context tc ) + { + return IndexableValue( this, eaname, + getStrAttr( tc, "token", "" ) ); + } + + MetaEAIndexerInterface::IndexableValue + MetaEAIndexerInterface::getIndexableValue( fh_context c, + const std::string& eaname, + const std::string& value ) + { + return IndexableValue( this, c, eaname, value ); + } + + string + MetaEAIndexerInterface::asString( IndexableValue& v ) + { + return asString( v, v.getAttrTypeID() ); + } + + string + MetaEAIndexerInterface::asString( IndexableValue& v, AttrType_t att ) + { + switch( v.getAttrTypeID() ) + { + case ATTRTYPEID_INT: + case ATTRTYPEID_DBL: + case ATTRTYPEID_TIME: + return tostr(convertStringToInteger( v.rawValueString() )); + case ATTRTYPEID_STR: + if( v.isCaseSensitive() ) + return v.rawValueString(); + else + return tolowerstr()( v.rawValueString() ); + } + return v.rawValueString(); + } + + + MetaEAIndexerInterface::AttrType_t + MetaEAIndexerInterface::inferAttrTypeID( IndexableValue& iv ) + { + return inferAttrTypeID( iv.rawEANameString(), + iv.rawValueString() ); + } + + MetaEAIndexerInterface::AttrType_t + MetaEAIndexerInterface::inferAttrTypeID( const std::string& eaname, + const std::string& value ) + { + string cop = guessComparisonOperatorFromData( value ); + return inferAttrTypeID( eaname, value, cop ); + } + + MetaEAIndexerInterface::AttrType_t + MetaEAIndexerInterface::inferAttrTypeID( const std::string& eaname, + const std::string& value, + const std::string& cop ) + { + if( !value.empty() + && value[0] == '\'' + && value[ value.length()-1 ] == '\'' ) + { + if( getIsCaseSensitiveRegex()->operator()( value ) ) + return ATTRTYPEID_STR; + return ATTRTYPEID_CIS; + } + + { + static stringlist_t timePrefixes; + if( timePrefixes.empty() ) + { + timePrefixes.push_back( "atime" ); + timePrefixes.push_back( "ctime" ); + timePrefixes.push_back( "mtime" ); + timePrefixes.push_back( "multiversion-atime" ); + timePrefixes.push_back( "multiversion-mtime" ); + timePrefixes.push_back( "ferris-current-time" ); + } + + for( stringlist_t::const_iterator si = timePrefixes.begin(); + si != timePrefixes.end(); ++si ) + { + if( eaname == *si ) + return ATTRTYPEID_TIME; + if( starts_with( eaname, *si ) && ends_with( eaname, "-granularity" )) + return ATTRTYPEID_TIME; + } + + if( starts_with( eaname, "emblem:" ) && ends_with( eaname, "-mtime" ) ) + { + return ATTRTYPEID_TIME; + } + } + + { + + static stringlist_t sizePrefixes; + if( sizePrefixes.empty() ) + { + sizePrefixes.push_back( "size" ); + } + for( stringlist_t::const_iterator si = sizePrefixes.begin(); + si != sizePrefixes.end(); ++si ) + { + if( eaname == *si ) + return ATTRTYPEID_INT; + } + } + + + + if( cop == "int" ) + return ATTRTYPEID_INT; + if( cop == "double" || cop == "float" ) + return ATTRTYPEID_DBL; + + if( getIsCaseSensitiveRegex()->operator()( value ) ) + return ATTRTYPEID_STR; + + return ATTRTYPEID_CIS; + } + + docNumSet_t& + MetaEAIndexerInterface::BuildQuerySQL( fh_context q, + docNumSet_t& output, + fh_eaquery qobj, + std::stringstream& SQLHeader, + std::stringstream& SQLWherePredicates, + std::stringstream& SQLTailer, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + string& DocIDColumn, + stringset_t& eanamesUsed, + BuildQuerySQLTermInfo_t& termInfo ) + { + return output; + } + + bool + MetaEAIndexerInterface::getIndexMethodSupportsIsFileNewerThanIndexedVersion() + { + return false; + } + + bool + MetaEAIndexerInterface::isFileNewerThanIndexedVersion( const fh_context& c ) + { + return true; + } + + void + MetaEAIndexerInterface::removeDocumentsMatchingRegexFromIndex( const std::string& s, + time_t mustBeOlderThan ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + + void + MetaEAIndexerInterface::retireDocumentsFromIndex( docNumSet_t& docids ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + void + MetaEAIndexerInterface::retireDocumentsFromIndex( stringset_t& urls ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + + + + + bool + MetaEAIndexerInterface::supportsRemove() + { + return false; + } + + void + MetaEAIndexerInterface::purgeDocumentInstancesOlderThan( time_t t ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + + void + MetaEAIndexerInterface::removeByURL( stringlist_t& sl ) + { + LG_EAIDX_D << "MetaEAIndexerInterface::removeByURL() sl.sz:" << sl.size() << endl; + for( stringlist_t::iterator si = sl.begin(); si != sl.end(); ++si ) + { + string s = Util::EscapeStringAsRegex( *si ); + LG_EAIDX_D << "MetaEAIndexerInterface::removeByURL() s:" << s << endl; + cerr << "MetaEAIndexerInterface::removeByURL() s:" << s << endl; + removeDocumentsMatchingRegexFromIndex( s ); + } + if( !sl.empty() ) + sync(); + } + + void + MetaEAIndexerInterface::removeByURL( stringset_t& sl ) + { + for( stringset_t::iterator si = sl.begin(); si != sl.end(); ++si ) + { + string s = Util::EscapeStringAsRegex( *si ); + removeDocumentsMatchingRegexFromIndex( s ); + } + if( !sl.empty() ) + sync(); + } + + + + void + MetaEAIndexerInterface::queryFoundNonResolvableURLs( stringlist_t& sl ) + { + LG_EAIDX_D << "MetaEAIndexerInterface::queryFoundNonResolvableURLs() sl.sz:" << sl.size() << endl; + stringlist_t regexes = getNonResolvableURLsNotToRemoveRegexes(); + if( !regexes.empty() ) + { + erase_any_matches( toregexi( regexes ), sl ); + } + removeByURL( sl ); + } + + + void + MetaEAIndexerInterface::allWritesComplete() + { + } + void + MetaEAIndexerInterface::setOpenConfigReadOnly( bool v ) + { + P->m_configShouldBeReadOnly = v; + } + + fh_fwdeaidx + MetaEAIndexerInterface::tryToCreateForwardEAIndexInterface() + { + return 0; + } + + stringset_t& + MetaEAIndexerInterface::getValuesForAttribute( stringset_t& ret, const std::string& eaname, AttrType_t att ) + { + stringstream ss; + ss << "no support for listing the values for an attribute for this index type!"; + Throw_NotSupported( tostr(ss), 0 ); + } + + + void + MetaEAIndexerInterface::precacheDocIDs( docNumSet_t& docnums, std::map< docid_t, std::string >& cache ) + { + LG_EAIDX_D << "precacheDocIDs() s.size:" << docnums.size() << endl; + } + + void + MetaEAIndexerInterface::setFilesIndexedCount( int v ) + { + P->m_filesIndexedCount = v; + } + + void + MetaEAIndexerInterface::incrFilesIndexedCount() + { + P->m_filesIndexedCount++; + } + + int + MetaEAIndexerInterface::getFilesIndexedCount() + { + return P->m_filesIndexedCount; + } + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + /************************************************************/ + + struct FERRISEXP_DLLLOCAL EAIndexerFromLibraryFailed + { + string m_gmodule_error; + string libname; + + EAIndexerFromLibraryFailed( string m_gmodule_error, + string libname ) + : + m_gmodule_error( m_gmodule_error ), + libname( libname ) + { + } + + MetaEAIndexerInterface* AlwaysThrow() + { + ostringstream ss; + ss << "Error, unable to open module file: " + << m_gmodule_error << endl + << " implementation is at:" << libname << endl + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + }; + + MetaEAIndexerInterface* CreateEAIndexerFromLibrary( + const std::string& implnameraw ) + { + std::string libname = AUTOTOOLS_CONFIG_LIBDIR + "/ferris/plugins/eaindexers/" + + implnameraw; + + typedef ::Loki::Functor< MetaEAIndexerInterface*, + ::Loki::NullType > CreateFunc_t; + MetaEAIndexerInterface* (*CreateFuncPtr)(); + + typedef map< std::string, CreateFunc_t > cache_t; + static cache_t cache; + + cache_t::iterator ci = cache.find( libname ); + if( ci != cache.end() ) + { + return ci->second(); + } + + GModule* ghandle = g_module_open ( libname.c_str(), G_MODULE_BIND_LAZY ); + if( !ghandle ) + { +// EAIndexerFromLibraryFailed obj( g_module_error (), +// libname ); +// ci = cache.insert( make_pair( libname, obj )).second; +// return ci->second(); + + ostringstream ss; + ss << "Error, unable to open module file: " + << g_module_error () << endl + << " implementation is at:" << libname << endl + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "Create", + (gpointer*)&CreateFuncPtr)) + { + ostringstream ss; + ss << "Error, unable to resolve factory function in module file: " + << g_module_error () << endl + << " implementation is at:" << libname << endl + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + cache.insert( make_pair( libname, CreateFuncPtr )); + return CreateFuncPtr(); + } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + /************************************************************/ + + }; +}; + diff --git a/Ferris/EAIndexerMetaInterface.hh b/Ferris/EAIndexerMetaInterface.hh new file mode 100644 index 0000000..e2e3963 --- /dev/null +++ b/Ferris/EAIndexerMetaInterface.hh @@ -0,0 +1,708 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexerMetaInterface.hh,v 1.21 2011/05/03 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/*** + * This class/interface was created when a relational database indexing module + * for EA data was added. The old native EA indexing became a new subclass + * of the meta interface which provides a course enough API to allow different + * backends to handle query resultion in a manner efficient to that backend. + * + * Some Main Operations were identified and support added as virtual methods + * in the meta interface. This header file has limitations on what can be + * #include<>ed and should be as light as possible. + * + * 1) Add a new fh_context to index + * 2) resolve a query tree and append all the document numbers matching a it + * to a list. This allows a direct translation of the + * (&(width<100)(size>=4k)) + * usual query syntax into SQL for the relational backend. + * 3) resolve a docid to a fh_context + * + * Note that this light weight interface was created sometime shortly after + * the FullText meta interface and the two classes are very similar. + * + */ +#ifndef _ALREADY_INCLUDED_FERRIS_EAIDX_METAINTERFACE_H_ +#define _ALREADY_INCLUDED_FERRIS_EAIDX_METAINTERFACE_H_ + +#include +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + namespace FullTextIndex + { + class MetaFullTextIndexerInterface; + FERRIS_SMARTPTR( MetaFullTextIndexerInterface, fh_idx ); + }; + + + namespace EAIndex + { + class FERRISEXP_API FederatedEAIndexer; + class FERRISEXP_API MetaEAIndexerInterface; + FERRIS_SMARTPTR( MetaEAIndexerInterface, fh_MetaEAIndexerInterface ); + + typedef guint32 docid_t; + typedef std::set< docid_t > docNumSet_t; + + class MetaEAIndexerInterface; + FERRIS_SMARTPTR( MetaEAIndexerInterface, fh_idx ); + + class DocumentIndexer; + FERRIS_SMARTPTR( DocumentIndexer, fh_docindexer ); + + /** + * Progress signal for adding new contexts to the ea indexing engine. + * + * @param fh_context is the context being added + * @param int is the current attribute number being added for this context + * @param int is the total number of attributes that will be added for this context + */ + typedef sigc::signal3< void, fh_context, int, int > + AddToEAIndexProgress_Sig_t; + FERRISEXP_API AddToEAIndexProgress_Sig_t& getNullAddToEAIndexProgress_Sig(); + + fh_idx createEAIndex( const std::string& index_classname, + fh_context c, + fh_context md ); + + namespace Factory + { + /** + * Get the default ea index for the user. + */ + FERRISEXP_API fh_idx getDefaultEAIndex(); + + FERRISEXP_API void setDefaultEAIndexPath( const char* EAIndexPath_CSTR ); + + + /** + * Get the ea index rooted at the given path. + */ + FERRISEXP_API fh_idx getEAIndex( const std::string& basepath ); + + /** + * Get an indexing object with defaults all setup how the user wishes + * + * @param idx the ea index to use, or getDefaultEAIndex() if none + * is passed in + */ + FERRISEXP_API fh_docindexer makeDocumentIndexer( fh_idx idx = 0 ); + + /** + * Use these to make an EA index federation that lasts a single process. + */ + typedef std::list< fh_idx > eaidxlist_t; + FERRISEXP_API fh_idx createTemporaryEAIndexFederation( ctxlist_t eaindexlist, fh_context md = 0 ); + FERRISEXP_API fh_idx createTemporaryEAIndexFederation( eaidxlist_t eaindexlist, fh_context md = 0 ); + }; + + FERRISEXP_API void addToTemporaryEAIndexFederation( fh_idx fed, fh_idx subidx ); + + class MetaEAIndexerInterfacePriv; + class FERRISEXP_API MetaEAIndexerInterface + : + public Handlable + { + friend class FederatedEAIndexer; + MetaEAIndexerInterfacePriv* P; + + friend fh_idx createEAIndex( const std::string& index_classname, + fh_context c, + fh_context md ); + + friend fh_idx Factory::getEAIndex( const std::string& basepath ); + + /** + * Called after object creation for indexes that are existing. + * New indexes will instead have CreateIndexBeforeConfig() and + * CreateIndex() called. + */ + void private_initialize( const std::string& basepath ); + /** + * Called for local object init before CommonConstruction() is called. + */ + void LocalCommonConstruction(); + + /** + * Builds the map eaname -> metadata for native stateless EA. + */ + void ensureStatelessEAMetaDataCachePopulated( fh_context& c ); + void ensureStatelessEAMetaDataCachePopulated( fh_context& c, const stringset_t& sl ); + + + protected: + + void addDocID( docNumSet_t& output, docid_t v ); + + /** + * internal use only. + * creator must call private_initialize() next + */ + MetaEAIndexerInterface(); + + /** + * Called on object creation for existing indexes for + * subclasses to perform extra work. For new indexes + * CreateIndexBeforeConfig() and CreateIndex() will + * instead be called. After either Setup() or + * CreateIndex() is called then CommonConstruction() will + * be called so that common setup operations for the index + * can be performed. + * + * Note that during the call to CreateIndexBeforeConfig() + * there is no config file created yet, so setConfig() + * should not be called. Configuration information can be + * instead set during CreateIndex() which is called after + * CreateIndexBeforeConfig() has been called and after a + * config file has been created. There are two methods so + * that subclasses which are using an index engine that + * wipes out the entire directory contents on + * initialization such as Lucene does can create the index + * and then have the system make the config file *after* + * the index has been made so that the config file remains + * in existance. + * + * All of Setup(), CreateIndexBeforeConfig(), + * CreateIndex() and CommonConstruction() do not have to + * call the parent, they are here only as hooks for + * subclasses to perform needed work + */ + virtual void Setup() + {} + /** + * See Setup() + * + * @param md Will always be a valid context, its path and url + * are meaningless but it could contain EA which the + * user has set in a fcreate/gfcreate operation to + * pass in extra metadata for the creation process. + */ + virtual void CreateIndexBeforeConfig( fh_context c, + fh_context md ) + {} + /** + * See Setup() + * + * @param md Will always be a valid context, its path and url + * are meaningless but it could contain EA which the + * user has set in a fcreate/gfcreate operation to + * pass in extra metadata for the creation process. + */ + virtual void CreateIndex( fh_context c, + fh_context md ) = 0; + virtual void CommonConstruction() + {} + + /** + * return true if the attribute 'attributeName' should be indexed for context 'c' + * @see obtainValueIfShouldIndex() + */ + bool shouldIndex( fh_context c, fh_docindexer di, + const std::string& attributeName ); + public: + std::string getConfig( const std::string& k, const std::string& def, + bool throw_for_errors = false ); + protected: + void setConfig( const std::string& k, const std::string& v ); + + /********************/ + /********************/ + /********************/ + + /** + * The type of an attribute value. This is mainly used to + * dispatch lookup to the appropriate place because each + * of these types will probably be best stored in a different + * lookup because sorting the types or the width of the types + * gives most efficiency stored in a different lookup. + */ + public: + enum AttrType_t + { + ATTRTYPEID_INT = 1, + ATTRTYPEID_DBL = 2, + ATTRTYPEID_TIME = 3, + ATTRTYPEID_STR = 10, + ATTRTYPEID_CIS = 11 + }; + protected: + typedef std::list< AttrType_t > AttrTypeList_t; + AttrTypeList_t getAllAttrTypes(); + + /** + * Mostly a single container for an EA value to be indexed + * and the metadata about its value. + * + * The class uses callbacks into MetaEAIndexerInterface + * sometimes to allow virtual methods in MetaEAIndexerInterface + * to supply different implementations for different storage + * methods. + */ + class FERRISEXP_API IndexableValue + { + private: + std::string eaname; + std::string value; + AttrType_t att; + XSDBasic_t sct; + + public: + AttrType_t getAttrTypeID() const; + XSDBasic_t getSchemaType() const; + bool isCaseSensitive() const; + const std::string& rawValueString() const; + const std::string& rawEANameString() const; + + + IndexableValue( MetaEAIndexerInterface* midx, + const std::string& eaname, + const std::string& value ); + IndexableValue( MetaEAIndexerInterface* midx, + fh_context c, + const std::string& eaname, + const std::string& value ); + }; + + /** + * Can be used by clients to obtain the value of an EA + * if it should be indexed. Unlike shouldIndex() this method + * reads the value and if it is larger than the max size that + * the user wishes to index returns false also. + * + * @param c Context we are indexing + * @param di Indexer for operation + * @param attributeName EA of 'c' we are indexing + * @param v Where to put the value of 'attributeName' if return value + * is true + * @param acceptNullValues if true then for attributes which exist but + * can't be read isNULL is set to true and + * 'v' is empty and return value is true. + * @return true if attributeName should be indexed. + * @see shouldIndex() + */ + bool obtainValueIfShouldIndex( fh_context c, fh_docindexer di, + const std::string& attributeName, + std::string& v, + bool acceptNullValues, + bool& isNULL ); + bool obtainValueIfShouldIndex( fh_context c, fh_docindexer di, + const std::string& attributeName, + std::string& v ); + +// bool getDontStoreZeroIntegerAttributes(); +// bool getDontStoreEmptyStringAttributes(); +// void setDontStoreZeroIntegerAttributes( bool v ); +// void setDontStoreEmptyStringAttributes( bool v ); + + + /** + * Get a list of which ea names should be indexed. + * subclasses should use obtainValueIfShouldIndex() to + * read each EA + */ + stringlist_t& + getEANamesToIndex( fh_context& c, + stringlist_t& ret ); + + /** + * Read the EA "token" for the given context and work out + * what type the value should have in AttrType_t + * The possibly quoted and value converted version of the + * IndexableValue can be obtained with asString( IndexableValue ); + * + * @param eaname is the name of the attribute which we are reading + * the value for + * @param c is the context that has a 'token' with the value we want + * to read. + */ + IndexableValue getIndexableValueFromToken( const std::string& eaname, + fh_context tokenc ); + IndexableValue getIndexableValue( fh_context c, + const std::string& eaname, + const std::string& value ); + + /** + * Convert the value into a string format with possible quoting + * of the value or conversion of time values into correct date + * formats. This method is virtual to allow for example, the ODBC + * module to format and quite time_t values into value SQL date + * syntax. + */ + virtual std::string asString( IndexableValue& v, AttrType_t att ); + /** + * Calls the longer asString() method with v.getAttrTypeID() as AttrType_t + */ + virtual std::string asString( IndexableValue& v ); + + /** + * Given a eaname,value combination try to work out what type the + * value has. Some modules may override this method and use + * statistics from the index itself to tell which attrType a + * attribute should have. For example, the vast majority of + * mtime attributes will be of type EPOCH, other time attributes + * will likely follow suit. + * + * if cop is not provided it will be guessed from the value given + */ + virtual AttrType_t inferAttrTypeID( const std::string& eaname, + const std::string& value, + const std::string& cop ); + virtual AttrType_t inferAttrTypeID( const std::string& eaname, + const std::string& value ); + /** + * Calls inferAttrTypeID() with broken up values from iv. + */ + virtual AttrType_t inferAttrTypeID( IndexableValue& iv ); + + /********************/ + /********************/ + /********************/ + + public: + virtual ~MetaEAIndexerInterface(); + + std::string getPath(); + std::string getURL(); + + /** + * Called to sync the various data structures that the index might + * have or to commit current transactions to disk. + */ + virtual void sync() + {} + + /** + * attempt to compact the index by dropping out revoked + * documents etc. + */ + virtual void compact( fh_ostream oss, bool verbose = false ) + {} + + /** + * Called by DocumentIndexer to allow the index implementation to + * do once off preparations for adding new items to the index. + * Such preperations can be wound back in sync() after all documents + * have been added. + */ + enum prepareForWritesFlags { + PREPARE_FOR_WRITES_NONE = 0, + PREPARE_FOR_WRITES_ISNEWER_TESTS = 1<<1 + }; + virtual void prepareForWrites( int f = PREPARE_FOR_WRITES_NONE ) + {} + + /** + * prepareForWrites() is called before any addToIndex() calls. + * This is called after all addToIndex() calls to allow subclasses + * to flush caches setup in prepareForWrites(). + */ + virtual void allWritesComplete(); + + /** + * Before calling obtainValueIfShouldIndex() for the EAs which an indexer + * wishes to index it should call this method once for the context + * so that this class can optimize some calls in + * the obtainValueIfShouldIndex() calls for this context. + * + * Note that by default the docindexer will call this method for + * EAindex subclasses. + */ + void visitingContext( const fh_context& c ); + + /** + * Add the file at the given URL to the index. + * + * subclasses should make an effort to emit the progress signal + * so that UIs can update how far through the indexing is. + * Use the docIndexer object's getProgressSig() for progress reporting. + */ + virtual void addToIndex( fh_context c, + fh_docindexer di ) = 0; + + /** + * Add all the document ID's that match a mounted LDAP search + * query string. + * + * @return output set for easy method chaining. + * @param q root of query tree + * @param output where to insert docids which match satisfy + * the query 'q'. + */ + virtual docNumSet_t& ExecuteQuery( fh_context q, + docNumSet_t& output, + fh_eaquery qobj, + int limit = 0 ) = 0; + + /** + * Used in the creation of base views for FCA. + * This method is only likely to be implemented in SQL backends + * such as the postgresql backend. As the FCA code is tied to the + * postgresql database anyway this method is safe for most FCA code. + * + * The method is really only of interest to internal libferris + * code. Default version just returns output as it was passed in. + */ + struct QueryTermInfo + { + AttrType_t m_attrType; + std::string m_lookupTable; + QueryTermInfo( AttrType_t m_attrType, std::string m_lookupTable ) + : + m_attrType( m_attrType ), + m_lookupTable( m_lookupTable ) + { + } + }; + typedef std::map< std::string, QueryTermInfo > BuildQuerySQLTermInfo_t; + virtual docNumSet_t& BuildQuerySQL( fh_context q, + docNumSet_t& output, + fh_eaquery qobj, + std::stringstream& SQLHeader, + std::stringstream& SQLWherePredicates, + std::stringstream& SQLTailer, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + std::string& DocIDColumn, + stringset_t& eanamesUsed, + BuildQuerySQLTermInfo_t& termInfo ); + + + + /** + * Some indexing code might not store a persistent doc <-> id + * mapping. In such a case addAllDocumentsMatchingTerm() + * should keep building an internal one and this method will + * free that internal build up. + */ + virtual void cleanDocumentIDCache() + {} + + /** + * Resolve a document number to its URL. This call only has + * to be valid between one or more calls to + * addAllDocumentsMatchingTerm() and the subsequent call to + * cleanDocumentIDCache(). + */ + virtual std::string resolveDocumentID( docid_t ) = 0; + + /** + * For executing heuristic queries we need to be able to + * convert strings to integer, size and date information. + * This method will make a best effort to perform such + * conversions. + */ + virtual guint64 convertStringToInteger( const std::string& v ); + + + /** + * Allow ferris-fulltext-search clauses to be resolved within the + * EA index queries using the fulltext index at path. + */ + void setFulltextIndex( const std::string& path ); + void setFulltextIndex( FullTextIndex::fh_idx fidx ); + FullTextIndex::fh_idx getFulltextIndex(); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + std::string getEANamesIgnore(); + void appendToEANamesIgnore( const std::string& s ); + stringlist_t getEANamesIgnoreRegexes(); + std::streamsize getMaxValueSize(); + std::string getFulltextIndexPath(); + std::string getEANamesToIndexRegex(); + + stringlist_t getNonResolvableURLsNotToRemoveRegexes(); + + /** + * Remove the files with these URLs from the index if possible. + * The user might explicitly deny removal of some URLs if they want. + * + * Relies on supportsRemove() and removeDocumentsMatchingRegexFromIndex() + */ + void removeByURL( stringlist_t& sl ); + void removeByURL( stringset_t& sl ); + + /** + * When a query system finds URLs it can't resolve it should call + * here. This will handle the possible removal of those URLs from + * the index depending on the user's desires. For example, they + * might not want to remove URLs which are on an NFS server which + * happens to be down at the moment. + */ + void queryFoundNonResolvableURLs( stringlist_t& sl ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Subclasses supporting isFileNewerThanIndexedVersion() should override this + * method and return true + */ + virtual bool getIndexMethodSupportsIsFileNewerThanIndexedVersion(); + /** + * Return true if the passed context is newer than when it was last added + * to the index. + */ + virtual bool isFileNewerThanIndexedVersion( const fh_context& c ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * If the index plugin supports the removal of documents, this method + * should be overriden to remove any documents with URLs matching the + * given regex. + * + * @param mustBeOlderThan if not zero (the defualt) then matches are only removed + * if their docidtime is < mustBeOlderThan + */ + virtual void removeDocumentsMatchingRegexFromIndex( const std::string& s, + time_t mustBeOlderThan = 0 ); + + + /** + * Either move the files with the following URLs into the multiversion + * area or for single instance indexes remove them from the index. + */ + virtual void retireDocumentsFromIndex( docNumSet_t& docids ); + virtual void retireDocumentsFromIndex( stringset_t& urls ); + + + + + /** + * If a class provides the above method then override this and return 1; + */ + virtual bool supportsRemove(); + + /** + * When multiversioning, remove any instances of document data + * which are older than the given time. This never effects the + * current version of document data, only outdated versions. + */ + virtual void purgeDocumentInstancesOlderThan( time_t t ); + + protected: + + /** + * If an index plugin doesn't want to modify anything in the + * db file it should set this in Setup() to allow the db4 file + * to live on a read only NFS share if desired. + */ + void setOpenConfigReadOnly( bool v ); + + void setFilesIndexedCount( int v ); + void incrFilesIndexedCount(); + + public: + + /** + * If an EAIndex implementation supports resolving + * (url,eaname -> eavalue) + * then it should return an implementaiton here. The + * default is null + */ + virtual fh_fwdeaidx tryToCreateForwardEAIndexInterface(); + + /** + * Given an attribute like artist or title get all the possible + * values that attribute has in the index. This might be slow + * or not implemented depending on how the index is designed. + */ + virtual stringset_t& + getValuesForAttribute( stringset_t& ret, const std::string& eaname, AttrType_t att = ATTRTYPEID_CIS ); + + /** + * Setup the cache for docid -> url in cache for the + * document numbers in docnums This allows bulk lookup of + * the URLs for a set of document IDs if that might be + * quicker. This is optional, you only have to implement + * resolveDocumentID(). But if a set can be done quicker, + * you should consider implementing this method too. for + * example, if you have to connect to a remote server then + * one round trip will likely be much faster than 100 + * sequential ones. + */ + virtual void precacheDocIDs( docNumSet_t& docnums, std::map< docid_t, std::string >& cache ); + + /** + * Number of files added to index so far this time. This is not the total + * number of files in the index itself, but the number of files added this + * indexing run. + */ + int getFilesIndexedCount(); + + }; + + + // factories for creating the indexes. + stringlist_t& getMetaEAIndexClassNames(); + bool appendToMetaEAIndexClassNames( const std::string& s ); + typedef Loki::SingletonHolder< + Loki::Factory< MetaEAIndexerInterface, std::string >, + Loki::CreateUsingNew, Loki::NoDestroy > + MetaEAIndexerInterfaceFactory; + + + // + // libferris 1.1.40+ function used by the loadable eaindex + // module factories to load an implementation and create + // an object of that eaindex subclass. + // + MetaEAIndexerInterface* CreateEAIndexerFromLibrary( + const std::string& implnameraw ); + + + }; + + FERRISEXP_API bool RegisterEAIndexPlugin( const char* libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive, + const std::string& simpleTypes ); + FERRISEXP_API void RegisterEAIndexPluginAlias( const char* libname, + const std::string& ferristype ); + +}; + + +#endif + diff --git a/Ferris/EAIndexerSQLCommon.cpp b/Ferris/EAIndexerSQLCommon.cpp new file mode 100644 index 0000000..aa1d996 --- /dev/null +++ b/Ferris/EAIndexerSQLCommon.cpp @@ -0,0 +1,108 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2004 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexerSQLCommon.cpp,v 1.7 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "EAIndexerSQLCommon_private.hh" +#include "General.hh" +#include "EAIndexer_private.hh" +#include "Ferris/FerrisBoost.hh" + +using namespace std; + +namespace Ferris +{ + const char* CFG_EAIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K + = "cfg-odbcidx-extra-columns-to-inline-in-docmap"; + + string + stripNullCharacters( const std::string& s ) + { + if( s.find( '\0' ) == string::npos ) + return s; + + stringstream ss; + remove_copy_if( s.begin(), s.end(), + ostreambuf_iterator(ss), + bind2nd(equal_to(), '\0') ); + return ss.str(); + } + + string + EANameToSQLColumnName( const std::string& s ) + { + static const boost::regex rx = toregex( "[- ,/\\@&#:.+'()]" ); +// string ret = regex_replace( s, rx, "_", boost::match_default | boost::format_all ); + string ret = replaceg( s, rx, "_" ); + return ret; + + return + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( + Util::replace_all( s, + ' ', '_' ), + ',', '_' ), + '-', '_' ), + '/', '_' ), + '\\', '_' ), + "@", "_at_" ), + '&', '_' ), + '#', '_' ), + ' ', '_' ), + ':', '_' ), + '.', '_' ); + } + + std::string toSQLTimeString( time_t t ) + { + return Time::toTimeString( t, "%Y-%m-%d %H:%M:%S" ); + } + + time_t fromSQLTimeString( const std::string& s_const ) + { + string s = s_const; + if( string::npos != s.rfind('.') ) + s = s.substr( 0, s.rfind('.') ); + + struct tm tm = Time::ParseTimeString( s, "%Y-%m-%d %H:%M:%S", false ); + time_t tt = mktime( &tm ); + return tt; + } + + std::string GET_SQL_STRVAL_LENGTH_STR() + { + return EAIndex::GET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT(); + } +}; diff --git a/Ferris/EAIndexerSQLCommon_private.hh b/Ferris/EAIndexerSQLCommon_private.hh new file mode 100644 index 0000000..fd582c3 --- /dev/null +++ b/Ferris/EAIndexerSQLCommon_private.hh @@ -0,0 +1,57 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2004 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexerSQLCommon_private.hh,v 1.3 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SQL_COMMON_H_ +#define _ALREADY_INCLUDED_FERRIS_SQL_COMMON_H_ + +#include +#include + +namespace Ferris +{ + FERRISEXP_API extern const char* CFG_EAIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K; + +#define SQL_URL_LENGTH_INT 16384 +#define SQL_MIMETYPE_LENGTH_INT 512 +#define SQL_ATTRNAME_LENGTH_INT 512 + +#define SQL_URL_LENGTH_STR "16384" +#define SQL_MIMETYPE_LENGTH_STR "512" +#define SQL_ATTRNAME_LENGTH_STR "512" + FERRISEXP_API std::string GET_SQL_STRVAL_LENGTH_STR(); + + FERRISEXP_API std::string stripNullCharacters( const std::string& s ); + FERRISEXP_API std::string EANameToSQLColumnName( const std::string& s ); + FERRISEXP_API std::string toSQLTimeString( time_t t ); + FERRISEXP_API time_t fromSQLTimeString( const std::string& s ); + + +}; +#endif + diff --git a/Ferris/EAIndexer_private.hh b/Ferris/EAIndexer_private.hh new file mode 100644 index 0000000..d54d596 --- /dev/null +++ b/Ferris/EAIndexer_private.hh @@ -0,0 +1,84 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexer_private.hh,v 1.6 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAIDX_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_EAIDX_PRIVATE_H_ + +#include +#include + +namespace Ferris +{ + namespace EAIndex + { + FERRISEXP_API extern const std::string EAINDEXROOT; + FERRISEXP_API extern const std::string DB_EAINDEX; + +#define EAIDXMGR_INDEX_CLASS_K "eaindex-manager-main-class-name" +#define EAIDXMGR_INDEX_CLASS_DEFAULT "db4" + + FERRISEXP_API void SET_EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT( const std::string& v ); + FERRISEXP_API void SET_EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT( const std::string& v ); + FERRISEXP_API void SET_EAINDEX_EANAMES_REGEX_DEFAULT( const std::string& v ); + FERRISEXP_API void SET_EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT( const std::string& v ); + FERRISEXP_API void SET_EAINDEX_EANAMES_TO_INDEX_REGEX_DEFAULT( const std::string& v ); + + FERRISEXP_API extern const std::string IDXMGR_EXPLICIT_EANAMES_TO_INDEX_K; + + FERRISEXP_API extern const std::string IDXMGR_EANAMES_TO_INDEX_REGEX_K; + + FERRISEXP_API extern const std::string IDXMGR_EANAMES_IGNORE_K; +// FERRISEXP_API extern const std::string IDXMGR_EANAMES_IGNORE_DEFAULT; + FERRISEXP_API extern const std::string IDXMGR_EANAMES_REGEX_IGNORE_K; +// FERRISEXP_API extern const std::string IDXMGR_EANAMES_REGEX_IGNORE_DEFAULT; + FERRISEXP_API extern const std::string IDXMGR_MAX_VALUE_SIZE_K; +// FERRISEXP_API extern const std::string IDXMGR_MAX_VALUE_SIZE_DEFAULT; + FERRISEXP_API extern const std::string IDXMGR_EANAMES_REGEX_K; + + FERRISEXP_API extern const std::string IDXMGR_FULLTEXT_INDEX_PATH_K; + + + FERRISEXP_API extern const std::string IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K; + FERRISEXP_API void SET_EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( const std::string& v ); + FERRISEXP_API std::string GET_EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( bool commaSeperated = false ); + + +#define IDXMGR_EA_DGAP_CODE_K "idxmgr-dgap-code-k" +#define IDXMGR_EA_DGAP_CODE_DEFAULT "none" + + FERRISEXP_API fh_idx createEAIndex( fh_context c, + const std::string& attributeMap_class, + const std::string& forwardValueMap_class, + const std::string& reverseValueMap_class, + const std::string& eanames_ignore, + const std::string& eanames_ignore_regex, + std::streamsize max_value_size ); + }; +}; +#endif diff --git a/Ferris/EAN.cpp b/Ferris/EAN.cpp new file mode 100644 index 0000000..1867aa3 --- /dev/null +++ b/Ferris/EAN.cpp @@ -0,0 +1,35 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAN.cpp,v 1.2 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +namespace Ferris +{ + const char* EAN_IS_REMOTE = "is-remote"; +}; + diff --git a/Ferris/EAN.hh b/Ferris/EAN.hh new file mode 100644 index 0000000..7ead4d3 --- /dev/null +++ b/Ferris/EAN.hh @@ -0,0 +1,37 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAN.hh,v 1.3 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAN_H_ +#define _ALREADY_INCLUDED_FERRIS_EAN_H_ +#include +namespace Ferris +{ + extern FERRISEXP_API const char* EAN_IS_REMOTE; +}; +#endif diff --git a/Ferris/EAQuery.cpp b/Ferris/EAQuery.cpp new file mode 100644 index 0000000..7046ada --- /dev/null +++ b/Ferris/EAQuery.cpp @@ -0,0 +1,835 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAQuery.cpp,v 1.23 2011/05/06 21:30:20 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#ifndef STLPORT +#include +#endif + +using namespace std; + + +namespace Ferris +{ + namespace EAIndex + { + #define RESULTSETMAXSIZE_DEFAULT 100 + + static bool shouldRunEAQueryFilesystemAsync_val = false; + + bool shouldRunEAQueryFilesystemAsync() + { + return shouldRunEAQueryFilesystemAsync_val; + } + + void shouldRunEAQueryFilesystemAsync( bool v ) + { + shouldRunEAQueryFilesystemAsync_val = v; + } + + EAQuery::EAQuery( const std::string& s, fh_idx idx ) + : + m_idx( idx ), + m_queryString( s ), + m_resultSetMaxSize( RESULTSETMAXSIZE_DEFAULT ) + { + } + + EAQuery::~EAQuery() + { + } + + + void + EAQuery::setIndex( fh_idx idx ) + { + m_idx = idx; + } + + void + EAQuery::setQuery( const std::string& s ) + { + m_queryString = s; + } + + void + EAQuery::setResultSetMaxSize( int v ) + { + m_resultSetMaxSize = v; + } + + void + EAQuery::getQuerySQL( std::stringstream& SQLHeaderSS, + std::stringstream& SQLWherePredicatesSS, + std::stringstream& SQLTailerSS, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + string& DocIDColumn, + stringset_t& eanamesUsed, + MetaEAIndexerInterface::BuildQuerySQLTermInfo_t& termInfo ) + { + // cerr << "error... EAQuery::getQuerySQL() called" << endl; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL EAQuery_Heur + : + public EAQuery + { + typedef EAQuery_Heur _Self; + + fh_FerrisSlaveProcess m_asyncSlave; + +// fh_runner m_asyncRunner; +// fh_xstreamcol m_asyncXMLCol; +// fh_childserv m_asyncChildServ; + + fh_context m_asyncSelection; + fh_fwdeaidx m_asyncFWD; + + void OnAsyncXMLMessage( fh_xstreamcol h ); + void OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ); + + public: + + EAQuery_Heur( const std::string& s, fh_idx idx ) + : + EAQuery( s, idx ), + m_asyncSlave(0), +// m_asyncRunner(0), +// m_asyncXMLCol(0), +// m_asyncChildServ(0), + m_asyncSelection(0), + m_asyncFWD(0) + { + } + + virtual ~EAQuery_Heur() + { + LG_EAIDX_D << "~EAQuery_Heur()" << endl; + } + + docNumSet_t& ExecuteQueryToDocIDs( docNumSet_t& ret ); + docNumSet_t& ExecuteQueryToDocIDs( docNumSet_t& ret, int limit ); + + fh_context ResolveDocIDs( docNumSet_t& s ); + fh_context ResolveDocIDs( docNumSet_t& s, fh_context selectionCtx ); + stringset_t& ResolveDocIDsToURLs( docNumSet_t& s, stringset_t& ret ); + + virtual fh_context execute(); + virtual fh_context execute( fh_context selectionCtx, int limit = 0 ); + + virtual fh_context executeAsync( fh_context selc, int limit = 0 ); + + + virtual void + getQuerySQL( std::stringstream& SQLHeaderSS, + std::stringstream& SQLWherePredicatesSS, + std::stringstream& SQLTailerSS, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + string& DocIDColumn, + stringset_t& eanamesUsed, + MetaEAIndexerInterface::BuildQuerySQLTermInfo_t& termInfo ); + }; + + double getRange( string s ) + { + int start = s.rfind("=")+1; + int end = start+1 + s.substr( start+1 ).find("("); + + string r = s.substr( start, end ); + // cerr << " r:" << r << endl; + return toType( r ); + } + + docNumSet_t& + EAQuery_Heur::ExecuteQueryToDocIDs( docNumSet_t& ret, int limit ) + { + string query_string = m_queryString; + + if( m_queryString.empty() ) + { + return ret; + } + LG_EAIDX_D << "EAQuery_Heur::execute(top) query:" << query_string << " limit:" << limit << endl; + + // + // Where an emblem name is non unique, rewrite query to include + // all emblems of the same name by id. + // + while( query_string.find( "(emblem:has-" ) != string::npos ) + { + boost::regex subqregex("(.*)\\(emblem:has-([^<=]+)([<=]+)([0-9.]+)\\)(.*)"); + boost::smatch matches; + if(boost::regex_match(query_string, matches, subqregex )) + { + if( matches.size() == 6 ) + { + stringstream qss; + string emblemName = matches[2]; + string opcode = matches[3]; + string v = matches[4]; + + fh_etagere et = ::Ferris::Factory::getEtagere(); + fh_emblem em = 0; + + emblemset_t el; + el = et->getAllEmblemsWithName( el, emblemName ); + + if( el.empty() ) + { + stringstream ss; + ss << "Query for emblem that does not exist:" << emblemName; + Throw_EmblemNotFoundException( tostr(ss), 0 ); + } + + qss << emblemListToEAQuery( el, '&' ); + + stringstream newq; + newq << matches[1]; + newq << tostr(qss); + newq << matches[matches.size()-1]; + LG_EAIDX_D << "new query:" << tostr(newq) << endl; + + query_string = tostr(newq); + } + } + } + + while( query_string.find( "(ferris-near" ) != string::npos ) + { + boost::regex subqregex("(.*)\\(ferris-near-([^<=]+)([<=]+)([0-9.]+)(km|miles|mile|d)?\\)(.*)"); + boost::smatch matches; + if(boost::regex_match(query_string, matches, subqregex )) + { + LG_EAIDX_D << "m.sz:" << matches.size() << endl; + LG_EAIDX_D << "prefix:" << matches.prefix() << endl; + LG_EAIDX_D << "suffix:" << matches.suffix() << endl; + + for( int i=0; i < matches.size(); ++i ) + LG_EAIDX_D << "match i:" << i << " is:" << matches[i] << endl; + + if( matches.size() == 7 ) + { + stringstream qss; + + string emblemName = matches[2]; + double range = toType(matches[4]); + string units = matches[5]; + bool ShowDownSet = false; + if( units.empty() ) + units = "km"; + + LG_EAIDX_D << "emblemName:" << emblemName + << " Range:" << range + << " units:" << units + << endl; + + fh_etagere et = ::Ferris::Factory::getEtagere(); + fh_emblem em = 0; + + if( starts_with( emblemName, "id-" )) + { + string EmblemID = emblemName.substr(3); + em = et->getEmblemByID( toType( EmblemID )); + } + else + { + em = et->getEmblemByName( emblemName ); + } + + if( units == "km" ) + { + } + else if( units == "miles" || units == "mile" ) + { + range *= 1.609344; + } + if( units == "d" ) + { + range = DRangeToKiloMeters( range ); + } + + emblemset_t result; + getEmblemsNear( result, em, range, et, ShowDownSet ); + +// double elat = em->getDigitalLatitude(); +// double elong = em->getDigitalLongitude(); + + +// emblemset_t result; +// fh_emblem geospatialem = et->getEmblemByName( "libferris-geospatial" ); +// emblems_t all = geospatialem->getDownset(); +// for( emblems_t::iterator ai = all.begin(); ai != all.end(); ++ai ) +// { +// double alat = (*ai)->getDigitalLatitude(); +// double along = (*ai)->getDigitalLongitude(); +// if( !alat || !along ) +// continue; +// if( fabs( alat - elat ) < range ) +// { +// if( fabs( along - elong ) < range ) +// { +// if( ShowDownSet ) +// { +// emblems_t ds = (*ai)->getDownset(); +// copy( ds.begin(), ds.end(), inserter( result, result.end() ) ); +// } +// else +// { +// result.insert( *ai ); +// } +// } +// } +// } + + qss << emblemListToEAQuery( result ); +// if( result.size() > 1 ) +// qss << "(|"; +// bool v = true; +// for( emblemset_t::iterator ei = result.begin(); ei!=result.end(); ++ei ) +// { +// fh_emblem em = *ei; +// if( v ) v = false; +// else qss << ""; + +// qss << "(emblem:id-" << em->getID() << "==1)"; +// } +// if( result.size() > 1 ) +// qss << ")"; + + stringstream newq; + newq << matches[1]; + newq << tostr(qss); + newq << matches[matches.size()-1]; + LG_EAIDX_D << "new query:" << tostr(newq) << endl; + + query_string = tostr(newq); + } + } + } + + + LG_EAIDX_D << "EAQuery_Heur::execute() query:" << query_string << endl; + fh_context q = Ferris::Factory::MakeFilter( query_string ); + if( q->getSubContextNames().empty() ) + { + fh_stringstream ss; + ss << "Invalid query given:" << query_string << endl + << "Can not find toplevel operation of query" + << endl; + Throw_EAIndexException( tostr(ss), 0 ); + } + fh_context root_of_q = q->getSubContext( *(q->getSubContextNames().begin()) ); + + m_idx->ExecuteQuery( root_of_q, ret, this, limit ); + + return ret; + } + + + docNumSet_t& + EAQuery_Heur::ExecuteQueryToDocIDs( docNumSet_t& ret ) + { + return ExecuteQueryToDocIDs( ret, 0 ); + } + + + std::string + EAQuery::resolveDocumentIDAttemptFromCache( docid_t docid, std::map< docid_t, std::string >& cache ) + { + std::map< docid_t, std::string >::iterator ci = cache.find( docid ); + if( ci != cache.end() ) + return ci->second; + if( !m_idx ) + { + cerr << "no m_idx object!" << endl; + return ""; + } + + return m_idx->resolveDocumentID( docid ); + } + + fh_context + EAQuery_Heur::ResolveDocIDs( docNumSet_t& docnums, fh_context selection ) + { + selection->addAttribute( "filter", m_queryString, FXD_FFILTER, true ); + selection->addAttribute( "query", m_queryString, FXD_FFILTER, true ); + + fh_fwdeaidx fwd = m_idx->tryToCreateForwardEAIndexInterface(); + LG_EAIDX_D << "EAQuery_Heur::ResolveDocIDs() fwd:" << toVoid(fwd) << endl; + LG_EAIDX_D << "EAQuery_Heur::ResolveDocIDs() dn.sz:" << docnums.size() << endl; + + std::map< docid_t, std::string > cache; + m_idx->precacheDocIDs( docnums, cache ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + std::string earl = resolveDocumentIDAttemptFromCache( *iter, cache ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + + if( fwd ) fwd->addDocumentID( *iter ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + + if( fwd ) + { + if( SelectionContext* selc = dynamic_cast( GetImpl( selection ) )) + { + selc->setForwardEAIndexInterface( fwd ); + } + } + + // 1.3.1+: these are no longer removed during the query itself... + // you need to run compact() now. +// m_idx->queryFoundNonResolvableURLs( NonResolvables ); + +// cerr << "EAQuery.selection:" << selection->getURL() << endl; + + return selection; + } + + + + fh_context + EAQuery_Heur::ResolveDocIDs( docNumSet_t& docnums ) + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); +// cerr << "have selfactory" << endl; + fh_context selection = selfactory->createSubContext( "" ); +// cerr << "have sel" << endl; + + return ResolveDocIDs( docnums, selection ); + } + + stringset_t& + EAQuery_Heur::ResolveDocIDsToURLs( docNumSet_t& docnums, stringset_t& ret ) + { +// cerr << "EAQuery_Heur::ResolveDocIDsToURLs()" << endl; + + std::map< docid_t, std::string > cache; + m_idx->precacheDocIDs( docnums, cache ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + std::string earl = resolveDocumentIDAttemptFromCache( *iter, cache ); +// cerr << "earl:" << earl << endl; + ret.insert( earl ); + } + return ret; + } + + + fh_context + EAQuery_Heur::execute( fh_context selection, int limit ) + { + docNumSet_t docset; + return ResolveDocIDs( ExecuteQueryToDocIDs( docset, limit ), selection ); + } + + + fh_context + EAQuery_Heur::execute() + { + docNumSet_t docset; + return ResolveDocIDs( ExecuteQueryToDocIDs( docset )); + } + + void + EAQuery_Heur::OnAsyncXMLMessage( fh_xstreamcol h ) + { + + stringmap_t& m = h->getStringMap(); + LG_EAIDX_D << "EAQuery_Heur::OnAsyncXMLMessage() m.sz:" << m.size() << endl; + for( stringmap_t::iterator mi = m.begin(); mi != m.end(); ++mi ) + { + LG_EAIDX_D << "EAQuery_Heur::OnAsyncXMLMessage() k:" << mi->first << " v:" << mi->second << endl; + } + + if( m.end() != m.find("count") ) + { + LG_EAIDX_D << "result count:" << m["count"] << endl; + } + else if( m.end() != m.find("docids") ) + { + stringlist_t sl = Util::parseCommaSeperatedList( m["docids"] ); + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + string docid = *si; + + LG_EAIDX_D << "docid:" << docid << endl; + if( m_asyncFWD ) + m_asyncFWD->addDocumentID( toint(docid) ); + } + } + else if( m.end() != m.find("earl") ) + { + LG_EAIDX_D << "have earl!" << endl; + string earl = m["earl"]; + LG_EAIDX_D << earl << endl; + + + try + { + string earl = m["earl"]; + string docid = m["docid"]; + + fh_context ctx = Resolve( earl ); + m_asyncSelection->createSubContext( "", ctx ); + LG_EAIDX_D << "added earl:" << earl << endl; + } + catch( exception& e ) + { + LG_EAIDX_W << "ERROR:" << e.what() << endl; + cerr << "ERROR:" << e.what() << endl; + } + } + else if( m.end() != m.find("outofband-error") ) + LG_EAIDX_W << "ERROR:" << m["outofband-error"] << endl; + else if( m.end() != m.find("outofband-starting") ) + LG_EAIDX_D << "starting..." << endl; + else + { + LG_EAIDX_W << "strange xml_msg_arrived()" << endl; + } + + } + + void + EAQuery_Heur::OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ) + { + LG_EAIDX_D << "OnChildComeplete() estatus:" << estatus << endl; + /* + * Make sure that all async IO calls have been accepted. + */ + Main::processAllPendingEvents(); +// m_asyncChildServ = 0; +// m_asyncXMLCol = 0; +// m_asyncRunner = 0; +// m_asyncSelection = 0; + } + + + fh_context + EAQuery_Heur::executeAsync( fh_context selection, int limit ) + { +// docNumSet_t docset; +// return ResolveDocIDs( ExecuteQueryToDocIDs( docset )); + + string query_string = m_queryString; + + + + fh_stringstream qss; + qss << "feaindexquery -P " << m_idx->getPath() << " --ferris-internal-async-message-slave " + << " --limit " << limit << " " + << query_string; + LG_EAIDX_D << "cmd:" << tostr(qss) << endl; + + m_asyncSelection = selection; + m_asyncFWD = m_idx->tryToCreateForwardEAIndexInterface(); + if( m_asyncFWD ) + { + if( SelectionContext* selc = dynamic_cast( GetImpl( selection ) )) + { + selc->setForwardEAIndexInterface( m_asyncFWD ); + } + } + + + m_asyncSlave = CreateFerrisSlaveProcess( "ea query", tostr(qss) ); + m_asyncSlave->getMessageArrivedSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncXMLMessage ) ); + m_asyncSlave->getChildCompleteSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncChildComeplete ) ); + fh_runner r = m_asyncSlave->getRunner(); + // This is needed or we might miss the last bit of output + r->setSpawnFlags( GSpawnFlags( r->getSpawnFlags() & ~(G_SPAWN_DO_NOT_REAP_CHILD))); + r->Run(); + + + +// m_asyncRunner = new Runner(); +// m_asyncRunner->setCommandLine( tostr(qss) ); +// m_asyncRunner->setSpawnFlags( +// GSpawnFlags( +// G_SPAWN_SEARCH_PATH | +// G_SPAWN_STDERR_TO_DEV_NULL | +// G_SPAWN_DO_NOT_REAP_CHILD )); + +// m_asyncXMLCol = ::Ferris::Factory::MakeXMLStreamCol(); +// m_asyncXMLCol->getMessageArrivedSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncXMLMessage ) ); +// m_asyncXMLCol->attach(m_asyncRunner); + +// m_asyncChildServ = new ChildStreamServer(); +// m_asyncChildServ->addChild(m_asyncRunner); +// m_asyncChildServ->getChildCompleteSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncChildComeplete ) ); + +// m_asyncRunner->Run(); + +// fh_context selfactory = Resolve( "selectionfactory://" ); +// fh_context selection = selfactory->createSubContext( "" ); + + LG_EAIDX_D << "EAQuery_Heur::executeAsync() returning" << endl; +// Main::mainLoop(); + + return m_asyncSelection; + } + + void + EAQuery_Heur::getQuerySQL( std::stringstream& SQLHeaderSS, + std::stringstream& SQLWherePredicatesSS, + std::stringstream& SQLTailerSS, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + string& DocIDColumn, + stringset_t& eanamesUsed, + MetaEAIndexerInterface::BuildQuerySQLTermInfo_t& termInfo ) + { + LG_EAIDX_D << "EAQuery_Heur::getQuerySQL()" << endl; + + docNumSet_t docset; + string query_string = m_queryString; + + if( m_queryString.empty() ) + { + return; + } + LG_EAIDX_D << "EAQuery_Heur::getQuerySQL() query:" << query_string << endl; + + fh_context q = Ferris::Factory::MakeFilter( query_string ); + if( q->getSubContextNames().empty() ) + { + fh_stringstream ss; + ss << "Invalid query given:" << query_string << endl + << "Can not find toplevel operation of query" + << endl; + Throw_EAIndexException( tostr(ss), 0 ); + } + fh_context root_of_q = q->getSubContext( *(q->getSubContextNames().begin()) ); + + m_idx->BuildQuerySQL( root_of_q, docset, this, + SQLHeaderSS, + SQLWherePredicatesSS, + SQLTailerSS, + lookupTablesUsed, + queryHasTimeRestriction, + DocIDColumn, + eanamesUsed, + termInfo ); + + return; + } + + + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_context ExecuteQuery( const std::string& qs, fh_idx idx ) + { + fh_eaquery q = Factory::makeEAQuery( qs, idx ); + return q->execute(); + } + + fh_context ExecuteQueryAsync( const std::string& qs, fh_idx idx ) + { + return ExecuteQueryAsync( qs, 0, idx ); + } + + fh_context ExecuteQueryAsync( const std::string& qs, int limit, fh_idx idx ) + { + return ExecuteQueryAsync( qs, idx, 0, limit ); + } + fh_context ExecuteQueryAsync( const std::string& qs, fh_idx idx, + fh_context selectionCtx, + int limit ) + { + fh_eaquery q = Factory::makeEAQuery( qs, idx ); +// // FIXME: leak! +// q->AddRef(); + LG_EAIDX_D << "ExecuteQueryAsync() executing query:" << qs << endl; + if( !isBound( selectionCtx ) ) + { + fh_context selfactory = Resolve( "selectionfactory://" ); + selectionCtx = selfactory->createSubContext( "" ); + } + fh_context ret = q->executeAsync( selectionCtx, limit ); + ret->addHandlableToBeReleasedWithContext( GetImpl(q) ); + return ret; + } + + fh_context ExecuteQuery( const std::string& qs, int limit ) + { + fh_eaquery q = Factory::makeEAQuery( qs, 0 ); + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selectionCtx = selfactory->createSubContext( "" ); + return q->execute( selectionCtx, limit ); + } + + fh_context ExecuteQuery( const std::string& qs, int limit, long& totalNumberOfMatches ) + { + totalNumberOfMatches = 0; + + fh_eaquery q = Factory::makeEAQuery( qs, 0 ); + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selectionCtx = selfactory->createSubContext( "" ); + q->execute( selectionCtx, limit ); + + docNumSet_t docset; + q->ExecuteQueryToDocIDs( docset ); + totalNumberOfMatches = docset.size(); + if( totalNumberOfMatches > limit ) + { + docNumSet_t::iterator iter = docset.begin(); + advance( iter, limit ); + docset.erase( iter, docset.end() ); + } + fh_context c = q->ResolveDocIDs( docset ); + return c; + } + + fh_context ExecuteQuery( const std::string& qs, int limit, bool& morePossible ) + { + morePossible = false; + limit++; + + fh_eaquery q = Factory::makeEAQuery( qs, 0 ); + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selectionCtx = selfactory->createSubContext( "" ); + q->execute( selectionCtx, limit ); + + docNumSet_t docset; + q->ExecuteQueryToDocIDs( docset ); + if( docset.size() >= limit ) + { + morePossible = true; + + docNumSet_t::iterator iter = docset.begin(); + advance( iter, limit ); + docset.erase( iter, docset.end() ); + } + fh_context c = q->ResolveDocIDs( docset ); + return c; + } + + fh_context ExecuteQuery( const std::string& qs, fh_idx idx, + fh_context selectionCtx, int limit ) + { + fh_eaquery q = Factory::makeEAQuery( qs, idx ); + return q->execute( selectionCtx, limit ); + } + + docNumSet_t& ExecuteQueryToDocIDs( const std::string& qs, + fh_idx idx, + docNumSet_t& ret, + int limit ) + { + fh_eaquery q = Factory::makeEAQuery( qs, idx ); + q->ExecuteQueryToDocIDs( ret, limit ); + return ret; + } + + stringset_t& ExecuteQueryToToURLs( const std::string& qs, + fh_idx idx, + stringset_t& ret, + int limit ) + { + docNumSet_t docs; + fh_eaquery q = Factory::makeEAQuery( qs, idx ); + q->ExecuteQueryToDocIDs( docs, limit ); + q->ResolveDocIDsToURLs( docs, ret ); + return ret; + } + + + + namespace Factory + { + /** + * Used for more advanced queries than ExecuteQuery() can provide. + * first call here to create a Query object and then you can setup + * the details of the query and other tweaks that are set to default + * values if ExecuteQuery() is used. + */ + fh_eaquery makeEAQuery( const std::string& qs, fh_idx idx ) + { + if( !isBound( idx ) ) + idx = Factory::getDefaultEAIndex(); + + fh_eaquery ret = new EAQuery_Heur( qs, idx ); + + ret->setIndex( idx ); + ret->setQuery( qs ); + + return ret; + } + }; + + + + }; +}; + + diff --git a/Ferris/EAQuery.hh b/Ferris/EAQuery.hh new file mode 100644 index 0000000..538f7a9 --- /dev/null +++ b/Ferris/EAQuery.hh @@ -0,0 +1,241 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAQuery.hh,v 1.8 2011/05/03 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAQUERY_H_ +#define _ALREADY_INCLUDED_FERRIS_EAQUERY_H_ + +#include +#include +#include +#include + +#include + +namespace Ferris +{ + namespace EAIndex + { + using namespace ::Ferris::FullTextIndex; + + FERRISEXP_API bool shouldRunEAQueryFilesystemAsync(); + FERRISEXP_API void shouldRunEAQueryFilesystemAsync( bool v ); + + + /** + * Execute the given query against either the given + * index or the default index if no index is given + */ + FERRISEXP_API fh_context ExecuteQuery( const std::string& qs, fh_idx idx = 0 ); + FERRISEXP_API fh_context ExecuteQuery( const std::string& qs, int limit ); + /** + * execute a query against the default ea index with the given limit + * placing the total number of possible matches into totalNumberOfMatches + * WARNING: This method has to execute the query to docids using no limit + * to find out how many total matches are possible. + */ + FERRISEXP_API fh_context ExecuteQuery( const std::string& qs, int limit, long& totalNumberOfMatches ); + + /** + * execute a query against the default ea index with the given limit + * placing true into morePossible if there are more matches in the index + * than limit allowed. + */ + FERRISEXP_API fh_context ExecuteQuery( const std::string& qs, int limit, bool& morePossible ); + + /** + * See ExecuteQuery( const std::string& qs, fh_idx idx = 0 ) for the function you want. + * This function allows you to pass in the selection context which will be the parent + * for all the context's matching the query. + * + * Using this function allows you to set custom policy on how to handle two + * subcontexts which have the same RDN but different URLs + */ + FERRISEXP_API fh_context ExecuteQuery( const std::string& qs, fh_idx idx, + fh_context selectionCtx, + int limit = 0 ); + + FERRISEXP_API docNumSet_t& ExecuteQueryToDocIDs( const std::string& qs, + fh_idx idx, + docNumSet_t& ret, + int limit = 0 ); + FERRISEXP_API stringset_t& ExecuteQueryToToURLs( const std::string& qs, + fh_idx idx, + stringset_t& ret, + int limit = 0 ); + + /** + * These are like ExecuteQuery but will spawn a subprocess to execute the query + * and will read the results from the subprocess in a GLib2 friendly way. + */ + FERRISEXP_API fh_context ExecuteQueryAsync( const std::string& qs, fh_idx idx = 0 ); + FERRISEXP_API fh_context ExecuteQueryAsync( const std::string& qs, int limit, fh_idx idx ); + FERRISEXP_API fh_context ExecuteQueryAsync( const std::string& qs, fh_idx idx, + fh_context selectionCtx, + int limit = 0 ); + + + namespace Factory + { + /** + * Used for more advanced queries than ExecuteQuery() can provide. + * first call here to create a Query object and then you can setup + * the details of the query and other tweaks that are set to default + * values if ExecuteQuery() is used. + */ + FERRISEXP_API fh_eaquery makeEAQuery( const std::string& qs, fh_idx idx = 0 ); + }; + + + class FERRISEXP_API EAQuery + : + public Handlable + { + typedef EAQuery _Self; + typedef Handlable _Base; + + protected: + + fh_idx m_idx; + int m_resultSetMaxSize; + std::string m_queryString; + + EAQuery( const std::string& s, fh_idx idx ); + + friend class EAIndexManagerDB4; + virtual docNumSet_t& + ExecuteQuery( fh_context q, docNumSet_t& docnums, fh_db4idx idx, int limit = 0 ) + {} + + virtual std::string resolveDocumentIDAttemptFromCache( docid_t docid, std::map< docid_t, std::string >& cache ); + + + public: + + virtual ~EAQuery(); + + /********************************************************************************/ + /********************************************************************************/ + /*** the following have effect for all query types ******************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * set the index to use for future executions + */ + void setIndex( fh_idx idx ); + + /** + * set the query string + */ + void setQuery( const std::string& s ); + + + /** + * Get the matching document numbers for the query + * @param ret set to insert docids into and use as return value + * @param qs query string + * @param idx index to use or the default for this user if null + */ + virtual docNumSet_t& ExecuteQueryToDocIDs( docNumSet_t& ret ) = 0; + + /** + * Same as ExecuteQueryToDocIDs( docNumSet_t& ret ) but allows + * a set maximum number of files to be returned. + */ + virtual docNumSet_t& ExecuteQueryToDocIDs( docNumSet_t& ret, int limit ) = 0; + + /** + * Resolve a set of documentIDs to a context containing all + * the fh_context's for those documents + */ + virtual fh_context ResolveDocIDs( docNumSet_t& s ) = 0; + + /** + * Convert a list of docids to the URL for each docid from the + * index. This is similar to ResolveDocIDs() but some URLs might + * not actually exist in the current filesystem and this call + * will not filter out those non existent URLs. + */ + virtual stringset_t& ResolveDocIDsToURLs( docNumSet_t& s, stringset_t& ret ) = 0; + + /** + * Allow the caller to pass in the selection context. + * This is a specialization of ResolveDocIDs( docNumSet_t& s ) + * to let the caller setup properties on the selection context + * (ie, the return value). This method was created to allow views + * to determine how to resolve the case where two files have the + * same name but different URLs. + */ + virtual fh_context ResolveDocIDs( docNumSet_t& s, fh_context selectionCtx ) = 0; + + /** + * run the query. The result is semantically equal to + * ResolveDocIDs( ExecuteQueryToDocIDs() ) + */ + virtual fh_context execute() = 0; + + /** + * Allow the caller to pass in the selection context. + * See ResolveDocIDs( docNumSet_t& s, fh_context selectionCtx ). + */ + virtual fh_context execute( fh_context selectionCtx, int limit = 0 ) = 0; + + + /** + * the same as execute(), but spawns a subprocess and works out the query + * results in a glib2 friendly way from the subproc executing the query + * itself. + */ + virtual fh_context executeAsync( fh_context selc, int limit ) = 0; + + + /** + * This calls BuildQuerySQL() to get at the raw SQL strings + * that an ffilter will use when run against an SQL database + * backend plugin. This method is mainly useful for FCA code. + */ + virtual void + getQuerySQL( std::stringstream& SQLHeaderSS, + std::stringstream& SQLWherePredicatesSS, + std::stringstream& SQLTailerSS, + stringset_t& lookupTablesUsed, + bool& queryHasTimeRestriction, + std::string& DocIDColumn, + stringset_t& eanamesUsed, + MetaEAIndexerInterface::BuildQuerySQLTermInfo_t& termInfo ); + + /** + * only take the top v documents from the ranked results + */ + void setResultSetMaxSize( int v ); + }; + + }; +}; +#endif diff --git a/Ferris/EAQueryContext.cpp b/Ferris/EAQueryContext.cpp new file mode 100644 index 0000000..d04d31c --- /dev/null +++ b/Ferris/EAQueryContext.cpp @@ -0,0 +1,429 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAQueryContext.cpp,v 1.6 2010/09/24 21:30:31 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris::EAIndex; + +namespace Ferris +{ + + void + EAQueryRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + void + EAQueryRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + // We have to setup the query engines. + fh_context child = 0; + + child = new FullTextQueryContext_FFilter( this, "filter", false ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-10", false, 10 ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-100", false, 100 ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-500", false, 500 ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-1000", false, 1000 ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-shortnames", true ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-shortnames-10", true, 10 ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_FFilter( this, "filter-shortnames-100", true, 100 ); + Insert( GetImpl(child), false, false ); + } + + } + + + EAQueryRootContext::EAQueryRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + EAQueryRootContext::~EAQueryRootContext() + { + } + + fh_context + EAQueryRootContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "eaquery:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + + void + EAQueryRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + class FERRISEXP_DLLLOCAL EAQueryRootContext_RootContextDropper + : + public RootContextDropper + { + public: + EAQueryRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("eaquery"); + RootContextFactory::Register( "eaquery", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new EAQueryRootContext();; + } + return c; + } + }; + static EAQueryRootContext_RootContextDropper ___EAQueryRootContext_static_init; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// class FERRISEXP_API ChainedViewContext_PathOverride +// : +// public ChainedViewContext +// { +// typedef Context _BaseNoDelegate; +// typedef ChainedViewContext _Base; +// typedef ChainedViewContext_PathOverride _Self; + +// protected: + +// public: + +// ChainedViewContext_PathOverride( const fh_context& parent, +// const fh_context& delegate, +// const std::string& rdn, +// bool setupEventConnections = true ) +// : +// _Base( parent, delegate, rdn, setupEventConnections ) +// { +// } +// virtual ~ChainedViewContext_PathOverride() +// { +// } + + +// std::string +// private_getStrAttr( const std::string& rdn, +// const std::string& def, +// bool getAllLines, +// bool throwEx ) +// { +// cerr << "CVC_PO private_getStrAttr() rdn:" << rdn << endl; + +// if( rdn == "name" || rdn == "path" || rdn == "url" ) +// return _BaseNoDelegate::private_getStrAttr( rdn, def, getAllLines, throwEx ); +// return Delegate->private_getStrAttr( rdn, def, getAllLines, throwEx ); +// } + + +// virtual std::string getDirName() const +// { +// return Attribute::getDirName(); +// } + +// virtual std::string getDirPath() throw (FerrisParentNotSetError) +// { +// return Context::getDirPath(); +// } + +// virtual std::string getURL() +// { +// cerr << "ChainedViewContext_PathOverride::getURL()" << endl; +// fh_stringstream ss; +// ss << getURLScheme() << "://" << getDirPath(); +// return tostr(ss); +// } +// public: + +// static void temp( Context* parent, fh_context c, string rdn ) +// { +// c->setContext( parent, rdn ); +// } + +// }; + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + EAQueryRunnerContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator( + SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + void + EAQueryRunnerContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + // + // Treat the attempt to view a context as the initiation of a query + // if the dir isn't already there then call performQuery() to make it + // Short cut loading each dir unless absolutely needed. + // + fh_context + EAQueryRunnerContext::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + if( priv_isSubContextBound( rdn ) ) + { + return _Base::priv_getSubContext( rdn ); + } + + if( rdn.empty() ) + { + fh_stringstream ss; + ss << "NoSuchSubContext no rdn given"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + +// cerr << "runner.priv_getsubctx()" << endl; + fh_context qc = performQuery( rdn ); + if( !isBound( qc ) ) + { + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } +// cerr << "runner.priv_getsubctx() rdn:" << rdn << " qc->rdn:" << qc->getDirName() << endl; + + FerrisInternal::reparentSelectionContext( this, qc, rdn ); + SelectionContext* selc = dynamic_cast( GetImpl(qc) ); + selc->setReportedRDN( rdn ); + Insert( GetImpl( qc ) ); + +// fh_context cc = new ChainedViewContext_PathOverride( this, qc, rdn ); +// cerr << "runner.priv_getsubctx() cc rdn:" << cc->getDirName() << " url:" << cc->getURL() << endl; +// Insert( GetImpl( cc ) ); +// cerr << "runner.priv_getsubctx() after insert()" << endl; +// dumpOutItems(); + + return qc; + } + catch( NoSuchSubContext& e ) + { + throw e; + } + catch( exception& e ) + { + string s = e.what(); + Throw_NoSuchSubContext( s, this ); + } + catch(...) + {} + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + EAQueryRunnerContext::EAQueryRunnerContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + EAQueryRunnerContext::~EAQueryRunnerContext() + { + } + + fh_context + EAQueryRunnerContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + string name = rdn; + if( name.empty() ) + { + fh_context child = md->getSubContext( "file" ); + name = getStrSubCtx( child, "name", "" ); + } +// cerr << "runner.createsubctx()" << endl; + fh_context ret = performQuery( name ); + + FerrisInternal::reparentSelectionContext( this, ret, rdn ); + SelectionContext* selc = dynamic_cast( GetImpl(ret) ); + selc->setReportedRDN( name ); + Insert( GetImpl( ret ) ); + return ret; + +// fh_context cc = new ChainedViewContext_PathOverride( this, ret, rdn ); +// Insert( GetImpl( cc ) ); +// return cc; + } + + void + EAQueryRunnerContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + FullTextQueryContext_FFilter::FullTextQueryContext_FFilter( + Context* parent, const std::string& rdn, + bool useShortedNames, + int limit ) + : + _Base( parent, rdn ), + m_useShortedNames( useShortedNames ), + m_limit( limit ) + { + createStateLessAttributes(); + } + + FullTextQueryContext_FFilter::~FullTextQueryContext_FFilter() + { + } + + void + FullTextQueryContext_FFilter::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + fh_context + FullTextQueryContext_FFilter::performQuery( const std::string& rdn ) + { + fh_context ret = 0; + LG_EAIDX_D << "EAQueryContext_FFilter::performQuery() rdn:" << rdn + << " m_useShortedNames:" << m_useShortedNames + << " m_limit:" << m_limit + << endl; + + if( m_useShortedNames ) + { + Ferris::EAIndex::fh_idx idx = Ferris::EAIndex::Factory::getDefaultEAIndex(); + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + if( SelectionContext* sc = dynamic_cast( GetImpl(selection ) ) ) + { + sc->setSelectionContextRDNConflictResolver( + get_SelectionContextRDNConflictResolver_MonsterName() ); + } + + if( shouldRunEAQueryFilesystemAsync() ) + { + ret = EAIndex::ExecuteQueryAsync( rdn, idx, selection, m_limit ); + } + else + { + ret = EAIndex::ExecuteQuery( rdn, idx, selection, m_limit ); + } + } + else + { + if( shouldRunEAQueryFilesystemAsync() ) + { + Ferris::EAIndex::fh_idx idx = Ferris::EAIndex::Factory::getDefaultEAIndex(); + ret = EAIndex::ExecuteQueryAsync( rdn, m_limit, idx ); + } + else + { + ret = EAIndex::ExecuteQuery( rdn, m_limit ); + } + } + + return ret; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; diff --git a/Ferris/EAQueryContext.hh b/Ferris/EAQueryContext.hh new file mode 100644 index 0000000..c187986 --- /dev/null +++ b/Ferris/EAQueryContext.hh @@ -0,0 +1,133 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAQueryContext.hh,v 1.3 2010/09/24 21:30:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAQUERY_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_EAQUERY_CONTEXT_H_ + +#include +#include + +namespace Ferris +{ + /** + * Root context for full text queries this is the context for + * eaquery:// + */ + class FERRISEXP_DLLLOCAL EAQueryRootContext + : + public StateLessEAHolder< EAQueryRootContext, FakeInternalContext > + { + typedef StateLessEAHolder< EAQueryRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + + public: + + EAQueryRootContext(); + virtual ~EAQueryRootContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + }; + + /** + * Provides assistance methods for accessing the EA index via a + * filesystem interface. + * + * A query can be triggered either through the + * create interface or by just attempting to get a subcontext + */ + class FERRISEXP_DLLLOCAL EAQueryRunnerContext + : + public StateLessEAHolder< EAQueryRunnerContext, FakeInternalContext > + { + typedef StateLessEAHolder< EAQueryRunnerContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + + public: + + EAQueryRunnerContext( Context* parent, const std::string& rdn ); + virtual ~EAQueryRunnerContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + + /** + * Subcontext classes should override this method and perform a + * fulltext query when this is called. + */ + virtual fh_context performQuery( const std::string& rdn ) = 0; + }; + + + /** + * Class to perform normal ffilter based queries. + * eaquery://filter/ + */ + class FERRISEXP_DLLLOCAL FullTextQueryContext_FFilter + : + public EAQueryRunnerContext + { + typedef EAQueryRunnerContext _Base; + + bool m_useShortedNames; + int m_limit; + + public: + + FullTextQueryContext_FFilter( Context* parent, const std::string& rdn, + bool useShortedNames = false, + int limit = 0 ); + virtual ~FullTextQueryContext_FFilter(); + void createStateLessAttributes( bool force = false ); + virtual fh_context performQuery( const std::string& rdn ); + + }; + + + +}; +#endif diff --git a/Ferris/Enamel.cpp b/Ferris/Enamel.cpp new file mode 100644 index 0000000..0a6f5e5 --- /dev/null +++ b/Ferris/Enamel.cpp @@ -0,0 +1,1089 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Enamel.cpp,v 1.48 2011/10/22 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + + +#include +// #ifdef HAVE_EDB +// /* +// * We need the raw interface here because we are logging the very baseline of +// * context functionality, thus we can not use contexts in loading/saving of +// * loggging metadata. +// */ +// #include +// #endif + +#include + + +using namespace std; + +namespace Ferris +{ + + + namespace Enamel + { + + Timber& get__t_l0em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l0a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l0er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l0w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l0n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l0i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l0d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L0, Timber::_SBufT::PRI_DEBUG); + return x; + } + + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l1em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l1a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l1er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l1w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l1n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l1i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l1d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L1, Timber::_SBufT::PRI_DEBUG); + return x; + } + + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l2em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l2a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l2er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l2w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l2n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l2i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l2d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L2, Timber::_SBufT::PRI_DEBUG); + return x; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l3em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l3a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l3er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l3w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l3n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l3i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l3d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L3, Timber::_SBufT::PRI_DEBUG); + return x; + } + + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l4em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l4a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l4er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l4w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l4n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l4i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l4d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L4, Timber::_SBufT::PRI_DEBUG); + return x; + } + + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l5em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l5a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l5er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l5w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l5n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l5i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l5d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L5, Timber::_SBufT::PRI_DEBUG); + return x; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l6em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l6a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l6er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l6w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l6n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l6i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l6d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L6, Timber::_SBufT::PRI_DEBUG); + return x; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + Timber& get__t_l7em() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_EMERG); + return x; + } + + Timber& get__t_l7a() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_ALERT); + return x; + } + + Timber& get__t_l7er() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_ERR); + return x; + } + + Timber& get__t_l7w() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_WARNING); + return x; + } + + + Timber& get__t_l7n() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_NOTICE); + return x; + } + + Timber& get__t_l7i() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_INFO); + return x; + } + + Timber& get__t_l7d() + { + static Timber x( "libferris.so", Timber::_SBufT::OPT_PID, Timber::_SBufT::FAC_L7, Timber::_SBufT::PRI_DEBUG); + return x; + } + + + + + }; + + namespace Logging + { + bool operator<( const realStreamsKey& k1, const realStreamsKey& k2 ) + { + if( k1.F == k2.F ) + return k1.S < k2.S; + return k1.F < k2.F; + } + + bool operator==( const realStreamsKey& k1, const realStreamsKey& k2 ) + { + return ( k1.F == k2.F && k1.S == k2.S ); + } + + string + LogStateBase::getName() + { + return "base"; + } + + state_t + LogStateBase::getDefaultState() + { + int edbstate = 0; + string strkey = getName(); + char* key = (char*)strkey.c_str(); + + string v = getEDBString( FDB_LOGGING, strkey, "" ); + if( v.length() ) + { + std::stringstream ss; + ss << v; + ss >> edbstate; + +// cerr << "LOGGING n:" << getName() << " state:" << edbstate << endl; + + return state_t(edbstate); + } + +// BackTrace(); +// cerr << "LOGGING n:" << getName() << " using default state" << endl; + + return state_t( + Timber::_SBufT::PRI_EMERG | + Timber::_SBufT::PRI_ALERT | + Timber::_SBufT::PRI_CRIT | + Timber::_SBufT::PRI_ERR | + 0 +// Timber::_SBufT::PRI_WARNING | +// Timber::_SBufT::PRI_NOTICE | +// Timber::_SBufT::PRI_INFO | +// Timber::_SBufT::PRI_DEBUG + ); + } + + + + + void + LogStateBase::setState( state_t v ) + { + m_state = v; + } + + LogStateBase::LogStateBase() + : + m_state( state_t( + Timber::_SBufT::PRI_EMERG | + Timber::_SBufT::PRI_ALERT | + Timber::_SBufT::PRI_CRIT | + Timber::_SBufT::PRI_ERR + )) + { + } + + LogStateBase::~LogStateBase() + { + } + + f_ostream& + LogStateBase::getNullStream() + { + static NullStream<> null_stream; + return null_stream; + } + + NullStream<>& + LogStateBase::getNullStreamWithType() + { + static NullStream<> null_stream; + return null_stream; + } + + + fh_ostream& + LogStateBase::getStream( Timber::Facility_t f, state_t d ) + { + string lfn = getEDBString( FDB_GENERAL, LOGGING_TO_FILENAME_KEY, "" ); + if( !lfn.empty() ) + { + static fh_fstream fs = fh_fstream( lfn, ios::out | ios::app ); + return fs; + } + + static fh_timber tim( "libferris.so", + Timber::_SBufT::OPT_PID, f, d ); + + tim << flush; + tim.setPriority( d ); + return tim; + + + + +// // cerr << "getStream() " << endl; +// // cerr << "getStream() f:" << f << " d:" << d << endl; + +// realStreamsKey key = realStreamsKey( f, d ); +// realStreams_t::iterator foundobj = realStreams.find( key ); + +// if( realStreams.end() == foundobj ) +// { +// // cerr << "getStream() NO KEY! f:" << f << " d:" << d << endl; + +// // fh_timber& tim = new Timber("libferris.so", +// // Timber::_SBufT::OPT_PID, +// // f, d); +// // realStreams[key] = tim; + +// fh_timber tim( "libferris.so", +// Timber::_SBufT::OPT_PID, +// f, d); + + +// // cerr << "About to write to tim...1" << endl; +// // tim << "test1" << endl; +// // cerr << "About to write to tim...2" << endl; +// // cerr << "About to write to tim...1" << endl; +// // tim << "test1.b" << endl; +// // cerr << "About to write to tim...2" << endl; +// // cerr << "About to write to tim...1" << endl; +// // tim << "test1.c" << endl; +// // cerr << "About to write to tim...2" << endl; + +// realStreams.insert( realStreams_t::value_type( key, tim )); +// //realStreams[key] = tim; + +// // cerr << "About to write to tim...3" << endl; +// // realStreams[key] << "test2" << endl; +// // cerr << "About to write to tim...4" << endl; +// // cerr << "About to write to tim...5" << endl; +// // tim << "test2.b" << endl; +// // cerr << "About to write to tim...6" << endl; + +// return realStreams[key]; +// } +// // cerr << "getStream() FOUND KEY1! f:" << f << " d:" << d << endl; + +// fh_timber& fht = foundobj->second; +// // cerr << "getStream() FOUND KEY2! fht:" << toVoid(fht) << endl; + +// // *GetImpl(fht) << "hello\n"; +// // cerr << "getStream() FOUND KEY3! f:" << f << " d:" << d << endl; + +// // cerr << "getStream() FOUND KEY1! object:" << toVoid(foundobj->second) << endl; + +// return fht; + } + + void + LogStateBase::clear() + { + m_state = state_t(0); + } + + void + LogStateBase::reset() + { + m_state = getDefaultState(); + } + + void + LogStateBase::unset( state_t s ) + { +// cerr << "unset() old:" << m_state << endl; + m_state = state_t( m_state ^ s ); +// cerr << "unset() new:" << m_state << endl; + } + + void + LogStateBase::add( state_t s ) + { + m_state = state_t( m_state | s ); + } + + void + LogStateBase::set( state_t s ) + { + m_state = state_t( s ); + } + + state_t& + LogStateBase::state() + { + return m_state; + } + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + +// typedef map< string, LogStateBase* > Loggers_t; +// Loggers_t Loggers; + + Loggers_t& getLoggers() + { + static Loggers_t c; + static bool virgin = true; + + if( virgin ) + { + virgin = false; + +// c.insert(make_pair(LG_STRF::Instance().getName(), &LG_STRF::Instance())); + c.insert(make_pair(LG_STRF::Instance().getName(), &LG_STRF::Instance())); + c.insert(make_pair(LG_ATTR::Instance().getName(), &LG_ATTR::Instance())); + c.insert(make_pair(LG_OVERMOUNT::Instance().getName(), &LG_OVERMOUNT::Instance())); + c.insert(make_pair(LG_SORT::Instance().getName(), &LG_SORT::Instance())); + c.insert(make_pair(LG_IMAGE::Instance().getName(), &LG_IMAGE::Instance())); + c.insert(make_pair(LG_PNGIMAGE::Instance().getName(), &LG_PNGIMAGE::Instance())); + c.insert(make_pair(LG_JASPERIMAGE::Instance().getName(), &LG_JASPERIMAGE::Instance())); + c.insert(make_pair(LG_JPEGIMAGE::Instance().getName(), &LG_JPEGIMAGE::Instance())); + c.insert(make_pair(LG_DJVUIMAGE::Instance().getName(), &LG_DJVUIMAGE::Instance())); + c.insert(make_pair(LG_GIMPIMAGE::Instance().getName(), &LG_GIMPIMAGE::Instance())); + c.insert(make_pair(LG_MAGIKIMAGE::Instance().getName(), &LG_MAGIKIMAGE::Instance())); + c.insert(make_pair(LG_IMLIB2IMAGE::Instance().getName(),&LG_IMLIB2IMAGE::Instance())); + c.insert(make_pair(LG_STRATTR::Instance().getName(), &LG_STRATTR::Instance())); + c.insert(make_pair(LG_BYTEATTR::Instance().getName(), &LG_BYTEATTR::Instance())); + c.insert(make_pair(LG_CTX::Instance().getName(), &LG_CTX::Instance())); + c.insert(make_pair(LG_VM::Instance().getName(), &LG_VM::Instance())); + c.insert(make_pair(LG_NATIVE::Instance().getName(), &LG_NATIVE::Instance())); + c.insert(make_pair(LG_FACTORY::Instance().getName(), &LG_FACTORY::Instance())); + c.insert(make_pair(LG_ID3::Instance().getName(), &LG_ID3::Instance())); + c.insert(make_pair(LG_MPG::Instance().getName(), &LG_MPG::Instance())); + c.insert(make_pair(LG_PLUGIN::Instance().getName(), &LG_PLUGIN::Instance())); + c.insert(make_pair(LG_FFILTER::Instance().getName(), &LG_FFILTER::Instance())); + c.insert(make_pair(LG_MBOX::Instance().getName(), &LG_MBOX::Instance())); + c.insert(make_pair(LG_EDB::Instance().getName(), &LG_EDB::Instance())); + c.insert(make_pair(LG_PATHS::Instance().getName(), &LG_PATHS::Instance())); + c.insert(make_pair(LG_PCCTS::Instance().getName(), &LG_PCCTS::Instance())); + c.insert(make_pair(LG_FILTERPARSE::Instance().getName(), &LG_FILTERPARSE::Instance())); + c.insert(make_pair(LG_XFS::Instance().getName(), &LG_XFS::Instance())); + c.insert(make_pair(LG_SOCKET::Instance().getName(), &LG_SOCKET::Instance())); + c.insert(make_pair(LG_SQLDB::Instance().getName(), &LG_SQLDB::Instance())); + c.insert(make_pair(LG_SQLPLUS::Instance().getName(), &LG_SQLPLUS::Instance())); + c.insert(make_pair(LG_DTL::Instance().getName(), &LG_DTL::Instance())); + c.insert(make_pair(LG_CURL::Instance().getName(), &LG_CURL::Instance())); + c.insert(make_pair(LG_GTKFERRIS::Instance().getName(), &LG_GTKFERRIS::Instance())); + c.insert(make_pair(LG_FERRISCREATE::Instance().getName(), &LG_FERRISCREATE::Instance())); + c.insert(make_pair(LG_CREATE::Instance().getName(), &LG_CREATE::Instance())); + c.insert(make_pair(LG_SCHEMA::Instance().getName(), &LG_SCHEMA::Instance())); + c.insert(make_pair(LG_EMBLEM::Instance().getName(), &LG_EMBLEM::Instance())); + c.insert(make_pair(LG_TIME::Instance().getName(), &LG_TIME::Instance())); + c.insert(make_pair(LG_COPY::Instance().getName(), &LG_COPY::Instance())); + c.insert(make_pair(LG_MOVE::Instance().getName(), &LG_MOVE::Instance())); + c.insert(make_pair(LG_RM::Instance().getName(), &LG_RM::Instance())); + c.insert(make_pair(LG_DVDREAD::Instance().getName(), &LG_DVDREAD::Instance())); + c.insert(make_pair(LG_IPCCTX::Instance().getName(), &LG_IPCCTX::Instance())); + c.insert(make_pair(LG_FCLIP::Instance().getName(), &LG_FCLIP::Instance())); + c.insert(make_pair(LG_DB4::Instance().getName(), &LG_DB4::Instance())); + c.insert(make_pair(LG_GDBM::Instance().getName(), &LG_GDBM::Instance())); + c.insert(make_pair(LG_TDB::Instance().getName(), &LG_TDB::Instance())); + c.insert(make_pair(LG_COMMONDB::Instance().getName(), &LG_COMMONDB::Instance())); + c.insert(make_pair(LG_EET::Instance().getName(), &LG_EET::Instance())); + c.insert(make_pair(LG_FNEWS::Instance().getName(), &LG_FNEWS::Instance())); + c.insert(make_pair(LG_JOURNAL::Instance().getName(), &LG_JOURNAL::Instance())); + c.insert(make_pair(LG_LDAP::Instance().getName(), &LG_LDAP::Instance())); + c.insert(make_pair(LG_EXCEPTIONS::Instance().getName(), &LG_EXCEPTIONS::Instance())); + c.insert(make_pair(LG_FTXLEXI::Instance().getName(), &LG_FTXLEXI::Instance())); + c.insert(make_pair(LG_IDX::Instance().getName(), &LG_IDX::Instance())); + c.insert(make_pair(LG_EAIDX::Instance().getName(), &LG_EAIDX::Instance())); + c.insert(make_pair(LG_IOSTREAM::Instance().getName(), &LG_IOSTREAM::Instance())); + c.insert(make_pair(LG_XML::Instance().getName(), &LG_XML::Instance())); + c.insert(make_pair(LG_DOM::Instance().getName(), &LG_DOM::Instance())); + c.insert(make_pair(LG_EXTFS::Instance().getName(), &LG_EXTFS::Instance())); + c.insert(make_pair(LG_RUNNER::Instance().getName(), &LG_RUNNER::Instance())); + c.insert(make_pair(LG_A52::Instance().getName(), &LG_A52::Instance())); + c.insert(make_pair(LG_MPEG2::Instance().getName(), &LG_MPEG2::Instance())); + c.insert(make_pair(LG_RDF::Instance().getName(), &LG_RDF::Instance())); + c.insert(make_pair(LG_EXIF::Instance().getName(), &LG_EXIF::Instance())); + c.insert(make_pair(LG_CTXREC::Instance().getName(), &LG_CTXREC::Instance())); + c.insert(make_pair(LG_RTIMEPARSE::Instance().getName(), &LG_RTIMEPARSE::Instance())); + c.insert(make_pair(LG_LIBEXTRACTOR::Instance().getName(), &LG_LIBEXTRACTOR::Instance())); + c.insert(make_pair(LG_GPHOTO::Instance().getName(), &LG_GPHOTO::Instance())); + c.insert(make_pair(LG_FCA::Instance().getName(), &LG_FCA::Instance())); + c.insert(make_pair(LG_EVO::Instance().getName(), &LG_EVO::Instance())); + c.insert(make_pair(LG_SAMBA::Instance().getName(), &LG_SAMBA::Instance())); + c.insert(make_pair(LG_PG::Instance().getName(), &LG_PG::Instance())); + c.insert(make_pair(LG_BIBTEX::Instance().getName(), &LG_BIBTEX::Instance())); + c.insert(make_pair(LG_KDE::Instance().getName(), &LG_KDE::Instance())); + c.insert(make_pair(LG_ANNODEX::Instance().getName(), &LG_ANNODEX::Instance())); + c.insert(make_pair(LG_ASTEXT::Instance().getName(), &LG_ASTEXT::Instance())); + c.insert(make_pair(LG_FILEACTIONS::Instance().getName(), &LG_FILEACTIONS::Instance())); + c.insert(make_pair(LG_EMACS::Instance().getName(), &LG_EMACS::Instance())); + c.insert(make_pair(LG_FIREFOX::Instance().getName(), &LG_FIREFOX::Instance())); + c.insert(make_pair(LG_ICONSRV::Instance().getName(), &LG_ICONSRV::Instance())); + c.insert(make_pair(LG_XINE::Instance().getName(), &LG_XINE::Instance())); + c.insert(make_pair(LG_OBBY::Instance().getName(), &LG_OBBY::Instance())); + c.insert(make_pair(LG_XSLTFS::Instance().getName(), &LG_XSLTFS::Instance())); + c.insert(make_pair(LG_RDFATTRCACHE::Instance().getName(), &LG_RDFATTRCACHE::Instance())); + c.insert(make_pair(LG_FFUSE::Instance().getName(), &LG_FFUSE::Instance())); + c.insert(make_pair(LG_BEAGLE::Instance().getName(), &LG_BEAGLE::Instance())); + c.insert(make_pair(LG_GLOB::Instance().getName(), &LG_GLOB::Instance())); + c.insert(make_pair(LG_AMAROK::Instance().getName(), &LG_AMAROK::Instance())); + c.insert(make_pair(LG_XMMS::Instance().getName(), &LG_XMMS::Instance())); + c.insert(make_pair(LG_PRIVATE::Instance().getName(), &LG_PRIVATE::Instance())); + c.insert(make_pair(LG_DBUS::Instance().getName(), &LG_DBUS::Instance())); + c.insert(make_pair(LG_XQILLA::Instance().getName(), &LG_XQILLA::Instance())); + c.insert(make_pair(LG_WEBPHOTO::Instance().getName(), &LG_WEBPHOTO::Instance())); + c.insert(make_pair(LG_FSPOT::Instance().getName(), &LG_FSPOT::Instance())); + c.insert(make_pair(LG_STRIGI::Instance().getName(), &LG_STRIGI::Instance())); + c.insert(make_pair(LG_MDSERV::Instance().getName(), &LG_MDSERV::Instance())); + c.insert(make_pair(LG_VOLMAN::Instance().getName(), &LG_VOLMAN::Instance())); + c.insert(make_pair(LG_HAL::Instance().getName(), &LG_HAL::Instance())); + c.insert(make_pair(LG_EGO::Instance().getName(), &LG_EGO::Instance())); + c.insert(make_pair(LG_BGPROC::Instance().getName(), &LG_BGPROC::Instance())); + c.insert(make_pair(LG_FLAC::Instance().getName(), &LG_FLAC::Instance())); + c.insert(make_pair(LG_OGGZ::Instance().getName(), &LG_OGGZ::Instance())); + c.insert(make_pair(LG_TAGLIB::Instance().getName(), &LG_TAGLIB::Instance())); + c.insert(make_pair(LG_FFIND::Instance().getName(), &LG_FFIND::Instance())); + c.insert(make_pair(LG_QTSQL::Instance().getName(), &LG_QTSQL::Instance())); + c.insert(make_pair(LG_SQLITE::Instance().getName(), &LG_SQLITE::Instance())); + c.insert(make_pair(LG_RECORDFILE::Instance().getName(), &LG_RECORDFILE::Instance())); + c.insert(make_pair(LG_GOOGLE::Instance().getName(), &LG_GOOGLE::Instance())); + c.insert(make_pair(LG_FACEBOOK::Instance().getName(), &LG_FACEBOOK::Instance())); + c.insert(make_pair(LG_VIMEO::Instance().getName(), &LG_VIMEO::Instance())); + c.insert(make_pair(LG_IDENTICA::Instance().getName(), &LG_IDENTICA::Instance())); + c.insert(make_pair(LG_QIO::Instance().getName(), &LG_QIO::Instance())); + c.insert(make_pair(LG_WEBSERVICE::Instance().getName(), &LG_WEBSERVICE::Instance())); + c.insert(make_pair(LG_GSTREAMER::Instance().getName(), &LG_GSTREAMER::Instance())); + c.insert(make_pair(LG_UPNP::Instance().getName(), &LG_UPNP::Instance())); + c.insert(make_pair(LG_USEROVERLAY::Instance().getName(), &LG_USEROVERLAY::Instance())); + c.insert(make_pair(LG_PLASMA::Instance().getName(), &LG_PLASMA::Instance())); + c.insert(make_pair(LG_SANE::Instance().getName(), &LG_SANE::Instance())); + c.insert(make_pair(LG_PRINTER::Instance().getName(), &LG_PRINTER::Instance())); + c.insert(make_pair(LG_PULSEAUDIO::Instance().getName(), &LG_PULSEAUDIO::Instance())); + c.insert(make_pair(LG_WIKI::Instance().getName(), &LG_WIKI::Instance())); + c.insert(make_pair(LG_SPIRITCONTEXT::Instance().getName(), &LG_SPIRITCONTEXT::Instance())); + c.insert(make_pair(LG_PASTEBIN::Instance().getName(), &LG_PASTEBIN::Instance())); + c.insert(make_pair(LG_LIBMEDIAINFO::Instance().getName(), &LG_LIBMEDIAINFO::Instance())); + c.insert(make_pair(LG_SUBTITLES::Instance().getName(), &LG_SUBTITLES::Instance())); + c.insert(make_pair(LG_FERRISQTGUI::Instance().getName(), &LG_FERRISQTGUI::Instance())); + } + return c; + } + +// namespace Private +// { +// class LoggCreator +// { +// public: +// LoggCreator() +// { +// cout << "LoggCreator: getting loggers" << endl; + +// Loggers_t& l = ::Logging::getLoggers(); +// } +// }; + +// static LoggCreator LoggCreatorObj; +// }; + + + + + const string DISABLE_ALL_LOGGING = "ferris-logging-off"; + template + class PopTableCollector : public basic_PopTableCollector + { + public: + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + const string key = opt->longName; + + if( key == DISABLE_ALL_LOGGING ) + { + for( Loggers_t::const_iterator iter = getLoggers().begin(); + iter != getLoggers().end(); + iter++ ) + { + iter->second->clear(); + } + return; + } + + string argstr(arg); + int argi; + +// cerr << "Logging::poptCallbackType() opt " << opt << endl; +// cerr << "Logging::poptCallbackType() name:" << opt->longName << endl; +// cerr << "Logging::poptCallbackType() arg:" << arg << endl; + + Loggers_t::const_iterator iter = getLoggers().find(key); + istringstream ss(argstr); + ss >> argi; + + if( iter != getLoggers().end() ) + { + iter->second->set( Timber::Priority_t(argi) ); + } + } + + + + struct ::poptOption* getTable( + const string& desc, + const list& names ) + { + int extraArgInfo = 0; + + if( !isTrue( + getEDBString( FDB_GENERAL, + SHOW_LOGGING_POPT_OPTIONS_BY_DEFAULT, "0" ))) + { + extraArgInfo |= POPT_ARGFLAG_DOC_HIDDEN; + } + + int extraTableLines = 5; + + allocTable( names.size() + extraTableLines ); + + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + setEntry( &table[i], DISABLE_ALL_LOGGING, 0, + POPT_ARG_NONE | extraArgInfo, 0, + "Disable all logging" ); + ++i; + + + for(list::const_iterator iter = names.begin(); + iter != names.end(); iter++, i++ ) + { + setEntry( &table[i], *iter, 0, + POPT_ARG_INT | extraArgInfo, 0, + desc, "255" ); + } + + clearEntry( &table[i] ); + return table; + } + + + }; + + + + struct ::poptOption* + getPopTable() + { + const char* Desc = "Bitmask of range 0-255 " + "to set if syslog is informed of debug"; + + Loggers_t& lg = getLoggers(); + list sl; + + for( Loggers_t::const_iterator iter = lg.begin(); + iter != lg.end(); + iter++ ) + { + sl.push_back( iter->first ); + } + + typedef Loki::SingletonHolder, + Loki::CreateUsingNew, Loki::NoDestroy > LoggPopt; + return LoggPopt::Instance().getTable( Desc, sl ); + } + + + + char const lg_strf_class_name[] = "ferris-logging-strf"; + char const lg_attr_class_name[] = "ferris-logging-attr"; + char const lg_overmount_class_name[] = "ferris-logging-overmount"; + char const lg_sort_class_name[] = "ferris-logging-sort"; + char const lg_image_class_name[] = "ferris-logging-image"; + char const lg_pngimage_class_name[] = "ferris-logging-pngimage"; + char const lg_jasperimage_class_name[] = "ferris-logging-jasperimage"; + char const lg_jpegimage_class_name[] = "ferris-logging-jpegimage"; + char const lg_djvuimage_class_name[] = "ferris-logging-djvuimage"; + char const lg_gimpimage_class_name[] = "ferris-logging-gimpimage"; + char const lg_magikimage_class_name[]= "ferris-logging-magickimage"; + char const lg_imlib2image_class_name[]= "ferris-logging-imlib2image"; + char const lg_strattr_class_name[] = "ferris-logging-strattr"; + char const lg_byteattr_class_name[] = "ferris-logging-byteattr"; + char const lg_ctx_class_name[] = "ferris-logging-ctx"; + char const lg_vm_class_name[] = "ferris-logging-vm"; + char const lg_native_class_name[] = "ferris-logging-native"; + char const lg_factory_class_name[] = "ferris-logging-factory"; + char const lg_id3_class_name[] = "ferris-logging-id3"; + char const lg_mpg_class_name[] = "ferris-logging-mpg"; + char const lg_plugin_class_name[] = "ferris-logging-plugin"; + char const lg_ffilter_class_name[] = "ferris-logging-ffilter"; + char const lg_mbox_class_name[] = "ferris-logging-mbox"; + char const lg_edb_class_name[] = "ferris-logging-edb"; + char const lg_paths_class_name[] = "ferris-logging-paths"; + char const lg_pccts_class_name[] = "ferris-logging-pccts"; + char const lg_filterparse_class_name[]="ferris-logging-filterparse"; + char const lg_xfs_class_name[] ="ferris-logging-xfs"; + char const lg_rdf_class_name[] ="ferris-logging-rdf"; + char const lg_exif_class_name[] ="ferris-logging-exif"; + char const lg_ctxrec_class_name[] ="ferris-logging-ctxrec"; + char const lg_rtimeparse_class_name[] ="ferris-logging-rtimeparse"; + char const lg_libextractor_class_name[] ="ferris-logging-libextractor"; + char const lg_gphoto_class_name[] ="ferris-logging-gphoto"; + char const lg_fca_class_name[] ="ferris-logging-fca"; + char const lg_evo_class_name[] ="ferris-logging-evo"; + char const lg_samba_class_name[] ="ferris-logging-samba"; + char const lg_pg_class_name[] ="ferris-logging-pg"; + char const lg_bibtex_class_name[] ="ferris-logging-bibtex"; + char const lg_kde_class_name[] ="ferris-logging-kde"; + char const lg_annodex_class_name[] ="ferris-logging-annodex"; + char const lg_obby_class_name[] ="ferris-logging-obby"; + char const lg_xsltfs_class_name[] ="ferris-logging-xsltfs"; + char const lg_rdfattrcache_class_name[] ="ferris-logging-rdfattrcache"; + char const lg_ffuse_class_name[] ="ferris-logging-ffuse"; + char const lg_beagle_class_name[] ="ferris-logging-beagle"; + char const lg_glob_class_name[] ="ferris-logging-glob"; + char const lg_amarok_class_name[] ="ferris-logging-amarok"; + char const lg_xmms_class_name[] ="ferris-logging-xmms"; + char const lg_private_class_name[] ="ferris-logging-private"; + char const lg_dbus_class_name[] ="ferris-logging-dbus"; + char const lg_xqilla_class_name[] ="ferris-logging-xqilla"; + char const lg_webphoto_class_name[] ="ferris-logging-webphoto"; + char const lg_fspot_class_name[] ="ferris-logging-fspot"; + char const lg_strigi_class_name[] ="ferris-logging-strigi"; + char const lg_mdserv_class_name[] ="ferris-logging-mdserv"; + char const lg_volman_class_name[] ="ferris-logging-volman"; + char const lg_hal_class_name[] ="ferris-logging-hal"; + char const lg_ego_class_name[] ="ferris-logging-ego"; + char const lg_bgproc_class_name[] ="ferris-logging-bgproc"; + char const lg_flac_class_name[] ="ferris-logging-flac"; + char const lg_oggz_class_name[] ="ferris-logging-oggz"; + char const lg_taglib_class_name[] ="ferris-logging-taglib"; + char const lg_ffind_class_name[] ="ferris-logging-ffind"; + char const lg_qtsql_class_name[] ="ferris-logging-qtsql"; + char const lg_sqlite_class_name[] ="ferris-logging-sqlite"; + char const lg_recordfile_class_name[] ="ferris-logging-recordfile"; + char const lg_google_class_name[] ="ferris-logging-google"; + char const lg_facebook_class_name[] ="ferris-logging-facebook"; + char const lg_vimeo_class_name[] ="ferris-logging-vimeo"; + char const lg_identica_class_name[] ="ferris-logging-identica"; + char const lg_qio_class_name[] ="ferris-logging-qio"; + char const lg_webservice_class_name[] ="ferris-logging-webservice"; + char const lg_gstreamer_class_name[] ="ferris-logging-gstreamer"; + char const lg_upnp_class_name[] ="ferris-logging-upnp"; + char const lg_useroverlay_class_name[] ="ferris-logging-useroverlay"; + char const lg_plasma_class_name[] ="ferris-logging-plasma"; + char const lg_sane_class_name[] ="ferris-logging-sane"; + char const lg_printer_class_name[] ="ferris-logging-printer"; + char const lg_pulseaudio_class_name[] ="ferris-logging-pulseaudio"; + char const lg_wiki_class_name[] ="ferris-logging-wiki"; + char const lg_spiritcontext_class_name[] ="ferris-logging-spiritcontext"; + char const lg_pastebin_class_name[] ="ferris-logging-pastebin"; + char const lg_libmediainfo_class_name[] ="ferris-logging-libmediainfo"; + char const lg_subtitles_class_name[] ="ferris-logging-subtitles"; + char const lg_ferrisqtgui_class_name[] ="ferris-logging-ferrisqtgui"; + char const lg_astext_class_name[] ="ferris-logging-astext"; + char const lg_fileactions_class_name[] ="ferris-logging-fileactions"; + char const lg_emacs_class_name[] ="ferris-logging-emacs"; + char const lg_firefox_class_name[] ="ferris-logging-firefox"; + char const lg_iconsrv_class_name[] ="ferris-logging-iconsrv"; + char const lg_xine_class_name[] ="ferris-logging-xine"; + char const lg_socket_class_name[] ="ferris-logging-socket"; + char const lg_sqldb_class_name[] ="ferris-logging-sqldb"; + char const lg_sqlplus_class_name[] ="ferris-logging-sqlplus"; + char const lg_dtl_class_name[] ="ferris-logging-dtl"; + char const lg_curl_class_name[] ="ferris-logging-curl"; + char const lg_gtkferris_class_name[] ="ferris-logging-gtkferris"; + char const lg_ferriscreate_class_name[] ="ferris-logging-ferriscreate"; + char const lg_create_class_name[] ="ferris-logging-create"; + char const lg_schema_class_name[] ="ferris-logging-schema"; + char const lg_emblem_class_name[] ="ferris-logging-emblem"; + char const lg_time_class_name[] ="ferris-logging-time"; + char const lg_copy_class_name[] ="ferris-logging-copy"; + char const lg_move_class_name[] ="ferris-logging-move"; + char const lg_rm_class_name[] ="ferris-logging-rm"; + char const lg_dvdread_class_name[] ="ferris-logging-dvdread"; + char const lg_ipcctx_class_name[] ="ferris-logging-ipcctx"; + char const lg_fclip_class_name[] ="ferris-logging-fclip"; + char const lg_db4_class_name[] ="ferris-logging-db4"; + char const lg_gdbm_class_name[] ="ferris-logging-gdbm"; + char const lg_tdb_class_name[] ="ferris-logging-tdb"; + char const lg_commondb_class_name[] ="ferris-logging-commondb"; + char const lg_eet_class_name[] ="ferris-logging-eet"; + char const lg_fnews_class_name[] ="ferris-logging-fnews"; + char const lg_journal_class_name[] ="ferris-logging-journal"; + char const lg_ldap_class_name[] ="ferris-logging-ldap"; + char const lg_exceptions_class_name[] ="ferris-logging-exceptions"; + char const lg_ftxlexi_class_name[] ="ferris-logging-fulltext-lexicon"; + char const lg_idx_class_name[] ="ferris-logging-index"; + char const lg_eaidx_class_name[] ="ferris-logging-ea-index"; + char const lg_iostream_class_name[] ="ferris-logging-iostream"; + char const lg_xml_class_name[] ="ferris-logging-xml"; + char const lg_dom_class_name[] ="ferris-logging-dom"; + char const lg_extfs_class_name[] ="ferris-logging-extfs"; + char const lg_runner_class_name[] ="ferris-logging-runner"; + char const lg_a52_class_name[] ="ferris-logging-a52"; + char const lg_mpeg2_class_name[] ="ferris-logging-mpeg2"; + + + + + + + + + + }; + +}; diff --git a/Ferris/Enamel.hh b/Ferris/Enamel.hh new file mode 100644 index 0000000..6d81f06 --- /dev/null +++ b/Ferris/Enamel.hh @@ -0,0 +1,2082 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Enamel.hh,v 1.52 2011/10/22 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +// +// libferris.so logging that uses the generic timber. +// +#ifndef _ALREADY_INCLUDED_ENAMEL_H_ +#define _ALREADY_INCLUDED_ENAMEL_H_ + +#include +#include + +#include + +#include + +namespace Ferris +{ + + +namespace Enamel +{ + FERRISEXP_API Timber& get__t_l0em(); + FERRISEXP_API Timber& get__t_l0a(); + FERRISEXP_API Timber& get__t_l0er(); + FERRISEXP_API Timber& get__t_l0w(); + FERRISEXP_API Timber& get__t_l0n(); + FERRISEXP_API Timber& get__t_l0i(); + FERRISEXP_API Timber& get__t_l0d(); + + FERRISEXP_API Timber& get__t_l1em(); + FERRISEXP_API Timber& get__t_l1a(); + FERRISEXP_API Timber& get__t_l1er(); + FERRISEXP_API Timber& get__t_l1w(); + FERRISEXP_API Timber& get__t_l1n(); + FERRISEXP_API Timber& get__t_l1i(); + FERRISEXP_API Timber& get__t_l1d(); + + FERRISEXP_API Timber& get__t_l2em(); + FERRISEXP_API Timber& get__t_l2a(); + FERRISEXP_API Timber& get__t_l2er(); + FERRISEXP_API Timber& get__t_l2w(); + FERRISEXP_API Timber& get__t_l2n(); + FERRISEXP_API Timber& get__t_l2i(); + FERRISEXP_API Timber& get__t_l2d(); + + FERRISEXP_API Timber& get__t_l3em(); + FERRISEXP_API Timber& get__t_l3a(); + FERRISEXP_API Timber& get__t_l3er(); + FERRISEXP_API Timber& get__t_l3w(); + FERRISEXP_API Timber& get__t_l3n(); + FERRISEXP_API Timber& get__t_l3i(); + FERRISEXP_API Timber& get__t_l3d(); + + FERRISEXP_API Timber& get__t_l4em(); + FERRISEXP_API Timber& get__t_l4a(); + FERRISEXP_API Timber& get__t_l4er(); + FERRISEXP_API Timber& get__t_l4w(); + FERRISEXP_API Timber& get__t_l4n(); + FERRISEXP_API Timber& get__t_l4i(); + FERRISEXP_API Timber& get__t_l4d(); + + FERRISEXP_API Timber& get__t_l5em(); + FERRISEXP_API Timber& get__t_l5a(); + FERRISEXP_API Timber& get__t_l5er(); + FERRISEXP_API Timber& get__t_l5w(); + FERRISEXP_API Timber& get__t_l5n(); + FERRISEXP_API Timber& get__t_l5i(); + FERRISEXP_API Timber& get__t_l5d(); + + FERRISEXP_API Timber& get__t_l6em(); + FERRISEXP_API Timber& get__t_l6a(); + FERRISEXP_API Timber& get__t_l6er(); + FERRISEXP_API Timber& get__t_l6w(); + FERRISEXP_API Timber& get__t_l6n(); + FERRISEXP_API Timber& get__t_l6i(); + FERRISEXP_API Timber& get__t_l6d(); + + FERRISEXP_API Timber& get__t_l7em(); + FERRISEXP_API Timber& get__t_l7a(); + FERRISEXP_API Timber& get__t_l7er(); + FERRISEXP_API Timber& get__t_l7w(); + FERRISEXP_API Timber& get__t_l7n(); + FERRISEXP_API Timber& get__t_l7i(); + FERRISEXP_API Timber& get__t_l7d(); + +}; + + +//#define LG_STATE "file:" << __FILE__ << " line:" << __LINE__ << " " +#define LG_STATE __FILE__ << ":" << __LINE__ << " " + +namespace Logging +{ + typedef Ferris::Timber::_SBufT::Priority_t state_t; + + FERRISEXP_API struct ::poptOption* getPopTable(); + + + + struct FERRISEXP_API realStreamsKey + { + Ferris::Timber::_SBufT::Facility_t F; + Ferris::Timber::_SBufT::Priority_t S; + + realStreamsKey( Ferris::Timber::_SBufT::Facility_t f, Ferris::Timber::_SBufT::Priority_t s ) + : + F(f), + S(s) + { + } + + friend bool operator<( const realStreamsKey& k1, const realStreamsKey& k2 ); + friend bool operator==( const realStreamsKey& k1, const realStreamsKey& k2 ); + }; + + + + class FERRISEXP_API LogStateBase + { + public: + + virtual std::string getName(); + + protected: + + state_t m_state; + virtual state_t getDefaultState(); + + void setState( state_t v ); + + + public: + + LogStateBase(); + virtual ~LogStateBase(); + + f_ostream& getNullStream(); + NullStream<>& getNullStreamWithType(); + + + typedef Timber::Facility_t Facility_t; + typedef std::map< realStreamsKey, fh_timber > realStreams_t; + realStreams_t realStreams; + + fh_ostream& getStream( Ferris::Timber::_SBufT::Facility_t f, state_t d ); + + void clear(); + void reset(); + void unset( state_t s ); + void add( state_t s ); + void set( state_t s ); + state_t& state(); + + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /* + * I need the return type to be determined as the most specialized type + * so that the NullStream template functions can be used and thus things + * are more efficient + */ + + namespace Private + { + template + inline NullStream<_CharT>& + ConvertToNullStreamStaticType(std::basic_ostream<_CharT, _Traits>& __os) + { + static NullStream<_CharT> x; + return x; + } + }; + +#define INLINE_SWITCH 1 +#ifdef INLINE_SWITCH + +#define LG_SWITCH( sing, neededState ) \ + if(sing.state() & neededState) \ + sing.getRealStream( neededState ) + +#define LG_SWITCH_VERBOSE( sing, neededState ) \ + std::cerr << "sing.state:" << sing.state() << " needed:" << neededState << endl; \ + if(sing.state() & neededState) \ + sing.getRealStream( neededState ) + + +#define LG_SWITCH_NODEBUG( sing, neededState ) \ + if( 0 ) sing.getNullStreamWithType() + +#define LOGGING_SWITCH_FUNCTION LG_SWITCH +//#define LOGGING_SWITCH_FUNCTION LG_SWITCH_NODEBUG + +#else + + template + inline fhl_ostream& + Switch( Singleton& sing, state_t neededState ) + { + static null_streambuf nullbuf; + static fhl_ostream ss( &nullbuf ); + static int msk = 0x111; + int useDebug = sing.state() & neededState; + + if( useDebug ^ msk ) + { + if( useDebug ) + { + fh_timber& timb = sing.getRealStream( neededState ); + + ss.rdbuf( timb.rdbuf() ); + ss.clear(); + } + else + { + ss.clear( ios_base::failbit ); +// return sing.getNullStream(); + } + } + + msk = useDebug; + return ss; + } +#define LOGGING_SWITCH_FUNCTION Ferris::Logging::Switch +#endif + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + template < Timber::Facility_t fac, char const * name > + class LogState : public LogStateBase + { + public: + + LogState() + { +// cerr << "LogState(1) state:" << state() << endl; +// cerr << "LogState(1) name :" << getName() << endl; + setState( getDefaultState() ); +// cerr << "LogState(2) state:" << state() << endl; + } + + inline fh_ostream& getRealStream( state_t d ) + { + return getStream( fac, d ); + } + + virtual std::string getName() + { +// std::string tmp = name; +// cerr << "getName() : " << tmp << endl; + return name; + } + + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + extern FERRISEXP_API char const lg_strf_class_name[]; +// extern FERRISEXP_API string lg_strf_class_name; + typedef LogState< Ferris::Timber::_SBufT::FAC_L6, lg_strf_class_name > lg_strf_class; + typedef Loki::SingletonHolder LG_STRF; + +#define LG_STRF(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_STRF::Instance(), x)< lg_attr_class; + typedef Loki::SingletonHolder LG_ATTR; + +#define LG_ATTR(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_ATTR::Instance(), x)< lg_overmount_class; + typedef Loki::SingletonHolder LG_OVERMOUNT; + +#define LG_OVERMOUNT(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_OVERMOUNT::Instance(), x)< lg_sort_class; + typedef Loki::SingletonHolder LG_SORT; + +#define LG_SORT(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SORT::Instance(), x)< lg_image_class; + typedef Loki::SingletonHolder LG_IMAGE; + +#define LG_IMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IMAGE::Instance(), x)< lg_pngimage_class; + typedef Loki::SingletonHolder LG_PNGIMAGE; + +#define LG_PNGIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PNGIMAGE::Instance(), x)< lg_jasperimage_class; + typedef Loki::SingletonHolder LG_JASPERIMAGE; + +#define LG_JASPERIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_JASPERIMAGE::Instance(), x)< lg_jpegimage_class; + typedef Loki::SingletonHolder LG_JPEGIMAGE; + +#define LG_JPEGIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_JPEGIMAGE::Instance(), x)< lg_djvuimage_class; + typedef Loki::SingletonHolder LG_DJVUIMAGE; + +#define LG_DJVUIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_DJVUIMAGE::Instance(), x)< lg_gimpimage_class; + typedef Loki::SingletonHolder LG_GIMPIMAGE; + +#define LG_GIMPIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GIMPIMAGE::Instance(), x)< lg_magikimage_class; + typedef Loki::SingletonHolder LG_MAGIKIMAGE; + +#define LG_MAGIKIMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MAGIKIMAGE::Instance(), x)< lg_imlib2image_class; + typedef Loki::SingletonHolder LG_IMLIB2IMAGE; + +#define LG_IMLIB2IMAGE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IMLIB2IMAGE::Instance(), x)< lg_strattr_class; + typedef Loki::SingletonHolder LG_STRATTR; + +#define LG_STRATTR(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_STRATTR::Instance(), x)< lg_byteattr_class; + typedef Loki::SingletonHolder LG_BYTEATTR; + +#define LG_BYTEATTR(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_BYTEATTR::Instance(), x)< lg_ctx_class; + typedef Loki::SingletonHolder LG_CTX; + +#define LG_CTX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_CTX::Instance(), x)< lg_vm_class; + typedef Loki::SingletonHolder LG_VM; + +#define LG_VM(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_VM::Instance(), x)< lg_native_class; + typedef Loki::SingletonHolder LG_NATIVE; + +#define LG_NATIVE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_NATIVE::Instance(), x)< lg_factory_class; + typedef Loki::SingletonHolder LG_FACTORY; + +#define LG_FACTORY(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FACTORY::Instance(), x)< lg_id3_class; + typedef Loki::SingletonHolder LG_ID3; + +#define LG_ID3(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_ID3::Instance(), x)< lg_mpg_class; + typedef Loki::SingletonHolder LG_MPG; + +#define LG_MPG(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MPG::Instance(), x)< lg_plugin_class; + typedef Loki::SingletonHolder LG_PLUGIN; + +#define LG_PLUGIN(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PLUGIN::Instance(), x)< lg_ffilter_class; + typedef Loki::SingletonHolder LG_FFILTER; + +#define LG_FFILTER(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FFILTER::Instance(), x)< lg_filterparse_class; + typedef Loki::SingletonHolder LG_FILTERPARSE; + +#define LG_FILTERPARSE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FILTERPARSE::Instance(), x)< lg_mbox_class; + typedef Loki::SingletonHolder LG_MBOX; + +#define LG_MBOX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MBOX::Instance(), x)< lg_edb_class; + typedef Loki::SingletonHolder LG_EDB; + +#define LG_EDB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EDB::Instance(), x)< lg_paths_class; + typedef Loki::SingletonHolder LG_PATHS; + +#define LG_PATHS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PATHS::Instance(), x)< lg_pccts_class; + typedef Loki::SingletonHolder LG_PCCTS; + +#define LG_PCCTS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PCCTS::Instance(), x)< lg_xfs_class; + typedef Loki::SingletonHolder LG_XFS; + +#define LG_XFS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_XFS::Instance(), x)< lg_socket_class; + typedef Loki::SingletonHolder LG_SOCKET; + +#define LG_SOCKET(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SOCKET::Instance(), x)< lg_iostream_class; + typedef Loki::SingletonHolder LG_IOSTREAM; + +#define LG_IOSTREAM(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IOSTREAM::Instance(), x)< lg_xml_class; + typedef Loki::SingletonHolder LG_XML; + +#define LG_XML(x) LOGGING_SWITCH_FUNCTION(::Ferris::Logging::LG_XML::Instance(), x)< lg_dom_class; + typedef Loki::SingletonHolder LG_DOM; + +#define LG_DOM(x) LOGGING_SWITCH_FUNCTION(::Ferris::Logging::LG_DOM::Instance(), x)< lg_extfs_class; + typedef Loki::SingletonHolder LG_EXTFS; + +#define LG_EXTFS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EXTFS::Instance(), x)< lg_runner_class; + typedef Loki::SingletonHolder LG_RUNNER; + +#define LG_RUNNER(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RUNNER::Instance(), x)< lg_a52_class; + typedef Loki::SingletonHolder LG_A52; + +#define LG_A52(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_A52::Instance(), x)< lg_mpeg2_class; + typedef Loki::SingletonHolder LG_MPEG2; + +#define LG_MPEG2(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MPEG2::Instance(), x)< lg_sqldb_class; + typedef Loki::SingletonHolder LG_SQLDB; + +#define LG_SQLDB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SQLDB::Instance(), x)< lg_sqlplus_class; + typedef Loki::SingletonHolder LG_SQLPLUS; + +#define LG_SQLPLUS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SQLPLUS::Instance(), x)< lg_dtl_class; + typedef Loki::SingletonHolder LG_DTL; + +#define LG_DTL(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_DTL::Instance(), x)< lg_curl_class; + typedef Loki::SingletonHolder LG_CURL; + +#define LG_CURL(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_CURL::Instance(), x)< lg_gtkferris_class; + typedef Loki::SingletonHolder LG_GTKFERRIS; + +#define LG_GTKFERRIS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GTKFERRIS::Instance(), x)< lg_ferriscreate_class; + typedef Loki::SingletonHolder LG_FERRISCREATE; + +#define LG_FERRISCREATE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FERRISCREATE::Instance(), x)< lg_time_class; + typedef Loki::SingletonHolder LG_TIME; + +#define LG_TIME(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_TIME::Instance(), x)< lg_copy_class; + typedef Loki::SingletonHolder LG_COPY; + +#define LG_COPY(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_COPY::Instance(), x)< lg_move_class; + typedef Loki::SingletonHolder LG_MOVE; + +#define LG_MOVE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MOVE::Instance(), x)< lg_rm_class; + typedef Loki::SingletonHolder LG_RM; + +#define LG_RM(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RM::Instance(), x)< lg_dvdread_class; + typedef Loki::SingletonHolder LG_DVDREAD; + +#define LG_DVDREAD(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_DVDREAD::Instance(), x)< lg_ipcctx_class; + typedef Loki::SingletonHolder LG_IPCCTX; + +#define LG_IPCCTX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IPCCTX::Instance(), x)< lg_fclip_class; + typedef Loki::SingletonHolder LG_FCLIP; + +#define LG_FCLIP(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FCLIP::Instance(), x)< lg_db4_class; + typedef Loki::SingletonHolder LG_DB4; + +#define LG_DB4(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_DB4::Instance(), x)< lg_gdbm_class; + typedef Loki::SingletonHolder LG_GDBM; + +#define LG_GDBM(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GDBM::Instance(), x)< lg_tdb_class; + typedef Loki::SingletonHolder LG_TDB; + +#define LG_TDB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_TDB::Instance(), x)< lg_commondb_class; + typedef Loki::SingletonHolder LG_COMMONDB; + +#define LG_COMMONDB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_COMMONDB::Instance(), x)< lg_eet_class; + typedef Loki::SingletonHolder LG_EET; + +#define LG_EET(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EET::Instance(), x)< lg_fnews_class; + typedef Loki::SingletonHolder LG_FNEWS; + +#define LG_FNEWS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FNEWS::Instance(), x)< lg_journal_class; + typedef Loki::SingletonHolder LG_JOURNAL; + +#define LG_JOURNAL(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_JOURNAL::Instance(), x)< lg_ldap_class; + typedef Loki::SingletonHolder LG_LDAP; + +#define LG_LDAP(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_LDAP::Instance(), x)< lg_exceptions_class; + typedef Loki::SingletonHolder LG_EXCEPTIONS; + +#define LG_EXCEPTIONS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EXCEPTIONS::Instance(), x)< lg_ftxlexi_class; + typedef Loki::SingletonHolder LG_FTXLEXI; + +#define LG_FTXLEXI(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FTXLEXI::Instance(), x)< lg_idx_class; + typedef Loki::SingletonHolder LG_IDX; + +#define LG_IDX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IDX::Instance(), x)< lg_eaidx_class; + typedef Loki::SingletonHolder LG_EAIDX; + +#define LG_EAIDX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EAIDX::Instance(), x)< lg_create_class; + typedef Loki::SingletonHolder LG_CREATE; + +#define LG_CREATE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_CREATE::Instance(), x)< lg_schema_class; + typedef Loki::SingletonHolder LG_SCHEMA; + +#define LG_SCHEMA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SCHEMA::Instance(), x)< lg_emblem_class; + typedef Loki::SingletonHolder LG_EMBLEM; + +#define LG_EMBLEM(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EMBLEM::Instance(), x)< lg_rdf_class; + typedef Loki::SingletonHolder LG_RDF; + +#define LG_RDF(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RDF::Instance(), x)< lg_exif_class; + typedef Loki::SingletonHolder LG_EXIF; + +#define LG_EXIF(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EXIF::Instance(), x)< lg_ctxrec_class; + typedef Loki::SingletonHolder LG_CTXREC; + +#define LG_CTXREC(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_CTXREC::Instance(), x)< lg_rtimeparse_class; + typedef Loki::SingletonHolder LG_RTIMEPARSE; + +#define LG_RTIMEPARSE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RTIMEPARSE::Instance(), x)< lg_libextractor_class; + typedef Loki::SingletonHolder LG_LIBEXTRACTOR; + +#define LG_LIBEXTRACTOR(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_LIBEXTRACTOR::Instance(), x)< lg_gphoto_class; + typedef Loki::SingletonHolder LG_GPHOTO; + +#define LG_GPHOTO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GPHOTO::Instance(), x)< lg_fca_class; + typedef Loki::SingletonHolder LG_FCA; + +#define LG_FCA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FCA::Instance(), x)< lg_evo_class; + typedef Loki::SingletonHolder LG_EVO; + +#define LG_EVO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EVO::Instance(), x)< lg_samba_class; + typedef Loki::SingletonHolder LG_SAMBA; + +#define LG_SAMBA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SAMBA::Instance(), x)< lg_pg_class; + typedef Loki::SingletonHolder LG_PG; + +#define LG_PG(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PG::Instance(), x)< lg_bibtex_class; + typedef Loki::SingletonHolder LG_BIBTEX; + +#define LG_BIBTEX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_BIBTEX::Instance(), x)< lg_kde_class; + typedef Loki::SingletonHolder LG_KDE; + +#define LG_KDE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_KDE::Instance(), x)< lg_annodex_class; + typedef Loki::SingletonHolder LG_ANNODEX; + +#define LG_ANNODEX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_ANNODEX::Instance(), x)< lg_astext_class; + typedef Loki::SingletonHolder LG_ASTEXT; + +#define LG_ASTEXT(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_ASTEXT::Instance(), x)< lg_fileactions_class; + typedef Loki::SingletonHolder LG_FILEACTIONS; + +#define LG_FILEACTIONS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FILEACTIONS::Instance(), x)< lg_emacs_class; + typedef Loki::SingletonHolder LG_EMACS; + +#define LG_EMACS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EMACS::Instance(), x)< lg_firefox_class; + typedef Loki::SingletonHolder LG_FIREFOX; + +#define LG_FIREFOX(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FIREFOX::Instance(), x)< lg_iconsrv_class; + typedef Loki::SingletonHolder LG_ICONSRV; + +#define LG_ICONSRV(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_ICONSRV::Instance(), x)< lg_xine_class; + typedef Loki::SingletonHolder LG_XINE; + +#define LG_XINE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_XINE::Instance(), x)< lg_obby_class; + typedef Loki::SingletonHolder LG_OBBY; + +#define LG_OBBY(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_OBBY::Instance(), x)< lg_xsltfs_class; + typedef Loki::SingletonHolder LG_XSLTFS; + +#define LG_XSLTFS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_XSLTFS::Instance(), x)< lg_rdfattrcache_class; + typedef Loki::SingletonHolder LG_RDFATTRCACHE; + +#define LG_RDFATTRCACHE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RDFATTRCACHE::Instance(), x)< lg_ffuse_class; + typedef Loki::SingletonHolder LG_FFUSE; + +#define LG_FFUSE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FFUSE::Instance(), x)< lg_beagle_class; + typedef Loki::SingletonHolder LG_BEAGLE; + +#define LG_BEAGLE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_BEAGLE::Instance(), x)< lg_glob_class; + typedef Loki::SingletonHolder LG_GLOB; + +#define LG_GLOB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GLOB::Instance(), x)< lg_amarok_class; + typedef Loki::SingletonHolder LG_AMAROK; + +#define LG_AMAROK(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_AMAROK::Instance(), x)< lg_xmms_class; + typedef Loki::SingletonHolder LG_XMMS; + +#define LG_XMMS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_XMMS::Instance(), x)< lg_private_class; + typedef Loki::SingletonHolder LG_PRIVATE; + +#define LG_PRIVATE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PRIVATE::Instance(), x)< lg_dbus_class; + typedef Loki::SingletonHolder LG_DBUS; + +#define LG_DBUS(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_DBUS::Instance(), x)< lg_xqilla_class; + typedef Loki::SingletonHolder LG_XQILLA; + +#define LG_XQILLA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_XQILLA::Instance(), x)< lg_webphoto_class; + typedef Loki::SingletonHolder LG_WEBPHOTO; + +#define LG_WEBPHOTO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_WEBPHOTO::Instance(), x)< lg_fspot_class; + typedef Loki::SingletonHolder LG_FSPOT; + +#define LG_FSPOT(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FSPOT::Instance(), x)< lg_strigi_class; + typedef Loki::SingletonHolder LG_STRIGI; + +#define LG_STRIGI(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_STRIGI::Instance(), x)< lg_mdserv_class; + typedef Loki::SingletonHolder LG_MDSERV; + +#define LG_MDSERV(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_MDSERV::Instance(), x)< lg_volman_class; + typedef Loki::SingletonHolder LG_VOLMAN; + +#define LG_VOLMAN(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_VOLMAN::Instance(), x)< lg_hal_class; + typedef Loki::SingletonHolder LG_HAL; + +#define LG_HAL(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_HAL::Instance(), x)< lg_ego_class; + typedef Loki::SingletonHolder LG_EGO; + +#define LG_EGO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_EGO::Instance(), x)< lg_bgproc_class; + typedef Loki::SingletonHolder LG_BGPROC; + +#define LG_BGPROC(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_BGPROC::Instance(), x)< lg_flac_class; + typedef Loki::SingletonHolder LG_FLAC; + +#define LG_FLAC(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FLAC::Instance(), x)< lg_oggz_class; + typedef Loki::SingletonHolder LG_OGGZ; + +#define LG_OGGZ(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_OGGZ::Instance(), x)< lg_taglib_class; + typedef Loki::SingletonHolder LG_TAGLIB; + +#define LG_TAGLIB(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_TAGLIB::Instance(), x)< lg_ffind_class; + typedef Loki::SingletonHolder LG_FFIND; + +#define LG_FFIND(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FFIND::Instance(), x)< lg_qtsql_class; + typedef Loki::SingletonHolder LG_QTSQL; + +#define LG_QTSQL(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_QTSQL::Instance(), x)< lg_sqlite_class; + typedef Loki::SingletonHolder LG_SQLITE; + +#define LG_SQLITE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SQLITE::Instance(), x)< lg_recordfile_class; + typedef Loki::SingletonHolder LG_RECORDFILE; + +#define LG_RECORDFILE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_RECORDFILE::Instance(), x)< lg_google_class; + typedef Loki::SingletonHolder LG_GOOGLE; + +#define LG_GOOGLE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GOOGLE::Instance(), x)< lg_facebook_class; + typedef Loki::SingletonHolder LG_FACEBOOK; + +#define LG_FACEBOOK(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FACEBOOK::Instance(), x)< lg_vimeo_class; + typedef Loki::SingletonHolder LG_VIMEO; + +#define LG_VIMEO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_VIMEO::Instance(), x)< lg_qio_class; + typedef Loki::SingletonHolder LG_QIO; + +#define LG_QIO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_QIO::Instance(), x)< lg_webservice_class; + typedef Loki::SingletonHolder LG_WEBSERVICE; + +#define LG_WEBSERVICE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_WEBSERVICE::Instance(), x)< lg_gstreamer_class; + typedef Loki::SingletonHolder LG_GSTREAMER; + +#define LG_GSTREAMER(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_GSTREAMER::Instance(), x)< lg_upnp_class; + typedef Loki::SingletonHolder LG_UPNP; + +#define LG_UPNP(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_UPNP::Instance(), x)< lg_useroverlay_class; + typedef Loki::SingletonHolder LG_USEROVERLAY; + +#define LG_USEROVERLAY(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_USEROVERLAY::Instance(), x)< lg_plasma_class; + typedef Loki::SingletonHolder LG_PLASMA; + +#define LG_PLASMA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PLASMA::Instance(), x)< lg_libmediainfo_class; + typedef Loki::SingletonHolder LG_LIBMEDIAINFO; + +#define LG_LIBMEDIAINFO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_LIBMEDIAINFO::Instance(), x)< lg_subtitles_class; + typedef Loki::SingletonHolder LG_SUBTITLES; + +#define LG_SUBTITLES(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SUBTITLES::Instance(), x)< lg_ferrisqtgui_class; + typedef Loki::SingletonHolder LG_FERRISQTGUI; + +#define LG_FERRISQTGUI(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_FERRISQTGUI::Instance(), x)< lg_sane_class; + typedef Loki::SingletonHolder LG_SANE; + +#define LG_SANE(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SANE::Instance(), x)< lg_printer_class; + typedef Loki::SingletonHolder LG_PRINTER; + +#define LG_PRINTER(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PRINTER::Instance(), x)< lg_pulseaudio_class; + typedef Loki::SingletonHolder LG_PULSEAUDIO; + +#define LG_PULSEAUDIO(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PULSEAUDIO::Instance(), x)< lg_wiki_class; + typedef Loki::SingletonHolder LG_WIKI; + +#define LG_WIKI(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_WIKI::Instance(), x)< lg_spiritcontext_class; + typedef Loki::SingletonHolder LG_SPIRITCONTEXT; + +#define LG_SPIRITCONTEXT(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_SPIRITCONTEXT::Instance(), x)< lg_pastebin_class; + typedef Loki::SingletonHolder LG_PASTEBIN; + +#define LG_PASTEBIN(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_PASTEBIN::Instance(), x)< lg_identica_class; + typedef Loki::SingletonHolder LG_IDENTICA; + +#define LG_IDENTICA(x) LOGGING_SWITCH_FUNCTION(Ferris::Logging::LG_IDENTICA::Instance(), x)<. + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Enamel_priv.hh,v 1.2 2010/09/24 21:30:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +namespace Ferris +{ + namespace Logging + { + typedef std::map< std::string, LogStateBase* > Loggers_t; + FERRISEXP_API Loggers_t& getLoggers(); + }; +}; + + + + diff --git a/Ferris/EtagereContext.cpp b/Ferris/EtagereContext.cpp new file mode 100644 index 0000000..ab3c403 --- /dev/null +++ b/Ferris/EtagereContext.cpp @@ -0,0 +1,663 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EtagereContext.cpp,v 1.7 2010/09/24 21:30:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +using namespace std; + +namespace Ferris +{ + + static const char* const emblem_XSD = + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; + static const char* const emblem_dir_XSD = + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; + + std::pair< fh_context, fh_emblem > + EmblemCommonCreator::SubCreate_emblem( fh_context c, fh_context md, bool isRoot ) + { + string rdn = getStrSubCtx( md, "name", "" ); + string iconpath = getStrSubCtx( md, "iconpath", "" ); + string description = getStrSubCtx( md, "description", "" ); + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "Attempt to create file with no name" << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + if( c->priv_isSubContextBound( rdn ) ) + { + fh_stringstream ss; + ss << "Attempt to create file that exists. rdn:" << rdn + << " at url:" << c->getURL() + << endl; + Throw_ContextExists( tostr(ss), GetImpl(c) ); + } + + LG_EMBLEM_D << "EmblemCommonCreator::SubCreate_emblem(1) c:" << c->getURL() + << " rdn:" << rdn + << " iconpath:" << iconpath + << " desc:" << description + << endl; + fh_etagere et = Factory::getEtagere(); + fh_emblem em = et->createColdEmblem( rdn ); + + em->setIconName( iconpath ); + em->setDescription( description ); + + c->bumpVersion(); + + if( isRoot ) + { + // OnChildAdded() will have been fired on the above createColdEmblem() + // so we only need to find it now for return + fh_context child = c->getSubContext( rdn ); + return make_pair( child, em ); + } + + LG_EMBLEM_D << "EmblemCommonCreator::SubCreate_emblem(2) c:" << c->getURL() << endl; + bool m_showFilesAsLeaves = false; + if( EmblemContext* c_downcast = dynamic_cast(GetImpl(c))) + m_showFilesAsLeaves = c_downcast->m_showFilesAsLeaves; + + EmblemContext* child = new EmblemContext( GetImpl(c), em, m_showFilesAsLeaves ); + c->Insert( child, false, false ); + LG_EMBLEM_D << "EmblemCommonCreator::SubCreate_emblem(3) c:" << c->getURL() << endl; + return make_pair( child, em ); + } + + void + EtagereRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator( SL_SubCreate_file, emblem_XSD ); + m["dir"] = SubContextCreator( SL_SubCreate_file, emblem_dir_XSD ); + } + + fh_context + EtagereRootContext::SubCreate_file( fh_context c, fh_context md ) + { + string rdn = getStrSubCtx( md, "name", "" ); + LG_EMBLEM_D << "EtagereRootContext::SubCreate_file(top) rdn:" << rdn << endl; + std::pair< fh_context, fh_emblem > p = SubCreate_emblem( c, md, true ); + + fh_etagere et = Factory::getEtagere(); + et->sync(); + + return p.first; + } + + void + EtagereRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_context child = 0; + fh_etagere et = Factory::getEtagere(); + emblems_t el = et->getAllEmblems(); + + for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + { + fh_emblem em = *ei; + LG_EMBLEM_D << "--- em:" << em->getName() << " parent.empty:" << em->getParents().empty() << endl; + +// // PURE DEBUG +// { +// emblems_t pl = em->getParents(); +// for( emblems_t::iterator pi = pl.begin(); pi != pl.end(); ++pi ) +// { +// fh_emblem p = *pi; +// LG_EMBLEM_D << "em:" << em->getName() << " p:" << p->getName() << endl; +// } +// } + + if( em->getParents().empty() ) + { + LG_EMBLEM_D << "adding em:" << em->getName() + << " UName:" << em->getUniqueName() + << " parent.empty:" << em->getParents().empty() + << endl; + child = new EmblemContext( this, em, m_showFilesAsLeaves ); + Insert( GetImpl(child), false, true ); + } + } + } + } + + + + EtagereRootContext::EtagereRootContext( bool m_showFilesAsLeaves ) + : + _Base( 0, "/" ), + m_showFilesAsLeaves( m_showFilesAsLeaves ) + { + createStateLessAttributes(); + + fh_etagere et = Factory::getEtagere(); + et->getAddedChild_Sig().connect( sigc::mem_fun( *this, &_Self::OnChildAdded ) ); + et->getRemovedChild_Sig().connect( sigc::mem_fun( *this, &_Self::OnChildRemoved ) ); + } + + EtagereRootContext::~EtagereRootContext() + { + } + + void + EtagereRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + bool + EtagereRootContext::supportsRemove() + { + return true; + } + + void + EtagereRootContext::priv_remove( fh_context c ) + { + fh_etagere et = Factory::getEtagere(); + + if( EmblemContext* ec = dynamic_cast( GetImpl(c) ) ) + { + // For an emblem to appear at the top level it has no parents + // so deletion means that we really want to purge the emblem itself. + if( !ec->m_em->getParents().empty() ) + { + fh_stringstream ss; + ss << "SHOULD NEVER HAPPEN. " + << "etagere has a direct child with parents url:" << c->getURL(); + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + + et->erase( ec->m_em ); + ec->m_em = 0; + et->sync(); + } + else + { + fh_stringstream ss; + ss << "SHOULD NEVER HAPPEN. " + << " etagere has a non emblem child! url:" << c->getURL(); + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + } + + std::string + EtagereRootContext::priv_getRecommendedEA() + { + return "name,description,latitude,longitude,zoom"; + } + + void + EtagereRootContext::OnChildAdded( fh_etagere et, fh_emblem em ) + { + if( !priv_isSubContextBound( em->getName() ) ) + { + fh_context child = new EmblemContext( this, em, m_showFilesAsLeaves ); + Insert( GetImpl(child), false, false ); + bumpVersion(); + } + } + + void + EtagereRootContext::OnChildRemoved( fh_etagere et, fh_emblem em ) + { + if( priv_isSubContextBound( em->getName() ) ) + { + Remove( em->getName() ); + bumpVersion(); + } + } + + + class FERRISEXP_DLLLOCAL EtagereRootContext_RootContextDropper + : + public RootContextDropper + { + public: + EtagereRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("etagere"); + RootContextFactory::Register( "etagere", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new EtagereRootContext(); + } + return c; + } + }; + static EtagereRootContext_RootContextDropper ___EtagereRootContext_static_init; + + + class FERRISEXP_DLLLOCAL EmblemQueryEtagereRootContext_RootContextDropper + : + public RootContextDropper + { + public: + EmblemQueryEtagereRootContext_RootContextDropper() + { + RootContextFactory::Register( "emblemquery", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new EtagereRootContext( true ); + } + return c; + } + }; + static EmblemQueryEtagereRootContext_RootContextDropper ___EQEtagereRootContext_static_init; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + EmblemContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator( SL_SubCreate_file, emblem_XSD ); + m["dir"] = SubContextCreator( SL_SubCreate_file, emblem_dir_XSD ); + } + + fh_context + EmblemContext::SubCreate_file( fh_context c, fh_context md ) + { + std::pair< fh_context, fh_emblem > p = SubCreate_emblem( c, md, false ); + link( m_em, p.second ); + + fh_etagere et = Factory::getEtagere(); + et->sync(); + + LG_EMBLEM_D << "EmblemContext::SubCreate_file() m_em:" << m_em->getID() << endl; + LG_EMBLEM_D << "EmblemContext::SubCreate_file() newem:" << p.second->getID() << endl; + LG_EMBLEM_D << "EmblemContext::SubCreate_file() new.parent.sz:" << p.second->getParents().size() << endl; + + return p.first; + } + + bool + EmblemContext::supportsRemove() + { + return true; + } + + void + EmblemContext::priv_remove( fh_context c ) + { + fh_etagere et = Factory::getEtagere(); + + if( EmblemContext* ec = dynamic_cast( GetImpl(c) ) ) + { + // break the emblem parent/child link + unlink( m_em, ec->m_em ); + et->sync(); + } + else + { + fh_stringstream ss; + ss << "SHOULD NEVER HAPPEN. " + << " emblem has a non emblem child! url:" << c->getURL(); + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + } + + + bool + EmblemContext::supportsRename() + { + return true; + } + + fh_context + EmblemContext::priv_rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems, + bool OverWriteDstIfExists ) + { +// string newPath = appendToPath( getURL(), newPathRelative, true ); + LG_CTX_D << "EmblemContext::priv_rename() called" << endl; + + fh_etagere et = Factory::getEtagere(); + + fh_context src = getSubContext( rdn ); + if( EmblemContext* srcc = dynamic_cast( GetImpl(src) ) ) + { + LG_CTX_D << "EmblemContext::priv_rename() srcc:" << src->getURL() << endl; + LG_CTX_D << "EmblemContext::priv_rename() newPath:" << newPath << endl; + fh_context dst = 0; + try + { + string ppath = newPath.substr( 0, newPath.rfind('/') ); + LG_CTX_D << "EmblemContext::priv_rename() ppath:" << ppath << endl; +// LG_CTX_D << "EmblemContext::priv_rename() newPathRelative:" << newPathRelative << endl; + dst = Resolve( newPath, RESOLVE_PARENT ); + } + catch( exception& e ) + { + LG_CTX_D << "EmblemContext::priv_rename() e:" << e.what() << endl; + throw; + } + + LG_CTX_D << "EmblemContext::priv_rename() dst:" << dst->getURL() << endl; + + if( EmblemContext* dstc = dynamic_cast( GetImpl(dst) ) ) + { + LG_CTX_D << "EmblemContext::priv_rename() dstc:" << dstc->getURL() << endl; + // unlink us and the old rdn + unlink( m_em, srcc->m_em ); + + // link the old rdn to its new parent. + link( dstc->m_em, srcc->m_em ); + et->sync(); + + return src; + } + } + + /* failed */ + fh_stringstream ss; + ss << "Rename attempt failed. URL:" << getURL() << " src:" << rdn << " dst:" << newPath; + Throw_RenameFailed( tostr(ss), this ); + + } + + std::string + EmblemContext::priv_getRecommendedEA() + { + return "name,description,latitude,longitude,zoom"; + } + + + void + EmblemContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + +// LG_EMBLEM_D << "priv_read(top)" +// << " url:" << getURL() +// << endl; + + if( empty() ) + { + emblems_t el = m_em->getChildren(); + LG_EMBLEM_D << "priv_read()" + << " url:" << getURL() + << " child.sz:" << el.size() + << " m_showFilesAsLeaves:" << m_showFilesAsLeaves + << endl; + + for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + { + fh_emblem em = *ei; + + fh_context child = new EmblemContext( this, em, m_showFilesAsLeaves ); + Insert( GetImpl(child), false ); + } + + if( el.empty() && m_showFilesAsLeaves ) + { + fh_stringstream qss; + + emblems_t upset = m_em->getUpset(); + for( emblems_t::iterator ei = upset.begin(); ei != upset.end(); ++ei ) + { + qss << "(" << "emblem:has-" << (*ei)->getName() << "==1)"; + } + + LG_EMBLEM_D << "query for files with the emblem is:" << tostr(qss) << endl; + + EAIndex::fh_eaquery eq = EAIndex::Factory::makeEAQuery( tostr( qss ) ); + fh_context c = eq->execute(); + + for( Context::iterator ci = c->begin(); ci != c->end(); ++ci ) + { + Insert( GetImpl(*ci), false ); + } + } + } + } + + EmblemContext::EmblemContext( Context* parent, fh_emblem em, bool m_showFilesAsLeaves ) + : + _Base( parent, em->getName() ), + m_em( em ), + m_showFilesAsLeaves( m_showFilesAsLeaves ) + { + setContext( parent, monsterName( em->getName() )); + createStateLessAttributes(); + m_em->getAddedChild_Sig().connect( sigc::mem_fun( *this, &_Self::OnChildAdded ) ); + } + + EmblemContext::~EmblemContext() + { + } + + fh_istream + EmblemContext::SL_getFSID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "10ea3380-83fe-4e12-a671-d2067a10fd76"; + return ss; + } + + fh_istream + EmblemContext::SL_getDescription( EmblemContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_em->getDescription(); + return ss; + } + + fh_stringstream + EmblemContext::SL_getDigitalLatitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_em->getDigitalLatitude(); + return ss; + } + + void + EmblemContext::sync() + { + cerr << "EmblemContext::sync()" << endl; + fh_etagere et = Factory::getEtagere(); + et->sync(); + } + + bool isDouble( string s ) + { + if( s.empty() ) + return 0; + return 1; + } + + + void + EmblemContext::SL_updateDigitalLatitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string s = StreamToString( ss ); + if( isDouble( s ) ) + { +// cerr << "EmblemContext::SL_updateDigitalLatitude() em:" << c->m_em->getName() +// << " s:" << s +// << " double:" << toType(s) +// << endl; + c->m_em->setDigitalLatitude( toType(s) ); + c->sync(); + } + } + + + fh_stringstream + EmblemContext::SL_getDigitalLongitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_em->getDigitalLongitude(); + return ss; + } + + void + EmblemContext::SL_updateDigitalLongitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string s = StreamToString( ss ); + if( isDouble( s ) ) + { + c->m_em->setDigitalLongitude( toType(s) ); + c->sync(); + } + } + + fh_stringstream + EmblemContext::SL_getZoomRange( EmblemContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_em->getZoomRange(); + return ss; + } + + void + EmblemContext::SL_updateZoomRange( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string s = StreamToString( ss ); + if( isDouble( s ) ) + { + c->m_em->setZoomRange( toType(s) ); + c->sync(); + } + } + + void + EmblemContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + tryAddStateLessAttribute( "fs-id", _Self::SL_getFSID, FXD_BINARY ); + tryAddStateLessAttribute( "description", _Self::SL_getDescription, XSD_BASIC_STRING ); + tryAddStateLessAttribute( "latitude", + _Self::SL_getDigitalLatitude, + _Self::SL_getDigitalLatitude, + _Self::SL_updateDigitalLatitude, + XSD_BASIC_DOUBLE ); + tryAddStateLessAttribute( "longitude", + _Self::SL_getDigitalLongitude, + _Self::SL_getDigitalLongitude, + _Self::SL_updateDigitalLongitude, + XSD_BASIC_DOUBLE ); + tryAddStateLessAttribute( "zoom", + _Self::SL_getZoomRange, + _Self::SL_getZoomRange, + _Self::SL_updateZoomRange, + XSD_BASIC_DOUBLE ); + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + void + EmblemContext::OnChildAdded( fh_emblem em, fh_emblem child ) + { + if( em != m_em ) + return; + + if( !priv_isSubContextBound( child->getName() ) ) + { + LG_EMBLEM_D << "OnChildAdded(ec) this:" << getURL() + << " child:" << child->getName() + << endl; + + // We might not be user referenced here, so make sure + // that we don't trigger the memory management. +// ValueBumpDrop bdobj( ref_count ); + + EmblemContext* n = new EmblemContext( this, child, m_showFilesAsLeaves ); + Insert( n, false, false ); + bumpVersion(); + } + } + + void + EmblemContext::OnChildRemoved( fh_emblem em, fh_emblem child ) + { + if( priv_isSubContextBound( child->getName() ) ) + { + Remove( child->getName() ); + bumpVersion(); + } + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +}; diff --git a/Ferris/EtagereContext_private.hh b/Ferris/EtagereContext_private.hh new file mode 100644 index 0000000..4ed610e --- /dev/null +++ b/Ferris/EtagereContext_private.hh @@ -0,0 +1,140 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EtagereContext_private.hh,v 1.3 2010/09/24 21:30:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ETAGERE_CONTEXT_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_ETAGERE_CONTEXT_PRIVH_ + +#include +#include +#include + +namespace Ferris +{ + class FERRISEXP_DLLLOCAL EmblemCommonCreator + { + protected: + std::pair< fh_context, fh_emblem > SubCreate_emblem( fh_context c, fh_context md, bool isRoot ); + }; + + /** + * Root context for emblem partial order, + * this is the context for etagere:// + */ + class FERRISEXP_DLLLOCAL EtagereRootContext + : + public StateLessEAHolder< EtagereRootContext, FakeInternalContext >, + public EmblemCommonCreator + { + typedef EtagereRootContext _Self; + typedef StateLessEAHolder< EtagereRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + bool m_showFilesAsLeaves; + + protected: + + virtual void priv_read(); + virtual fh_context SubCreate_file( fh_context c, fh_context md ); + virtual bool supportsRemove(); + virtual void priv_remove( fh_context c ); + virtual std::string priv_getRecommendedEA(); + + public: + + EtagereRootContext( bool m_showFilesAsLeaves = false ); + virtual ~EtagereRootContext(); + + void createStateLessAttributes( bool force = false ); + + void OnChildAdded( fh_etagere, fh_emblem ); + void OnChildRemoved( fh_etagere, fh_emblem ); + + }; + + /** + */ + class FERRISEXP_DLLLOCAL EmblemContext + : + public StateLessEAHolder< EmblemContext, FakeInternalContext >, + public EmblemCommonCreator + { + friend class EtagereRootContext; + friend class EmblemCommonCreator; + + typedef EmblemContext _Self; + typedef StateLessEAHolder< EmblemContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + fh_emblem m_em; + bool m_showFilesAsLeaves; + + virtual void priv_read(); + virtual fh_context SubCreate_file( fh_context c, fh_context md ); + virtual bool supportsRemove(); + virtual void priv_remove( fh_context c ); + virtual std::string priv_getRecommendedEA(); + + virtual bool supportsRename(); + virtual fh_context priv_rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems = true, + bool OverWriteDstIfExists = false ); + + public: + + EmblemContext( Context* parent, fh_emblem em, bool m_showFilesAsLeaves = false ); + virtual ~EmblemContext(); + + void createStateLessAttributes( bool force = false ); + + void OnChildAdded( fh_emblem em, fh_emblem child ); + void OnChildRemoved( fh_emblem em, fh_emblem child ); + + static fh_istream SL_getFSID( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_istream SL_getDescription( EmblemContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getDigitalLatitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getDigitalLongitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getZoomRange( EmblemContext* c, const std::string& rdn, EA_Atom* atom ); + + + static void SL_updateDigitalLatitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + static void SL_updateDigitalLongitude( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + static void SL_updateZoomRange( EmblemContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + + void sync(); + + }; + + +}; +#endif diff --git a/Ferris/FCA.cpp b/Ferris/FCA.cpp new file mode 100644 index 0000000..a32b030 --- /dev/null +++ b/Ferris/FCA.cpp @@ -0,0 +1,6001 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FCA.cpp,v 1.26 2010/09/24 21:30:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +// required for RootContextDropper +#include + +#ifdef HAVE_LIBPQXX +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace PGSTD; +using namespace pqxx; + +extern "C" { +//#include +#define BOOLOID 16 +#define INT8OID 20 +#define INT2OID 21 +#define INT2VECTOROID 22 +#define INT4OID 23 +#define VARCHAROID 1043 +#define DATEOID 1082 +#define TIMEOID 1083 +#define TIMESTAMPOID 1114 +}; + +#endif + + +namespace Loki +{ + template + < + typename T, + template class OP, + class CP, + template class KP, + template class SP + > + inline bool operator<(const SmartPtr& lhs, const ::Ferris::Context* rhs) + { + return GetImpl(lhs) < rhs; + } +}; + + + +namespace Ferris +{ + using namespace std; + using namespace FerrisBitMagic; + + template + void erase( Col& col, Obj& o ) + { + typedef typename Col::iterator ITER; + ITER ci = col.find( o ); + if( ci != col.end() ) + col.erase( ci ); + +// col.erase( col.find( o )); +// col.erase( o ); + } + + string tostr( double v ) + { + stringstream ss; + ss << v; + return ss.str(); + } + string tostr( int v ) + { + stringstream ss; + ss << v; + return ss.str(); + } + + + namespace FCA + { + static const int EXTENT_VIEWER_DEFAULT_MAX_FILES = 20; + static const int EXTENT_VIEWER_LARGE_MAX_FILES = 1000; + static const char* EXTENT_SUBDIR_NAME = "-all"; + static const int EXTENT_SUBDIR_LIMIT = EXTENT_VIEWER_LARGE_MAX_FILES; + static const char* EXTENT_SAMPLE_SUBDIR_NAME = "-all-s"; + static const int EXTENT_SAMPLE_SUBDIR_LIMIT = EXTENT_VIEWER_DEFAULT_MAX_FILES; + static const char* CONTINGENT_SUBDIR_NAME = "-self"; + static const int CONTINGENT_SUBDIR_LIMIT = EXTENT_VIEWER_LARGE_MAX_FILES; + static const char* CONTINGENT_SAMPLE_SUBDIR_NAME = "-self-s"; + static const int CONTINGENT_SAMPLE_SUBDIR_LIMIT = EXTENT_VIEWER_DEFAULT_MAX_FILES; + + string getBitFunctionName( const std::string& treeName, + const std::string& attributeName, + bool quote ) + { + stringstream ss; + if( quote ) ss << " \""; + ss << EANameToSQLColumnName(treeName) << "_" + << EANameToSQLColumnName( attributeName ) ; + if( quote ) ss << "\" "; + return ss.str(); + } + + void setFile( fh_context parent, const std::string& rdn, + const std::string& data, int mode ) + { + fh_context c = Shell::acquireSubContext( parent, rdn, false, mode ); + setStrAttr( c, "content", data + '\n' ); + } + + void setFile( fh_context parent, const std::string& rdn, + stringstream& dataSS, int mode ) + { + setFile( parent, rdn, dataSS.str(), mode ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + bool anythingSet( const FerrisBitMagic::bvector<>& a ) + { + return a.count() > 0; + } + + bool equiv( const fca_std_bitset_t& a, const fca_std_bitset_t& b ) + { + return a == b; + } + + + bool equiv( const FerrisBitMagic::bvector<>& a, const FerrisBitMagic::bvector<>& b ) + { + return a == b; + } + bool equiv( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ) + { + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + + + bool equiv_by_iter( const FerrisBitMagic::bvector<>& a, const FerrisBitMagic::bvector<>& b ) + { + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + bool isZero( const FerrisBitMagic::bvector<>& a ) + { + return a.count() == 0; + } + + + bool second_is_superset( const fca_std_bitset_t& a, const fca_std_bitset_t& b ) + { + return a.is_subset_of( b ); +// return (a & b) == a; + } + + + bool second_is_superset( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector<>& b ) + { +// FerrisBitMagic::bvector<> t = a & b; +// return t == b; + + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + + bool second_is_superset( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ) + { +// FerrisBitMagic::bvector<> t = a & b; +// return t == b; + + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + bool second_is_superset( const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& a, + const FerrisBitMagic::bvector<>& b ) + { + typedef FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >::enumerator enumerator_t; + enumerator_t an = a.first(); + enumerator_t an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + bool second_is_superset( const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ) + { + typedef FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >::enumerator enumerator_t; + enumerator_t an = a.first(); + enumerator_t an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + + + +// static bit_vector& resize( bit_vector& bv, int sz ) +// { +// bit_vector j( sz ); +// bv.swap( j ); +// return bv; +// } + +// bit_vector operator&( const bit_vector& a, const bit_vector& b ) +// { +// bit_vector ret( a.capacity() ); +// int sz = max( a.size(), b.size() ); +// for( int i = 0; i < sz; ++i ) +// ret[ i ] = a[i] & b[i]; +// return ret; +// } + +// bit_vector operator^( const bit_vector& a, const bit_vector& b ) +// { +// bit_vector ret( a.capacity() ); +// int sz = max( a.size(), b.size() ); +// for( int i = 0; i < sz; ++i ) +// ret[ i ] = a[i] ^ b[i]; +// return ret; +// } + + +// bit_vector& operator|=( bit_vector& a, const bit_vector& b ) +// { +// bit_vector& ret = a; +// int sz = max( a.size(), b.size() ); +// for( int i = 0; i < sz; ++i ) +// ret[ i ] |= b[i]; +// return ret; +// } + + +// bit_vector& operator^=( bit_vector& a, const bit_vector& b ) +// { +// bit_vector& ret = a; +// int sz = max( a.size(), b.size() ); +// for( int i = 0; i < sz; ++i ) +// { +// bool t = a[i]; +// ret[ i ] = (t ^ b[i]); +// } +// return ret; +// } + +// bool anythingSet( const bit_vector& a ) +// { +// bool ret = false; +// int sz = a.size(); +// for( int i = 0; i < sz; ++i ) +// { +// if( a[i] ) +// return true; +// } + +// return ret; +// } + +// bool equiv( const bit_vector& a, const bit_vector& b ) +// { +// bool ret = true; +// int sz = max( a.size(), b.size() ); +// for( int i = 0; i < sz; ++i ) +// { +// if( a[i] != b[i] ) +// return false; +// } +// return ret; +// } + +// bool isZero( const bit_vector& a ) +// { +// bool ret = true; +// int sz = a.size(); +// for( int i = 0; i < sz; ++i ) +// { +// if( a[i] == true ) +// return false; +// } +// return ret; +// } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct ConceptLatticePriv + { +#ifdef HAVE_LIBPQXX + friend class Concept; + + /** + * Connection to database + */ + pqxx::connection* m_connection; + long m_maxItemSetSizeInBits; + + ConceptLatticePriv() + { + m_connection = 0; + m_maxItemSetSizeInBits = 0; + } + + ~ConceptLatticePriv() + { + if( m_connection ) + delete m_connection; + } +#endif + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// template struct itemset_gap_len_table_min +// { +// static const gap_word_t _len[FerrisBitMagic::gap_levels]; +// }; +// template +// const gap_word_t itemset_gap_len_table_min::_len[FerrisBitMagic::gap_levels] = +// { 16, 32, 64, 128 }; + + Concept::~Concept() + { + } + + Concept::Concept( fh_conceptLattice cl, fh_context extent ) + : + m_cl( cl ), + m_extent( extent ), + m_itemSetWeight( 0 ), + m_extentSize( 0 ), + m_conceptOnlyMatchSize( 0 ), + m_id( -1 ), + m_support_perc( 0 ), + m_support_abs( 0 ), + m_support_ext( 0 ), + m_itemSet( //FerrisBitMagic::BM_GAP, + FerrisBitMagic::BM_BIT, + FerrisBitMagic::gap_len_table_min::_len, +// itemset_gap_len_table_min::_len, + cl->getMaxItemSetSizeInBits() ), + m_itemSet_AsBitSet( cl->getMaxItemSetSizeInBits() ), + m_dirty( false ), + m_x(0.0), m_y(0.0), m_z(0.0) + { +// cerr << "maxItemSetSizeInBits:" << cl->getMaxItemSetSizeInBits() << endl; + Construct( cl ); + } + void + Concept::Construct( fh_conceptLattice cl ) + { +// m_cl = 0; + + if( !m_cl && cl ) + { + m_cl = cl; +// resize( m_itemSet, cl->m_itemSetSize ); + } + } + + + + clist_t& + Concept::getParents() + { + return m_parents; + } + + int Concept::getID() + { + return m_id; + } + void Concept::setID( int v ) + { + m_dirty = true; + m_cl->priv_ConceptIDChanging( this, m_id, v ); + m_id = v; + } + + + + void + Concept::optimizeItemSet() + { + m_itemSet.optimize(); + } + + + const FerrisBitMagic::bvector<>& + Concept::getItemSet() const + { + return m_itemSet; + } + + const fca_std_bitset_t& + Concept::getItemSetBitSet() const + { + return m_itemSet_AsBitSet; + } + + + + void + Concept::setItemSet( const FerrisBitMagic::bvector<>& v ) + { + m_dirty = true; + m_cl->priv_ConceptItemSetChanging( this, m_itemSet, v ); + m_itemSet = v; + + for( int i=0; igetMaxItemSetSizeInBits(); ++i ) + { + m_itemSet_AsBitSet[ i ] = m_itemSet[ i ]; + } + } + + int + Concept::getExtentSize() + { + return m_extentSize; + } + + stringlist_t& + Concept::getAddedFormalConceptAttributes( stringlist_t& sl ) + { + FerrisBitMagic::bvector<> t; + + for( clist_t::const_iterator ci = getParents().begin(); + ci != getParents().end(); ++ci ) + { + t |= (*ci)->getItemSet(); + } + t ^= getItemSet(); + m_cl->AttrIDToStringList( t, sl ); + return sl; + } + + stringlist_t& + Concept::getAddedFormalConceptAttributesRelativeToParent( fh_concept pivc, + stringlist_t& sl ) + { + FerrisBitMagic::bvector<> t = pivc->getItemSet(); + t ^= getItemSet(); + m_cl->AttrIDToStringList( t, sl ); + return sl; + } + + + + + void + Concept::removeParent( const fh_concept& c ) + { + m_dirty = true; + erase( m_parents, c ); + erase( m_upset, c ); + } + + void + Concept::removeChild( const fh_concept& c ) + { + m_dirty = true; + erase( m_children, c ); + erase( m_downset, c ); + } + + bool + Concept::isMeetIrreducible() + { + return getParents().size() == 1; + } + + int + Concept::getMaxDepth() + { + int d = 0; + + const clist_t& pl = getParents(); + for( clist_t::const_iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { + d = MAX( d, (*pi)->getMaxDepth()+1 ); + } + return d; + } + + + + bool + Concept::less_than_or_equal( fh_concept c ) + { + filters_t tmp; + filters_t thisbasef = getBaseFilterList(); + filters_t cbasef = c->getBaseFilterList(); + + thisbasef.sort(); + cbasef.sort(); + + set_intersection( thisbasef.begin(), thisbasef.end(), + cbasef.begin(), cbasef.end(), + back_inserter( tmp ) ); + + return tmp == cbasef; + } + + + + clist_t& + Concept::getChildren() + { + return m_children; + } + clist_t& + Concept::getChildren( clist_t& l ) + { + l = _Self::getChildren(); + return l; + } + + + void + Concept::getUpDownSet_recurse( fh_concept p, clist_t& cache, bool isUpSet ) + { + clist_t& col = isUpSet ? p->m_parents : p->m_children; + + LG_FCA_D << "getUpDownSet_recurse() p:" << p->getFancyName() + << " col.sz:" << col.size() + << endl; + + if( col.empty() ) + return; + + for( clist_t::iterator ci = col.begin(); ci != col.end(); ++ci ) + { + cache.insert( *ci ); + getUpDownSet_recurse( *ci, cache, isUpSet ); + } + } + + + clist_t& + Concept::getUpDownSet( bool includeSelf, bool isUpSet ) + { + clist_t& cache = isUpSet ? m_upset : m_downset; + cache.clear(); + + if( cache.empty() ) + { + fh_concept p = this; + getUpDownSet_recurse( p, cache, isUpSet ); + } + if( includeSelf ) + cache.insert( this ); + return cache; + } + + clist_t& + Concept::getUpSet( bool includeSelf ) + { + return getUpDownSet( includeSelf, true ); + } + + clist_t& + Concept::getDownSet( bool includeSelf ) + { + return getUpDownSet( includeSelf, false ); + } + + clist_t& + Concept::getXSet( bool isUpSet ) + { + return isUpSet ? getUpSet() : getDownSet(); + } + + fh_concept + Concept::getRootConcept() + { + if( !m_parents.empty() ) + return (*m_parents.begin())->getRootConcept(); + return this; + } + + + fh_context + Concept::getExtent() + { + return m_extent; + } + + + FerrisBitMagic::bvector<>& + Concept::getExtentVerticalVector( FerrisBitMagic::bvector<>& ret, bool clarified ) + { + fh_conceptLattice cl = getConceptLattice(); + + stringlist_t itemNames; + cl->AttrIDToStringList( getItemSet(), itemNames ); + const FerrisBitMagic::bvector<>& k = getItemSet(); + + string btab = getBaseTableName(); + string vname = btab + "clarified"; + stringstream sqlss; + string tableName = btab; + if( clarified ) + tableName = vname; + + if( clarified ) + { + sqlss << " select urlid,g from " << tableName << " d " + << " where " << btab << "_intvec(bitf) @ '{"; + } + else + { + sqlss << " select urlid from " << tableName << " d " + << " where " << btab << "_intvec(bitf) @ '{"; + } + FerrisBitMagic::bvector<>::enumerator an = k.first(); + FerrisBitMagic::bvector<>::enumerator an_end = k.end(); + int count = 0; + for ( ; an < an_end ; ++count) + { + if( count ) sqlss << ','; + sqlss << *an; + ++an; + } + sqlss << "}' "; + + +// sqlss << "select urlid from " << btab << " d " +// << " where 't' "; +// for( stringlist_t::const_iterator si = itemNames.begin(); +// si != itemNames.end(); ++si ) +// { +// sqlss << " and " << getBitFunctionName(btab,*si) << "(d.bitf) "; +// } +// // { +// // stringset_t intent; +// // copy( itemNames.begin(), itemNames.end(), inserter( intent, intent.end() )); +// // stringlist_t sl; +// // cl->getAllAttributeNames( sl ); +// // for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) +// // { +// // if( intent.find( *si ) == intent.end() ) +// // { +// // sqlss << " and not " << getBitFunctionName(btab,*si) << "(d.bitf) "; +// // } +// // } +// // } + sqlss << " ;"; + + + LG_FCA_D << "SQL:" << sqlss.str() << endl; + + ConceptLatticePriv* P = m_cl->getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getting the concept only extent with all urlids..." ); + result res = trans.exec( sqlss.str() ); + + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + long urlid = 0; + iter["urlid"].to( urlid ); + if( clarified ) + iter["g"].to(urlid); + ret[ urlid ] = 1; + } + + return ret; + } + + + + extent_bitset_t& + Concept::getExtentVerticalVectorBitSet( extent_bitset_t& ret, bool clarified ) + { + fh_conceptLattice cl = getConceptLattice(); + + stringlist_t itemNames; + cl->AttrIDToStringList( getItemSet(), itemNames ); + const FerrisBitMagic::bvector<>& k = getItemSet(); + + string btab = getBaseTableName(); + string vname = btab + "clarified"; + stringstream sqlss; + string tableName = btab; + if( clarified ) + tableName = vname; + + if( clarified ) + { + sqlss << " select urlid,g from " << tableName << " d " + << " where " << btab << "_intvec(bitf) @ '{"; + } + else + { + sqlss << " select urlid from " << tableName << " d " + << " where " << btab << "_intvec(bitf) @ '{"; + } + FerrisBitMagic::bvector<>::enumerator an = k.first(); + FerrisBitMagic::bvector<>::enumerator an_end = k.end(); + int count = 0; + for ( ; an < an_end ; ++count) + { + if( count ) sqlss << ','; + sqlss << *an; + ++an; + } + sqlss << "}' "; + sqlss << " ;"; + + LG_FCA_D << "SQL:" << sqlss.str() << endl; + + ConceptLatticePriv* P = m_cl->getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getting the concept only extent with all urlids..." ); + result res = trans.exec( sqlss.str() ); + + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + long urlid = 0; + iter["urlid"].to( urlid ); + if( clarified ) + iter["g"].to(urlid); + ret[ urlid ] = 1; + } + + return ret; + } + + + clist_t + Concept::getIntent() + { + clist_t& u = getUpSet(); + clist_t ret; + + for( clist_t::iterator ci = u.begin(); ci != u.end(); ++ci ) + { + if( (*ci)->getContingentFilters().size() ) + { + ret.insert( *ci ); + } + } + if( getContingentFilters().size() ) + ret.insert( this ); + + + + +// fh_concept rootc = getRootConcept(); + +// for( clist_t::iterator ci = u.begin(); ci != u.end(); ++ci ) +// { +// if( (*ci)->m_parents.size() == 1 && (*(*ci)->m_parents.begin()) == rootc ) +// { +// ret.insert( *ci ); +// } +// } + + return ret; + } + + filters_t& + Concept::getBaseFilterList() + { + return m_baseFilters; + } + + void + Concept::setBaseFilterList( const filters_t& fl ) + { + m_dirty = true; + m_baseFilters.clear(); + copy( fl.begin(), fl.end(), back_inserter( m_baseFilters )); + } + + void + Concept::setContingentFilters( const filters_t& fl ) + { + m_dirty = true; + m_contingentFilters = fl; + } + + bool + Concept::containsAttribute() + { + return getContingentFilters().size(); + } + + std::list< filters_t > + Concept::getTransitiveContingentFilters() + { + std::list< filters_t > ret; + clist_t& upset = getUpSet(); + + for( clist_t::iterator iter = upset.begin(); iter != upset.end(); ++iter ) + { + LG_FCA_D << "getTransitiveContingentFilters() upset:" + << (*iter)->getFancyName() << endl; + + filters_t& fl = (*iter)->getContingentFilters(); + if( !fl.empty() ) + { + ret.push_back( fl ); + } + } + + return ret; + } + + + filters_t& + Concept::getContingentFilters() + { + return m_contingentFilters; + } + + + Concept::intentsz_t + Concept::getIntentSize() + { + return getIntent().size(); + } + + + + void + Concept::setExtent( const fh_context& c ) + { + m_dirty = true; + m_extent = c; + } + + + void + Concept::makeUniDirectionalLink( fh_concept c, bool isUpLink ) + { +// cerr << "Concept::makeUniDirectionalLink from:" << getFancyName() +// << " to:" << c->getFancyName() << endl; + m_dirty = true; + c->m_dirty = true; + + if( isUpLink ) + { + m_parents.insert( c ); + m_upset.insert( c ); + } + else + { + m_children.insert( c ); + m_downset.insert( c ); + } + } + + void + Concept::addParent( fh_concept c ) + { + m_dirty = true; + makeUniDirectionalLink( c, true ); + } + void + Concept::addChild( fh_concept c ) + { + m_dirty = true; + makeUniDirectionalLink( c, false ); + } + + void + Concept::addChildren( clist_t& cl ) + { + m_dirty = true; + for( clist_t::const_iterator ci = cl.begin(); ci != cl.end(); ++ci ) + addChild( *ci ); + } + + + + void + Concept::makeLink( fh_concept c, bool isUpLink ) + { + m_dirty = true; + c->m_dirty = true; + makeUniDirectionalLink( c, isUpLink ); + c->makeUniDirectionalLink( this, !isUpLink ); + } + + void + Concept::disconnect() + { + m_dirty = true; +// cerr << "Concept::disconnect() id:" << getID() << endl; + + for( clist_t::const_iterator ci = m_children.begin(); + ci != m_children.end(); ++ci ) + { + fh_concept c = *ci; + c->removeParent( this ); + } + for( clist_t::const_iterator ci = m_parents.begin(); + ci != m_parents.end(); ++ci ) + { + fh_concept c = *ci; + c->removeChild( this ); + } + } + + void Concept::setX( float x ) { m_dirty = true; m_x = x; } + float Concept::getX() { return m_x; } + void Concept::setY( float y ) { m_dirty = true; m_y = y; } + float Concept::getY() { return m_y; } + void Concept::setZ( float z ) { m_dirty = true; m_z = z; } + float Concept::getZ() { return m_z; } +// void Concept::setX( float x ) { m_dirty = true; } +// float Concept::getX() { return 0; } +// void Concept::setY( float y ) { m_dirty = true; } +// float Concept::getY() { return 0; } +// void Concept::setZ( float z ) { m_dirty = true; } +// float Concept::getZ() { return 0; } + + void + Concept::setLocation( float x, float y, float z ) + { + m_dirty = true; + setX( x ); + setY( y ); + setZ( z ); + } + void + Concept::setPoint( const Point& p ) + { + m_dirty = true; + setLocation( p.getX(), p.getY(), p.getZ() ); + } + Point + Concept::getPoint() + { + Point ret( getX(), getY(), getZ() ); + return ret; + } + + void + Concept::setFilterString( const std::string& s ) + { + m_dirty = true; + } + + std::string + Concept::getFilterString() + { + return ""; + } + + void + Concept::setFancyName( const std::string& s ) + { + m_dirty = true; + } + + std::string + Concept::getFancyName() + { + return ""; + } + + + void + Concept::updateConceptOnlyMatchSize() + { +#ifdef HAVE_LIBPQXX + m_dirty = true; + + fh_conceptLattice cl = m_cl; + + stringlist_t itemNames; + cl->AttrIDToStringList( getItemSet(), itemNames ); + + string btab = getBaseTableName(); + stringstream sqlss; +// sqlss << "select count(*) from docmap, " << btab << " d " +// << " where docmap.docid = d.docid "; + sqlss << "select count(*) from " << btab << " d " + << " where 't' "; + for( stringlist_t::const_iterator si = itemNames.begin(); + si != itemNames.end(); ++si ) + { + sqlss << " and " << getBitFunctionName(btab,*si) << "(d.bitf) "; + } + { + stringset_t intent; + copy( itemNames.begin(), itemNames.end(), inserter( intent, intent.end() )); + stringlist_t sl; + cl->getAllAttributeNames( sl ); + for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + { + if( intent.find( *si ) == intent.end() ) + { + sqlss << " and not " << getBitFunctionName(btab,*si) << "(d.bitf) "; + } + } + } + sqlss << " ;"; + +// sqlss << "select * from docmap, " << getBaseTableName() << " " +// << " where docmap.docid = " << getBaseTableName() << ".docid "; +// for( stringlist_t::const_iterator si = itemNames.begin(); +// si != itemNames.end(); ++si ) +// { +// sqlss << " and " << getBaseTableName() << ".\"" << *si << "\"='t' "; +// } +// { +// stringset_t intent; +// copy( itemNames.begin(), itemNames.end(), inserter( intent, intent.end() )); +// stringlist_t sl; +// cl->getAllAttributeNames( sl ); +// for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) +// { +// if( intent.find( *si ) == intent.end() ) +// { +// sqlss << " and " << getBaseTableName() << ".\"" << *si << "\"<>'t' "; +// } +// } +// } +// sqlss << " ;"; + + + LG_FCA_D << "SQL:" << sqlss.str() << endl; + + ConceptLatticePriv* P = m_cl->getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getting the concept only extent..." ); + result res = trans.exec( sqlss.str() ); + + LG_FCA_D << "files in updateConceptOnlyMatchSize():" << res.size() << endl; +// int fileCount = res.size(); + int fileCount = 0; + res[0][0].to(fileCount); + m_conceptOnlyMatchSize = fileCount; +#endif + } + + void + ConceptLattice::refreshAllConceptsContingentCounter() + { +#ifdef HAVE_LIBPQXX + m_dirty = true; + +// cerr << "ConceptLattice::refreshAllConceptsContingentCounter(begin)" << endl; + + Time::Benchmark contingentBM("Updating contingent counters"); + + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "refreshAllConceptsContingentCounter..." ); + + for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); + ci != m_IDToConceptMap.end(); ++ci ) + { + ci->second->m_conceptOnlyMatchSize = 0; + ci->second->m_conceptOnlyMatchingDocIDs.clear(); +// ci->second->m_MatchingDocIDs.clear(); + } + + // Using subq index + { + string btab = getBaseTableName(); + Time::Benchmark b("Using subq index"); + + for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); + ci != m_IDToConceptMap.end(); ++ci ) + { + fh_concept c = ci->second; + const FerrisBitMagic::bvector<>& k = c->getItemSet(); + + stringstream ss; + ss << " select count(*) from " << btab + << " where " << btab << "_intvec(bitf) @ '{"; + FerrisBitMagic::bvector<>::enumerator an = k.first(); + FerrisBitMagic::bvector<>::enumerator an_end = k.end(); + int count = 0; + for ( ; an < an_end ; ++count) + { + if( count ) ss << ','; + ss << *an; + ++an; + } + ss << "}' " + << " and #" << btab << "_intvec(bitf)=" << count << "; "; + + LG_FCA_D << "subq SQL:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + int fileCount = 0; + res[0][0].to(fileCount); + c->m_conceptOnlyMatchSize = fileCount; + } + } + + +// // Using toscana style +// { +// string btab = getBaseTableName(); +// Time::Benchmark b("Using subq index"); + +// for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); +// ci != m_IDToConceptMap.end(); ++ci ) +// { +// fh_concept c = ci->second; +// const FerrisBitMagic::bvector<>& k = c->getItemSet(); + +// stringstream ss; +// ss << " select count(*) from " << btab +// << " where "; + +// FerrisBitMagic::bvector<>::enumerator an = k.first(); +// FerrisBitMagic::bvector<>::enumerator an_end = k.end(); +// int count = 0; +// for( int i=0; i < (m_itemSetSize-2); ++i ) +// { +// FerrisBitMagic::bvector<> t; +// t[i] = true; +// std::string attrName = AttrIDToString( t ); + +// if( i ) ss << " and "; +// if( !k[i] ) +// ss << " not( "; + +// ss << " " << getBitFunctionName( btab, attrName, 1 ) << "(bitf) "; + +// if( !k[i] ) +// ss << " ) "; + +// } +// ss << " "; + +// LG_FCA_D << "subq SQL:" << ss.str() << endl; +// // cerr << "subq SQL:" << ss.str() << endl; +// result res = trans.exec( ss.str() ); +// int fileCount = 0; +// res[0][0].to(fileCount); +// c->m_conceptOnlyMatchSize = fileCount; +// } +// } + + + +// // Using a single linear database scan +// { +// Time::Benchmark b("Using single linear database scan"); +// string btab = getBaseTableName(); +// cerr << "reading table:" << btab << endl; +// tablereader tr( trans, btab ); +// vector row; +// int row_count = 1; +// while( tr >> row ) +// { +// if( !(row_count % 5000) ) +// { +// cerr << row_count << " done." << endl; +// } +// ++row_count; + +// // cerr << "row.size:" << row.size() << endl; +// string url,urlid,docid; +// string bitfstr; +// int i=0; + +// // url = row[i]; ++i; +// urlid = row[i]; ++i; +// docid = row[i]; ++i; +// bitfstr = row[i]; ++i; + +// int docidNum = toint( docid ); +// FerrisBitMagic::bvector<> bitf; +// // resize( bitf, m_itemSetSize ); + +// // cerr << "bitfstr:" << bitfstr << endl; +// { +// string::const_iterator si = bitfstr.begin(); +// for( int i=0; si != bitfstr.end(); ++si, ++i ) +// { +// if( *si == '1' ) +// bitf[ i ] = 1; +// } +// } + +// for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); +// ci != m_IDToConceptMap.end(); ++ci ) +// { +// fh_concept c = ci->second; +// const FerrisBitMagic::bvector<>& k = c->getItemSet(); + +// // if( equiv( bitf & k, bitf ) ) +// // if( second_is_superset( bitf, k ) ) +// // if( equiv_by_iter( k, bitf ) ) +// if( equiv( bitf, k ) ) +// { +// c->m_conceptOnlyMatchSize++; +// c->m_conceptOnlyMatchingDocIDs[ docidNum ] = 1; +// } +// // if( second_is_superset( k, bitf ) ) +// // { +// // c->m_MatchingDocIDs[ docidNum ] = 1; +// // } +// } + +// row.clear(); +// } +// tr.complete(); +// } + +// cerr << "ConceptLattice::refreshAllConceptsContingentCounter(end)" << endl; +#endif + } + + + void + ConceptLattice::fixInvalidTopLevelConcepts() + { +// cerr << "fixInvalidTopLevelConcepts()" << endl; + +#ifdef HAVE_LIBPQXX + m_dirty = true; + + fh_concept root = getTopConcept(); + if( !isBound( root ) ) + return; + + int TopLevelInvalidesCount = 0; + string btab = getBaseTableName(); + string ctab = m_CFITableName; + string bitvec_generic = getBitFunctionName( btab, "intvec", false ); + string bv = bitvec_generic + "(bitf)"; + string bvg = bitvec_generic + "(gtab.bitf)"; + string aggfunc = ctab + "_agg_bit_and"; + + connection& con = *(P->m_connection); + + try { + work trans( con, "creating rd-tree index.." ); + stringstream ss; + ss << "drop index " << ctab << "_bitfidx ; " << endl; + trans.exec( ss.str() ); + trans.commit(); + } + catch( exception& e ) + {} + try { + work trans( con, "dropping old agg function.." ); + stringstream ss; + ss << "drop AGGREGATE " << aggfunc << "( bit );"; + trans.exec( ss.str() ); + trans.commit(); + } + catch( exception& e ) + {} + + + work trans( con, "fixing lattice structure..." ); + { + stringstream ss; + ss << "CREATE INDEX " << ctab << "_bitfidx on " << ctab + << " using gist ( " << btab << "_intvec(bitf) gist__int_ops, " + << "(#(" << btab << "_intvec(bitf))) gist_int4_ops ); "; + trans.exec( ss.str() ); + stringstream ss2; + ss2 << "analyse " << ctab; + trans.exec( ss2.str() ); + } + + + stringstream ss; + ss << "SELECT id," << bv << " as bv FROM " << ctab << " gtab " + << " WHERE lattice_parents = '{" << root->getID() << "}' " + << " AND EXISTS ( SELECT id from " << ctab << " where id != " << root->getID() + << " and " << bv << " && " << bvg + << " and #" << bv << " < #" << bvg << " " + << " LIMIT 1 ); " << endl; + +// cerr << "root->getID():" << root->getID() << endl; +// cerr << "Invalides checking SQL:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + + typedef list< int > invalidesList_t; + invalidesList_t invalidesList; + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + int id = 0; + iter["id"].to( id ); + + invalidesList.push_back( id ); +// cerr << "Invalid ID:" << id << endl; + ++TopLevelInvalidesCount; + } + +// cerr << "TopLevelInvalidesCount:" << TopLevelInvalidesCount << endl; + +// cerr << "Deleting invalides nodes sql follows." << endl; + for( invalidesList_t::const_iterator ci = invalidesList.begin(); + ci != invalidesList.end(); ++ci ) + { + int id = *ci; + +// stringstream ss; +// ss << "delete from " << ctab << " where id = " << id << " ; " << endl; +// cerr << ss.str(); +// trans.exec( ss.str() ); + + m_IDToConceptMap_t::iterator iter = m_IDToConceptMap.find( id ); + if( m_IDToConceptMap.end() != iter ) + { + fh_concept c = iter->second; + c->disconnect(); + m_IDToConceptMap.erase( iter ); + } + } + + // + // Now if the root only has the one child element after cleanup then + // we can move the roots child into the root and have a proper lattice. + // + { + int count = 0; + fh_concept cachec = 0; + + for( clist_t::const_iterator ci = root->m_children.begin(); + ci != root->m_children.end(); ++ci ) + { + int id = (*ci)->getID(); + if( invalidesList.end() == find( invalidesList.begin(), + invalidesList.end(), id ) ) + { + cachec = (*ci); + ++count; + } + } + if( count == 1 ) + { + root->setItemSet( root->getItemSet() | cachec->getItemSet() ); + root->m_children.clear(); + copy( cachec->m_children.begin(), + cachec->m_children.end(), + inserter( root->m_children, root->m_children.end() ) ); + for( clist_t::const_iterator ci = root->m_children.begin(); + ci != root->m_children.end(); ++ci ) + { + fh_concept child = *ci; + child->m_parents.clear(); + child->m_parents.insert( root ); + } +// cerr << "Removing cachec from database. id:" << cachec->getID() << endl; + m_IDToConceptMap.erase( cachec->getID() ); + } + } + + + +// cerr << "Setting up agg function" << endl; +// { +// stringstream ss; +// ss << "CREATE AGGREGATE " << aggfunc << "( " +// << " sfunc = bitand," +// << " basetype = bit(" << m_itemSetSize << ")," +// << " stype = bit(" << m_itemSetSize << ")" +// << " );"; +// trans.exec( ss.str() ); +// } + +// cerr << "moving common items into lattice top node" << endl; +// { +// stringstream ss; +// ss << "SELECT " << aggfunc << "( bitf ) as bv from " << ctab +// << " where lattice_parents = '{" << root->getID() << "}' "; +// result res = trans.exec( ss.str() ); +// FerrisBitMagic::bvector<> bv; +// if( res.begin() != res.end() ) +// { +// int i=0; +// string s; +// res[0][0].to(s); +// int slen = s.length(); +// const char* p = s.c_str(); +// const char* end = p+slen; +// for( i=0; p newbv = root->getItemSet(); +// newbv |= bv; +// root->setItemSet( newbv ); +// } + +// for( clist_t::iterator ci = root->getChildren().begin(); +// ci != root->getChildren().end(); ++ci ) +// { +// fh_concept n = *ci; +// n->setItemSet( n->getItemSet() ^ bv ); +// } +// } + + trans.commit(); + if( TopLevelInvalidesCount > 0 ) + save(); + +// if( topNodesCount > 1 ) +// { +// for( clist_t::iterator ni = topNodeChildren.begin(); ni != topNodeChildren.end(); ++ni ) +// { +// fh_concept n = *ni; +// const FerrisBitMagic::bvector<>& bv = n->getItemSet(); + +// if( bv.count() < 2 ) +// continue; + +// stringsteam ss; +// ss << " select count(*) from wn1_cfi where wn1_intvec(bitf) && '{10,11,23,38,102,168,237}' " +// << " and #wn1_intvec(bitf) < #('{10,11,23,38,102,168,237}')::int[]; "; + + +// // for( clist_t::iterator ci = topNodeChildren.begin(); ci != topNodeChildren.end(); ++ci ) +// // { +// // fh_concept c = *ci; +// // if( c == n ) +// // continue; + +// // // The concept 'n' should be reachable from 'c' +// // if( second_is_superset( c->getItemSet(), n->getItemSet() ) ) +// // { +// // ++TopLevelInvalidesCount; +// // } +// // } +// } +// } + + +#endif + } + + int + Concept::getConceptOnlyMatchSize() + { + return m_conceptOnlyMatchSize; + } + + std::string + Concept::getBaseTableName() + { + return m_cl->getBaseTableName(); + } + + bool + Concept::isDirty() + { + return m_dirty; + } + void + Concept::setDirty( bool v ) + { + m_dirty = v; + } + + bool + Concept::getFishEyeLabelRec( stringlist_t& sl ) + { + stringlist_t tmp; + getAddedFormalConceptAttributes( tmp ); + if( tmp.empty() ) + { + clist_t intent = getParents(); + for( clist_t::iterator iter = intent.begin(); iter!=intent.end(); ++iter ) + { + (*iter)->getFishEyeLabelRec( tmp ); +// if( !tmp.empty() ) +// break; + } + } + copy( tmp.begin(), tmp.end(), back_inserter(sl)); + return true; + } + + stringlist_t& + Concept::getFishEyeLabel( stringlist_t& sl ) + { + clist_t intent = getParents(); + + getAddedFormalConceptAttributes( sl ); + if( sl.empty() ) + { + for( clist_t::iterator iter = intent.begin(); iter!=intent.end(); ++iter ) + { + (*iter)->getFishEyeLabelRec( sl ); + } + } + + m_cl->makeReducedAttributes( sl ); + m_cl->convertAttributeNamesToLabels( sl ); + return sl; + } + + + fh_conceptLattice + Concept::getConceptLattice() + { + return m_cl; + } + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + stringset_t& getOutOfBandColumns( stringset_t& ret ) + { + ret.insert("id"); + ret.insert("support_perc"); + ret.insert("support_abs"); + ret.insert("support_ext"); + ret.insert("lattice_parents"); + ret.insert("lattice_children"); + ret.insert("lattice_added_attrs"); + ret.insert("ferris_top_generator"); + ret.insert("ferris_bottom_generator"); + ret.insert("concept_only_support_abs"); + return ret; + } + + static stringlist_t PGArrayToStringList( const string& s, stringlist_t& ret ) + { + string t = s; + if( !t.empty() ) + t = t.substr( 1, t.length()-2 ); + + Ferris::Util::parseCommaSeperatedList( t, ret ); + return ret; + } + +#ifdef HAVE_LIBPQXX + static stringlist_t PGArrayToStringList( const result::field& s, stringlist_t& ret ) + { + string str; + s.to(str); + return PGArrayToStringList( str, ret); + } +#endif + + static fh_concept ConceptFactoryDefault_func( const fh_conceptLattice& cl, + int maxItemSetSizeInBits ) + { + fh_concept ret = new Concept( cl, 0 ); + return ret; + } + + // const std::string& findexPath, + // const std::string& CFITableName + ConceptLattice::ConceptLattice( fh_context latticeTree, + const F_ConceptFactory_t& func ) + : + P( new ConceptLatticePriv() ), + m_latticeTree( latticeTree ), + m_topConcept(0), + m_bottomConcept(0), + m_findexPath( "" ), + m_CFITableName( "" ), + m_baseTableName( "" ), + m_dirty( false ) + { + setConceptFactory( func ); + m_findexPath = getStrSubCtx( latticeTree, "findex-path", "" ); + m_CFITableName = getStrSubCtx( latticeTree, "tablename-cfi", "" ); + m_baseTableName = getStrSubCtx( latticeTree, "tablename-base", "" ); + m_CFITableIsAugmented = isTrue( + getStrSubCtx( latticeTree, "tablename-cfi-is-augmented", "0" )); + m_CFITableSelectTail = getStrSubCtx( latticeTree, "read-cfi-sql-tail", "" ); + m_itemSetSize = toint(getStrSubCtx( latticeTree, "bit-field-size", "10" )); + + LG_FCA_D << "ConceptLattice()" + << " latticeTree:" << latticeTree->getURL() << endl + << "m_findexPath:" << m_findexPath << endl + << "m_CFITableName:" << m_CFITableName << endl; + +#ifndef HAVE_LIBPQXX + { + fh_stringstream ss; + ss << "Using ConceptLattices requires libpqxx. please rebuild your libferris"; + Throw_GenericError( tostr(ss), 0 ); + } +#else + + EAIndex::fh_idx idx = EAIndex::Factory::getEAIndex( m_findexPath ); + + stringstream conSS; + conSS << " host=" << idx->getConfig("cfg-idx-host","",true); + conSS << " dbname=" << idx->getConfig("cfg-idx-dbname","",true); + P->m_connection = new connection( conSS.str() ); +#endif + } + + ConceptLatticePriv* + ConceptLattice::getPrivatePart() + { + return P; + } + + ConceptLattice::~ConceptLattice() + { + if( P ) + delete P; + } + + std::string + ConceptLattice::getBaseTableName() + { + return m_baseTableName; + } + + + fh_concept + ConceptLattice::getTopConcept() + { + return m_topConcept; + } + + fh_concept + ConceptLattice::getBottomConcept() + { + return m_bottomConcept; + } + + long + ConceptLattice::getMaxItemSetSizeInBits() const + { + return P->m_maxItemSetSizeInBits; + } + + + + list< fh_concept >& + ConceptLattice::getConcepts( list< fh_concept >& ret ) const + { + for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); + ci != m_IDToConceptMap.end(); ++ci ) + { + ret.push_back( ci->second ); + } + + return ret; + } + + + + stringlist_t& + ConceptLattice::getAllAttributeNames( stringlist_t& ret ) const + { + for( m_attrIDToString_t::const_iterator ci = m_attrIDToString.begin(); + ci != m_attrIDToString.end(); ++ci ) + { + ret.push_back( ci->second ); + } + + return ret; + } + + fh_context + ConceptLattice::getAllObjects() + { + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getAllObjects()..." ); + + string btab = getBaseTableName(); + stringstream ss; + ss << " select url from " << btab << " btab, urlmap where urlmap.urlid = btab.urlid "; + + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + result res = trans.exec( ss.str() ); + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + string earl; + iter["url"].to( earl ); + LG_FCA_D << "getAllObjects() earl:" << earl << endl; + fh_context c = Resolve( earl ); + selection->createSubContext( "", c ); + } + + return selection; + } + + + VerticalFormalContext_t& + ConceptLattice::getVerticalFormalContext( + FerrisBitMagic::bvector<>& Gret, + VerticalFormalContext_t& ret, + bool clarify ) + { + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + string btab = getBaseTableName(); + string vname = btab + "clarified"; + + if( clarify ) + { + bool alread_clarified = false; + try + { + work trans( con, "getFormalContext()..." ); + stringstream ss; + ss << "select * from " << vname << " limit 1"; + result res = trans.exec( ss.str() ); + if( !res.empty() ) + { + alread_clarified = true; + } + } + catch( ... ) + {} + +// cerr << "alread_clarified:" << alread_clarified << endl; + if( !alread_clarified ) + { + try + { + LG_FCA_D << "trying to make clarified table..." << endl; + work trans( con, "getFormalContext()..." ); + + LG_FCA_D << "maybe...Creating vname:" << vname << endl; + { + stringstream ss; + ss << "CREATE SEQUENCE " << vname << "_seq START 1;" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "select docid,urlid,bitf,nextval('" << vname << "_seq') as g " << endl + << " into " << vname << endl + << " from " << btab << " where urlid in " << endl + << " (select max(urlid) from " << btab << " group by bitf);" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "create index " << vname << "rd on " + << vname << " using gist( " + << btab << "_intvec(bitf::bit varying) );" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } +// { +// stringstream ss; +// ss << "create view " << vname << " " +// << " as ( select docid,mtime,urlid,bitf from " << btab << endl +// << " where urlid in " << endl +// << " ( select max(urlid) from " << btab << " group by bitf) );" << endl; +// result res = trans.exec( ss.str() ); +// } +// { +// stringstream ss; +// ss << "CREATE SEQUENCE " << vname << "gmap_seq START 1;" << endl; +// result res = trans.exec( ss.str() ); +// } +// { +// stringstream ss; +// ss << "create table " << vname << "gmap ( " << endl +// << " urlid int primary key, " << endl +// << " g int DEFAULT nextval('" << vname << "gmap_seq') );" << endl; +// result res = trans.exec( ss.str() ); +// } +// { +// stringstream ss; +// ss << "insert into " << vname << "gmap " +// << " ( select urlid from " << vname << " );" << endl; +// result res = trans.exec( ss.str() ); +// } + trans.commit(); + } + catch( ... ) + {} + } + } + work trans( con, "getFormalContext()..." ); + + FerrisBitMagic::bvector<> M = getFullItemSet(); + + stringstream sqlss; + if( clarify ) + { +// sqlss << "select bitf,max(urlid) as urlid " +// << " from " << btab << " d group by bitf "; + sqlss << "select bitf,d.urlid,g " + << " from " << vname << " d " << endl + << " order by d.urlid "; + } + else + { + sqlss << "select bitf,urlid " + << " from " << btab << " d order by urlid "; + } + LG_FCA_D << "SQL:" << sqlss.str() << endl; + result res = trans.exec( sqlss.str() ); + result::const_iterator iter = res.begin(); + for( int g = 1; iter != res.end(); ++iter, ++g) + { + long urlid; + string bitf; + iter["urlid"].to( urlid ); + iter["bitf"].to( bitf ); + + if( clarify ) + iter["g"].to(g); + + Gret[ urlid ] = 1; + stringstream ss; + ss << bitf; + char ch; + for( long i=0; ss >> ch; ++i ) + { + if( ch=='1' || ch=='t' ) + { + ret[i][g] = 1; + } + } + } + + return ret; + } + + + VerticalFormalContextBitSet_t& + ConceptLattice::getVerticalFormalContextBitSet( + extent_bitset_t& Gret, + VerticalFormalContextBitSet_t& ret, + bool clarify ) + { + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + string btab = getBaseTableName(); + string vname = btab + "clarified"; + + if( clarify ) + { + try + { + LG_FCA_D << "trying to make clarified table..." << endl; + work trans( con, "getFormalContext()..." ); + + LG_FCA_D << "maybe...Creating vname:" << vname << endl; + { + stringstream ss; + ss << "CREATE SEQUENCE " << vname << "_seq START 1;" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "select docid,urlid,bitf,nextval('" << vname << "_seq') as g " << endl + << " into " << vname << endl + << " from " << btab << " where urlid in " << endl + << " (select max(urlid) from " << btab << " group by bitf);" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "create index " << vname << "rd on " + << vname << " using gist( " + << btab << "_intvec(bitf::bit varying) );" << endl; + LG_FCA_D << "sql:" << ss.str() << endl; + result res = trans.exec( ss.str() ); + } + trans.commit(); + } + catch( ... ) + {} + } + work trans( con, "getFormalContext()..." ); + + FerrisBitMagic::bvector<> M = getFullItemSet(); + + stringstream sqlss; + if( clarify ) + { +// sqlss << "select bitf,max(urlid) as urlid " +// << " from " << btab << " d group by bitf "; + sqlss << "select bitf,d.urlid,g " + << " from " << vname << " d " << endl + << " order by d.urlid "; + } + else + { + sqlss << "select bitf,urlid " + << " from " << btab << " d order by urlid "; + } + LG_FCA_D << "SQL:" << sqlss.str() << endl; + result res = trans.exec( sqlss.str() ); + result::const_iterator iter = res.begin(); + for( int g = 1; iter != res.end(); ++iter, ++g) + { + long urlid; + string bitf; + iter["urlid"].to( urlid ); + iter["bitf"].to( bitf ); + + if( clarify ) + iter["g"].to(g); + + Gret[ urlid ] = 1; + stringstream ss; + ss << bitf; + char ch; + for( long i=0; ss >> ch; ++i ) + { + if( ch=='1' || ch=='t' ) + { + ret[i][g] = 1; + } + } + } + + return ret; + } + + + static fca_std_bitset_t& bitfstring_to_intent( fca_std_bitset_t& ret, const std::string& bitf ) + { +// cerr << "bitfstring_to_intent() bitf:" << bitf << endl; + stringstream ss; + ss << bitf; + char ch; + for( long i=0; ss >> ch; ++i ) + { + if( ch=='1' || ch=='t' ) + { + ret[i] = 1; + } + } + return ret; + } + + +// typedef bidirectional_map< fh_concept, FerrisBitMagic::bvector<>* > AllExtentVerticalVectors_t; + ConceptLattice::AllExtentVerticalVectors_t& + ConceptLattice::getAllExtentVerticalVectors( AllExtentVerticalVectors_t& ret, + bool clarified ) + { + string btab = getBaseTableName(); + string vname = btab + "clarified"; + stringstream sqlss; + string tableName = btab; + if( clarified ) + tableName = vname; + + typedef map< fca_std_bitset_t, fh_concept > IntentToConcept_t; + IntentToConcept_t IntentToConcept; + for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); + ci != m_IDToConceptMap.end(); ++ci ) + { + fh_concept c = ci->second; + const fca_std_bitset_t& bv = c->getItemSetBitSet(); + IntentToConcept[ bv ] = c; + + AllExtentVerticalVectors_t::iterator it=get(ret).find( c ); + if( it == ret.end() ) + { + FerrisBitMagic::bvector<>* bv = new FerrisBitMagic::bvector<>( FerrisBitMagic::BM_BIT, + FerrisBitMagic::gap_len_table_min::_len, + getMaxItemSetSizeInBits() ); + ret.insert( AllExtentVerticalVectors_t::value_type( c, bv )); + } + } + + + sqlss << "select urlid,bitf from " << tableName << ";" << endl; + LG_FCA_D << "SQL:" << sqlss.str() << endl; + + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getting all concept only extents with all urlids..." ); + result res = trans.exec( sqlss.str() ); + + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + long urlid = 0; + iter["urlid"].to( urlid ); + if( clarified ) + iter["g"].to(urlid); + + string bitf; + iter["bitf"].to( bitf ); + + fca_std_bitset_t intent( getMaxItemSetSizeInBits() ); + bitfstring_to_intent( intent, bitf ); + + for( IntentToConcept_t::const_iterator ii = IntentToConcept.begin(); + ii != IntentToConcept.end(); ++ii ) + { + fh_concept concept = ii->second; + if( second_is_superset( ii->first, intent ) ) + { + AllExtentVerticalVectors_t::iterator it=get(ret).find( concept ); + FerrisBitMagic::bvector<>* bv = it->second; + (*bv)[ urlid ] = 1; + } + } + } + + return ret; + } + + + + stringlist_t + ConceptLattice::AttrIDToStringList( const FerrisBitMagic::bvector<>& x, stringlist_t& ret ) + { + for( int i=0; i t; + t[ i ] = x[ i ]; + + m_attrIDToString_t::iterator iter = m_attrIDToString.find( t ); + if( iter != m_attrIDToString.end() ) + { + ret.push_back( iter->second ); + } + } + return ret; + } + + + + string + ConceptLattice::AttrIDToString( const FerrisBitMagic::bvector<>& x ) + { + if( m_attrIDToString.find( x ) != m_attrIDToString.end() ) + return m_attrIDToString[ x ]; + + return "N/A"; + } + + FerrisBitMagic::bvector<> + ConceptLattice::StringToAttrID( const std::string& s ) + { + FerrisBitMagic::bvector<> ret; +// resize( ret, m_itemSetSize ); + + for( m_attrIDToString_t::const_iterator ci = m_attrIDToString.begin(); + ci != m_attrIDToString.end(); ++ci ) + { + if( ci->second == s ) + return ci->first; + } + + return ret; + } + + + + void + ConceptLattice::setAttrIDToString( const FerrisBitMagic::bvector<>& x, string v ) + { + m_attrIDToString[ x ] = v; + } + + stringlist_t + ConceptLattice::getAddedAttributes( fh_concept parent, + fh_concept child ) + { +// const bit_vector bv_parent = parent->getItemSet(); +// const bit_vector bv_child = child->getItemSet(); +// bit_vector bv_newAttrs = bv_child; +// bv_newAttrs ^= bv_parent; + +// cerr << "getAddedAttributes() " << endl; +// cerr << " parent:" << bv_parent << endl; +// cerr << " child :" << bv_child << endl; +// cerr << " new :" << bv_newAttrs << endl; + + FerrisBitMagic::bvector<> bv_newAttrs = child->getItemSet() ^ parent->getItemSet(); + + stringlist_t sl; + AttrIDToStringList( bv_newAttrs, sl ); + return sl; + } + + + stringmap_t& + makeAttributeToFFilterMap( fh_context latticeTree, + std::map< FerrisBitMagic::bvector<>, std::string >& attrIDToString, + stringmap_t& out ) + { + fh_context ffc = latticeTree->getSubContext( "ffilters" ); + +// for( stringlist_t::iterator si=sl.begin(); si!=sl.end(); ++si ) +// { +// string t = getStrSubCtx( ffc, *si, "", true, true ); +// out[ *si ] = t; +// } + + typedef std::map< FerrisBitMagic::bvector<>, std::string > COL; + COL::iterator end = attrIDToString.end(); + for( COL::iterator iter = attrIDToString.begin(); iter != end; ++iter ) + { + string a = iter->second; + string t = getStrSubCtx( ffc, a, "", true, true ); + out[ a ] = t; + } + + return out; + } + + stringmap_t& + ConceptLattice::getAttributeToFFilterMap( stringmap_t& out ) + { + return makeAttributeToFFilterMap( m_latticeTree, m_attrIDToString, out ); + } + + + + stringlist_t& + ConceptLattice::makeReducedAttributes( stringlist_t& sl ) + { + sl.sort(); + stringlist_t::iterator e = unique( sl.begin(), sl.end() ); + sl.erase( e, sl.end() ); + + stringset_t slset; + stringmap_t atof; + typedef multimap< string, string > aprefixtof_t; + aprefixtof_t aprefixtof; + stringmap_t aprefixtof_opcode; + stringmap_t ftoa; + + makeAttributeToFFilterMap( m_latticeTree, m_attrIDToString, atof ); + boost::regex subqregex("^\\(([^<>=]+)((?:>=|<=))([0-9.]+)\\)$"); + copy( sl.begin(), sl.end(), inserter( slset, slset.end() )); +// cerr << "START---SZ:" << slset.size() << endl; +// cerr << "START---V:" << Util::createCommaSeperatedList(slset) << endl; + + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + string a = *si; + string f = atof[a]; + ftoa[ f ] = a; + + if( count( f.begin(), f.end(), '(' ) == 1 ) + { + boost::smatch matches; + if(boost::regex_match( f, matches, subqregex )) + { +// cerr << "m.sz:" << matches.size() << endl; + if( matches.size() == 4 ) + { + string opcode = matches[2]; +// cerr << "opcode:" << opcode << endl; + + string apre = a.substr( 0, a.find( '_' ) ); + aprefixtof.insert( make_pair( apre, f )); +// cerr << "a:" << a << " apre:" << apre << endl; + + if( !aprefixtof_opcode.count( apre ) ) + { + aprefixtof_opcode[apre] = opcode; + } + else + { + if( aprefixtof_opcode[apre] != opcode ) + { + aprefixtof_opcode[apre] = "Invalid"; + aprefixtof.erase( apre ); + } + } + } + } + } + } + + if( !aprefixtof.empty() ) + { + typedef aprefixtof_t::iterator iterator; + iterator nextk = aprefixtof.begin(); + iterator end = aprefixtof.end(); + + while( nextk != end ) + { + string k = nextk->first; + pair< iterator, iterator > er = aprefixtof.equal_range( k ); + iterator first = er.first; + iterator second = er.second; + nextk = second; + if( nextk != end ) + ++nextk; + + if( distance( first, second ) == 1 ) + continue; + + string opcode = aprefixtof_opcode[first->first]; + + typedef map< long, string > ffilterValueToFilter_t; + ffilterValueToFilter_t ffilterValueToFilter; + +// cerr << "ER first k:" << first->first << " v:" << first->second << endl; + for( iterator iter = first; iter!=second; ++iter ) + { + string f = iter->second; +// cerr << "ER iter k:" << iter->first << " v:" << iter->second << endl; + boost::smatch matches; + if(boost::regex_match( f, matches, subqregex )) + { +// cerr << "m.sz:" << matches.size() << endl; + if( matches.size() == 4 ) + { + long v = toint(matches[3]); +// cerr << "v:" << v << endl; + ffilterValueToFilter[ v ] = f; + } + } + } + + typedef ffilterValueToFilter_t::iterator FI; + FI ff = ffilterValueToFilter.begin(); + FI fl = ffilterValueToFilter.end(); + --fl; + +// cerr << "First value:" << ff->first << endl; +// cerr << "Last value:" << fl->first << endl; +// cerr << "opcode:" << opcode << endl; + + for( iterator iter = first; iter!=second; ++iter ) + { + string a = iter->first; + string f = iter->second; + string k = ftoa[f]; + slset.erase( k ); +// cerr << "ERASE a:" << a << endl; +// cerr << "ERASE f:" << f << endl; +// cerr << "ERASE k:" << k << endl; + } + + if( opcode == "<=" ) + { + string f = ff->second; + slset.insert( ftoa[ f ] ); +// cerr << "ADD a:" << ftoa[ f ] << endl; + } + else if( opcode == ">=" ) + { + string f = fl->second; + slset.insert( ftoa[ f ] ); + } + } + } + +// cerr << "END---SZ:" << slset.size() << endl; +// cerr << "END---V:" << Util::createCommaSeperatedList(slset) << endl; + stringlist_t ret; + copy( slset.begin(), slset.end(), back_inserter(ret)); + + sl = ret; + return sl; + } + + string + ConceptLattice::getReasonableTimeFormatStringForAttribute( stringmap_t& atof, + const std::string& wanted_eaname ) + { + time_t mintt = 0; + time_t maxtt = 0; + static boost::regex subqregex("^\\(([^<>=]+)((?:>=|<=))([0-9.]+)\\)$"); + + LG_FCA_D << "getReasonableTimeFormatStringForAttribute() EA:" << wanted_eaname + << " atof.sz:" << atof.size() + << endl; + + for( stringmap_t::iterator iter = atof.begin(); iter!=atof.end(); ++iter ) + { + string f = iter->second; + + LG_FCA_D << "getReasonableTimeFormatStringForAttribute() EA:" << wanted_eaname + << " f:" << f + << endl; + + boost::smatch matches; + if(boost::regex_match( f, matches, subqregex )) + { + if( matches.size() == 4 ) + { + string eaname = matches[1]; + string opcode = matches[2]; + string v = matches[3]; + if( eaname == wanted_eaname ) + { + time_t tt = toint( v ); + + LG_FCA_D << "getReasonableTimeFormatStringForAttribute() EA:" << wanted_eaname + << " min:" << mintt + << " max:" << maxtt + << " tt:" << tt + << endl; + + if( !mintt ) + mintt = tt; + else if( mintt > tt ) + mintt = tt; + + if( !maxtt ) + maxtt = tt; + else if( maxtt < tt ) + maxtt = tt; + } + } + } + } + + LG_FCA_D << "getReasonableTimeFormatStringForAttribute(...) EA:" << wanted_eaname + << " atof.sz:" << atof.size() + << endl; + + time_t tdiff = maxtt - mintt; + LG_FCA_D << "getReasonableTimeFormatStringForAttribute() EA:" << wanted_eaname + << " min:" << mintt + << " max:" << maxtt + << " diff:" << tdiff + << endl; + + if( tdiff > (3600L * 24 * 31 * 9 )) + { + return "%d%b%g"; + } + if( tdiff > (3600L * 24 * 31 )) + { + return "%d%b"; + } + if( tdiff > (3600L * 24 )) + { + return "%R_%d%b"; + } + + return ""; + } + + stringlist_t& + ConceptLattice::convertAttributeNamesToLabels( stringlist_t& sl ) + { + stringset_t slset; + stringmap_t atof; + makeAttributeToFFilterMap( m_latticeTree, m_attrIDToString, atof ); + copy( sl.begin(), sl.end(), inserter( slset, slset.end() )); + static boost::regex subqregex("^\\(([^<>=]+)((?:>=|<=))([0-9.]+)\\)$"); + + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + string a = *si; + string f = atof[a]; + +// cerr << "convertAttributeNamesToLabels() a:" << a << " f:" << f << endl; + boost::smatch matches; + if(boost::regex_match( f, matches, subqregex )) + { +// cerr << "b...m.sz:" << matches.size() << endl; + if( matches.size() == 4 ) + { + string eaname = matches[1]; + string opcode = matches[2]; + string v = matches[3]; + +// cerr << "b...eaname:" << eaname << endl; +// cerr << "b...opcode:" << opcode << endl; + + if( ends_with( eaname, "time" ) ) + { + static boost::regex numrex("^[0-9]+$"); + if( !boost::regex_match( f, numrex )) + continue; + + string formatstr = getReasonableTimeFormatStringForAttribute( atof, eaname ); + time_t tt = toint( v ); + std::string tstr = Time::toTimeString( tt, formatstr ); +// cerr << "b...tstr:" << tstr << endl; + + slset.erase( a ); + stringstream ss; + ss << eaname << "" << opcode << "" << tstr; + slset.insert( ss.str() ); + } + else + { + slset.erase( a ); + stringstream ss; + ss << eaname << "" << opcode << "" << v; + slset.insert( ss.str() ); + } + } + } + } + + + sl.clear(); + copy( slset.begin(), slset.end(), back_inserter(sl)); + return sl; + } + + + FerrisBitMagic::bvector<> + ConceptLattice::getFullItemSet() + { + FerrisBitMagic::bvector<> bv; + int sz = m_attrIDToString.size(); + + for( int i=0; i& bv ) + { +// fh_context subc = Shell::acquireSubContext( c, tostr(id), false ); +// string datastr = getStrAttr( subc, "content", "", true ); +// if( !datastr.empty() ) +// { +// cerr << "id:" << id << " datastr.len:" << datastr.length() << endl; +// // FerrisBitMagic::bvector<> bv; +// FerrisBitMagic::deserialize(bv, (unsigned char*)datastr.data()); +// cerr << " bv.count:" << bv.count() << endl; +// // n->m_conceptOnlyMatchingDocIDs = bv; +// } + } + + + void + ConceptLattice::priv_load() + { +#ifdef HAVE_LIBPQXX + + + string CFISelectSQL; + { + stringstream ss; + ss << " select id,support_perc,support_abs,support_ext"; + if( m_CFITableIsAugmented ) + { + ss << ",lattice_parents,lattice_children" + << ",lattice_added_attrs,concept_only_support_abs"; + } + ss << ",bitf from " << m_CFITableName << " d order by id desc"; +// ss << m_CFITableSelectTail; + CFISelectSQL = ss.str(); + +// stringstream sqlss; +// sqlss << "select * from " << m_CFITableName << " order by id desc "; +// CFISelectSQL = sqlss.str(); + } + + LG_FCA_D << "ConceptLattice::priv_load(SQL):" << CFISelectSQL << endl; + work trans( *P->m_connection, "getting the data..." ); +// cerr << "getting the data...SQL:" << CFISelectSQL << endl; + Time::Benchmark bm("query"); + bm.start(); + result res = trans.exec( CFISelectSQL ); + +// icursorstream cur( trans, CFISelectSQL, "load_lattice", cursor_base::all() ); +// // icursorstream cur( trans, CFISelectSQL, "load_lattice", 500 ); + +// cerr << "getting the data...B" << endl; +// result res; +// if (!(cur >> res)) +// { +// cerr << "ERROR loading data. nothing to load..." << endl; +// return; +// } +// cerr << "getting the data...C" << endl; + bm.stop(); + bm.print(); + + LG_FCA_D << "ConceptLattice::priv_load(top)" << endl; + + bool parentsColumnExists = false; + bool childrenColumnExists = false; + bool addedAttrColumnExists = false; + bool conceptOnlyMatchSizeExists = false; + + stringset_t outOfBandColumns; + getOutOfBandColumns( outOfBandColumns ); + +// { +// // string t; +// // (*res.begin())["bitf"].to(t); +// // m_itemSetSize = t.length(); +// LG_FCA_D << "ConceptLattice::priv_load(res.begin.sz):" << res.begin()->size() << endl; + +// m_itemSetSize = res.begin()->size(); +// m_itemSetSize -= 4; +// if( m_CFITableIsAugmented ) +// m_itemSetSize -= 4; +// } + + LG_FCA_D << "priv_load() m_itemSetSize:" << m_itemSetSize << endl; + + // + // make a cache of which string names each bit vector + // position has + // + { + int colNum = 0; + result::const_iterator firsttuple = res.begin(); + result::tuple::const_iterator e = firsttuple->end(); + for( result::tuple::const_iterator cur = firsttuple->begin(); + cur != e; ++cur ) + { + string name = cur->name(); + +// if( outOfBandColumns.find( name ) == outOfBandColumns.end() ) +// { +// FerrisBitMagic::bvector<> bv; +// bv[ colNum ] = 1; +// setAttrIDToString( bv, name ); + +// ++colNum; +// } + if( name == "lattice_parents" ) parentsColumnExists = true; + if( name == "lattice_children" ) childrenColumnExists = true; + if( name == "lattice_added_attrs" ) addedAttrColumnExists = true; + if( name == "concept_only_support_abs" ) conceptOnlyMatchSizeExists = true; + } + } + + int maxItemSetSizeInBits = 64; + { + stringstream ss; + ss << getStrSubCtx( m_latticeTree, "bitf-column-names", "", true, true ); + string name; + int colNum = 0; + while( getline( ss, name )) + { + FerrisBitMagic::bvector<> bv; + bv[ colNum ] = 1; + setAttrIDToString( bv, name ); + ++colNum; + } + maxItemSetSizeInBits = colNum; + } +// cerr << " maxItemSetSizeInBits:" << maxItemSetSizeInBits << endl; + P->m_maxItemSetSizeInBits = maxItemSetSizeInBits; + + // First we read the concepts and make them, + // later we conncet parent/child associations. +// cerr << "START Reading tuple results..." << endl; + Time::Benchmark bm_read("Reading tuple results..."); + bm_read.start(); +// while( true ) +// { +// { +// static int i =0; +// ++i; +// cerr << "Reading tuple " << i << endl; +// } + + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + int id = 0; + string addedAttrs = ""; + + // FIXME: ego will want to make a subclass of Concept here +// fh_concept ivc = new Concept( this ); + fh_concept ivc = m_conceptFactory_func( this, maxItemSetSizeInBits ); + + int colNum = 0; + result::tuple::const_iterator e = iter->end(); + for( result::tuple::const_iterator cur = iter->begin(); + cur != e; ++cur ) + { + string name = cur->name(); + +// cerr << "id:" << id << " name:" << name << endl; + if( name == "id" ) + { + cur->to( id ); + if( (id % 1000) == 0 ) + cerr << "id...:" << id << endl; + } + else if( name == "support_perc" ) + { + cur->to( ivc->m_support_perc ); + } + else if( name == "support_abs" ) + { + cur->to( ivc->m_support_abs ); + } + else if( name == "support_ext" ) + { + cur->to( ivc->m_support_ext ); + } + else if( name == "concept_only_support_abs" ) + { + cur->to( ivc->m_conceptOnlyMatchSize ); + } + else if( name == "lattice_added_attrs" ) + { + string s; + cur->to( addedAttrs ); + if( !addedAttrs.empty() ) + addedAttrs = addedAttrs.substr( 1, addedAttrs.length() - 2 ); + } + else if( outOfBandColumns.find( name ) != outOfBandColumns.end() ) + { + } + else if( name == "bitf" ) + { + string s; + cur->to(s); +// cerr << "id:" << id << " bitf:" << s << endl; + int slen = s.length(); + const char* p = s.c_str(); + const char* end = p+slen; + for( ; pm_itemSet[ colNum ] = true; + ivc->m_itemSet_AsBitSet[ colNum ] = true; + ivc->m_itemSetWeight++; + } + ++colNum; + } +// ivc->m_itemSet.optimize(); + } + else + { + bool v = 0; + cur->to( v ); + + LG_FCA_D << "priv_load() id:" << id << " name:" << name + << " colNum:" << colNum << " v:" << v << endl; + + if( v ) + { + ivc->m_itemSet[ colNum ] = true; + ivc->m_itemSetWeight++; + } + + ++colNum; + } + } + +// { +// stringstream namess; +// namess << id; +// if( addedAttrs != "{}" ) +// namess << " - " << addedAttrs; +// ivc->name = namess.str().c_str(); +// } + +// cerr << "priv_load() id:" << id +// << " m_itemSetWeight:" << ivc->m_itemSetWeight +// << " itemSet:" << ivc->m_itemSet << endl; + +// cerr << "ConceptLattice::priv_load(made concept) id:" << id << endl; + + ivc->m_id = id; + ivc->m_extentSize = ivc->m_support_abs; + + +// stringlist_t addedAttrsSL; +// Util::parseCommaSeperatedList( addedAttrs, addedAttrsSL ); +// for( stringlist_t::const_iterator si = addedAttrsSL.begin(); +// si != addedAttrsSL.end(); ++si ) +// { +// string attr = *si; +// FerrisBitMagic::bvector<> v = StringToAttrID( attr ); +// ivc->m_addedAttrs.push_back( v ); +// } + + m_IDToConceptMap.insert( make_pair( id, ivc ) ); + } +// res.clear(); +// if (!(cur >> res)) +// break; +// } + + bm_read.stop(); + bm_read.print(); + + // + // Now that we have made all the concepts we can freely link them + // to each other. + // + LG_FCA_D << "parentsColumnExists:" << parentsColumnExists + << " childrenColumnExists:" << childrenColumnExists + << endl; + if( parentsColumnExists && childrenColumnExists ) + { + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + int id = -1; + result::field idf = (*iter)[ "id" ]; + result::field parentsf = (*iter)[ "lattice_parents" ]; + result::field childrenf = (*iter)[ "lattice_children" ]; + idf.to( id ); + + LG_FCA_D << " id:" << id << " parents:" << parentsf.c_str() << endl; + + stringlist_t parents; + stringlist_t children; + + parents = PGArrayToStringList( parentsf, parents ); + children = PGArrayToStringList( childrenf, children ); + + fh_concept ivc = m_IDToConceptMap[ id ]; + + for( stringlist_t::const_iterator si = parents.begin(); + si != parents.end(); ++si ) + { +// cerr << "Link ivc:" << ivc->getID() << endl; +// cerr << "TO:" << *si << endl; + ivc->makeLink( m_IDToConceptMap[ toint(*si) ], true ); + } + + if( parents.empty() ) + m_topConcept = ivc; + if( children.empty() ) + m_bottomConcept = ivc; + } + } + + + { + // + // Make sure that the table has a standard extended form + // + if( !parentsColumnExists ) + { + stringstream ss; + ss << "alter table " << m_CFITableName + << " add column lattice_parents int[];" << endl; + trans.exec( ss.str() ); + } + if( !childrenColumnExists ) + { + stringstream ss; + ss << "alter table " << m_CFITableName + << " add column lattice_children int[];" << endl; + trans.exec( ss.str() ); + } + if( !addedAttrColumnExists ) + { + stringstream ss; + ss << "alter table " << m_CFITableName + << " add column lattice_added_attrs varchar[];" << endl; + trans.exec( ss.str() ); + } + if( !conceptOnlyMatchSizeExists ) + { + stringstream ss; + ss << "alter table " << m_CFITableName + << " add column concept_only_support_abs int;" << endl; + trans.exec( ss.str() ); + } + } + + trans.commit(); + m_CFITableIsAugmented = 1; + setFile( m_latticeTree, "tablename-cfi-is-augmented", "1" ); + + +// // +// // Load the inverted bit magic vectors +// // +// fh_context selfc = Shell::acquireSubContext( m_latticeTree, +// "inverted-lists-self", +// true ); +// fh_context extentc = Shell::acquireSubContext( m_latticeTree, +// "inverted-lists-extent", +// true ); +// for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); +// ni != m_IDToConceptMap.end(); ++ni ) +// { +// int id = ni->first; +// fh_concept n = ni->second; + +// // priv_load_invertedlist( selfc, id, n->m_conceptOnlyMatchingDocIDs ); +// // priv_load_invertedlist( extentc, id, n->m_MatchingDocIDs ); +// } + + m_dirty = false; +#endif + } + + fh_conceptLattice + ConceptLattice::load( const std::string& latticeTreePath ) + { + return ConceptLattice::load( Resolve( latticeTreePath )); + } + fh_conceptLattice + ConceptLattice::load( fh_context latticeTree ) + { + return ConceptLattice::load( latticeTree, + &ConceptFactoryDefault_func ); + } + + fh_conceptLattice ConceptLattice::load( + const std::string& latticeTreePath, + const F_ConceptFactory_t& func ) + { + return ConceptLattice::load( Resolve( latticeTreePath ), func ); + } + + fh_conceptLattice ConceptLattice::load( + fh_context latticeTree, + const F_ConceptFactory_t& func ) + { + fh_conceptLattice cl = new ConceptLattice( latticeTree, func ); + cl->priv_load(); + + LG_FCA_D << "ConceptLattice::load() cl:" << toVoid( cl ) << endl; + return cl; + } + + + + +// fh_conceptLattice +// ConceptLattice::load( pqxx::result& res ) +// { +// ConceptLattice* cl = new ConceptLattice(); +// cl->priv_load( res ); +// return cl; +// } + + void + ConceptLattice::save_invertedlist( fh_context c, int id, FerrisBitMagic::bvector<>& bv ) + { +// if( id == 805 ) +// { +// // cerr << "save_invertedlist() id:" << id << endl; +// FerrisBitMagic::bvector<>::enumerator an = bv.first(); +// FerrisBitMagic::bvector<>::enumerator an_end = bv.end(); + +// while (an < an_end) +// { +// cerr << " " << *an; +// ++an; // Fastest way to increment enumerator +// } +// cerr << endl << endl; +// } + + // It is reccomended to optimize vector before serialization. + bv.optimize(); + + FerrisBitMagic::bvector<>::statistics st; + bv.calc_stat(&st); + + + // Serialization to memory. + string buf( st.max_serialize_mem,'\0'); + unsigned len = FerrisBitMagic::serialize( bv, (unsigned char*)buf.data() ); + +// cerr << " save_inv. id:" << id << " len:" << len +// << " max:" << st.max_serialize_mem << endl; + fh_context subc = Shell::acquireSubContext( c, tostr(id), false ); + setStrAttr( subc, "content", buf.substr( 0, len ) ); + } + + + void + ConceptLattice::save() + { +#ifdef HAVE_LIBPQXX +// cerr << "ConceptLattice::save(top)" << endl; + work trans( *P->m_connection, "updating the lattice table..." ); + + typedef set< int > existingIDs_t; + existingIDs_t existingIDs; + + int totalConcepts = m_IDToConceptMap.size(); + int totalDirtyConcepts = getNumberOfDirtyConcepts(); + +// cerr << "ConceptLattice::save() total concepts:" << totalConcepts << endl; +// cerr << "ConceptLattice::save() dirty concepts:" << totalDirtyConcepts << endl; + + if( totalConcepts && ((1.0 * totalDirtyConcepts) / totalConcepts) > 0.3 ) + { + Time::Benchmark benchmark("save concept lattice with bulk IO"); + + // probably cheaper to clear the table and bulk load the new versions + { + stringstream ss; + ss << "delete from " << m_CFITableName << " ; " << endl; + trans.exec( ss.str() ); + } + + tablewriter w( trans, m_CFITableName ); + + for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); + ni != m_IDToConceptMap.end(); ++ni ) + { + fh_concept n = ni->second; + list tuple; + + int itemSetNamesCount = m_attrIDToString.size(); + stringstream bitfss; + { + stringstream& sqlss = bitfss; + const FerrisBitMagic::bvector<>& itemSet = n->getItemSet(); + for( int i=0; i < itemSetNamesCount; ++i ) + { + if( itemSet[ i ] ) + { + sqlss << '1'; + } + else + { + sqlss << '0'; + } + } + sqlss << "00"; + } + stringstream lattice_children_ss; + { + stringstream& sqlss = lattice_children_ss; + sqlss << "{"; + bool v = true; + for( clist_t::iterator ci = n->m_children.begin(); + ci != n->m_children.end(); ++ci ) + { + if( v ) v = false; + else sqlss << ","; + sqlss << (*ci)->getID(); + } + sqlss << "}"; + } + stringstream lattice_parents_ss; + { + stringstream& sqlss = lattice_parents_ss; + sqlss << "{"; + bool v = true; + for( clist_t::iterator ci = n->m_parents.begin(); + ci != n->m_parents.end(); ++ci ) + { + if( v ) v = false; + else sqlss << ","; + sqlss << (*ci)->getID(); + } + sqlss << "}"; + } + + stringstream lattice_added_attrs_ss; + { + stringstream& ss = lattice_added_attrs_ss; + if( n->m_parents.empty() ) + { + ss << "{}"; + } + else + { + + ss << "{"; + FerrisBitMagic::bvector<> tItemSet; + for( clist_t::iterator ci = n->m_parents.begin(); + ci != n->m_parents.end(); ++ci ) + { + tItemSet |= (*ci)->getItemSet(); + } + tItemSet ^= n->getItemSet(); + + if( anythingSet( tItemSet ) ) + { + FerrisBitMagic::bvector<>::enumerator an = tItemSet.first(); + FerrisBitMagic::bvector<>::enumerator an_end = tItemSet.end(); + bool v = true; + while (an < an_end) + { + FerrisBitMagic::bvector<> t; + t[ *an ] = 1; + + if( v ) v = false; + else ss << ","; + string ac = AttrIDToString( t ); + LG_FCA_D << " loop.added-attributes:" << t + << " loop.added-attributes:" << ac << endl; + ss << ac; + + ++an; // Fastest way to increment enumerator + } + +// bool v = true; +// for( int i=0; i < m_itemSetSize; ++i ) +// { +// FerrisBitMagic::bvector<> t; +// t[i] = true; + +// LG_FCA_D << " tItemSet:" << tItemSet +// << " t:" << t +// << " tItemSet & t:" << (tItemSet & t) +// << endl; +// if( anythingSet( tItemSet & t ) ) +// { +// if( v ) v = false; +// else ss << ","; +// LG_FCA_D << " loop.added-attributes:" << t +// << " loop.added-attributes:" +// << AttrIDToString( t ) << endl; +// string ac = AttrIDToString( t ); +// ss << ac; +// } +// } + } + ss << "}"; + } + } + + tuple.push_back( tostr(n->getID()) ); + tuple.push_back( tostr(n->m_support_perc) ); + tuple.push_back( tostr(n->m_support_abs) ); + tuple.push_back( tostr(n->m_support_ext) ); + + tuple.push_back( bitfss.str() ); + tuple.push_back( lattice_parents_ss.str() ); + tuple.push_back( lattice_children_ss.str() ); + tuple.push_back( lattice_added_attrs_ss.str() ); + tuple.push_back( tostr(n->getConceptOnlyMatchSize()) ); + + + stringstream sqlss; + sqlss << "insert into " << m_CFITableName + << " (id,support_perc, support_abs, support_ext " + << " ,concept_only_support_abs " + << " ,lattice_children, lattice_parents, lattice_added_attrs " + << ",bitf ) values ( " + << n->getID() << "," + << n->m_support_perc << "," + << n->m_support_abs << "," + << n->m_support_ext << "," + << n->getConceptOnlyMatchSize(); + + sqlss << ",'{}'"; + w << tuple; + } + + w.complete(); + } + else + { + Time::Benchmark benchmark("save concept lattice"); + + + // + // find which nodes are already in the database + // + { + stringstream ss; + ss << "select id from " << m_CFITableName; + result res = trans.exec( ss.str() ); + + for( result::const_iterator iter = res.begin(); + iter != res.end(); ++iter ) + { + int id; + iter["id"].to(id); + existingIDs.insert(id); + } + } +// cerr << "ConceptLattice::save(2)" << endl; + + // + // SQL update existing nodes, SQL insert nodes that are new + // + for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); + ni != m_IDToConceptMap.end(); ++ni ) + { + int id = ni->first; + fh_concept n = ni->second; + + if( n->m_parents.empty() ) + m_topConcept = n; + if( n->m_children.empty() ) + m_bottomConcept = n; + + if( existingIDs.find( id ) != existingIDs.end() ) + { + stringstream ss; + + ss << "update " << m_CFITableName + << " set concept_only_support_abs = " << n->getConceptOnlyMatchSize() << endl; + // update parents + { + ss << ", lattice_parents = '{"; + bool v = true; + for( clist_t::iterator ci = n->getParents().begin(); + ci != n->getParents().end(); ++ci ) + { + if( v ) v = false; + else ss << ","; + ss << (*ci)->getID(); + } + ss << "}' " << endl; + } + // update children + { + ss << " , lattice_children = '{"; + bool v = true; + for( clist_t::iterator ci = n->getChildren().begin(); + ci != n->getChildren().end(); ++ci ) + { + if( v ) v = false; + else ss << ","; + ss << (*ci)->getID(); + } + ss << "}' " << endl; + } + // update bitf + { + ss << ", bitf = B'"; + for( int i=0; i < m_itemSetSize; ++i ) + { + ss << n->m_itemSet[ i ]; + } + ss << "'::bit(" << m_itemSetSize << ") " << endl; + } + // update added attributes + if( n->getParents().empty() ) + { + ss << " , lattice_added_attrs = '{}' " << endl; + } + else + { + LG_FCA_D << "------------------------" << endl; + LG_FCA_D << " n.id:" << n->getID() + << " n.parents.size():" << n->getParents().size() << endl; + FerrisBitMagic::bvector<> tItemSet; + for( clist_t::iterator pi = n->getParents().begin(); + pi != n->getParents().end(); ++pi ) + { + fh_concept p = *pi; + LG_FCA_D //<< " p:" << p->m_itemNames + << " p.id:" << p->getID() + << " pitemset:" << p->getItemSet() + << endl; + tItemSet |= p->getItemSet(); + } + tItemSet ^= n->getItemSet(); + + ss << " , lattice_added_attrs = '{"; + + if( anythingSet( tItemSet ) ) + { + FerrisBitMagic::bvector<>::enumerator an = tItemSet.first(); + FerrisBitMagic::bvector<>::enumerator an_end = tItemSet.end(); + bool v = true; + while (an < an_end) + { + FerrisBitMagic::bvector<> t; + t[ *an ] = 1; + + if( v ) v = false; + else ss << ","; + string ac = AttrIDToString( t ); + LG_FCA_D << " loop.added-attributes:" << t + << " loop.added-attributes:" << ac << endl; + ss << ac; + + ++an; // Fastest way to increment enumerator + } + +// bool v = true; +// for( int i=0; i < m_itemSetSize; ++i ) +// { +// FerrisBitMagic::bvector<> t; +// t[i] = true; + +// LG_FCA_D << " tItemSet:" << tItemSet +// << " t:" << t +// << " tItemSet & t:" << (tItemSet & t) +// << endl; +// if( anythingSet( tItemSet & t ) ) +// { +// if( v ) v = false; +// else ss << ","; +// LG_FCA_D << " loop.added-attributes:" << t +// << " loop.added-attributes:" +// << AttrIDToString( t ) << endl; +// string ac = AttrIDToString( t ); +// ss << ac; +// } +// } + } + + ss << "}' " << endl; + } + ss << " where id = " << n->getID(); + LG_FCA_D << "UPDATE:" << ss.str() << endl; + trans.exec( ss.str() ); + } + else + { + // concept is new + int itemSetNamesCount = m_attrIDToString.size(); +// stringstream itemSetNamesSS; +// int itemSetNamesCount = 0; +// for( m_attrIDToString_t::const_iterator ci = m_attrIDToString.begin(); +// ci != m_attrIDToString.end(); ++ci ) +// { +// // itemSetNamesSS << ",\"" << ci->second << "\""; +// ++itemSetNamesCount; +// } + + stringstream sqlss; + sqlss << "insert into " << m_CFITableName + << " (id,support_perc, support_abs, support_ext " + << " ,concept_only_support_abs " + << " ,lattice_children, lattice_parents, lattice_added_attrs " + << ",bitf ) values ( " +// << itemSetNamesSS.str() << " ) values ( " + << n->getID() << "," + << n->m_support_perc << "," + << n->m_support_abs << "," + << n->m_support_ext << "," + << n->getConceptOnlyMatchSize(); + { + sqlss << ",'{"; + bool v = true; + for( clist_t::iterator ci = n->m_children.begin(); + ci != n->m_children.end(); ++ci ) + { + if( v ) v = false; + else sqlss << ","; + sqlss << (*ci)->getID(); + } + sqlss << "}'"; + } + { + sqlss << ",'{"; + bool v = true; + for( clist_t::iterator ci = n->m_parents.begin(); + ci != n->m_parents.end(); ++ci ) + { + if( v ) v = false; + else sqlss << ","; + sqlss << (*ci)->getID(); + } + sqlss << "}'"; + } + + sqlss << ",'{}'"; + + string btab = getBaseTableName(); + sqlss << ",("; + sqlss << "meta_" << getBitFunctionName( btab, "zero_bitf",false ) << "() "; + + stringstream bitfss; + const FerrisBitMagic::bvector<>& itemSet = n->getItemSet(); + for( int i=0; i < itemSetNamesCount; ++i ) + { + FerrisBitMagic::bvector<> t; + if( itemSet[ i ] ) + { + t[ i ] = itemSet[ i ]; + std::string attrName = AttrIDToString( t ); + sqlss << " | " << getBitFunctionName(btab,attrName) << "() "; + } + } + // FIXME: we need to know how large the bitf is in the base table. + sqlss << " )"; + sqlss << "::bit( " << m_itemSetSize << ") "; + sqlss << " );" << endl; + LG_FCA_D << " m_itemSetSize:" << m_itemSetSize << endl; + LG_FCA_D << "INSERT.SQL:" << sqlss.str() << endl; +// cerr << "INSERT.SQL:" << sqlss.str() << endl; + trans.exec( sqlss.str() ); + + + } + } + + + // + // If some nodes were erased then remove them from the database aswell + // + { + typedef set< int > intset_t; + intset_t inUseIDs; + intset_t result; + + copy( map_domain_iterator( m_IDToConceptMap.begin() ), + map_domain_iterator( m_IDToConceptMap.end() ), + inserter( inUseIDs, inUseIDs.end() )); + + set_difference( existingIDs.begin(), existingIDs.end(), + inUseIDs.begin(), inUseIDs.end(), + inserter( result, result.end() ) ); + +// cerr << "Begin deleting nodes....result.sz:" << result.size() +// << " existingIDs.size:" << existingIDs.size() +// << " inUseIDs.size:" << inUseIDs.size() +// << endl; + + int i = 0; + for( intset_t::const_iterator ci = result.begin(); ci != result.end(); ++ci ) + { + stringstream ss; + int id = *ci; + ss << "delete from " << m_CFITableName << " where id = " << id << " ; " << endl; +// cerr << "DELETE " << i << " SQL:" << ss.str(); + trans.exec( ss.str() ); + ++i; + } +// cerr << "FINISHED DELETING NODES...." << endl; + } + + +// cerr << "ConceptLattice::save(3)" << endl; + } + + trans.commit(); + if( m_topConcept ) + setFile( m_latticeTree, "lattice-top-id", tostr(m_topConcept->getID()) ); + if( m_bottomConcept ) + setFile( m_latticeTree, "lattice-bottom-id", tostr(m_bottomConcept->getID()) ); + + m_dirty = false; + +// cerr << "save() done" << endl; + +// // Save the inverted bitmagic vectors +// { +// fh_context selfc = Shell::acquireSubContext( m_latticeTree, +// "inverted-lists-self", +// true ); +// fh_context extentc = Shell::acquireSubContext( m_latticeTree, +// "inverted-lists-extent", +// true ); + +// for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); +// ni != m_IDToConceptMap.end(); ++ni ) +// { +// int id = ni->first; +// fh_concept n = ni->second; + +// cerr << "concept:" << id +// << " m_conceptOnlyMatchingDocIDs:" << n->m_conceptOnlyMatchingDocIDs.count() +// << " m_MatchingDocIDs.count:" << n->m_MatchingDocIDs.count() +// << endl; +// save_invertedlist( selfc, id, n->m_conceptOnlyMatchingDocIDs ); +// save_invertedlist( extentc, id, n->m_MatchingDocIDs ); +// } +// } +#endif + } + + void + ConceptLattice::setConceptFactory( const F_ConceptFactory_t& func ) + { + m_conceptFactory_func = func; + } + + + int + ConceptLattice::getHighestConceptID() const + { + int ret = 0; + for( m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.begin(); + ci != m_IDToConceptMap.end(); ++ci ) + { + ret = max( ci->first, ret ); + } + return ret; + } + + fh_concept + ConceptLattice::getConcept( int id ) const + { + m_IDToConceptMap_t::const_iterator ci = m_IDToConceptMap.find( id ); + if( ci != m_IDToConceptMap.end() ) + return ci->second; + + stringstream ss; + ss << "getConcept() id:" << id << " no such concept" << endl; + Throw_NoSuchObject( ss.str(), 0 ); + } + + void + ConceptLattice::addConcept( fh_concept c ) + { + m_dirty = true; + m_IDToConceptMap.insert( make_pair( c->getID(), c ) ); + } + + void + ConceptLattice::removeConcept( fh_concept c ) + { + m_dirty = true; + c->disconnect(); + m_IDToConceptMap.erase( c->getID() ); + } + + + void + ConceptLattice::priv_ConceptItemSetChanging( Concept* c, + FerrisBitMagic::bvector<> oldv, + FerrisBitMagic::bvector<> newv ) + { + m_dirty = true; + // FIXME: changing the itemset could change the top/bottom nodes +// fh_concept m_topConcept; +// fh_concept m_bottomConcept; + } + + void + ConceptLattice::priv_ConceptIDChanging( Concept* c, int oldv, int newv ) + { + m_dirty = true; + m_IDToConceptMap.erase( oldv ); + m_IDToConceptMap[ newv ] = c; + } + + + void + ConceptLattice::setDirty( bool v ) + { + m_dirty = v; + } + + bool + ConceptLattice::isDirty() + { + if( m_dirty ) + return m_dirty; + + for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); + ni != m_IDToConceptMap.end(); ++ni ) + { + fh_concept n = ni->second; + m_dirty |= n->isDirty(); + if( m_dirty ) + return m_dirty; + } + return m_dirty; + } + int + ConceptLattice::getNumberOfDirtyConcepts() + { + int ret = 0; + + for( m_IDToConceptMap_t::const_iterator ni = m_IDToConceptMap.begin(); + ni != m_IDToConceptMap.end(); ++ni ) + { + fh_concept n = ni->second; + if( n->isDirty() ) + ++ret; + } + + return ret; + } + + void + ConceptLattice::exportAsBurmeister( const std::string& outbase ) + { + string btab = getBaseTableName(); + string ctab = m_CFITableName; + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + + const std::string outFileName = outbase + ".cxt"; + ofstream oss( outFileName.c_str() ); + + fh_latticelayout lay = new LatticeLayout_Layered(); + lay->layout( this ); +// cerr << "Lattice is layed out..." << endl; + + work trans( con, "getting the data..." ); + + stringlist_t attrnames; + getAllAttributeNames( attrnames ); + + long urlid_max = 0; + typedef map< long, stringset_t > urlattrs_t; + urlattrs_t urlattrs; + + { + stringstream sqlss; + sqlss << "select * from urlmap um, " << btab << " g where um.urlid = g.urlid;" + << endl; + result res = trans.exec( sqlss.str() ); + + oss << "B" << endl << endl; + oss << res.size() << endl; + oss << attrnames.size() << endl; + oss << endl; + + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + string earl; + long urlid = 0; + iter["urlid"].to( urlid ); + iter["url"].to( earl ); +// oss << urlid << endl; + oss << earl << endl; + urlattrs[ urlid ]; + urlid_max = max( urlid_max, urlid ); + } + + stringlist_t::iterator iter = attrnames.begin(); + stringlist_t::iterator e = attrnames.end(); + for( ; iter != e ; ++iter ) + { + oss << *iter << endl; + } + } + + + + { + { + stringlist_t::iterator iter = attrnames.begin(); + stringlist_t::iterator e = attrnames.end(); + for( ; iter != e ; ++iter ) + { + string attr = *iter; + + stringstream sqlss; + sqlss << "select urlid from " << btab << " d where "; + sqlss << " " << getBitFunctionName(btab,attr) << "(d.bitf) ;"; + sqlss << endl; + cerr << sqlss.str() << endl; + + + result res = trans.exec( sqlss.str() ); + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + long urlid = 0; + iter["urlid"].to( urlid ); + urlattrs[ urlid ].insert( attr ); + } + } + } + + // typedef map< long, stringset_t > urlattrs_t; + urlattrs_t::iterator urliter = urlattrs.begin(); + urlattrs_t::iterator urle = urlattrs.end(); + for( ; urliter != urle ; ++urliter ) + { + long urlid = urliter->first; + stringset_t& aset = urliter->second; + + stringlist_t::iterator iter = attrnames.begin(); + stringlist_t::iterator e = attrnames.end(); + for( ; iter != e ; ++iter ) + { + string attr = *iter; + if( aset.find( attr ) != aset.end() ) + oss << "X"; + else + oss << "."; + } + oss << endl; + } + + + + +// EAIndex::fh_idx idx = EAIndex::Factory::getEAIndex( m_findexPath ); + +// stringmap_t::iterator iter = attrmap.begin(); +// stringmap_t::iterator e = attrmap.end(); +// for( ; iter != e ; ++iter ) +// { +// string ffilter_string = iter->second; + +// EAIndex::fh_eaquery q = EAIndex::Factory::makeEAQuery( ffilter_string, idx ); + +// std::stringstream LocalSQLHeaderSS; +// std::stringstream LocalSQLWherePredicatesSS; +// std::stringstream LocalSQLTailerSS; +// stringset_t lookupTablesUsed; +// bool queryHasTimeRestriction; +// std::string DocIDColumn; +// stringset_t eanamesUsed; +// EAIndex::MetaEAIndexerInterface::BuildQuerySQLTermInfo_t termInfo; + +// q->getQuerySQL( LocalSQLHeaderSS, +// LocalSQLWherePredicatesSS, +// LocalSQLTailerSS, +// lookupTablesUsed, +// queryHasTimeRestriction, +// DocIDColumn, +// eanamesUsed, +// termInfo ); + +// stringstream sqlss; +// sqlss << "select * from " << btab << " where "; +// sqlss << LocalSQLWherePredicatesSS.str(); +// sqlss << endl; +// cerr << sqlss.str() << endl; + + +// result res = trans.exec( sqlss.str() ); +// for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) +// { +// long urlid = 0; +// iter["urlid"].to( urlid ); +// oss << urlid << endl; +// } + + +// break; +// } + } + + +// for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) +// { +// long urlid = 0; +// stringlist_t addedAttrsList; + +// string addedAttrs; +// int support_abs = 0; +// int nodeX = 0; +// int nodeY = 0; + +// iter["urlid"].to( urlid ); +// iter["support_abs"].to( support_abs ); +// iter["lattice_added_attrs"].to( addedAttrs ); +// } + + } + + + void + ConceptLattice::exportAsToscanaJConceptualSchema( const std::string& outbase ) + { + const std::string outXMLFileName = outbase + ".csx"; + const std::string outSQLFileName = outbase + ".sql"; + string btab = getBaseTableName(); + string ctab = m_CFITableName; + double CoordScaleFactor = 25.0; + + ConceptLatticePriv* P = getPrivatePart(); + connection& con = *(P->m_connection); + work trans( con, "getting the data..." ); + stringstream sqlss; + sqlss << "select * from " << ctab << endl; + result res = trans.exec( sqlss.str() ); + + { + + ofstream oss( outSQLFileName.c_str() ); + oss << "create table main " << endl + << " ( " << endl + << " id int primary key" << endl; + int max = m_attrIDToString.size(); + for( int i = 0; i < max; ++i ) + { + FerrisBitMagic::bvector<> t; + t[ i ] = 1; + string ac = AttrIDToString( t ); + oss << ", " << ac << " int" << endl; + } + oss << " ); " << endl; + } + + fh_latticelayout lay = new LatticeLayout_Layered(); + lay->layout( this ); +// cerr << "Lattice is layed out..." << endl; + + { + ofstream oss( outXMLFileName.c_str() ); + oss << "" << endl; + oss << "" << endl; + oss << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl; + + stringstream sqlss; + sqlss << "select * from " << ctab; +// cerr << "SQL:" << sqlss.str() << endl; + result res = trans.exec( sqlss.str() ); + + // + // nodes + // + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + int id = 0; + stringlist_t addedAttrsList; + + string addedAttrs; + int support_abs = 0; + int nodeX = 0; + int nodeY = 0; + + iter["id"].to( id ); + iter["support_abs"].to( support_abs ); + iter["lattice_added_attrs"].to( addedAttrs ); + PGArrayToStringList( addedAttrs, addedAttrsList ); + if( !addedAttrs.empty() ) + addedAttrs = addedAttrs.substr( 1, addedAttrs.length() - 2 ); + + fh_concept concept = getConcept( id ); + nodeX = (int)(concept->getX() * CoordScaleFactor); + nodeY = (int)(concept->getY() * CoordScaleFactor); +// cerr << "Concept.id:" << concept->getID() +// << " x:" << concept->getX() +// << " y:" << concept->getY() +// << endl; + + + oss << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " + << support_abs << "" << endl + << " " << endl + << " " << endl; + + for( stringlist_t::const_iterator si = addedAttrsList.begin(); + si != addedAttrsList.end(); ++si ) + { + string s = *si; + FerrisBitMagic::bvector<> bv = StringToAttrID( s ); + FerrisBitMagic::bvector<>::enumerator an = bv.first(); + long v = *an; + + oss << " " + << "" + << s << "" << endl; + } + + oss << " " << endl + << " " << endl + << " " << endl + << " 0.0" << endl + << " 0.0" << endl + << " " << endl + << " " << endl; + } + + + // + // edges + // + for( result::const_iterator iter = res.begin(); iter != res.end(); ++iter ) + { + int id = 0; + stringlist_t childrenList; + string s; + + iter["id"].to( id ); + iter["lattice_children"].to( s ); + PGArrayToStringList( s, childrenList ); + +// cerr << "id:" << id << " to children:" << Util::createSeperatedList(childrenList) << endl; + + for( stringlist_t::const_iterator si = childrenList.begin(); + si != childrenList.end(); ++si ) + { + string child = *si; + oss << " " << endl; + } + } + + + + oss << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl; + + + + } + + } + + + int + ConceptLattice::getStrSubCtxInt( const std::string& k, int def ) + { + return + toint( + getStrSubCtx( + m_latticeTree, k, tostr(def) ) ); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +#ifdef HAVE_LIBPQXX + class LatticeRootConcept; + + /** + * Individual concept in a concept lattice. + */ + class FERRISEXP_DLLLOCAL ConceptContext + : + public StateLessEAHolding_Recommending_ParentPointingTree_Context< ConceptContext > + { + typedef StateLessEAHolding_Recommending_ParentPointingTree_Context< ConceptContext > _Base; + typedef ConceptContext _Self; + friend class Ferris::RootContextFactory; + friend class LatticeRootConcept; + + fh_concept m_concept; + bool m_extentViewer; // are we an 'extent' sub-directory + bool m_contingentViewer; // are we an 'cont' sub-directory + std::string m_ViewOfExtentRecommendedEA; + int m_extentSizeLimit; // max number of files to show if( isExtentViewer() ) + + public: + typedef std::map< string, string > m_ViewOfExtentSchemas_t; + m_ViewOfExtentSchemas_t m_ViewOfExtentSchemas; + private: + + void setConcept( fh_concept& v ); + void isExtentViewer( bool v ); + void isContingentViewer( bool v ); + bool getIsViewOfExtent() + { + return m_extentViewer | m_contingentViewer; + } + void setExtentSizeLimit( int v ) + { + m_extentSizeLimit = v; + } + + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + + int getStrSubCtxInt( const std::string& k, int def ); + void priv_createExtentViewerSubDir( const char* name, const int limit ); + void createExtentViewerSubDir(); + + protected: + virtual void priv_read_files(); + virtual void priv_read(); + + virtual long priv_guessSize() throw(); + virtual bool getHasSubContextsGuess() + { + if( getIsViewOfExtent() ) + return false; + return _Base::getHasSubContextsGuess(); + } + + + public: + + ConceptContext( Context* parent = 0, const std::string& rdn = "" ); + virtual ~ConceptContext(); + + virtual fh_iostream getEAStream( Context* c, const std::string& rdn, EA_Atom* atom ); + virtual void setEAStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ); + + LatticeRootConcept* getLatticeRootConcept(); + fh_conceptLattice getLattice(); + fh_concept getConcept(); + + std::string getRecommendedEA(); + virtual void createStateLessAttributes( bool force = false ); + static fh_stringstream + SL_getExtentSize( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getID( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getExtentViewerRecommendedEA( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getFormalAttributes( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getAddedAttributes( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getAddedAttributesRelativeToParent( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getAddedAttributesRelativeToParentLabel( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream + SL_getFishEyeLabel( ConceptContext* c, const std::string& rdn, EA_Atom* atom ); + + string getBaseTableName(); + }; + + class LatticeRootConceptVFS_RootContextDropper; + + /** + * Contains the database info etc to get the CFI from. + */ + class FERRISEXP_DLLLOCAL LatticeRootConcept + : public ParentPointingTreeContext< ConceptContext > + { + typedef ParentPointingTreeContext< ConceptContext > _Base; + typedef ConceptContext _Self; + friend class Ferris::RootContextFactory; + friend class LatticeRootConceptVFS_RootContextDropper; + friend class ConceptContext; + + fh_context m_metadata; + string m_user; + string m_port; + string m_host; + string m_dbname; + string m_CFITableName; + string m_findexPath; + connection* db_connection; + + fh_conceptLattice m_conceptLattice; + + void ensureDatabaseConnection(); + void readConcepts(); + void connectConcepts(); + + protected: + virtual void priv_read(); + + + public: + + LatticeRootConcept( Context* parent = 0, + const std::string& rdn = "", + fh_context md = 0 ); + virtual ~LatticeRootConcept(); + + virtual fh_iostream getEAStream( Context* c, const std::string& rdn, EA_Atom* atom ); + virtual void setEAStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ); + + fh_conceptLattice getLattice(); + + string getBaseTableName(); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class DatabaseResultSetContext + : + public StateLessEAHolder< DatabaseResultSetContext, FakeInternalContext > + { + typedef StateLessEAHolder< DatabaseResultSetContext, FakeInternalContext > _Base; + typedef DatabaseResultSetContext _Self; + + typedef stringmap_t m_md_t; +// typedef std::hash_map< string, string > m_md_t; +// typedef Loki::AssocVector< string, string > m_md_t; +// typedef FAssocVector< string, string > m_md_t; + m_md_t m_md; + + protected: + + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + virtual void createStateLessAttributes( bool force = false ); + virtual void priv_createAttributes() + { + imageEAGenerator_priv_createAttributes(); + } + + public: + DatabaseResultSetContext( Context* parent = 0, + const std::string& rdn = "" ); + virtual ~DatabaseResultSetContext(); + + std::string getRecommendedEA() + { +// cerr << "PGContext::getRecommendedEA()" +// << getStrAttr( getParent(), "extent-viewer-recommended-ea", "name" ) +// << endl; + + return getStrAttr( getParent(), "extent-viewer-recommended-ea", "name" ); + } +// stringstream ss; +// for( m_md_t::const_iterator mdi = m_md.begin(); +// mdi != m_md.end(); ++mdi ) +// { +// ss << mdi->first << ","; +// } +// return ss.str(); +// } + + + void constructObject( ConceptContext* cc, result::const_iterator& iter ); + virtual std::string getURL() + { + return getDirName(); + } + virtual int getImageWidth() + { + m_md_t::const_iterator mi = m_md.find("width"); +// cerr << "PGContext::getImageWidth() bound:" << ( mi != m_md.end() ) << endl; + if( mi != m_md.end() ) + return toint(mi->second); + return _Base::getImageWidth(); + } + virtual int getImageHeight() + { + m_md_t::const_iterator mi = m_md.find("height"); + if( mi != m_md.end() ) + return toint(mi->second); + return _Base::getImageHeight(); + } + + + static fh_stringstream + SL_getSizeStream( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ); + static fh_stringstream + SL_getFerrisType( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ); + static fh_stringstream + SL_getDelegateName( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ); + + virtual void ensureAttributesAreCreated( const std::string& eaname = "" ) + { + } + + string toCachedAttrName( string s ) + { + return "cached-" + s; + } + string fromCachedAttrName( string s ) + { + return s.substr( strlen("cached-") ); + } + + fh_istream GetIStream( Context* c, const std::string& _rdn, EA_Atom* atom ) + { + string rdn = fromCachedAttrName( _rdn ); + LG_CTX_D << "GetIStream for rdn:" << rdn + << " this:" << getURL() + << endl; + + m_md_t::const_iterator mdi = m_md.find( rdn ); + if( mdi != m_md.end() ) + { + fh_stringstream ret; + ret << mdi->second; + return ret; + } + + fh_stringstream ss; + return ss; + } + + fh_iostream GetIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + return ss; + } + + + void IOStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream iss ) + { + } + + + fh_attribute + getAttribute( const std::string& _rdn ) throw( NoSuchAttribute ) + { +// cerr << "getAttribute() rdn:" << _rdn << endl; + + std::string rdn = _rdn; + + if( !rdn.length() || rdn == "." ) + { + rdn = "content"; + } + if( rdn == "content" || rdn == "size-human-readable" ) + { + return _Base::getAttribute( rdn ); + } + + string rawrdn = rdn; + rdn = toCachedAttrName( rdn ); + LG_CTX_D << "CacheContext::getAttribute rdn:" << rdn << endl; + + /* Try for cache hit */ + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + LG_CTX_D << "CacheContext::getAttribute cached for rdn:" << rdn << endl; + return new AttributeProxy( this, atom, rdn ); + } + + LG_CTX_D << "CacheContext::getAttribute create for rdn:" << rdn << endl; + /* Create new caching EA, attach it, and return attribute */ + addAttribute( rdn, + this, &_Self::GetIStream, + this, &_Self::GetIOStream, + this, &_Self::IOStreamClosed, + FXD_BINARY, // getUnderlyingEAType( rawrdn ), + 0 ); + if( EA_Atom* atom = getAttributeIfExists( rdn ) ) + { + return new AttributeProxy( this, atom, rdn ); + } + + std::stringstream ss; + ss << "NoSuchAttribute() for attr:" << rdn << endl; + Throw_NoSuchAttribute( tostr(ss), this ); + } + + // having a version of this method seems to create fairly large slowdown. +// virtual AttributeCollection::AttributeNames_t getAttributeNames() +// { +// stringset_t all; +// AttributeCollection::AttributeNames_t an = _Base::getAttributeNames(); + +// // all.reserve( m_md.size() + an.size() + 1 ); +// // copy( map_domain_iterator(m_md.begin()), +// // map_domain_iterator(m_md.end()), +// // inserter( all, all.end() )); + +// typedef stringmap_t m_md_t; +// m_md_t::const_iterator mde = m_md.end(); +// for( m_md_t::const_iterator mdi = m_md.begin(); mdi!=mde; ++mdi ) +// all.insert( mdi->first ); + +// for( AttributeCollection::AttributeNames_t::const_iterator ai = an.begin(); +// ai != an.end(); ++ai ) +// { +// all.insert( *ai ); +// } +// AttributeNames_t ret; +// copy( all.begin(), all.end(), back_inserter( ret )); + +// return ret; +// } + +// int +// getAttributeCount() +// { +// return Delegate->getAttributeCount(); +// } + bool + isAttributeBound( const std::string& rdn, + bool createIfNotThere + ) throw( NoSuchAttribute ) + { +// cerr << "isAttributeBound() rdn:" << rdn << endl; + + m_md_t::const_iterator mdi = m_md.find( rdn ); + if( mdi != m_md.end() ) + { +// cerr << " isAttributeBound(1) rdn:" << rdn << endl; + return true; + } + +// cerr << " isAttributeBound(2):" +// << _Base::isAttributeBound( rdn, createIfNotThere ) +// << endl; + return _Base::isAttributeBound( rdn, createIfNotThere ); + } + + + }; + + DatabaseResultSetContext::DatabaseResultSetContext( + Context* parent, + const std::string& rdn ) + : + _Base( parent, rdn ) + { + m_overMountAttemptHasAlreadyFailed = true; + createStateLessAttributes(); + } + + DatabaseResultSetContext::~DatabaseResultSetContext() + { + } + + fh_stringstream + DatabaseResultSetContext::SL_getSizeStream( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + m_md_t::const_iterator mdi = c->m_md.find( rdn ); + if( mdi != c->m_md.end() ) + { + ss << mdi->second; + } + else + { + ss << 0; + } + + return ss; + } + + fh_stringstream + DatabaseResultSetContext::SL_getFerrisType( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + ss << "special-file"; + return ss; + } + + fh_stringstream + DatabaseResultSetContext::SL_getDelegateName( DatabaseResultSetContext* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + string t = c->getDirName(); + int slashpos = t.rfind("/"); + if( slashpos != string::npos ) + ss << t.substr( slashpos+1 ); + else + ss << t; + return ss; + } + + void + DatabaseResultSetContext::createStateLessAttributes( bool force ) + { + static Util::SingleShot virgin; + if( virgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( "size", _Self::SL_getSizeStream, FXD_FILESIZE ); + SLEA( "ferris-type", _Self::SL_getFerrisType, XSD_BASIC_STRING ); + SLEA( "delegate-name", _Self::SL_getDelegateName, XSD_BASIC_STRING ); + + + SLEA( "fisheye-label", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "added-attributes", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "formal-attributes", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "id", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "added-attributes-relative-to-parent", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "added-attributes-relative-to-parent-label", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "name-label", _Self::SL_getNothingStream, XSD_BASIC_STRING ); + SLEA( "extent-size", _Self::SL_getStreamWithNumberOneStream, XSD_BASIC_INT ); + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + std::string + DatabaseResultSetContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + +// LG_FCA_D << "DatabaseResultSetContext::private_getStrAttr() rdn:" << rdn +// << " found:" << (mdi != m_md.end()) +// << endl; + + if( rdn == "ferris-type" ) + { + return "special-file"; + } + + // FIXME: we need a typemap here using on the basetable's values. + if( starts_with( rdn, "schema:" ) ) + { + if( ConceptContext* cc = dynamic_cast(getParent())) + { + string eaname = rdn.substr( strlen("schema:") ); + ConceptContext::m_ViewOfExtentSchemas_t::const_iterator sci = + cc->m_ViewOfExtentSchemas.find( eaname ); + if( sci != cc->m_ViewOfExtentSchemas.end() ) + { + return sci->second; + } + } + return "schema://xsd/attributes/string"; + } + + + if( rdn == "ea-names" ) + { + stringset_t all; + stringstream ss; + +// copy( map_domain_iterator(m_md.begin()), +// map_domain_iterator(m_md.end()), +// inserter( all, all.end() )); + m_md_t::const_iterator mdi_end = m_md.end(); + for( m_md_t::const_iterator mdi = m_md.begin(); + mdi != mdi_end; ++mdi ) + { + all.insert( mdi->first ); + } + + + AttributeCollection::AttributeNames_t an; + getAttributeNames( an ); + for( AttributeCollection::AttributeNames_t::const_iterator ai = an.begin(); + ai != an.end(); ++ai ) + { + all.insert( *ai ); + } + +// Util::parseCommaSeperatedList( +// _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ), +// all ); + + return Util::createSeperatedList( all ); + } + + + static stringset_t skipAttrs; + if( skipAttrs.empty() ) + { + skipAttrs.insert( "recommended-ea" ); + } + if( skipAttrs.find( rdn ) != skipAttrs.end() + || starts_with( rdn, "schema:" ) ) + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + + + m_md_t::const_iterator mdi = m_md.find( rdn ); + if( mdi != m_md.end() ) + { +// cerr << "found rdn:" << rdn << " value:" << mdi->second << endl; + + return mdi->second; + } + +// cerr << "DatabaseResultSetContext attribute not bound:" << rdn << endl; + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + + +// if( throwEx ) +// { +// stringstream ss; +// ss << "DatabaseResultSetContext attribute not bound:" << rdn << endl; +// cerr << ss.str() << endl; +// cerr << "priv_isBound:" << AttributeCollection::isAttributeBound( rdn, false ) << endl; +// Throw_NoSuchAttribute( ss.str(), this ); +// } +// return def; + } + + void + DatabaseResultSetContext::constructObject( ConceptContext* cc, result::const_iterator& iter ) + { + static int VIRG = true; + + ConceptContext::m_ViewOfExtentSchemas_t& m = cc->m_ViewOfExtentSchemas; + + // The mdi 'hint' only works if the SQL query selects in order. +// m_md_t::iterator mdi = m_md.end(); + result::tuple::const_iterator e = iter->end(); + for( result::tuple::const_iterator cur = iter->begin(); + cur != e; ++cur ) + { + const char* name = cur->name(); + +// mdi = m_md.insert( mdi, make_pair( name, cur->c_str() ) ); + m_md.insert( make_pair( name, cur->c_str() ) ); +// m_md.insert( make_pair( name, v )); +// m_md[ name ] = v; + if( !strcmp( name, "url") ) + { + string v; + cur->to( v ); + m_md[ "realpath" ] = v; + m_md[ "name" ] = v; + } + +// if( VIRG ) +// { +// const oid ftype = cur->type(); +// cerr << "name:" << name +// << " ftype:" << ftype << " ftype.str:" << to_string( ftype ) +// << endl; +// } + + +// if( VIRG ) +// cerr << "k:" << name << " v:" << v << endl; + } + +// if( VIRG ) +// { +// VIRG = false; +// string rea = getRecommendedEA(); +// cerr << "rea:" << rea << endl; + +// cerr << " width by lookup:" << getImageWidth() << endl; +// cerr << " ea-names:" << getStrAttr( this, "ea-names", "N/A" ) << endl; +// } + + VIRG = false; + + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ConceptContext::ConceptContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ), + m_concept( 0 ), + m_extentViewer( false ), + m_contingentViewer( false ), + m_ViewOfExtentRecommendedEA( "name" ), + m_extentSizeLimit( EXTENT_VIEWER_DEFAULT_MAX_FILES ) + { + this->createStateLessAttributes(); + } + + ConceptContext::~ConceptContext() + { + } + + void + ConceptContext::setConcept( fh_concept& v ) + { + LG_FCA_D << "ConceptContext::setConcept() v:" << v->getID() << endl; + m_concept = v; + } + + void + ConceptContext::isExtentViewer( bool v ) + { + m_extentViewer = v; + } + + void + ConceptContext::isContingentViewer( bool v ) + { + m_contingentViewer = v; + } + + fh_iostream + ConceptContext::getEAStream( + Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "Attempt to get a stream from a" + << " getEAStream() call on " + << " a ConceptContext. Please report this bug." + << " to create the ea:" << rdn + << " output." + << " path:" << this->getDirPath() + << std::endl; + std::cerr << tostr(ss) << std::endl; + Throw_CanNotGetStream( tostr(ss), c ); + + } + + void + ConceptContext::setEAStream( + Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ) + { + } + + LatticeRootConcept* + ConceptContext::getLatticeRootConcept() + { + ConceptContext* bc = getBaseContext(); + LatticeRootConcept* bp = dynamic_cast( bc->getParent() ); + return bp; + } + + + fh_conceptLattice + ConceptContext::getLattice() + { + return getLatticeRootConcept()->getLattice(); + } + + + fh_concept + ConceptContext::getConcept() + { + return m_concept; + } + + static string createRDN( fh_conceptLattice cl, fh_concept parent, fh_concept child ) + { + string ret = tostr( child->getID() ); + + stringlist_t addedAttrs; + addedAttrs = cl->getAddedAttributes( parent, child ); + string t = Util::createSeperatedList( addedAttrs ); + +// cerr << "Added attrs for id:" << child->getID() << " t->:" << t << ":<-" << endl; + + if( !t.empty() ) + return t; + + return ret; + } + + string + ConceptContext::getBaseTableName() + { + return getLatticeRootConcept()->getBaseTableName(); + } + + void + ConceptContext::priv_read_files() + { + if( !getIsViewOfExtent() ) + return; + + // + // setup m_ViewOfExtentRecommendedEA + // + { + stringstream ss; + ss << "name,size,mtime,"; + Context* c = this; + while( !dynamic_cast( c ) ) + { + string rdn = c->getDirName(); + if( rdn != EXTENT_SUBDIR_NAME && + rdn != CONTINGENT_SUBDIR_NAME && + rdn != CONTINGENT_SAMPLE_SUBDIR_NAME && + rdn != EXTENT_SAMPLE_SUBDIR_NAME ) + { + ss << rdn << ","; + } + c = c->getParent(); + } + m_ViewOfExtentRecommendedEA = ss.str(); +// cerr << "m_ViewOfExtentRecommendedEA:" << m_ViewOfExtentRecommendedEA << endl; + } + + + fh_conceptLattice cl = getLattice(); + stringlist_t itemNames; + cl->AttrIDToStringList( m_concept->getItemSet(), itemNames ); + + stringstream sqlss; +// sqlss << "select * from " << getBaseTableName() << " " +// << " where "; +// bool v=true; + +// sqlss << "select * from docmap, " << getBaseTableName() << " d " +// << " where docmap.docid = d.docid and d.docid in ("; +// { +// FerrisBitMagic::bvector<>& bv = m_extentViewer +// ? m_concept->m_MatchingDocIDs : m_concept->m_conceptOnlyMatchingDocIDs; + +// FerrisBitMagic::bvector<>::enumerator an = bv.first(); +// FerrisBitMagic::bvector<>::enumerator an_end = bv.end(); +// for( bool virgin = true; an < an_end ; virgin=false ) +// { +// if( !virgin ) +// sqlss << ','; +// sqlss << *an; +// ++an; // Fastest way to increment enumerator +// } +// } +// sqlss << ");"; + + + sqlss << "select * from docmap,urlmap um, " << getBaseTableName() << " d " + << " where docmap.docid = d.docid " + << " and um.urlid = d.urlid "; + string btab = getBaseTableName(); + bool v=false; + for( stringlist_t::const_iterator si = itemNames.begin(); + si != itemNames.end(); ++si ) + { + if( v ) v = false; + else sqlss << " and "; + sqlss << " " << getBitFunctionName(btab,*si) << "(d.bitf) "; +// sqlss << " " << getBaseTableName() << ".\"" << *si << "\"='t' "; + } + if( !m_extentViewer ) + { + stringset_t intent; + copy( itemNames.begin(), itemNames.end(), inserter( intent, intent.end() )); + stringlist_t sl; + cl->getAllAttributeNames( sl ); + for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + { + if( intent.find( *si ) == intent.end() ) + { + sqlss << " and not " << getBitFunctionName(btab,*si) << "(d.bitf) "; +// sqlss << " and "; +// sqlss << " " << getBaseTableName() << ".\"" << *si << "\"<>'t' "; + } + } + } + if( m_extentSizeLimit ) + { + sqlss << " limit " << m_extentSizeLimit << endl; + } + sqlss << " ;"; + + LG_FCA_D << "SQL:" << sqlss.str() << endl; + + connection& con = *(getLatticeRootConcept()->db_connection); + work trans( con, "getting the extent..." ); + result res = trans.exec( sqlss.str() ); + + + // + // setup m_ViewOfExtentSchemas + // + { + m_ViewOfExtentSchemas.clear(); + m_ViewOfExtentSchemas[ "name" ] = "schema://xsd/attributes/string"; + m_ViewOfExtentSchemas[ "size" ] = "schema://xsd/attributes/decimal/integer"; + m_ViewOfExtentSchemas[ "mtime" ] = "schema://xsd/attributes/decimal/integer/long/fs/time"; + m_ViewOfExtentSchemas[ "atime" ] = "schema://xsd/attributes/decimal/integer/long/fs/time"; + m_ViewOfExtentSchemas[ "ctime" ] = "schema://xsd/attributes/decimal/integer/long/fs/time"; + if( !res.empty() ) + { + result::const_iterator ri = res.begin(); + result::tuple::const_iterator e = ri->end(); + for( result::tuple::const_iterator cur = ri->begin(); cur != e; ++cur ) + { + string name = cur->name(); + const oid coltype = cur->type(); +// string v; +// cur->to( v ); + + // server/catalog/pg_type.h + switch( coltype ) + { + case BOOLOID: + m_ViewOfExtentSchemas[ name ] = "schema://xsd/attributes/boolean"; + break; + case INT8OID: + case INT2OID: + case INT4OID: + m_ViewOfExtentSchemas[ name ] = "schema://xsd/attributes/decimal/integer"; + break; + case TIMESTAMPOID: + m_ViewOfExtentSchemas[ name ] + = "schema://xsd/attributes/decimal/integer/long/fs/time"; + break; + case VARCHAROID: + m_ViewOfExtentSchemas[ name ] = "schema://xsd/attributes/string"; + break; + default: + m_ViewOfExtentSchemas[ name ] = "schema://xsd/attributes/string"; + } + } + } + } + + LG_FCA_D << "files in extent:" << res.size() << endl; + int fileCount = 0; + for( result::const_iterator iter = res.begin(); + iter != res.end(); ++iter ) + { + string url = ""; + iter["url"].to(url); + LG_FCA_D << "url " << url << endl; + + string rdn = url; + + DatabaseResultSetContext* child = 0; + child = priv_ensureSubContext( rdn, child ); + child->constructObject( this, iter ); + + ++fileCount; + if( fileCount >= m_extentSizeLimit ) + { + break; + } + } + } + + fh_context + ConceptContext::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + fh_conceptLattice cl = getLattice(); + + if( getIsViewOfExtent() ) + { + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { + return *subc_iter; + } +// if( priv_isSubContextBound( rdn ) ) +// return _Base::priv_getSubContext( rdn ); + } + + fh_concept parent = getConcept(); + clist_t ch = parent->getChildren(); + + for( clist_t::const_iterator ci = ch.begin(); ci != ch.end(); ++ci ) + { + fh_concept c = *ci; + string child_rdn = createRDN( cl, parent, c ); + if( child_rdn == rdn ) + { + if( priv_isSubContextBound( rdn ) ) + return _Base::priv_getSubContext( rdn ); + + ConceptContext* child = new ConceptContext( this, rdn ); + child->setConcept( c ); + Insert( child ); + return child; + } + } + + createExtentViewerSubDir(); + + return _Base::priv_getSubContext( rdn ); + } + catch( NoSuchSubContext& e ) + { + throw e; + } + catch( exception& e ) + { + string s = e.what(); + Throw_NoSuchSubContext( s, this ); + } + catch(...) + {} + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + void + ConceptContext::priv_createExtentViewerSubDir( const char* name, const int limit ) + { + ConceptContext* child = 0; + child = priv_ensureSubContext( name, child ); + child->setConcept( m_concept ); + child->isExtentViewer( true ); + child->setExtentSizeLimit( limit ); + } + + int + ConceptContext::getStrSubCtxInt( const std::string& k, int def ) + { + return getLattice()->getStrSubCtxInt( k, def ); + } + + + void + ConceptContext::createExtentViewerSubDir() + { + bool isViewOfExtent = getIsViewOfExtent(); + if( isViewOfExtent ) + return; + +// priv_createExtentViewerSubDir( EXTENT_SUBDIR_NAME, EXTENT_SUBDIR_LIMIT ); +// priv_createExtentViewerSubDir( EXTENT_SAMPLE_SUBDIR_NAME, EXTENT_SAMPLE_SUBDIR_LIMIT ); +// priv_createExtentViewerSubDir( CONTINGENT_SUBDIR_NAME, CONTINGENT_SUBDIR_LIMIT ); +// priv_createExtentViewerSubDir( CONTINGENT_SAMPLE_SUBDIR_NAME, CONTINGENT_SAMPLE_SUBDIR_LIMIT ); + + priv_createExtentViewerSubDir( + EXTENT_SUBDIR_NAME, + getStrSubCtxInt( "extent-subdir-limit", EXTENT_SUBDIR_LIMIT)); + priv_createExtentViewerSubDir( + EXTENT_SAMPLE_SUBDIR_NAME, + getStrSubCtxInt( "extent-sample-subdir-limit", EXTENT_SAMPLE_SUBDIR_LIMIT )); + priv_createExtentViewerSubDir( + CONTINGENT_SUBDIR_NAME, + getStrSubCtxInt( "contingent-subdir-limit", CONTINGENT_SUBDIR_LIMIT )); + priv_createExtentViewerSubDir( + CONTINGENT_SAMPLE_SUBDIR_NAME, + getStrSubCtxInt( "contingent-sample-subdir-limit", CONTINGENT_SAMPLE_SUBDIR_LIMIT )); + + } + + + void + ConceptContext::priv_read() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + LG_FCA_D << "priv_read() url:" << getURL() + << " #sc:" << getSubContextCount() << endl; + + clearContext(); + fh_conceptLattice cl = getLattice(); + bool isViewOfExtent = getIsViewOfExtent(); + + if( !isViewOfExtent ) + { + fh_concept parent = getConcept(); + clist_t ch = parent->getChildren(); + + LG_FCA_D << "priv_read() parent:" << parent->getID() + << " childdirs:" << ch.size() + << endl; + + for( clist_t::const_iterator ci = ch.begin(); ci != ch.end(); ++ci ) + { + fh_concept c = *ci; + string rdn = createRDN( cl, parent, c ); + +// if( priv_isSubContextBound( rdn ) ) +// continue; + + ConceptContext* child = 0; + child = priv_ensureSubContext( rdn, child ); + child->setConcept( c ); + } + } + + createExtentViewerSubDir(); + priv_read_files(); + } + + long + ConceptContext::priv_guessSize() throw() + { + return getConcept()->getExtentSize(); + } + + + std::string + ConceptContext::getRecommendedEA() + { +// if( getIsViewOfExtent() ) +// return _Base::getRecommendedEA(); + return _Base::getRecommendedEA() + ",extent-size"; + } + + fh_stringstream + ConceptContext::SL_getExtentSize( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + fh_concept ivc = c->getConcept(); + + if( !c->m_contingentViewer ) + { + ss << ivc->getExtentSize(); + } + else + { + ss << ivc->getConceptOnlyMatchSize(); + } + + return ss; + } + + fh_stringstream + ConceptContext::SL_getID( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_concept ivc = c->getConcept(); + ss << ivc->getID(); + return ss; + } + + fh_stringstream + ConceptContext::SL_getExtentViewerRecommendedEA( + ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->m_ViewOfExtentRecommendedEA; + return ss; + } + + fh_stringstream + ConceptContext::SL_getFormalAttributes( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_concept ivc = c->getConcept(); + + clist_t intent = ivc->getIntent(); +// cerr << "ConceptContext::SL_getFormalAttributes() url:" << c->getURL() << endl; +// cerr << "ConceptContext::SL_getFormalAttributes() intent.sz:" << intent.size() << endl; +// cerr << "ConceptContext::SL_getFormalAttributes() upset.sz:" << ivc->getUpSet().size() << endl; + + intent = ivc->getUpSet(); + + stringlist_t sl; + for( clist_t::iterator iter = intent.begin(); iter!=intent.end(); ++iter ) + { + (*iter)->getAddedFormalConceptAttributes( sl ); + } + ss << Util::createCommaSeperatedList( sl ); + return ss; + } + + fh_stringstream + ConceptContext::SL_getAddedAttributes( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_concept ivc = c->getConcept(); + + stringlist_t sl; + ivc->getAddedFormalConceptAttributes( sl ); + ss << Util::createCommaSeperatedList( sl ); + return ss; + } + + fh_stringstream + ConceptContext::SL_getAddedAttributesRelativeToParent( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + if( !c->isParentBound() ) + return ss; + + fh_concept ivc = c->getConcept(); + ConceptContext* p = dynamic_cast(c->getParent()); + fh_concept pivc = p->getConcept(); + fh_conceptLattice cl = ivc->getConceptLattice(); + + stringlist_t sl; + ivc->getAddedFormalConceptAttributesRelativeToParent( pivc, sl ); + cl->makeReducedAttributes( sl ); + ss << Util::createCommaSeperatedList( sl ); + return ss; + } + + fh_stringstream + ConceptContext::SL_getAddedAttributesRelativeToParentLabel( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + if( !c->isParentBound() ) + return ss; + + fh_concept ivc = c->getConcept(); + ConceptContext* p = dynamic_cast(c->getParent()); + if( !p ) + return ss; + fh_concept pivc = p->getConcept(); + fh_conceptLattice cl = ivc->getConceptLattice(); + + stringlist_t sl; + ivc->getAddedFormalConceptAttributesRelativeToParent( pivc, sl ); + cl->makeReducedAttributes( sl ); + cl->convertAttributeNamesToLabels( sl ); + ss << Util::createSeperatedList( sl, ", " ); + return ss; + } + + + fh_stringstream + ConceptContext::SL_getFishEyeLabel( ConceptContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_concept ivc = c->getConcept(); + stringlist_t sl; + + ivc->getFishEyeLabel( sl ); + ss << Util::createSeperatedList( sl, ", " ); + return ss; + } + + void + ConceptContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + tryAddStateLessAttribute( "extent-size", + SL_getExtentSize, + XSD_BASIC_INT ); + tryAddStateLessAttribute( "id", SL_getID, XSD_BASIC_INT ); + tryAddStateLessAttribute( "extent-viewer-recommended-ea", + SL_getExtentViewerRecommendedEA, + FXD_STRINGLIST ); + + tryAddStateLessAttribute( "formal-attributes", + SL_getFormalAttributes, + FXD_STRINGLIST ); + tryAddStateLessAttribute( "added-attributes", + SL_getAddedAttributes, + FXD_STRINGLIST ); + + tryAddStateLessAttribute( "fisheye-label", + SL_getFishEyeLabel, + FXD_STRINGLIST ); + + tryAddStateLessAttribute( "added-attributes-relative-to-parent", + SL_getAddedAttributesRelativeToParent, + FXD_STRINGLIST ); + tryAddStateLessAttribute( "added-attributes-relative-to-parent-label", + SL_getAddedAttributesRelativeToParentLabel, + FXD_STRINGLIST ); + tryAddStateLessAttribute( "name-label", + SL_getAddedAttributesRelativeToParentLabel, + FXD_STRINGLIST ); + + + _Base::createStateLessAttributes( true ); + } + } + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + + LatticeRootConcept::LatticeRootConcept( + Context* parent, + const std::string& rdn, + fh_context md ) + : + _Base( parent, rdn ), + m_metadata( 0 ), + m_conceptLattice( 0 ), + m_user(""), + m_port(""), + m_host("localhost"), + m_dbname(""), + db_connection(0) + { + this->createStateLessAttributes(); + + if( parent ) + m_dbname = parent->getDirName(); + if( md ) + { + m_metadata = md; + m_CFITableName = getStrSubCtx( md, "tablename-cfi", "", true, true ); + m_findexPath = getStrSubCtx( md, "findex-path", "", true, true ); + } + + + } + + LatticeRootConcept::~LatticeRootConcept() + { + } + + fh_iostream + LatticeRootConcept::getEAStream( + Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "Attempt to get a stream from a" + << " getEAStream() call on " + << " a LatticeRootConcept. Please report this bug." + << " to create the ea:" << rdn + << " output." + << " path:" << this->getDirPath() + << std::endl; + std::cerr << tostr(ss) << std::endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + void + LatticeRootConcept::setEAStream( + Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ) + { + } + + void + LatticeRootConcept::ensureDatabaseConnection() + { + if( db_connection ) + return; + + stringstream ss; + string user = ""; + string port = ""; + + if( !m_user.empty() ) + ss << " user=" << m_user; + if( !m_host.empty() ) + ss << " host=" << m_host; + if( !m_port.empty() ) + ss << " port=" << m_port; + ss << " dbname=" << m_dbname; + + string constring = ss.str(); + + db_connection = new connection( constring ); + + if( !db_connection ) + { + fh_stringstream ss; + ss << "Faield to connect to backend database for dbname:" << m_dbname + << " constring:" << constring +// << " error:" << e.what() + << " path:" << this->getDirPath() + << std::endl; + std::cerr << tostr(ss) << std::endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + } + + void + LatticeRootConcept::priv_read() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + clearContext(); + + LG_FCA_D << "priv_read() #sc:" << getSubContextCount() << endl; + + ensureDatabaseConnection(); + + LG_FCA_D << "getting the data..." << endl; + + m_conceptLattice = ConceptLattice::load( m_metadata->getURL() ); + fh_concept top = m_conceptLattice->getTopConcept(); + fh_concept bot = m_conceptLattice->getBottomConcept(); + + LG_FCA_D << "have-top:" << isBound(top) << endl; + LG_FCA_D << "have-bot:" << isBound(bot) << endl; + LG_FCA_D << "top:" << top->getID() << " bot:" << bot->getID() << endl; + + clist_t ch = top->getChildren(); + for( clist_t::const_iterator ci = ch.begin(); ci != ch.end(); ++ci ) + { + fh_concept c = *ci; + string rdn = createRDN( m_conceptLattice, top, c ); + ConceptContext * child = 0; + child = priv_ensureSubContext( rdn, child ); + child->setConcept( c ); + } + } + + + fh_conceptLattice + LatticeRootConcept::getLattice() + { + return m_conceptLattice; + } + + string + LatticeRootConcept::getBaseTableName() + { + return m_conceptLattice->getBaseTableName(); + } + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + static fh_istream + GetExtentSizeFromSubContextCount( Context* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + ss << getStrAttr( c, "subcontext-count", "1" ); + return ss; + } + + + class FERRISEXP_DLLLOCAL LatticeRootConceptVFS_RootContextDropper + : public RootContextDropper + { + public: + LatticeRootConceptVFS_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("fca"); + RootContextFactory::Register("fca", this); + } + virtual fh_context Brew(RootContextFactory* rf) + throw( RootContextCreationFailed ) + { + try + { + static LatticeRootConcept raw_obj; + + Context* ctx = raw_obj.CreateContext( 0, "/"); + + ctx->addAttribute( "extent-size", + &GetExtentSizeFromSubContextCount, + XSD_BASIC_INT, true ); + + fh_context lc = Shell::acquireContext( "~/.ferris/fcatree/localhost" ); + FakeInternalContext* our_lc = new FakeInternalContext( ctx, "localhost" ); + our_lc->addAttribute( "extent-size", + &GetExtentSizeFromSubContextCount, + XSD_BASIC_INT, true ); + ctx->Insert( our_lc ); + + for( Context::iterator dbi = lc->begin(); dbi != lc->end(); ++dbi ) + { + fh_context dbchild = *dbi; + if( isFalse( getStrAttr( dbchild, "is-dir", "0" ) ) ) + continue; + + FakeInternalContext* our_dbchild = new FakeInternalContext( + our_lc, dbchild->getDirName() ); + our_lc->Insert( our_dbchild ); + + for( Context::iterator viewiter = dbchild->begin(); + viewiter != dbchild->end(); ++viewiter ) + { + fh_context viewchild = *viewiter; + + if( !viewchild->isSubContextBound("tablename-cfi") + || !viewchild->isSubContextBound("findex-path") + ) + { + continue; + } + + Context* our_viewchild = new LatticeRootConcept( + our_dbchild, viewchild->getDirName(), viewchild ); + our_dbchild->Insert( our_viewchild ); + } + } + + + + return ctx; + } + catch( exception& e ) + { + cerr << e.what() << endl; + LG_CTX_W << e.what() << endl; + throw e; + } + } + + }; + + static LatticeRootConceptVFS_RootContextDropper ___LatticeRootConceptVFS_static_init; + + +#endif + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + template < class Col, class Obj > + bool contains( Col& col, Obj& o ) + { + return col.end() != find( col.begin(), col.end(), o ); + } + + + bool filter_compare( filters_t la, filters_t lb ) + { + int lasz = la.size(); + int lbsz = lb.size(); + + if( lasz != lbsz ) return false; + + la.sort(); + lb.sort(); + + list< fh_context >::const_iterator ai = la.begin(); + list< fh_context >::const_iterator bi = lb.begin(); + + for( ; bi != lb.end() && ai != la.end(); ++ai, ++bi ) + { + if( GetImpl( *ai ) == GetImpl( *bi ) ) + continue; + return false; + } + return true; + } + + struct SmallerIntentFirst + : public binary_function&, const list< fh_context >&, bool> + { + bool operator()(const list< fh_context >& x, const list< fh_context >& y) + { return x.size() < y.size(); } + }; + + static filters_t filter_intersection( filters_t::iterator b1, filters_t::iterator e1, + filters_t::iterator b2, filters_t::iterator e2 ) + { + filters_t ret; + + typedef list< Context* > cplist_t; + cplist_t col1, col2, t; + + for( filters_t::iterator i = b1; i != e1; ++i ) + col1.push_back( GetImpl( *i ) ); + + for( filters_t::iterator i = b2; i != e2; ++i ) + col2.push_back( GetImpl( *i ) ); + + set_intersection( col1.begin(), col1.end(), + col2.begin(), col2.end(), + back_inserter( t )); + + for( cplist_t::iterator i = t.begin(); i != t.end(); ++i ) + ret.push_back( *i ); + + return ret; + } + + float + LatticeLayout::getMagnificationFactor() + { + return 4.0; + } + + + void + LatticeLayout::assignPointToAll( fh_conceptLattice l, clist_t::iterator begin, clist_t::iterator end, const Point& p ) + { + for( clist_t::iterator iter = begin; iter != end; ++iter ) + { + (*iter)->setPoint( p ); + } + } + + void + LatticeLayout::assignPointToAll( fh_conceptLattice l, const Point& p ) + { + typedef std::list< fh_concept > L; + L concepts; + l->getConcepts( concepts ); + + for( L::const_iterator ci = concepts.begin(); ci!=concepts.end(); ++ci ) + { + fh_concept c = *ci; + c->setPoint( p ); + } + } + + + + void + LatticeLayout::assignZeroToRoot( fh_conceptLattice l ) + { + fh_concept root = l->getTopConcept(); + root->setLocation( 0, 0, 0 ); + } + + + + void + LatticeLayout::dump( fh_conceptLattice l ) + { + typedef std::list< fh_concept > L; + L concepts; + l->getConcepts( concepts ); + + //////////////// + // PURE DEBUG // + cerr << "LatticeLayout::assignVectorToAttributeVector(dump start) " << endl; + for( L::const_iterator ci = concepts.begin(); ci!=concepts.end(); ++ci ) + { + fh_concept c = *ci; + + Point p = c->getPoint(); + cerr << " p:" << p + << " id:" << c->getID() + << " fname:" << c->getFancyName() + << endl; + } + + cerr << "LatticeLayout::assignVectorToAttributeVector(dump end) " << endl; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + LatticeLayout_Additive::assignVectorToMI( fh_conceptLattice l, + float ix, float iy, float iz, + float dx, float dy, float dz ) + { + float x = ix; + float y = iy; + float z = iz; +// int currentDepth = 1; + + typedef map< int, int > levelCount_t; + levelCount_t levelCount; + + typedef map< int, list< Point > > levelPoints_t; + levelPoints_t levelPoints; + + typedef std::list< fh_concept > L; + L concepts; + l->getConcepts( concepts ); +// cerr << "LatticeLayout::assignVectorToAttributeVector concepts.sz:" << concepts.size() << endl; + + for( L::iterator ci = concepts.begin(); ci != concepts.end(); ++ci ) + { + fh_concept c = *ci; + if( c->isMeetIrreducible() ) + { + levelCount[ c->getMaxDepth() ]++; + } + } + + int reverse = 1; + float magnificationFactor = getMagnificationFactor(); + for( levelCount_t::iterator li = levelCount.begin(); li != levelCount.end(); ++li ) + { + int level = li->first; + +// float x = x = -1 * magnificationFactor * (li->second/2); + for( int i=0; isecond; ++i ) + { + levelPoints[ level ].push_back( Point( x, y, z ) ); + if( x < 0 ) + { + x *= -1; +// dx *= 1.2; + } + + x += dx; + x *= reverse; + reverse *= -1; +// if( x > -magnificationFactor && x < magnificationFactor ) +// x = magnificationFactor; + } + li->second = 0; + y += dy; + z += dz; + } + + + for( L::iterator ci = concepts.begin(); ci != concepts.end(); ++ci ) + { + fh_concept c = *ci; + if( c->isMeetIrreducible() ) + { +// cerr << "-------------------------------------" << endl; +// cerr << "assignVectorToAttributeVector(MIR) id:" << c->getID() << endl; + + int depth = c->getMaxDepth(); + list< Point >::iterator piter = levelPoints[ depth ].begin(); + advance( piter, levelCount[ depth ] ); + levelCount[ depth ] = levelCount[ depth ]+1; + Point p = *piter; + + const clist_t& upset = c->getUpSet( false ); + for( clist_t::const_iterator ui = upset.begin(); ui!=upset.end(); ++ui ) + { + fh_concept uc = *ui; + if( uc->isMeetIrreducible() ) + { +// cerr << "assignVectorToAttributeVector(parent MIR) uc id:" << uc->getID() << endl; + p+=uc->getPoint(); + } + } +// cerr << "assignVectorToAttributeVector(MIR setp) id:" << c->getID() +// << " point:" << p +// << endl; + c->setPoint( p ); +// x += dx; +// y += dy; +// z += dz; + +// int newDepth = c->getMaxDepth(); +// cerr << "assignVectorToAttributeVector(MIR) id:" << c->getID() +// << " currentDepth:" << currentDepth +// << " newDepth:" << newDepth +// << endl; +// if( newDepth > currentDepth ) +// { +// currentDepth = newDepth; +// x = 0; +// } + } + } + + return; + + + + +// typedef Lattice::m_conceptsByIntent_t m_conceptsByIntent_t; +// typedef Lattice::m_conceptsBySize_t m_conceptsBySize_t; +// fh_ivconcept rootivc = l->getRoot(); +// m_conceptsByIntent_t& m_conceptsByIntent = l->m_conceptsByIntent; +// typedef Lattice::m_baseFilters_t m_baseFilters_t; +// m_baseFilters_t& m_baseFilters = l->m_baseFilters; + +// float x = ix; +// float y = iy; +// float z = iz; + +// // for( m_baseFilters_t::iterator fi = m_baseFilters.begin(); fi != m_baseFilters.end(); ++fi ) +// // { +// // fh_context c = *fi; +// // m_attributeVector.insert( make_pair( c, Point( x, y, z ) ) ); +// // x += dx; +// // y += dy; +// // z += dz; +// // } +// // // +// // // Assign a vector to each contingent. +// // // +// // for( m_conceptsByIntent_t::iterator cbi = m_conceptsByIntent.begin(); +// // cbi != m_conceptsByIntent.end(); ++cbi ) +// // { +// // fh_ivconcept c = cbi->second; +// // filters_t fl = c->getContingentFilters(); + +// // if( !fl.empty() ) +// // { +// // cerr << "LatticeLayout::assignVectorToAttributeVector(Assign) " +// // << " c:" << c->getFancyName() +// // << " fl:" << filterToString( fl ) +// // << endl; +// // m_attributeVector.insert( make_pair( fl, Point( x, y, z ) ) ); +// // x += dx; +// // y += dy; +// // z += dz; +// // } +// // } + + +// // // +// // // Assign a vector to each contingent. +// // // +// // Lattice::m_conceptsInOrder_t& cio = l->getConceptsInOrder(); +// // for( Lattice::m_conceptsInOrder_t::iterator ci = cio.begin(); ci != cio.end(); ++ci ) +// // { +// // fh_concept c = *ci; +// // filters_t fl = c->getContingentFilters(); +// // if( !fl.empty() ) +// // { +// // cerr << "LatticeLayout::assignVectorToAttributeVector(Assign) " +// // << " c:" << c->getFancyName() +// // << " fl:" << filterToString( fl ) +// // << endl; +// // m_attributeVector.insert( make_pair( fl, Point( x, y, z ) ) ); +// // x += dx; +// // y += dy; +// // z += dz; +// // } +// // } + + +// // +// // Assign a vector to each contingent. +// // +// x = 0; +// bool reverse = false; +// Lattice::m_conceptsInOrder_t& cio = l->getConceptsInOrder(); +// for( Lattice::m_conceptsInOrder_t::reverse_iterator ci = cio.rbegin(); ci != cio.rend(); ++ci ) +// { +// fh_concept c = *ci; +// filters_t fl = c->getContingentFilters(); +// if( !fl.empty() ) +// { +// cerr << "LatticeLayout::assignVectorToAttributeVector(Assign) " +// << " c:" << c->getFancyName() +// << " fl:" << filterToString( fl ) +// << endl; +// m_attributeVector.insert( make_pair( fl, Point( x, y, z ) ) ); +// if( reverse ) x = -x - dx; +// else x = 0 - x + dx; +// // x += dx; +// y += dy; +// z += dz; +// reverse = !reverse; +// } +// } + + +// // // +// // // Assign a vector to each contingent. +// // // +// // m_attributeVector.insert( make_pair( rootivc->getContingentFilters(), Point( x, y, z ) ) ); +// // x += dx; +// // y += dy; +// // z += dz; +// // clist_t children = rootivc->Concept::getChildren(); +// // clist_t left; +// // clist_t right; +// // clist_t::iterator middle = children.begin(); +// // advance( middle, children.size() / 2 ); +// // copy( children.begin(), middle, back_inserter( left )); +// // copy( middle, children.end(), back_inserter( right )); + + } + + fh_conceptLattice + LatticeLayout_Additive::layout( fh_conceptLattice l ) + { +// cerr << "LatticeLayout_Additive::layout()" << endl; + + /** + * Position attribute concepts + */ + float magnificationFactor = getMagnificationFactor(); + float x = -1;//magnificationFactor; + float y = -magnificationFactor; + float z = 0.0; + + assignPointToAll( l, Point( 0, 0, 0 ) ); + +// x = -1 * magnificationFactor; + assignVectorToMI( l, + x, y, z, + 1.5, -1, 0 ); + +// // move root to middle +// { +// filters_t rootContFitlers = rootivc->getContingentFilters(); +// m_attributeVector_t::iterator avi = m_attributeVector.find( rootContFitlers ); +// if( avi != m_attributeVector.end() ) +// { +// m_attributeVector_t::iterator middle = m_attributeVector.begin(); +// advance( middle, m_attributeVector.size() / 2 ); +// swap( middle->second, avi->second ); +// } +// } +// dump( l ); + + + typedef std::list< fh_concept > L; + L concepts; + l->getConcepts( concepts ); +// cerr << "LatticeLayout::assignVectorToAttributeVector(MR) concepts.sz:" << concepts.size() << endl; + + for( L::iterator ci = concepts.begin(); ci != concepts.end(); ++ci ) + { + fh_concept c = *ci; + Point additive = c->getPoint(); + +// if( c->isMeetIrreducible() ) +// continue; + +// cerr << "------------------------------------------------------------------" << endl; +// cerr << "LatticeLayout::assignVectorToAttributeVector(MR) concept:" << c->getID() << endl; + + const clist_t& upset = c->getUpSet( false ); +// const clist_t& upset = c->getParents(); + for( clist_t::const_iterator ui = upset.begin(); ui!=upset.end(); ++ui ) + { + fh_concept uc = *ui; +// cerr << "LatticeLayout::assignVectorToAttributeVector(MR) uc:" << uc->getID() +// << " point:" << uc->getPoint() << endl; + additive+=uc->getPoint(); + } + + + int depth = c->getMaxDepth(); + if( depth ) + { + double ratio = additive.getY(); + additive.setY( -depth * magnificationFactor ); +// additive.setY( additive.getY() * 1.0/depth ); + ratio /= additive.getY(); + +// if( c->isMeetIrreducible() ) + additive.setX( additive.getX() / ratio ); + + } + + c->setPoint( additive ); + + } +// dump( l ); + + return l; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct OrdinateMaker + { + double v; + double dv; + int reverse; + + OrdinateMaker() + { + v = -1; + dv = 1; + reverse = -1; + } + double operator()() + { + if( v < 0 ) + { + v *= -1; + } + + v += dv; + v *= reverse; + reverse *= -1; + return v; + } + }; + + typedef std::list< fh_concept > L; + + void + LatticeLayout_Layered::shuffleToX( L& col, fh_concept c, double x ) + { + float mf = 2.0; + for( L::iterator li = col.begin(); li!=col.end(); ++li ) + { + fh_concept lc = *li; + double lcx = lc->getX(); + +// |<--------->| +// x lcx + + if( (x-mf/2) < lcx && lcx < (x+mf/2) ) + { + shuffleToX( col, lc, x + mf ); + break; + } + } + c->setX( x ); + } + + fh_conceptLattice + LatticeLayout_Layered::layout( fh_conceptLattice l ) + { +// cerr << "LatticeLayout_Layered::layout()" << endl; + + float magnificationFactor = getMagnificationFactor(); + + L concepts; + l->getConcepts( concepts ); + + typedef map< int, L > Layer_t; + Layer_t Layer; + + for( L::iterator ci = concepts.begin(); ci != concepts.end(); ++ci ) + { + fh_concept c = *ci; + int depth = c->getMaxDepth(); + c->setPoint( Point( 0, -depth * magnificationFactor, 0.0 )); + Layer[depth].push_back( c ); + } + + OrdinateMaker om; + for( Layer_t::iterator li = Layer.begin(); li!=Layer.end(); ++li ) + { + L& col = li->second; + for( L::iterator iter = col.begin(); iter != col.end(); ++iter ) + { + fh_concept c = *iter; + if( c->isMeetIrreducible() ) + { + double x = om(); + +// cerr << "Setting MI concept:" << c->getID() << " to x:" << x << endl; + c->setX( x ); + } + } + } + + for( Layer_t::iterator li = Layer.begin(); li!=Layer.end(); ++li ) + { + L& col = li->second; + for( L::iterator iter = col.begin(); iter != col.end(); ++iter ) + { + fh_concept c = *iter; + if( !c->isMeetIrreducible() ) + { + double x = c->getX(); + + const clist_t& upset = c->getUpSet( false ); + for( clist_t::const_iterator ui = upset.begin(); ui!=upset.end(); ++ui ) + { + fh_concept uc = *ui; +// cerr << "LatticeLayout::assignVectorToAttributeVector(MR) uc:" << uc->getID() +// << " point:" << uc->getPoint() << endl; + x += uc->getX(); + } +// cerr << "Setting MR concept:" << c->getID() << " to x:" << x << endl; + c->setX( x ); + } + } + } + + double min = -30; + double max = 30; + for( Layer_t::iterator li = Layer.begin(); li!=Layer.end(); ++li ) + { + L& col = li->second; + typedef map< double, double > dmap_t; + dmap_t dmap; + + for( L::iterator iter = col.begin(); iter != col.end(); ++iter ) + { + fh_concept c = *iter; + +// cerr << "-----------------------------------------" << endl; +// cerr << "Looking at parents for concept:" << c->getID() << endl; + + double x = 0; + const clist_t& upset = c->getParents(); + if( !upset.empty() ) + { + for( clist_t::const_iterator ui = upset.begin(); ui!=upset.end(); ++ui ) + { + fh_concept uc = *ui; +// cerr << "Parent concept:" << uc->getID() << " x:" << uc->getX() << endl; + x += uc->getX(); + } + x /= upset.size(); + } + + +// cerr << "Moving concept:" << c->getID() << " depth:" << c->getMaxDepth() << " to x:" << x << endl; + if( !c->isMeetIrreducible() || x ) + { + shuffleToX( col, c, x ); + } + else + { +// cerr << "Special moving MI concept:" << c->getID() << " to x:" << x << endl; + shuffleToX( col, c, c->getX() ); + } + } + } + +// dump( l ); + return l; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + }; +}; diff --git a/Ferris/FCA.hh b/Ferris/FCA.hh new file mode 100644 index 0000000..71b2d27 --- /dev/null +++ b/Ferris/FCA.hh @@ -0,0 +1,1105 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FCA.hh,v 1.21 2010/09/24 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FCA_H_ +#define _ALREADY_INCLUDED_FERRIS_FCA_H_ + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +namespace Ferris +{ + using boost::multi_index_container; + using namespace boost::multi_index; + + + struct from{}; + struct to{}; + + template + struct bidirectional_map + { + typedef std::pair value_type; + +#if defined(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS) || \ + defined(BOOST_MSVC)&&(BOOST_MSVC<1300) || \ + defined(BOOST_INTEL_CXX_VERSION)&&defined(_MSC_VER)&& \ + (BOOST_INTEL_CXX_VERSION<=700) + +/* see Compiler specifics: Use of member_offset for info on member<> and + * member_offset<> + */ + + BOOST_STATIC_CONSTANT(unsigned,from_offset=offsetof(value_type,first)); + BOOST_STATIC_CONSTANT(unsigned,to_offset =offsetof(value_type,second)); + + typedef multi_index_container< + value_type, + indexed_by< + ordered_unique< + tag,member_offset >, + ordered_unique< + tag, member_offset > + > + > type; + +#else + + /* A bidirectional map can be simulated as a multi_index_container + * of pairs of (FromType,ToType) with two unique indices, one + * for each member of the pair. + */ + + typedef multi_index_container< + value_type, + indexed_by< + ordered_unique< + tag,member >, + ordered_unique< + tag, member > + > + > type; + +#endif + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + typedef std::list< fh_context > filters_t; + + namespace FCA + { +//#pragma GCC visibility push(default) + + FERRISEXP_API std::string getBitFunctionName( const std::string& treeName, + const std::string& attributeName, + bool quote = true ); + FERRISEXP_API void setFile( fh_context parent, const std::string& rdn, + const std::string& data, int mode = 0 ); + FERRISEXP_API void setFile( fh_context parent, const std::string& rdn, + std::stringstream& dataSS, int mode = 0 ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef boost::dynamic_bitset<> fca_std_bitset_t; + typedef boost::dynamic_bitset<> extent_bitset_t; + + typedef std::map< long, FerrisBitMagic::bvector<> > VerticalFormalContext_t; + typedef std::map< FerrisBitMagic::bvector<>, FerrisBitMagic::bvector<> > FormalContext_t; + + typedef std::map< long, extent_bitset_t > VerticalFormalContextBitSet_t; + typedef std::map< fca_std_bitset_t, extent_bitset_t > FormalContextBitSet_t; + + + class Concept; + FERRIS_SMARTPTR( Concept, fh_concept ); + + struct FERRISEXP_API RawConceptHandleCompare + { + bool operator()( fh_concept s1, + fh_concept s2 ) const + { + return GetImpl( s1 ) < GetImpl( s2 ); + } + }; + + typedef std::set< fh_concept, RawConceptHandleCompare > clist_t; + typedef std::list< fh_context > ctxlist_t; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + template + inline STREAM &operator<<(STREAM &S, const FerrisBitMagic::bvector<>& bv ) + { + return S; + + if( !bv.count() ) + return S; + + unsigned value = bv.get_first(); + do + { + S << value; + value = bv.get_next(value); + if (value) + { + S << ","; + } + else + { + break; + } + } while(1); + S << std::endl; + } + + FERRISEXP_API bool second_is_superset( const fca_std_bitset_t& a, const fca_std_bitset_t& b ); + FERRISEXP_API bool second_is_superset( const FerrisBitMagic::bvector<>& a, const FerrisBitMagic::bvector<>& b ); + FERRISEXP_API bool second_is_superset( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ); + FERRISEXP_API bool second_is_superset( const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& a, + const FerrisBitMagic::bvector<>& b ); + FERRISEXP_API bool second_is_superset( const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ); + + template < class A, class B > + bool second_is_superset( const A& a, + const B& b ) + { + typename A::enumerator an = a.first(); + typename A::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; // Fastest way to increment enumerator + } + return true; + } + + + FERRISEXP_API bool anythingSet( const FerrisBitMagic::bvector<>& a ); + FERRISEXP_API bool equiv( const fca_std_bitset_t& a, const fca_std_bitset_t& b ); + FERRISEXP_API bool equiv( const FerrisBitMagic::bvector<>& a, const FerrisBitMagic::bvector<>& b ); + FERRISEXP_API bool equiv( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& b ); + template < unsigned int N > + bool equiv( const FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::bvmini >& b ) + { + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + while (an < an_end) + { + if( !b[ *an ] ) + return false; + ++an; + } + return true; + } + + FERRISEXP_API bool isZero( const FerrisBitMagic::bvector<>& a ); + + template< unsigned int N > + FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::bvmini< N > >& to_bvmini( const FerrisBitMagic::bvector<>& b, + FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::bvmini< N > >& ret ) + { + FerrisBitMagic::bvector<>::enumerator bn = b.first(); + FerrisBitMagic::bvector<>::enumerator bn_end = b.end(); + + while (bn < bn_end) + { + ret[ *bn ] = 1; + ++bn; + } + } + + +// template +// inline STREAM &operator<<(STREAM &S, const std::bit_vector& bv ) +// { +// int i = 0; +// S << "sz:" << bv.size() << " "; +// for( std::bit_vector::const_iterator ci = bv.begin(); ci != bv.end(); ++ci ) +// { +// S << " " << *ci; +// if( ++i > 10 ) +// break; +// } +// S << " "; +// return S; +// } + +// std::bit_vector operator&( const std::bit_vector& a, const std::bit_vector& b ); +// std::bit_vector operator^( const std::bit_vector& a, const std::bit_vector& b ); +// std::bit_vector& operator|=( std::bit_vector& a, const std::bit_vector& b ); +// std::bit_vector& operator^=( std::bit_vector& a, const std::bit_vector& b ); +// bool anythingSet( const std::bit_vector& a ); +// bool equiv( const std::bit_vector& a, const std::bit_vector& b ); +// bool isZero( const std::bit_vector& a ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_API Point + { + float x; + float y; + float z; + public: + explicit Point( float x = 0, float y = 0, float z = 0 ) + : x(x), y(y), z(z) + { + } + + float getX() const + { + return x; + } + float getY() const + { + return y; + } + float getZ() const + { + return z; + } + void setX( float v ) + { + x = v; + } + void setY( float v ) + { + y = v; + } + void setZ( float v ) + { + z = v; + } + inline Point& operator+=( const Point& p ) + { + x += p.x; + y += p.y; + z += p.z; + return *this; + } + + inline bool operator==( const Point& p ) + { + return x == p.x && y == p.y && z == p.z; + } + }; + + template < class _CharT, class _Traits > + std::basic_ostream< _CharT, _Traits >& + operator<<( std::basic_ostream< _CharT, _Traits >& ss, const Point& p ) + { + ss << "Point x:" << p.getX() << " y:" << p.getY() << " z:" << p.getZ(); + return ss; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class ConceptLattice; + FERRIS_SMARTPTR( ConceptLattice, fh_conceptLattice ); + + + /** + * A formal concept from FCA. + */ + class FERRISEXP_API Concept + : + public Handlable + { + typedef Concept _Self; + friend class ConceptLattice; + + bool m_dirty; + + // new PG backed attributes + fh_conceptLattice m_cl; // concept lattice for this concept. + int m_id; // uniq id + FerrisBitMagic::bvector<> m_itemSet; // items for this concet from the ConceptLattice + int m_itemSetWeight; // number of bits set in m_itemSet + std::list< FerrisBitMagic::bvector<> > m_addedAttrs; // attributes which are new for this concept. + + fca_std_bitset_t m_itemSet_AsBitSet; // m_itemSet as a std::bitset<> type + + int m_extentSize; // number of objects in extent. + int m_conceptOnlyMatchSize; // number of objects in just this concept + + double m_support_perc; + int m_support_abs; + double m_support_ext; + + + clist_t m_parents; + clist_t m_upset; + clist_t m_children; + clist_t m_downset; + fh_context m_extent; + + // old non PG backed attributes (maybe change?) + filters_t m_baseFilters; + filters_t m_contingentFilters; + + float m_x, m_y, m_z; + + public: + // a cache list of the matching docids from getBaseTableName() + // which match this concept. + FerrisBitMagic::bvector<> m_conceptOnlyMatchingDocIDs; + + // a cache list of the matching docids of the extent + FerrisBitMagic::bvector<> m_MatchingDocIDs; + private: + + /** + * Used by both getUpSet() and getDownSet() to get the transitive + * sets + */ + void getUpDownSet_recurse( fh_concept p, clist_t& cache, bool isUpSet = true ); + clist_t& getUpDownSet( bool includeSelf = true, bool isUpSet = true ); + + protected: + + void setDirty( bool v ); + + public: + + virtual ~Concept(); + Concept( fh_conceptLattice cl, fh_context extent = 0 ); + void Construct( fh_conceptLattice cl ); + + /** + * Get the extent of this concept + */ + fh_context getExtent(); + + + FerrisBitMagic::bvector<>& getExtentVerticalVector( FerrisBitMagic::bvector<>& ret, + bool clarified = false ); + extent_bitset_t& getExtentVerticalVectorBitSet( extent_bitset_t& ret, + bool clarified = false ); + + + /** + * get the intent of this concept + * + * The intent is defined as the concepts in the upset that + * introduce new filters, ie. all concepts in the upset + * with getContingentFilters().size() > 0 + */ + clist_t getIntent(); + + /** + * get a list of filters that define this concept + */ + filters_t& getBaseFilterList(); + + /** + * set the list of filters that define this concept + * This list should be equal to the union of calling + * getContingentFilters() on the upset of this concept + * but also the base filters are ment to be in the rawest + * form, ie. each column in the formal context is a single + * filter in the passed list. + */ + void setBaseFilterList( const filters_t& fl ); + + /** + * If a concept introduces any new filters to the lattice then + * they should be set with this method. A concept that introduces + * attributes is one that will appear in the intent of concepts + * below itself. + */ + virtual void setContingentFilters( const filters_t& fl ); + + /** + * Get the new filters that are introduced by this concept. + */ + filters_t& getContingentFilters(); + + /** + * Get a list of the contingent filters for this concept and all + * of its upset. + */ + std::list< filters_t > getTransitiveContingentFilters(); + + /** + * If there are contingentFilters for this concept then it introduces + * a new filter to the lattice, as such it is also defined as containing + * an attribute. ie. ret is getContingentFilters().size() + */ + bool containsAttribute(); + + /** + * get the single top concept node. + */ + fh_concept getRootConcept(); + + /** + * Set the extent of this concept + */ + virtual void setExtent( const fh_context& c ); + + /** + * Get the concepts that are direct parents of this concept + */ + clist_t& getParents(); + + /** + * Remove a parent concept + * Note that no links are effected. + */ + void removeParent( const fh_concept& c ); + + /** + * Get the concepts that are direct children of this concept + */ + clist_t& getChildren(); + clist_t& getChildren( clist_t& l ); + + + /** + * Remove a child concept + * Note that no links are effected. + */ + void removeChild( const fh_concept& c ); + + /** + * is this concept meet irreducible, ie. getParents().size() == 1 + */ + bool isMeetIrreducible(); + + /** + * Get the size of the longest path from this concept to top. + */ + int getMaxDepth(); + + /** + * Is this concept <= c + * ie. c.getBaseFilterList() is a subset of this.getBaseFilterList() + */ + bool less_than_or_equal( fh_concept c ); + + /** + * Get the concepts that are transitively above this concept + * + * @param if includeSelf is true then the concept itself is included + * in the return value + */ + clist_t& getUpSet( bool includeSelf = true ); + + /** + * Get the concepts that are transitively below this concept + * + * @param if includeSelf is true then the concept itself is included + * in the return value + */ + clist_t& getDownSet( bool includeSelf = true ); + + clist_t& getXSet( bool isUpSet ); + + typedef int intentsz_t; + intentsz_t getIntentSize(); + + /** + * Associate the concept 'c' with this one as either a child or + * parent. Note that subclasses will probably define a better method + * to use for association, for example makeLink() + */ + virtual void makeUniDirectionalLink( fh_concept c, bool isUpLink ); + void addParent( fh_concept c ); + void addChild( fh_concept c ); + void addChildren( clist_t& cl ); + + /** + * Make a bidirectional link + */ + virtual void makeLink( fh_concept c, bool isUpLink ); + + /** + * disconnect this concept from its parents and children + */ + virtual void disconnect(); + + virtual void setX( float x ); + virtual float getX(); + virtual void setY( float y ); + virtual float getY(); + virtual void setZ( float z ); + virtual float getZ(); + void setLocation( float x, float y, float z ); + void setPoint( const Point& p ); + Point getPoint(); + + + virtual void setFilterString( const std::string& s ); + virtual std::string getFilterString(); + + + /** + * The fancy name is a string that allows any characters that + * are legal in a string to be in it. Subclasses might have a + * different limited name also that follows the restrictions of + * the GUI toolkit used for the subclass view + */ + virtual void setFancyName( const std::string& s ); + virtual std::string getFancyName(); + + int getID(); + void setID( int v ); + + /** + * Call bvector::optimize() on the itemset. + */ + void optimizeItemSet(); + + /** + * Get the itemset of the concept + */ + const FerrisBitMagic::bvector<>& getItemSet() const; + + /** + * Get the itemset of the concept as std::bitset<> + */ + const fca_std_bitset_t& getItemSetBitSet() const; + + /** + * Set the itemset of this concept. + */ + void setItemSet( const FerrisBitMagic::bvector<>& v ); + + /** + * Get the names of the attributes which have been added to this + * concept. ie, the attributes which none of our parent concepts + * have. + */ + stringlist_t& getAddedFormalConceptAttributes( stringlist_t& sl ); + + /** + * Get the attributes which are introduced considering all the attributes + * that only one parent has. + */ + stringlist_t& getAddedFormalConceptAttributesRelativeToParent( fh_concept pivc, + stringlist_t& sl ); + + /** + * The size of the extent might be known before the extent + * itself is fetched. + */ + int getExtentSize(); + + /** + * update the ConceptOnlyMatchSize for this concept + * from the database + */ + void updateConceptOnlyMatchSize(); + + /** + * Get the number of items in the database for which this + * concept is the lowest in the lattice matching that file. + * ie. no subconcept of this concept will match the files in + * the counter returned. + */ + int getConceptOnlyMatchSize(); + + + /** + * The name of the SQL Table which contains the formal context + */ + std::string getBaseTableName(); + + /** + * Has this concept changed since it was read? + */ + bool isDirty(); + + /** + * Get the concept label when viewing the lattice in fish eye mode + */ + stringlist_t& getFishEyeLabel( stringlist_t& sl ); + + fh_conceptLattice getConceptLattice(); + + private: + bool getFishEyeLabelRec( stringlist_t& sl ); + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + struct ConceptLatticePriv; + + /** + * These are the columns which are metadata about the concepts. Other + * columns are assumed to be part of the formal context attributes. + */ + stringset_t& getOutOfBandColumns( stringset_t& ret ); + + class FERRISEXP_API ConceptLattice + : + public Handlable + { + typedef ConceptLattice _Self; + + bool m_dirty; + void setDirty( bool v ); + int getNumberOfDirtyConcepts(); + + + /** + * PImpl away the database connection etc. + */ + struct ConceptLatticePriv* P; + friend class Concept; + + /** + * Mapping from concept->getID() to concept + */ + typedef std::map< int, fh_concept > m_IDToConceptMap_t; + m_IDToConceptMap_t m_IDToConceptMap; + + /** + * fixed size for all concepts to use for their m_itemSet + */ + int m_itemSetSize; + + fh_concept m_topConcept; // lattice top concept + fh_concept m_bottomConcept; // lattice bottom concept + + /** + * Used to obtain the names of the attributes in an itemset + */ + typedef std::map< FerrisBitMagic::bvector<>, std::string > m_attrIDToString_t; + m_attrIDToString_t m_attrIDToString; + + /** + * findex that we are using for this lattice + */ + std::string m_findexPath; + + /** + * table that contains the CFI + */ + std::string m_CFITableName; + + fh_context m_latticeTree; + bool m_CFITableIsAugmented; + std::string m_CFITableSelectTail; + + /** + * table that contains the formal context + */ + std::string m_baseTableName; + + public: + typedef Loki::Functor< fh_concept, LOKI_TYPELIST_2( const fh_conceptLattice&, + int /* maxItemSetSizeInBits */ ) > F_ConceptFactory_t; + private: + /** + * Factory function to create new Concept objects. + */ + F_ConceptFactory_t m_conceptFactory_func; + + protected: + ConceptLattice( fh_context latticeTree, const F_ConceptFactory_t& func ); + + void priv_load_invertedlist( fh_context c, int id, + FerrisBitMagic::bvector<>& bv ); + + /** + * Load a lattice from a CFI table. Called by the many static load() methods + */ + void priv_load(); + + /** + * Set the single formal attribute name 'v' to be for the single + * set bit in 'x' + */ + void setAttrIDToString( const FerrisBitMagic::bvector<>& x, std::string v ); + + /** + * MUST BE called by the Concept class when it is changing its bit_vector + */ + void priv_ConceptItemSetChanging( Concept* c, + FerrisBitMagic::bvector<> oldv, + FerrisBitMagic::bvector<> newv ); + /** + * MUST BE Called by the Concept class when it is changing its ID + */ + void priv_ConceptIDChanging( Concept* c, int oldv, int newv ); + + void save_invertedlist( fh_context c, int id, FerrisBitMagic::bvector<>& bv ); + + public: + + /** + * This is for internal use only. Basically it is here to + * allow access to the PImpl data and the PostgreSQL database + * conncetion from methods in other classes internal to libferris. + */ + ConceptLatticePriv* getPrivatePart(); + + virtual ~ConceptLattice(); + + static fh_conceptLattice load( const std::string& latticeTreePath ); + static fh_conceptLattice load( fh_context latticeTree ); + static fh_conceptLattice load( + const std::string& latticeTreePath, + const F_ConceptFactory_t& func ); + + + /** + * Load a concept lattice from the given lattice tree using the + * factory method to create new concept objects. + * + * The lattice tree path is a path under ~/.ferris/fcatree. The + * path itself will be to the named view, for example, + * ~/.ferris/fcatree/localhost/mydb/myview + */ + static fh_conceptLattice load( + fh_context latticeTree, + const F_ConceptFactory_t& func ); + + /** + * Save the concept lattice back to the CFI SQL Table + */ + void save(); + + /** + * The name of the SQL Table which contains the formal context + */ + std::string getBaseTableName(); + + /** + * Get the top concept + */ + fh_concept getTopConcept(); + + /** + * Get the bottom concept + */ + fh_concept getBottomConcept(); + + /** + * Max number of bits in the itemset (ie, |A| ) + */ + long getMaxItemSetSizeInBits() const; + + /** + * Get the collection of all concepts in the lattice + */ + std::list< fh_concept >& getConcepts( std::list< fh_concept >& ret ) const; + + /** + * For a single set bit in a bit_vector get its string name + * + * @see AttrIDToStringList() + */ + std::string AttrIDToString( const FerrisBitMagic::bvector<>& x ); + + /** + * Get the list of string attribute names for each set bit + * in the bit_vector 'b'. + */ + stringlist_t AttrIDToStringList( const FerrisBitMagic::bvector<>& x, stringlist_t& sl ); + + /** + * Get the string names of all the formal attributes in the lattice + */ + stringlist_t& getAllAttributeNames( stringlist_t& ret ) const; + + /** + * Get all the fh_context objects which might play a role in any concept + * for the lattice. ie, the set G in ganter & wille. + */ + fh_context getAllObjects(); + + /** + * + * Attr -> Extent + */ + VerticalFormalContext_t& getVerticalFormalContext( + FerrisBitMagic::bvector<>& Gret, + VerticalFormalContext_t& ret, + bool clarify = false ); + + VerticalFormalContextBitSet_t& getVerticalFormalContextBitSet( + extent_bitset_t& Gret, + VerticalFormalContextBitSet_t& ret, + bool clarify = false ); + + + typedef bidirectional_map< fh_concept, FerrisBitMagic::bvector<>* >::type AllExtentVerticalVectors_t; + AllExtentVerticalVectors_t& getAllExtentVerticalVectors( AllExtentVerticalVectors_t& ret, + bool clarified = false ); + + + /** + * get the attributeName -> ffilter mapping + */ + stringmap_t& + getAttributeToFFilterMap( stringmap_t& out ); + + /** + * Get a bit_vector with the named attribute set + */ + FerrisBitMagic::bvector<> StringToAttrID( const std::string& s ); + + /** + * Get a list of which attributes the child concept has that the + * parent concept doesn't. + */ + stringlist_t getAddedAttributes( fh_concept parent, + fh_concept child ); + + /** + * Reduce formal attributes which are known as direct implications from + * formal scaling. For example, a linear scale on mtime would allow + * mtime>100 to be removed if mtime>200 is also in the attribute list. + */ + stringlist_t& makeReducedAttributes( stringlist_t& sl ); + + /** + * Convert some attribute names like mtime_111 into + * mtime <= friday + * type human readable labels. + */ + stringlist_t& convertAttributeNamesToLabels( stringlist_t& sl ); + + /** + * For a given attribute name, eg, mtime, give a reasonable format string + * for making labels of that attribute in a lattice. + */ + std::string getReasonableTimeFormatStringForAttribute( stringmap_t& atof, + const std::string& s ); + + /** + * Get an itemSet which is getItemSetSize() in size and has every + * formal context bit (getFormalAttributeCount()) set to true. + * + * @see getFormalAttributeCount() + * @see getItemSetSize() + */ + FerrisBitMagic::bvector<> getFullItemSet(); + + fca_std_bitset_t getFullItemSetBitSet(); + + /** + * The size that every Concept::getItemSet() will be. Use this size + * in the constructor of FerrisBitMagic::bvector<> to make new itemSet vectors + * which are to be compared with the itemSet vectors of this lattice. + * + * @see getFullItemSet() + */ + int getItemSetSize(); + + /** + * What is the largest numeric concept ID in use + */ + int getHighestConceptID() const; + + /** + * Get the concept which has the given ID + */ + fh_concept getConcept( int id ) const; + + /** + * Add a new concept to the lattice. The concept will be assumed to + * not have any parents or children, you will have to link it to its + * correct location in the ordering using Concept::makeLink() etc. + * + * @see Concept::makeLink() + */ + void addConcept( fh_concept c ); + + /** + * Remove this concept from the database. + */ + void removeConcept( fh_concept c ); + + /** + * Sometimes a conceptLattice will create new concpets, for example, + * during the load() calls. You can set a factory which will create + * concepts so that subclasses of concept can be made instead of + * a plain concept. + * + * @see load() + */ + void setConceptFactory( const F_ConceptFactory_t& func ); + + /** + * Get the number of attributes which are officially part of the + * formal context that this concept lattice is derived from. + * + * @see getItemSetSize() + */ + int getFormalAttributeCount(); + + /** + * Check the database and update the contingent size for every + * concept in the lattice + */ + void refreshAllConceptsContingentCounter(); + + /** + * Check if we have to create new concepts because: + * top level concept (t) has no frequent itemsets which do not contain an item (x) not in (t) + * ie if most of the collection contains attribute (x) we may get an itemset (t) which is large + * and frequent but does not contain (x). This will lead to (t) being a strange top level concept + * unless we create some other concepts to move (t) down in the lattice. + */ + void fixInvalidTopLevelConcepts(); + + /** + * Has this lattice or any of its concepts changed since it was read? + */ + bool isDirty(); + + + void exportAsToscanaJConceptualSchema( const std::string& outbase ); + void exportAsBurmeister( const std::string& outbase ); + + + /** + * Get an integer configuration param from the latticetree root. + */ + int getStrSubCtxInt( const std::string& k, int def ); + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class LatticeLayout; + typedef Loki::SmartPtr< + LatticeLayout, + FerrisLoki::FerrisExRefCounted, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisLoki::FerrisExSmartPtrStorage > fh_latticelayout; + + + class LatticeLayout + : + public Handlable + { + protected: + + /** + * Get a magnification factor that all x,y,z movements should be multiplied by + */ + float getMagnificationFactor(); + + /** + * Move the root element of the lattice to 0,0,0 + */ + void assignZeroToRoot( fh_conceptLattice l ); + + /** + * Set each concept in begin to end to p + */ + void assignPointToAll( fh_conceptLattice, + clist_t::iterator begin, clist_t::iterator end, + const Point& p ); + void assignPointToAll( fh_conceptLattice, const Point& p ); + + /** + * PURE DEBUG to dump out the vectors for each contingent. + */ + void dump( fh_conceptLattice ); + + public: + virtual fh_conceptLattice layout( fh_conceptLattice l ) = 0; + }; + + class LatticeLayout_Additive + : + public LatticeLayout + { + void + assignVectorToMI( fh_conceptLattice l, + float ix, float iy, float iz, + float dx, float dy, float dz ); + + public: + virtual fh_conceptLattice layout( fh_conceptLattice l ); + }; + + class LatticeLayout_Layered + : + public LatticeLayout + { + void shuffleToX( std::list< fh_concept >&, fh_concept c, double x ); + + public: + virtual fh_conceptLattice layout( fh_conceptLattice l ); + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +//#pragma GCC visibility pop + + }; +}; +#endif diff --git a/Ferris/FSParser.cpp b/Ferris/FSParser.cpp new file mode 100644 index 0000000..6733626 --- /dev/null +++ b/Ferris/FSParser.cpp @@ -0,0 +1,157 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FSParser.cpp,v 1.3 2010/09/24 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FSParser_private.hh" +#include +#include +#include + +using namespace std; + + +namespace Ferris +{ + FSParser::FSParser() + : + m_e( 0 ) + { + } + + int + FSParser::toint( string s ) + { + stringstream ss; + ss << s; + int ret; + ss >> ret; + return ret; + } + + string + FSParser::reverse( string s ) + { + std::reverse( s.begin(), s.end() ); + return s; + } + + + void + FSParser::get_name_f( const char* beg, const char* end ) + { + string v( beg, end ); + m_name = reverse( v ); + while( !m_name.empty() ) + { + char ch = m_name[ 0 ]; + if( ch == '-' || ch == '_' || ch == ' ' ) + { + m_name = m_name.substr( 1 ); + } + else + return; + } + } + + void + FSParser::get_group_f( const char* beg, const char* end ) + { + string v( beg, end ); + m_group = reverse( v ); + } + void + FSParser::get_checksum_f( const char* beg, const char* end ) + { + string v( beg, end ); + m_checksum = reverse( v ); + m_checksum = Util::replace_all( m_checksum, "[", "" ); + m_checksum = Util::replace_all( m_checksum, "]", "" ); + m_checksum = tolowerstr()( m_checksum ); + } + void + FSParser::get_e_f( const char* beg, const char* end ) + { + string v( beg, end ); + m_e = toint( reverse( v ) ); + } + + bool + FSParser::parse( const std::string& s_const ) + { + string s = s_const; + typedef scanner_list, phrase_scanner_t> scanners; + typedef rule< scanners > R; + + s = reverse( s ); + + R checksum_p = regex_p("\\][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]\\[")[ F( &_Self::get_checksum_f ) ]; + R group_p = regex_p("\\][^]]+\\[")[ F( &_Self::get_group_f ) ]; + R cg_p = checksum_p | group_p; + R extension_p = regex_p("[A-Za-z4]+\\."); + R junk_p = regex_p("[-_]+") | regex_p("\\).*\\("); + R e_p = regex_p("[0-9]+")[ F( &_Self::get_e_f ) ]; + R name_p = regex_p("[^]]+")[ F( &_Self::get_name_f ) ]; + R fs_p = extension_p >> *cg_p >> *junk_p + >> *(regex_p("[0-9]+[Vv]") >> *junk_p) + >> *e_p + >> *junk_p >> name_p >> *junk_p >> *cg_p; + + parse_info<> info = ::boost::spirit::parse( s.c_str(), fs_p, space_p ); + if (info.full) + { + return true; + } + else + { + return false; + } + } + + + string + FSParser::getChecksum() + { + return m_checksum; + } + string + FSParser::getGroup() + { + return m_group; + } + string + FSParser::getName() + { + return m_name; + } + int + FSParser::getE() + { + return m_e; + } + +}; diff --git a/Ferris/FSParser_private.hh b/Ferris/FSParser_private.hh new file mode 100644 index 0000000..fad13fa --- /dev/null +++ b/Ferris/FSParser_private.hh @@ -0,0 +1,119 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FSParser_private.hh,v 1.4 2010/09/24 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FSPARSER_H_ +#define _ALREADY_INCLUDED_FERRIS_FSPARSER_H_ + +#include +#include +#include + +#define BOOST_SPIRIT_RULE_SCANNERTYPE_LIMIT 3 + +#include +#include +using namespace boost::spirit; + +#include +#include +using namespace boost::lambda; + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility push(hidden) +// #endif + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility pop +// #endif + +namespace Ferris +{ + // see play/boost/spirit for this code. + struct FERRISEXP_DLLLOCAL Tramp + { + typedef Loki::Functor< + void, LOKI_TYPELIST_2( const char*, const char* ) > + SAction_t; + mutable SAction_t SAction; + typedef const char* IteratorT; + + Tramp( const SAction_t& SAction ) + : + SAction( SAction ) + { + } + template + Tramp( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + SAction( SAction_t( pObj, pMemFn ) ) + { + } + + void operator()( IteratorT first, IteratorT last) const + { + SAction( first, last ); + } + }; + + class FERRISEXP_DLLLOCAL FSParser + { + typedef FSParser _Self; + + int m_e; + std::string m_name; + std::string m_group; + std::string m_checksum; + + typedef Tramp F_t; + template < typename PointerToMemFn > + F_t F( PointerToMemFn pMemFun ) + { + return F_t( this, pMemFun ); + } + + public: + + FSParser(); + int toint( std::string s ); + std::string reverse( std::string s ); + + void get_name_f( const char* beg, const char* end ); + void get_group_f( const char* beg, const char* end ); + void get_checksum_f( const char* beg, const char* end ); + void get_e_f( const char* beg, const char* end ); + bool parse( const std::string& s_const ); + + std::string getChecksum(); + std::string getGroup(); + std::string getName(); + int getE(); + }; + +}; +#endif diff --git a/Ferris/FactoriesCreationCommon_private.cpp b/Ferris/FactoriesCreationCommon_private.cpp new file mode 100644 index 0000000..68bdb31 --- /dev/null +++ b/Ferris/FactoriesCreationCommon_private.cpp @@ -0,0 +1,48 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FactoriesCreationCommon_private.cpp,v 1.2 2010/09/24 21:30:33 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +#include "FactoriesCreationCommon_private.hh" + +namespace Ferris +{ + +// const std::string EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT = (std::string)"schema:.*" + ',' +// /**/ + "recursive-.*" + ',' +// /**/ + "subcontext.*" + ',' +// /**/ + "branchfs-.*" + ',' +// /**/ + "as-.*" + ',' +// /**/ ; + +// const std::string EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT = +// (std::string)"as-xml,as-text,as-rdf,rgba-32bpp,exif:thumbnail-update,exif:thumbnail-rgba-32bpp,"; + +// const std::string EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT = "200"; +// const std::string EAINDEX_ODBC3_BULKLOAD = "1"; + +}; diff --git a/Ferris/FactoriesCreationCommon_private.hh b/Ferris/FactoriesCreationCommon_private.hh new file mode 100644 index 0000000..65d2762 --- /dev/null +++ b/Ferris/FactoriesCreationCommon_private.hh @@ -0,0 +1,119 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FactoriesCreationCommon_private.hh,v 1.6 2010/09/24 21:30:33 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +#include + +namespace Ferris +{ + +// #define EAINDEX_EANAMES_REGEX_IGNORE_DEFAULT \ +// /**/ (std::string)"^schema:.*" + ',' \ +// /**/ + "^recursive-.*" + ',' \ +// /**/ + "^subcontext.*" + ',' \ +// /**/ + "^branchfs-.*" + ',' \ +// /**/ + "^associated-branches-.*" + ',' \ +// /**/ + "^as-.*" + ',' \ +// /**/ + ".*-ctime$" + ',' \ +// /**/ + ".*-display$" + ',' \ +// /**/ + ".*-cdrom-count$" + ',' \ +// /**/ + ".*-dvd-count$" + ',' \ +// /**/ + ".*-human-readable$" + ',' \ +// /**/ + ".*-granularity$" + ',' \ +// /**/ +// #define EAINDEX_EANAMES_NOT_TO_INDEX_DEFAULT \ +// (std::string)"content,as-xml,as-text,as-rdf,rgba-32bpp,exif:thumbnail-update,exif:thumbnail-rgba-32bpp,md5,md2,sha1,mdc2,download-if-mtime-since,force-passive-view,path,realpath," + +// #define EAINDEX_MAX_VALUE_SIZE_TO_INDEX_DEFAULT "16384" + #define EAINDEX_ODBC3_BULKLOAD "1" + +#define CFG_ODBCIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT "atime=timestamp:mtime=timestamp:ctime=timestamp:ferris-should-reindex-if-newer=timestamp:ferris-current-time=timestamp:size=bigint:width=int:height=int:md5=char(40):mimetype=varchar(50):mimetype-from-content=varchar(50):group-owner-number=int:user-owner-number=int:dontfollow-user-owner-number=int:dontfollow-group-owner-number=int" +#define CFG_QTSQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT \ + CFG_ODBCIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT +#define CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT \ + CFG_ODBCIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT +#define CFG_POSTGRESQLIDX_DOCMAP_COLUMNS_TO_FULLTEXT_INDEX_DEFAULT "" +#define CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_CREATE_K "columns-to-bitf" +#define CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_K "cfg_postgresqlidx_columns_to_inline_in_bitf_default_k" +#define CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_NSV_K "cfg_postgresqlidx_columns_to_inline_in_bitf_nsv_k" +#define CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_DEFAULT \ + "exif:has-thumbnail," \ + "writable," \ + "runable," \ + "deletable," \ + "readable," \ + "user-readable," \ + "user-writable," \ + "user-executable," \ + "group-writable," \ + "group-readable," \ + "group-executable," \ + "other-writable," \ + "other-readable," \ + "other-executable," \ + "is-special," \ + "is-source-object," \ + "is-remote," \ + "is-link," \ + "is-image-object," \ + "is-file," \ + "is-dir," \ + "is-audio-object," \ + "is-animation-object," \ + "is-active-view," \ + "has-valid-signature," \ + "has-subcontexts-guess," \ + "has-holes," \ + "has-alpha," \ + "exists-subdir," \ + "dontfollow-is-special," \ + "dontfollow-is-link," \ + "dontfollow-is-file," \ + "dontfollow-is-dir," \ + "dontfollow-has-holes," \ + "rpm-verify-size," \ + "rpm-verify-owner," \ + "rpm-verify-mtime," \ + "rpm-verify-mode," \ + "rpm-verify-md5," \ + "rpm-verify-group," \ + "rpm-verify-device," \ + "rpm-is-readme," \ + "rpm-is-pubkey," \ + "rpm-is-license," \ + "rpm-is-ghost," \ + "rpm-is-doc," \ + "rpm-is-config,is-native," \ + "emblem:has-medallion," \ + "is-setgid,is-setuid,is-sticky,is-unedited,is-unseen," + + + +}; + + diff --git a/Ferris/Ferris.cpp b/Ferris/Ferris.cpp new file mode 100644 index 0000000..1a66956 --- /dev/null +++ b/Ferris/Ferris.cpp @@ -0,0 +1,12611 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferris.cpp,v 1.102 2011/07/31 21:30:48 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * Conditions that cause the getCacheManager()->AutoClean() to be called + * + * VM.clean.1: start of an active read() -- disabled for now. + * VM.clean.2: When a context becomes claimable and + * A. is not a overmounted context and has children + * B. is a overmount and is the root of that overmount and + * CoveredContext is not referenced by the user + * VM.clean.3: Can cleanup a overmount tree when the root node has rc=2 + * + */ +#include + +#define CERR cerr + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#ifdef HAVE_GNOMEVFS +#include +#include +#endif + +#ifdef HAVE_LIBMAGIC +extern "C" { +#include +}; +#endif + +#include +#include +#include +#include +#include + +#include +#include + +// user-owner-name // +#include +#include +#include + + +#include +#include + +#include +#include + +#include +#include + +// medallion notification +#include + +// +// To make the XSD schema types we need to know what lexicon classes we have +// +#include + +/* + * Have to free PCCTS mounts top down because of InOrder child lists and such. + */ +//#include + +// +// getSchema() +// +#include + + +// TESTING ONLY +#include + +#include + +#include + +#ifdef HAVE_LIBTEXTCAT + extern "C" { + #include + }; +#endif + +#include +#include + +#include + +#include + +#include +#include + +#ifdef HAVE_DBUS +#include "DBus_private.hh" +#endif + +#ifdef FERRIS_HAVE_LIBZ +#include +#endif + +#include + +using namespace std; +using namespace Ferris::RDFCore; +// using RDFCore::fh_node; +// using RDFCore::fh_model; + +namespace Ferris +{ + const string FERRIS_CONFIG_APPS_DIR = "/.ferris/apps.db"; + const string FERRIS_CONFIG_EVENT_DIR = "/.ferris/eventbind.db"; + const string FERRIS_CONFIG_MIMEBIND_DIR = "/.ferris/mimebind.db"; + + const string EANAME_SL_EMBLEM_ID_PREKEY = "emblem:id-"; + const string EANAME_SL_EMBLEM_ID_FUZZY_PREKEY = "emblem:id-fuzzy-"; + const string EANAME_SL_EMBLEM_PREKEY = "emblem:has-"; + const string EANAME_SL_EMBLEM_TIME_PREKEY = "emblem:"; + const string EANAME_SL_EMBLEM_FUZZY_PREKEY = "emblem:has-fuzzy-"; + + static bool ForceOutOfProcessMetadataOff = false; + + bool getForceOutOfProcessMetadataOff() + { + return ForceOutOfProcessMetadataOff; + } + bool setForceOutOfProcessMetadataOff( bool v ) + { + bool ret = ForceOutOfProcessMetadataOff; + ForceOutOfProcessMetadataOff = v; + return ret; + } + + + bool tryToUseOutOfProcessMetadataServer() + { + if( getForceOutOfProcessMetadataOff() ) + return false; + + static const gchar* ENVVAR = g_getenv ("LIBFERRIS_USE_OUT_OF_PROCESS_METADATA"); + if( ENVVAR ) + return true; + + static bool ret = false; + static bool v = true; + if( v ) + { + v = false; + + string path = Shell::getHomeDirPath() + "/.ferris/use-out-of-process-metadata"; + int rc = access( path.c_str(), F_OK ); + if( !rc ) + { + LG_MDSERV_D << "Using some external (out of process) metadata servers" + << " because file exists:" << path + << endl; + ret = true; + } + } + + return ret; + } + + + /** + * If an attribute with the given eaname is bound then prepend it to the + * rea list + */ + static void + adjustREAForAttributeIfPresent( Context* c, std::string& rea, const std::string& eaname ) + { +// cerr << "adjustREAForAttributeIfPresent() eaname:" << eaname +// << " is there false:" << c->isAttributeBound( eaname, false ) +// << " is there true:" << c->isAttributeBound( eaname, true ) +// << endl; + + if( c->isAttributeBound( eaname, true ) ) + { + rea = eaname + "," + rea; + } + } + + /** + * If we are under one of the dotfile db4 files then we monster the + * recommended EA, otherwise we just use the given value. + * + * methods should just return adjustRecommendedEAForDotFiles(this, "name,..."); + * at the end to adjust for db4 config file viewing. + */ + std::string adjustRecommendedEAForDotFiles( Context* c, const std::string& s ) + { + string path = c->getDirPath(); + + if( string::npos != path.find( "/.ferris/" ) ) + { + if( string::npos != path.find( FERRIS_CONFIG_APPS_DIR )) + { + return "name,ferris-exe,ferris-scheme,ferris-iconname," + "ferris-ignore-selection,ferris-handles-urls,ferris-opens-many"; + } + else if( string::npos != path.find( FERRIS_CONFIG_MIMEBIND_DIR )) + { + return "name,ferris-appname,ferris-iconname"; + } + else if( string::npos != path.find( "/.ferris/file-clipboard.db/" )) + { + return "name,undo,redo"; + } + else if( string::npos != path.find( "/.ferris/file-clipboard.db" )) + { + return "name,action," + "commands-use-sloth,commands-use-auto-close,commands-use-extra-options"; + } + else if( string::npos != path.find( "/.ferris/schema" )) + { + return "name,uname,ferrisenum,ferrisname,possiblesort,defaultsort,defaultvalue,description,uuid"; + } + } + + if( string::npos != path.find( "/.ego/" ) ) + { + if( string::npos != path.find( "/.ego/sortmark" )) + { + return "name,content"; + } + else if( string::npos != path.find( "/.ego/openurl" )) + { + return "content,mtime-display"; + } + else if( string::npos != path.find( "/.ego/filters" )) + { + return "name,content"; + } + else if( string::npos != path.find( "/.ego/bookmarks" )) + { + return "name,content,ferris-iconname"; + } + } + + string ret = s; + + static stringlist_t autorea = + Util::parseCommaSeperatedList( + getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_TO_AUTO_REA_K, + CFG_ATTRIBUTES_TO_AUTO_REA_DEFAULT )); + static bool autorea_is_empty = autorea.empty(); + if( !autorea_is_empty ) + { + for( stringlist_t::iterator si = autorea.begin(); si != autorea.end(); ++si ) + { + const std::string tmp = *si; + + if( !tmp.empty() ) + adjustREAForAttributeIfPresent( c, ret, tmp ); + } + } + + + return ret; + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +/** + * iterate over the range of a map + */ +class EAGenFactorys_iterator_class +{ + typedef EAGenFactorys_iterator_class _Self; + typedef Context::m_StatefullEAGenFactorys_t::const_iterator DelegateIterClass; + +public: + Context* c; + bool m_DelegateSF; + DelegateIterClass m_delegate; + + void shiftIterator( int n ) + { +// cerr << "shiftIterator n:" << n << " m_DelegateSF:" << m_DelegateSF << endl; + + // Quite a common case. + if( n == 1 && m_DelegateSF ) + { + DelegateIterClass e = c->m_StatefullEAGenFactorys.end(); + advance( m_delegate, n ); + if( m_delegate == e ) + { + m_DelegateSF = false; + m_delegate = c->getStatelessEAGenFactorys().begin(); + } + return; + } + + if( n > 0 && m_DelegateSF ) + { + DelegateIterClass e = c->m_StatefullEAGenFactorys.end(); + int d = distance( m_delegate, e ); +// cerr << " shiftIterator d:" << d +// << " del==end:" << (m_delegate == e ) +// << endl; + if( n >= d ) + { +// cerr << " shiftIterator!! d:" << d << endl; + n -= d; + m_DelegateSF = false; + m_delegate = c->getStatelessEAGenFactorys().begin(); + } + } + advance( m_delegate, n ); + } + + + typedef std::iterator_traits traits_type; + typedef traits_type::iterator_category iterator_category; + typedef traits_type::value_type value_type; + typedef long difference_type; + typedef value_type pointer; + typedef value_type reference; + + + EAGenFactorys_iterator_class( Context* c, bool isEnd = false ) + : + c( c ) + { + if( isEnd ) + { + m_delegate = c->getStatelessEAGenFactorys().end(); + m_DelegateSF = false; + } + else + { +// cerr << "EAGenFactorys_iterator_class(ne) sf.sz" +// << c->m_StatefullEAGenFactorys.size() +// << " sl.sz:" << c->getStatelessEAGenFactorys().size() +// << endl; + if( c->m_StatefullEAGenFactorys.empty() ) + { + m_delegate = c->getStatelessEAGenFactorys().end(); + m_DelegateSF = false; + } + else + { + m_delegate = c->m_StatefullEAGenFactorys.begin(); + m_DelegateSF = true; + } + } + } + + reference operator*() const + { + return *m_delegate; + } + + pointer operator->() + { + return *m_delegate; + } + + _Self& operator++() + { + shiftIterator(1); + return *this; + } + + _Self operator++(int) + { + _Self tmp(*this); + shiftIterator(1); + return tmp; + } + + _Self& operator--() + { + shiftIterator(-1); + return *this; + } + + _Self operator--(int) + { + _Self tmp(*this); + shiftIterator(-1); + return tmp; + } + + _Self + operator+(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator(n); + return tmp; + } + + _Self& + operator+=(difference_type n) + { + shiftIterator(n); + return *this; + } + + _Self + operator-(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator( ForceNegative(n) ); + return tmp; + } + + _Self& + operator-=(difference_type n) + { + shiftIterator( ForceNegative(n) ); + return *this; + } +}; + +typedef EAGenFactorys_iterator_class EAGenFactorys_iterator; + +bool operator==(const EAGenFactorys_iterator_class& x, + const EAGenFactorys_iterator_class& y) +{ + return x.m_DelegateSF == y.m_DelegateSF && x.m_delegate == y.m_delegate; +} + +bool operator!=(const EAGenFactorys_iterator_class& x, + const EAGenFactorys_iterator_class& y) { + return !(x == y); +} + + +string makeFerrisPluginPath( const std::string& dir, const std::string& libname ) +{ + stringstream ret; + + static const gchar* LIBFERRIS_PLUGIN_PREFIX = g_getenv ("LIBFERRIS_PLUGIN_PREFIX"); + if( LIBFERRIS_PLUGIN_PREFIX ) + ret << LIBFERRIS_PLUGIN_PREFIX << "/"; + else + ret << PREFIX << "/lib/ferris/plugins/"; + ret << dir; + ret << "/"; + if( !libname.empty() ) + { + ret << "/" << libname; + } +// cerr << "makeFerrisPluginPath() ret:" << ret.str() << endl; + return ret.str(); +} + + + /** + * Setup eaindex plugin factories + */ + void ensureEAIndexPluginFactoriesAreLoaded() + { + static bool v = true; + if( v ) + { + v = false; + +// string EAIndexersPath = PREFIX + "/lib/ferris/plugins/eaindexers/"; + string EAIndexersPath = makeFerrisPluginPath( "eaindexers" ); + + DIR *d; struct dirent *e; + if ((d = opendir (EAIndexersPath.c_str())) == NULL) + { + LG_PLUGIN_ER << "Can not open system plugin dir :" << EAIndexersPath << endl; + } + else + { + while ((e = readdir (d)) != NULL) + { + string fn = e->d_name; + LG_PLUGIN_I << "Found:" << fn << endl; + if( ends_with( fn, "factory.so" ) ) + { + try + { + LG_PLUGIN_I << "Loading plugin:" << fn << endl; + ostringstream ss; + ss << EAIndexersPath << fn; + + GModule* ghandle; + ghandle = g_module_open ( tostr(ss).c_str(), G_MODULE_BIND_LAZY); + if (!ghandle) + { + ostringstream ss; + ss << "Error, unable to open module file, %s" + << g_module_error () + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + + void (*SetupPluginFunction)() = 0; + if (!g_module_symbol (ghandle, "SetupPlugin", + (gpointer*)&SetupPluginFunction)) + { + ostringstream ss; + ss << "Error, unable to resolve MakeFactory in module file, %s" + << g_module_error() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + SetupPluginFunction(); + } + catch( GModuleOpenFailed& e ) + { + LG_PLUGIN_ER << "Failed to load plugin:" << fn << endl; + } + catch( exception& e ) + { + LG_PLUGIN_ER << "Failed to load plugin:" << fn + << " e:" << e.what() << endl; + } + } + } + closedir (d); + } + } + } + + + /** + * Setup fulltext plugin factories + */ + void ensureFulltextIndexPluginFactoriesAreLoaded() + { + static bool v = true; + if( v ) + { + v = false; + +// string FTXIndexersPath = PREFIX + "/lib/ferris/plugins/fulltextindexers/"; + string FTXIndexersPath = makeFerrisPluginPath( "fulltextindexers" ); + + DIR *d; struct dirent *e; + if ((d = opendir (FTXIndexersPath.c_str())) == NULL) + { + LG_PLUGIN_ER << "Can not open system plugin dir :" << FTXIndexersPath << endl; + } + else + { + while ((e = readdir (d)) != NULL) + { + string fn = e->d_name; + LG_PLUGIN_I << "Found:" << fn << endl; + if( ends_with( fn, "factory.so" ) ) + { + try + { + LG_PLUGIN_I << "Loading plugin:" << fn << endl; + ostringstream ss; + ss << FTXIndexersPath << fn; + + GModule* ghandle; + ghandle = g_module_open ( tostr(ss).c_str(), G_MODULE_BIND_LAZY); + if (!ghandle) + { + ostringstream ss; + ss << "Error, unable to open module file, %s" + << g_module_error () + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + LG_PLUGIN_I << "Loading2 plugin:" << fn << endl; + + void (*SetupPluginFunction)() = 0; + if (!g_module_symbol (ghandle, "SetupPlugin", + (gpointer*)&SetupPluginFunction)) + { + ostringstream ss; + ss << "Error, unable to resolve MakeFactory in module file, %s" + << g_module_error() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + LG_PLUGIN_I << "Loading3 plugin:" << fn << endl; + SetupPluginFunction(); + + LG_PLUGIN_I << "Loaded plugin:" << fn << endl; + } + catch( GModuleOpenFailed& e ) + { + LG_PLUGIN_ER << "Failed to load plugin:" << fn << endl; + } + catch( exception& e ) + { + LG_PLUGIN_ER << "Failed to load plugin:" << fn + << " e:" << e.what() << endl; + } + } + } + closedir (d); + } + } + } + + + namespace + { + FullTextIndex::MetaFullTextIndexerInterface* CreateFullTextIndexerGeneric( const char* s ) + { + return FullTextIndex::CreateFullTextIndexerFromLibrary( s ); + } + }; + + void RegisterFulltextIndexPluginAlias( const char* libname, + const std::string& ferristype ) + { + const std::string MetaIndexClassName = ferristype; + + typedef Loki::Functor< FullTextIndex::MetaFullTextIndexerInterface*, ::Loki::NullType > CreateFunction_t; + + CreateFunction_t f = Loki::BindFirst( + Loki::Functor< FullTextIndex::MetaFullTextIndexerInterface*, LOKI_TYPELIST_1( const char* ) > + ( &CreateFullTextIndexerGeneric ), libname ); + + bool reged = FullTextIndex::MetaFullTextIndexerInterfaceFactory::Instance(). + Register( MetaIndexClassName, f ); + bool regedx = FullTextIndex::appendToMetaFullTextIndexClassNames( MetaIndexClassName ); + } + + + bool RegisterFulltextIndexPlugin( const char* libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive, + const std::string& simpleTypes ) + { + RegisterFulltextIndexPluginAlias( libname, ferristype ); + + bool r = RegisterCreationModule( + "libcreationfulltextindexgeneric.so", + ferristype, + xsd, + requiresNativeKernelDrive, + simpleTypes ); + return r; + } + + + + namespace + { + EAIndex::MetaEAIndexerInterface* CreateEAIndexerGeneric( const char* s ) + { + return EAIndex::CreateEAIndexerFromLibrary( s ); + } + }; + + void RegisterEAIndexPluginAlias( const char* libname, + const std::string& ferristype ) + { + const std::string MetaIndexClassName = ferristype; + + typedef Loki::Functor< EAIndex::MetaEAIndexerInterface*, ::Loki::NullType > CreateFunction_t; + + CreateFunction_t f = Loki::BindFirst( + Loki::Functor< EAIndex::MetaEAIndexerInterface*, LOKI_TYPELIST_1( const char* ) > + ( &CreateEAIndexerGeneric ), libname ); + + + EAIndex::MetaEAIndexerInterfaceFactory::Instance(). + Register( MetaIndexClassName, f ); + EAIndex::appendToMetaEAIndexClassNames( MetaIndexClassName ); + } + + + bool RegisterEAIndexPlugin( const char* libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive, + const std::string& simpleTypes ) + { + RegisterEAIndexPluginAlias( libname, ferristype ); + + bool r = RegisterCreationModule( + "libcreationeaindexgeneric.so", + ferristype, + xsd, + requiresNativeKernelDrive, + simpleTypes ); + } + + + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + + + void + Context::setContext( fh_context parent, const std::string& rdn ) + { +// cerr << "Context::setContext() this:" << (void*)this << " parent:" << (void*)GetImpl(parent) << endl; + ParentContext = parent; + DirName = rdn; + setAttributeContext( GetImpl(ParentContext) ); + m_forcePassiveViewCacheIsValid = false; + } + + /** + * If a VFS module supports renaming contexts based on changing their "name" + * attribute, then this method should return true; + */ + bool + Context::supportsRename() + { + return false; + } + + /** + * Some extra methods are needed to allow the VM to reclaim a module's + * context objects and then reify them back on demand. If your module + * supports these extra operations then return true. + * + * default false + */ + bool + Context::supportsReClaim() + { + return false; + } + + /** + * If the module emits events when interesting things happen then + * override this and return true. + * + * @default false + * @see isActiveView() + * @see getForcePassiveView() + */ + bool + Context::supportsMonitoring() + { + return false; + } + + bool + Context::disableOverMountingForContext() + { + return false; + } + + /** + * If a subclass overrides priv_getSubContext() to check and make a subcontext + * without reading the whole dir (see native module) then it should override + * this method and return true. + * + * @return true if supports, false by default + */ + bool + Context::priv_supportsShortCutLoading() + { + return false; + } + + bool + Context::supportsShortCutLoading() + { + return getOverMountContext()->priv_supportsShortCutLoading(); + } + + + + /** + * Modules involving network IO can override this method and return true. + * + * Note that this effects how download-if-mtime-since is treated. For local + * filesystems the mtime test is done automatically in getIStream(). For + * remote filesystems the mtime is collected but not directly tested to allow + * the plugin to test it using the underlying net protocol. + * + * Call + * + * @default false + */ + bool + Context::isRemote() + { + return false; + } + + + + + +/** + * Try to guess how many subcontexts this context has. Some context classes + * wont allow this operation, in which case they will return 0. + * + * This method was added to allow contexts to give a guess for how many + * children they have. For some contexts this is a relatively fast operation + * and so a gauge can be presented to the user to show feedback during the + * read() operation. + * + * @see priv_guessSize() + * @return Either 0 if there are no subcontexts or no guess can be made, or a + * rough idea of how many subcontexts *may* exist. + */ + long + Context::guessSize() + throw() + { + return getOverMountContext()->priv_guessSize(); + } + + +/** + * Default implementation returns 0 so that subclasses of context class do not have + * to implement this method unless it makes sense for them. + * + * @see guessSize() + * @return 0 always + */ + long + Context::priv_guessSize() throw() + { + return 0; + } + + fh_context SL_SubCreate_alwaysThrow( fh_context c, fh_context md ) + { + fh_stringstream ss; + ss << "SL_SubCreate_alwaysThrow called, something major went wrong." + << " url:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), GetImpl(c) ); + } + + + std::string getStrSubCtx( const std::string& earl, + std::string def, + bool getAllLines, + bool throw_for_errors ) + { + try + { + fh_context c = Resolve( earl ); + return getStrAttr( c, "content", def, getAllLines, throw_for_errors ); + } + catch( ... ) + { + if( throw_for_errors ) + throw; + } + return def; + + } + + std::string getStrSubCtx( const std::string& earl, + std::string subname, + std::string def, + bool getAllLines, + bool throw_for_errors ) + { + stringstream ss; + ss << earl << "/" << subname; + return getStrSubCtx( tostr(ss), def, getAllLines, throw_for_errors ); + } + + + string getStrSubCtx( fh_context c, + string subname, + string def, + bool getAllLines, + bool throw_for_errors ) + { + string ret = def; + + try + { + fh_context child = c->getSubContext( subname ); + ret = getStrAttr( child, "", def, getAllLines ); + } + catch(...) + { + if( throw_for_errors ) + throw; + } + return ret; + } + + /********************************************************************************/ + + + + + + /* FIXME */ + fh_context SL_SubCreate_text ( fh_context c, fh_context md ) + { + fh_context newc = c->SubCreate_file( c, md ); + return newc; + } + + + + fh_context SL_SubCreate_file( fh_context c, fh_context md ) + { + LG_CTX_D << "SL_SubCreate_file() rdn:" << getStrSubCtx( md, "name", "N/A" ) << endl; + return c->SubCreate_file( c, md ); + } + fh_context SL_SubCreate_dir( fh_context c, fh_context md ) + { + LG_CTX_D << "SL_SubCreate_dir() rdn:" << getStrSubCtx( md, "name", "N/A" ) << endl; + return c->SubCreate_dir( c, md ); + } + + fh_context + Context::SubCreate_file( fh_context c, fh_context md ) + { + LG_CTX_D << "Context::SubCreate_file() c:" << c->getURL() << endl; + Throw_FerrisCreateSubContextNotSupported("",this); + } + fh_context + Context::SubCreate_dir( fh_context c, fh_context md ) + { + LG_CTX_D << "Context::SubCreate_dir() c:" << c->getURL() << endl; + Throw_FerrisCreateSubContextNotSupported("",this); + } + + fh_context SL_SubCreate_ea( fh_context c, fh_context md ) + { + return c->SubCreate_ea( c, md ); + } + + + + fh_context + Context::SubCreate_ea( fh_context c, fh_context md ) + { + LG_CTX_D << "Context::SubCreate_ea(1)" << endl; + string error_desc = ""; + + string explicitShortName = getStrSubCtx( md, "explicit-plugin-name", "" ); + + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; + Pri >= AttributeCreator::CREATE_PRI_NOT_SUPPORTED; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); +// ++iter ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + try + { + string rdn = getStrSubCtx( md, "name", "", true, true ); + + if( !explicitShortName.empty() ) + { + LG_ATTR_D << "explicitShortName:" << explicitShortName + << " eaname:" << rdn + << endl; + fh_MatchedEAGeneratorFactory f = *iter; + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(f) ) ) + { + if( ff->getShortName() != explicitShortName ) + continue; + } + } + + if( (*iter)->getCreatePriority() == Pri + && (*iter)->supportsCreateForContext(c) ) + { + fh_attribute attr = (*iter)->CreateAttr( c, rdn, md ); + LG_CTX_D << "Context::SubCreate_ea(l.a)" << endl; + +// // DEBUG +// { +// fh_MatchedEAGeneratorFactory f = *iter; +// if( StaticGModuleMatchedEAGeneratorFactory* ff +// = dynamic_cast( GetImpl(f) ) ) +// { +// LG_CTX_D << "Context::SubCreate_ea(l.name):" +// << ff->getShortName() << endl; +// } +// } + + + string v = getStrSubCtx( md, "value", "", true, false ); + LG_CTX_D << "Context::SubCreate_ea(l.b) v:" << v << endl; + + if( v.length() ) + { + fh_iostream oss = attr->getIOStream( ios::in|ios::out|ios::trunc ); + oss << v << flush; + } + LG_CTX_D << "Context::SubCreate_ea(l.c)" << endl; + return c; + } + } + catch( exception& e ) + { + LG_ATTR_D << "Context::SubCreate_ea e:" << e.what() << endl; + error_desc = e.what(); +// fh_stringstream ss; +// ss << "SubCreate_ea() failed creating the EA" +// << " url:" << c->getURL() +// << " rdn:" << getStrSubCtx( md, "name", "" ) +// << " e:" << e.what() +// << endl; +// cerr << tostr(ss) << endl; +// Throw_FerrisCreateAttributeFailed( tostr(ss), GetImpl(c) ); + } + } + } + + fh_stringstream ss; + ss << "SubCreate_ea() could not find a functional ea generator to create the new EA." + << " url:" << c->getURL() + << " rdn:" << getStrSubCtx( md, "name", "" ) + << " e:" << error_desc + << endl; + LG_CTX_D << ss.str() << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), GetImpl(c) ); + } + + static stringlist_t& getExtraGenerateSchemaSimpleTypes() + { + static stringlist_t o; + return o; + } + + bool appendExtraGenerateSchemaSimpleTypes( const std::string& s ) + { + getExtraGenerateSchemaSimpleTypes().push_back( s ); + return true; + } + + fh_istream + Context::generateSchema( CreateSubContextSchemaPart_t& m ) + { + fh_stringstream ss; + typedef CreateSubContextSchemaPart_t m_t; + typedef m_t::iterator MI; + + ss << "" << endl + << endl; + + for( stringlist_t::iterator ci = getExtraGenerateSchemaSimpleTypes().begin(); + ci != getExtraGenerateSchemaSimpleTypes().end(); ++ci ) + { + ss << *ci << endl; + } + + ss << "" + << "" << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << "" << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << "" << endl + << " " << endl + << "" << endl + << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << "" << endl; + { + stringlist_t sl = FullTextIndex::getLexiconClassNames(); + stringlist_t::iterator sli = find( sl.begin(), sl.end(), "FrontCodedBlocks (3-in-4)" ); + if( sli != sl.end() ) + { + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + sl.erase( sli ); + } + + for( stringlist_t::iterator i = sl.begin(); i != sl.end(); ++i ) + { +// // don't list the alias explicitly +// stringlist_t::iterator anb = FullTextIndex::getLexiconAliasNames().begin(); +// stringlist_t::iterator ane = FullTextIndex::getLexiconAliasNames().end(); +// if( ane != find( anb, ane, *i ) ) +// continue; + + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + } + + } + ss << "" << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << endl + << "" << endl; + { + stringlist_t sl = FullTextIndex::getLexiconClassNames(); + stringlist_t::iterator sli = find( sl.begin(), sl.end(), "Uncompressed (db4 hash)" ); + if( sli != sl.end() ) + { + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + sl.erase( sli ); + } + + for( stringlist_t::iterator i = sl.begin(); i != sl.end(); ++i ) + { + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + } + + } + ss << "" << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << endl + << "" << endl; + { + stringlist_t sl = FullTextIndex::getReverseLexiconClassNames(); + stringlist_t::iterator sli = find( sl.begin(), sl.end(), "Uncompressed (db4 hash)" ); + if( sli != sl.end() ) + { + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + sl.erase( sli ); + } + + for( stringlist_t::iterator i = sl.begin(); i != sl.end(); ++i ) + { + ss << " " << endl; + ss << " " << endl; + ss << " " << endl; + } + + } + ss << "" << endl + << "" << endl + << " " << endl + << " " << endl + << " " << endl + << " " << endl + << "" << endl + << endl + << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl +// << "" << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << " " << endl +// << "" << endl +// << endl + << endl; + + /** + * Allow each module to have its own XSD Simple types to use for + * restrictions. + */ + for( MI iter = m.begin(); iter != m.end(); ++iter ) + { + ss << iter->second.getXSDSimpleTypes() << endl; + } + + ss << endl; + ss << endl; + ss << "" + << "" << endl + << " " << endl; + + for( MI iter = m.begin(); iter != m.end(); ++iter ) + { + ss << " first << "\" />" << endl; + } + + ss << " " << endl + << "" << endl; + + for( MI iter = m.begin(); iter != m.end(); ++iter ) + { + ss << iter->second.getSchema() << endl; + } + + ss << "" << endl; + return ss; + } + + void + Context::addEAGeneratorCreateSubContextSchema( CreateSubContextSchemaPart_t& m ) + { + + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; + Pri >= AttributeCreator::CREATE_PRI_NOT_SUPPORTED; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); +// ++iter ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + try + { + LG_CTX_D << "Context::addEAGeneratorCreateSubContextSchema() " + << " pri:" << (*iter)->getCreatePriority() + << " supports context:" << (*iter)->supportsCreateForContext(this) + << endl; + + if( (*iter)->getCreatePriority() == Pri + && (*iter)->supportsCreateForContext(this) ) + { + LG_CTX_D << "Context::addEAGeneratorCreateSubContextSchema(have ea) " << endl; + + m["ea"] = SubContextCreator( + SL_SubCreate_ea, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + return; + } + } + catch( exception& e ) + { + LG_ATTR_D << "e:" << e.what() << endl; + } + } + } + + } + + void + Context::addStandardFileSubContextSchema( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator(SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + m["txt"] = SubContextCreator(SL_SubCreate_text, +/**/ " \n" +/**/ " \n" +/**/ " \n" +/**/ " \n" +/**/ " \n"); + + + insertAbstractCreatorModules( m ); + } + + + void + Context::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { +// cerr << "url:" << getURL() << endl; +// Ferris::BackTrace(); + Throw_FerrisCreateSubContextNotSupported("",this); + } + + void + Context::FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m, + bool followOvermount ) + { + try + { + fh_context c = this; + + if( followOvermount ) + { + tryToOverMount( true ); + c = getOverMountContext(); + + } + +// cerr << "Context::FillCreateSubContextSchemaParts() HAVE overmounter" +// << " c:" << c->getURL() << endl; + + c->priv_FillCreateSubContextSchemaParts( m ); + } + catch( exception& e ) + { +// cerr << "Context::FillCreateSubContextSchemaParts() no overmounter" +// << " c:" << getURL() << endl; + getOverMountContext()->priv_FillCreateSubContextSchemaParts( m ); + } + } + + + /** + * Before calling createSubContext() call here to get a DTD for the md param + * of createSubContext. The document format that is sought for the metadata (md) + * for createSubContext() should be a valid document under the DTD returned + * from this function. + * + * @returns Stream of the DTD that metadata should follow that is passed to + * createSubContext() + */ + fh_istream + Context::getCreateSubContextSchema() + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->getCreateSubContextSchema(); + } + ensureEAIndexPluginFactoriesAreLoaded(); + ensureFulltextIndexPluginFactoriesAreLoaded(); + + CreateSubContextSchemaPart_t m; + FillCreateSubContextSchemaParts( m ); + return generateSchema( m ); + } + + +/** + * CreateSubContext method for subclasses to override. + * + * Create a new subcontext. This method always throws a not supported exception. + * This makes read only subcontexts easy to implememnt because they dont have + * to override this method. + * + * @param rdn The relative name of the new context to create + * @param md specific information to the creation of a subclass. For example, + * when creating a new subcontext in a native filesystem then + * the m param may contain information telling the native context + * if it should create a file or a directory. + * + * @see createSubContext() + * @return The new context + * @throws FerrisCreateSubContextFailed If there was a complication creating the new + * context. + * @throws FerrisCreateSubContextNotSupported If the operation is not supported by this + * context. + */ + fh_context + Context::priv_createSubContext( const string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + LG_CTX_D << "Context::priv_createSubContext(1)" << endl; + ensureEAIndexPluginFactoriesAreLoaded(); + LG_CTX_D << "Context::priv_createSubContext(1.ea factories done)" << endl; + ensureFulltextIndexPluginFactoriesAreLoaded(); + LG_CTX_D << "Context::priv_createSubContext(2)" << endl; + + try + { + CreateSubContextSchemaPart_t m; + typedef CreateSubContextSchemaPart_t m_t; + typedef m_t::iterator MI; + +// cerr << "Context::priv_createSubContext(1) url:" << getURL() << endl; +// cerr << "Context::priv_createSubContext(1) md.addr:" << toVoid(md) << endl; +// cerr << "Context::priv_createSubContext(1) md.url:" << md->getURL() << endl; + md->read(); +// cerr << "Context::priv_createSubContext(2) url:" << getURL() << endl; +// md->dumpOutItems(); +// cerr << "Context::priv_createSubContext(3) url:" << getURL() << endl; + +// SubContextNames_t na = md->getSubContextNames(); +// for( SubContextNames_t::iterator iter = na.begin(); +// iter != na.end(); ++iter ) +// { +// cerr << *iter << endl; +// try +// { +// fh_context child = md->getSubContext( *iter ); +// fh_istream ss = child->getIStream(); +// cerr << " : " << StreamToString(ss) << endl; +// } +// catch( exception& e ) +// { +// cerr << " .. err:" << e.what() << endl; +// } + +// } + + +// cerr << "Context::priv_createSubContext(top) md:" << md->getURL() << endl; +// md->dumpOutItems(); +// try +// { +// bool v = md->isSubContextBound("file"); +// cerr << "v:" << v << endl; +// } +// catch(...) { +// } + +// cerr << "Context::priv_createSubContext(2) url:" << getURL() << endl; +// md->dumpOutItems(); +// cerr << "Context::priv_createSubContext(2.1) url:" << getURL() << endl; + + /** + * We always save the ferris-type ea on the context itself, not in the + * overmount to save time finding it later. + */ + static bool attemptingToCreateFerrisType = false; + + if( md && md->isSubContextBound("ea") ) + { + + fh_context eac = md->getSubContext( "ea" ); + if( eac->isSubContextBound("name")) + { + fh_context nc = eac->getSubContext( "name" ); + string n = getStrAttr( nc, "content", "" ); + if( n == "ferris-type" ) + attemptingToCreateFerrisType = true; + if( n == "is-ferris-compressed" ) + attemptingToCreateFerrisType = true; + if( n == "libferris-journal-changes" ) + attemptingToCreateFerrisType = true; + if( eac->isSubContextBound("dont-delegate-to-overmount-context") ) + attemptingToCreateFerrisType = true; + } + } + + LG_CTX_D << "Context::priv_createSubContext(3)" << endl; + FillCreateSubContextSchemaParts( m, !attemptingToCreateFerrisType ); + LG_CTX_D << "Context::priv_createSubContext(4)" << endl; +// cerr << "Context::priv_createSubContext(3) url:" << getURL() << endl; + + typedef list< FerrisCreateAttributeFailed > createEAFailedList_t; + createEAFailedList_t createEAFailedList; + bool creatingEA = false; + bool createdPrimaryObject = false; + if( md->isSubContextBound("ea") ) + { + creatingEA = true; + } + + for( MI iter = m.begin(); iter != m.end(); ++iter ) + { +// cerr << "Context::priv_createSubContext() url:" << getURL() +// << " name:" << iter->first +// << endl; +// cerr << "create-object iter:" << iter->first << endl; + + try + { + if( !md->isSubContextBound( iter->first )) + { + continue; + } + + fh_context child = md->getSubContext( iter->first ); +// cerr << "calling perform for:" << iter->first +// << " child:" << child->getDirPath() +// << " this:" << getURL() +// << " subname:" << getStrSubCtx( child, "name", "" ) +// << " subvalue:" << getStrSubCtx( child, "value", "" ) +// << endl; +// md->dumpOutItems(); + + + + LG_CTX_D << "calling perform for:" << iter->first << endl; + fh_context newc = iter->second.perform( this, child ); + createdPrimaryObject = true; + LG_CTX_D << "called perform for:" << iter->first << endl; + +// cerr << "addToCreateHistory(test) rdn:" +// << getStrSubCtx( child, "name", "" ) +// << endl; + + LG_CTX_D << "saving to create history..." << endl; + // save to history list + if( getStrSubCtx( child, "name", "ferris-type" ) != "ferris-type" ) + { +// cerr << "calling addToCreateHistory() for:" << iter->first +// << " child:" << child->getDirPath() +// << " this:" << getURL() +// << " subname:" << getStrSubCtx( child, "name", "" ) +// << " subvalue:" << getStrSubCtx( child, "value", "" ) +// << endl; + addToCreateHistory( iter->first ); + } + + + LG_CTX_D << "saving advisory type info..." << endl; + // create advisory type info + if( !attemptingToCreateFerrisType && iter->first != "ea" ) + { + string newctype = getStrAttr( newc, "ferris-type", "" ); + if( newctype.empty() && iter->first != "file" && iter->first!="dir" ) + { + + Util::ValueRestorer< bool > x( attemptingToCreateFerrisType, true ); + try + { +// LG_CTX_D << "Creating ferris-type ea on:" << newc->getURL() +// << " value:" << iter->first +// << endl; + // + // We use the low level method to make sure that by default the + // ferris-type value is stored into an XFS on disk ea. + // ie. we dont follow the overmount by default, make it native + // if possible + // + try + { +// cerr << "Context::priv_createSubContext(make ft)" +// << " value:" << iter->first +// << " url:" << getURL() +// << " newc:" << newc->getURL() +// << endl; + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "ea", "" ); + child->setChild( "name", "ferris-type" ); + child->setChild( "value", iter->first ); + // Release 1.1.61: this makes ferris-type for all cp -av + // which is incompatable with fileutils. + // newc->priv_createSubContext( "", md ); + } + catch( exception& e ) + { + } + +// LG_CTX_D << "Created ferris-type ea on:" << newc->getURL() +// << " read back value:" << getStrAttr( newc, "ferris-type","") +// << endl; + } + catch( exception& e ) + { + LG_CTX_W << "warning, cant set ferris-type ea to:" + << iter->first + << " reason:" << e.what() + << endl; + } + } + } + + LG_CTX_D << "returning after sucessful create..." << endl; + return newc; + } + catch( NoSuchSubContext& e ) + { +// cerr << "not error. iter:" << iter->first << " not bound" << endl; + } + catch( FerrisCreateAttributeFailed& e ) + { + LG_CTX_D << "FerrisCreateAttributeFailed. creatingEA:" << creatingEA + << " createdPrimaryObject:" << createdPrimaryObject + << " e:" << e.what() + << endl; + + if( creatingEA ) + { + if( createdPrimaryObject ) + throw; + + createEAFailedList.push_back( e ); + continue; + } + else + { + cerr << "Error creating new object. !!! iter:" << iter->first + << " url:" << getURL() + << " e:" << e.what() << endl; + BackTrace(); + } + } + catch( exception& e ) + { + cerr << "Error creating new object. !!! iter:" << iter->first + << " url:" << getURL() + << " e:" << e.what() << endl; + BackTrace(); + } + } + + if( creatingEA && !createEAFailedList.empty() ) + { + for( createEAFailedList_t::const_iterator ei = createEAFailedList.begin(); + ei != createEAFailedList.end(); ++ei ) + { + } + throw createEAFailedList.back(); + } + } + catch( FerrisCreateSubContextFailed& e ) + { + throw e; + } + catch( exception& e ) + { +// BackTrace(); +// cerr << "Context::priv_createSubContext() e:" << e.what() << endl; + Throw_FerrisCreateSubContextFailed( e.what(), this ); + } + +// cerr << "Context::priv_createSubContext(end1)" << endl; + fh_stringstream ss; + ss << "url:" << getURL() << " rdn:" << rdn << endl; +// cerr << "Context::priv_createSubContext(end) error:" << tostr(ss) << endl; +// BackTrace(); + Throw_FerrisCreateSubContextNotSupported( tostr(ss), 0 ); // this ); + } + + namespace Factory + { + /** + * A cache of the context types that were recently created. + * use the cursor API to access it. + */ + fh_context getCreateHistory() + { + string CREATEHISTORY_URL = Shell::getHomeDirPath_nochecks() + CREATEHISTORY_RELATIVE; + string dotferrisPath = Shell::getHomeDirPath_nochecks() + "/.ferris"; + string dbName = "/cache.db"; + string dbPath = dotferrisPath + dbName; + + try + { +// cerr << "CREATEHISTORY_URL:" << CREATEHISTORY_URL << endl; + fh_context c = Resolve( dbPath ); + } + catch( exception& e ) + { +// cerr << "can't resolve() going to make it e:" << e.what() << endl; +// cerr << "path:" << dotferrisPath << endl; + + fh_context dotferris = Shell::acquireContext( dotferrisPath ); + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "db4", "" ); + child->setChild( "name", dbName ); + fh_context dbc = dotferris->createSubContext( "", md ); + } + + fh_context dbc = Resolve( dbPath ); + if( !dbc->isSubContextBound( "create-history" ) ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "dir", "" ); + child->setChild( "name", "create-history" ); + fh_context x = dbc->createSubContext( "", md ); + } + + + // using acquireContext() is a bad move from here because if it needs + // to infact create a new context then it will end up calling here again + // which will call it again to create the cachedb context (loop) +// fh_context parent = Shell::acquireContext( CREATEHISTORY_URL ); + try + { + fh_context dbc = Resolve( CREATEHISTORY_URL ); + return dbc; + } + catch( exception& e ) + { + cerr << "cache context could not be found or created." + << " CREATEHISTORY_URL:" << CREATEHISTORY_URL + << " e:" << e.what() + << endl; + } + return 0; + } + }; + + /** + * Used by priv_createSubContext and subclasses who override priv_createSubContext + * to add entries to the history list of what types where created. + * + * This is used by graphical clients to present a list of the most recent item + * types that were created for quick creation of more files. + * + * @param fileType identifier for the context that was last created + */ + void + Context::addToCreateHistory( const std::string& fileType ) + { +#ifdef DONT_TRACK_CREATION_HISTORY + return; +#endif + static bool SKIP_TRACK_CREATION_HISTORY = + g_getenv( "LIBFERRIS_SKIP_TRACKING_CREATION_HISTORY" ) != 0; + if( SKIP_TRACK_CREATION_HISTORY ) + return; + + static bool addingAlready = false; + if( addingAlready ) + return; + Util::ValueRestorer< bool > _obj( addingAlready, true ); + + if( !fileType.empty() ) + { + fh_context parent = Factory::getCreateHistory(); + fh_context cursor = Factory::getCursor( parent ); + string currentLast = getStrAttr( cursor, "content", "" ); + if( currentLast != fileType ) + { +// cerr << "Context::addToCreateHistory(1) this:" << getURL() +// << " fileType:" << fileType +// << endl; + cursor = Cursor::cursorNext( cursor ); + setStrAttr( cursor, "content", fileType ); + } + } + } + + +/** + * Create a new subcontext. This method always throws a not supported exception. + * This makes read only subcontexts easy to implememnt because they dont have + * to override this method. + * + * @see priv_createSubContext() + * @param rdn The relative name of the new context to create + * @param md specific information to the creation of a subclass. For example, + * when creating a new subcontext in a native filesystem then + * the m param may contain information telling the native context + * if it should create a file or a directory. + * + * @return The new context + * @throws FerrisCreateSubContextFailed If there was a complication creating the new + * context. + * @throws FerrisCreateSubContextNotSupported If the operation is not supported by this + * context. + */ + fh_context + Context::createSubContext( const string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + try + { + const string filename = getLastPartOfName( rdn ); + + LG_CTX_D << "Context::createSubContext() url:" << getURL() << endl; + LG_CTX_D << "Context::createSubContext() md.addr:" << toVoid(md) << endl; +// md->dumpOutItems(); + +// if( !getOverMountContext()->canInsert( filename ) ) +// { +// ostringstream ss; +// ss << "Context already exists! filename:" << filename << " rdn:" << rdn; +// Throw_FerrisCreateSubContextFailed( tostr( ss ), this ); +// } + + if( md && md->isSubContextBound("ea") ) + { +// cerr << "Context::createSubContext(1)" << endl; + + fh_context eac = md->getSubContext( "ea" ); + if( eac->isSubContextBound("name")) + { +// cerr << "Context::createSubContext(2)" << endl; + + fh_context nc = eac->getSubContext( "name" ); + string n = getStrAttr( nc, "content", "" ); + if( n == "ferris-type" || n == "is-ferris-compressed" + || n == "libferris-journal-changes" + || eac->isSubContextBound("dont-delegate-to-overmount-context") ) + { +// cerr << "-+-Creating new attribute in cc..." << endl; + LG_CTX_D << "-+-Creating new attribute in cc..." << endl; + fh_context ret = getCoveredContext()->priv_createSubContext( filename, md ); + LG_CTX_D << "-+-Created new attribute in cc..." << endl; + + + LG_CTX_D << "cc:" << getCoveredContext() << endl; + LG_CTX_D << "omc:" << getOverMountContext() << endl; + LG_CTX_D << "attr.name:" << n << endl; + LG_CTX_D << "cc.isBound:" << getCoveredContext()->isAttributeBound( n ) << endl; + LG_CTX_D << "omc.isBound:" << getOverMountContext()->isAttributeBound( n ) << endl; + + if( EA_Atom* atom = getCoveredContext()->getAttributePtr( n ) ) + { + LG_CTX_D << "Have atom for cc..." << endl; + getOverMountContext()->setAttribute( n, atom, false ); + } + + return ret; + } + } + } + + LG_OVERMOUNT_I << "Context::createSubContext() trying to overmount c:" << getDirPath() << endl; + tryToOverMount( true ); + fh_context ret = getOverMountContext()->priv_createSubContext( filename, md ); + return ret; + } + catch( FerrisCreateSubContextFailed& e ) + { + throw e; + } + catch( FerrisCreateSubContextNotSupported& e ) + { + throw e; + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Context::createSubContext() rdn:" << rdn + << " e:" << e.what() + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), this ); + } + } + + fh_context + Context::createSubContext( const std::string& rdn, fh_mdcontext md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_context c; + Upcast( c, md ); + return createSubContext( rdn, c ); + } + + + + +/** + * Create a new attribute with the given rdn. + * + * The attribute has no initial value. ie. The Istream from the attribute with + * be at eof. + * + * @param rdn Name of new attribute + * @return New attribute + * + * @throws FerrisCreateAttributeFailed Creation failed, though this context does + * Support the creation operation. + * @throws FerrisCreateAttributeNotSupported This context does not support creation of + * EA. + * @throws AttributeAlreadyInUse If there is already an attribute with the given rdn. + */ + fh_attribute + Context::createAttribute( const string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported, + AttributeAlreadyInUse ) + { + if( isAttributeBound( rdn ) ) + { + ostringstream ss; + ss << "createAttribute() AttributeAlreadyInUse:" << rdn; + Throw_AttributeAlreadyInUse( tostr(ss), 0 ); + } + + /* + * FIXME: should really cache this. + */ + + // + // FIXME: Need to recode this in light of new attribute API + // + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); +// ++iter ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + try + { + if( (*iter)->getCreatePriority() == Pri ) + { + return (*iter)->CreateAttr( this, rdn ); + } + } + catch( exception& e ) + { + LG_ATTR_D << "e:" << e.what() << endl; + } + } + } + + ostringstream ss; + ss << "createAttribute() operation not supported by default context rdn:" << rdn; + Throw_FerrisCreateAttributeNotSupported( tostr(ss), 0 ); + } + + +/** + * If the attribute exists already then return it, otherwise create a new + * attribute with the given rdn and return it. + * + * @param rdn Name for attribute sought. + * @throws FerrisCreateAttributeFailed Creation failed, though this context does + * Support the creation operation. + * @throws FerrisCreateAttributeNotSupported This context does not support creation of + * EA. + */ + fh_attribute + Context::acquireAttribute( const string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported ) + { + if( isBound(OverMountContext_Delegate) ) + { + return OverMountContext_Delegate->acquireAttribute( rdn ); + } + + if( isAttributeBound( rdn ) ) + { + return getAttribute( rdn ); + } + return createAttribute( rdn ); + } + + +/** + * Get a handle for the subcontext with a final path component of rdn. + * + * @see getSubContextNames() + * @see isSubContextBound() + * + * @param rdn the filename / final path component for the subcontext that + * is sought. + * @throws NoSuchSubContext If there is no subcontext with a name of rdn + * @return the subcontext with name==rdn + */ + fh_context + Context::getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + if( rdn == "." ) + { + return this; + } + if( rdn == ".." ) + { + return getParent(); + } + return getOverMountContext()->priv_getSubContext( rdn ); + } + + +/** + * Get the names (rdn) of each subcontext. + * + * @see getSubContext() + * @see isSubContextBound() + * + * @returns An STL collection of the names of each subcontext. + */ + Context::SubContextNames_t& + Context::getSubContextNames() + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->getSubContextNames(); + } + + if( SubContextNamesCacheIsValid ) + { + LG_CTX_D << "Context::getSubContextNames() cached! " + << " path:" << getDirPath() + << " SubContextNamesCache.size():" << SubContextNamesCache.size() + << endl; + return SubContextNamesCache; + } + + UnPageSubContextsIfNeeded(); + Items_t& items = getSortedItems(); + + SubContextNamesCacheIsValid = true; + SubContextNamesCache.clear(); + + LG_CTX_D << "Context::getSubContextNames(remake) " + << " path:" << getDirPath() + << " items.size():" << items.size() + << " SubContextNamesCache.size():" << SubContextNamesCache.size() + << endl; + + for( Items_t::iterator iter = items.begin(); + iter != items.end(); iter++ ) + { + if( !(*iter)->HasBeenDeleted ) + { + LG_CTX_D << "Context::getSubContextNames() adding:" << (*iter)->getDirName() << endl; + SubContextNamesCache.push_back( (*iter)->getDirName() ); + } + } + + LG_CTX_D << "Context::getSubContextNames() " + << " path:" << getDirPath() + << " items.size():" << items.size() + << " SubContextNamesCache.size():" << SubContextNamesCache.size() + << endl; + + return SubContextNamesCache; + } + + + + + + + + + + + +/** + * Create a new context which is covering context cc. + * + * The covered context (cc) is used to mount a context over the top of another + * context. + * + * @see getCoveredContext() + * @param cc The context to cover. + * + */ + Context::Context( Context* cc ) + : + CoveredContext( cc ), + NumberOfSubContexts(0), + OverMountContext_Delegate(0), + DirOpVersion(0), + + /* Context bitfields */ + Dirty( 0 ), + AttributesHaveBeenCreated( 0 ), + HaveDynamicAttributes( 0 ), + updateMetaData_First_Time( 1 ), + ensureUpdateMetaDataCalled_virgin(1), + ReadingDir(0), + HaveReadDir(0), + FiredStartReading(0), + WeAreInFreeList(1), + EAGenFactorys_isVirgin(1), + SubContextNamesCacheIsValid( false ), + ContextWasCreatedNotDiscovered( false ), + HasBeenDeleted( false ), + m_overMountAttemptHasAlreadyFailed( false ), + m_overMountAttemptHasAlreadyFailedEAOnly( false ), + m_isNativeContext( false ), + m_ChainedViewContext_Called_SetupEventConnections( false ), + m_tryToGetImplicitTreeSmushHasFailed_forDirectory( false ), + m_tryToGetImplicitTreeSmushHasFailed_forURL( false ), + m_forcePassiveViewCache( false ), + m_forcePassiveViewCacheIsValid( false ), + m_holdingReferenceToParentContext( false ), + AggregateData( 0 ), + m_handlablesToReleaseWithContext( 0 ) + { + getCacheManager()->addToFreeList( this ); + getNamingEvent_Stop_Reading_Context_Sig().connect( mem_fun( *this, &Context::ReadDone )); + + LG_CTX_D << "Context() this:" << this << endl; + + +// createStateLessAttributes(); + +#ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT + addContextToMemoryManagementData(this); +#endif + } + + + Context::Context( Context* parent, const std::string& rdn ) + : + CoveredContext( 0 ), + NumberOfSubContexts(0), + OverMountContext_Delegate(0), + DirOpVersion(0), + + /* Context bitfields */ + Dirty( 0 ), + AttributesHaveBeenCreated( 0 ), + HaveDynamicAttributes( 0 ), + updateMetaData_First_Time( 1 ), + ensureUpdateMetaDataCalled_virgin(1), + HaveReadDir(0), + FiredStartReading(0), + WeAreInFreeList(1), + ReadingDir(0), + EAGenFactorys_isVirgin(1), + SubContextNamesCacheIsValid( false ), + ContextWasCreatedNotDiscovered( false ), + HasBeenDeleted( false ), + m_overMountAttemptHasAlreadyFailed( false ), + m_overMountAttemptHasAlreadyFailedEAOnly( false ), + m_isNativeContext( false ), + m_ChainedViewContext_Called_SetupEventConnections( false ), + m_tryToGetImplicitTreeSmushHasFailed_forDirectory( false ), + m_tryToGetImplicitTreeSmushHasFailed_forURL( false ), + m_forcePassiveViewCache( false ), + m_forcePassiveViewCacheIsValid( false ), + m_holdingReferenceToParentContext( false ), + AggregateData( 0 ), + m_handlablesToReleaseWithContext( 0 ) + { + getCacheManager()->addToFreeList( this ); + getNamingEvent_Stop_Reading_Context_Sig().connect(sigc::mem_fun( *this, &Context::ReadDone )); + + LG_CTX_D << "Context() this:" << this << endl; + +// createStateLessAttributes(); + setContext( parent, rdn ); + +#ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT + addContextToMemoryManagementData(this); +#endif + } + + +/** + * Clean up + */ + Context::~Context() + { + LG_CTX_I << "~Context() this:" << this << " rdn:" << getDirName() << endl; +// if( ((string)"schema.xml") == getDirName() ) +// { +// CERR << "~Context() this:" << this << " rdn:" << getDirName() << endl; +// CERR << "~Context() cc:" << getCoveredContext() << endl; +// CERR << "~Context() omc:" << getOverMountContext() << endl; +// CERR << "~Context() ref_count:" << ref_count << endl; +// CERR << "-- BEGIN DEBUG_dumpcl Context::~Context()--\n"; +// dumpEntireContextListMemoryManagementData( Factory::fcerr() ); +// CERR << "-- END DEBUG_dumpMemc Context::~Context()--\n" +// << endl; +// BackTrace(); +// } + + AttributeCountRaisedFromOne_Connection.disconnect(); + +#ifdef DEBUG_CONTEXT_MEMORY_MANAGEMENT + remContextToMemoryManagementData(this); +#endif + + s_downloadMTimeSince().erase( this ); + + if( m_handlablesToReleaseWithContext ) + { + m_handlableList_t::iterator e = m_handlablesToReleaseWithContext->end(); + m_handlableList_t::iterator iter = m_handlablesToReleaseWithContext->begin(); + for( ; iter != e; ) + { + Handlable* h = *iter; + ++iter; + h->Release(); + } + delete m_handlablesToReleaseWithContext; + } + + + +// clearContext(); +// clearAttributes(); + } + + void + Context::addHandlableToBeReleasedWithContext( Handlable* h ) + { + if( !m_handlablesToReleaseWithContext ) + m_handlablesToReleaseWithContext = new m_handlableList_t; + + h->AddRef(); + m_handlablesToReleaseWithContext->push_back( h ); + } + + Context::s_downloadMTimeSince_t& + Context::s_downloadMTimeSince() + { + static Context::s_downloadMTimeSince_t* ret = 0; + if( !ret ) + { + ret = new Context::s_downloadMTimeSince_t(); + } + + return *ret; + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + /** + * This is quite tricky. Basically there needs to be the ability to perform some + * actions on a subcontext given only its rdn. Things like binary_search()ing for + * an rdn expect that the underlying set<> is sorted by rdn. + * Thus we keep the main items collection sorted by rdn and everyone is happy. + * For SortedContext objects a second Items set<> is maintained which is in sorted order + * so that such things as iterators and getSubContextNames() can operate quickly + * + * INVARIANT: getSortedItems().size() == getItems().size() + */ + Context::Items_t& + Context::getSortedItems() + { + return getItems(); + } + + Context::iterator Context::begin() + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->begin(); + } + + + UnPageSubContextsIfNeeded(); + + if( getSortedItems().empty() ) + { + /* Give it one more chance to get some items */ + read(); + + // read()ing might have caused an overmount. + if( getOverMountContext() != this ) + { + return getOverMountContext()->begin(); + } + + if( getSortedItems().empty() ) + { + LG_CTX_N << "Context::begin() getSortedItems() is empty()" + << " url:" << getURL() + << " items.size():" << getItems().size() + << " sorteditems.size():" << getSortedItems().size() + << " returning end() " + << endl; + return end(); + } + } + + if( getSortedItems().size() != getItems().size() ) + { + LG_CTX_ER << "Context::begin() -- SortedItems.size() != Items.size()" + << " SORTING IS PROBABLY BOTCHED!" << endl; + } + + // lets not try to access begin() + if( getSortedItems().empty() ) + return end(); + +// string firstrdn = (*(getSortedItems().begin()))->getDirName(); + + string firstrdn = ""; + { + Items_t::iterator e = getSortedItems().end(); + Items_t::iterator si = getSortedItems().begin(); + while( si != e && (*si)->HasBeenDeleted ) + ++si; + if( si == e ) + { + return end(); + } + firstrdn = (*si)->getDirName(); + } + if( firstrdn.empty() ) + { + return end(); + } + + + +// string firstrdn = getSubContextNames().front(); + LG_CTX_D << "Context::begin() url:" << getURL() + << " first:" << firstrdn + << " items.size():" << getItems().size() + << " sorteditems.size():" << getSortedItems().size() + << endl; +// cerr << "Context::begin() url:" << getURL() +// << " first:" << firstrdn +// << " items.size():" << getItems().size() +// << " sorteditems.size():" << getSortedItems().size() +// << endl; + +// cerr << "Context::dumpOutItems( START ) this:" << toVoid(this) +// << " url:" << getURL() << endl; +// for( Items_t::iterator iter = getSortedItems().begin(); +// iter != getSortedItems().end(); iter++ ) +// { +// cerr << "iteration. " +// << " first:" << (*iter)->getDirName() +// << " bound:" << isBound( *iter ) +// << " bound2:" << isSubContextBound( (*iter)->getDirName() ); + +// if( isBound( *iter ) ) +// { +// cerr << " path :" << (*iter)->getDirPath(); +// } +// cerr << endl; +// } + +// cerr << "Context::dumpOutItems( END )" << endl; + + return ContextIterator( this, firstrdn ); + } + + Context::iterator Context::end() + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->end(); + } + + UnPageSubContextsIfNeeded(); + return ContextIterator( this, "" ); + } + + Context::reverse_iterator + Context::rbegin() + { + return reverse_iterator(end()); + } + + Context::reverse_iterator + Context::rend() + { + return reverse_iterator(begin()); + } + + Context::iterator + Context::find( const std::string& rdn ) + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->find( rdn ); + } + + + UnPageSubContextsIfNeeded(); + + if( !priv_isSubContextBound( rdn ) ) + { + return end(); + } + return ContextIterator( this, rdn ); + } + + ContextDirOpVersion_t + Context::getDirOpVersion() + { + return getOverMountContext()->DirOpVersion; + } + + Context::iterator toContextIterator( fh_context c ) + { +// cerr << "toContextIterator() isbound c:" << isBound(c) << endl; +// cerr << "toContextIterator() c:" << c->getURL() << endl; +// cerr << "toContextIterator() isbound cp:" << c->isParentBound() << endl; + fh_context p = c->getParent(); + +// cerr << "toContextIterator() p:" << p->getURL() << endl; +// cerr << "toContextIterator() found c:" +// << (p->find( c->getDirName() )!=p->end()) << endl; +// cerr << flush; + + return p->find( c->getDirName() ); + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + static fh_context getRootOfContext( fh_context c ) + { + while( c->isParentBound() ) + { + c = c->getParent(); + } + return c; + } + + std::string + Context::getURLScheme() + { + fh_context rc = getRootOfContext( this ); +// cerr << "Context::getURLScheme() p:" << getDirPath() << endl; +// cerr << "Context::getURLScheme() n:" << getDirName() << endl; +// { +// fh_context c = this; +// while( c->isParentBound() ) +// { +// c = c->getParent(); +// cerr << "Context::getURLScheme() cp:" << c->getDirPath() << endl; +// cerr << "Context::getURLScheme() cn:" << c->getDirName() << endl; +// } +// } +// cerr << "Context::getURLScheme() rp:" << rc->getDirPath() << endl; +// cerr << "Context::getURLScheme() rn:" << rc->getDirName() << endl; + string ret = RootContextFactory::getRootContextClassName(rc); + return ret; + } + + const std::string& + Context::getDirName() const + { + return DirName; + } + + + + /** + * This is a little tricky, but for the over mount context itself we return + * not the URL of the base context. This is so that comparisons on the XML/db4 + * file itself with the getParent()->getURL() of a overmounted context will + * compare equal. + */ + std::string + Context::getURL() + { + if( isBound(CoveredContext) ) + { + return CoveredContext->getURL(); + } + + fh_stringstream ss; + ss << getURLScheme() << "://" << getDirPath(); + return tostr(ss); + } + + + +/** + * Get a reference to the collection of subcontexts. + * This method should always be prefered to using the Items collection + * directly. + * + * @return The STL collection of subcontexts. + */ + Context::Items_t& + Context::getItems() + { + return Items; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL DummyContext + : + public Context + { + void setName( const std::string& name ) + { + setContext( 0, name ); + } + virtual Context* priv_CreateContext( Context* parent, std::string rdn ) + { + BackTrace(); + return 0; + } + }; + + Context::Items_t::iterator + Context::ctx_lower_bound( Context::Items_t& items, const std::string& rdn ) + { +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + static DummyContext* dc_down = new DummyContext; + static fh_context dc = dc_down; + dc_down->setName( rdn ); + + Items_t::iterator ret = items.lower_bound( dc ); + dc_down->setName( "ctx_lower_bound_helper" ); +#else + Items_t::iterator ret = Items.get().lower_bound( rdn ); +#endif + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + #include + #include + #include + + /** + * Find an element in the Items set by its rdn (DirName) + */ + Context::Items_t::iterator + Context::getItemIter( const std::string& rdn ) + { +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + Items_t::iterator iter = ctx_lower_bound( getItems(), rdn ); +#else + Items_By_Name_Hashed_t::iterator hiter + = Items.get().find( rdn ); + Items_t::iterator iter = Items.project( hiter ); +#endif + + if( iter == Items.end() || (*iter)->getDirName() != rdn ) + { + stringstream ss; + ss << "Context::getItem() url:" << getURL() + << " items.sz:" << getItems().size() + << " NoSuchSubContext:" << rdn; + +// { +// static int fd = 0; +// if( !fd ) +// { +// fd = creat("/tmp/getitem-backtrace",S_IRWXU); +// BackTrace(fd); +// } +// } + + Throw_NoSuchSubContext( tostr(ss), this ); + } + return iter; + } + + /** + * Find an element in the Items set by its rdn (DirName) + */ + fh_context + Context::getItem( const std::string& rdn ) + { + return *getItemIter( rdn ); + } + + void + Context::eraseItemByName( Items_t& items, Context* c ) + { +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + items.erase( c ); +#else + eraseItemByName( items, c->getDirName() ); +#endif + } + + + void + Context::eraseItemByName( Items_t& items, const std::string& rdn ) + { +#ifdef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + items.get().erase( rdn ); +#else + fh_context c = 0; + { + Items_t::iterator iter = ctx_lower_bound( getItems(), rdn ); +// Items_t::iterator iter = ex_lower_bound( getItems(), +// rdn, +// items_lookup_compare() ); +// Items_t::iterator iter = lower_bound( getItems().begin(), +// getItems().end(), +// rdn, +// items_lookup_compare() ); + + if( iter == Items.end() || (*iter)->getDirName() != rdn ) + return; + + c = *iter; + } + getItems().erase(c); +#endif + } + + + + +/** + * Insert a new context as a subcontext. + * + * Currently we trust VFS code to only insert something valid. There is + * great overhead in calling read_subContext() to see if the VFS really + * thinks that a child exists. Plus that could be very recursive. + * + * @see canInsert() + * + * @param ctx The new context to insert + * @param created If true then a Created event is fired, otherwise a exists event is fired. + * @throw SubContextAlreadyInUse If the rdn of ctx is already in use as a subcontext name + * @return Handle for ctx + */ + fh_context + Context::Insert( Context* ctx, bool created, bool emit ) + throw( SubContextAlreadyInUse ) + { + try + { + + if( getOverMountContext() != this ) + { + return getOverMountContext()->Insert( ctx, created, emit ); + } + +// cerr << "Context::Insert(1) ctx:" << ctx->getURL() +// << " c:" << created << " e:" << emit << endl; + + + if( !ctx ) + { + LG_CTX_ER << "TRYING TO ADD A NULL CONTEXT!" << endl; + + fh_stringstream ss; + ss << "Attempt to add a NULL context" << endl; + Throw_SubContextAlreadyInUse( tostr(ss), ctx ); + } + + try + { + LG_CTX_D << "Insert(1) getDirPath():" << getDirPath() << endl; + LG_CTX_D << "Insert(1) ctx->getDirPath():" << ctx->getDirPath() << endl; + LG_CTX_D << "Insert(1) ctx->getDirName():" << ctx->getDirName() << endl; + } + catch( exception& e ) + { +// cerr << " ex:" << e.what() << endl; + } + + if( !canInsert( ctx->getDirName()) ) + { + LG_CTX_W << "Insert(throw in use) path:" << getDirPath() + << " ctx.name:" << ctx->getDirName() + << " ctx.path:" << ctx->getDirPath() + << endl; +// cerr << "Insert(throw in use) p:" << getDirPath() +// << " rdn:" << ctx->getDirPath() << endl; +// BackTrace(); + fh_stringstream ss; + ss << "Insert() rdn already in use:" << ctx->getDirName(); + Throw_SubContextAlreadyInUse( tostr(ss), this ); + } + + ctx->ContextWasCreatedNotDiscovered = created; + + const string& rdn = ctx->getDirName(); + getItems().insert( ctx ); + const fh_context& ret = ctx; + + +// getItems()[ rdn ] = ctx; +// const fh_context& ret = getItems()[ rdn ]; + SubContextNamesCacheIsValid = false; + + ++NumberOfSubContexts; + getOverMountContext()->DirOpVersion++; + bumpVersion(); + + + + /* + * Cascade a reference from us up the tree for this new child node + */ +// { +// Context* p = this; +// while( p ) +// { +// p->AddRef(); +// if( !p->isParentBound() ) +// break; +// p = p->getParent(); +// } +// } + + + LG_CTX_D << "Context::Insert() emiting this:" << toVoid(this) + << " created:" << created + << " emit:" << emit + << " path:" << getDirPath() + << " rdn:" << rdn + << endl; + + if( emit ) + { + LG_CTX_D << "Context::Insert() emiting created:" << created + << " path:" << getDirPath() + << " rdn:" << rdn + << " items.size():" << getItems().size() + << " sorteditems.size():" << getSortedItems().size() + << endl; + + if( created ) + { +// DEBUG_dumpcl("created new itemAAA"); + Emit_Created( 0, ret, rdn, rdn, 0 ); + } + else + { + Emit_Exists( 0, ret, rdn, rdn, 0 ); + } + } + + debug_ferris_check_for_single_ctx_violation( this, ctx ); + LG_CTX_D << "Insert(exit) path:" << ctx->getDirPath() << endl; + return ret; + } + catch( SubContextAlreadyInUse& ) + { + throw; + } + catch( exception& e ) + { + LG_CTX_ER << "Context::Insert() url:" << getURL() + << " inserting:" << ctx->getURL() + << " unexpected error:" << e.what() + << endl; +// BackTrace(); + fh_stringstream ss; + ss << "Insert() unexpected error:" << e.what() << endl; + Throw_SubContextAlreadyInUse( tostr(ss), this ); + } + } + + +/** + * Set the context that we are mounting over. + * + * @see getOverMountContext() + * @see clearOverMountContext() + * @param c Context that we are covering. + */ + void + Context::setOverMountContext( const fh_context& c ) + { + OverMountContext_Delegate = c; + } + + + +/** + * If we are mounted over another context the this method returns a pointer + * to the base context that we are covering. + * + * @see setOverMountContext() + * @see clearOverMountContext() + * @return Context we are covering or 0 + */ + Context* + Context::getOverMountContext() + { + if( isBound(OverMountContext_Delegate) ) + { + return GetImpl(OverMountContext_Delegate); + } + return this; + } + + void + Context::setCoveredContext( const fh_context& c ) + { + CoveredContext = c; + } + + + Context* + Context::getCoveredContext() + { + if( isBound(CoveredContext) ) + return GetImpl(CoveredContext); + return this; + } + + +/** + * Clear the context that we are mounting over. This ensures following + * calls to getOverMountContext() return 0. + * + * @see getOverMountContext() + * @see clearOverMountContext() + * @param c Context that we are covering. + */ + void + Context::clearOverMountContext() + { +// OverMountContext_Delegate.unbind(); + OverMountContext_Delegate = 0; + } + + /** + * Depth first context deletion + * @see unOverMount() + */ + void + Context::unOverMount_delete( CacheManager::freelist_t& deletedItems, Context* c ) + { + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + LG_VM_D << " Context::unOverMount_delete() c:" << toVoid(c) << " rdn:" << c->getDirName() << endl; +// LG_CTX_D << " Context::unOverMount_delete() c:" << c->getDirPath() << endl; + + Items_t::iterator iter = c->getItems().begin(); + for( ; iter != c->getItems().end(); ) + { + string rdn = (*iter)->getDirName(); + Context* child = GetImpl( *iter ); + ++iter; + + LG_VM_D << " Context::unOverMount_delete() child:" << toVoid(child) + << " rdn:" << rdn << endl; + + unOverMount_delete( deletedItems, child ); +// c->getItems().erase( child ); + c->eraseItemByName( c->getItems(), child ); + +// LG_CTX_D << " Context::unOverMount_delete() del child:" << child->getDirPath() << endl; + cm->removeFromFreeList( child, true ); + cerr << " Context::unOverMount() rem-from-fl:" << (void*)child << endl; + deletedItems.insert( child ); + Factory::getPluginOutOfProcNotificationEngine().forgetContext( child ); + delete child; + } + SubContextNamesCacheIsValid = false; + } + + + + /** + * Unmount the stacked file system and delete it. + * This is what the VM system should use to reclaim a stacked filesystem + */ + void + Context::unOverMount( CacheManager::freelist_t& deletedItems ) + { + Context* oc = GetImpl( OverMountContext_Delegate ); + LG_CTX_D << " Context::unOverMount() oc:" << oc->getDirPath() << endl; + + Factory::getPluginOutOfProcNotificationEngine().forgetContext( this ); + Factory::getPluginOutOfProcNotificationEngine().forgetContext( oc ); + + /* + * Delete all the children of the overmount first + */ + unOverMount_delete( deletedItems, oc ); + OverMountContext_Delegate = 0; + oc->ref_count=ImplementationDetail::MAX_REF_COUNT; +/// Remove( oc ); + Private::CacheManagerImpl* cm = Private::getCacheManagerImpl(); + cm->removeFromFreeList( oc, true ); +// cerr << " Context::unOverMount() rem-from-fl:" << (void*)oc << endl; + deletedItems.insert( oc ); + delete oc; + NumberOfSubContexts = 0; + HaveReadDir = false; + bumpVersion(); + } + + + /** + * This version does not call read() for you if you have not read the dir + */ + bool + Context::priv_isSubContextBound( const std::string& rdn, Items_t::iterator& iter ) + { +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + iter = ctx_lower_bound( getItems(), rdn ); +#else + Items_By_Name_Hashed_t::iterator hiter + = Items.get().find( rdn ); + iter = Items.project( hiter ); +#endif + + if( iter == Items.end() || (*iter)->getDirName() != rdn ) + { + return false; + } + return true; + } + + + /** + * This version does not call read() for you if you have not read the dir + */ + bool + Context::priv_isSubContextBound( const std::string& rdn ) + { +#ifndef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + Items_t::iterator iter = ctx_lower_bound( getItems(), rdn ); +#else + Items_By_Name_Hashed_t::iterator hiter + = Items.get().find( rdn ); + Items_t::iterator iter = Items.project( hiter ); +#endif + + if( iter == Items.end() || (*iter)->getDirName() != rdn ) + { + return false; + } + return true; + } + + +/** + * Check to see if there is a subcontext with the given rdn. + * + * @see getSubContextNames() + * @see getSubContext() + * + * @param rdn The final path component of the subcontext that is sought. + * @returns true if there is a subcontext with the given rdn. + */ + bool + Context::isSubContextBound( const string& rdn ) + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->isSubContextBound( rdn ); + } + + LG_CTX_D << "Context::isSubContextBound() url:" << getURL() + << " rdn:" << rdn + << " HaveReadDir:" << HaveReadDir + << " items.sz:" << getItems().size() + << endl; + +// if( !HaveReadDir ) + if( !HaveReadDir || ReadingDir ) + { + try + { + fh_context c = getSubContext( rdn ); + return true; + } + catch( ... ) + { + return false; + } + } + try + { + return priv_isSubContextBound( rdn ); + } + catch( ... ) + { + return false; + } + } + +/** + * Check if a call to Insert() will succeed. + * + * @see Insert() + * + * @param rdn The name of the new context to insert + * @return true if a subcontext with name rdn can be inserted. + */ + bool + Context::canInsert( const string& rdn ) + { + return !priv_isSubContextBound( rdn ); + } + + +/** + * Debug method to show the subcontexts + */ + void + Context::dumpOutItems() + { + BackTrace(); + cerr << "Context::dumpOutItems( START ) url:" << getURL() + << " this:" << toVoid(dynamic_cast(this)) + << " cc:" << toVoid(dynamic_cast(GetImpl(CoveredContext))) + << " omc:" << toVoid(dynamic_cast(getOverMountContext())) + << endl; + + if( getOverMountContext() != this ) + { + getOverMountContext()->dumpOutItems(); + return; + } + +// LG_CTX_D << "Context::dumpOutItems( START ) url:" << getURL() << endl; +// typedef Context::SubContextNames_t cnt; +// cnt na = getSubContextNames(); +// for( cnt::iterator iter = na.begin(); iter != na.end(); ++iter ) +// { +// LG_CTX_D << " iter:" << *iter << endl; +// cerr << " iter:" << *iter << endl; +// } +// LG_CTX_D << "Context::dumpOutItems( START2 ) url:" << getURL() << endl; +// cerr << "Context::dumpOutItems( START2 ) url:" << getURL() << endl; + for( Items_t::iterator iter = getItems().begin(); + iter != getItems().end(); iter++ ) + { + LG_CTX_D << "iteration. " + << " first:" << (*iter)->getDirName() + << " bound:" << isBound( *iter ) + << endl; + + if( isBound( *iter ) ) + { +// LG_CTX_D << " path:" << (*iter)->getDirPath(); +// cerr << " path:" << (*iter)->getDirPath() << endl; + + LG_CTX_D << " child:" << toVoid(dynamic_cast(GetImpl(*iter))) + << " cc:" << toVoid(dynamic_cast(GetImpl((*iter)->CoveredContext))) + << " omc:" << toVoid(dynamic_cast((*iter)->getOverMountContext())) + << " url:" << (*iter)->getURL() + << endl; + cerr << " child:" << toVoid(dynamic_cast(GetImpl(*iter))) + << " cc:" << toVoid(dynamic_cast(GetImpl((*iter)->CoveredContext))) + << " omc:" << toVoid(dynamic_cast((*iter)->getOverMountContext())) + << " rdn:" << (*iter)->getDirName() + << " url:" << (*iter)->getURL() + << endl; + } + LG_CTX_D << endl; + } + +// LG_CTX_D << "Context::dumpOutItems( END )" << endl; + cerr << "Context::dumpOutItems( END )" << endl; + } + + void + Context::dumpTree() + { + LG_SPIRITCONTEXT_D << "Context::dumpTree children:" << getSubContextCount() + << " token:" << getStrAttr( this, "token", "" ) + << " in-order:" << getStrAttr( this, "in-order-insert-list", "", true ) + << " url:" << getURL() << endl; + for( Items_t::iterator iter = getItems().begin(); + iter != getItems().end(); iter++ ) + { + (*iter)->dumpTree(); + } + } + + +/** + * Remove the given context from the subcontext collection. If ctx is not + * a subcontext then nothing is done, it is logged as an error to remove + * a non subcontext however. + * + * Note that handles can not be used as method params because of the subtle + * interactions with the tree memory management code. + * + * @see Insert() + * @param ctx Context to remove. + * + */ + void + Context::Remove( Context* ctx, bool emitdeleted ) + { + if( !ctx ) + { + LG_CTX_ER << "TRYING TO REMOVE A NULL CONTEXT!" << endl; + return; + } + +// cerr << "Context::Remove(1) this:" << toVoid(this) << " child:" << toVoid(ctx) << endl; + + /* + * When the VM subsystem is bringing context objects into and out of existance + * it is wrong to signal deletion because only the fh_context is being deleted, not + * the underlying file system object. + */ + if( emitdeleted ) + { + const string& rdn = ctx->getDirName(); + LG_CTX_D << " rdn:" << rdn << endl; + LG_CTX_D << " NumberOfSubContexts:" << NumberOfSubContexts << endl; + Emit_Deleted( 0, rdn, rdn, 0 ); + } + + /* + * Things are done this way to avoid 'reading' the context at rdn. + * if we set it to zero then we just drop the ref_count. we can + * then operate on the zero reference with erase() cheaply + */ + { + /* + * We need to make sure that the same item is not placed on the freelist + * after this call. + */ +// getItems().erase( ctx ); + eraseItemByName( getItems(), ctx ); + getCacheManager()->removeFromFreeList( ctx, true ); + } + --NumberOfSubContexts; + SubContextNamesCacheIsValid = false; + getOverMountContext()->DirOpVersion++; + bumpVersion(); + updateMetaData(); + } + +/** + * Wrapper method to allow removal of a subcontext using a handle. + * + * Remove the given context from the subcontext collection. If ctx is not + * a subcontext then nothing is done, it is logged as an error to remove + * a non subcontext however. + * + * @see Insert() + * @param ctx Context to remove. + * + */ + void + Context::Remove( fh_context ctx, bool emitdeleted ) + { + if( !isBound(ctx) ) + { + LG_CTX_ER << "TRYING TO REMOVE A NULL CONTEXT!" << endl; + return; + } + + Remove( GetImpl(ctx), emitdeleted ); + } + + +/** + * Remove the subcontext with the given rdn if one exists. + * + * @see Insert() + * @param ctxName rdn of subcontext to remove. + * + */ + void + Context::Remove( const string& ctxName, bool emitdeleted ) + { + try + { + Remove( getSubContext( ctxName ), emitdeleted ); + } + catch(...) + {} + } + +static bool isFilter( Context* c ) +{ + if( dynamic_cast(c) ) + return true; + return false; +} + + +static bool isSorter( Context* c ) +{ + if( dynamic_cast(c) ) + return true; + return false; +} + + + void + Context::dumpRefDebugData( fh_ostream ss ) + { + ss << "C" + << " rc:" << ref_count + << " numSc:" << NumberOfSubContexts + << " item.sz:" << getItems().size() + << " claim:" << isReClaimable() + << " frel:" << WeAreInFreeList + << " mRC:" << getMinimumReferenceCount() + << " this:" << (void*)this + << " isF:" << isFilter(this) + << " isS:" << isSorter(this); + if( HasBeenDeleted ) + ss << " DEL"; + if( isInheritingContext( this ) ) + ss << " inh"; + if( ChainedViewContext* cc = dynamic_cast( this ) ) + { + ss << " D:" << toVoid(GetImpl(cc->Delegate)); + } + if( isBound( CoveredContext ) ) + { + ss << " cc:" << toVoid( GetImpl( CoveredContext )); + } + if( isBound(OverMountContext_Delegate) ) + { + ss << " om:" << toVoid( GetImpl( OverMountContext_Delegate )); + } + + if( isParentBound() ) + ss << " pnt:" << (void*)getParent(); + if( isBound( ParentContext ) + && isParentBound() + && GetImpl(ParentContext) != getParent() ) + { + ss << " pntR:" << (void*)GetImpl(ParentContext); + } + + +// ss << " url:" << getURL() + + ss << " n:" << getDirName(); + ss << " p:" << getDirPath() + << endl; + } + + + void + ContextStreamMemoryManager::StreamIsOpeningHandler( Context* selfp, fh_istream& ss ) + { + selfp->AddRef(); + + sh_t sh = ss.sh; + sh->getGenericCloseSig().connect( + sigc::mem_fun( *selfp, + &Context::StreamIsClosingHandler )); + } + + /* + * It is safest to remove the context then the attribute, because the attribute + * will always have a reference to its parent, so when that count==0 then the + * context may be cleaned. + */ + void + ContextStreamMemoryManager::StreamIsOpeningHandler( + Context* selfp, AttributeProxy* a, fh_istream& ss ) + { + StreamIsOpeningHandler( selfp, ss ); + } + + /** + * Bump the ref_count on the context that this attribute is attached to + * so that the context is not reclaimed while the stream is outstanding. + * + * @param ss The stream that is being returned to the user. + */ + void + Context::RegisterStreamWithContextMemoryManagement( fh_istream& ss ) + { + ContextStreamMemoryManager::StreamIsOpeningHandler( this, ss ); + } + + + /** + * Decrement the ref_count on the context that this attribute is attached to + * so that the context knows that one less stream is outstanding. + * + * @param h The stream that is being returned to the user. + */ + void + Context::StreamIsClosingHandler( FerrisLoki::Handlable* h ) + { + Release(); + } + + + + +/** + * An object is in a claimable state if it is only referenced by its parent + * context and its subcontexts, ie. there are no client handles on the given + * child context. + * + * Note that for OverMount contexts there is no parent, but the CoveredContext + * keeps a reference to the OverMount context, so it has the same reference + * count numbers as a normal context. + * + * invoke this method on a context to see if it can be safely removed. + * + * @return true if this context can be removed + */ + bool + Context::isReClaimable() + { + /* + * Perform a few assertions just to make sure that the freelist code is working + * as expected. + */ + if( ref_count > getMinimumReferenceCount()) + { + LG_VM_D << "isReClaimable() path:" << getDirPath() << endl + << " ref_count:" << ref_count + << " getMinimumReferenceCount():" << getMinimumReferenceCount() + << " ref_count > getMinimumReferenceCount()" + << endl; + return false; + } + + return true; + } + + +/** + * After performing various assertions to ensure that 'child' is still + * in a claimable state, remove and delete the given subcontext. + * + * An object is in a claimable state if it is only referenced by this + * context and its subcontexts, ie. there are no client handles on the given + * child context. + * + * @see UnPageSubContextsIfNeeded() + * + * @param child Subcontext to remove + * @return true if the subcontext child was removed and deleted. + */ +// Used by garbo collector, so can not create more handles. + bool + Context::reclaimContextObject( Context* child ) + { + string rdn = child->getDirName(); + +#ifdef FERRIS_DEBUG_VM + cerr << "Context::reclaimContextObject() " + << " c:" << toVoid(child) + << " path:" << getDirPath() + << " child:" << rdn + << " rc:" << child->ref_count + << endl; +#endif + + LG_VM_D << "Context::reclaimContextObject() " + << " c:" << toVoid(child) + << " path:" << getDirPath() + << " child:" << rdn + << " rc:" << child->ref_count + << endl; + + /* + * Chained contexts have two possibilities for their parent: + * A) point to another chain context in the chained tree + * B) (root of chained tree) point to the parent of the delegate as their own parent + * We need to dispose of the root node of a chained tree in a slightly different + * manner as it isn't a child of anything. + * + */ + if( ChainedViewContext* cc = dynamic_cast( child ) ) + { + if( ChainedViewContext* thiscc = dynamic_cast( this ) ) + { + /* + * Chained node is part of the tree and is not root node, case A. + */ + } + else + { + /* + * Chained node is pointing to a non chained node as its parent. + */ +// cerr << "reclaimobj2A rc:" << cc->ref_count << endl; +// cerr << "reclaimobj2A rdn:" << cc->getDirName() << endl; + Items_t::iterator ci = getItemIter( cc->getDirName() ); +// iterator ci = find( cc->getDirName() ); +// cerr << "reclaimobj2B" << endl; + if( *ci != cc ) + { +// cerr << "reclaimobj2C rc:" << cc->ref_count +// << " SC:" << (dynamic_cast(cc)!=0) +// << endl; + + /* + * Check reference counts for root CC node. + */ + if( dynamic_cast( cc ) ) + { + if( cc->ref_count > 2 ) + return false; + } + else if( cc->ref_count > 1 ) + return false; + + /* + * Chained node is pointing to a non chained node as its parent. + */ +#ifdef FERRIS_DEBUG_VM + DEBUG_dumpcl("Context::reclaimContextObject(cc root 1)" ); +#endif + + /* + * WARNING: if you delete the Delegate object then the ChainedContext + * can no longer function. So don't try to dump the context list between + * wipe of delegate and deletion of cc + */ + cc->Delegate = 0; +// cerr << "Cleared delegate, deleteing object" << endl; + delete cc; +#ifdef FERRIS_DEBUG_VM + DEBUG_dumpcl("Context::reclaimContextObject(cc root done)"); +#endif + return true; + } + } + } + + + if( !child->isReClaimable()) + { + cerr << "child not claimable!" << endl; + return false; + } + +#ifdef FERRIS_DEBUG_VM + DEBUG_dumpcl("Context::reclaimContextObject(1)"); + cerr << "reclaimobj4 parent.rc:" << ref_count << endl; +#endif + + /* + * Remove this child. + */ + LG_VM_W << "Context::reclaimContextObject() removing impl for " + << " path:" << child->getDirPath() << endl; +// dumpOutItems(); + + LG_VM_W << "Context::reclaimContextObject(bump) c:" << toVoid(child) << " rc:" << child->ref_count << endl; + + // Keep a reference to the child so that it is not collected by having a zero rc. + child->ref_count+=1000; +// cerr << "reclaimobj4 -- have temp ref" << endl; +// cerr << "reclaimobj4.1 parent.rc:" << ref_count << endl; +// cerr << "reclaimobj4.1 this:" << toVoid(this) << " child:" << toVoid(child) << endl; + Remove( child, false ); +// cerr << "reclaimobj4.2 parent.rc:" << ref_count << endl; + // The context still exists, so we keep knowing about it. + // thus we must counter the decrement done in Remove(). + ++NumberOfSubContexts; +// cerr << "reclaimobj5 parent.rc:" << ref_count << endl; + + LG_VM_D << "About to delete child:" << rdn << endl; + +#ifdef FERRIS_DEBUG_VM + DEBUG_dumpcl("Context::reclaimContextObject(2) about to drop parent ref"); +#endif + child->ParentContext = 0; + +#ifdef FERRIS_DEBUG_VM + DEBUG_dumpcl("Context::reclaimContextObject(2.2)"); +#endif + + if( ChainedViewContext* cc = dynamic_cast(child) ) + { +#ifdef FERRIS_DEBUG_VM + cerr << "reclaimobj7.1 cc:" << toVoid(cc) << endl; + cerr << "reclaimobj7.1 cc->del:" << toVoid( GetImpl( cc->Delegate ) ) << endl; +#endif + cc->Delegate = 0; + } + +#ifdef FERRIS_DEBUG_VM + cerr << "reclaimobj8" << endl; +#endif +// DEBUG_dumpcl("Context::reclaimContextObject(2.3)"); +// cerr << "reclaimobj9" << endl; + delete child; + +#ifdef FERRIS_DEBUG_VM + cerr << "reclaimobj10" << endl; + DEBUG_dumpcl("Context::reclaimContextObject(3)"); + LG_VM_D << "... reclaimContextObject() delete done1.1" << endl; +#endif + + bumpVersion(); + getCacheManager()->removeFromFreeList( child, true ); + return true; + } + + +/** + * Either return the context with the given rdn, or create a new context + * with the given rdn and attach it as a subcontext before returning it. + * + * @see priv_getSubContext() + * @see isSubContextBound() + * @see bumpVersion() + * + * @param rdn The rdn of the context to return/create + * @param checkIfExistsAlready If the plugin has already checked if the subcontext exists + * then it can pass in false here. + * @return handle to the subcontext with the given rdn + * @throws NoSuchSubContext + * @throws FerrisNotSupportedInThisContext If there is no subcontext with the given + * rdn and one can not be created. + */ + fh_context + Context::priv_readSubContext( const string& rdn, bool created, bool checkIfExistsAlready ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ) + { + try + { + LG_CTX_D << "Context::priv_readSubContext(1) url:" << getURL() << endl; + + if( checkIfExistsAlready ) + { + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { +// fh_context ret = priv_getSubContext( rdn ); + fh_context ret = *subc_iter; + ret->setHasBeenDeleted( false ); + Emit_Exists( 0, ret, rdn, rdn, 0 ); + return ret; + } + } + + +// cerr << "priv_readSubContext() this:" << toVoid(this) +// << " rdn:" << rdn +// << " not found" +// << endl; +// dumpOutItems(); + + + Context* c = priv_CreateContext( this, rdn ); + LG_CTX_D << "Context::priv_readSubContext(2) url:" << getURL() << endl; + fh_context tmp = c; + fh_context ret = Insert( c, created ); + LG_CTX_D << "Context::priv_readSubContext(3) url:" << getURL() << endl; + bumpVersion(); + return ret; + } + catch( NoSuchSubContext& e ) + { + cerr << "Context::priv_readSubContext() e:" << e.what() << endl; + throw e; + } + catch( FerrisNotSupportedInThisContext& e ) + { + cerr << "Context::priv_readSubContext() e:" << e.what() << endl; + throw e; + } + catch( exception& e ) + { + cerr << "Context::priv_readSubContext() strange e:" << e.what() << endl; + BackTrace(); + throw e; + } + } + + std::string + Context::monsterName( const std::string& rdn ) + { + string ret = rdn; + string baserdn = rdn; + int version = 1; + + LG_PATHS_D << "monsterName() path: " << getDirPath() + << " rdn:" << rdn + << endl; + + Items_t::iterator iter; + while( priv_isSubContextBound( ret, iter ) ) + { + if( (*iter)->HasBeenDeleted ) + break; + + ostringstream ss; + ss << baserdn << "--" << version++; + ret = tostr(ss); + } + + LG_PATHS_D << "monsterName() path: " << getDirPath() + << " rdn:" << rdn + << " ret:" << ret + << endl; + return ret; + } + + +/** + * Similar to priv_readSubContext() except this method does not create a context + * and attach it if there is not one already there. If a subcontext exists then + * it is marked as not deleted. Most of the time plugins will want to just call + * priv_readSubContext() to ensure the sub context exists and is not marked as + * deleted. + * + * Using priv_discoveredSubContext if a subcontext already exists then it is marked + * is not deleted and returned. If no such subcontext exists then a null reference is + * returned. This allows the plugin to create the subcontext using whatever method it + * likes and the plugin will get a reference to the subtype of Context without having + * to dynamic_cast<> a generic Context* + * + * @see clearContext() + */ + fh_context + Context::priv_discoveredSubContext( const string& rdn, bool created ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ) + { + fh_context ret = 0; + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { +// ret = priv_getSubContext( rdn ); + ret = *subc_iter; + ret->setHasBeenDeleted( false ); + bumpVersion(); + } + return ret; + } + + + + + +/** + * If this context supports dynamic recreation of subcontexts then this + * method ensures that the subcontexts of this context are all created. + */ + void + Context::UnPageSubContextsIfNeeded() +// throw( NoSuchSubContext, FerrisNotSupportedInThisContext ) + { +// cerr << " Context::UnPageSubContextsIfNeeded() " << endl; + + LG_CTX_D << "UnPageSubContextsIfNeeded(enter) path:" << getDirPath() << endl; + LG_CTX_D << "UnPageSubContextsIfNeeded() HaveReadDir:" << getHaveReadDir() + << " this:" << (void*)this + << " omc:" << (void*)getOverMountContext() + << " NumberOfSubContexts:" << NumberOfSubContexts + << " Items.size():" << Items.size() + << " sitems.sz:" << getSortedItems().size() + << endl; + + if( !HaveReadDir ) + { + read(0); + } + else if( supportsReClaim() && NumberOfSubContexts != getItems().size() ) + { + LG_CTX_D << "UnPageSubContextsIfNeeded() nosc:" << NumberOfSubContexts + << " sz:" << getItems().size() + << endl; + + read(1); + } + + + LG_CTX_D << "UnPageSubContextsIfNeeded(exit) path:" << getDirPath() << endl; + } + + + int + Context::getReadingDir() const + { + return ReadingDir; + } + + int + Context::getHaveReadDir() const + { + return HaveReadDir; + } + + + static fh_context getSchemaCached( const std::string& earl ) + { + typedef FERRIS_STD_HASH_MAP< string, fh_context > cache_t; + static cache_t cache; + cache_t::iterator ci = cache.find( earl ); + if( ci != cache.end() ) + return ci->second; + + fh_context ret = Resolve( earl ); + cache[ earl ] = ret; + return ret; + } + + +fh_context +Context::getSchema( const std::string& eaname ) +{ + if( starts_with( eaname, "schema:" ) ) + { + return getSchemaCached( "schema://xsd/attributes/schema" ); + } + +// CERR << "Context::getSchema() eaname:" << eaname << endl; + string earl = getStrAttr( this, "schema:" + eaname, "" ); + if( earl.empty() ) + { + fh_stringstream ss; + ss << "Can't find the schema for ea:" << eaname + << " on context:" << getURL() << endl +// << " eanames:" << getStrAttr( this, "ea-names", "" ) + << endl; +// cerr << "Schema error:" << tostr(ss) << endl; +// BackTrace(); + Throw_SchemaNotFoundException( tostr(ss), 0 ); + } + + LG_SCHEMA_D << "Context::getSchema() url:" << getURL() << " ea:" << eaname + << " gives:" << earl << endl; + + return getSchemaCached( earl ); +} + + fh_context + Context::getSchemaOrDefault( const std::string& eaname, XSDBasic_t sct ) + { + if( starts_with( eaname, "schema:" ) ) + { + return getSchemaCached( "schema://xsd/attributes/schema" ); + } + + string earl = getStrAttr( this, "schema:" + eaname, "" ); + if( earl.empty() ) + { + earl = Factory::getSchemaURLForType( sct ); + } + return getSchemaCached( earl ); + } + + +fh_context +Context::getBranchFileSystem() +{ + LG_CTX_D << "Context::getBranchFileSystem() url:" << getURL() << endl; + LG_CTX_D << "Context::getBranchFileSystem() attr:" + << getStrAttr( this, "associated-branches-url", "" ) + << endl; + + fh_context ret; + string earl = getStrAttr( this, "associated-branches-url", "" ); + if( earl.empty() ) + { + fh_stringstream ss; + ss << "There is no branch filesystem for context:" << getURL() << endl; + Throw_BranchFileSystem( tostr(ss), this ); + } + ret = Resolve( earl ); + return ret; +} + + + + +/** + * Get the subcontext with the given rdn. + * + * @see priv_readSubContext() + * @see isSubContextBound() + * + * @param rdn The rdn of the subcontext to get + * @throws NoSuchSubContext If there is no subcontext with the given rdn. + * @return the subcontext with the given rdn + */ + fh_context + Context::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + + LG_CTX_D << "Context::priv_getSubContext( enter ) rdn:" << rdn + << " path:" << getDirPath() + << " this:" << (void*)this + << " omc:" << (void*)getOverMountContext() + << " items.sz:" << getItems().size() + << " sitems.sz:" << getSortedItems().size() + << endl; + +// if( priv_isSubContextBound( rdn )) +// return getItem( rdn ); + { + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { + return *subc_iter; + } + } + + LG_CTX_D << "Context::priv_getSubContext( 2 ) rdn:" << rdn << endl; + + UnPageSubContextsIfNeeded(); + + LG_CTX_D << "Context::priv_getSubContext( 3 ) rdn:" << rdn << endl; + + if( this != getOverMountContext() ) + { + LG_CTX_D << "Context::priv_getSubContext( passing on ) path:" << getDirPath() << endl; + return getOverMountContext()->priv_getSubContext( rdn ); + } + + LG_CTX_D << "Context::priv_getSubContext( 4 ) rdn:" << rdn << endl; + +// if( priv_isSubContextBound( rdn )) +// { +// return getItem( rdn ); +// } + { + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { + return *subc_iter; + } + } + + LG_CTX_D << "Context::priv_getSubContext( in trouble 1 ) path:" << getDirPath() + << " this:" << (void*)this + << " omc:" << (void*)getOverMountContext() + << " rdn:" << rdn + << " items.sz:" << getItems().size() + << " sitems.sz:" << getSortedItems().size() + << endl; + LG_CTX_D << "Context::priv_getSubContext( in trouble 1 ) path:" << getDirPath() << endl; +// cerr << "Context::priv_getSubContext( in trouble 1 ) path:" << getDirPath() << endl; +// dumpOutItems(); +// LG_CTX_D << "Context::priv_getSubContext( in trouble 2 ) path:" << getDirPath() << endl; +// getOverMountContext()->dumpOutItems(); + + } + catch( NoSuchSubContext& e ) + { + ostringstream ss; + ss << "getSubContext() url:" << getURL() << " NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + catch( exception& e ) + { + ostringstream ss; + ss << "getSubContext() url:" << getURL() << " NoSuchSubContext:" << rdn + << " e:" << e.what(); + LG_CTX_D << tostr(ss) << endl; + Throw_NoSuchSubContext( tostr(ss), 0 ); + } + +// BackTrace(); + ostringstream ss; + ss << "getSubContext() url:" << getURL() << " NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + + +/** + * Get a context that is relative to this one. + * + * @see getRelativeContext() + * @see splitPath() + * @see unSplitPath() + * + * @param pa Path split into chunks for relative resolution + * @param xdn relative dn + * @param full_xdn + * @param f Factory for creating the final resolution of the context. + * @throws NoSuchSubContext If there is no such relative path + * @returns The relative context + */ + fh_context + Context::priv_getRelativeContext( + SplitPath_t pa, + const string& xdn, + const string& full_xdn, + RootContextFactory* f + ) + throw( NoSuchSubContext ) + { + pair p = splitPathAtStart(xdn); + + LG_CTX_D << "Context::priv_getRelativeContext() xdn:" << xdn << endl; + LG_CTX_D << "Context::priv_getRelativeContext() first:" << p.first << endl; + LG_CTX_D << "Context::priv_getRelativeContext() second:" << p.second << endl; + LG_CTX_D << "Context::priv_getRelativeContext() pa:" << unSplitPath(pa) << endl; + + if( p.first == ".." ) + { + pa.pop_back(); + } + else if( p.first == "." || p.first == "/" || p.first == "" ) + { + // no op + } + else + { + pa.push_back( p.first ); + } + + if( p.second.length() ) + { + return priv_getRelativeContext( pa, p.second, full_xdn, f ); + } + + + LG_CTX_D << "----Context::priv_getRelativeContext()------------" << endl; + LG_CTX_D << "Context::priv_getRelativeContext() xdn:" << xdn << endl; + LG_CTX_D << "Context::priv_getRelativeContext() full_xdn:" << full_xdn << endl; + LG_CTX_D << "Context::priv_getRelativeContext() pa:" << unSplitPath(pa) << endl; + + f->AddInfo( RootContextFactory::PATH, unSplitPath(pa) ); + + fh_context ret = f->resolveContext( f->getResolveStyle() ); + + LG_CTX_D << "Context::priv_getRelativeContext() ret:" << isBound(ret) << endl; + LG_CTX_D << "Context::priv_getRelativeContext() ret:" << ret->getDirPath() << endl; + LG_CTX_D << "----Context::priv_getRelativeContext(exit)------------" << endl; + + return ret; + } + + +/** + * Get a context that is relative to this one. + * + * @see priv_getRelativeContext() + * @see splitPath() + * @see unSplitPath() + * + * @param xdn relative dn to get + * @param f Factory for creating the final resolution of the context. + * @throws NoSuchSubContext If there is no such relative path + * @returns The relative context + */ +fh_context +Context::getRelativeContext( + const string& xdn, + RootContextFactory* f + ) + throw( NoSuchSubContext ) +{ + try + { + + LG_CTX_D << "Context::getRelativeContext() xdn:" << xdn << endl; + LG_CTX_D << "Context::getRelativeContext() path:" << getDirPath() << endl; + + SplitPath_t pa = splitPath( getDirPath() ); + bool WeAllocatedFactory = false; + + LG_CTX_D << "Context::getRelativeContext() pa:" << unSplitPath(pa) << endl; + + + if( !f ) + { + WeAllocatedFactory = true; + f = new RootContextFactory(); + + f->setContextClass( "file" ); + f->AddInfo( RootContextFactory::ROOT, "/" ); + } + + fh_context ret(priv_getRelativeContext( pa, xdn, xdn, f )); + + if( WeAllocatedFactory ) + { + delete f; + } + + LG_CTX_D << "Context::getRelativeContext() xdn:" << xdn << endl; + LG_CTX_D << "Context::getRelativeContext() ret:" << isBound(ret) << endl; + LG_CTX_D << "Context::getRelativeContext() path:" << ret->getDirPath() << endl; + + return ret; + } + catch( exception& e ) + { + LG_CTX_D << "Context::getRelativeContext() e:" << e.what() << endl; + Throw_NoSuchSubContext( e.what(), this ); + } + } + + +/** + * Split a given path into a list of chunks each of which contains + * the rdn relative to the previous list element. + * + * This method splits a string like: + * /usr/local/bin/enlightenment + * Into a list + * {usr,local,bin,enlightenment} + * This is done in accordance with the seperator string from getSeperator(). + * + * @see unSplitPath() + * @see splitPathAtStart() + * @see getSeperator() + * + * @param dn The path to split. + * @return An STL collection containing each of the rdns in order. + */ + Context::SplitPath_t + Context::splitPath( const string& dn ) + { + SplitPath_t ret; + + pair p = splitPathAtStart(dn); + while( p.second.length() ) + { + ret.push_back( p.first ); + p = splitPathAtStart(p.second); + } + ret.push_back( p.first ); + + LG_CTX_D << "Context::SplitPath() dn:" << dn << endl; +// copy( ret.begin(), ret.end(), ostream_iterator(cerr)); + + + return ret; + } + + +/** + * Merge a list of relative paths into a single string. + * This method is the exact reverse of splitPath(). + * + * the following should be semantically true + * + * Given: + * string p = "/usr/local/bin/enlightenment"; + * string p2 = unSplitPath( splitPath(p) ); + * + * Though p2 may be a different string, the resolution of both + * p and p2 should be the same context. + * + * @see splitPath() + * + * @param pa Split path to merge + * @return merged path as a string. + * + */ + string + Context::unSplitPath( const SplitPath_t& pa ) + { + string s; + +// cerr << "Context::unSplitPath()" << endl; +// copy( pa.begin(), pa.end(), ostream_iterator(cerr)); + + + for( SplitPath_t::const_iterator iter = pa.begin(); iter != pa.end(); ) + { + s += *iter; + + iter++; + if( iter != pa.end() ) + { + s += getSeperator(); + } + } + + return s; + } + + + + + +/** + * Check if this context has subcontexts. Note that the context needs to have + * been read() before this method is valid. + * + * @see guessSize() + * @see read() + * @see SubContextCount() + * @return true if there are subcontexts. + */ + bool + Context::hasSubContexts() + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->hasSubContexts(); + } + return NumberOfSubContexts > 0 || Items.size(); + } + + +/** + * Get the actual count of subcontexts of this context. + * Note that the context needs to have been read() before this method is valid. + * + * @see guessSize() + * @see read() + * @see hasSubContexts() + * @return true if there are subcontexts. + */ + int + Context::SubContextCount() + { +// return getOverMountContext()->Items.size(); //NumberOfSubContexts; + + if( getOverMountContext() != this ) + { + return getOverMountContext()->SubContextCount(); + } + + int ret = 0; + for(Items_t::const_iterator ci = Items.begin(); ci != Items.end(); ++ci ) + { + if( !(*ci)->HasBeenDeleted ) + ++ret; + } + return ret; + } + + +/** + * Mark all children as being deleted. Subcontexts are not actually removed + * from this context because the user might still have a fh_context for on of + * them or a decendant of one of our children. For plugin context modules to + * work correctly they should call this in their read() and either + * priv_readSubContext() or priv_discoveredSubContext() for each context that + * they discover to still exist. Any contexts that are not marked as still existing + * can then be claimed by the memory manager when the user is not using them. + * + * @see priv_readSubContext() + * @see priv_discoveredSubContext() + * + */ + void + Context::clearContext() + { + LG_CTX_D << "Context::clearContext() url:" << getURL() << endl; + + /** + * Mark each child as deleted so that the context plugin has to rediscover each + * still existing context. + */ + for( Items_t::iterator iter = getItems().begin(); iter != getItems().end(); ++iter ) + { + (*iter)->HasBeenDeleted = true; + } +// 1.1.61 commented the below 6 lines. +// for( Items_t::iterator iter = getItems().begin(); iter != getItems().end(); ) +// { +// fh_context tmp = *iter; +// ++iter; +// Remove( GetImpl(tmp), false ); +// } + + + +// /* +// * Explicitly reclaim each entry +// * CacheManager::cleanUp() ? +// */ +// for( Items_t::iterator iter = getItems().begin(); iter != getItems().end(); ) +// { +// Context* c = GetImpl(*iter); + +// cerr << "Context::clearContext() rc:" << c->ref_count +// << " getURL():" << c->getURL() +// << endl; +// getCacheManager()->removeFromFreeList( c ); +// ++iter; +// // delete c; +// } + +// getItems().clear(); +// NumberOfSubContexts = 0; + bumpVersion(); + +// /* A slightly cleaner way to update attributes here would be nice */ +// clearAttributes(); +// AttributesHaveBeenCreated = 0; + } + + +void +Context::Emit_MedallionUpdated() +{ + LG_CTX_D << "Context::Emit_MedallionUpdated() c:" << getURL() << endl; + getNamingEvent_MedallionUpdated_Sig().emit( ThisContext() ); +} + + + +/** + * Emit a changed signal. + * + * @see getNamingEvent_Changed_Sig() + * @see NamingEvent_Changed_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Changed( NamingEvent_Changed* e, + const string& olddn, const string& newdn, sigc::trackable* ExtraData ) + { + LG_CTX_D << "--- Context::Emit_Changed() newdn:" << newdn << " path:" << getDirPath() << endl; + + NamingEvent_Changed ev( ThisContext(), ExtraData ); + getNamingEvent_Changed_Sig().emit( &ev, olddn, newdn ); + } + + +/** + * Emit a deleted signal. + * + * @see getNamingEvent_Deleted_Sig() + * @see NamingEvent_Deleted_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Deleted( NamingEvent_Deleted* e, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + NamingEvent_Deleted ev( ThisContext(), ExtraData ); + getNamingEvent_Deleted_Sig().emit( &ev, olddn, newdn ); + } + +/** + * Emit a start execute signal. + * + * @see getNamingEvent_Start_Execute_Sig() + * @see NamingEvent_Start_Execute_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Start_Execute( NamingEvent_Start_Execute* e, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + NamingEvent_Start_Execute ev( ThisContext(), ExtraData ); + getNamingEvent_Start_Execute_Sig().emit( &ev, olddn, newdn ); + } + + +/** + * Emit a stop execute signal. + * + * @see getNamingEvent_Stop_Execute_Sig() + * @see NamingEvent_Stop_Execute_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Stop_Execute( NamingEvent_Stop_Execute* e, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + NamingEvent_Stop_Execute ev( ThisContext(), ExtraData ); + getNamingEvent_Stop_Execute_Sig().emit( &ev, olddn, newdn ); + } + + +/** + * Emit a created signal. + * + * @see getNamingEvent_Created_Sig() + * @see NamingEvent_Created_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Created( NamingEvent_Created* e, + const fh_context& newc, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + LG_CTX_D << "Context::Emit_Created() rdn:" << olddn << endl; + if( isBound( newc ) ) + LG_CTX_D << "Context::Emit_Created() c:" << toVoid(GetImpl(newc)) << endl; + + NamingEvent_Created ev( ThisContext(), ExtraData ); + getNamingEvent_Created_Sig().emit( &ev, newc, olddn, newdn ); + } + + +/** + * Emit a moved signal. + * + * @see getNamingEvent_Moved_Sig() + * @see NamingEvent_Moved_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Moved( NamingEvent_Moved* e, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + NamingEvent_Moved ev( ThisContext(), ExtraData ); + getNamingEvent_Moved_Sig().emit( &ev, olddn, newdn ); + } + + fh_context + Context::ThisContext() + { + fh_context ret = this; + return ret; + } + +/** + * Emit a exists signal. + * + * @see getNamingEvent_Exists_Sig() + * @see NamingEvent_Exists_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Exists( NamingEvent_Exists* e, + const fh_context& newc, + string olddn, string newdn, sigc::trackable* ExtraData ) + { + LG_CTX_D << "Emit_Exists for path:" << getDirPath() + << " olddn:" << olddn << endl; + + NamingEvent_Exists ev( ThisContext(), ExtraData ); + getNamingEvent_Exists_Sig().emit( &ev, newc, olddn, newdn ); + } + + +/** + * Emit a start reading context signal. + * + * @see getNamingEvent_Start_Reading_Context_Sig() + * @see NamingEvent_Start_Reading_Context_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ + void + Context::Emit_Start_Reading_Context( NamingEvent_Start_Reading_Context* e, + sigc::trackable* ExtraData ) + { + NamingEvent_Start_Reading_Context ev( ThisContext(), ExtraData ); + getNamingEvent_Start_Reading_Context_Sig().emit( &ev ); + } + + +/** + * Emit a stop reading context signal. + * + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see NamingEvent_Stop_Reading_Context_Sig_t + * + * @param e Event to emit + * @param olddn The old rdn of the subcontext for this signal. + * @param newdn The new rdn of the subcontext for this signal. + * @param ExtraData Some additional data about this signal. This is usually user + * supplied data + */ +void +Context::Emit_Stop_Reading_Context( NamingEvent_Stop_Reading_Context* e, + sigc::trackable* ExtraData ) +{ + NamingEvent_Stop_Reading_Context ev( ThisContext(), ExtraData ); + getNamingEvent_Stop_Reading_Context_Sig().emit( &ev ); +} + + +/////////////////////////////////////////////////////////////////////////////// +// +// +// These are documented in MutableCollectionEvents +// +// +/////////////////////////////////////////////////////////////////////////////// + +Context::NamingEvent_MedallionUpdated_Sig_t& +Context::getNamingEvent_MedallionUpdated_Sig() +{ + return NamingEvent_MedallionUpdated_Sig; +} + +Context::NamingEvent_Changed_Sig_t& +Context::getNamingEvent_Changed_Sig() +{ + return NamingEvent_Changed_Sig; +} + +Context::NamingEvent_Deleted_Sig_t& +Context::getNamingEvent_Deleted_Sig() +{ + return getCoveredContext()->NamingEvent_Deleted_Sig; +} + + Context::NamingEvent_Start_Execute_Sig_t& + Context::getNamingEvent_Start_Execute_Sig() + { + return NamingEvent_Start_Execute_Sig; + } + + Context::NamingEvent_Stop_Execute_Sig_t& + Context::getNamingEvent_Stop_Execute_Sig() + { + return NamingEvent_Stop_Execute_Sig; + } + + Context::NamingEvent_Created_Sig_t& + Context::getNamingEvent_Created_Sig() + { + return getCoveredContext()->NamingEvent_Created_Sig; + } + + Context::NamingEvent_Moved_Sig_t& + Context::getNamingEvent_Moved_Sig() + { + return NamingEvent_Moved_Sig; + } + + + Context::NamingEvent_Exists_Sig_t& + Context::getNamingEvent_Exists_Sig() + { + return getCoveredContext()->NamingEvent_Exists_Sig; + } + + Context::NamingEvent_Start_Reading_Context_Sig_t& + Context::getNamingEvent_Start_Reading_Context_Sig() + { + return NamingEvent_Start_Reading_Context_Sig; + } + +Context::NamingEvent_Stop_Reading_Context_Sig_t& +Context::getNamingEvent_Stop_Reading_Context_Sig() +{ + return NamingEvent_Stop_Reading_Context_Sig; +} + +Context::ContextEvent_Headers_Received_Sig_t& +Context::getContextEvent_Headers_Received_Sig() +{ + return ContextEvent_Headers_Received_Sig; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Check if this is the virginal call to updateMetaData(). + * + * @see updateMetaData() + * @returns true if updateMetaData() has not been called for this context in + * the past. + */ + gboolean + Context::getUpdateMetaData_First_Time() + { + gboolean ret = updateMetaData_First_Time; + updateMetaData_First_Time = 0; + return ret; + } + + +/** + * Called when a context needs to update this metadata. This bumps version so + * that any data generators attached to the attribute know that they must check + * to see if a refresh is needed for their value. + * + * When the metadata is being updated a changed signal is also emitted. + */ + void + Context::updateMetaData() + { + ensureUpdateMetaDataCalled_virgin = 0; + if( !getUpdateMetaData_First_Time() ) + { + if( !getCacheManager()->insideCleanupCall() ) + { + LG_CTX_D << "emit_changed... getDirPath()" << getDirPath() << endl; + Emit_Changed( 0, getDirPath(), getDirPath(), 0 ); + } + } + } + +/** + * Ensure that however many times this method is called updateMetaData() is only + * ever called once. + */ + void + Context::ensureUpdateMetaDataCalled() + { + if( ensureUpdateMetaDataCalled_virgin ) + { + updateMetaData(); + } + } + + + +/** + * Get the subcontext count as a string. Used in EA generators. + * return The sub context count string. + */ + fh_istream + Context::getSubContextCountStream( Attribute* attr ) + { + fh_stringstream ss; + ss << Items.size(); //NumberOfSubContexts; + return ss; + } + + +/** + * Get the attribute count as a string. Used in EA generators. + * return The attr count string. + */ + fh_istream + Context::getAttributeCountStream( Attribute* attr ) + { + fh_stringstream ss; + ss << Attributes.size(); + return ss; + } + + +/** + * Get the dirname as a string. Used in EA generators. + * return The dirname string. + */ + fh_istream + Context::getDirNameStream( Attribute* attr ) + { + fh_stringstream ss; + ss << getDirName(); + return ss; + } + +/** + * Get the dirname extension as a string. + * The extension is defined as any non '.' characters after the last dot + * in the string. + * + * Used in EA generators. + * return The extension of the dirname string. + */ + fh_istream + Context::getDirNameExtensionStream( Attribute* attr ) + { + fh_stringstream ss; + ss << getNameExtension(); + return ss; + } + + +/** + * Get the dirpath as a string. Used in EA generators. + * return The dirpath string. + */ + fh_istream + Context::getDirPathStream( Attribute* attr ) + { + fh_stringstream ss; + ss << getDirPath(); + return ss; + } + +/** + * Get a string that has a list of all the EA Names that this attribute + * contains. Each attribute is seperated with a "," character. + * + * @see priv_getAttributeNames() + * @see getAttributeNames() + * @param attr Not Used. + * @return string with a list of attribute names seperated with a "," char + */ + fh_istream + Context::getEANamesStream( Attribute* attr ) + { + fh_stringstream ss; + AttributeNames_t an; + getAttributeNames( an ); + ss << Util::createCommaSeperatedList( an ); + return ss; + } + + +/** + * Reset the start reading flag to a default of not reading. This call prepares + * the context to be read and allows a NamingEvent_Start_Reading_Context_Sig_t + * signal to be emitted using EnsureStartReadingIsFired(). + * + * @see EnsureStartReadingIsFired() + * @see EnsureStopReadingIsFired() + */ + void + Context::ClearStartReadingFlag() + { + FiredStartReading = 0; + } + +/** + * If a start reading event has not yet been fired, fire one. + * + * @see EnsureStopReadingIsFired() + * @see ClearStartReadingFlag() + */ + void + Context::EnsureStartReadingIsFired() + { + if( !FiredStartReading ) + { + Emit_Start_Reading_Context( 0, 0 ); + FiredStartReading = 1; + } + } + +/** + * If a start reading event has been fired, then fire a stop reading event. + * + * @see EnsureStartReadingIsFired() + * @see ClearStartReadingFlag() + */ + void + Context::EnsureStopReadingIsFired() + { + if( FiredStartReading ) + { + Emit_Stop_Reading_Context( 0, 0 ); + ClearStartReadingFlag(); + } + } + +/** + * Find a overmounting context for this context. + * + * @return The context that is willing to mount over this one. + */ + fh_context + Context::findOverMounter( bool attemptingOverMountOnlyToFindEA ) + { + LG_CTX_D << "findOverMounter() path:" << getDirPath() + << " attemptingOverMountOnlyToFindEA:" << attemptingOverMountOnlyToFindEA + << endl; + +// BackTrace(); +// sleep(3); + + RootContextFactory f; + return f.findOverMounter( this, 64, attemptingOverMountOnlyToFindEA ); + } + + /** + * Check if there is a context that might be able to read this one as + * a directory. + */ + bool + Context::hasOverMounter() + { + if( m_overMountAttemptHasAlreadyFailed ) + return false; + + RootContextFactory f; + bool ret = f.hasOverMounter( this ); + + // + // treat not having an overmounter for the context as failure + // + if( !ret ) + { + m_overMountAttemptHasAlreadyFailed = true; + m_overMountAttemptHasAlreadyFailedEAOnly = true; + } + + + return ret; + } + + void + Context::setOverMountAttemptHasAlreadyFailed( bool v ) + { + m_overMountAttemptHasAlreadyFailed = v; + } + + + +Attribute::Parent_t +Context::getParent() throw (FerrisParentNotSetError) +{ +// cerr << "Context::getParent() this:" << toVoid(this) +// << " cc:" << toVoid(CoveredContext) +// << " om:" << toVoid(OverMountContext_Delegate) +// << " pbound:" << Attribute::isParentBound() +// << endl; +// if( OverMountContext_Delegate ) +// { +// cerr << " ombound:" << OverMountContext_Delegate->isParentBound() << endl; +// } +// if( CoveredContext ) +// { +// cerr << " ccbound:" << CoveredContext->isParentBound() << endl; +// } + + if( isBound( CoveredContext ) ) + { + return CoveredContext->getParent(); + } + Parent_t ret = Attribute::getParent(); + + if( ret->CoveredContext ) + return GetImpl(ret->CoveredContext); + return ret; +} + +bool Context::isParentBound() +{ +// cerr << "Context::isParentBound() this:" << toVoid(this) +// << " cc:" << toVoid(CoveredContext) +// << " om:" << toVoid(OverMountContext_Delegate) +// << " pbound:" << Attribute::isParentBound() +// << endl; +// if( OverMountContext_Delegate ) +// { +// cerr << " ombound:" << OverMountContext_Delegate->isParentBound() << endl; +// } + +// if( isBound( CoveredContext ) ) +// { +// return CoveredContext->isParentBound(); +// } +// return Attribute::isParentBound(); + + return Attribute::isParentBound(); +} + +/** + * Look for an overmounter and attach it as the overmount for this + * context if one exists that is willing to mount this context as + * a filesystem + * + * @param silentIgnore if set then ignore the posibilty that there is no + * overmount available for this context + * @throws FerrisNotReadableAsContext if it cant be mounted + */ +void +Context::tryToOverMount( bool silentIgnore, bool attemptingOverMountOnlyToFindEA ) +{ + LG_OVERMOUNT_D << "Context::tryToOverMount url:" << getURL() + << " attemptingOverMountOnlyToFindEA:" << attemptingOverMountOnlyToFindEA + << " m_overMountAttemptHasAlreadyFailed:" << m_overMountAttemptHasAlreadyFailed + << " m_overMountAttemptHasAlreadyFailedEAOnly:" << m_overMountAttemptHasAlreadyFailedEAOnly + << " isBound(OverMountContext_Delegate):" << isBound(OverMountContext_Delegate) + << " isBound( CoveredContext ):" << isBound( CoveredContext ) + << endl; + + + // + // Protect ourself against trying to overmount the same context many times + // by pushing new attempts onto pendingOverMounts and poping them after the + // attempt is complete + // + typedef list< Context* > pendingOverMounts_t; + static pendingOverMounts_t pendingOverMounts; + pendingOverMounts_t::iterator OurPendingOverMountIter = pendingOverMounts.end(); + + try + { + if( isBound(OverMountContext_Delegate) || isBound( CoveredContext )) + return; + if( m_overMountAttemptHasAlreadyFailed ) + return; + if( attemptingOverMountOnlyToFindEA && m_overMountAttemptHasAlreadyFailedEAOnly ) + return; + + if( pendingOverMounts.end() != find( pendingOverMounts.begin(), + pendingOverMounts.end(), + this )) + { + LG_OVERMOUNT_D << "tryToOverMount(already pending) this:" << toVoid( this ) + << " OverMountContext_Delegate:" << toVoid( GetImpl( OverMountContext_Delegate )) + << " isBound(om):" << isBound(OverMountContext_Delegate) + << " CoveredContext:" << toVoid( GetImpl( CoveredContext )) + << " m_overMountAttemptHasAlreadyFailed:" << m_overMountAttemptHasAlreadyFailed + << endl; + return; + } + + if( disableOverMountingForContext() ) + { + LG_OVERMOUNT_I << "Context::tryToOverMount() forced off by plugin for this url:" << getURL() << endl; + m_overMountAttemptHasAlreadyFailed = true; + return; + } + + + pendingOverMounts.push_back( this ); + OurPendingOverMountIter = pendingOverMounts.end(); + --OurPendingOverMountIter; + +// LG_CTX_D << "tryToOverMount(1) this:" << toVoid( this ) +// << " OverMountContext_Delegate:" << toVoid( GetImpl( OverMountContext_Delegate )) +// << " isBound(om):" << isBound(OverMountContext_Delegate) +// << " CoveredContext:" << toVoid( GetImpl( CoveredContext )) +// << " m_overMountAttemptHasAlreadyFailed:" << m_overMountAttemptHasAlreadyFailed +// << endl; +// BackTrace(); + +// cerr << "Context::tryToOverMount() path:" << getDirPath() << endl; +// BackTrace(); + + LG_OVERMOUNT_I << "Context::tryToOverMount() actually trying overmount... path:" << getDirPath() << endl; + { + // Short out for testing purposes +// if( !contains( getURL(), ".ferris" ) ) +// return; + } + + + fh_context c = findOverMounter( attemptingOverMountOnlyToFindEA ); + if( !c ) + { + if( attemptingOverMountOnlyToFindEA ) + return; + } +// CERR << "tryToOverMount(success) this:" << toVoid( this ) << " success!" << endl; +// CERR << "tryToOverMount(2) this:" << toVoid( this ) +// << " OverMountContext_Delegate:" << toVoid( GetImpl( OverMountContext_Delegate )) +// << " isBound(om):" << isBound(OverMountContext_Delegate) +// << " CoveredContext:" << toVoid( GetImpl( CoveredContext )) +// << " m_overMountAttemptHasAlreadyFailed:" << m_overMountAttemptHasAlreadyFailed +// << " c:" << toVoid( GetImpl(c) ) +// << endl; + + LG_CTX_D << "tryToOverMount(2) this:" << toVoid( this ) + << " OverMountContext_Delegate:" << toVoid( GetImpl( OverMountContext_Delegate )) + << " isBound(om):" << isBound(OverMountContext_Delegate) + << " CoveredContext:" << toVoid( GetImpl( CoveredContext )) + << " m_overMountAttemptHasAlreadyFailed:" << m_overMountAttemptHasAlreadyFailed + << " c:" << toVoid( GetImpl(c) ) + << endl; + setOverMountContext( c ); + +// c->setAttributeContext( this, "" ); +// c->setContext( this, "" ); +// c->theParent = this; +// c->ParentContext = this; + + if( OurPendingOverMountIter != pendingOverMounts.end() ) + pendingOverMounts.erase( OurPendingOverMountIter ); + } + catch( FerrisNotReadableAsContext& e ) + { + LG_CTX_W << "Context::tryToOverMount() url:" << getURL() << " e:" << e.what() << endl; + if( OurPendingOverMountIter != pendingOverMounts.end() ) + pendingOverMounts.erase( OurPendingOverMountIter ); + + if( !attemptingOverMountOnlyToFindEA ) + m_overMountAttemptHasAlreadyFailed = true; + m_overMountAttemptHasAlreadyFailedEAOnly = true; + + if( silentIgnore ) + return; + throw; + } + catch( exception& e ) + { + if( OurPendingOverMountIter != pendingOverMounts.end() ) + pendingOverMounts.erase( OurPendingOverMountIter ); + + if( !attemptingOverMountOnlyToFindEA ) + m_overMountAttemptHasAlreadyFailed = true; + m_overMountAttemptHasAlreadyFailedEAOnly = true; + + if( silentIgnore ) + return; + throw; + } + +} + + +/** + * read an overmounted context + */ +void +Context::readOverMount() +{ + try + { + fh_context c = getOverMountContext(); + c->ClearStartReadingFlag(); + c->HaveReadDir=1; + LG_CTX_D << "Context::readOverMount() set haveReadDir to true url:" << getURL() << endl; + + c->getNamingEvent_Stop_Reading_Context_Sig().connect(sigc::mem_fun( *this, &Context::ReadDone )); + getOverMountContext()->priv_read(); + while(ReadingDir) + { + Main::processEvent(); + } + LG_CTX_D << "Context::readOverMount() url:" << getURL() + << " read context:" << toVoid( c ) + << " size:" << getItems().size() + << endl; + } + catch( FerrisNotReadableAsContext& e ) + { + LG_CTX_D << "FerrisNotReadableAsContext url:" << getURL() << endl; + LG_CTX_D << "FerrisNotReadableAsContext e:" << e.what() << endl; + ReadingDir = 0; + throw e; + } + catch( exception& e ) + { + LG_CTX_I << "%%%%%%%%%%%%%%%%%% findOverMounter() catch() set ReadDone:" << getDirPath() << endl; +// cerr << "e:" << e.what() << endl; + ReadingDir = 0; + throw; + } + catch( ... ) + { +// cerr << "%%%%%%%%%%%%%%%%%% findOverMounter() this:" << this << endl; + LG_CTX_I << "%%%%%%%%%%%%%%%%%% findOverMounter() catch() set ReadDone:" << getDirPath() << endl; + ReadingDir = 0; + throw; + } +} + + + +/** + * Read this context. + * + * Note that this method may cause an overmounter to read over this context. + * + * This method does not explicitly have to be called in many cases; + * getSubContextNames() and getSubContext() will both read the context if it + * has not been read when they are called. + * + * @see NamingEvent_Start_Reading_Context_Sig_t + * @see NamingEvent_Stop_Reading_Context_Sig_t + * @see NamingEvent_Exists_Sig_t + * + * @see getNamingEvent_Start_Reading_Context_Sig() + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see getNamingEvent_Exists_Sig() + * + * @see getSubContextNames() + * @see getSubContext() + * + * @param force If false and read() has been called on this context previously then + * the context is not read again. + */ + void + Context::read( bool force ) + { + if( ReadingDir ) + { + fh_stringstream ss; + ss << "Warning. Already reading dir:" << getURL() << endl; + cerr << tostr(ss) << endl; + LG_CTX_ER << tostr(ss) << endl; + BackTrace(); + return; + } + + if( getOverMountContext() != this ) + { + readOverMount(); + return; + } + + ClearStartReadingFlag(); + + if( HaveReadDir && isActiveView() && !force ) + { +// cerr << "Context::read(" << force << ") url:" << getURL() << " already read" +// << " items size:" << getItems().size() +// << " omitems size:" << getOverMountContext()->getItems().size() +// << endl; +// cerr << "local.dump" << endl; +// dumpOutItems(); +// cerr << "omc.dump" << endl; +// getOverMountContext()->dumpOutItems(); + +// LG_CTX_D << "Warning: Already read dir and not forcing. returning:" +// << getDirPath() << endl; +// LG_CTX_D << " items size:" << getItems().size() << endl; +// LG_CTX_D << " omitems size:" << getOverMountContext()->getItems().size() << endl; +// dumpOutItems(); +// getOverMountContext()->dumpOutItems(); + + + EnsureStartReadingIsFired(); + emitExistsEventForEachItem(); + EnsureStopReadingIsFired(); + return; + } + + NumberOfSubContexts=0; + HaveReadDir=1; + ReadingDir=1; + LG_CTX_D << "Context::read() set haveReadDir to true. url:" << getURL() << endl; +// cerr << "Context::read(1) force:" << force << " dir:" << getURL() << endl; + + try + { + /* + * VM.clean.1: start of an active read() + */ + LG_VM_D << "CALLING getCacheManager()->AutoClean()... " + << " from Context::read()" << endl; + getCacheManager()->AutoClean(); + +// cerr << "Context::read(" << force << ") url:" << getURL() +// << " this:" << toVoid( this ) +// << " calling priv_read()" << endl; +// BackTrace(); + + LG_CTX_N << "Context::read(" << force << ") url:" << getURL() + << " calling priv_read() nsc:" << NumberOfSubContexts << endl; + priv_read(); + while(ReadingDir) + { +// Main::processEvent(); // FAILS (on fedora 9) +// Main::processAllPending_VFSFD_Events(); // FAILS +// Main::processAllPendingEvents(); // OK + + g_main_iteration( false ); + Main::processAllPending_VFSFD_Events(); + } + LG_CTX_N << "Context::read(" << force << ") url:" << getURL() + << " completed priv_read() nsc:" << NumberOfSubContexts + << " getItems().size():" << getItems().size() + << endl; + NumberOfSubContexts = getItems().size(); + + OnReadComplete_setupUserOverlayLinks(); + } + catch( FerrisNotReadableAsContext& e ) + { + LG_CTX_D << "Context::read(" << force << ") url:" << getURL() + << " FerrisNotReadableAsContext e:" << e.what() << endl; + LG_OVERMOUNT_I << "Context::read(" << force << ") url:" << getURL() + << " FerrisNotReadableAsContext e:" << e.what() << endl; + ReadingDir=0; + tryToOverMount( false ); + readOverMount(); + +// try +// { +// // DEBUG_dumpcl("Context::read(about to overmount)"); + +// fh_context c = findOverMounter(); + +// // DEBUG_dumpcl("Context::read(found overmounter)"); +// setOverMountContext( c ); + +// c->ClearStartReadingFlag(); +// c->HaveReadDir=1; +// cerr << "ferris.cpp 4297 c:" << c->getURL() +// << " this:" << getURL() +// << endl; + +// c->getNamingEvent_Stop_Reading_Context_Sig().connect(slot( *this, &Context::ReadDone )); +// getOverMountContext()->priv_read(); +// while(ReadingDir) +// { +// Main::processEvent(); +// } +// } +// catch( FerrisNotReadableAsContext& e ) +// { +// cerr << "FerrisNotReadableAsContext url:" << getURL() << endl; +// cerr << "FerrisNotReadableAsContext e:" << e.what() << endl; +// ReadingDir = 0; +// throw e; +// } +// catch( exception& e ) +// { +// LG_CTX_I << "%%%%%%%%%%%%%%%%%% findOverMounter() catch() set ReadDone:" << getDirPath() << endl; +// // cerr << "e:" << e.what() << endl; +// ReadingDir = 0; +// throw; +// } +// catch( ... ) +// { +// // cerr << "%%%%%%%%%%%%%%%%%% findOverMounter() this:" << this << endl; +// LG_CTX_I << "%%%%%%%%%%%%%%%%%% findOverMounter() catch() set ReadDone:" << getDirPath() << endl; +// ReadingDir = 0; +// throw; +// } + } + catch( exception& e ) + { + cerr << "read() e:" << e.what() << endl; + ReadingDir=0; + throw; + } + } + +struct UserOverlayLinkData +{ + string m_target; + string m_linkname; + fh_context m_configCtx; + + UserOverlayLinkData( fh_context c ) + : + m_configCtx( c ) + { + m_target = getStrSubCtx( c, "target", "" ); + m_linkname = getStrSubCtx( c, "link-name", "" ); + } +}; + + +/** + * The user might want some virtual softlinks to exist automatically, + * this method is called from read() to set those up. + * + * For example, I might want + * gphoto://camera + * to point to + * gphoto://Canon G10 + */ +void +Context::OnReadComplete_setupUserOverlayLinks() +{ + LG_USEROVERLAY_D << "OnReadComplete_setupUserOverlayLinks()" << endl; + + // + // regex dir url: existing-target link-name + // + static bool loadedConfig = false; + typedef list< pair< fh_rex, UserOverlayLinkData > > m_UserOverlayLinkConfig_t; + static m_UserOverlayLinkConfig_t m_UserOverlayLinkConfig; + if( !loadedConfig ) + { + loadedConfig = true; + + try + { + fh_context r = Resolve("~/.ferris/user-overlay-links.xml/user-overlay-links"); + fh_context byRegex = r->getSubContext("link-by-regex"); + + for( Context::iterator ci = byRegex->begin(); ci != byRegex->end(); ++ci ) + { + fh_context c = *ci; + string rstr = getStrSubCtx( c, "match", "" ); + LG_USEROVERLAY_D << "vlink rex:" << rstr << endl; + if( rstr.empty() ) + continue; + + UserOverlayLinkData d( c ); + fh_rex r = toregexh( rstr ); + m_UserOverlayLinkConfig.push_back( make_pair( r, d )); + } + } + catch( exception& e ) + { + LG_USEROVERLAY_W << "user-overlay-config, error:" << e.what() << endl; + } + } + + // + // If any of the regex matches, create the virtual softlink + // + if( m_UserOverlayLinkConfig.empty() ) + { + LG_USEROVERLAY_D << "OnReadComplete_setupUserOverlayLinks() no links specified by user..." << endl; + return; + } + + + string earl = getURL(); + LG_USEROVERLAY_D << "testing m_UserOverlayLinkConfig.sz:" << m_UserOverlayLinkConfig.size() << " earl:" << earl << endl; + for( m_UserOverlayLinkConfig_t::iterator iter = m_UserOverlayLinkConfig.begin(); + iter != m_UserOverlayLinkConfig.end(); ++iter ) + { + if( regex_match( earl, iter->first ) ) + { + LG_USEROVERLAY_D << "have match!" << endl; + + try + { + bool setupEventConnections = true; + string rdn = iter->second.m_linkname; + string targetURL = iter->second.m_target; + + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { + fh_context ret = *subc_iter; + ret->setHasBeenDeleted( false ); + Emit_Exists( 0, ret, rdn, rdn, 0 ); + } + else + { + + LG_USEROVERLAY_D << "trying1 to make link rdn:" << rdn << " target:" << targetURL << endl; + if( !contains( targetURL, "://" )) + targetURL = getURL() + "/" + targetURL; + LG_USEROVERLAY_D << "trying2 to make link rdn:" << rdn << " target:" << targetURL << endl; + fh_context target = Resolve( targetURL ); + fh_context parent = this; + + LG_USEROVERLAY_D << "Creating link rdn:" << rdn << " target:" << target->getURL() << endl; + fh_context nc = + new VirtualSoftlinkContext( parent, target, rdn, + setupEventConnections ); + Insert( GetImpl(nc) ); + } + } + catch( exception& e ) + { + LG_USEROVERLAY_W << "user-overlay-create-link, error:" << e.what() << endl; + } + } + } +} + + + +/** + * Virtual method for subclasses to override to perform the read operation. + * + * + * Note that this method may cause an overmounter to read over this context. + * + * @see read() + * + * @see NamingEvent_Start_Reading_Context_Sig_t + * @see NamingEvent_Stop_Reading_Context_Sig_t + * @see NamingEvent_Exists_Sig_t + * + * @see getNamingEvent_Start_Reading_Context_Sig() + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see getNamingEvent_Exists_Sig() + * + * @param force If false and read() has been called on this context previously then + * the context is not read again. + */ + void + Context::priv_read() + { + Throw_FerrisNotReadableAsContext( "", this ); + +// EnsureStartReadingIsFired(); +// EnsureStopReadingIsFired(); + } + + + +// /** +// * Perform a syncronous read of this context. +// * +// * To not wait for the reading to complete please use read(). +// * +// * Note that this method may cause an overmounter to read over this context. +// * +// * @see read() +// * +// * @see NamingEvent_Start_Reading_Context_Sig_t +// * @see NamingEvent_Stop_Reading_Context_Sig_t +// * @see NamingEvent_Exists_Sig_t +// * +// * @see getNamingEvent_Start_Reading_Context_Sig() +// * @see getNamingEvent_Stop_Reading_Context_Sig() +// * @see getNamingEvent_Exists_Sig() +// * +// * @param force If false and read() has been called on this context previously then +// * the context is not read again. +// */ +// void +// Context::readAndWait( bool force ) +// { +// // cerr << "%%%%%%%%%%%%%%%%%% readAndWait this:" << this << endl; +// // cerr << "%%%%%%%%%%%%%%%%%% readAndWait path:" << getDirPath() << endl; +// // cerr << "Context::readAndWait() HaveReadDir :" << HaveReadDir << endl; +// // cerr << "Context::readAndWait() ReadingDir :" << ReadingDir << endl; + +// if( ReadingDir ) +// { +// LG_CTX_ER << "Warning. Already reading dir:" << getDirPath() << endl; +// cerr << "Warning. Already reading dir:" << getDirPath() << endl; +// return; +// } + +// if( HaveReadDir && !force ) +// { +// LG_CTX_D << "Warning: Already read dir and not forcing. returning:" +// << getDirPath() << endl; +// LG_CTX_D << " items size:" << getItems().size() << endl; +// LG_CTX_D << " omitems size:" << getOverMountContext()->getItems().size() << endl; +// dumpOutItems(); +// getOverMountContext()->dumpOutItems(); + +// emitExistsEventForEachItem(); +// return; +// } + + +// HaveReadDir=0; +// ReadingDir=1; +// // cerr << "%%%%%%%%%%%%%%%%%% starting to readdir for :" << getDirPath() << endl; +// read( force ); + +// while(ReadingDir) +// { +// Main::processEvent(); +// } + +// } + +/** + * Access to a flag that is set if we are mid read() operation + */ + bool Context::areReadingDir() + { + return ReadingDir; + } + + + +/** + * Emit a Exists event for each item in getItems() + */ + void + Context::emitExistsEventForEachItem() + { +// Ferris::Util::ValueRestorer _dummy( ReadingDir, true ); + bool ReadingDirOld = ReadingDir; + ReadingDir = 1; + try + { + LG_CTX_D << "Context::emitExistsEventForEachItem() rdn:" << getDirPath() + << " ReadingDir: " << getReadingDir() + << endl; + + for( Items_t::iterator iter = getOverMountContext()->getItems().begin(); + iter != getOverMountContext()->getItems().end(); + ++iter ) + { +// cerr << "Context::emitExistsEventForEachItem() child.rdn:" +// << (*iter)->getDirName() << endl; + if( !(*iter)->HasBeenDeleted ) + { + Emit_Exists( 0, *iter, (*iter)->getDirName(), (*iter)->getDirName(), 0 ); + } + } + } + catch( exception& e ) + { + cerr << "Context::emitExistsEventForEachItem() e:" << e.what() << endl; + ReadingDir = ReadingDirOld; + throw; + } + catch( ... ) + { + ReadingDir = ReadingDirOld; + throw; + } + ReadingDir = ReadingDirOld; + } + + + +/** + * Convenience for subclasses, this method is already connected to + * getNamingEvent_Stop_Reading_Context_Sig() + * + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see NamingEvent_Stop_Reading_Context_Sig_t + * + * @see read() + */ + void + Context::ReadDone( NamingEvent_Stop_Reading_Context* src ) + { +// cerr << "%%%%%%%%%%%%%%%%%% ReadDone() for :" << getDirPath() << endl; + ReadingDir=0; + } + + + Handlable::ref_count_t + Context::AddRef() + { + if( ref_count >= ImplementationDetail::MAX_REF_COUNT ) + return ref_count; + +// LG_CTX_D << "Context::add_ref() ref_count:" << ref_count << " path:" << getDirPath() << endl; +// cerr << "Context::add_ref() rc:" << ref_count << " c:" << toVoid(this) +// << " mc:" << getMinimumReferenceCount() << endl; + +// CERR << "Context::AddRef() this:" << (void*)this << " rdn:" << getDirName() << " rc:" << ref_count << endl; + + if( Private::haveAnyContextReferenceWatches() ) + { + if( Private::getContextReferenceWatches().count( this ) ) + { + cerr << "Context::AddRef() c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; + } + } + + if( Private::haveAnyContextReferenceWatchesByName() && + Private::getContextReferenceWatchesByName().count( getDirName() ) ) + { + cerr << "Context::AddRef(n) c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; + BackTrace(); + } + if( Private::haveAnyContextParentReferenceWatches() ) + { + if( isParentBound() && Private::getContextParentReferenceWatches().count( getParent() ) ) + { + cerr << "Context::AddRef(P) c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; + } + } + + if( ref_count == getMinimumReferenceCount() ) + { +// LG_VM_D << "Context::add_ref() ref_count == getMinimumReferenceCount() " +// << " ref_count:" << ref_count +// << " min:" << getMinimumReferenceCount() +// // << " p:" << getDirPath() +// << " dirname:" << getDirName() +// << endl; + RemoveOurselfFromFreeList(); + +// cerr << "Context::AddRef () PROPERGATE UPWARD for c:" << toVoid(this) +// << " p:" << getDirPath() +// << " rc:" << ref_count +// << " minRC:" << getMinimumReferenceCount() +// << endl; + + if( isParentBound() && !m_holdingReferenceToParentContext ) + { + if( Private::getContextParentReferenceWatches().count( getParent() ) ) + { + cerr << "Context::AddRef(q) c:" << toVoid(this) << " Chaining up..." << endl; + } + + Attribute::getParent()->AddRef(); + m_holdingReferenceToParentContext = true; + } + + +// if( isParentBound() ) +// { +// if( Private::getContextParentReferenceWatches().count( getParent() ) ) +// { +// cerr << "Context::AddRef(q) c:" << toVoid(this) << " Chaining up..." << endl; +// } +// Attribute::getParent()->AddRef(); +// } + + } + + + Handlable::ref_count_t ret = _Base::AddRef(); + return ret; + } + + Handlable::ref_count_t + Context::Release() + { +// LG_CTX_D << "Context::rem_ref() rc:" << ref_count << " p:" << getDirPath() << endl; +// cerr << "Context::rem_ref() rc:" << ref_count << " c:" << toVoid(this) +// << " mc:" << getMinimumReferenceCount() << endl; + + + if( ref_count >= ImplementationDetail::MAX_REF_COUNT ) + return ref_count; + + ref_count_t ret = Handlable::Release(); + + if( Private::haveAnyContextReferenceWatches() ) + { + if( Private::getContextReferenceWatches().count( this ) ) + { + cerr << "Context::Release() c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; + } + } + if( Private::haveAnyContextReferenceWatchesByName() + && Private::getContextReferenceWatchesByName().count( getDirName() ) ) + { + cerr << "Context::Release(n) c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; + BackTrace(); + } + if( Private::haveAnyContextParentReferenceWatches() + && isParentBound() && Private::getContextReferenceWatches().count( getParent() ) ) + { + cerr << "Context::Release(P) c:" << toVoid(this) + << " rc:" << ref_count + << " mc:" << getMinimumReferenceCount() + << endl; +// BackTrace(); + } + + + try + { + if( ret == getMinimumReferenceCount() ) + { + if( isReClaimable() ) + { +// cerr << "Context::Release() PROPERGATE UPWARD for c:" << toVoid(this) +// << " p:" << getDirPath() +// << " rc:" << ref_count +// << " ret:" << ret +// << " minRC:" << getMinimumReferenceCount() +// << endl; + + TryToAddOurselfToFreeList(); + if( isParentBound() && m_holdingReferenceToParentContext ) + { +// cerr << "About to release parent. url:" << getParent()->getURL() << endl; + +// Context* p = getParent(); + Context* p = Attribute::getParent(); + + if( isParentBound() && Private::getContextReferenceWatches().count( getParent() ) ) + cerr << "Context::Release(q) c:" << toVoid(this) << " Chaining up..." << endl; + + p->Release(); + m_holdingReferenceToParentContext = false; + +// if( p->ref_count > p->getMinimumReferenceCount() ) +// p->Release(); + } + + +// if( isParentBound() ) +// { +// // cerr << "About to release parent. url:" << getParent()->getURL() << endl; + +// // Context* p = getParent(); +// Context* p = Attribute::getParent(); + +// if( isParentBound() && Private::getContextReferenceWatches().count( getParent() ) ) +// cerr << "Context::Release(q) c:" << toVoid(this) << " Chaining up..." << endl; + +// if( p->ref_count > p->getMinimumReferenceCount() ) +// p->Release(); +// } + + } + } + } + catch( exception& e ) + { + // Dead Reference Detected (maybe) +// cerr << "Context::Release() rc:" << ref_count +// << " e:" << e.what() +// << endl; + LG_VM_W << "Context::Release() rc:" << ref_count + << " e:" << e.what() + << endl; + } + catch( ... ) + { +// cerr << "Context::Release() rc:" << ref_count +// << " e ... " +// << endl; + LG_VM_W << "Context::Release() rc:" << ref_count + << " e ... " + << endl; + } + + + + +// LG_VM_D << "Context::rem_ref() path:" << getDirPath() +// << " rc:" << ref_count +// << " attr_created:" << AttributesHaveBeenCreated +// << " attr_count:" << getAttributeCount() +// << endl; + + + // + // When we are only referenced by our attributes, we are dangling, + // and can die. + // +// if( !AttributesHaveBeenCreated ) +// Handlable::rem_ref(); + +// if( ref_count > getAttributeCount()) +// Handlable::rem_ref(); + + return ret > 0 ? ret : 1; + } + + + bool + Context::all_attributes_have_single_ref_count() + { +// if( OverMountContext_Delegate.bound() ) +// return OverMountContext_Delegate->all_attributes_have_single_ref_count(); +// return Attribute::all_attributes_have_single_ref_count(); + return false; + } + + +// fh_istream +// Context::getDigestStream( std::string DigestName , const std::string& rdn, EA_Atom* atom ) +// { +// fh_stringstream ret; + +// EVP_MD_CTX mdctx; +// const EVP_MD *md; +// unsigned char md_value[EVP_MAX_MD_SIZE]; +// unsigned int md_len; +// string s; +// int i; +// char* buf = 0; +// int optimal_block_size = 1024; +// static gboolean First_Generate = 1; + +// InitOpenSSL(); + +// md = EVP_get_digestbyname(DigestName.c_str()); +// if( !md ) +// { +// ret << "N/A"; +// return ret; +// } + +// try { + +// fh_istream ifs = getIStream(); +// EVP_DigestInit(&mdctx, md); +// optimal_block_size = EVP_MD_block_size( md ); +// buf = new char[optimal_block_size+1]; + +// while( ifs->good() ) +// { +// ifs->read(buf, optimal_block_size); +// EVP_DigestUpdate(&mdctx, buf, ifs->gcount()); +// } + +// delete [] buf; +// if(!ifs->eof()) +// { +// ret << "Read error"; +// return ret; +// } + +// EVP_DigestFinal(&mdctx, md_value, &md_len); + +// radixdump( ret, md_value, md_value + md_len, 16 ); +// return ret; +// } +// catch( ... ) +// { +// s=""; +// } + +// ret << s; +// return ret; +// } + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Get the subcontext count as a string. Used in EA generators. + * return The sub context count string. + */ + fh_istream + Context::SL_getSubContextCountStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->Items.size(); //NumberOfSubContexts; + return ss; + } + + +/** + * Get the attribute count as a string. Used in EA generators. + * return The attr count string. + */ + fh_istream + Context::SL_getAttributeCountStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getAttributeCount(); + return ss; + } + + + +/** + * Get the dirname as a string. Used in EA generators. + * return The dirname string. + */ + fh_istream + Context::SL_getDirNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "SL_getDirNameStream() p:" << c->getDirPath() << endl; + + fh_stringstream ss; + ss << c->getDirName(); + return ss; + } + + fh_iostream + Context::SL_getDirNameIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "SL_getDirNameIOStream() p:" << c->getDirPath() << endl; + + if( !c->supportsRename() ) + { + fh_stringstream ss; + ss << "Context does not support rename c:" << c->getURL() << endl; + LG_CTX_D << tostr(ss) << endl; + Throw_RenameFailed(tostr(ss),c); + } + + fh_stringstream ss; + ss << c->getDirName(); + return ss; + } + + void + Context::SL_RenameContext( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string new_rdn = getFirstLine(ss); + LG_CTX_D << "SL_RenameContext() new_rdn:" << new_rdn << endl; + c->getParent()->rename( c->getDirName(), new_rdn, false, false ); + } + +fh_istream +Context::SL_getParentDirNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + if( !c->isParentBound() ) + ss << ""; + else + ss << c->getParent()->getDirName(); + return ss; +} + +fh_istream +Context::SL_getParentURLStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + if( !c->isParentBound() ) + ss << ""; + else + ss << c->getParent()->getURL(); + return ss; +} + + + static bool isAnimationFromMimeType( const std::string& s ) + { + return ( starts_with( s, "video/" ) || s == "application/x-matroska" ); + } + + + /** + * Get the path of an icon to display inline in tree/list views which display + * the context 'c' + */ + static fh_istream + SL_getTreeIconStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( toint( getStrAttr( c, "is-dir", "0" ))) // || c->getHasSubContextsGuess() ) + ss << "icons://ferris-mu-dir.png"; + else + { + string name = c->getDirName(); + string mime = c->getMimeType(); + + if( starts_with( mime, "image/" )) + { + ss << "icons://ferris-mu-image.png"; + } + else if( isAnimationFromMimeType( mime ) ) + { + ss << "icons://ferris-mu-video.png"; + } + else if( starts_with( mime, "audio/" )) + { + ss << "icons://ferris-mu-audio.png"; + } + else + ss << "icons://ferris-mu-file.png"; + } + + return ss; + } + + +/** + * Get the dirname extension as a string. + * The extension is defined as any non '.' characters after the last dot + * in the string. + * + * Used in EA generators. + * return The extension of the dirname string. + */ +fh_istream +Context::SL_getDirNameExtensionStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << c->getNameExtension(); + return ss; +} + +std::string +Context::getNameExtension() +{ + string dn = getDirName(); + string::size_type pos = dn.rfind('.'); + + if( string::npos != pos ) + { + return dn.substr( pos+1 ); + } + return ""; +} + + + + +/** + * Get the dirpath as a string. Used in EA generators. + * return The dirpath string. + */ + static fh_istream + SL_getDirPathStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getDirPath(); + return ss; + } + + /** + * get the URL for this context + */ + static fh_istream + SL_getURLStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getURL(); + return ss; + } + + /** + * Get the names of the EA that ferris recommends clients show the + * user for this context + */ + fh_istream + Context::SL_getRecommendedEAStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getRecommendedEA(); + return ss; + } + +fh_istream +Context::SL_getRecommendedEAShortStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + stringlist_t sl = Util::parseCommaSeperatedList( c->getRecommendedEA() ); + fh_stringstream ss; + + ss << "name,"; + if( !sl.empty() ) + { + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + if( *si != "name" ) + { + ss << *si; + break; + } + } + } + + return ss; +} + + void addEAToSet( set& theSet, fh_stringstream& ss ) + { + string s; + while(getline(ss,s,',')) + theSet.insert(s); + } + void addEAToSet( set& theSet, const std::string commaSepEA ) + { + string s; + fh_stringstream ss; + ss << commaSepEA; + while(getline(ss,s,',')) + theSet.insert(s); + } + +/** + * Get the names of the EA that ferris recommends clients show the + * user for this context... union of EA from base and overmount context + */ + fh_istream + Context::SL_getRecommendedEAUnionStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + /* Merge recommended EA for base and overmounting contexts */ + fh_stringstream ss; + + string s = c->getRecommendedEA(); + + if( !isBound(c->OverMountContext_Delegate) ) + { + /* There is only the recommended ea, short out */ + ss << s; + return ss; + } + string oms = c->OverMountContext_Delegate->getRecommendedEA(); + +// cerr << "SL_getRecommendedEAUnionStream()" +// << " s:" << s << " oms:" << oms +// << endl; + + set unionset; + addEAToSet( unionset, s ); + addEAToSet( unionset, oms ); + unique_copy( unionset.begin(), unionset.end(), + ostream_iterator(ss,",")); + return ss; + } + + + fh_istream + Context::getRecommendedEAUnionView() + { + fh_stringstream ss; + + set unionset; + recommendedEAUnionViewAdd( unionset, this ); + + LG_GTKFERRIS_D << "Context::SL_getRecommendedEAUnionViewStream() c:" << getURL() << endl; +// cerr << "Context::SL_getRecommendedEAUnionViewStream() c:" << getURL() << endl; +// BackTrace(); + + try + { + for( Context::iterator iter = begin(); iter != end(); ++iter ) + { + LG_GTKFERRIS_D << "Context::SL_getRecommendedEAUnionViewStream() iter:" << (*iter)->getURL() << endl; + recommendedEAUnionViewAdd( unionset, GetImpl(*iter) ); + } +// LG_GTKFERRIS_D << "Context::SL_getRecommendedEAUnionViewStream(done with iter)" << endl; + } + catch( exception& e ) + { + } + + unique_copy( unionset.begin(), unionset.end(), + ostream_iterator(ss,",")); +// cerr << "SL_getRecommendedEAUnionViewStream() ret:" << tostr(ss) << endl; + LG_GTKFERRIS_D << "Context::SL_getRecommendedEAUnionViewStream(done)" << endl; + + return ss; + } + + void + Context::recommendedEAUnionViewAdd( set& theSet, Context* c ) + { + addEAToSet( theSet, c->getRecommendedEA() ); + if(isBound(c->OverMountContext_Delegate)) + addEAToSet( theSet, c->OverMountContext_Delegate->getRecommendedEA() ); + } + + + /** + * set_union() of recommended-ea-union of this context and all of its + * direct children + */ + fh_istream + Context::SL_getRecommendedEAUnionViewStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return c->getRecommendedEAUnionView(); + } + +/** + * Get the names of the EA that ferris recommends clients show the + * user for this context + */ + fh_istream + Context::SL_getHasSubContextsGuessStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + if( c->getHaveReadDir() ) + ss << c->SubContextCount(); + else + ss << c->getHasSubContextsGuess(); + + return ss; + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + fh_display_aggdata + getCachedContextAggregateData( fh_context c, int m ) + { + int aggmode = 0; + + if( isBound( c->AggregateData ) ) + { + aggmode = c->AggregateData->getMode(); + } + + /* If there is not aggregate data or we need recursive and the existing + * cache is not recursive, remake the data. + */ + if( !isBound( c->AggregateData ) + || (( m & AGGDATA_RECURSIVE ) && (!( aggmode & AGGDATA_RECURSIVE ))) + ) + { + c->AggregateData = getAggregateData( c, aggdata_mode_t(m) ); + } + return c->AggregateData; + } + + void + Context::SL_FlushAggregateData( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + c->AggregateData = 0; + } + + + fh_iostream + Context::SL_getRecursiveSubcontextCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_display_aggdata d = getCachedContextAggregateData( c, AGGDATA_RECURSIVE ); + + fh_stringstream ss; + ss << d->getRecursiveData().count; + return ss; + } + + fh_istream + Context::SL_getRecursiveSubcontextCountStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRecursiveSubcontextCountIOStream( c, rdn, atom ); + } + + fh_iostream + Context::SL_getRecursiveSubcontextMaxDepthIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_display_aggdata d = getCachedContextAggregateData( c, AGGDATA_RECURSIVE ); + + fh_stringstream ss; + ss << d->getRecursiveData().maxdepth; + return ss; + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + static fh_iostream + SL_getIsImage( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->isAttributeBound( "rgba-32bpp", false ); + return ss; + } + + static fh_iostream + SL_getIsAnimation( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string mt = getStrAttr( c, "mimetype", "" ); + + ss << isAnimationFromMimeType( mt ); +// ss << c->isAttributeBound( "pgmpipe", false ); + return ss; + } + + static fh_iostream + SL_getIsAudio( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string mt = getStrAttr( c, "mimetype", "" ); + ss << starts_with( mt, "audio" ) || starts_with( mt, "video" ); +// ss << c->isAttributeBound( "a52-sample-rate", false ); + return ss; + } + + static fh_iostream + SL_getIsSource( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string name = c->getDirName(); + static boost::regex r = toregex( "\\.cpp^|\\.hh^|\\.pl^|\\.c^|\\.h^|\\.py^|\\.java^" ); + + fh_stringstream ss; + ss << regex_search( name, r, boost::match_any ); + return ss; + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +fh_iostream +Context::SL_getAsXML( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + ss << XML::contextToXML( c ); + return ss; +} + +static void +SL_getAsXMLClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + string s = StreamToString( ss ); + XML::updateFromXML( c, s, false ); +} + +/** + * load a library and using the Create function make a handler for as-text + * from a shared library. + * + * note that we can't close the library while its fh_AsTextStatelessFunctor + * is in the cache because we are using code from the library still. + */ +static +fh_istream +SL_getAsText_fromLibrary( Context* c, + const std::string& rdn, + EA_Atom* atom, + const std::string& libname ) +{ + typedef map< string, fh_AsTextStatelessFunctor > cache_t; + static cache_t cache; + cache_t::iterator ci = cache.find( libname ); + + /** + * cache it if its not there + */ + if( ci == cache.end() ) + { +// const string library_path = FERRIS_AS_TEXT_PLUGIN_DIR + "/" + libname; + const string library_path = makeFerrisPluginPath( "astext", libname ); + + GModule* gmod = g_module_open ( library_path.c_str(), G_MODULE_BIND_LAZY ); + fh_AsTextStatelessFunctor (*creator_function)(); + + if( !gmod ) + { + fh_stringstream ss; + ss << "Error, unable to open module file:" << library_path << " " + << g_module_error () + << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol( gmod, "Create", (gpointer*)&creator_function )) + { + ostringstream ss; + ss << "Error, unable to resolve Create in module file:" << library_path + << " this should never happen. Please report it to the mailing list" + << " " + << g_module_error() + << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + fh_AsTextStatelessFunctor f = creator_function(); + ci = cache.insert( make_pair( library_path, f ) ).first; + } + + return ci->second->getAsText( c, rdn, atom ); +} + + +fh_istream +Context::SL_getAsText( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + string libname = ""; + string mimetype = getStrAttr( c, "mimetype", "" ); + + if( starts_with( mimetype, "text/plain" )) + { + return c->getIStream(); + } + + libname = getLibraryNameFromMime( mimetype ); + if( !libname.empty() ) + { + return SL_getAsText_fromLibrary( c, rdn, atom, libname ); + } + + string ferristype = getStrAttr( c, "ferris-type", "" ); + libname = getLibraryNameFromFerrisType( ferristype ); + if( !libname.empty() ) + { + return SL_getAsText_fromLibrary( c, rdn, atom, libname ); + } + + fh_context cc = c; + libname = getLibraryNameFromMatcher( cc ); + if( !libname.empty() ) + { + return SL_getAsText_fromLibrary( c, rdn, atom, libname ); + } + + if( starts_with( mimetype, "text/" )) + { + return c->getIStream(); + } + + // failed + { + fh_stringstream ss; + ss << "No conversion to plaintext for context:" << c->getURL() + << " mime:" << mimetype + << " ferristype:" << ferristype + << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } +} + + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +time_t +Context::getDownloadIfMTimeSince() +{ + return s_downloadMTimeSince()[ this ]; +} + +void +Context::setDownloadIfMTimeSince( time_t x ) +{ + s_downloadMTimeSince()[ this ] = x; +} + + fh_istream + Context::SL_getFerrisCurrentTimeIStream( Context* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + ss << Time::getTime(); + return ss; + } + + +fh_istream +Context::SL_getDownloadIfMTimeSinceIStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + ss << c->getDownloadIfMTimeSince(); + return ss; +} + +fh_iostream +Context::SL_getDownloadIfMTimeSinceIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + ss << c->getDownloadIfMTimeSince(); + return ss; +} + +void +Context::SL_downloadIfMTimeSinceClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + time_t x = 0; + ss >> x; + c->setDownloadIfMTimeSince( x ); +// cerr << "SL_downloadIfMTimeSinceClosed() c:" << c->getURL() +// << " x:" << x +// << " x.str:" << Time::toTimeString( x ) +// << endl; +} + + /** + * Test if the current value for download-if-mtime-since is older than + * the current mtime. The mtime is taken either from the given argument or + * defaults to getting the mtime EA for this context. + * + * Mostly used in context plugins to test the modification time of remote data. + * simply call testDownloadIfMTimeSince( mtime, true ) in a network module to + * test if the mtime from a network header is new enough to download the data itself. + * + * @returns true if either there is no mtime EA or the mtime is newer than + * download-if-mtime-since or its a remote context and force is false + * + * @param mtime Modification time for this context or 0 to get the mtime via + * ea. + * @param force If this is a remote context one must set force to true in + * order to perform the test. default is false, ie. test local data only + */ +bool +Context::testDownloadIfMTimeSince( time_t mtime, bool force ) +{ +// cerr << "Context::testDownloadIfMTimeSince() " +// << " force:" << force +// << " mtime:" << mtime +// << " isRemote:" << isRemote() +// << endl; + + if( !force && isRemote() ) + return true; + + /* + * handle download-if-mtime-since EA in a global fashion + */ + if( time_t dlt = getDownloadIfMTimeSince() ) + { + if( !mtime ) + { + if( isAttributeBound( "mtime", false ) ) + mtime = toType< time_t >(getStrAttr( this, "mtime", "0" )); + else + return true; + } + + if( mtime <= dlt ) + { + fh_stringstream ss; + ss << "Remote document not modified, no source for:" << getURL() << endl; + Throw_ContentNotModified( tostr(ss), 0 ); + } + } + return true; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +fh_istream +Context::SL_getIsRemote( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << c->isRemote(); + return ss; +} + +fh_iostream +Context::SL_getFerrisPostCopyActionStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << ""; + return ss; +} + +void +Context::SL_FerrisPostCopyActionStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + string s = StreamToString( ss ); + try + { + fh_context sc = Resolve( s ); + c->priv_postCopyAction( sc ); + } + catch( exception& e ) + { + } +} + + void + Context::priv_postCopyAction( fh_context c ) + { + } + + + +fh_iostream +Context::SL_getFerrisPreCopyActionStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << ""; + return ss; +} + +void +Context::SL_FerrisPreCopyActionStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + string s = StreamToString( ss ); + try + { + fh_context sc = Resolve( s ); + c->priv_preCopyAction( sc ); + } + catch( exception& e ) + { + } +} + + void + Context::priv_preCopyAction( fh_context c ) + { + } + + +fh_iostream +Context::SL_getSubtitlesStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << getStrAttr( c, "subtitles-local", "", true ); + return ss; +} + + +fh_iostream +Context::SL_getDotEAStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + string aname = "." + rdn; + ss << getStrAttr( c, aname, "", true ); + return ss; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +/** + * Get a string that has a list of all the EA Names that this attribute + * contains. Each attribute is seperated with a "," character. + * + * @see priv_getAttributeNames() + * @see getAttributeNames() + * @param attr Not Used. + * @return string with a list of attribute names seperated with a "," char + */ + fh_istream + Context::SL_getEANamesStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + AttributeCollection::AttributeNames_t an; + c->getAttributeNames( an ); + ss << Util::createCommaSeperatedList( an ); + return ss; + } + +/** + * Same as SL_getEANamesStream() but the qualified namespaces like schema: are not returned + */ + static fh_istream + SL_getEANamesNoQualStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + AttributeCollection::AttributeNames_t an; + c->getAttributeNames( an ); + AttributeCollection::AttributeNames_t anfinal; + + for( AttributeCollection::AttributeNames_t::iterator iter = an.begin(); + iter != an.end(); iter++ ) + { + if( starts_with( *iter, "schema:" )) + continue; + anfinal.push_back( *iter ); + } + + ss << Util::createCommaSeperatedList( anfinal ); + return ss; + } + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +string digest( fh_istream ifs, string DigestName ) +{ + fh_stringstream ret; + + EVP_MD_CTX mdctx; + const EVP_MD *md; + unsigned char md_value[EVP_MAX_MD_SIZE]; + unsigned int md_len; + string s; + char* buf = 0; + int optimal_block_size = 1024; + static gboolean First_Generate = 1; + + InitOpenSSL(); + + md = EVP_get_digestbyname(DigestName.c_str()); + if( !md ) + { + ret << "N/A"; + return tostr(ret); + } + + try + { + EVP_DigestInit(&mdctx, md); + optimal_block_size = EVP_MD_block_size( md ); + buf = new char[optimal_block_size+1]; + + while( ifs->good() ) + { + ifs->read(buf, optimal_block_size); + EVP_DigestUpdate(&mdctx, buf, ifs->gcount()); + } + + delete [] buf; + if(!ifs->eof()) + { + ret << "Read error"; + return tostr(ret); + } + + EVP_DigestFinal(&mdctx, md_value, &md_len); + + radixdump( ret, md_value, md_value + md_len, 16 ); + return tostr(ret); + } + catch( ... ) + { + s=""; + } + + ret << s; + return tostr(ret); +} + +string digest( string s, string DigestName ) +{ + fh_stringstream ss(s); + return digest( ss, DigestName ); +} + + + + static fh_istream + SL_getDigestStream( string DigestName, Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ret; + string s = ""; + try + { + if( isFalse( getStrAttr( c, "is-special", "0" ))) + { + fh_istream ifs = c->getIStream(); + s = digest( ifs, DigestName ); + } + } + catch( ... ) + { + s=""; + } + + ret << s; + return ret; + + +// fh_stringstream ret; + +// EVP_MD_CTX mdctx; +// const EVP_MD *md; +// unsigned char md_value[EVP_MAX_MD_SIZE]; +// unsigned int md_len; +// string s; +// int i; +// char* buf = 0; +// int optimal_block_size = 1024; +// static gboolean First_Generate = 1; + +// InitOpenSSL(); + +// md = EVP_get_digestbyname(DigestName.c_str()); +// if( !md ) +// { +// ret << "N/A"; +// return ret; +// } + +// try { + +// fh_istream ifs = c->getIStream(); +// EVP_DigestInit(&mdctx, md); +// optimal_block_size = EVP_MD_block_size( md ); +// buf = new char[optimal_block_size+1]; + +// while( ifs->good() ) +// { +// ifs->read(buf, optimal_block_size); +// EVP_DigestUpdate(&mdctx, buf, ifs->gcount()); +// } + +// delete [] buf; +// if(!ifs->eof()) +// { +// ret << "Read error"; +// return ret; +// } + +// EVP_DigestFinal(&mdctx, md_value, &md_len); + +// radixdump( ret, md_value, md_value + md_len, 16 ); +// return ret; +// } +// catch( ... ) +// { +// s=""; +// } + +// ret << s; +// return ret; + } + +#ifdef FERRIS_HAVE_LIBZ + static fh_istream + SL_getCRC32IStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ret; + string s = ""; + try + { + if( isFalse( getStrAttr( c, "is-special", "0" ))) + { + fh_istream ifs = c->getIStream(); + const int bufsz = 4096*16+1; + char buf[ bufsz + 1 ]; + uLong crc = crc32(0L, Z_NULL, 0); + + while( true ) + { + ifs.read( buf, bufsz ); + int gc = ifs.gcount(); + if( gc ) + crc = crc32( crc, (Bytef*)buf, gc ); + if( !ifs ) + break; + } + + ret << hex << setw(8) << setfill('0') << crc; + } + } + catch( ... ) + { + s=""; + } + + return ret; + } +#endif + + + bool + Context::getHasSubContextsGuess() + { + return true; + } + + string getBaseEAName( string tailstr, Context* c, const string& attrName ) + { + string base_ea_name = ""; + if( int newend = attrName.find( tailstr ) ) + { + base_ea_name = attrName.substr( 0, newend ); +// cerr << "getBaseEAName() tailstr:" << tailstr +// << " base_ea_name:" << base_ea_name +// << endl; + } + else + { + fh_stringstream ss; + ss << "Problem with finding the base EA name for the timet value!" + << " Can not get the base ea:" << base_ea_name + << " to create the ea:" << attrName + << " output." + << " path:" << c->getDirPath() + << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + return base_ea_name; + } + + fh_istream + Context::SL_getSizeHumanReadableStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + c->ensureUpdateMetaDataCalled(); + off_t s = 0; + { + stringstream szss; + szss << getStrAttr( c, getBaseEAName( "-human-readable", c, rdn ), "0" ); + szss >> s; + } + + fh_stringstream ss; + ss << Util::convertByteString( s ); + return ss; + } + +template< + const std::string& MediaSizeKey, + const std::string& MediaSizeDefault, + const std::string& EAPostfix > +fh_istream +SL_getSizeMediaCountStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + double s = 0; + { + stringstream szss; + szss << getStrAttr( c, getBaseEAName( EAPostfix, c, rdn ), "0" ); + szss >> s; + } + + double MediaSize = toType( getEDBString( + FDB_GENERAL, + MediaSizeKey, + MediaSizeDefault )); + + s = s / MediaSize; + fh_stringstream ss; + ss << s; + return ss; +} + + + + fh_istream + Context::SL_getContentIStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "Context::SL_getContentIStream() c:" << c->getURL() << endl; + + EA_Atom_ReadWrite_OpenModeCached* a + = dynamic_cast( atom ); + if( a ) + return c->getIStream( a->getOpenMode() ); + + fh_stringstream ss; + ss << "SL_getContentIStream() this function should not have been called" + << " with the context/atom pairing that it was. This is a major bug" + << " caused in only one place in the code. PLEASE REPORT IT TO MAIL LIST" + << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + static fh_iostream + SL_getContentIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { +// cerr << "SL_getContentIOStream() c:" << c->getURL() << endl; + + EA_Atom_ReadWrite_OpenModeCached* a + = dynamic_cast( atom ); + if( a ) + return c->getIOStream( a->getOpenMode() ); + + fh_stringstream ss; + ss << "SL_getContentIOStream() this function should not have been called" + << " with the context/atom pairing that it was. This is a major bug" + << " caused in only one place in the code. PLEASE REPORT IT TO MAIL LIST" + << endl; + Throw_CanNotGetStream( tostr(ss), c ); + } + + static void + SL_getContentClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + } + + +// fh_istream +// SL_getMTimeCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// c->ensureUpdateMetaDataCalled(); +// fh_stringstream ss; +// string mtime = getStrAttr( c, "mtime", "" ); +// if( mtime.length() ) +// { +// time_t t = 0; +// stringstream mtimess; +// mtimess << mtime; +// mtimess >> t; +// ss << ctime( &t ); +// } +// return ss; +// } + +// fh_istream +// SL_getATimeCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// c->ensureUpdateMetaDataCalled(); +// fh_stringstream ss; +// string mtime = getStrAttr( c, "atime", "" ); +// if( mtime.length() ) +// { +// time_t t = 0; +// stringstream mtimess; +// mtimess << mtime; +// mtimess >> t; +// ss << ctime( &t ); +// } +// return ss; +// } + + fh_istream + Context::SL_getXTimeCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string eaname = getBaseEAName( "-ctime", c, rdn ); + + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + string mtime = getStrAttr( c, eaname, "" ); + if( mtime.length() ) + { + time_t t = 0; + stringstream mtimess; + mtimess << mtime; + mtimess >> t; + ss << ctime( &t ); + } + return ss; + } + + fh_istream + Context::SL_getXTimeDayGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string eaname = getBaseEAName( "-day-granularity", c, rdn ); + + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + string mtime = getStrAttr( c, eaname, "" ); + if( mtime.length() ) + { + time_t t = 0; + stringstream mtimess; + mtimess << mtime; + mtimess >> t; + + struct tm mytime = *(localtime( &t )); + mytime.tm_sec = 0; + mytime.tm_min = 0; + mytime.tm_hour = 0; + + ss << mktime( &mytime ); + } + return ss; + } + + fh_istream + Context::SL_getXTimeMonthGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string eaname = getBaseEAName( "-month-granularity", c, rdn ); + + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + + string mtime = getStrAttr( c, eaname, "" ); + if( mtime.length() ) + { + time_t t = 0; + stringstream mtimess; + mtimess << mtime; + mtimess >> t; + + struct tm mytime = *(localtime( &t )); + mytime.tm_sec = 0; + mytime.tm_min = 0; + mytime.tm_hour = 0; + mytime.tm_mday = 1; + + ss << mktime( &mytime ); + } + return ss; + } + + fh_istream + Context::SL_getXTimeYearGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string eaname = getBaseEAName( "-year-granularity", c, rdn ); + + c->ensureUpdateMetaDataCalled(); + fh_stringstream ss; + + string mtime = getStrAttr( c, eaname, "" ); + if( mtime.length() ) + { + time_t t = 0; + stringstream mtimess; + mtimess << mtime; + mtimess >> t; + + struct tm mytime = *(localtime( &t )); + mytime.tm_sec = 0; + mytime.tm_min = 0; + mytime.tm_hour = 0; + mytime.tm_mday = 1; + mytime.tm_mon = 0; + + ss << mktime( &mytime ); + } + return ss; + } + + fh_istream + Context::SL_getSizeFromContentIStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + streamsize size = 0; + fh_istream iss = c->getIStream(); + char ch; + while( iss >> noskipws >> ch ) + ++size; + fh_stringstream ss; + ss << size; + LG_XSLTFS_D << "SL_getSizeFromContentIStream() sz:" << size << endl; + return ss; + } + + + + fh_stringstream + Context::getTimeStrFTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + c->ensureUpdateMetaDataCalled(); + fh_stringstream ret; + + string eaname = getBaseEAName( "-display", c, rdn ); + time_t TT = 0; + fh_istream eass = c->getAttribute( eaname )->getIStream(); + if( !(eass >> TT) ) + { + fh_stringstream ss; + ss << "Can not get the base ea:" << eaname + << " to create the ea:" << rdn + << " output." + << " path:" << c->getDirPath() + << endl; + + Throw_CanNotGetStream( tostr(ss), c ); + } + +// LG_CTX_D << "getTimeStrFTimeStream() url:" << c->getURL() +// << " eaname:" << eaname +// << endl; + +// if( !TT ) +// { +// fh_stringstream ss; +// ss << "Can not get the base ea:" << eaname +// << " to create the ea:" << rdn +// << " output." +// << " path:" << c->getDirPath() +// << endl; + +// Throw_CanNotGetStream( tostr(ss), c ); +// } + +// LG_CTX_D << "getTimeStrFTimeStream(1) url:" << c->getURL() +// << " TT:" << TT +// << endl; + ret << Time::toTimeString( TT ); + return ret; + } + +// fh_istream +// SL_getTimeStrFTimeIStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// LG_CTX_D << "SL_getTimeStrFTimeIStream() url:" << c->getURL() << endl; +// return getTimeStrFTimeStream( c, attr ); +// } + + fh_stringstream + Context::SL_getTimeStrFTimeIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "SL_getTimeStrFTimeIOStream() url:" << c->getURL() << endl; + return getTimeStrFTimeStream( c, rdn, atom ); + } + + void + Context::SL_setTimeStrFTimeStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string s; + getline( ss, s ); + + LG_CTX_D << "SL_setTimeStrFTimeStream() url:" << c->getURL() + << " new data:" << s + << endl; + + if( !s.length() ) + return; + + /* + * This is set to either the current time or to a specific value and + * used after the if/else to set the time. + */ + time_t tt = -1; + + if( string::npos != s.find('%') ) + { + Time::setDefaultTimeFormat( s ); + return; + } + else if( isTrue(s) ) + { + tt = Time::getTime(); + + LG_CTX_D << "SL_setTimeStrFTimeStream() setting time" + << " for:" << rdn + << " to current time:" << tt + << endl; + } + else + { + LG_CTX_D << "SL_setTimeStrFTimeStream() setting time" + << " for:" << rdn + << " to:" << s + << endl; + + try + { + struct tm tm = Time::ParseTimeString( s, Time::getDefaultTimeFormat() ); + Time::FreshenTime( tm ); + tt = mktime( &tm ); + } + catch( BadlyFormedTimeString& e ) + { + fh_stringstream ss; + ss << "Can not parse given time:" << s + << " for updating time attribute:" << rdn + << " on url:" << c->getURL(); + cerr << tostr(ss); + Throw_BadlyFormedTimeString( tostr(ss), c ); + } + } + + if( tt == -1 ) + { + fh_stringstream ss; + ss << "Can not parse given time:" << s + << " for updating time attribute:" << rdn + << " on url:" << c->getURL(); + LG_CTX_D << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_BadlyFormedTimeString( tostr(ss), c ); + } + +// fh_stringstream ss; +// ss << tt << flush; + string eaname = getBaseEAName( "-display", c, rdn ); +// setStrAttr( c, eaname, tostr(ss) ); + LG_CTX_D << "SL_setTimeStrFTimeStream() setting time" + << " for:" << rdn + << " eaname:" << eaname + << " time_t:" << tt + << endl; + + { + fh_attribute a = c->getAttribute( eaname ); + fh_iostream oss = a->getIOStream(); + oss << tt << flush; + } + LG_CTX_D << "SL_setTimeStrFTimeStream(DONE) setting time" + << " for:" << rdn + << " eaname:" << eaname + << " time_t:" << tt + << endl; + + + + } + + + static fh_istream + SL_getUserOwnerNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + string eaname = getBaseEAName( "-name", c, rdn ); + eaname+="-number"; + uid_t uid = toType( getStrAttr( c, eaname, "-1" )); + ss << Shell::getUserName( uid ); + return ss; + } + + static fh_istream + SL_getGroupOwnerNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string eaname = getBaseEAName( "-name", c, rdn ); + eaname+="-number"; + gid_t gid = toType( getStrAttr( c, eaname, "-1" )); + ss << Shell::getGroupName( gid ); + return ss; + } + + static fh_istream + SL_getGroupOwnerNameFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string DefaultGroupID = tostr( Shell::getGroupID() ); + string DefaultGroupName = Shell::getGroupName(Shell::getGroupID()); + ss << DefaultGroupName; + return ss; + } + static fh_istream + SL_getGroupOwnerNumberFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string DefaultGroupID = tostr( Shell::getGroupID() ); + string DefaultGroupName = Shell::getGroupName(Shell::getGroupID()); + ss << DefaultGroupID; + return ss; + } + static fh_istream + SL_getUserOwnerNumberFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string DefaultUserID = tostr( Shell::getUserID() ); + string DefaultUserName = Shell::getUserName(Shell::getUserID()); + ss << DefaultUserID; + return ss; + } + static fh_istream + SL_getUserOwnerNameFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string DefaultUserID = tostr( Shell::getUserID() ); + string DefaultUserName = Shell::getUserName(Shell::getUserID()); + ss << DefaultUserName; + return ss; + } + static fh_istream + SL_getINodeFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + static int fakeINode = 1; + ++fakeINode; + ss << fakeINode; + return ss; + } + static fh_istream + SL_getMTimeFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << Time::getTime(); + return ss; + } + static fh_istream + SL_getProtectionLsFuzzStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "-rw-------"; + return ss; + } + + + + static fh_istream + SL_getCurrentTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << Time::getTime(); + return ss; + } + + +fh_iostream +Context::SL_getAsRDF( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + c->getAsRDFXML( ss ); + return ss; +} + +fh_stringstream& +Context::getAsRDFXML( fh_stringstream& ss ) +{ + // make sure we don't try to read an attribute which + // tries to read the as-rdf attribute itself, if this + // ever happens then its an infinate loop. + static bool inside_getAsRDFXML = false; + if( inside_getAsRDFXML ) + return ss; + Util::ValueRestorer< bool > dummy_x1( inside_getAsRDFXML, true ); + + RDFCore::fh_model m = RDFCore::Model::MemoryOnlyModel(); + RDFCore::fh_node thisURI = RDFCore::Node::CreateURI( getURL() ); + + AttributeCollection::AttributeNames_t an; + getAttributeNames( an ); + + for( AttributeCollection::AttributeNames_t::iterator iter = an.begin(); + iter != an.end(); iter++ ) + { + std::string rdn = *iter; + + if( rdn == "as-rdf" || rdn == "as-xml" || rdn == "content" + || rdn == "as-text" || starts_with( rdn, "exif:thumbnail") ) + continue; + + try + { + RDFCore::fh_node pred = RDFCore::Node::CreateURI( RDFCore::RDF_FERRIS_BASE + "/" + rdn ); + try + { + std::string val = getStrAttr( this, rdn, "", true, true ); + m->insert( thisURI, pred, RDFCore::Node::CreateLiteral( val ) ); + } + catch( exception& e ) + { + fh_stringstream ess; + ess << "Error reading attribute:" << rdn + << " e:" << e.what() + << endl; + RDFCore::fh_node pred = RDFCore::Node::CreateURI( RDFCore::RDF_FERRIS_BASE + "/error/" + rdn ); + m->insert( thisURI, pred, RDFCore::Node::CreateLiteral( tostr(ess) ) ); + } + } + catch( exception& e ) + { + continue; + } + + } + + m->write( ss ); + return ss; +} + + + + /** + * VFS rename method. + * + * @returns The new fh_context or throws an exception explaining why the rename failed. + */ + fh_context + Context::priv_rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems, + bool OverWriteDstIfExists ) + { + fh_stringstream ss; + ss << "Rename method not overriden in subclass. This VFS module is defective." + << " url:" << getURL(); + Throw_RenameFailed( tostr(ss), this ); + } + + /** + * Public API: This method moves a child context to another location. Note that + * the new location can be either in the same context or can be at any new location. + * + * An attempt is made to perform the move operation using the underlying module, + * and if that fails and TryToCopyOverFileSystems is true then an attempt to + * copy the data across filesystems and then delete the original is performed. + * + * If OverWriteDstIfExists is true then the data at the destination is replaced with + * the contents of the context at rdn. + * + * So to rename the following /dir1/file1 to /dir1/file1.old + * this=dir1, rdn=file1, and newPath = file1.old + * + * @returns a handle to the context that was renamed, note that the returned + * context may be on a completely different filesystem than the original. + * + * @param rdn the name of the subcontext to rename + * @param newPath New path for the context given by rdn to have. + * @param TryToCopyOverFileSystems If the new path is on a different filesystem + * then try to copy this context to that location and then remove the original + * @param OverWriteDstIfExists Overwrite the contents of a context at newPath if there + * is data already at that location. + * + */ + fh_context Context::rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems, + bool OverWriteDstIfExists ) + { + LG_CTX_D << "Context::rename(1) rdn:" << rdn + << " newPath:" << newPath + << " TryToCopyOverFileSystems:" << TryToCopyOverFileSystems + << " OverWriteDstIfExists:" << OverWriteDstIfExists + << endl; + + LG_CTX_D << "rename(1.0) currentPath:" << getDirPath() << endl; + + if( !HaveReadDir ) + { + read(); + } + + if( getOverMountContext() != this ) + { + return getOverMountContext()->rename( rdn, newPath, + TryToCopyOverFileSystems, + OverWriteDstIfExists ); + } + + LG_CTX_D << "rename(3.0)" << endl; + LG_CTX_D << "rename(3.0) newPath:" << newPath << endl; + LG_CTX_D << "rename(3.0) currentDir:" << getDirName() << endl; + LG_CTX_D << "rename(3.0) currentPath:" << getDirPath() << endl; + LG_CTX_D << "rename(3.0) final" << endl; + + /* + * Make sure we don't try to overwrite anything we are not told to + */ + string fullNewPath = appendToPath( getDirPath(), newPath, true ); + if( !OverWriteDstIfExists && Shell::contextExists( fullNewPath ) ) + { + fh_stringstream ss; + ss << "Rename failed because destination already exists " + << " URL:" << getURL() + << " src:" << rdn << " dst:" << newPath; + Throw_RenameFailed( tostr(ss), this ); + } + + if( !TryToCopyOverFileSystems && !supportsRename() ) + { + fh_stringstream ss; + ss << "Rename not supported by underlying VFS and told not to try to " + << "copy the data and then remove source data. URL:" << getURL() + << endl; + Throw_RenameFailed( tostr(ss), this ); + } + + /* + * Try for optimized rename + */ + if( supportsRename() ) + { + try + { + LG_CTX_D << "Context::rename(2) rdn:" << rdn + << " newPath:" << newPath + << " TryToCopyOverFileSystems:" << TryToCopyOverFileSystems + << " OverWriteDstIfExists:" << OverWriteDstIfExists + << endl; +// cerr << "Context::rename(2) url:" << getURL() +// << " rdn:" << rdn +// << " newPath:" << newPath +// << " TryToCopyOverFileSystems:" << TryToCopyOverFileSystems +// << " OverWriteDstIfExists:" << OverWriteDstIfExists +// << endl; + + fh_context ret = priv_rename( rdn, newPath, + TryToCopyOverFileSystems, + OverWriteDstIfExists ); + return ret; + } + catch( exception& e ) + { + LG_CTX_D << "Context::rename() short cut rename failed, e:" << e.what() <copyTo( fullNewPath, OverWriteDstIfExists ); + +// fh_context parent_newc = Resolve( newPath, RESOLVE_PARENT ); +// string newrdn = newPath; +// if( string::npos != newPath.rfind( "/" ) ) +// { +// newrdn = newPath.substr( newPath.rfind( "/" )+1 ); +// } +// fh_context newc = Shell::CreateFile( parent_newc, newrdn ); + +// { +// fh_iostream oss = newc->getIOStream(); +// fh_istream iss = oldc->getIStream(); + +// LG_CTX_D << "---------Start copy-----------" << endl; +// LG_CTX_D << " oss is good():"<< oss->good() << endl; +// copy( istreambuf_iterator(iss), +// istreambuf_iterator(), +// ostreambuf_iterator(oss)); + +// // if( iss->eof() ) cerr << "Done." << endl; +// // else cerr << "Error." << endl; + +// LG_CTX_D << " iss is good():"<< iss->good() << endl; +// LG_CTX_D << " iss is eof():"<< iss->eof() << endl; +// LG_CTX_D << " oss is good():"<< oss->good() << endl; +// LG_CTX_D << " iss is state:"<< iss->rdstate() << endl; +// LG_CTX_D << " oss is state:"<< oss->rdstate() << endl; + +// char xch; +// iss >> xch; +// if( !iss->eof() ) +// { +// LG_CTX_I << "Failed to copy file, URL: " << getURL() +// << " src:" << rdn +// << endl; +// fh_stringstream ss; +// ss << "Failed to copy file, URL: " << getURL() +// << " src:" << rdn; +// Throw_RenameFailed( tostr(ss), this ); +// } + +// } + + try + { + remove( oldc ); + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Rename failed. url:" << getURL() + << " AFTER CREATING COPY OF SRC, can not remove source context src:" << rdn + << " remove error:" << e.what() + << endl; + Throw_RenameFailed( tostr(ss), this ); + } + + return newc; + } + + + /** + * Copy this context to the location newPath, optionally replace the new context + * data if it exists + */ + fh_context + Context::copyTo( const std::string& newPath, bool OverWriteDstIfExists ) + { + fh_context parent_newc = Resolve( newPath, RESOLVE_PARENT ); + string newrdn = newPath; + if( string::npos != newPath.rfind( "/" ) ) + { + newrdn = newPath.substr( newPath.rfind( "/" )+1 ); + } + +// cerr << "Context::copyTo() newPath:" << newPath << " newrdn:" << newrdn +// << " this:" << getURL() +// << " parent_newc:" << parent_newc->getURL() +// << endl; + + if( !OverWriteDstIfExists && parent_newc->isSubContextBound( newrdn ) ) + { + fh_stringstream ss; + ss << "Copy failed because new context exists and we are not overwriting." + << " URL:" << getURL() + << " newPath:" << newPath; + Throw_ContextExists( tostr(ss), this ); + } + + fh_context newc = Shell::CreateFile( parent_newc, newrdn ); + fh_iostream oss = newc->getIOStream( ios::trunc | ios::out ); + Attribute::copyTo( oss ); + + return newc; + } + + + + /** + * If this context supports the remove operation then override this method + * and return true; + */ + bool Context::supportsRemove() + { + return false; + } + + /** + * VFS method to actaully remove the subcontext given from disk or persistent + * storage. Note that this method does not need to call Remove() or any other + * ferris related methods, it simply makes the subcontext not exist on external + * storage and returns or throws and exception to prevent the subcontext from + * being removed. + */ + void Context::priv_remove( fh_context c ) + { + fh_stringstream ss; + ss << "VFS does not support remove() operation. " + << "Can not delete c:" << c->getURL() + << endl; + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + + /** + * Public API to remove a subcontext from existance both in RAM and + * on disk. + */ + void Context::remove( const std::string& rdn ) + { + if( !priv_isSubContextBound( rdn ) ) + { + if( !ReadingDir ) + read(); + } + return remove( getSubContext( rdn ) ); + } + +// void Context::removeSelf() +// { +// fh_context c = this; +// if( isParentBound() ) +// getParent()->remove( c ); +// } + + + /** + * Public API to remove a subcontext from existance both in RAM and + * on disk. + */ + void Context::remove( fh_context c ) + { + if( getOverMountContext() != this ) + { + return getOverMountContext()->remove( c ); + } + try + { + if( !supportsRemove() ) + { + fh_stringstream ss; + ss << "Can not remove this context, " + << " VFS module does not support removal. " + << "c:" << c->getURL() << endl; + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + + priv_remove( c ); + Remove( c ); + } + catch( exception& e ) + { + throw; + } + } + + + + /** + * VFS called method. This method is here to be called from priv_rename methods + * that for context classes that do not support notification events. + * + * Classes that do support notification events should just return Resolve( newPath ) + * in their priv_rename() methods to indicate success. + * + * Call this method when performing a rename operation to change the internal + * state of ferris to record the new name. Also a moved event is emitted. + * This method should be called after the rename as been performed. + */ + fh_context + Context::contextHasBeenRenamed( const std::string& oldrdn, const std::string& newPath ) + { + fh_context cc = getItem( oldrdn ); + + /* add new location */ + string rdn = newPath; + if( string::npos != newPath.rfind( "/" ) ) + { + rdn = newPath.substr( newPath.rfind( "/" )+1 ); + } + fh_context parent_newc = Resolve( newPath, RESOLVE_PARENT ); +// parent_newc->getItems().insert( cc ); +// fh_context ret = cc; + fh_context ret = parent_newc->priv_readSubContext( rdn, false, true ); + parent_newc->SubContextNamesCacheIsValid = false; + parent_newc->bumpVersion(); + Emit_Moved( 0, oldrdn, newPath, 0 ); + + /* delete child */ + eraseItemByName( getItems(), oldrdn ); +// --NumberOfSubContexts; + SubContextNamesCacheIsValid = false; + bumpVersion(); + + return ret; + } + + + static fh_stringstream + SL_getMimetypeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getMimeType(); + return ss; + } + + static fh_stringstream + SL_getMimetypeFromContentStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( isFalse( getStrAttr( c, "is-special", "0" ))) + ss << c->getMimeType( true ); + return ss; + } + + static fh_stringstream + SL_getFiletypeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << c->getFileType(); + return ss; + } + + + std::string + Context::priv_getMimeType( bool fromContent ) + { +// cerr << "Context::priv_getMimeType fc:" << fromContent +// << " url:" << getURL() +// << endl; + +#ifdef HAVE_KDE + return KDE::getMimeType( this, fromContent ); +#endif + +#ifdef HAVE_GNOMEVFS + + static bool gnome_vfs_init_called = false; + if( !gnome_vfs_init_called ) + { + gnome_vfs_init_called = true; + gnome_vfs_init(); + } + + if( !fromContent ) + { + GnomeVFSFileInfo ginfo; + GnomeVFSResult gres = gnome_vfs_get_file_info( + getDirPath().c_str(), + &ginfo, + GnomeVFSFileInfoOptions( + GNOME_VFS_FILE_INFO_GET_MIME_TYPE | + GNOME_VFS_FILE_INFO_FOLLOW_LINKS | + GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE ) + ); + if( gres == GNOME_VFS_OK ) + { + string typestring = ginfo.mime_type; + return typestring; + } + LG_CTX_D << "Context::priv_getMimeType fc:" << fromContent + << " got error result:" << gres + << endl; + + /* + * See if we can fallback to getting the data from the context itself. + */ + if( gres == GNOME_VFS_ERROR_NOT_A_DIRECTORY ) + { + fromContent = true; + } + else + { + return "unknown"; + } + } + + try + { + + if( fromContent ) + { + const int sz = 4096; + char data[sz+1]; + + fh_istream iss = getIStream(); + iss.read( data, sz ); + + string typestring = gnome_vfs_get_mime_type_for_data( &data, iss.gcount() ); + LG_CTX_D << "Context::priv_getMimeType fc:" << fromContent + << " gcount:" << iss.gcount() + << " typestring:" << typestring + << endl; + + return typestring; + } + } + catch( exception& e ) + { + LG_CTX_W << "got error while looking for mimetype for:" << getURL() + << " e:" << e.what() << endl; + } + return "unknown"; +#endif + +#ifdef HAVE_LIBMAGIC + + { + static int open_flags = MAGIC_SYMLINK | MAGIC_MIME | MAGIC_PRESERVE_ATIME; + static magic_t cookie = 0; + static bool libMagicNotUsable = false; + + if( !libMagicNotUsable ) + { + if( !cookie ) + { +// cerr << "setting up cookie" << endl; + cookie = magic_open( open_flags ); + if( !cookie ) + { + libMagicNotUsable = true; + string emsg = errnum_to_string("Error creating libmagic object", errno ); + cerr << emsg << endl; + } + +// cerr << "setting up cookie db" << endl; + int rc = magic_load( cookie, 0 ); + if( rc == -1 ) + { + libMagicNotUsable = true; + cerr << "Error loading libmagic database! " << magic_error(cookie) << endl; + } + } + + + const char* ret = 0; + if( m_isNativeContext ) + { + string path = getDirPath(); +// cerr << "is native... path:" << getDirPath().c_str() << endl; + ret = magic_file( cookie, path.c_str() ); + } + else + { + const int buffer_sz = 4096; + char buffer[ buffer_sz + 1 ]; + int buffer_valid_length = buffer_sz; + + fh_istream iss = getIStream(); + iss.read( buffer, buffer_sz ); + buffer_valid_length = iss.gcount(); + + ret = magic_buffer( cookie, buffer, buffer_valid_length ); + } + if( ret ) + { + string s = ret; + s = s.substr( 0, s.find(';') ); + return s; + } + } + return "unknown"; + } +#endif + + return ""; + } + + + string + Context::getMimeType( bool fromContent ) + { + string path = getDirPath(); + + if( string::npos != path.find( "/.ego/desktop" )) + { + if( isParentBound() && getParent()->getDirName() == "desktop" ) + { +// if( getHasSubContextsGuess() || begin() != end() ) + if( toint( getStrAttr( this, "is-dir", "0" ))) + { + return "desktop/directory"; + } + } + } + + if( string::npos != path.find( "/.ferris/apps.db" )) + { + return "desktop/application"; + } + +// cerr << "Context::getMimeType fc:" << fromContent +// << " url:" << getURL() +// << endl; + + string mt = priv_getMimeType( fromContent ); + return mt; + } + + + + string + Context::getFileType() + { + return ""; + } + + +/************************************************************/ +/************************************************************/ +/************************************************************/ + +bool +Context::isActiveView() +{ + LG_CTX_D << "Context::isActiveView() earl:" << getURL() + << " fp:" << getForcePassiveView() + << " sm:" << supportsMonitoring() + << " omc:" << OverMountContext_Delegate + << " cc:" << CoveredContext + << endl; + if( getForcePassiveView() ) + return false; + + return supportsMonitoring(); +} + +bool +Context::getForcePassiveView() +{ + if( m_forcePassiveViewCacheIsValid ) + return m_forcePassiveViewCache; + + bool ret = false; + + static Util::SingleShot v; + static boost::regex r; + static bool haveRegex = true; + if( v() ) + { + stringlist_t sl; + string d = getEDBString( FDB_GENERAL, CFG_FORCE_PASSIVE_VIEW_K, CFG_FORCE_PASSIVE_VIEW_DEFAULT ); + if( d.empty() ) + { + haveRegex = false; + } + else + { + sl = Util::parseNullSeperatedList( d ); + r = toregexi( sl ); + } + } + + if( haveRegex ) + { + string url = getURL(); + + if(boost::regex_search( url, r, boost::match_any)) + { + ret = true; + } + } + + m_forcePassiveViewCache = ret; + m_forcePassiveViewCacheIsValid = true; + + return ret; +} + +fh_stringstream +Context::SL_getIsActiveView( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << c->isActiveView(); + return ss; +} + +fh_stringstream +Context::SL_getForcePassiveView( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << c->getForcePassiveView(); + return ss; +} + +fh_stringstream +Context::SL_getIsDir( Context* c, const std::string& rdn, EA_Atom* atom ) +{ +// cerr << "Context::SL_getIsDir()" << endl; + fh_stringstream ss; + ss << c->isDir(); + return ss; +} + +fh_stringstream +Context::SL_getIsDirTryAutoMounting( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + LG_OVERMOUNT_D << "SL_getIsDirTryAutoMounting(0) c.n:" << c->getDirName() << endl; + + bool v = c->isDir(); + LG_OVERMOUNT_D << "SL_getIsDirTryAutoMounting(1.a) c.n:" << c->getDirName() << " v:" << v << endl; + LG_OVERMOUNT_D << "SL_getIsDirTryAutoMounting(1.b) cc:" << isBound( c->CoveredContext ) << endl; + if( !v && isBound( c->CoveredContext ) ) + { + LG_OVERMOUNT_I << "Context::SL_getIsDirTryAutoMounting() have cc. must be an overmount already..." << endl; + v = true; + } + + if( !v && !isBound( c->OverMountContext_Delegate ) ) + { + LG_OVERMOUNT_I << "Context::SL_getIsDirTryAutoMounting() overmounting. c:" << c->getURL() << endl; + + c->tryToOverMount( true ); + v = isBound( c->OverMountContext_Delegate ); + } + + LG_OVERMOUNT_D << "SL_getIsDirTryAutoMounting(2) c.n:" << c->getDirName() << " v:" << v << endl; + fh_stringstream ss; + ss << v; + return ss; +} + + +bool +Context::isDir() +{ +// cerr << "Context::isDir() url:" << getURL() +// << " omc:" << toVoid(OverMountContext_Delegate) +// << " ret:" << (begin() != end()) +// << endl; + + if( isBound(OverMountContext_Delegate) ) + { + return OverMountContext_Delegate->isDir(); + } + +// if( !runningSetUID() ) +// { +// if( getMimeType() == MIMETYPE_DIRECTORY ) +// return true; +// } + + try + { + return begin() != end(); + } + catch( exception& e ) + { + return false; + } +} + + + + fh_stringstream + Context::SL_getOnlyFerrisMetadataCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + time_t tt = 0; + RDFCore::fh_node n = Semantic::tryToGetUUIDNode( c ); + if( n ) + { + time_t rdftt = Semantic::getUUIDNodeModificationTime( n ); + + LG_CTX_D << "SL_getFerrisCTimeStream() c:" << c->getURL() + << " tt:" << tt + << " rdftt:" << rdftt + << endl; + tt = max( tt, rdftt ); + } + fh_stringstream ss; + ss << tt; + return ss; + } + + + fh_stringstream + Context::SL_getFerrisCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_CTX_D << "SL_getFerrisCTimeStream(top) c:" << c->getURL() << endl; + + time_t tt = getTimeAttr( c, "ctime", 0 ); + + LG_CTX_D << "SL_getFerrisCTimeStream() c:" << c->getURL() + << " tt:" << tt + << endl; + + RDFCore::fh_node n = Semantic::tryToGetUUIDNode( c ); + if( n ) + { + time_t rdftt = Semantic::getUUIDNodeModificationTime( n ); + + LG_CTX_D << "SL_getFerrisCTimeStream() c:" << c->getURL() + << " tt:" << tt + << " rdftt:" << rdftt + << endl; + tt = max( tt, rdftt ); + } + + fh_stringstream ss; + ss << tt; + return ss; + } + + fh_stringstream + Context::SL_getFerrisShouldReindexIfNewerStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + time_t tt = getTimeAttr( c, "mtime", 0 ); + LG_CTX_D << "SL_getFerrisCTimeStream(mtime) tt:" << tt << " c:" << c->getURL() << endl; + + static const gchar* LIBFERRIS_ASSUME_NATIVE_FS_CTIME_IS_VOLATILE = g_getenv ("LIBFERRIS_ASSUME_NATIVE_FS_CTIME_IS_VOLATILE"); + if( LIBFERRIS_ASSUME_NATIVE_FS_CTIME_IS_VOLATILE ) + tt = max( tt, getTimeAttr( c, "only-ferris-metadata-ctime", 0 ) ); + else + tt = max( tt, getTimeAttr( c, "ferris-ctime", 0 ) ); + + LG_CTX_D << "SL_getFerrisCTimeStream(ret) tt:" << tt << " c:" << c->getURL() << endl; + fh_stringstream ss; + ss << tt; + return ss; + } + + + + + fh_istream + Context::SL_getFollowLinkAsFerrisFSSizeStream( + Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string realpath = getStrAttr( c, "link-target", "" ); + + LG_CTX_D << "realpath:" << realpath << endl; + + + if( realpath.empty() ) + ss << getStrAttr( c, "size", "0" ); + else + { + fh_context r = Resolve( realpath ); + ss << getStrAttr( r, "follow-link-as-ferris-fs-size", "0" ); + } + return ss; + } + + +fh_stringstream +Context::SL_hasEmblem( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_etagere et = Factory::getEtagere(); + + string emblemName; + fh_emblem em = 0; + if( starts_with( rdn, EANAME_SL_EMBLEM_ID_PREKEY ) ) + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_ID_PREKEY.length() ); + em = et->getEmblemByID( toint(emblemName) ); + } + else + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_PREKEY.length() ); + em = et->getEmblemByName( emblemName ); + } + + fh_medallion med = c->getMedallion(); + + LG_CTX_D << "SL_hasEmblem() c:" << c->getURL() + << " em:" << em->getName() + << " ret:" << med->hasEmblem( em ) + << endl; + + fh_stringstream ss; + ss << med->hasEmblem( em ); + return ss; +} + + void + Context::SL_hasEmblemStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string s = StreamToString( ss ); + bool v = isTrue(s); + fh_etagere et = Factory::getEtagere(); + + string emblemName; + fh_emblem em = 0; + if( starts_with( rdn, EANAME_SL_EMBLEM_ID_PREKEY ) ) + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_ID_PREKEY.length() ); + em = et->getEmblemByID( toint(emblemName) ); + } + else + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_PREKEY.length() ); + em = et->getEmblemByName( emblemName ); + } + + fh_medallion med = c->getMedallion(); + + LG_CTX_D << "SL_hasEmblemClosed() c:" << c->getURL() + << " em:" << em->getName() + << " v:" << v + << endl; + med->ensureEmblem( em, v ); + } + + + +fh_stringstream +Context::SL_hasEmblemFuzzy( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + string emblemName; + fh_etagere et = Factory::getEtagere(); + fh_emblem em = 0; + if( starts_with( rdn, EANAME_SL_EMBLEM_ID_FUZZY_PREKEY ) ) + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_ID_FUZZY_PREKEY.length() ); + em = et->getEmblemByID( toint(emblemName) ); + } + else + { + emblemName = rdn.substr( EANAME_SL_EMBLEM_FUZZY_PREKEY.length() ); + em = et->getEmblemByName( emblemName ); + } + fh_medallion med = c->getMedallion(); + + LG_CTX_D << "SL_hasEmblemFuzzy() c:" << c->getURL() + << " em:" << em->getName() + << " ret:" << med->hasEmblem( em ) + << endl; + + fh_stringstream ss; + ss << med->getFuzzyBelief( em ); + return ss; +} + +fh_stringstream +Context::SL_getEmblemTime( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + static int rdn_soffset = EANAME_SL_EMBLEM_TIME_PREKEY.length(); + int rdn_eoffset = rdn.rfind('-'); + if( rdn_eoffset != string::npos ) + rdn_eoffset -= rdn_soffset; + + fh_stringstream ss; + string emblemName = rdn.substr( rdn_soffset, rdn_eoffset ); + fh_etagere et = Factory::getEtagere(); + fh_emblem em = et->getEmblemByName( emblemName ); + fh_medallion med = c->getMedallion(); + +// cerr << "SL_getEmblemTime c:" << c->getURL() << " mtime:" << med->getEmblemTimes( em )->getMTime() << endl; + + if( med->hasBelief( em ) ) + { + fh_medallionBelief bel = med->getBelief( em ); + fh_times t = bel->getTimes(); + if( t ) ss << t->getMTime(); + else ss << 0; + } + else + { + ss << 0; + } + + + return ss; + +} + +fh_stringstream +Context::SL_getEmblemList( int cutoff, Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_etagere et = Factory::getEtagere(); + fh_medallion med = c->getMedallion(); + emblems_t el = med->getMostSpecificEmblems( Emblem::limitedViewPri_t( cutoff ) ); + stringlist_t stringli; + + for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + stringli.push_back( (*ei)->getUniqueName() ); + stringli.sort(); + + fh_stringstream ss; + ss << Util::createCommaSeperatedList( stringli ); + return ss; +} + +fh_stringstream +Context::SL_getEmblemListAll( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getEmblemList( Emblem::LIMITEDVIEW_PRI_LOW, c, rdn, atom ); +} + +fh_stringstream +Context::SL_getEmblemListDefault( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getEmblemList( Emblem::LIMITEDVIEW_PRI_USER_CONFIG, c, rdn, atom ); +} + + + +fh_stringstream +Context::SL_getEmblemUpset( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_etagere et = Factory::getEtagere(); + fh_medallion med = c->getMedallion(); + emblems_t el = med->getAllEmblems(); + stringlist_t stringli; + + for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + stringli.push_back( (*ei)->getUniqueName() ); + stringli.sort(); + + fh_stringstream ss; + ss << Util::createCommaSeperatedList( stringli ); + return ss; +} + +fh_stringstream +Context::SL_getHasMedallion( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + uid_t uid = Shell::getUserID(); + string eaname = string("medallion.") + tostr(uid); + fh_stringstream ret; + ret << c->isAttributeBound( eaname, true ); +// ret << 0; + return ret; +} + + + +fh_stringstream +Context::SL_getLanguageHuman( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; +#ifdef HAVE_LIBTEXTCAT + + const int buffer_sz = 4096; + char buffer[ buffer_sz + 1 ]; +// fh_istream iss = c->getIStream(); + try + { + fh_attribute a = c->getAttribute("as-text"); + fh_istream iss = a->getIStream( ios::in ); + if( iss.read( buffer, buffer_sz ) ) + { +// cerr << "Classify count:" << iss->gcount() << endl; +// cerr.write( buffer, iss->gcount() ); + void* h = textcat_Init( "/etc/libtextcat.conf" ); + ss << textcat_Classify( h, buffer, iss->gcount() ); + textcat_Done(h); + } + else + ss << "unknown"; + } + catch( exception& e ) + { + ss << "unknown"; + } + + +#endif + return ss; +} + +fh_stringstream +Context::SL_getNothingStream( Context* c,const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + return ss; +} + +fh_stringstream +Context::SL_getStreamWithNumberOneStream( Context* c,const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << 1; + return ss; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static string toBranchPath( Context* c ) +{ + fh_stringstream ss; + + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + FerrisURL u = FerrisURL::fromString( c->getURL() ); + ss << u.getScheme() << "/" << trimmer( u.getPath() ); + return tostr(ss); +} + +#ifdef FERRIS_HAVE_GPGME + +static fh_istream +SL_hasValidSignature( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + try + { + string filename = c->getDirName(); + if( ends_with( filename, ".gpg" ) + || + ( c->isParentBound() && c->getParent()->priv_isSubContextBound( filename+".sig" ) ) + ) + { + ss << hasValidSignature( getGPGMEContextSingleton(), c ); + } + else + { + ss << 0; + } + } + catch( exception& e ) + { +// cerr << "SL_hasValidSignature() e:" << e.what() << endl; +// throw; + ss << 0; + } + return ss; +} + + +static fh_istream +SL_getSignaturesURL( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-gpg-signatures://" << toBranchPath( c ) << endl; + return ss; +} + +#endif + + + + +static fh_istream +SL_getAttributesBranch( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-attributes://" << toBranchPath( c ) << endl; + return ss; +} + +static fh_istream +SL_getParentsBranch( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-parents://" << toBranchPath( c ) << endl; + return ss; +} + +static fh_istream +SL_getMedallionsBranch( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-medallions://" << toBranchPath( c ) << endl; + return ss; +} + + static fh_istream + SL_getRemembranceBranch( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "branchfs-remembrance://" << toBranchPath( c ) << endl; + return ss; + } + + + + +static fh_istream +SL_getAssociatedBranches( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-attributes,branchfs-medallions,branchfs-parents,branchfs-remembrance"; + +#ifdef FERRIS_HAVE_XFSPROGS + ss << ",branchfs-extents"; +#endif +#ifdef FERRIS_HAVE_GPGME + ss << ",branchfs-signatures"; +#endif + + return ss; +} + +static fh_istream +SL_getAssociatedBranchesURL( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branches://" << toBranchPath( c ) << endl; + return ss; +} + +#ifdef FERRIS_HAVE_XFSPROGS +static fh_istream +SL_getExtentsBranch( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << "branchfs-extents://" << toBranchPath( c ) << endl; + return ss; +} +#endif + + static fh_emblem getGeospatialEmblem( fh_medallion med ) + { + fh_etagere et = Factory::getEtagere(); + fh_emblem geospatialem = et->getEmblemByName( "libferris-geospatial" ); + + emblems_t el = med->getMostSpecificEmblems( Emblem::LIMITEDVIEW_PRI_LOW ); + for( emblems_t::const_iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + emblems_t pl = em->getUpset(); + if( find( pl.begin(), pl.end(), geospatialem ) != pl.end() ) + { + return em; + } + } + return 0; + } + + static pair< double, double > + getLatLong( fh_emblem em ) + { + return make_pair( em->getDigitalLatitude(), em->getDigitalLongitude() ); +// stringstream ss; +// ss << em->getDescription(); +// double lat = 0, lon = 0; +// ss >> lat; +// ss >> lon; +// return make_pair( lat, lon ); + } + + static fh_iostream + SL_getLatitudeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + double v = 0.0; + + fh_stringstream ss; + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { + v = getLatLong( em ).first; + ss.precision(12); + ss << v; + } + else + { + if( c->isAttributeBound( rdn + "-kea" ) ) + ss << getStrAttr( c, rdn + "-kea", "0" ); + else + { + string xrdn = (string)"exif:gps-" + rdn; + ss << getStrAttr( c, xrdn, "0" ); + } + } + return ss; + } + + + static void + SL_LatitudeStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + double v = 0.0; + ss >> v; + setStrAttr( c, rdn + "-kea", toString(v), 1 ); + } + + + + static fh_iostream + SL_getLongitudeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + double v = 0.0; + + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { + v = getLatLong( em ).second; + } + else + { + if( c->isAttributeBound( rdn + "-kea" ) ) + v = toType( getStrAttr( c, rdn + "-kea", "0" ) ); + else + { + string xrdn = (string)"exif:gps-" + rdn; + v = toType( getStrAttr( c, xrdn, "0" ) ); + } + } + fh_stringstream ss; + ss << v; + return ss; + } + + static void + SL_LongitudeStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + double v = 0.0; + ss >> v; + setStrAttr( c, rdn + "-kea", toString(v), 1 ); + } + + + static fh_istream + SL_getGeoSpatialRangeStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + double v = 0.0; + + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { + v = em->getZoomRange(); + } + fh_stringstream ss; + ss << v; + return ss; + } + + + static fh_istream + SL_getGeoSpatialEmblemNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + string v = ""; + + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { + v = em->getName(); + } + fh_stringstream ss; + ss << v; + return ss; + } + + static fh_istream + SL_getGeoSpatialEmblemIDStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + int v = 0; + + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { + v = em->getID(); + } + fh_stringstream ss; + if( v ) + ss << v; + return ss; + } + + + + static fh_istream + SL_getGoogleMapsLocationStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_emblem em = getGeospatialEmblem( c->getMedallion() ); + if( em ) + { +// ss << em->getDescription(); + ss << em->getDigitalLatitude() << "," << em->getDigitalLongitude(); + string d = em->getDescription(); + if( !d.empty() ) + ss << " (" << d << ")"; + } + return ss; + } + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + void + Context::supplementFerrisLinkTargetFromAbsolute() + { + string attr = "link-target"; + + if( isAttributeBound( "link-target-relative", false ) + && !isAttributeBound( attr, false ) ) + { + addAttribute( attr, this, + &Context::getFerrisLinkTargetAbsoluteStream, + FXD_URL, false ); + } + + attr = "is-broken-link"; + if( isAttributeBound( "link-target-relative", false ) + && !isAttributeBound( attr, false ) ) + { + LG_NATIVE_D << "Adding is-broken-link" << endl; + addAttribute( attr, this, + &Context::getFerrisIsBrokenLinkStream, + XSD_BASIC_BOOL, false ); + } + + } + + fh_istream + Context::getFerrisIsBrokenLinkStream( Context*, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + bool v = isTrue( getStrAttr( this, "dontfollow-is-link", "0" )); + if( v ) + { + string p = getStrAttr( this, "link-target", "" ); + v = p.empty(); + } + ss << v; + return ss; + } + + fh_istream + Context::getFerrisLinkTargetAbsoluteStream( Context*, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + + string earl = getURL(); + string lt = getStrAttr( this, "link-target-relative", "" ); + if( lt.empty() ) + { + return ss; + } + LG_CTX_D << "SL_getFerrisLinkTargetAbsoluteStream() earl:" << earl << endl; + LG_CTX_D << "SL_getFerrisLinkTargetAbsoluteStream() lt:" << lt << endl; + + + if( isParentBound() ) + { + fh_context p = getParent(); + fh_context target = 0; + + if( !lt.empty() && lt[0] == '/' ) + target = Resolve( lt ); + else + target = p->getRelativeContext( lt ); + ss << target->getURL(); + + LG_CTX_D << "SL_getFerrisLinkTargetAbsoluteStream() p:" << p->getURL() << endl; + LG_CTX_D << "SL_getFerrisLinkTargetAbsoluteStream() target:" << target->getURL() << endl; + } + + return ss; + } +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + static string RDF_NODE_FUNC_PFX() + { + static string pfx = Semantic::getAttrPrefix(); +// static string pfx = ""; + return pfx; + } + +#define RDF_NODE_FUNC( FNAME, URI ) \ + static RDFCore::fh_node FNAME() \ + { \ + static RDFCore::fh_node ret = 0; \ + if( !ret ) \ + { \ + ret = RDFCore::Node::CreateURI( RDF_NODE_FUNC_PFX() + URI ); \ + } \ + return ret; \ + } \ + + +template< class ParentClass > +class Remembrance_Common + : + public ParentClass +{ +public: + typedef ParentClass _Base; + + static fh_node getHistoryNode( const fh_context& c ) + { + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node hn = ParentClass::getHistoryNode(); + + LG_RDF_D << "getHistoryNode() c:" << c->getURL() << endl; + + fh_node ret = 0; + if( fh_node uuidnode = Semantic::tryToGetUUIDNode( c ) ) + { + LG_RDF_D << "getHistoryNode() c:" << c->getURL() + << " uuidnode:" << uuidnode->toString() + << " hn:" << hn->toString() + << endl; + ret = m->getObject( uuidnode, hn ); + if( ret ) + { + LG_RDF_D << "getHistoryNode(have ret) c:" << c->getURL() << endl; + LG_RDF_D << " uuidnode:" << uuidnode->toString() + << " ret:" << ret->toString() + << endl; + } + else + { + LG_RDF_D << "getHistoryNode(!ret) c:" << c->getURL() + << " uuidnode:" << uuidnode->toString() + << endl; + } + } + +// fh_node earlnode = Node::CreateURI( c->getURL() ); +// fh_node ret = 0; +// if( fh_node uuidnode = m->getObject( earlnode, ::Ferris::Semantic::uuidPredNode() ) ) +// { +// ret = m->getObject( uuidnode, hn ); +// } + return ret; + } + + static fh_node ensureHistoryNode( const fh_context& c ) + { + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node hn = ParentClass::getHistoryNode(); + fh_node hsn = m->CreateBlankNode(); + fh_node n = getHistoryNode( c ); + if( !n ) + { + fh_node uuidnode = Semantic::ensureUUIDNode( c ); +// cerr << "ensureHistoryNode c:" << c->getURL() << " uuidnode:" << toVoid(uuidnode) << endl; + m->insert( uuidnode, hn, hsn ); + n = m->getObject( uuidnode, hn ); + } + return n; + } +}; + +struct Remembrance_FileViewHistoryBase +{ + RDF_NODE_FUNC( getHistoryNode, "ferris-file-view-history" ); + RDF_NODE_FUNC( getHistorySubjectNode, "file-view-history" ); + RDF_NODE_FUNC( getCommandNode, "view-command" ); + RDF_NODE_FUNC( getTimeNode, "view-time" ); + RDF_NODE_FUNC( getMostRecentCommandNode, "most-recent-view-command" ); + RDF_NODE_FUNC( getMostRecentTimeNode, "most-recent-view-time" ); + RDF_NODE_FUNC( getMostRecentSubContextsNode, "most-recent-view-sub-contexts" ); +}; +typedef Remembrance_Common< Remembrance_FileViewHistoryBase > Remembrance_FileViewHistory; + + +struct Remembrance_FileEditHistoryBase +{ + RDF_NODE_FUNC( getHistoryNode, "ferris-file-edit-history" ); + RDF_NODE_FUNC( getHistorySubjectNode, "file-edit-history" ); + RDF_NODE_FUNC( getCommandNode, "edit-command" ); + RDF_NODE_FUNC( getTimeNode, "edit-time" ); + RDF_NODE_FUNC( getMostRecentCommandNode, "most-recent-edit-command" ); + RDF_NODE_FUNC( getMostRecentTimeNode, "most-recent-edit-time" ); + RDF_NODE_FUNC( getMostRecentSubContextsNode, "most-recent-edit-sub-contexts" ); +}; +typedef Remembrance_Common< Remembrance_FileEditHistoryBase > Remembrance_FileEditHistory; + + + template + fh_iostream + Context::SL_getIsUnRemembered( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node n = Remembrance::getHistoryNode( c ); + bool ret = !n; + ss << ret; + return ss; + } + + template + void + Context::SL_setIsUnRemembered( Context* c, const std::string& rdn, + EA_Atom* atom, fh_istream ss ) + { + fh_model m = RDFCore::getDefaultFerrisModel(); + string s = StreamToString( ss ); + LG_RDF_D << "Context::SL_setIsUnRemembered() s:" << s << endl; + if( isTrue( s ) ) + { + if( fh_node n = Remembrance::getHistoryNode( c ) ) + { + fh_node hn = Remembrance::_Base::getHistoryNode(); + if( fh_node uuidnode = Semantic::tryToGetUUIDNode( c ) ) + { + // We need to delete this for all files which are sharing the + // same UUID node as they effectively share the same history + // too +// // See how many files are referencing this one uuidnode +// fh_statement q = new Statement(); +// q->setPredicate( Semantic::uuidPredNode() ); +// q->setObject( uuidnode ); +// int refCount = distance( m->findStatements( q ), StatementIterator() ); +// if( refCount == 1 ) +// { +// cerr << "Only a single reference to UUIDNode, removing the history stuff." << endl; +// m->eraseTransitive( n ); +// } + + m->eraseTransitive( n ); + m->erase( uuidnode, hn, n ); + } + } + } + } + + + + template + fh_istream + Context::SL_getLastRememberedSubContexts( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node n = Remembrance::getHistoryNode( c ); + string ret = ""; + if( n ) + { + fh_node node = m->getObject( n, Remembrance::getMostRecentSubContextsNode() ); + if( node ) + { + ret = node->toString(); + } + } + ss << ret; + return ss; + } + + template + fh_istream + Context::SL_getRemembranceTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { +// Time::Benchmark bm( "SL_getRemembranceTime(1) c:" + c->getURL() ); + + fh_stringstream ss; + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node n = Remembrance::getHistoryNode( c ); + string ret = "0"; + if( n ) + { + fh_node node = m->getObject( n, Remembrance::getMostRecentTimeNode() ); + if( node ) + { + ret = node->toString(); + } + } + ss << ret; + return ss; + } + + + template + fh_iostream + Context::SL_getRemembranceCommand( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_node n = Remembrance::getHistoryNode( c ); + string ret = "0"; + if( n ) + { + fh_node node = m->getObject( n, Remembrance::getMostRecentCommandNode() ); + if( node ) + { + ret = node->toString(); + } + } + ss << ret; + return ss; + } + + template + void + Context::SL_setRemembranceCommand( Context* c, + const std::string& rdn, + EA_Atom* atom, fh_istream ss ) + { + fh_model m = RDFCore::getDefaultFerrisModel(); + time_t nowtt = Time::getTime(); + fh_node nownode = Node::CreateLiteral( tostr(nowtt) ); + string cmdstr = StreamToString( ss ); + fh_node cmdnode = Node::CreateLiteral( cmdstr ); + fh_node n = Remembrance::ensureHistoryNode( c ); + + m->insert( n, Remembrance::getCommandNode(), cmdnode ); + m->insert( n, Remembrance::getTimeNode(), nownode ); + + m->set( n, Remembrance::getMostRecentCommandNode(), cmdnode ); + m->set( n, Remembrance::getMostRecentTimeNode(), nownode ); + + if( c->isParentBound() ) + { + stringstream ctxlistss; + ctxlistss << c->getDirName(); + fh_node ctxlistnode = Node::CreateLiteral( ctxlistss.str() ); + fh_context p = c->getParent(); + fh_node pnode = Remembrance::ensureHistoryNode( p ); + m->set( pnode, Remembrance::getMostRecentSubContextsNode(), ctxlistnode ); + } + + m->sync(); + } + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +void +Context::createStateLessAttributesForEmblem( fh_emblem em ) +{ +// fh_etagere et = Factory::getEtagere(); +// fh_emblem eaOrderingRootEM = private_getAttributeRootEmblem( et ); +// const emblems_t& upset = em->getUpset(); +// if( find( upset.begin(), upset.end(), eaOrderingRootEM ) != upset.end() ) +// { +// return; +// } + if( em->isTransitiveChildOfEAOrderingRootEmblem() ) + return; +// if( starts_with( em->getName(), "emblem:" )) +// return; +// if( starts_with( em->getName(), "schema:" )) +// return; + + string eaname = EANAME_SL_EMBLEM_PREKEY + em->getName(); + ContextClass_SLEA( eaname, &_Self::SL_hasEmblem, &_Self::SL_hasEmblem, &_Self::SL_hasEmblemStreamClosed, XSD_BASIC_BOOL ); + eaname = EANAME_SL_EMBLEM_ID_PREKEY + tostr(em->getID()); + ContextClass_SLEA( eaname, &_Self::SL_hasEmblem, &_Self::SL_hasEmblem, &_Self::SL_hasEmblemStreamClosed, XSD_BASIC_BOOL ); + + eaname = EANAME_SL_EMBLEM_FUZZY_PREKEY + em->getName(); + ContextClass_SLEA( eaname, &_Self::SL_hasEmblemFuzzy, XSD_BASIC_DOUBLE ); + eaname = EANAME_SL_EMBLEM_ID_FUZZY_PREKEY + tostr(em->getID()); + ContextClass_SLEA( eaname, &_Self::SL_hasEmblemFuzzy, XSD_BASIC_DOUBLE ); + + eaname = EANAME_SL_EMBLEM_TIME_PREKEY + em->getName() + "-mtime"; + ContextClass_SLEA( eaname, + &_Self::SL_getEmblemTime, + XSDBasic_t(FXD_UNIXEPOCH_T | FXDC_READONLY) ); + supplementStateLessAttributes_timet( eaname ); +} + + static bool OnEmblemCreated_IGNORE_CREATED_EMBLEMS = false; + +void +Context::OnEmblemCreated( fh_etagere et, fh_emblem em ) +{ + LG_CTX_D << "Context::OnEmblemCreated() em:" << em->getName() << endl; + cerr << "Context::OnEmblemCreated() em:" << em->getName() + << " ignore:" << OnEmblemCreated_IGNORE_CREATED_EMBLEMS + << endl; + if( OnEmblemCreated_IGNORE_CREATED_EMBLEMS ) + return; + + createStateLessAttributesForEmblem( em ); +} + +stringset_t& +Context::getContextClassStatelessEANames() +{ + static stringset_t ret; + return ret; +} + +void +Context::ContextClass_SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + XSDBasic_t sct ) +{ + getContextClassStatelessEANames().insert( rdn ); + tryAddStateLessAttribute( rdn, fi, sct ); +} +void +Context::ContextClass_SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct ) +{ + getContextClassStatelessEANames().insert( rdn ); + tryAddStateLessAttribute( rdn, fi, fio, fioc, sct ); +} + + + +void +Context::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + LG_CTX_D << "Context::createStateLessAttributes() path:" << getDirPath() << endl; + + + ContextClass_SLEA( "attribute-count", SL_getAttributeCountStream, XSD_BASIC_INT ); + + ContextClass_SLEA( "name", + SL_getDirNameStream, + SL_getDirNameIOStream, + SL_RenameContext, + XSD_BASIC_STRING ); + ContextClass_SLEA( "parent-name", + SL_getParentDirNameStream, + XSD_BASIC_STRING ); + ContextClass_SLEA( "parent-url", + SL_getParentURLStream, + FXD_URL ); + tryAddStateLessAttribute_Contents( "content", + SL_getContentIStream, SL_getContentIOStream, + FXD_BINARY ); + + + ContextClass_SLEA( "is-dir", &_Self::SL_getIsDir, XSD_BASIC_BOOL ); + ContextClass_SLEA( "is-dir-try-automounting", + &_Self::SL_getIsDirTryAutoMounting, + XSD_BASIC_BOOL ); + + ContextClass_SLEA( "ferris-ctime", + &_Self::SL_getFerrisCTimeStream, + FXD_UNIXEPOCH_T ); + ContextClass_SLEA( "only-ferris-metadata-ctime", + &_Self::SL_getOnlyFerrisMetadataCTimeStream, + FXD_UNIXEPOCH_T ); + ContextClass_SLEA( "ferris-should-reindex-if-newer", + &_Self::SL_getFerrisShouldReindexIfNewerStream, + FXD_UNIXEPOCH_T ); + + ContextClass_SLEA( "follow-link-as-ferris-fs-size", + &_Self::SL_getFollowLinkAsFerrisFSSizeStream, FXD_FILESIZE ); + + + ContextClass_SLEA( "mimetype", SL_getMimetypeStream, FXD_MIMETYPE ); + ContextClass_SLEA( "mimetype-from-content", + SL_getMimetypeFromContentStream, + FXD_MIMETYPE ); +#ifdef HAVE_LIBFILE + ContextClass_SLEA( "filetype", SL_getFiletypeStream, XSD_BASIC_STRING ); +#endif + + ContextClass_SLEA( "treeicon", + SL_getTreeIconStream, FXD_URL_IMPLICIT_RESOLVE ); + + ContextClass_SLEA( "name-extension", SL_getDirNameExtensionStream, XSD_BASIC_STRING ); + ContextClass_SLEA( "path", SL_getDirPathStream, XSD_BASIC_STRING ); + ContextClass_SLEA( "url", SL_getURLStream, FXD_URL ); + ContextClass_SLEA( "recommended-ea", SL_getRecommendedEAStream, FXD_EANAMES ); + ContextClass_SLEA( "recommended-ea-union", + SL_getRecommendedEAUnionStream, + FXD_EANAMES ); + ContextClass_SLEA( "recommended-ea-union-view", + SL_getRecommendedEAUnionViewStream, + FXD_EANAMES ); + ContextClass_SLEA( "recommended-ea-short", + SL_getRecommendedEAShortStream, FXD_EANAMES ); + ContextClass_SLEA( "ea-names", SL_getEANamesStream, FXD_EANAMES ); + ContextClass_SLEA( "ea-names-no-qual", SL_getEANamesNoQualStream, FXD_EANAMES ); + ContextClass_SLEA( "subcontext-count", SL_getSubContextCountStream, XSD_BASIC_INT ); + ContextClass_SLEA( "has-subcontexts-guess", + SL_getHasSubContextsGuessStream, XSD_BASIC_BOOL ); + + ContextClass_SLEA( "recursive-subcontext-count", + SL_getRecursiveSubcontextCountStream, + SL_getRecursiveSubcontextCountIOStream, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + ContextClass_SLEA( "recursive-subcontext-max-depth", + SL_getRecursiveSubcontextMaxDepthIOStream, + SL_getRecursiveSubcontextMaxDepthIOStream, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + ContextClass_SLEA( "is-image-object", SL_getIsImage, XSD_BASIC_BOOL ); + ContextClass_SLEA( "is-animation-object", SL_getIsAnimation, XSD_BASIC_BOOL ); + ContextClass_SLEA( "is-audio-object", SL_getIsAudio, XSD_BASIC_BOOL ); + ContextClass_SLEA( "is-source-object", SL_getIsSource, XSD_BASIC_BOOL ); + + + typedef list digestNames_t; + static digestNames_t digestNames; + if( digestNames.empty() ) + { + digestNames.push_back("md2"); + digestNames.push_back("md5"); + digestNames.push_back("sha1"); + digestNames.push_back("mdc2"); + } + + for( digestNames_t::iterator iter = digestNames.begin(); + iter != digestNames.end(); ++iter ) + { + ContextClass_SLEA( + *iter, + Loki::BindFirst( + Loki::Functor + (SL_getDigestStream), *iter ), + FXD_DIGEST ); + } + +#ifdef FERRIS_HAVE_LIBZ + ContextClass_SLEA( "crc32", SL_getCRC32IStream, FXD_DIGEST ); +#endif + + ContextClass_SLEA( "ferris-current-time", + SL_getFerrisCurrentTimeIStream, + FXD_UNIXEPOCH_T ); + + ContextClass_SLEA( "download-if-mtime-since", + SL_getDownloadIfMTimeSinceIStream, + SL_getDownloadIfMTimeSinceIOStream, + SL_downloadIfMTimeSinceClosed, + FXD_UNIXEPOCH_T ); + ContextClass_SLEA( "is-remote", SL_getIsRemote, XSD_BASIC_BOOL ); + + + ContextClass_SLEA( "as-xml", + SL_getAsXML, SL_getAsXML, + SL_getAsXMLClosed, FXD_XMLDOCSTRING ); + ContextClass_SLEA( "as-text", SL_getAsText, XSD_BASIC_STRING ); + ContextClass_SLEA( "as-rdf", SL_getAsRDF, FXD_XMLDOCSTRING ); + + + ContextClass_SLEA( "is-active-view", &_Self::SL_getIsActiveView, XSD_BASIC_BOOL ); + ContextClass_SLEA( "force-passive-view", &_Self::SL_getForcePassiveView, XSD_BASIC_BOOL ); + + fh_etagere et = Factory::getEtagere(); + try + { +// emblems_t emlist = et->getAllEmblemsUniqueName(); + +// for( emblems_t::iterator ei = emlist.begin(); ei != emlist.end(); ++ei ) +// { +// fh_emblem em = *ei; +// createStateLessAttributesForEmblem( em ); +// } + et->visitAllEmblems( + Etagere::f_emblemVisitor( this, &_Self::createStateLessAttributesForEmblem ) ); + } + catch( exception& e ) + { + LG_CTX_W << "Problem adding stateless ea for emblems:" << e.what() << endl; + } + et->getEmblemCreated_Sig().connect( sigc::mem_fun( *this, &_Self::OnEmblemCreated )); + + ContextClass_SLEA( "emblem:list", &_Self::SL_getEmblemListAll, FXD_STRINGLIST ); + ContextClass_SLEA( "emblem:list-ui", &_Self::SL_getEmblemListDefault, FXD_STRINGLIST ); + ContextClass_SLEA( "emblem:upset", &_Self::SL_getEmblemUpset, FXD_STRINGLIST ); + ContextClass_SLEA( "emblem:has-medallion", &_Self::SL_getHasMedallion, XSD_BASIC_BOOL ); + +#ifdef HAVE_LIBTEXTCAT + ContextClass_SLEA( "language-human", &_Self::SL_getLanguageHuman, XSD_BASIC_STRING ); +#endif + +#ifdef FERRIS_HAVE_GPGME + ContextClass_SLEA( "has-valid-signature", SL_hasValidSignature, XSD_BASIC_BOOL ); + ContextClass_SLEA( "branchfs-signatures", + SL_getSignaturesURL, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); +#endif + + ContextClass_SLEA( "branchfs-attributes", + SL_getAttributesBranch, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + ContextClass_SLEA( "branchfs-parents", + SL_getParentsBranch, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + ContextClass_SLEA( "branchfs-medallions", + SL_getMedallionsBranch, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + ContextClass_SLEA( "branchfs-remembrance", + SL_getRemembranceBranch, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + ContextClass_SLEA( "associated-branches", + SL_getAssociatedBranches, + FXD_URLLIST ); + ContextClass_SLEA( "associated-branches-url", + SL_getAssociatedBranchesURL, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + +#ifdef FERRIS_HAVE_XFSPROGS + ContextClass_SLEA( "branchfs-extents", + SL_getExtentsBranch, + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ); + +#endif + + ContextClass_SLEA( "latitude", + SL_getLatitudeStream, + SL_getLatitudeStream, + SL_LatitudeStreamClosed, + FXD_LATITUDE ); + ContextClass_SLEA( "longitude", + SL_getLongitudeStream, + SL_getLongitudeStream, + SL_LongitudeStreamClosed, + FXD_LONGITUDE ); + ContextClass_SLEA( "geospatial-range", SL_getGeoSpatialRangeStream, XSD_BASIC_DOUBLE ); + ContextClass_SLEA( "geospatial-emblem-name", + SL_getGeoSpatialEmblemNameStream, + XSD_BASIC_STRING ); + ContextClass_SLEA( "geospatial-emblem-id", + SL_getGeoSpatialEmblemIDStream, + XSD_BASIC_INT ); + ContextClass_SLEA( "google-maps-location", SL_getGoogleMapsLocationStream, XSD_BASIC_STRING ); + + + // + // EA for handling which files in a collection have been seen and when + // + ContextClass_SLEA( "is-unseen", + SL_getIsUnRemembered, + SL_getIsUnRemembered, + SL_setIsUnRemembered, + XSD_BASIC_BOOL ); + ContextClass_SLEA( "last-viewed-subcontexts", + SL_getLastRememberedSubContexts, + XSD_BASIC_STRING ); + ContextClass_SLEA( "file-view-time", + SL_getRemembranceTime, + FXD_UNIXEPOCH_T ); + ContextClass_SLEA( "file-view-command", + SL_getRemembranceCommand, + SL_getRemembranceCommand, + SL_setRemembranceCommand, + XSD_BASIC_STRING ); + + ContextClass_SLEA( "is-unedited", + SL_getIsUnRemembered, + XSD_BASIC_BOOL ); + ContextClass_SLEA( "last-edited-subcontexts", + SL_getLastRememberedSubContexts, + XSD_BASIC_STRING ); + ContextClass_SLEA( "file-edit-time", + SL_getRemembranceTime, + FXD_UNIXEPOCH_T ); + ContextClass_SLEA( "file-edit-command", + SL_getRemembranceCommand, + SL_getRemembranceCommand, + SL_setRemembranceCommand, + XSD_BASIC_STRING ); + + + ContextClass_SLEA( "ferris-post-copy-action", + SL_getFerrisPostCopyActionStream, + SL_getFerrisPostCopyActionStream, + SL_FerrisPostCopyActionStreamClosed, + XSD_BASIC_STRING ); + ContextClass_SLEA( "ferris-pre-copy-action", + SL_getFerrisPreCopyActionStream, + SL_getFerrisPreCopyActionStream, + SL_FerrisPreCopyActionStreamClosed, + XSD_BASIC_STRING ); + + ContextClass_SLEA( "subtitles", SL_getSubtitlesStream, XSD_BASIC_STRING ); + + ContextClass_SLEA( "video-format", SL_getDotEAStream, XSD_BASIC_STRING ); + ContextClass_SLEA( "audio-format", SL_getDotEAStream, XSD_BASIC_STRING ); + ContextClass_SLEA( "video-profile", SL_getDotEAStream, XSD_BASIC_STRING ); + ContextClass_SLEA( "audio-profile", SL_getDotEAStream, XSD_BASIC_STRING ); + + + LG_CTX_D << "setting up context stateless EA (done) " << endl; + } + } + + void + Context::supplementStateLessAttributes_size( std::string an ) + { + if( isAttributeBound( an, false ) ) + { + string rdn = an + "-human-readable"; + if( !isAttributeBound( rdn, false ) ) + { + tryAddStateLessAttribute( rdn, SL_getSizeHumanReadableStream, XSD_BASIC_STRING ); + } + } + if( isAttributeBound( an, false ) ) + { + string rdn = an + CFG_CDROM_SIZE_BYTES_EA_POSTFIX; + if( !isAttributeBound( rdn, false ) ) + { + tryAddStateLessAttribute( + rdn, + SL_getSizeMediaCountStream< + CFG_CDROM_SIZE_BYTES_K, + CFG_CDROM_SIZE_BYTES_DEFAULT, + CFG_CDROM_SIZE_BYTES_EA_POSTFIX >, + XSD_BASIC_DOUBLE ); + } + } + if( isAttributeBound( an, false ) ) + { + string rdn = an + CFG_DVD_SIZE_BYTES_EA_POSTFIX; + if( !isAttributeBound( rdn, false ) ) + { + tryAddStateLessAttribute( + rdn, + SL_getSizeMediaCountStream< + CFG_DVD_SIZE_BYTES_K, + CFG_DVD_SIZE_BYTES_DEFAULT, + CFG_DVD_SIZE_BYTES_EA_POSTFIX >, + XSD_BASIC_DOUBLE ); + } + } + } + + void + Context::supplementStateLessAttributes_timet( std::string an_orig ) + { + string an = an_orig; + +// cerr << "TEST - checking for an:" << an << endl; +// { +// TypeInfos_t ti; +// getTypeInfos( ti ); +// cerr << " ti size:" << ti.size() << endl; +// for( TypeInfos_t::iterator zi = ti.begin(); zi != ti.end(); ++zi ) +// { +// cerr << " zi:" << zi->name() << endl; +// } +// } + + + if( isAttributeBound( an, false ) ) + { + an = an_orig; + an += "-display"; + +// cerr << "TEST trying to add an:" << an << endl; + + if( !isAttributeBound( an, false ) ) + { +// cerr << "TEST OK! trying to add an:" << an << endl; + tryAddStateLessAttribute( an, + SL_getTimeStrFTimeIOStream, + SL_getTimeStrFTimeIOStream, + SL_setTimeStrFTimeStream, + FXD_UNIXEPOCH_STRING ); + } + + an = an_orig; + an += "-ctime"; + + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getXTimeCTimeStream, + XSDBasic_t(FXD_UNIXEPOCH_STRING | FXDC_READONLY) ); + } + + an = an_orig; + an += "-day-granularity"; + + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getXTimeDayGranularityStream, + XSDBasic_t(FXD_UNIXEPOCH_T | FXDC_READONLY) ); + } + + an = an_orig; + an += "-month-granularity"; + + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getXTimeMonthGranularityStream, + XSDBasic_t(FXD_UNIXEPOCH_T | FXDC_READONLY) ); + } + + an = an_orig; + an += "-year-granularity"; + + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getXTimeYearGranularityStream, + XSDBasic_t(FXD_UNIXEPOCH_T | FXDC_READONLY) ); + } + + } + } + + +/** + * This is like addAttribute except it does no checking, and can add stateless + * DONT use this method directly, either use addAttribute() or + * tryAddStateLessAttribute() + * + * returns 1 if the attribute was added + */ +bool Context::setAttribute( const std::string& rdn, + EA_Atom* atx, + bool addToREA, + XSDBasic_t sct, + bool isStateLess ) + throw( AttributeAlreadyInUse ) +{ + bool r = _Base::setAttribute( rdn, atx, addToREA, sct, isStateLess ); + + if( rdn == "last-fetch-time" ) + supplementStateLessAttributes_timet("last-fetch-time"); + if( rdn == "feed-tested-time" ) + supplementStateLessAttributes_timet("feed-tested-time"); + + return r; +} + +bool +Context::getSubContextAttributesWithSameNameHaveSameSchema() +{ + return true; +} + + + +void +Context::supplementStateLessAttributes( bool force ) + { + string an; + static bool FUZZ = getenv("LIBFERRIS_FUZZ"); + +// cerr << "Context::supplementStateLessAttributes() path:" << getURL() << endl; + + if( FUZZ ) + { + string an; + + an = "inode"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getINodeFuzzStream, FXD_USERNAME ); + } + an = "mtime"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getMTimeFuzzStream, FXD_UNIXEPOCH_T ); + } + an = "protection-ls"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getProtectionLsFuzzStream, FXD_USERNAME ); + } + } + + + supplementStateLessAttributes_timet("atime"); + supplementStateLessAttributes_timet("ctime"); + supplementStateLessAttributes_timet("mtime"); + supplementStateLessAttributes_timet("dtime"); + supplementStateLessAttributes_timet("creation-time"); + supplementStateLessAttributes_timet("expire-time"); + + supplementStateLessAttributes_timet("last-fetch-time"); + supplementStateLessAttributes_timet("feed-tested-time"); + supplementStateLessAttributes_timet("download-if-mtime-since"); + + supplementStateLessAttributes_timet("recursive-subcontext-oldest-ctime"); + supplementStateLessAttributes_timet("recursive-subcontext-oldest-atime"); + supplementStateLessAttributes_timet("recursive-subcontext-oldest-mtime"); + + supplementStateLessAttributes_timet("subcontext-oldest-ctime"); + supplementStateLessAttributes_timet("subcontext-oldest-atime"); + supplementStateLessAttributes_timet("subcontext-oldest-mtime"); + + supplementStateLessAttributes_timet("rpm-buildtime"); + + supplementStateLessAttributes_timet("file-view-time"); + + supplementStateLessAttributes_timet("date-epoch"); + supplementStateLessAttributes_timet("date1-epoch"); + supplementStateLessAttributes_timet("date2-epoch"); + supplementStateLessAttributes_timet("date3-epoch"); + + if( !isAttributeBound( "size" ) ) + { + tryAddStateLessAttribute( "size", + SL_getSizeFromContentIStream, + FXD_FILESIZE ); + tryAddStateLessAttribute( "dontfollow-size", + SL_getSizeFromContentIStream, + FXD_FILESIZE ); + } + + supplementStateLessAttributes_size("size"); + supplementStateLessAttributes_size("recursive-subcontext-size"); + supplementStateLessAttributes_size("recursive-subcontext-size-in-blocks"); + supplementStateLessAttributes_size("subcontext-size"); + supplementStateLessAttributes_size("subcontext-size-in-blocks"); + + + + { + string an = "user-owner-number"; + if( isAttributeBound( an, false ) ) + { + an = "user-owner-name"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getUserOwnerNameStream, FXD_USERNAME ); + } + } + + if( FUZZ ) + { + string an = "user-owner-number"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getUserOwnerNumberFuzzStream, FXD_USERNAME ); + } + an = "user-owner-name"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getUserOwnerNameFuzzStream, FXD_USERNAME ); + } + } + } + + + + { + string an = "group-owner-number"; + if( isAttributeBound( an, false ) ) + { + an = "group-owner-name"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getGroupOwnerNameStream, FXD_GROUPNAME ); + } + } + + if( FUZZ ) + { + string an = "group-owner-number"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getGroupOwnerNumberFuzzStream, FXD_GROUPNAME ); + } + an = "group-owner-name"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getGroupOwnerNameFuzzStream, FXD_GROUPNAME ); + } + } + } + + { + string an = "ferris-current-time"; + if( !isAttributeBound( an, false ) ) + { + tryAddStateLessAttribute( an, SL_getCurrentTimeStream, FXD_UNIXEPOCH_T ); + supplementStateLessAttributes_timet( an ); + } + } + } + + void + Context::createAttributes() + { + priv_createAttributes(); + } + + void + Context::priv_createAttributes() + { + LG_CTX_D << "Context::priv_createAttributes(top)" << endl; +// cerr << "Context::priv_createAttributes(top) path:" << getDirPath() << endl; + +// Attribute::priv_createAttributes(); + +// LG_ATTR_I << "Context::priv_createAttributes() creating EAGenFactories for:" +// << getDirPath() << endl; + LG_CTX_D << "Context::priv_createAttributes(make external) path:" << getDirPath() << endl; +// cerr << "Context::priv_createAttributes(make external) path:" << getDirPath() << endl; +// BackTrace(); + +// cerr << "Context::priv_createAttributes() " +// << " path:" << getDirPath() +// << endl; +// BackTrace(); + +// cerr << "priv_createAttributes... getDirPath:" << getDirPath() << endl; +// cerr << "priv_createAttributes... getURL:" << getURL() << endl; +// if( starts_with( getDirPath(), "/tmp/import/ipinfo." )) +// { +// return; +// } +// if( starts_with( getDirPath(), "ea/name" ) +// || starts_with( getDirPath(), "ea/value" ) +// || starts_with( getDirPath(), "/tmp/import/ipinfo.db" )) +// { +// return; +// } + + + static const gchar* LIBFERRIS_DISABLE_EAGEN_KDE = g_getenv ("LIBFERRIS_DISABLE_EAGEN_KDE"); + static const gchar* LIBFERRIS_DISABLE_EAGEN_RDF = g_getenv ("LIBFERRIS_DISABLE_EAGEN_RDF"); + static const gchar* LIBFERRIS_DISABLE_EAGEN_EARL_REGEX = g_getenv ("LIBFERRIS_DISABLE_EAGEN_EARL_REGEX"); + + if( LIBFERRIS_DISABLE_EAGEN_EARL_REGEX ) + { + static fh_rex r = toregexh( LIBFERRIS_DISABLE_EAGEN_EARL_REGEX ); + string earl = getURL(); + + LG_CTX_D << "LIBFERRIS_DISABLE_EAGEN_EARL_REGEX:" << LIBFERRIS_DISABLE_EAGEN_EARL_REGEX << endl; + LG_CTX_D << "earl:" << earl << endl; + if( regex_match( earl, r )) + { + LG_CTX_D << "LIBFERRIS_DISABLE_EAGEN_EARL_REGEX decides to skip EA creation for earl:" << earl << endl; + return; + } + } + +// cerr << "Context::priv_createAttributes() url:" << getURL() << endl; +// BackTrace(); + + /* + * FIXME: should really cache this. + */ + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); iter++ ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + + LG_CTX_D << "Context::priv_createAttributes() " + << " path:" << getDirPath() + << " pri:" << (*iter)->getCreatePriority() + << endl; + + if( (*iter)->getCreatePriority() == Pri ) + { + if( LIBFERRIS_DISABLE_EAGEN_KDE || LIBFERRIS_DISABLE_EAGEN_RDF ) + { + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(*iter) ) ) + { + const std::string& sn = ff->getShortName(); + if( LIBFERRIS_DISABLE_EAGEN_RDF && sn == "rdf" ) + { + continue; + } + if( LIBFERRIS_DISABLE_EAGEN_KDE && sn == "kde3_metadata" ) + { + continue; + } + } + } + + try + { + LG_CTX_D << "About to trybrew this:" << getURL() << endl; + (*iter)->tryBrew( this ); + } + catch( exception& e ) + { + LG_ATTR_D << "e:" << e.what() << endl; + } + } + } + } + +// cerr << "Context::priv_createAttributes(end) " +// << " path:" << getDirPath() +// << endl; +// LG_ATTR_I << "Context::priv_createAttributes(3) creating EAGenFactories for:" +// << getDirPath() << endl; + + imageEAGenerator_priv_createAttributes(); + } + + + + // typedef std::hash_map< std::string, MatchedEAGeneratorFactory* (*)() > StaticEAGenFactorysMap_t; + void + Context::getStaticEAGenFactorys( EAGenData& ret, bool& SLEAGenDynamic ) + { + static s_StatelessEAGenFactorys_t s_StatelessEAGenFactorys; + static bool s_StatelessEAGenFactorysHasDynamic = false; + static s_StatefullEAGenFactorysFactorys_t s_StatefullEAGenFactorysFactorys; + +// string EAGeneratorsPath = PREFIX + "/lib/ferris/plugins/eagenerators/"; + string EAGeneratorsPath = makeFerrisPluginPath( "eagenerators" ); + static bool virgin = true; + typedef list< MatchedEAGeneratorFactory* (*)() > StatefullEAGenFactorys_t; + static StatefullEAGenFactorys_t StatefullEAGenFactorys; + + if( virgin ) + { + virgin = false; + + typedef FERRIS_STD_HASH_MAP< std::string, MatchedEAGeneratorFactory* (*)() > StaticEAGenFactorysMap_t; + StaticEAGenFactorysMap_t StaticEAGenFactorysMap; + + MatchedEAGeneratorFactory* (*MakeFactory)() = 0; + DIR *d; struct dirent *e; + + if ((d = opendir (EAGeneratorsPath.c_str())) == NULL) + { + LG_PLUGIN_ER << "Can not open system plugin dir :" << EAGeneratorsPath << endl; + } + else + { + while ((e = readdir (d)) != NULL) + { + string fn = e->d_name; + + LG_PLUGIN_I << "Found:" << fn << endl; + if( ends_with( fn, "factory.so" ) ) + { + try + { + LG_PLUGIN_I << "Loading plugin:" << fn << endl; + + ostringstream ss; + ss << EAGeneratorsPath << fn; + + GModule* ghandle; + ghandle = g_module_open ( tostr(ss).c_str(), G_MODULE_BIND_LAZY); + if (!ghandle) + { + ostringstream ss; + ss << "Error, unable to open module file, %s" + << g_module_error () + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "MakeFactory", + (gpointer*)&MakeFactory)) + { + ostringstream ss; + ss << "Error, unable to resolve MakeFactory in module file, %s" + << g_module_error() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + LG_PLUGIN_I << "Adding EA Generator factory object:" << fn << endl; + StaticEAGenFactorysMap[fn] = MakeFactory; + } + catch( GModuleOpenFailed& e ) + { + LG_PLUGIN_ER << "Failed to load plugin:" << fn << endl; + } + } + } + closedir (d); + } + + + /* + * Go through the map and create a factory for each entry. + */ + for( StaticEAGenFactorysMap_t::const_iterator iter = StaticEAGenFactorysMap.begin(); + iter != StaticEAGenFactorysMap.end(); ++iter ) + { + fh_MatchedEAGeneratorFactory f = iter->second(); + + if( f->hasState() ) + { + /* Factory keeps state per context. Must clone generic factory */ + s_StatefullEAGenFactorysFactorys.push_back( iter->second ); +// StatefullEAGenFactorys.push_back( iter->second ); + } + else + { + /* Reuse global reference */ + s_StatelessEAGenFactorys.push_back( f ); +// StaticEAGenFactorys.push_back( f ); + } + } + + AppendAllStaticEAGeneratorFactories_Stateless( s_StatelessEAGenFactorys ); + + for( s_StatelessEAGenFactorys_t::const_iterator iter = s_StatelessEAGenFactorys.begin(); + iter != s_StatelessEAGenFactorys.end(); ++iter ) + { + fh_MatchedEAGeneratorFactory f = *iter; + s_StatelessEAGenFactorysHasDynamic |= f->isDynamic(); + + if( f->isDynamic() ) + { + cerr << "Warning, stateless EA Generator is dynamic." << endl; + } + } + } + SLEAGenDynamic = s_StatelessEAGenFactorysHasDynamic; + ret.SL = &s_StatelessEAGenFactorys; + ret.SF = &s_StatefullEAGenFactorysFactorys; + } + +const Context::s_StatelessEAGenFactorys_t& +Context::getStatelessEAGenFactorys() +{ + bool SLEAGenDynamic; + EAGenData D; + getStaticEAGenFactorys( D, SLEAGenDynamic ); + return *(D.SL); +} + + + + void + Context::ensureEAGenFactorysSetup() + { + LG_CTX_D << "Context::ensureEAGenFactorysSetup() TOP dn:" << getDirPath() << endl; + + if( EAGenFactorys_isVirgin ) + { + EAGenFactorys_isVirgin = false; + LG_CTX_D << "Context::ensureEAGenFactorysSetup(virg) dn:" << getDirPath() << endl; + + bool SLEAGenDynamic = false; + EAGenData D; + getStaticEAGenFactorys( D, SLEAGenDynamic ); + HaveDynamicAttributes |= SLEAGenDynamic; + const s_StatefullEAGenFactorysFactorys_t& SF = *(D.SF); + + for( s_StatefullEAGenFactorysFactorys_t::const_iterator iter = SF.begin(); + iter != SF.end(); ++iter ) + { + fh_MatchedEAGeneratorFactory f = (*iter)(); + + m_StatefullEAGenFactorys.push_back( f ); + if( f->isDynamic() ) + { + HaveDynamicAttributes = true; + } + } + + HaveDynamicAttributes |= + AppendAllStaticEAGeneratorFactories_Statefull( m_StatefullEAGenFactorys ); + } + + LG_CTX_D << " Context::ensureEAGenFactorysSetup() EXIT dn:" << getDirPath() << endl; + } + + +// /** +// * We can really only get away with coding this method this way because its only +// * called from getEAGenFactorys() and only once per context. If we wanted to +// * generalize it then we would have to keep track of the factories with +// * hasState()==true and make only one instance of those factories per context. +// */ +// Context::EAGenFactorys_t +// Context::getStaticEAGenFactorys() +// { +// string EAGeneratorsPath = makeFerrisPluginPath( "eagenerators" ); +// static bool virgin = true; +// static EAGenFactorys_t StaticEAGenFactorys; +// typedef list< MatchedEAGeneratorFactory* (*)() > StatefullEAGenFactorys_t; +// static StatefullEAGenFactorys_t StatefullEAGenFactorys; +// EAGenFactorys_t ret; + +// if( virgin ) +// { +// virgin = false; + +// typedef std::hash_map< std::string, MatchedEAGeneratorFactory* (*)() > StaticEAGenFactorysMap_t; +// StaticEAGenFactorysMap_t StaticEAGenFactorysMap; + +// MatchedEAGeneratorFactory* (*MakeFactory)() = 0; +// DIR *d; struct dirent *e; + +// if ((d = opendir (EAGeneratorsPath.c_str())) == NULL) +// { +// LG_PLUGIN_ER << "Can not open system plugin dir :" << EAGeneratorsPath << endl; +// } +// else +// { +// while ((e = readdir (d)) != NULL) +// { +// string fn = e->d_name; + +// LG_PLUGIN_I << "Found:" << fn << endl; +// if( ends_with( fn, "factory.so" ) ) +// { +// try +// { +// LG_PLUGIN_I << "Loading plugin:" << fn << endl; + +// ostringstream ss; +// ss << EAGeneratorsPath << fn; + +// GModule* ghandle; +// ghandle = g_module_open ( tostr(ss).c_str(), G_MODULE_BIND_LAZY); +// if (!ghandle) +// { +// ostringstream ss; +// ss << "Error, unable to open module file, %s" +// << g_module_error () +// << endl; +// LG_PLUGIN_I << tostr(ss) << endl; +// cerr << tostr(ss) << endl; +// Throw_GModuleOpenFailed( tostr(ss), 0 ); +// } + +// if (!g_module_symbol (ghandle, "MakeFactory", +// (gpointer*)&MakeFactory)) +// { +// ostringstream ss; +// ss << "Error, unable to resolve MakeFactory in module file, %s" +// << g_module_error() +// << endl; +// LG_PLUGIN_I << tostr(ss) << endl; +// cerr << tostr(ss) << endl; +// Throw_GModuleOpenFailed( tostr(ss), 0 ); +// } + +// LG_PLUGIN_I << "Adding EA Generator factory object:" << fn << endl; +// StaticEAGenFactorysMap[fn] = MakeFactory; +// } +// catch( GModuleOpenFailed& e ) +// { +// LG_PLUGIN_ER << "Failed to load plugin:" << fn << endl; +// } +// } +// } +// closedir (d); +// } + + +// /* +// * Go through the map and create a factory for each entry. +// */ +// for( StaticEAGenFactorysMap_t::const_iterator iter = StaticEAGenFactorysMap.begin(); +// iter != StaticEAGenFactorysMap.end(); ++iter ) +// { +// fh_MatchedEAGeneratorFactory f = iter->second(); + +// if( f->hasState() ) +// { +// /* Factory keeps state per context. Must clone generic factory */ +// StatefullEAGenFactorys.push_back( iter->second ); +// } +// else +// { +// /* Reuse global reference */ +// StaticEAGenFactorys.push_back( f ); +// } + +// } +// } + +// copy( StaticEAGenFactorys.begin(), StaticEAGenFactorys.end(), back_inserter( ret )); + +// /* +// * Create a new statefull factory object for each EA Generator that +// * has interest in this context object +// */ +// for( StatefullEAGenFactorys_t::iterator iter = StatefullEAGenFactorys.begin(); +// iter != StatefullEAGenFactorys.end(); ++iter ) +// { +// // const fh_MatchedEAGeneratorFactory& f = *iter; +// // if( f->hasInterest( this ) ) +// ret.push_back( (*iter)() ); +// } + +// AppendAllStaticEAGeneratorFactories( ret ); + +// return ret; +// } + +// const Context::EAGenFactorys_t& +// Context::getEAGenFactorys() +// { +// LG_CTX_D << "Context::getEAGenFactorys() TOP dn:" << getDirPath() << endl; + +// if( EAGenFactorys_isVirgin ) +// { +// EAGenFactorys_isVirgin = false; +// // cerr << "Context::getEAGenFactorys() creating factories -- START this:" +// // << toVoid(this) << endl; +// const EAGenFactorys_t& f = getStaticEAGenFactorys(); + +// for( EAGenFactorys_t::const_iterator iter = f.begin(); +// iter != f.end(); +// iter++ ) +// { +// if( (*iter)->isDynamic() ) +// { +// HaveDynamicAttributes = true; +// } + +// // Note that getStaticEAGenFactorys() will have already made a +// // copy of all factories that require state tracking. +// // if( (*iter)->hasState() ) +// // { +// // /* Factory keeps state per context. Must clone generic factory */ +// // MatchedEAGeneratorFactory& f = **iter; +// // EAGenFactorys.push_back( f() ); +// // } +// // else +// // { +// // /* Reuse global reference */ +// EAGenFactorys.push_back( *iter ); +// // } +// } +// // cerr << "Context::getEAGenFactorys() creating factories -- END" << endl; +// } + +// LG_CTX_D << " Context::getEAGenFactorys() EXIT dn:" << getDirPath() << endl; +// // cerr << " Context::getEAGenFactorys() EXIT dn:" << getDirPath() +// // << " EAGenFactorys.size:" << EAGenFactorys.size() +// // << endl; +// return EAGenFactorys; +// } + + bool + Context::VetoEA() + { + return false; + } + + void + Context::RemoveOurselfFromFreeList() + { + if( !WeAreInFreeList ) + return; + + LG_CTX_D << "RemoveOurselfFromFreeList() p:" << getDirPath() << endl; +// if( !isParentBound() ) +// CERR << "RemoveOurselfFromFreeList() c:" << (void*)this << endl; + + WeAreInFreeList = 0; + getCacheManager()->removeFromFreeList( this ); + +// /* +// * PURE DEBUG +// */ +// { +// string ppath = ""; +// if( isParentBound() ) +// ppath = getParent()->getDirPath(); + +// fh_stringstream ss; +// dumpRefDebugData( ss ); +// cerr << "+++ n:" << WeAreInFreeList +// << " #:" << NumberOfSubContexts << " cl:" << isReClaimable() +// // << " p:" << ppath +// << " " << tostr(ss); +// } + } + + + + /** + * Make sure that we are disposible and then add our self to the free list if + * we can be claimed. + */ + void + Context::TryToAddOurselfToFreeList() + { + if( WeAreInFreeList ) + return; + + if( isBound( CoveredContext ) ) + { +// /* PURE DEBUG */ +// { +// fh_stringstream ss; +// dumpRefDebugData( ss ); +// cerr << "tryaddfree1 n:" << WeAreInFreeList +// << " #:" << NumberOfSubContexts << " cl:" << isReClaimable() +// << " " << tostr(ss); +// } + + + /* + * VM.clean.3: Can cleanup a overmount tree when the root node has rc=2 + */ + if( !isReClaimable() ) + { + return; + } + } + else + { + if( !isParentBound() ) + { + /* + * Allow the reclaiming of PCCTS mounts only when the root is not in use. + */ +#ifdef PCCTSCTX + // if( childContext* cc = dynamic_cast(this)) + // { + // if( isReClaimable() ) + // { + // getCacheManager()->addToFreeList( this ); + // } + // } + // else +#endif + if( CreateMetaDataContext* cc = dynamic_cast( this ) ) + { + if( getItems().empty() && isReClaimable() ) + { +// cerr << "adding-to-free-list cmdc:" << (void*)cc +// << " rc:" << ref_count +// << " mRC:" << getMinimumReferenceCount() +// << endl; +// BackTrace(); + getCacheManager()->addToFreeList( this ); + } + } + + return; + } + + + if( !isReClaimable() ) + return; + } + + LG_VM_D << "TryToAddOurselfToFreeList() rc:" << ref_count + << " this:" << toVoid(this) + << " path:" << getDirPath() + << endl; + +// WeAreInFreeList = 1; + getCacheManager()->addToFreeList( this ); + +// /* +// * PURE DEBUG +// */ +// { +// fh_stringstream ss; +// dumpRefDebugData( ss ); +// cerr << "--- n:" << WeAreInFreeList +// << " #:" << NumberOfSubContexts << " cl:" << isReClaimable() +// << " " << tostr(ss); +// if( isBound(CoveredContext) ) +// { +// cerr << " covered:" << CoveredContext->getDirPath() << endl; +// } +// // { +// // fh_stringstream ss; +// // dumpEntireContextListMemoryManagementData( ss ); +// // cerr << "->>-------------------------------------------------------------------------<<-\n" +// // << StreamToString(ss) +// // << "->>-------------------------------------------------------------------------<<-\n" +// // << endl; +// // } +// } + + + /* + * If we have just become claimable then we possibly allow a reclaim + * Note that we must have children for this to happen to avoid reclaiming + * ourself during a read(). + * + * VM.clean.2: When a context becomes claimable and + * A. is not a overmounted context and has children + * B. is a overmount and is the root of that overmount and + * CoveredContext is not referenced by the user + */ + if( NumberOfSubContexts ) + { + Context* root = this; + while( root->isParentBound() ) + root = root->getParent(); + + bool invokeClean = false; + + if( !isBound( root->CoveredContext ) ) + { + /* Subcase A */ + invokeClean = true; + } + else + { + /* Subcase B */ + + Context* cc = GetImpl(root->CoveredContext); + if( cc->ref_count == 1 + getMinimumReferenceCount() ) + { + /* CoveredContext reference plus the minimum */ + invokeClean = true; + } + } + + if( invokeClean ) + { + LG_VM_D << "CALLING getCacheManager()->AutoClean()... " + << " from Context::TryToAddOurselfToFreeList()" << endl; + getCacheManager()->AutoClean(); + } + } + } + + int + Context::getMinimumReferenceCount() + { + /* + * VM.clean.3: Can cleanup a overmount tree when the root node has rc=2 + * parent is not bound for a overmount context, so the overmount context + * reference cancels out the parent reference. + * Conversely a context that has a overmount on it has the CoveredContext + * handle of the stacked context pointing back at it, so we need to adjust + * for the base context of a overmount. + */ + /* + * If we leave the base context out of the freelist, when we unmount the overmount + * then the back reference is dropped and the base will become freeable. + */ + return 1 + getItems().size(); +// int sz = max( NumberOfSubContexts, gint32(getItems().size()) ); +// return 1 + sz; + } + + bool + Context::isAttributeBound( const std::string& rdn, bool createIfNotThere ) + throw( NoSuchAttribute ) + { + try + { + if( SL::isAttributeBound( rdn, createIfNotThere ) ) + return true; + + LG_ATTR_D << "Context::isAttributeBound() rdn:" << rdn << endl; + if( createIfNotThere ) + { + tryToFindAttributeByOverMounting( rdn ); + } + LG_ATTR_D << "Context::isAttributeBound(2) rdn:" << rdn << endl; + if( isBound(OverMountContext_Delegate) ) + { + return OverMountContext_Delegate->isAttributeBound( rdn, + createIfNotThere ); + } + + LG_ATTR_D << "Context::isAttributeBound(4) rdn:" << rdn << endl; + return SL::isAttributeBound( rdn, createIfNotThere ); + } + catch( exception& e ) + { + LG_ATTR_D << "Context::isAttributeBound(e) rdn:" << rdn + << " e:" << e.what() + << endl; + stringstream ss; + ss << "No such attribute:" << rdn + << " e:" << e.what(); + Throw_NoSuchAttribute( ss.str(), this ); + } + } + + + + fh_attribute + Context::getAttribute( const string& rdn ) throw( NoSuchAttribute ) + { + LG_CTX_D << "Context::getAttribute() :" << rdn << endl; +// cerr << "Context::getAttribute() :" << rdn << " AttributesHaveBeenCreated:" << AttributesHaveBeenCreated << endl; + + // Handled in getAttribute() now. +// if( rdn == "." ) +// { +// return new AttributeProxy( this, "" ); +// // return new AttributeProxy( this ); +// } + + if( rdn == "ea-names" ) + return SL::getAttribute( rdn ); + + if( rdn == "recommended-ea" ) + { + return SL::getAttribute( "recommended-ea-union" ); + } + + if( isBound(OverMountContext_Delegate) ) + { + try + { + return OverMountContext_Delegate->getAttribute( rdn ); + } + catch( ... ) + { + + } + } + + // Try to hit a stateless EA directly. + { + SLAttributes_t* sl = getStateLessAttrs(); + SLAttributes_t::iterator iter = sl->find( rdn ); + if( sl->end() != iter ) + { + return SL::getAttribute( rdn ); + } + } + + if( !AttributesHaveBeenCreated ) + { + ensureAttributesAreCreated( rdn ); + } + + + if( !AttributeCollection::isAttributeBound( rdn, false ) ) + { +// cerr << "Context::getAttribute() overmount seeking attr:" << rdn +// << " this.url:" << getURL() +// << " OMD_Bound:" << isBound(OverMountContext_Delegate) +// << " CC_Bound:" << isBound( CoveredContext ) +// << " omfailed:" << m_overMountAttemptHasAlreadyFailed +// << endl; +// BackTrace(); + tryToFindAttributeByOverMounting( rdn ); + } + + return SL::getAttribute( rdn ); + } + + +void +Context::setIsNativeContext() +{ + m_isNativeContext = true; +} + +bool +Context::getIsNativeContext() const +{ + if( isBound(CoveredContext) ) + { + return CoveredContext->getIsNativeContext(); + } + + return m_isNativeContext; +} + + + +void +Context::setHasDynamicAttributes( bool v ) + { + HaveDynamicAttributes = v; + } + +/** + * If we still haven't found the attribute we are looking for then try + * overmounting and seeing if the attribute exists. + */ +void +Context::tryToFindAttributeByOverMounting( const std::string& eaname ) +{ +// if( eaname == "is-ferris-compressed" ) +// cerr << "Context::tryToFindAttributeByOverMounting(1)" << endl; + +// cerr << "tryToFindAttributeByOverMounting(top) this" << toVoid( this ) +// << " eaname:" << eaname << endl +// << " OMD_Bound:" << isBound(OverMountContext_Delegate) +// << " CC_Bound:" << isBound( CoveredContext ) +// << " OMD:" << toVoid( OverMountContext_Delegate ) +// << " CC:" << toVoid( CoveredContext ) +// << " omfailed:" << m_overMountAttemptHasAlreadyFailed +// << " ReadingDir:" << ReadingDir +// << " HaveReadDir:" << HaveReadDir +// << endl; +// cerr << "rdn:" << getDirName() << endl; +// cerr << "path:" << getDirPath() << endl; +// if(isBound( CoveredContext )) +// cerr << " CoveredContext.ReadingDir:" << CoveredContext->ReadingDir << endl; +// if(isBound( OverMountContext_Delegate )) +// cerr << " OMC.ReadingDir:" << OverMountContext_Delegate->ReadingDir << endl; + +// if(isBound( CoveredContext )) +// cerr << " CoveredContext.HaveReadDir:" << CoveredContext->HaveReadDir << endl; +// if(isBound( OverMountContext_Delegate )) +// cerr << " OMC.HaveReadDir:" << OverMountContext_Delegate->HaveReadDir << endl; + + + if( ReadingDir ) + return; + if( HaveReadDir ) + return; + + + if( m_overMountAttemptHasAlreadyFailed ) + return; + if( isBound( CoveredContext ) ) + return; + if( eaname.empty() ) + return; + + if( eaname == "ferris-type" ) + return; + if( eaname == "is-ferris-compressed" ) + return; + if( eaname == "libferris-journal-changes" ) + return; + if( starts_with( eaname, "medallion." ) ) + return; + if( eaname == "emblem:emblems-pixbuf" || eaname == "treeicon-pixbuf" ) + return; + if( eaname == "link-target" || eaname == "link-target-relative" ) + return; + if( eaname == "ferris-icon-x" || eaname == "realpath" ) + return; + // Dont go digging into a file or looking in strange places for XMP index data + if( eaname == "http://witme.sf.net/libferris-core/xmp-0.1/index-offsets" + || eaname == "http://witme.sf.net/libferris-core/xmp-0.1/index-mtime" ) + { + LG_OVERMOUNT_I << "Not overmounting for XMP data." << endl; + return; + } + + + + static bool attemptingToAcquireAttributesViaOverMountShort = false; + if( attemptingToAcquireAttributesViaOverMountShort ) + return; + Util::ValueRestorer< bool > x( attemptingToAcquireAttributesViaOverMountShort, true ); + +// LG_ATTR_D << "Context::tryToFindAttributeByOverMounting(top) eaname:" << eaname +// << " url:" << getURL() +// << " is-bound:" << isAttributeBound( eaname, false ) +// << " have-delegate:" << isBound(OverMountContext_Delegate) +// << endl; + if( isAttributeBound( eaname, false ) ) + { +// cerr << "Attribute is already bound! eaname:" << eaname +// << " url:" << getURL() +// << endl; +// BackTrace(); + return; + } + + LG_OVERMOUNT_I << "tryToFindAttributeByOverMounting(top) eaname:" << eaname + << " isBound:" << isAttributeBound( eaname, false ) + << " OMD_Bound:" << isBound(OverMountContext_Delegate) + << " CC_Bound:" << isBound( CoveredContext ) + << " omfailed:" << m_overMountAttemptHasAlreadyFailed + << endl; + LG_ATTR_I << "tryToFindAttributeByOverMounting(top) eaname:" << eaname + << " isBound:" << isAttributeBound( eaname, false ) + << " OMD_Bound:" << isBound(OverMountContext_Delegate) + << " CC_Bound:" << isBound( CoveredContext ) + << " omfailed:" << m_overMountAttemptHasAlreadyFailed + << endl; +// BackTrace(); + + LG_ATTR_D << " eaname:" << eaname + << " isBound:" << isAttributeBound( eaname, false ) + << " OMD_Bound:" << isBound(OverMountContext_Delegate) + << endl; + + + if( !isAttributeBound( eaname, false ) && !isBound(OverMountContext_Delegate) ) + { + LG_ATTR_D << "Context::tryToFindAttributeByOverMounting(passed test) eaname:" << eaname + << " this:" << getURL() + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << " trying overmounting of context to find attribute" + << endl; + + static bool attemptingToAcquireAttributesViaOverMount = false; + if( !attemptingToAcquireAttributesViaOverMount ) + { + Util::ValueRestorer< bool > x( attemptingToAcquireAttributesViaOverMount, true ); + + LG_ATTR_D << "tryToFindAttributeByOverMounting(trying) this" << toVoid( this ) + << " eaname:" << eaname << endl; + LG_OVERMOUNT_I << "tryToFindAttributeByOverMounting(trying) this" << toVoid( this ) + << " eaname:" << eaname << endl; +// cerr << "tryToFindAttributeByOverMounting(trying) this" << toVoid( this ) +// << " eaname:" << eaname << endl; +// BackTrace(); + + tryToOverMount( true, true ); + if( isBound(OverMountContext_Delegate) ) + { + // FIXME: Should have a better way to create root attributes. + LG_ATTR_D << "Context::tryToFindAttributeByOverMounting(about to read) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << " trying overmounting of context to find attribute" + << endl; + try + { + readOverMount(); + } + catch( exception& e ) + { + LG_ATTR_W << "Context::tryToFindAttributeByOverMounting(done with read) eaname:" << eaname + << " error reading overmount" + << " e:" << e.what() + << endl; + } + LG_ATTR_D << "Context::tryToFindAttributeByOverMounting(done with read) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << " trying overmounting of context to find attribute" + << endl; + } + } + } +} + + +// static guint32 getEAGeneratorsAlreadyFullyInvokedBitPattern( StaticGModuleMatchedEAGeneratorFactory* ff ) +// { +// static guint32 nextID = 1; +// // typedef map< string, Context::m_eagenerators_already_fully_invoked_cache_t > cache_t; +// typedef map< string, guint32 > cache_t; +// static cache_t cache; + +// cache_t::iterator e = cache.end(); +// cache_t::iterator iter = cache.find( ff->getShortName() ); + +// if( iter == e ) +// { +// guint32 ret = 0; +// ret = nextID; +// ++nextID; +// iter = cache.insert( make_pair( ff->getShortName(), ret ) ).first; +// } +// return iter->second; +// } + +// // instead of looking every time..... +// class CachedPluginInterestedInEA +// { +// public: + +// const std::string& getShortName(); +// guint32 getBitf(); +// }; +// typedef map< string, list< CachedPluginInterestedInEA > > CachedPluginInterestedInEALookup_t; +// CachedPluginInterestedInEALookup_t& getCachedPluginInterestedInEALookup() +// { +// static CachedPluginInterestedInEALookup_t ret; +// return ret; +// } + + +std::string +Context::getStrAttr_UsingRestrictedPlugins( const std::string& eaname, + const std::set< std::string >& plugins, + bool getAllLines ) +{ + Context::ensureEAGenFactorysSetup(); + LG_MDSERV_D << "Context::getStrAttr_UsingRestrictedPlugins() eaname:" << eaname << endl; + + if( isAttributeBound( eaname, false ) ) + { + LG_MDSERV_D << "Context::getStrAttr_UsingRestrictedPlugins(already bound) eaname:" << eaname << endl; + string ret = getStrAttr( this, eaname, "", getAllLines, true ); + return ret; + } + + std::set< std::string >::const_iterator plugins_end = plugins.end(); + + LG_MDSERV_D << "Context::getStrAttr_UsingRestrictedPlugins(tryBrew block - start) eaname:" << eaname << endl; + + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + fh_MatchedEAGeneratorFactory f = *iter; + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(f) ) ) + { + string n = ff->getShortName(); + + if( plugins_end != plugins.find( n ) ) + { + if( f->hasInterest( this ) ) + f->tryBrew( this, eaname ); + } + } + } + + LG_MDSERV_D << "Context::getStrAttr_UsingRestrictedPlugins(tryBrew block - end) eaname:" << eaname << endl; + +// AttributesHaveBeenCreated = 1; +// HaveDynamicAttributes = 0; + + if( isAttributeBound( eaname, false ) ) + { + string ret = getStrAttr( this, eaname, "", getAllLines, true ); + LG_MDSERV_D << "Context::getStrAttr_UsingRestrictedPlugins(created) eaname:" << eaname << endl; + return ret; + } + + stringstream ss; + ss << "Can not extract metadata. Perhaps it is handled by a plugin that is " + << "not enabled for this dbus server"; + LG_MDSERV_I << tostr(ss) << endl; + Throw_NoSuchAttribute( tostr(ss), this ); +} + + + +void +Context::ensureAttributesAreCreated( const std::string& eaname ) +{ + static bool ensureAttributesAreCreatedRecursionGuard = false; + if( ensureAttributesAreCreatedRecursionGuard ) + return; + Util::ValueRestorer< bool > x( ensureAttributesAreCreatedRecursionGuard, true ); + + bool SeekingMedallion = !eaname.empty() && starts_with( eaname, "medallion." ); + bool SeekingFerrisType = !eaname.empty() && eaname == "ferris-type"; + bool SeekingEmblemsPixbuf = !eaname.empty() && eaname == "emblem:emblems-pixbuf"; + bool SeekingXMPIndexEA = eaname == "http://witme.sf.net/libferris-core/xmp-0.1/index-offsets" + || eaname == "http://witme.sf.net/libferris-core/xmp-0.1/index-mtime"; + bool SeekingOnlyRDFandKernelEA = SeekingMedallion || SeekingFerrisType + || SeekingFerrisType || SeekingEmblemsPixbuf || SeekingXMPIndexEA; + + LG_ATTR_D << "Context::ensureAttributesAreCreated(top) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << endl; + + if( isBound(OverMountContext_Delegate) ) + { + OverMountContext_Delegate->ensureAttributesAreCreated( eaname ); + } + + // Try to make fspot attributes a little quicker. + if( starts_with( eaname, "fspot:" ) ) + { + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + fh_MatchedEAGeneratorFactory f = *iter; + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(f) ) ) + { + string n = ff->getShortName(); + + if(!( n == "f-spot" )) + continue; + + if( (*iter)->hasInterest( this ) ) + (*iter)->tryBrew( this, eaname ); + } + } + + if( isAttributeBound( eaname, false ) ) + { + LG_CTX_D << "Found f-spot attribute directly..." << endl; + LG_FSPOT_D << "Found f-spot attribute directly..." << endl; + return; + } + } + +// if( !SeekingMedallion +// && !eaname.empty() && !isAttributeBound( eaname, false ) ) +// { +// for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) +// { +// // for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// // iter != getEAGenFactorys().end(); iter++ ) +// ensureEAGenFactorysSetup(); +// EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); +// for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); +// iter != iterend; ++iter ) +// { +// if( (*iter)->getCreatePriority() == Pri && !(*iter)->isDynamic() ) +// { +// if( StaticGModuleMatchedEAGeneratorFactory* ff +// = dynamic_cast( GetImpl(*iter) ) ) +// { +// cerr << "TESTING eaname:" << eaname << " plugin:" << ff->getShortName() << endl; +// m_eagenerators_already_fully_invoked_cache_t bitf +// = getEAGeneratorsAlreadyFullyInvokedBitPattern( ff ); +// cerr << "using bitf:" << bitf << endl; + +// if( m_eagenerators_already_fully_invoked_cache & bitf ) +// { +// cerr << "already invoked! cache:" << m_eagenerators_already_fully_invoked_cache << endl; +// continue; +// } + +// cerr << " compare set sz:" << ff->getExplicitEANamesWhichWillBeCreatedSet().size() << endl; + +// const stringset_t& sc = ff->getExplicitEANamesWhichWillBeCreatedSet(); +// if( sc.end() != sc.find( eaname ) ) +// { +// cerr << " compare OK for:" << ff->getShortName() << endl; +// if( (*iter)->hasInterest( this ) ) +// { +// cerr << "Trying plugin:" << ff->getShortName() << endl; + +// (*iter)->tryBrew( this ); +// m_eagenerators_already_fully_invoked_cache |= bitf; +// } +// } +// } +// } +// } +// } + +// if( isAttributeBound( eaname, false ) ) +// return; +// } + + // a hack... +// if( eaname == "width" ) +// { +// imageEAGenerator_priv_createAttributes(); +// if( isAttributeBound( eaname, false ) ) +// return; +// } + + LG_ATTR_D << "Context::ensureAttributesAreCreated(0) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << " SeekingMedallion:" << SeekingMedallion + << " SeekingOnlyRDFandKernelEA:" << SeekingOnlyRDFandKernelEA + << endl; + + // The case of image metadata is handled in Context::priv_getImage() + // here, we handle other types of out of process EA generation like XMP + // which could be relatively expensive the first time. + if( tryToUseOutOfProcessMetadataServer() ) + { + LG_ATTR_D << "Context::ensureAttributesAreCreated(oproc) eaname:" << eaname + << " testing if this is an image EA name....." << endl; + LG_MDSERV_D << "Context::ensureAttributesAreCreated(oproc) eaname:" << eaname + << " testing if this is an image EA name....." << endl; + + if( isOutOfProcessMetadataAttribute( eaname ) ) + { + const stringset_t& oprocNames = getOutOfProcess_EAGeneratorsStaticFactoriesShortNamesToUse(); + + LG_ATTR_I << "Context::ensureAttributesAreCreated(oproc) eaname:" << eaname + << " this should be a out-of-process EA." << endl; + LG_MDSERV_I << "Context::ensureAttributesAreCreated(oproc) eaname:" << eaname + << " this should be a out-of-process EA." << endl; + + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) + { + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + fh_MatchedEAGeneratorFactory f = *iter; + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(f) ) ) + { + string n = ff->getShortName(); + + if( oprocNames.end() != oprocNames.find( n ) ) + { + LG_MDSERV_D << "Context::ensureAttributesAreCreated(oproc ea) eaname:" << eaname + << " calling for shortName:" << n + << endl; + + string earl = getURL(); + string v = Ferris::syncMetadataServerGet( earl, eaname ); + + LG_MDSERV_D << "Context::ensureAttributesAreCreated(oproc ea) eaname:" << eaname + << " have resulting value:" << v + << endl; + + addAttribute( eaname, v ); + return; + } + } + } + } + } + } + + + + + if( !AttributesHaveBeenCreated ) + { + if( !SeekingOnlyRDFandKernelEA ) + { +// cerr << "Context::ensureAttributesAreCreated() calling createAttributes() " +// << " url:" << getURL() << endl +// << " eaname:" << eaname +// << " SeekingOnlyRDFandKernelEA:" << SeekingOnlyRDFandKernelEA +// << endl; +// BackTrace(); + + LG_ATTR_I << "Context::ensureAttributesAreCreated() calling createAttributes() " + << " url:" << getURL() << endl + << " eaname:" << eaname + << " SeekingOnlyRDFandKernelEA:" << SeekingOnlyRDFandKernelEA + << endl; +// cerr << "Context::ensureAttributesAreCreated() calling createAttributes() " +// << " url:" << getURL() << endl +// << " eaname:" << eaname +// << " SeekingOnlyRDFandKernelEA:" << SeekingOnlyRDFandKernelEA +// << " AttributesHaveBeenCreated:" << AttributesHaveBeenCreated +// << endl; +// Time::Benchmark bm( (string)"Creating attributes, trigger ea:" + eaname + " for:" + getURL() ); + AttributesHaveBeenCreated = 1; + createAttributes(); + } + } + + LG_ATTR_D << "Context::ensureAttributesAreCreated(1) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << " SeekingOnlyRDFandKernelEA:" << SeekingOnlyRDFandKernelEA + << endl; + + /* + * Some attributes can be created out of proc, for exmaple XFS/E3 native + * filesystem EA can be made from another process, we should check in case + * this has happened. + */ + if( !isAttributeBound( eaname, false ) && + ( !eaname.empty() && HaveDynamicAttributes ) + || SeekingOnlyRDFandKernelEA ) + { + LG_ATTR_D << "Context::ensureAttributesAreCreated(1.1) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false ) + << endl; + + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); iter++ ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + if( SeekingOnlyRDFandKernelEA ) + { + fh_MatchedEAGeneratorFactory f = *iter; + if( StaticGModuleMatchedEAGeneratorFactory* ff + = dynamic_cast( GetImpl(f) ) ) + { + string n = ff->getShortName(); + + if(!( n == "rdf" || n == "KernelEA" )) + continue; + + if( (*iter)->getCreatePriority() != Pri ) + continue; + +// cerr << "Context::ensureAttributesAreCreated(1.pl) eaname:" << eaname +// << " plugin:" << ff->getShortName() +// << " url:" << getURL() +// << " (*iter)->isDynamic():" << (*iter)->isDynamic() +// << " (*iter)->hasInterest( this ) ):" << (*iter)->hasInterest( this ) +// << endl; + } + } + + if( (*iter)->getCreatePriority() == Pri && + (*iter)->isDynamic() || SeekingOnlyRDFandKernelEA ) + { + try + { + LG_ATTR_D << "Context::ensureAttributesAreCreated(1.2) " + << " eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << endl; + + if( (*iter)->hasInterest( this ) ) + (*iter)->tryBrew( this, eaname ); + } + catch( exception& e ) + { + LG_ATTR_D << "e:" << e.what() << endl; + } + } + } + + } + } + + /* + * If we still haven't found the attribute we are looking for then try + * overmounting and seeing if the attribute exists. + */ + if( !SeekingOnlyRDFandKernelEA ) + { + LG_ATTR_D << "Context::ensureAttributesAreCreated(2) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << endl; + tryToFindAttributeByOverMounting( eaname ); + + LG_ATTR_D << "Context::ensureAttributesAreCreated(end) eaname:" << eaname + << " HaveDynamicAttributes:" << HaveDynamicAttributes + << " isbound:" << isAttributeBound( eaname, false) + << endl; + } + + +} + + +AttributeCollection::AttributeNames_t& +Context::getAttributeNames( AttributeNames_t& ret ) + { + if( isBound(OverMountContext_Delegate) ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + OverMountContext_Delegate->getAttributeNames( t1 ); + SL::getAttributeNames( t2 ); + return mergeAttributeNames( ret, t1, t2 ); + } + + return SL::getAttributeNames( ret ); + } + + int + Context::getAttributeCount() + { + AttributeNames_t tmp; + + if( isBound(OverMountContext_Delegate) ) + { + getAttributeNames( tmp ); + return tmp.size(); + } + + return AttributeCollection::getAttributeCount(); + } + + + + /** + * The EA names are ordered based on a subtree of the emblems in your etagere. + * + * This gets the root of that tree. + */ + fh_emblem + Context::getAttributeRootEmblem() + { + LG_CTX_D << "Context::getAttributeRootEmblem(top) c:" << getURL() << endl; + + fh_etagere et = Factory::getEtagere(); + fh_emblem ret = private_getAttributeRootEmblem( et ); + + LG_CTX_D << "Context::getAttributeRootEmblem(1)" << endl; + emblems_t downset = ret->getDownset(); + LG_CTX_D << "Context::getAttributeRootEmblem(2)" << endl; + + AttributeCollection::AttributeNames_t an; + getAttributeNames( an ); + + stringset_t anset; + copy( an.begin(), an.end(), inserter( anset, anset.end() )); +// // PURE DEBUG +// LG_CTX_D << "Context::getAttributeRootEmblem() c:" << getURL() << endl; +// cerr << "getAttributeRootEmblem(an1) LISTTOP" << endl; +// for( stringset_t::iterator si = anset.begin(); si != anset.end(); ++si ) +// { +// cerr << "getAttributeRootEmblem(an1) " << *si << endl; +// } +// cerr << "getAttributeRootEmblem(an1) LISTEND" << endl; + + addEAToSet( anset, getStrAttr( this, "recommended-ea-union-view", "" )); + LG_CTX_D << "Context::getAttributeRootEmblem(3)" << endl; + +// // PURE DEBUG +// for( AttributeCollection::AttributeNames_t::const_iterator ani = an.begin(); +// ani!=an.end(); ++ani ) +// { +// string an = *ani; +// LG_CTX_D << "Context::getAttributeRootEmblem(an) " << an << endl; +// } +// // PURE DEBUG +// cerr << "getAttributeRootEmblem(an2) LISTTOP" << endl; +// for( stringset_t::iterator si = anset.begin(); si != anset.end(); ++si ) +// { +// cerr << "getAttributeRootEmblem(an2) " << *si << endl; +// } +// cerr << "getAttributeRootEmblem(an2) LISTEND" << endl; + + + for( emblems_t::iterator ci = downset.begin(); ci != downset.end(); ++ci ) + { + fh_emblem em = *ci; + + stringset_t::iterator siter = anset.find( em->getName() ); + if( siter != anset.end() ) + anset.erase( siter ); + } + LG_CTX_D << "Context::getAttributeRootEmblem(4)" << endl; + LG_CTX_D << "Context::getAttributeRootEmblem(5) createing.sz:" << anset.size() << endl; + + if( !anset.empty() ) + { + fh_emblem emblems = ret->obtainChild_EAOrdering( "emblems" ); + fh_emblem emblems_schemas = emblems->obtainChild_EAOrdering( "schemas" ); + fh_emblem emblems_fuzzy = emblems->obtainChild_EAOrdering( "fuzzy" ); + fh_emblem emblems_time = emblems->obtainChild_EAOrdering( "time" ); + fh_emblem emblems_has = emblems->obtainChild_EAOrdering( "has-emblem" ); + fh_emblem emblems_id = emblems->obtainChild_EAOrdering( "has-id" ); + fh_emblem schemas = ret->obtainChild_EAOrdering( "schemas" ); + fh_emblem schemas_emblems = schemas->obtainChild_EAOrdering( "emblems" ); + fh_emblem branchfs = ret->obtainChild_EAOrdering( "branchfs" ); + fh_emblem timerelated = ret->obtainChild_EAOrdering( "time" ); + fh_emblem dontfollow = ret->obtainChild_EAOrdering( "dontfollow" ); + fh_emblem fs = ret->obtainChild_EAOrdering( "fs" ); + fh_emblem subcontext = ret->obtainChild_EAOrdering( "subcontext" ); + fh_emblem rpm = ret->obtainChild_EAOrdering( "rpm" ); + + SyncDelayer syncObj1; + Util::ValueRestorer< bool > x( OnEmblemCreated_IGNORE_CREATED_EMBLEMS, true ); + int EAOrderingEmblemsCreatedCount = 0; + for( stringset_t::const_iterator si = anset.begin(); si != anset.end(); ++si ) + { + if( starts_with( *si, "emblem:emblem:" )) + continue; + + cerr << "creating an ea-ordering for emblem...:" << *si << endl; + LG_CTX_N << "Context::getAttributeRootEmblem(CREATE) si:" << *si << endl; + + ++EAOrderingEmblemsCreatedCount; + fh_cemblem e = et->createColdEmblem_EAOrdering( *si ); + if( starts_with( *si, "emblem:" ) ) + { + if( starts_with( *si, "emblem:schema:" ) ) + { + link( emblems_schemas, e ); + } + else if( contains( *si, "-fuzzy" ) ) + { + link( emblems_fuzzy, e ); + } + else if( contains( *si, "-mtime" ) ) + { + link( emblems_time, e ); + } + else if( starts_with( *si, "emblem:has-" ) ) + { + link( emblems_has, e ); + } + else if( starts_with( *si, "emblem:id-" ) ) + { + link( emblems_id, e ); + } + else + { + link( emblems, e ); + } + } + else if( starts_with( *si, "schema:" ) ) + { + if( starts_with( *si, "schema:emblem:" ) ) + { + link( schemas_emblems, e ); + } + else + { + link( schemas, e ); + } + } + else if( starts_with( *si, "branchfs-" ) ) + { + link( branchfs, e ); + } + else if( starts_with( *si, "mtime-" ) || starts_with( *si, "ctime-" ) || starts_with( *si, "atime-" )) + { + link( timerelated, e ); + } + else if( starts_with( *si, "file-view-time" ) || starts_with( *si, "file-edit-time" ) ) + { + link( timerelated, e ); + } + else if( starts_with( *si, "dontfollow-" ) ) + { + link( dontfollow, e ); + } + else if( starts_with( *si, "fs-" ) ) + { + link( fs, e ); + } + else if( starts_with( *si, "recursive-subcontext-" ) || starts_with( *si, "subcontext-" ) ) + { + link( subcontext, e ); + } + else if( starts_with( *si, "rpm-" ) ) + { + link( rpm, e ); + } + else + { + link( ret, e ); + } + e->getUniqueName(); + e->forceUpdateTransitiveChildOfEAOrderingRootEmblem(); + cerr << "created an ea-ordering for emblem...:" << *si + << " id:" << e->getID() + << " si:" << *si + << " Name:" << e->getName() + << " UName:" << e->getUniqueName() + << " isTC:" << e->isTransitiveChildOfEAOrderingRootEmblem() + << endl; + } + + if( EAOrderingEmblemsCreatedCount ) + cerr << "EAOrderingEmblemsCreatedCount:" << EAOrderingEmblemsCreatedCount << endl; + } + + + LG_CTX_D << "Context::getAttributeRootEmblem(5 calling sync)" << endl; + et->sync(); + LG_CTX_D << "Context::getAttributeRootEmblem(6 complete)" << endl; + + return ret; + } + + + +std::string +Context::priv_getRecommendedEA() +{ + return "name"; +} + + + + + string + Context::getRecommendedEA() + { + fh_stringstream ret; + + ret << adjustRecommendedEAForDotFiles( this, + getOverMountContext()->priv_getRecommendedEA()); + +// cerr << "Context::getRecommendedEA()" << endl; +// cerr << "Context::getRecommendedEA() omc:" << getOverMountContext()->priv_getRecommendedEA() << endl; +// cerr << "Context::getRecommendedEA() cc:" << getCoveredContext()->priv_getRecommendedEA() << endl; +// cerr << "Context::getRecommendedEA() omc:" << toVoid(getOverMountContext()) << endl; +// cerr << "Context::getRecommendedEA() cc:" << toVoid(getCoveredContext()) << endl; +// cerr << "Context::getRecommendedEA()this:" << toVoid(this) << endl; + +// set unionset; +// addEAToSet( unionset, getOverMountContext()->priv_getRecommendedEA() ); +// addEAToSet( unionset, getCoveredContext()->priv_getRecommendedEA() ); +// unique_copy( unionset.begin(), unionset.end(), +// ostream_iterator(ret,",")); + + + const fh_context& thisp = this; + for( int Pri = AttributeCreator::CREATE_PRI_MAX_INTERNAL_USE_ONLY; Pri >= 0; --Pri ) + { +// for( EAGenFactorys_t::const_iterator iter = getEAGenFactorys().begin(); +// iter != getEAGenFactorys().end(); iter++ ) + ensureEAGenFactorysSetup(); + EAGenFactorys_iterator iterend = EAGenFactorys_iterator( this, true ); + for( EAGenFactorys_iterator iter = EAGenFactorys_iterator( this ); + iter != iterend; ++iter ) + { + if( (*iter)->getCreatePriority() == Pri && (*iter)->hasInterest( thisp ) ) + { + (*iter)->augmentRecommendedEA( thisp, ret ); + } + } + } + + if( imageEAGenerator_haveLoader() ) + ret << ",width,height"; + + + return tostr( ret ); + } + +// static guint medallion_timer = 0; +// const int medallion_timer_interval = 20000; + +// static gint +// medallion_timer_f(gpointer data) +// { +// typedef map< Context*, fh_medallion > cache_t; +// cache_t* tptr = (cache_t*)data; +// cache_t& cache = *tptr; + +// for( cache_t::iterator ci = cache.begin(); ci != cache.end(); ) +// { +// if( ci->second->getReferenceCount() == 1 ) +// { +// cache_t::iterator tmp = ci; +// ++ci; +// cache.erase( tmp ); +// continue; +// } +// ++ci; +// } + +// return 0; +// } + +static void +OnMedallionUpdated( std::string url, Cache< Context*, fh_medallion >* cache ) +{ + LG_CTX_D << "OnMedallionUpdated() url:" << url << endl; + + typedef Cache< Context*, fh_medallion > cache_t; + for( cache_t::iterator ci = cache->begin(); ci != cache->end(); ++ci ) + { + Context* c = ci->first; + if( c->getURL() == url ) + { + ci->second->reload(); + c->Emit_Changed( 0, url, url, 0 ); + c->Emit_MedallionUpdated(); + break; + } + } +} + + bool + Context::hasMedallion() + { + return isTrue( getStrAttr( this, "emblem:has-medallion", "0" )); + } + + +fh_medallion +Context::getMedallion() +{ + static Cache< Context*, fh_medallion > cache; + + // + // We are only interested in out-of-proc notifications for + // medallions that this process is using. + // + static bool connected = false; + if( !connected ) + { + connected = true; + Factory::getPluginOutOfProcNotificationEngine(). + getMedallionUpdated_Sig().connect( bind( sigc::ptr_fun( OnMedallionUpdated ), &cache ) ); + } + + if( fh_medallion m = cache.get( this ) ) + { + return m; + } + LG_CTX_D << "new Medallion() url:" << getURL() << endl; + fh_medallion m = new Medallion( this ); + cache.put( this, m ); + return m; + + +// typedef map< Context*, fh_medallion > cache_t; +// static cache_t cache; + +// if( medallion_timer ) +// { +// g_source_remove( medallion_timer ); +// medallion_timer = 0; +// } +// medallion_timer = g_timeout_add( medallion_timer_interval, +// GSourceFunc(medallion_timer_f), &cache ); + +// cache_t::iterator ci = cache.find( this ); +// if( ci != cache.end() ) +// { +// return ci->second; +// } + +// fh_medallion m = new Medallion( this ); +// cache[ this ] = m; +// return m; +} + + +stringlist_t +Context::getNamespacePrefixes() +{ + stringlist_t sl = _Base::getNamespacePrefixes(); + stringlist_t psl; + + if( isParentBound() ) + psl = getParent()->getNamespacePrefixes(); + + copy( sl.begin(), sl.end(), back_inserter( psl )); + return psl; +} + +void +Context::readNamespaces() +{ + _Base::readNamespaces(); + if( isParentBound() ) + getParent()->readNamespaces(); + +} + + +std::string +Context::resolveFerrisXMLNamespace( const std::string& s ) +{ + std::string r = _Base::resolveFerrisXMLNamespace( s ); + if( r != s ) + return r; + + if( isParentBound() ) + return getParent()->resolveFerrisXMLNamespace( s ); + return s; +} + + + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + + + namespace Main + { + gboolean + EventPending() + { + return Fampp::Fampp::Instance().Pending(); + } + + void + processEvent() + { + if( Fampp::Fampp::Instance().Pending() ) + Fampp::Fampp::Instance().NextEvent(); + } + + static void ProcessFAMExceptions() + { + while( Fampp::haveMoreExceptions() ) + { + std::exception e = Fampp::getNextException(); + string msg = e.what(); + if( msg.find("Failed to lstat") ) + { + LG_CTX_D << "Not propergating event due to it being most Likely" + << " caused by a quick action like date>|x && rm -f x" + <<" Either that or you have a very bad kernel/disk :/ " + << " e:" << e.what() << endl; + continue; + } + + LG_CTX_W << "ProcessFAMExceptions() rethrow! for e:" << e.what() << endl; + throw e; + + /* + * Can't do any snazzy typeid() stuff because exception lacks vtable. + */ + +// Loki::TypeInfo einfo = typeid(e); + +// NoSuchSubContext* nssc = 0; +// cerr << "TypeInfo e:" << Loki::TypeInfo(typeid(e)).name() << endl; +// cerr << "TypeInfo nssc:" << Loki::TypeInfo(typeid(NoSuchSubContext*)).name() << endl; +// if( einfo == Loki::TypeInfo(typeid(NoSuchSubContext*)) ) +// { +// NoSuchSubContext* ne = static_cast(&e); +// cerr << "Not propergating event due to it being most Likely" +// << " caused by a quick action like date>|x && rm -f x" +// <<" Either that or you have a very bad kernel/disk :/ " +// << " e:" << e.what() << endl; +// continue; +// } + +// cerr << "ProcessFAMExceptions() rethrow! for e:" << e.what() << endl; +// throw Fampp::getNextException(); + } + } + + + void + processAllPending_VFSFD_Events() + { + bool hadEvents = false; + + while( EventPending() ) + { + hadEvents = true; + processEvent(); + } + + if( hadEvents ) + ProcessFAMExceptions(); + } + + void processAllPendingEvents() + { + while( g_main_pending() ) + { + g_main_iteration( false ); + processAllPending_VFSFD_Events(); + } + } + + void mainLoop() + { + while( true ) + { + g_main_iteration( true ); + processAllPending_VFSFD_Events(); +// ProcessFAMExceptions(); + } + + +// GMainLoop *loop = g_main_loop_new(0,0); +// g_main_loop_run( loop ); +// g_main_loop_unref( loop ); + } + }; + +// #include +// #include +// #include + + +// IPStringAttribute::IPStringAttribute( +// Attribute* parent, +// const string& rdn, +// const string& _ip ) +// : +// StringAttribute( parent, rdn ), +// ip(_ip) +// { +// getReturnString_Sig().connect(slot( *this, &IPStringAttribute::str )); +// } + +// IPStringAttribute::~IPStringAttribute() +// { +// } + +// string +// IPStringAttribute::str() +// { + +// if( cache.find(ip) == cache.end() ) +// { +// sockinetaddr sa(ip.c_str()); +// // cout << "Reverse lookup for:" << ip << endl; +// // cout << "Reverse lookup is:" << sa.gethostname() << endl; + +// cache[ip] = sa.gethostname(); +// } + +// return cache[ip]; +// } + + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +// std::string setStrAttr( const char* path, +// const std::string& rdn, +// const std::string& v, +// bool create, +// bool throw_for_errors, +// bool dontDelegateToOvermountContext ) +// { +// try +// { +// fh_context c = Resolve( path ); +// setStrAttr( c, rdn, v, create, throw_for_errors, dontDelegateToOvermountContext ); +// } +// catch( exception& e ) +// { +// if( throw_for_errors ) +// throw; +// return v; +// } +// } + +fh_context setChild( fh_context c, + const std::string& rdn, + const std::string& v ) +{ + fh_context child = Shell::acquireSubContext( c, rdn ); + setStrAttr( child, "content", v ); + return child; +} + + + + /** + * Set the attribute with the name of rdn on the context c to have value v. + * + * @returns v or throws an error + */ +std::string setStrAttr( fh_context c, + const std::string& rdn_ref, + const std::string& v, + bool create, + bool throw_for_errors, + bool dontDelegateToOvermountContext ) + { + string rdn = c->expandEAName( rdn_ref, false ); +// cerr << "setStrAttr() rdn:" << rdn << endl; + + try + { + fh_iostream ss; + + if( !rdn.length() || rdn == "." || rdn == "content" ) + { + ss = c->getIOStream( ios::out | ios::trunc ); + } + else + { + if( !c->isAttributeBound( rdn ) ) + { + if( create ) + { + LG_CTX_D << "told to create rdn:" << rdn << " and dont see it at the moment" << endl; + LG_CTX_D << " c:" << c->getURL() << endl; +// cerr << " c:" << c->getURL() +// << " c addr:" << (void*)GetImpl(c) +// << endl; +// c->dumpAttributeNames(); + Shell::createEA( c, rdn, v, dontDelegateToOvermountContext ); + return v; + } + else + { + fh_stringstream ss; + ss << "Can not update information in attribute:" << rdn + << " of context:" << c->getURL() + << " because there is no such attribute"; + Throw_NoSuchAttribute( tostr(ss), GetImpl(c) ); + } + } + + fh_attribute attr; + attr = c->getAttribute( rdn ); + ss = attr->getIOStream( ios::out | ios::trunc ); + } + +// cerr << "PUTTING value:" << v << endl; + ss << v << flush; + if( !ss ) + { + LG_CTX_D << "Can not set c:" << c->getURL() + << " rdn:" << rdn + << " v:" << v + << " stream state:" << ss->rdstate() + << endl; + } + + if( rdn_ref == "annotation" ) + { +#ifdef HAVE_DBUS + string earl = c->getURL(); + LG_DBUS_D << "Emitting AnnotationSaved for earl:" << earl << endl; + DBusConnection* conn = DBus::getSessionBus(); + DBus::Signal sig( "/", "org.libferris.desktop", "AnnotationSaved"); + sig.push_back( earl ); + sig.push_back( c->getDirPath() ); + sig.send( conn ); + LG_DBUS_D << "Done Emitting AnnotationSaved for earl:" << earl << endl; +#endif + } + + + } + catch( exception& e ) + { + LG_CTX_D << "Can not set c:" << c->getURL() + << " rdn:" << rdn + << " v:" << v + << " e:" << e.what() + << endl; + if( throw_for_errors ) + throw; + return v; + } +// catch(...) +// { +// } + LG_ATTR_D << "setStrAttr() rdn:" << rdn << " v:" << v << endl; + return v; + } + + +std::string + Context::private_getStrAttr( const std::string& rdn_ref, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + string rdn = expandEAName( rdn_ref, false ); + +// cerr << "private_getStrAttr() rdn:" << rdn << " path:" << getDirPath() << endl; + + + EA_Atom* atom = getAttributeIfExists( rdn ); + +// cerr << "Context::getStrAttr(1) url:" << getURL() << " rdn:" << rdn << endl; + + if( !atom && !AttributesHaveBeenCreated ) + { + LG_OVERMOUNT_I << "private_getStrAttr() rdn:" << rdn << " not-currently-bound " << endl + << " calling ensureAttributesAreCreated(rdn) for url:" << getURL() << endl; + ensureAttributesAreCreated( rdn ); + atom = getAttributeIfExists( rdn ); + } + + + // FIXME: we need implicit attribute discovery here, but this is a loop + if( !atom && getCoveredContext() == this ) + { + static bool attemptingToAcquireAttributesViaOverMount = false; + if( !attemptingToAcquireAttributesViaOverMount ) + { + Util::ValueRestorer< bool > x( attemptingToAcquireAttributesViaOverMount, true ); + tryToFindAttributeByOverMounting( rdn ); + } + } + + + if( isBound(OverMountContext_Delegate) && rdn != "recommended-ea" ) + { +// cerr << "Context::getStrAttr(dele) url:" << getURL() << " rdn:" << rdn << endl; + return OverMountContext_Delegate->private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + try + { + string s = def; + + if( rdn == "recommended-ea" ) + { + rdn = "recommended-ea-union"; + } + + + if( !rdn.length() || rdn=="content" || rdn=="." ) + { + fh_istream ss = getIStream(); + if( getAllLines ) + s = StreamToString( ss ); + else + getline( ss, s ); + } + else + { + if( !atom ) + atom = getAttributePtr( rdn ); + + // This method of getting the data reuses a static string stream + // buffer to avoid the noticable expense of creating and returning + // a stringstream. The locale setup that has to be done each time + // a stringstream is made/deleted can dominate when sorting by EA + // for example. + if( atom && atom->havePassedInSteamRead() ) + { + const int ssarray_maxlevels = 1024; + static fh_stringstream ssarray[ ssarray_maxlevels ]; + static int ssarray_index = 0; + +// LG_EAIDX_D << "Context::private_getStrAttr(X) ss.addr:" << &ssarray[ ssarray_index ] << endl; +// LG_EAIDX_D << "Context::private_getStrAttr(X) rdn:" << rdn << endl; +// fh_stringstream ss; +// static fh_stringstream ss; + fh_stringstream& ss = ssarray[ ssarray_index ]; + Util::ValueRestorer< int > x( ssarray_index ); + ++ssarray_index; +// LG_EAIDX_D << "ssarray_index:" << ssarray_index << endl; +// cerr << "ssarray_index:" << ssarray_index << endl; +// BackTrace(); + + typedef Loki::SmartPtr< fh_stringstream, + Loki::RefLinked, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisLoki::FerrisExSmartPtrStorage > fh_ss_ptr; + fh_ss_ptr fh_ss_ref = 0; + + if( ssarray_index >= ssarray_maxlevels ) + { + LG_EAIDX_W << "Context::private_getStrAttr() max recursive depth hit!" << endl; + cerr << "Context::private_getStrAttr() max recursive depth hit!" << endl; + fh_ss_ref = new fh_stringstream(); + ss = *(GetImpl(fh_ss_ref)); + } + + + ss.clear(); + string ssdata; + ss.str(ssdata); + ss << dec; + ss.seekp( 0 ); + EA_Atom_ReadOnly_PassedInStream* astream = static_cast( atom ); + ferris_ios::openmode m = ios::in; + astream->getIStream( this, rdn, m, ss ); + ss.seekg( 0 ); +// cerr << "mtimeN ss:" << tostr(ss) << endl; + if( getAllLines ) + { + s = StreamToString( ss ); + } + else + { + getline( ss, s ); + } +// LG_EAIDX_D << "Context::private_getStrAttr(XRET) rdn:" << rdn << endl; +// LG_EAIDX_D << "Context::private_getStrAttr() s:" << s << endl; + } + else + { + fh_istream ss; + if( atom ) + { + ferris_ios::openmode m = ios::in; + ss = atom->getIStream( this, rdn, m ); + } + + if( getAllLines ) + s = StreamToString( ss ); + else + getline( ss, s ); + } + } + + + + +// if( rdn == "recommended-ea" && isBound(OverMountContext_Delegate) ) +// { +// /* Merge recommended EA for base and overmounting contexts */ + +// string oms = OverMountContext_Delegate->private_getStrAttr( +// rdn, def, getAllLines, throwEx ); + +// cerr << "Context::getStrAttr(merge) s:" << s +// << " oms:" << oms +// << endl; + + +// set unionset; +// string tmp; +// { +// fh_stringstream ss; +// ss << s; +// while(getline(ss,tmp,',')) +// unionset.insert(tmp); +// } +// { +// fh_stringstream ss; +// ss << oms; +// while(getline(ss,tmp,',')) +// unionset.insert(tmp); +// } +// fh_stringstream ss; +// unique_copy( unionset.begin(), unionset.end(), +// ostream_iterator(ss,",")); +// s = tostr(ss); + +// cerr << "Context::getStrAttr(merge done) s:" << s +// << endl; +// } + + return s; + } + catch( exception& e ) + { + // handled in getAttributePtr() for this method too +// if( starts_with( rdn, "schema:" ) && isParentBound() ) +// { +// return getParent()->private_getStrAttr( "subtree" + rdn, +// def, getAllLines, throwEx ); +// } + if( throwEx ) + { + LG_ATTR_D << "Context::private_getStrAttr(error) url:" << getURL() + << " rdn:" << rdn_ref + << " def:" << def + << " e:" << e.what() + << endl; + throw; + } + } + catch(...) + { + if( throwEx ) + throw; + } + return def; + + } + + + std::string getStrAttr( std::string earl, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throw_for_errors ) + { + try + { + fh_context c = Resolve( earl ); + return getStrAttr( c, rdn, def, getAllLines, throw_for_errors ); + } + catch( exception& e ) + { + if( throw_for_errors ) + throw; + return def; + } + } + + + + std::string getStrAttr( const fh_context& c, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throw_for_errors ) + { + return getStrAttr( GetImpl(c), rdn, def, getAllLines, throw_for_errors ); + } + + /** + * Read an attribute from a context and return either its contents or a default + * value. + * + * @param c Context to get attribute from + * @param rdn attribute name + * @param default vaule if there is no attribute with the given rdn, or an + * error occurs. + */ + std::string getStrAttr( AttributeCollection* c, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throw_for_errors ) + { + if( !c ) + { + cerr << "getStrAttr() called without a context" << endl; + BackTrace(); + if( throw_for_errors ) + { + fh_stringstream ss; + ss << "getStrAttr() called without a context"; + Throw_CanNotGetStream( tostr(ss), 0 ); + } + return def; + } + return ((Context*)c)->private_getStrAttr( rdn, def, getAllLines, throw_for_errors ); + +// try +// { +// fh_istream ss; +// string s = def; + +// if( !rdn.length() ) +// { +// ss = (static_cast(c))->getIStream(); +// } +// else +// { +// if( !c->isAttributeBound( rdn ) ) +// { +// return def; +// } +// ss = c->getAttribute( rdn )->getIStream(); +// } + +// if( getAllLines ) +// { +// fh_stringstream tmpss; +// copy( istreambuf_iterator(ss), +// istreambuf_iterator(), +// ostreambuf_iterator(tmpss)); +// s = tostr( tmpss ); +// } +// else +// { +// getline( ss, s ); +// } +// return s; +// } +// catch(...) +// { +// } +// return def; + } + + FERRISEXP_API time_t getTimeAttr( fh_context c, + const std::string& rdn, + time_t v, + bool throw_for_errors ) + { + time_t mt = toType( getStrAttr( c, rdn, tostr(v), false, throw_for_errors )); + return mt; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + void ParseOnly_FERRIS_POPT_OPTIONS( const string& PROGRAM_NAME, + int argc, + const char** argv ) + { + poptContext optCon; + int ch=-1; + struct poptOption optionsTable[] = { + FERRIS_POPT_OPTIONS + POPT_TABLEEND + }; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* ..."); + + /***/ + while ((ch = poptGetNextOpt(optCon)) >= 0) + {} + + poptFreeContext(optCon); + } + +bool isTrue( const string& s ) +{ + return s=="1" || s=="yes" || s=="true" || s=="1\n" || s=="yes\n" || s=="true\n"; +} + + bool isFalse( const std::string& s ) + { + return !isTrue( s ); + } + + + +bool isNumber( const string& s ) +{ + for( int i=0; iisCompressedContext(); + + LG_CTX_D << "isCompressedContext() this:" << this << endl; + LG_CTX_D << "isCompressedContext() cc :" << getCoveredContext() << endl; + LG_CTX_D << "isCompressedContext() ret:" << isTrue( getStrAttr( this, COMPRESSION_SENTINAL, "0" )) << endl; + return isTrue( getStrAttr( this, COMPRESSION_SENTINAL, "0" )); +} + + // redlandea::fh_SmushSet + // Context::tryToGetImplicitTreeSmush() + // { + // using namespace redlandea; + + // if( m_tryToGetImplicitTreeSmushHasFailed_forDirectory ) + // return 0; + + // string earl = getURL(); + // earl += "/"; + // fh_TreeSmushing ts = getDefaultImplicitTreeSmushing(); + // const TreeSmushing::m_smushSets_t& a = ts->getAll(); + // TreeSmushing::m_smushSets_t::const_iterator ai = a.begin(); + // TreeSmushing::m_smushSets_t::const_iterator ae = a.end(); + + // LG_RDF_D << "Context::tryToGetImplicitTreeSmush() earl:" << earl << endl; + + // for( ; ai != ae ; ++ai ) + // { + // fh_SmushSet ret = ai->second; + // const SmushSet::m_smushes_t& sm = ret->getSmushes(); + // SmushSet::m_smushes_t::const_iterator si = sm.begin(); + // SmushSet::m_smushes_t::const_iterator se = sm.end(); + + // for( ; si != se; ++si ) + // { + // const string& n = si->first; + // fh_regex r = si->second; + + // LG_RDF_D << "Context::tryToGetImplicitTreeSmush() n:" << n << endl; + + // if( (*r)( earl ) ) + // { + // return ret; + // } + // } + // } + + // m_tryToGetImplicitTreeSmushHasFailed_forDirectory = true; + // return 0; + // } + + + + + Context::EnsureStartStopReadingIsFiredRAII::EnsureStartStopReadingIsFiredRAII( Context* c ) + : + m_c( c ) + { + m_c->EnsureStartReadingIsFired(); + } + Context::EnsureStartStopReadingIsFiredRAII::~EnsureStartStopReadingIsFiredRAII() + { + m_c->EnsureStopReadingIsFired(); + m_c->updateMetaData(); + } + + Context::emitExistsEventForEachItemRAII::emitExistsEventForEachItemRAII( Context* c ) + : + EnsureStartStopReadingIsFiredRAII( c ) + { + } + + Context::emitExistsEventForEachItemRAII::~emitExistsEventForEachItemRAII() + { + m_c->emitExistsEventForEachItem(); + } + + Context::staticDirContentsRAII::staticDirContentsRAII( Context* c ) + : + EnsureStartStopReadingIsFiredRAII( c ) + { + if( !m_c->empty() ) + m_c->emitExistsEventForEachItem(); + } + + Context::staticDirContentsRAII::~staticDirContentsRAII() + { + } + + void + Context::priv_ensureSubContext_helper_ins( fh_context c, bool created ) + { +// cerr << "priv_ensureSubContext_helper_ins() created:" << created << " c:" << c->getURL() << endl; + fh_context ret = Insert( GetImpl(c), created ); + bumpVersion(); + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +fh_context ExecuteQueryAgainstMyRDF( const std::string& sparql ) +{ + fh_model m = getDefaultFerrisModel(); + BindingsIterator iter = m->findBindings( sparql ); + BindingsIterator e; + stringset_t urls; + for( ; iter != e ; ++iter ) + { + fh_node n = iter[ "earl" ]; + if( n ) + { + urls.insert( n->getURI()->toString() ); + } + } + + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + for( stringset_t::iterator iter = urls.begin(); iter != urls.end(); ++iter ) + { + try + { + string earl = *iter; + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + + return selection; +} + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +// ExecAttribute::ExecAttribute( +// Attribute* parent, +// const std::string& rdn, +// const fh_runner& r ) +// : +// StreamingAttribute( parent, rdn ), +// Runner( r ) +// { +// RunnerStaticlyBound = isBound( Runner ); +// } + + +// fh_istream +// ExecAttribute::priv_getIStream( ferris_ios::openmode m ) +// throw (FerrisParentNotSetError, +// CanNotGetStream, +// exception) +// { +// if( !RunnerStaticlyBound ) +// { +// Runner = getRunner(); +// } + +// if( Runner->Run() ) +// { +// /* ok */ +// fh_istream filepipe = Runner->getStdOut(); +// return filepipe; +// } +// else +// { +// /* fail */ +// } + +// stringstream ss; +// ss << "ExecAttribute::priv_getIStream() path:" << getDirPath() +// << " exec/fork was a failure." +// << " ERR: " << Runner->getErrorString() +// << endl; +// Throw_CanNotGetStream(tostr(ss),this); +// } + + +// fh_runner +// ExecAttribute::getRunner() +// { +// return Runner; +// } + + + + + std::string getMimeName( fh_context c ) + { + string ret = getStrAttr( c, "mimetype", "" ); +// cerr << "getMimeName() c:" << c->getURL() << " ret:" << ret << endl; + if( ret.find(";")) + { + ret = ret.substr( 0, ret.find(";") ); + } + if( ret.find(" ")) + { + ret = ret.substr( 0, ret.find(" ") ); + } + + + + return ret; + } + + +void FerrisInternal::reparentSelectionContext( Context* parent, fh_context NewChildToAdopt, const std::string& rdn ) +{ + NewChildToAdopt->setContext( parent, rdn ); +} + + + namespace ImplementationDetail + { + stringset_t& getStaticLinkedRootContextNames() + { + static stringset_t ret; + return ret; + } + + bool appendToStaticLinkedRootContextNames( const std::string& s ) + { + getStaticLinkedRootContextNames().insert( s ); + return true; + } + + const ::Ferris::Handlable::ref_count_t MAX_REF_COUNT = 65530; + }; + + namespace ImplementationDetail + { + std::string getCURLProxyCommandLineOption() + { + string proxyname = getEDBString( FDB_GENERAL, "curl-use-proxy-name", "" ); + string proxyport = getEDBString( FDB_GENERAL, "curl-use-proxy-port", "" ); + stringstream ret; + if( !proxyname.empty() ) + { + ret << "--proxy " << proxyname; + if( !proxyport.empty() ) + ret << ":" << proxyport; + } + return tostr( ret ); + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + std::string getIOErrorDescription( fh_istream& ss ) + { + return getIOErrorDescription( ss, "" ); + } + + std::string getIOErrorDescription( fh_ostream& ss ) + { + return getIOErrorDescription( ss, "" ); + } + + std::string getIOErrorDescription( fh_iostream& ss ) + { + return getIOErrorDescription( ss, "" ); + } + + std::string getIOErrorDescription( fh_istream& ss, fh_context c ) + { + return getIOErrorDescription( ss, c->getURL() ); + } + + std::string getIOErrorDescription( fh_ostream& ss, fh_context c ) + { + return getIOErrorDescription( ss, c->getURL() ); + } + + std::string getIOErrorDescription( fh_iostream& ss, fh_context c ) + { + return getIOErrorDescription( ss, c->getURL() ); + } + + guint64 getIOErrorDescription_getOffset( fh_istream& ss ) + { +// ss.clear(); + guint64 offset = ss.tellg(); + return offset; + } + guint64 getIOErrorDescription_getOffset( fh_ostream& ss ) + { + guint64 offset = ss.tellp(); + return offset; + } + guint64 getIOErrorDescription_getOffset( fh_iostream& ss ) + { + return (guint64)(-1); + } + + + template< class T > + std::string getIOErrorDescription_priv( T& ss, + const std::string& earl, + const std::string& opcode = "" ) + { + stringstream zz; + zz << "I/O"; + if( !opcode.empty() ) + { + zz << " " << opcode; + } + zz << " ERROR"; + + guint64 offset = getIOErrorDescription_getOffset( ss ); +// cerr << "offset:" << offset << endl; +// if( offset != (guint64)(-1) ) +// { +// zz << " at:" << offset; +// } + if( !earl.empty() ) + zz << " with url:" << earl; + zz << " reason"; + return errnum_to_string( zz.str(), errno ); + } + + std::string getIOErrorDescription( fh_istream& ss, const std::string& earl ) + { + if( haveIOError( ss ) ) + { + return getIOErrorDescription_priv( ss, earl, "READ" ); + } + return ""; + } + + std::string getIOErrorDescription( fh_ostream& ss, const std::string& earl ) + { + if( haveIOError( ss ) ) + { + return getIOErrorDescription_priv( ss, earl, "WRITE" ); + } + return ""; + } + + std::string getIOErrorDescription( fh_iostream& ss, const std::string& earl ) + { + if( haveIOError( ss ) ) + { + return getIOErrorDescription_priv( ss, earl ); + } + return ""; + } + + + + bool haveIOError( fh_istream& ss ) + { + std::basic_streambuf< fh_istream::char_type >* rdbuf = ss.rdbuf(); + typedef ferris_stringbuf< fh_istream::char_type > frdbuf_t; + frdbuf_t* frdbuf = dynamic_cast< frdbuf_t* >( rdbuf ); + bool isStringStream = ( frdbuf != 0 ); +// cerr << "haveIOError()" +// << " eof:" << ss.eof() +// << " good:" << ss.good() +// << " is-stringstream:" << isStringStream +// << endl; + if( isStringStream ) + return ( !ss.good() ); + return ( !ss.eof() || !ss.good() ); + } + + bool haveIOError( fh_ostream& ss ) + { + return ( !ss.good() ); + } + + bool haveIOError( fh_iostream& ss ) + { + return ( !ss.good() ); + } + + +}; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/Ferris/Ferris.hh b/Ferris/Ferris.hh new file mode 100644 index 0000000..6498fb0 --- /dev/null +++ b/Ferris/Ferris.hh @@ -0,0 +1,3219 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferris.hh,v 1.70 2011/07/31 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/** + * Define the below to use boost::multi_index instead of std::set<> for + * storing the parent->child relation. + */ +//#define LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + +/*! \file Ferris.hh + \brief Main abstraction in ferris. + + Check out Context in this file and Attribute in Attribute.hh. +*/ + +#ifndef _ALREADY_INCLUDED_FERRIS_H_ +#define _ALREADY_INCLUDED_FERRIS_H_ + +#include + +#include +#include +#include +#include "Ferris/FerrisStdHashMap.hh" +#include +//#include +//#include + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifdef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS +#include +#include +#include +#include +#include +#include +#endif + +namespace Ferris +{ + typedef Loki::Functor< bool, LOKI_TYPELIST_1( const fh_context& ) > fh_matcher; + typedef std::list fh_matchers; + namespace Factory + { + typedef std::list< std::pair< std::string, std::string > > EndingList; + }; +}; +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +namespace Ferris +{ + namespace RDF {}; + namespace redlandea {}; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + +// std::string errnum_to_string( std::string prefix = "", int en = 0); + +}; + +#include +#include +#include +#include +#include +#include + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +namespace Ferris +{ +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility push(default) +#endif + + std::string getIOErrorDescription( fh_istream& ss ); + std::string getIOErrorDescription( fh_ostream& ss ); + std::string getIOErrorDescription( fh_iostream& ss ); + std::string getIOErrorDescription( fh_istream& ss, fh_context c ); + std::string getIOErrorDescription( fh_ostream& ss, fh_context c ); + std::string getIOErrorDescription( fh_iostream& ss, fh_context c ); + std::string getIOErrorDescription( fh_istream& ss, const std::string& earl ); + std::string getIOErrorDescription( fh_ostream& ss, const std::string& earl ); + std::string getIOErrorDescription( fh_iostream& ss, const std::string& earl ); + bool haveIOError( fh_istream& ss ); + bool haveIOError( fh_ostream& ss ); + bool haveIOError( fh_iostream& ss ); + + FERRISEXP_API fh_context saveFile( const std::string& parentURL, + const std::string& rdn_raw, + const std::string& byteContent, + bool shouldMonsterName = true, + bool overwrite = false ); + + FERRISEXP_API std::string getStrAttr( AttributeCollection* c, + const std::string& rdn, + const std::string& def, + bool getAllLines = false, + bool throw_for_errors = false ); + + FERRISEXP_API std::string getStrAttr( const fh_context& c, + const std::string& rdn, + const std::string& def, + bool getAllLines = false, + bool throw_for_errors = false ); + + FERRISEXP_API std::string getStrAttr( std::string earl, + const std::string& rdn, + const std::string& def, + bool getAllLines = false, + bool throw_for_errors = false ); + + + FERRISEXP_API fh_context setChild( fh_context c, + const std::string& rdn, + const std::string& v ); + + FERRISEXP_API std::string setStrAttr( fh_context c, + const std::string& rdn, + const std::string& v, + bool create = false, + bool throw_for_errors = true, + bool dontDelegateToOvermountContext = false ); +// FERRISEXP_API std::string setStrAttr( const char* earl, +// const std::string& rdn, +// const std::string& v, +// bool create = false, +// bool throw_for_errors = true, +// bool dontDelegateToOvermountContext = false ); + + + FERRISEXP_API time_t getTimeAttr( fh_context c, + const std::string& rdn, + time_t v, + bool throw_for_errors = false ); + + // New candidates for namespace prefixed attributes +// std::string& getStrAttrNS( const fh_context& c, +// const std::string& ns, +// const std::string& rdn, +// const std::string& def, +// std::string& ret, +// bool getAllLines = false, +// bool throw_for_errors = false ); + +// const std::string& setStrAttrNS( fh_context c, +// const std::string& ns, +// const std::string& rdn, +// const std::string& v, +// bool create = false, +// bool throw_for_errors = true ); + + FERRISEXP_API std::string getStrSubCtx( fh_context c, + std::string subname, + std::string def, + bool getAllLines = false, + bool throw_for_errors = false ); + FERRISEXP_API std::string getStrSubCtx( const std::string& earl, + std::string subname, + std::string def, + bool getAllLines = false, + bool throw_for_errors = false ); + FERRISEXP_API std::string getStrSubCtx( const std::string& earl, + std::string def, + bool getAllLines = false, + bool throw_for_errors = false ); + +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility pop +#endif +}; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +#include +#include +#include + +namespace Ferris +{ + class ChainedViewContext; + + class FERRISEXP_API CacheManager + { + public: + // Do we need stable iterators? +// typedef std::set freelist_t; + typedef FERRIS_STD_HASH_SET, + f_equal_to > freelist_t; + protected: + + freelist_t m_freelist; + freelist_t& getFreeList(); + +// typedef std::list clist_t; +// clist_t clist; +// clist_t& getCList(); + + int numberOfAllowedPermanentContextsInFreeList; + int maxNumberOfContextsToFreeAtOnce; + int maxNumberOfContextsInFreeList; + bool autoCleanUpCall; + long m_insideResolveCall; + bool m_insideCleanupCall; + + public: + + CacheManager(); + ~CacheManager(); + + void dumpFreeListTo( fh_ostream ss ); + int cleanUp( bool force = true ); + bool shouldAutoCleanUp(); + + struct InsideResolve : public Handlable + { + CacheManager* cm; + + InsideResolve( CacheManager* cm ) + : + cm( cm ) + { + cm->m_insideResolveCall++; + } + ~InsideResolve() + { + cm->m_insideResolveCall--; + } + }; + FERRIS_SMARTPTR( InsideResolve, fh_insideResolve ); + fh_insideResolve getInsideResolve(); + + bool insideCleanupCall(); + + int cleanUp_only_CreateMetaDataContext( bool force = false ); + }; + + + FERRISEXP_API CacheManager* getCacheManager(); + + namespace Private + { + class CacheManagerImpl; + FERRISEXP_DLLLOCAL CacheManagerImpl* getCacheManagerImpl(); + }; + + + /** + * uses dumpEntireContextListMemoryManagementData to dump data to cerr + * prefixed with 's' to identify this checkpoint. + * + * This should only be used by developers of libferris and core tools. + */ + FERRISEXP_API void DEBUG_dumpcl( std::string s ); + + /** + * Make a snapshot of all the contexts know and their reference counts + * and place it into the file filenamePrefix_now().fmemd + */ + FERRISEXP_API void DEBUG_dumpcl_to_file( const std::string& filenamePrefix ); + + + template< class T > + class CacheManaged + { + protected: + +// CacheManager OurCacheManager; + + public: + + Private::CacheManagerImpl* getCacheManager() + { + return Private::getCacheManagerImpl(); + } + }; + +}; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +#include + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +namespace Ferris +{ + + /* + * Public interface for a collection of Context objects. + */ + class FERRISEXP_API ContextCollection + { + public: + + /** + * Prevent bad deletes + */ + virtual ~ContextCollection() {} + + /** + * STL collection type for getSubContextNames(). + */ + typedef std::list< std::string > SubContextNames_t; + + /** + * Get an STL collection of all the rdns that are within this context. + * + * @see Attribute::getDirName() + * @see isSubContextBound() + * @see getSubContext() + * + * @return Collection of the all rdn(s) of each subcontext + */ + virtual SubContextNames_t& getSubContextNames() = 0; + + /** + * Check to see if there is a subcontext with the given rdn + * + * @see Attribute::getDirName() + * @see getSubContextNames() + * @see getSubContext() + * + * @param rdn The rdn to look for a subcontext with getDirName() == rdn + * @return true if there is a subcontext with getDirName() == rdn + */ + virtual bool isSubContextBound( const std::string& rdn ) = 0; + + /** + * Get a handle to the subcontext with the given rdn. + * + * @see Attribute::getDirName() + * @see isSubContextBound() + * @see getSubContextNames() + * + * @throws NoSuchSubContext If there is no subcontext with getDirName() == rdn + * @param rdn The rdn of the subcontext to get + * @return The context with rdn == getDirName() + */ + virtual fh_context getSubContext( const std::string& rdn ) throw( NoSuchSubContext ) = 0; + + /** + * Deprecated, use getSubContextCount() instead. + * + * @return Number of subcontexts + */ + virtual int SubContextCount() = 0; + + /** + * Get a count of the number of subcontexts. + * + * @return Number of subcontexts + */ + virtual int getSubContextCount() + { + return SubContextCount(); + } + + bool empty() + { + return getSubContextCount() == 0; + } + }; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * Public interface for events that a mutable collection of contexts can fire. + * + * Note that these events are fired from the supercontext of the context that + * they are occuring to. For example if a file "/tmp/test" is changed then the + * "/tmp/" context will fire a changed event indicating that "test" has changed. + * + * @see NamingEvent + * @see NamingEvent_Changed + * @see NamingEvent_Deleted + * @see NamingEvent_Start_Execute + * @see NamingEvent_Stop_Execute + * @see NamingEvent_Created + * @see NamingEvent_Moved + * @see NamingEvent_Exists + * @see NamingEvent_Start_Reading_Context + * @see NamingEvent_Stop_Reading_Context + */ + class FERRISEXP_API MutableCollectionEvents + { + public: + + /** + * Ensure no slicing + */ + virtual ~MutableCollectionEvents() + { + } + + /** + * Emitted when a medallion has changed either due to calls by this process + * to update the medallion addEmblem(), removeEmblem() etc or due to the + * medallion being changed by another process and this proc having been + * notified of that change. If this signal is fired due to the medallion + * changing by another proc then it will be fired after the medallion + * has been updated in the local address space. + * + * @see Medallion::addEmblem() + * @see Medallion::removeEmblem() + * + */ + typedef sigc::signal1< void, fh_context > NamingEvent_MedallionUpdated_Sig_t; + + /** + * Context changed signal type. This signal consists of a special changed + * object, the olddn and newdn. For this siganl type the olddn and newdn + * are always identical. + * + * What defines a change is context specific, usually this signal means + * that the contents of that context has changed. You can get the contents + * of the context using getIStream() or getIOStream(). This signal is also + * emitted when the metadata of a context has changed. + * + * @see getIStream() + * @see getIOStream() + * + * @see getNamingEvent_Changed_Sig() + * @see NamingEvent + * @see NamingEvent_Changed + * + */ + typedef sigc::signal3< void, + NamingEvent_Changed*, + std::string, std::string> NamingEvent_Changed_Sig_t; + + + /** + * Context deleted signal type. + * + * This signal consists of a special deleted + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are always identical. + * + * This signal is emitted prior to removing the data from the ferris system. + * Though the ferris Context system knows about the old context when this + * signal is emitted, it may already be gone from the underlying VFS code, + * for example, in a filesystem, the file will no longer exist, so getting + * exact data, an istream, or some EA may not work as it would prior to + * the context being deleted or this signal being emitted. + * + * @see getNamingEvent_Deleted_Sig() + * @see NamingEvent + * @see NamingEvent_Deleted + * + */ + typedef sigc::signal3< void, + NamingEvent_Deleted*, + std::string, std::string> NamingEvent_Deleted_Sig_t; + + /** + * Context has started being executed signal type. + * + * This signal consists of a special start_exe + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are always identical. + * + * Note that this signal is emitted after the context has started to execute. + * + * @see getNamingEvent_Start_Execute_Sig() + * @see NamingEvent + * @see NamingEvent_Start_Reading_Context + * @see NamingEvent_Stop_Reading_Context + */ + typedef sigc::signal3< void, + NamingEvent_Start_Execute*, + std::string, std::string> NamingEvent_Start_Execute_Sig_t; + + /** + * Context has stopped being executed signal type. + * + * This signal consists of a special stop_exe + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are always identical. + * + * Note that this signal is emitted after the context has stopped executing. + * + * @see getNamingEvent_Stop_Execute_Sig() + * @see NamingEvent + * @see NamingEvent_Start_Reading_Context + * @see NamingEvent_Stop_Reading_Context + */ + typedef sigc::signal3< void, + NamingEvent_Stop_Execute*, + std::string, std::string> NamingEvent_Stop_Execute_Sig_t; + + /** + * Context has been created signal type. + * + * This signal consists of a special created + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are always identical. + * + * This signal is different than NamingEvent_Exists_Sig_t because this signal + * flags the creation of a new context, whereas NamingEvent_Exists_Sig_t signals + * the discovery of an already existing context (eg, during a read() operation). + * + * Note that this signal is emitted after the context has been created. + * + * @see getNamingEvent_Created_Sig() + * @see NamingEvent + * @see NamingEvent_Created + */ + typedef sigc::signal4< void, + NamingEvent_Created*, + const fh_context&, + std::string, std::string> NamingEvent_Created_Sig_t; + + /** + * Context has been discovered to exist already signal type. + * + * This signal consists of a special exists + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are always identical. + * + * This signal is different than NamingEvent_Created_Sig_t because this signal + * flags the discovery of an already existing context and not the creation of + * a new context. + * + * @see getNamingEvent_Exists_Sig() + * @see NamingEvent + * @see NamingEvent_Exists + */ + typedef sigc::signal4< void, + NamingEvent_Exists*, + const fh_context&, + std::string, std::string> NamingEvent_Exists_Sig_t; + + /** + * Context has been moved signal type. + * + * This signal consists of a special moved + * object, the olddn and newdn. + * For this siganl type the olddn and newdn are different. + * + * Note that this signal is emitted after the context has been moved. + * + * @see getNamingEvent_Moved_Sig() + * @see NamingEvent + * @see NamingEvent_Moved + */ + typedef sigc::signal3< void, + NamingEvent_Moved*, + std::string, std::string> NamingEvent_Moved_Sig_t; + + /** + * Context has started to be read() signal type. + * + * This signal is emitted when read() is called. + * + * Using this signal a client can setup a progress meter using + * Context::guessSize() and can connect to the + * NamingEvent_Stop_Reading_Context_Sig_t to clean up the progress dispaly + * and indicate read completion. + * + * @see getNamingEvent_Start_Reading_Context_Sig() + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see Context::read() + * @see NamingEvent + * @see NamingEvent_Start_Reading_Context + * @see NamingEvent_Stop_Reading_Context + */ + typedef sigc::signal1< void, + NamingEvent_Start_Reading_Context* + > NamingEvent_Start_Reading_Context_Sig_t; + + + /** + * Context has finished being read() signal type. + * + * This signal is emitted when read() is finished discovering contexts. + * + * Using this signal a client can do post read() work. + * + * @see getNamingEvent_Start_Reading_Context_Sig() + * @see getNamingEvent_Stop_Reading_Context_Sig() + * @see Context::read() + * @see NamingEvent + * @see NamingEvent_Start_Reading_Context + * @see NamingEvent_Stop_Reading_Context + */ + typedef sigc::signal1< void, + NamingEvent_Stop_Reading_Context* + > NamingEvent_Stop_Reading_Context_Sig_t; + + /** + * For contexts that represent network data this event is fired + * when getIStream() or getIOStream() is called and headers are + * received over the network. + * + * The main use of this signal is to obtain the size/mtime etc info + * for setting GUIs and download progress meters properly and up front. + * + * Spawning children using fcat and specific command line options + * together with Runner::setAsyncStdOutFunctor() one can have many + * child processes and read header information from them before they + * have transfered the entire file. + * + * see fcat and ferris-fnews for an example of this usage + * + * @see Context::getIStream() + * @see Context::getIOStream() + * @see getStrAttr() + * @see Runner::setAsyncStdOutFunctor() + * + * @param fh_context Context that has received headers + * @param stringset_t collection of the names of header that were obtained. + * use getStrAttr( c, set[k] ) to get the values of these keys + */ + typedef sigc::signal2< void, + fh_context, + const stringset_t& > ContextEvent_Headers_Received_Sig_t; + + /** + * get access to the NamingEvent_MedallionUpdated_Sig_t signal + * @return Signal + */ + virtual NamingEvent_MedallionUpdated_Sig_t& getNamingEvent_MedallionUpdated_Sig() = 0; + + /** + * Get access to the NamingEvent_Changed_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Changed_Sig_t& getNamingEvent_Changed_Sig() = 0; + + /** + * Get access to the NamingEvent_Deleted_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Deleted_Sig_t& getNamingEvent_Deleted_Sig() = 0; + + /** + * Get access to the NamingEvent_Start_Execute_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Start_Execute_Sig_t& getNamingEvent_Start_Execute_Sig() = 0; + + /** + * Get access to the NamingEvent_Stop_Execute_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Stop_Execute_Sig_t& getNamingEvent_Stop_Execute_Sig() = 0; + + /** + * Get access to the NamingEvent_Created_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Created_Sig_t& getNamingEvent_Created_Sig() = 0; + + /** + * Get access to the NamingEvent_Moved_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Moved_Sig_t& getNamingEvent_Moved_Sig() = 0; + + /** + * Get access to the NamingEvent_Exists_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Exists_Sig_t& getNamingEvent_Exists_Sig() = 0; + + /** + * Get access to the NamingEvent_Start_Reading_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Start_Reading_Context_Sig_t& + getNamingEvent_Start_Reading_Context_Sig() = 0; + + /** + * Get access to the NamingEvent_Stop_Reading_Sig_t signal. + * @returns Signal + */ + virtual NamingEvent_Stop_Reading_Context_Sig_t& + getNamingEvent_Stop_Reading_Context_Sig() = 0; + + /** + * Get access to the ContextEvent_Headers_Received_Sig_t signal. + * @returns Signal + */ + virtual ContextEvent_Headers_Received_Sig_t& + getContextEvent_Headers_Received_Sig() = 0; + + + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * Body of Context::StreamIsOpeningHandler() made a global function to limit + * the scope of some of the friend declarations needed. This function must + * be a friend of Context, Handlable and Ferris_commonstream. + */ + class FERRISEXP_DLLLOCAL ContextStreamMemoryManager + { + typedef Ferris_commonstream< + fh_istream::char_type, + fh_istream::traits_type >::sh_t sh_t; + public: + static void StreamIsOpeningHandler( Context* selfp, fh_istream& ss ); + static void StreamIsOpeningHandler( Context* selfp, AttributeProxy* a, fh_istream& ss ); + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + namespace Private + { + template < typename ResultType, class DownCastContext, class Fun > + class StatelessFunctorDispatcherHelper + { + Fun fun_; + ResultType Fire( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return fun_( static_cast(c), rdn, atom ); + } + public: + StatelessFunctorDispatcherHelper(const Fun& fun) : fun_(fun) {} + + ResultType operator()( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return Fire( c, rdn, atom ); + } + }; + + template < typename ResultType, class DownCastContext, class Fun > + class StatelessClosedFunctorDispatcherHelper + { + Fun fun_; + ResultType Fire( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + return fun_( static_cast(c), rdn, atom, ss ); + } + public: + StatelessClosedFunctorDispatcherHelper(const Fun& fun) : fun_(fun) {} + + ResultType operator()( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + return Fire( c, rdn, atom, ss ); + } + }; + + template < typename ResultType, class DownCastContext, class Fun > + class StatelessFunctorDispatcherHelper_PassedInStream + { + Fun fun_; + ResultType Fire( Context* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) + { + return fun_( static_cast(c), rdn, atom, ss ); + } + public: + StatelessFunctorDispatcherHelper_PassedInStream(const Fun& fun) : fun_(fun) {} + + ResultType operator()( Context* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) + { + return Fire( c, rdn, atom, ss ); + } + }; +// template < typename ResultType, class DownCastContext, class Fun > +// class StatelessFunctorDispatcherHelper_IO_PassedInStream +// { +// Fun fun_; +// fh_stringstream& Fire( Context* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ret ) +// { +// return fun_( static_cast(c), rdn, atom, ret ); +// } +// public: +// StatelessFunctorDispatcherHelper_IO_PassedInStream(const Fun& fun) : fun_(fun) {} + +// ResultType operator()( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// fh_stringstream ret; +// Fire( c, rdn, atom, ret ); +// return ret; +// } +// }; + } + + template + struct StateLessEAHolderTraits + { + typedef ParentCtx _Base; + typedef ParentCtx _ParentCtx; + typedef ChildCtx _ChildCtx; + + + + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > GetIStream_Func_t; + typedef Loki::Functor< fh_stringstream&, + LOKI_TYPELIST_4( Context*, + const std::string&, + EA_Atom*, + fh_stringstream& ) > GetIStream_PassedInStream_Func_t; + typedef Loki::Functor< fh_iostream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > GetIOStream_Func_t; + typedef Loki::Functor< void, + LOKI_TYPELIST_4( Context*, + const std::string&, + EA_Atom*, + fh_istream ) > IOStreamClosed_Func_t; + +typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_3( ChildCtx*, + const std::string&, + EA_Atom* ) > StateLessIEA_t; + +typedef Loki::Functor< fh_stringstream&, + LOKI_TYPELIST_4( ChildCtx*, + const std::string&, + EA_Atom*, + fh_stringstream& ) > StateLessIEA_PassedInStream_t; + +typedef Loki::Functor< fh_iostream, + LOKI_TYPELIST_3( ChildCtx*, + const std::string&, + EA_Atom* ) > StateLessIOEA_t; + +typedef Loki::Functor< fh_stringstream&, + LOKI_TYPELIST_4( ChildCtx*, + const std::string&, + EA_Atom*, + fh_stringstream& ) > StateLessIOEA_PassedInStream_t; + +typedef Loki::Functor< void, + LOKI_TYPELIST_4( ChildCtx*, + const std::string&, + EA_Atom*, + fh_istream ) > StateLessIOClosedEA_t; +}; + + struct StateLessAttacher; + template + class StateLessEAHolder + : + public ParentCtx + { + friend void attachStatelessSchema( Context* c, const std::string& rawname, XSDBasic_t t ); + friend struct StateLessAttacher; + + protected: + + typedef StateLessEAHolder< ChildCtx, ParentCtx > _Self; + typedef StateLessEAHolderTraits _Traits; + typedef typename _Traits::_Base _Base; + typedef typename _Traits::_ParentCtx _ParentCtx; + typedef typename _Traits::_ChildCtx _ChildCtx; + typedef typename _Traits::StateLessIEA_t StateLessIEA_t; + typedef typename _Traits::StateLessIEA_PassedInStream_t StateLessIEA_PassedInStream_t; + typedef typename _Traits::StateLessIOEA_t StateLessIOEA_t; + typedef typename _Traits::StateLessIOEA_PassedInStream_t StateLessIOEA_PassedInStream_t; + typedef typename _Traits::StateLessIOClosedEA_t StateLessIOClosedEA_t; + typedef typename _Traits::GetIStream_Func_t GetIStream_Func_t; + typedef typename _Traits::GetIStream_PassedInStream_Func_t GetIStream_PassedInStream_Func_t; + typedef typename _Traits::GetIOStream_Func_t GetIOStream_Func_t; + typedef typename _Traits::IOStreamClosed_Func_t IOStreamClosed_Func_t; + + bool isStateLessEAVirgin() + { + static bool v = true; + bool ret = v; + v = false; + return ret; + } + + /** + * Attempt to add a stateless attribute with the name rdn and a function + * fi that is called whenever the ea value is requested. The ea will be + * read only. + * + * Note that one should consider choosing a value other than the defualt + * Unknown schema from the XSDBasic_t enumeration so that browsing tools + * can manipulate the value in a more user friendly way. Note that the sct + * parameter is augmented as being read only because there is no function to + * get an iostream for this attribute. + */ + void + tryAddStateLessAttribute( const std::string& rdn, + const StateLessIEA_t& fi, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + typedef GetIStream_Func_t FunctorType; + typedef Private::StatelessFunctorDispatcherHelper + < fh_istream, ChildCtx, StateLessIEA_t > Adapter; + + atx = new EA_Atom_ReadOnly( FunctorType( Adapter( fi ) ) ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, + XSDBasic_t(sct | FXDC_READONLY) ); + } + catch( std::exception& e ) + { + } + } + void + tryAddStateLessAttributePI( const std::string& rdn, + const StateLessIEA_PassedInStream_t& fi, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + typedef GetIStream_PassedInStream_Func_t FunctorType; + typedef Private::StatelessFunctorDispatcherHelper_PassedInStream + < fh_stringstream&, ChildCtx, StateLessIEA_PassedInStream_t > Adapter; + + atx = new EA_Atom_ReadOnly_PassedInStream( FunctorType( Adapter( fi ) ) ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, + XSDBasic_t(sct | FXDC_READONLY) ); + } + catch( std::exception& e ) + { + } + } + + /** + * Attempt to add a stateless attribute with the name rdn and a function + * fi that is called whenever the ea value is requested. The fio function + * will be called whenever a read/write iostream is requested. the fioc + * function will be called when the last user reference to an iostream obtained + * from fio() is dropped. + * The ea will be read/write depending on which API call the user makes. + * + * Note that one should consider choosing a value other than the defualt + * Unknown schema from the XSDBasic_t enumeration so that browsing tools + * can manipulate the value in a more user friendly way + */ + void + tryAddStateLessAttribute( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + + typedef Private::StatelessFunctorDispatcherHelper + < fh_istream, ChildCtx, StateLessIEA_t > Adapter_i; + typedef Private::StatelessFunctorDispatcherHelper + < fh_iostream, ChildCtx, StateLessIOEA_t > Adapter_io; + typedef Private::StatelessClosedFunctorDispatcherHelper + < void, ChildCtx, StateLessIOClosedEA_t > Adapter_closed; + + atx = new EA_Atom_ReadWrite( + GetIStream_Func_t( Adapter_i( fi ) ), + GetIOStream_Func_t( Adapter_io( fio ) ), + IOStreamClosed_Func_t( Adapter_closed( fioc ) ) + ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, sct ); + } + catch( std::exception& e ) + { + } + } + void + tryAddStateLessAttributePI( const std::string& rdn, + const StateLessIEA_PassedInStream_t& fi, +// const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + typedef Private::StatelessFunctorDispatcherHelper_PassedInStream + < fh_stringstream&, ChildCtx, StateLessIEA_PassedInStream_t > Adapter_i; +// typedef Private::StatelessFunctorDispatcherHelper_IO_PassedInStream +// < fh_iostream, ChildCtx, StateLessIEA_PassedInStream_t > Adapter_io; + typedef Private::StatelessClosedFunctorDispatcherHelper + < void, ChildCtx, StateLessIOClosedEA_t > Adapter_closed; + + atx = new EA_Atom_ReadWrite_PassedInStream( + GetIStream_PassedInStream_Func_t( Adapter_i( fi ) ), +// GetIOStream_Func_t( Adapter_io( fi ) ), + IOStreamClosed_Func_t( Adapter_closed( fioc ) ) + ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, sct ); + } + catch( std::exception& e ) + { + } + } + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + + /** + * See the warning about OpenModeCached in + * Attribute.hh/class EA_Atom_ReadWrite_OpenModeCached + * please don't use this method unless needed, use the above standard + * tryAddStateLessAttribute() methods + */ + void + tryAddStateLessAttribute_OpenModeCached( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + typedef Private::StatelessFunctorDispatcherHelper + < fh_istream, ChildCtx, StateLessIEA_t > Adapter_i; + typedef Private::StatelessFunctorDispatcherHelper + < fh_iostream, ChildCtx, StateLessIOEA_t > Adapter_io; + typedef Private::StatelessClosedFunctorDispatcherHelper + < void, ChildCtx, StateLessIOClosedEA_t > Adapter_closed; + + atx = new EA_Atom_ReadWrite_OpenModeCached( + GetIStream_Func_t( Adapter_i( fi ) ), + GetIOStream_Func_t( Adapter_io( fio ) ), + IOStreamClosed_Func_t( Adapter_closed( fioc ) ) + ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, sct ); + } + catch( std::exception& e ) + { + } + } + + + /** + * Because the content EA maps to getIOStream() on the context, + * it doesn't need a "closed" function so this class/method was added. + * + * Note that in the future if the closed functor can be passed a null value + * and a operator== exists for functors then we might move to passing a null updator + */ + void + tryAddStateLessAttribute_Contents( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + XSDBasic_t sct = XSD_UNKNOWN ) + { + try + { + EA_Atom* atx = 0; + + typedef Private::StatelessFunctorDispatcherHelper + < fh_istream, ChildCtx, StateLessIEA_t > Adapter_i; + typedef Private::StatelessFunctorDispatcherHelper + < fh_iostream, ChildCtx, StateLessIOEA_t > Adapter_io; + typedef Private::StatelessClosedFunctorDispatcherHelper + < void, ChildCtx, StateLessIOClosedEA_t > Adapter_closed; + + atx = new EA_Atom_ReadWrite_Contents( + GetIStream_Func_t( Adapter_i( fi ) ), + GetIOStream_Func_t( Adapter_io( fio ) ) ); + this->setAttribute( rdn, atx, false, sct, true ); + attachStatelessSchema( static_cast(this), rdn, sct ); + } + catch( std::exception& e ) + { + } + } + + + virtual void getTypeInfos( std::list< Loki::TypeInfo >& l ) + { + l.push_back( typeid( _Self ) ); + _Base::getTypeInfos( l ); + } + + public: + + explicit StateLessEAHolder( Context* parent, const std::string& rdn ) + : + ParentCtx( parent, rdn ) + {} + + explicit StateLessEAHolder( const fh_context& parent, + const fh_context& target, + const std::string& localName, + bool setupEventConnections ) + : + ParentCtx( parent, target, localName, setupEventConnections ) + {} + + explicit StateLessEAHolder() + : + ParentCtx() + {} + + explicit StateLessEAHolder( const fh_context& delegate ) + : + ParentCtx( delegate ) + {} + }; + +}; + +#include +#include + +namespace Ferris +{ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct ContextSetComparePData; + struct FERRISEXP_DLLLOCAL ContextSetCompare + { + ContextSetCompare( fh_sorter s ); + ContextSetCompare( const std::string& s = "name" ); + ContextSetCompare( const ContextSetCompare& ci ); + ContextSetCompare& operator=( const ContextSetCompare& ci ); + ~ContextSetCompare(); + + bool operator()( const fh_context& s1, + const fh_context& s2 ) const; + + // special overload used by Context::ctx_lower_bound() + bool operator()( const fh_context& s1, + const std::string& name ) const; + + private: + + void setup( const std::string& s ); + ContextSetComparePData*const d; + friend bool operator==( const ContextSetCompare& a, const ContextSetCompare& b ); + }; + bool operator==( const ContextSetCompare& a, const ContextSetCompare& b ); + bool operator!=( const ContextSetCompare& a, const ContextSetCompare& b ); + + namespace Factory + { + /** + * Create a sorting definition string that gives all the objects in the + * original in reverse order. + */ + FERRISEXP_API std::string ReverseSortStringOrder( std::string s ); + + /** + * Construct a preprocessed description of a sorting definition. + * If you are intending to use a sortng definition many times it is + * recommended you make a fh_sorter with this method and use the same + * fh_sorter object in many invocations of MakeSortedContext(). + * + * Even if your app notices no real speed gain today using these two + * methods will allow speed gain later with no code changes in your app. + */ + FERRISEXP_API fh_sorter MakeSorter( const std::string& s ); + + /** + * Make a sorted version of ctx using the sort order defined in 's' and return it. + * + * The order spec is either a string describing a sort order $x$ or a list of such + * strings contained in $()$ brackets. + * + * The format for $x$ is the name of the attribute to sort on with an optional $:meta:$ + * prefix for this sort. The meta applies only to the following attribute and + * can add reverse ordering (!), lazy ordering (L), or explicitly specifiy the + * type to use for the sort; numeric (#), floating point(FLOAT), case insensitive + * string (CIS) or version sort (V). Version sort gives the semantics of + * ``ls(1) -v'', lazy ordering performs a normal sort and then new objects added + * to the context are appended to the sort order (much like Microsoft File Explorer). + * + * @param ctx underlying context to build sorted context from + * @param s sorting order definition + * @return sorted version of ctx using 's' as sorting definition + */ + FERRISEXP_API fh_context MakeSortedContext( fh_context& ctx, const std::string& s ); + + /** + * See the other version of MakeSortedContext() for details. The only difference is + * that 'f' defines the preprocessed version of the sorting definition. + * + * Apart from potentially being much faster for making a lot of sorted contexts + * this method is logically equal to + * + * fh_context ctx = ...; + * string s = ... my sort ordering string ...; + * fh_context sorted = MakeSortedContext( ctx, MakeSorter( s ) ); + * + * @see MakeSorter() + */ + FERRISEXP_API fh_context MakeSortedContext( fh_context& ctx, fh_sorter& f ); + }; + + + /** + * adjust the eaname to one that is preferred to sort on. + * For example, given an eaname like size-human-readable this returns "size". + */ + std::string adjustEANameForSorting( const std::string& s ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility push(default) +#endif + + fh_context SL_SubCreate_alwaysThrow( fh_context c, fh_context md ); + fh_context SL_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_SubCreate_dir( fh_context c, fh_context md ); + fh_context SL_SubCreate_ea( fh_context c, fh_context md ); + fh_context SL_SubCreate_text ( fh_context c, fh_context md ); + fh_context SL_edb_SubCreate_dir( fh_context c, fh_context md ); + fh_context SL_edb_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_ipc_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_ipc_sem_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_db4_SubCreate_dir( fh_context c, fh_context md ); + fh_context SL_db4_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_commondb_SubCreate_dir( fh_context c, fh_context md ); + fh_context SL_commondb_SubCreate_file( fh_context c, fh_context md ); + fh_context SL_SubCreate_commondb ( fh_context c, fh_context md ); + fh_context SL_ldap_SubCreate_context( fh_context c, fh_context md ); + +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility pop +#endif + + /** + * Main VFS abstraction. This is the equal of a file/dir in a normal VFS. + * BEGINCTX BEGINCONTEXT + */ + class FERRISEXP_API Context + : +// public StateLessEAHolder< Context, Attribute >, +// public AttributeCollection, + public Attribute, + public StateLessEAHolder< Context, AttributeCollection >, + public ContextCollection, + public MutableCollectionEvents, + public CacheManaged + { + typedef Context _Self; + +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend std::string monsterName( const fh_context& c, const std::string& rdn ); +#endif + friend class Private::CacheManagerContextStateInTime; + friend fh_context Resolve( const std::string dirty_earl, ResolveStyle rs ); + friend class RemembranceTopLevelContext; + friend class HalRootContext; + friend class childContext; + friend class NameMonsteringPolicy_AppendNumber; + friend class SortedContext; + friend class CachedContext; + friend class FilteredContext; + friend class InheritingEAContext; + friend class DiffContext; + friend class ManyBaseToOneViewContext; + friend class externalContext; + friend class SqlPlusTupleContext; + friend class RootContextFactory; + friend class NativeContext; + friend class SelectionFactoryContext; + friend class ChainedViewContext; + friend class FerrisInternal; + friend class RPMContext; + friend class RPMRootContext; + friend class RPMPackageContext; + friend class EmblemCommonCreator; + friend class RedlandRootContext; + friend class RedlandStatementContext; + friend class FerrisGPGSignaturesInternalContext; + friend class FerrisBranchInternalContext; + friend class DelayedCommitParentContext; + friend class recordfileContext; + + typedef StateLessEAHolder< Context, AttributeCollection > SL; +#define FERRIS_LS FERRISEXP_DLLLOCAL static +#define FERRIS_ES FERRISEXP_DLLLOCAL static + FERRIS_LS fh_istream SL_getSubContextCountStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getAttributeCountStream( Context* c, const std::string& rdn, EA_Atom* attr ); +// friend fh_istream SL_getAttributeCountStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRISEXP_API static fh_istream SL_getDirNameStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRISEXP_API static fh_iostream SL_getDirNameIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void SL_RenameContext( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + FERRIS_LS fh_istream SL_getParentDirNameStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getParentURLStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getDirNameExtensionStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getRecommendedEAStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getRecommendedEAShortStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getRecommendedEAUnionStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getRecommendedEAUnionViewStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void recommendedEAUnionViewAdd( std::set& theSet, Context* c ); + + FERRIS_LS fh_istream SL_getEANamesStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getRecursiveSubcontextCountStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_iostream SL_getRecursiveSubcontextCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void SL_FlushAggregateData( Context* c, const std::string& rdn, EA_Atom* atom, + fh_istream ss ); + FERRIS_LS fh_iostream SL_getRecursiveSubcontextMaxDepthIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS fh_istream SL_getXTimeCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream getTimeStrFTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ); +// FERRIS_LS fh_istream SL_getTimeStrFTimeIStream( Context* c, const std::string& rdn, EA_Atom* atom ); + protected: + FERRIS_LS fh_stringstream SL_getTimeStrFTimeIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + private: + FERRIS_LS fh_istream SL_getXTimeDayGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getXTimeMonthGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getXTimeYearGranularityStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getSizeFromContentIStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS void SL_setTimeStrFTimeStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + FERRIS_LS fh_istream SL_getSizeHumanReadableStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getContentIStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getIsRemote( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_iostream SL_getAsXML( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_istream SL_getAsText( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS fh_stringstream SL_getIsActiveView( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getForcePassiveView( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS fh_stringstream SL_getIsDir( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getIsDirTryAutoMounting( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getFerrisCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getOnlyFerrisMetadataCTimeStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getFerrisShouldReindexIfNewerStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS fh_istream SL_getFollowLinkAsFerrisFSSizeStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRIS_LS fh_stringstream SL_hasEmblem( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_hasEmblemFuzzy( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void SL_hasEmblemStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + FERRIS_LS fh_stringstream SL_getEmblemTime( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getEmblemList( int cutoff, Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getEmblemListAll( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getEmblemListDefault( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getEmblemUpset( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getHasMedallion( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getLanguageHuman( Context* c, const std::string& rdn, EA_Atom* atom ); + + protected: + FERRIS_LS fh_stringstream SL_getNothingStream( Context* c,const std::string& rdn, EA_Atom* atom ); + FERRIS_LS fh_stringstream SL_getStreamWithNumberOneStream( Context* c,const std::string& rdn, EA_Atom* atom ); + + +#undef FERRIS_ES +#undef FERRIS_LS + + protected: + FERRISEXP_API static fh_istream SL_getHasSubContextsGuessStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + template + FERRISEXP_API static fh_iostream SL_getIsUnRemembered( Context* c, const std::string& rdn, EA_Atom* atom ); + template + FERRISEXP_API static void SL_setIsUnRemembered( + Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + template + FERRISEXP_API static fh_istream SL_getLastRememberedSubContexts( Context* c, const std::string& rdn, EA_Atom* atom ); + template + FERRISEXP_API static fh_istream SL_getRemembranceTime( Context* c, const std::string& rdn, EA_Atom* atom ); + template + FERRISEXP_API static fh_iostream SL_getRemembranceCommand( Context* c, const std::string& rdn, EA_Atom* atom ); + template + FERRISEXP_DLLLOCAL static void + SL_setRemembranceCommand( Context* c, + const std::string& rdn, + EA_Atom* atom, fh_istream ss ); + + + private: +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend FERRISEXP_API fh_display_aggdata getCachedContextAggregateData( fh_context c, int m=0 ); +#endif + + /************************************************************/ + /************************************************************/ + /************************************************************/ + /*** These two are used by Context to augment a list of *****/ + /*** the EA names which are stateless for this object type **/ + /************************************************************/ + /************************************************************/ + public: + static stringset_t& getContextClassStatelessEANames(); + private: + + + void + ContextClass_SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + XSDBasic_t sct = XSD_UNKNOWN ); + void + ContextClass_SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct = XSD_UNKNOWN ); + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + typedef FERRIS_STD_HASH_MAP< Context* const, + time_t, + f_hash, + f_equal_to > s_downloadMTimeSince_t; +// typedef std::hash_map< Context* const, time_t > s_downloadMTimeSince_t; + s_downloadMTimeSince_t& s_downloadMTimeSince(); + + FERRISEXP_DLLLOCAL static fh_istream + SL_getFerrisCurrentTimeIStream( Context* c, + const std::string& rdn, + EA_Atom* atom ); + + FERRISEXP_DLLLOCAL static fh_istream + SL_getDownloadIfMTimeSinceIStream( Context* c, + const std::string& rdn, + EA_Atom* atom ); + FERRISEXP_DLLLOCAL static fh_iostream + SL_getDownloadIfMTimeSinceIOStream( Context* c, + const std::string& rdn, + EA_Atom* atom ); + FERRISEXP_DLLLOCAL static void + SL_downloadIfMTimeSinceClosed( Context* c, + const std::string& rdn, + EA_Atom* atom, fh_istream ss ); + + protected: + + bool testDownloadIfMTimeSince( time_t mtime = 0, bool force = true ); + + time_t getDownloadIfMTimeSince(); + void setDownloadIfMTimeSince( time_t x ); + + private: + + /** + * Stateless EA generator that calls getAsRDFXML() to get an RDF/XML file + * for this context. + */ + static fh_iostream SL_getAsRDF( Context* c, const std::string& rdn, EA_Atom* atom ); + + protected: + /** + * Place the RDF/XML for this context into the given stream. This method + * is not ment to be recursive, ie. its purpose is to export the context's + * EA as an RDF/XML document but not to include the children contexts info. + */ + virtual fh_stringstream& getAsRDFXML( fh_stringstream& ss ); + + /** + * some clients will need to allow a "refresh" button on contexts that + * are difficult or expensive to have active hot views for. If the + * viewer should call read(true) to get the latest view then this + * will return true. Note that this is is different to the module + * actually supporting active views as would be the case just using + * supportsMonitoring(), this tells if for a given context active + * viewing is actually occuring. For example, a plugin may support + * active viewing using a high level network API but have a fallback + * to polling mode if that API is not present. A more interesting example + * is when the user has explicitly blocked active views on the URL, + * such as blocking updates on /tmp + * + * @see supportsMonitoring() + * @see getForcePassiveView() + * @see is-active-view EA + */ + virtual bool isActiveView(); + + /** + * Some contexts that can possibly be active are forced to be passive. + * An example of this would be /tmp which is expensive to monitor due + * to many users adding/changing/removing files constantly. + * + * @see isActiveView() + * @see force-passive-view EA + */ + bool getForcePassiveView(); + + public: + /** + * some testing to see if this is context has children. + * The default impl checks the mimetype and then sees if begin()==end() + */ + virtual bool isDir(); + + private: + /******************************************************************************/ + /******************************************************************************/ + protected: + + /* + * Overload find() so that subclasses can use the generic version unqualified. + */ + template + InputIterator find(InputIterator first, InputIterator last, + const EqualityComparable& value) + { + return std::find( first, last, value ); + } + +// struct ctx_idx_getimpl : public std::unary_function< const fh_context&, const Context* > +// { +// inline const Context* operator()( const fh_context& s ) const +// { +// return GetImpl(s); +// } +// }; + public: + struct ITEMS_T_BY_NAME_UNORDERED_TAG {}; + struct ITEMS_T_BY_NAME_ORDERED_TAG {}; + + virtual const std::string& getDirName() const; + protected: + + /** + * Note that Items_t must provide + * 1) fast lookup by key (rdn) + * 2) stable iterators over insert() and erase() for ContextIterator + * 3) sorted order for ContextIterator to use lower_bound() when the + * item the iterator points at is deleted from under the iterator + */ +#ifdef LIBFERRIS__USE_BOOST_MULTI_INDEX_FOR_STORING_SUBCONTEXTS + typedef boost::multi_index::multi_index_container< + fh_context, + boost::multi_index::indexed_by< + + boost::multi_index::ordered_unique< + boost::multi_index::tag, + boost::multi_index::identity, ContextSetCompare >, + + boost::multi_index::hashed_unique< + boost::multi_index::tag, + boost::multi_index::const_mem_fun > + +// boost::multi_index::hashed_unique< ctx_idx_getimpl > + > + > Items_t; + typedef Items_t::index::type Items_By_Name_Hashed_t; + typedef Items_t::index::type Items_By_Name_Ordered_t; +#else + typedef std::set< fh_context, ContextSetCompare > Items_t; +#endif + + /** + * Works like set::lower_bound() except it has to play tricks + * because set::lower_bound() expects a key_type to find, not a string + */ + Items_t::iterator ctx_lower_bound( Items_t& items, const std::string& rdn ); + + + private: + + fh_context CoveredContext; + fh_context ParentContext; + + fh_display_aggdata AggregateData; + + std::string DirName; + protected: + void setContext( fh_context parent, const std::string& rdn ); + + int getReadingDir() const; + + fh_context ThisContext(); + +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + FERRISEXP_API virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); +#endif + + friend std::string Shared_getFSArgs( Context* ctx ); + /** + * Get the first context in the transitive parents of this context + * which is of a given Context subclass. This is different to getBaseContext() + * because we skip all context parents which are not a subclass or the + * context class sought. + * + * @see getBaseContext() + */ + template< class DesiredContextClass > + DesiredContextClass* getFirstParentOfContextClass( DesiredContextClass* dummy, + Context* parentOverRide = 0 ) + { + if( this->getOverMountContext() != this ) + { + return this->getOverMountContext()->getFirstParentOfContextClass<>( dummy ); + } + + Context* c = this; + if( parentOverRide ) + c = parentOverRide; + + while( c && c->isParentBound() ) + { + Context* p = c->getParent()->getOverMountContext(); + if(DesiredContextClass* dc = dynamic_cast( p )) + { + return dc; + } + else + { + c = p; + } + } + return 0; + } + + /** + * + * @see getFirstParentOfContextClass() + */ + template < class ChildContextClass > + ChildContextClass* getBaseContext() + { + if( this->getOverMountContext() != this ) + { + ChildContextClass* c = dynamic_cast( + this->getOverMountContext()); + return c->getBaseContext(); + } + + + ChildContextClass* c = dynamic_cast(this); + while( c && c->isParentBound() ) + { + Context* p = c->getParent()->getOverMountContext(); + if(ChildContextClass* nextc = dynamic_cast( p )) + { + c = nextc; + } + else + { + return c; + } + } + return c; + } + + + public: + + virtual Ferris::Attribute::Parent_t getParent() throw (FerrisParentNotSetError); + virtual bool isParentBound(); + + virtual std::string getRecommendedEA(); + virtual bool getHasSubContextsGuess(); + + int getHaveReadDir() const; + fh_attribute toAttribute() + { + return getAttribute("."); + } + + /** + * For resolution types like xpath:// we are really interested in the resulting + * children, not the top level context that is returned. For such contexts the + * parent (eg. selection://) is replaced inline with all of its children. + * + * All such unrolling should be done with this method if possible because of + * future unrolling types that may be added + */ + template< class ColT, class IterT > + static ColT& UnrollQueryResultContexts( ColT& col, IterT be ) + { + ColT result; + + for( IterT ci = be; ci != col.end(); ++ci ) + { + fh_context c = *ci; + + while( true ) + { + if( c->CoveredContext ) + { + c = c->CoveredContext; + continue; + } + if( c->isParentBound() ) + { + c = c->getParent(); + continue; + } + break; + } + + if( c ) + { + std::string earl = c->getURL(); +// cerr << "2d top:" << earl << endl; + if( starts_with( earl, "selectionfactory:" )) + { + for( Context::iterator child = (*ci)->begin(); + child!=(*ci)->end(); ++child ) + { + result.push_back( *child ); + } + } + else + { + result.push_back( *ci ); + } + } + } + col.clear(); + col = result; + return col; + } + + + /** + * Get the schema for the given ea. Note that this should be the + * same as Resolve(getStrAttr( this, "schema:" + eaname, "" )); + * Also note that schema attributes may have schemas themself + * ie. something like schema:schema:size will tell you that + * the ea schema:size is indeed a schema and return some generic + * information about schemas. + * + * There are two main kinds of schema that can be attached to + * a context + * + * (a) for each EA an individual schema URL can be attached + * + * (b) for each context a schema conforming to the RelaxNG + * template may be attached which describes the structure of + * the subtree bound at that context. + * + * However the schemas are bound behind the scenes this method + * will return the context which represents the ea (or for "." + * the context itself). + * + * @param eaname the name of ea or "." for the context itself. + */ + virtual fh_context getSchema( const std::string& eaname ); + + /** + * Similar to getSchema except a default type is passed in and + * will be returned if there is no explicit schema bound. + * + * @see getSchema() + */ + fh_context getSchemaOrDefault( const std::string& eaname, + XSDBasic_t sct ); + + + private: + + friend struct ContextIteratorData_OldRdnSet; + friend struct ContextIteratorData; + friend class ContextIterator; + friend bool operator<(const ContextIterator& x, const ContextIterator& y); + friend ContextIterator::difference_type + operator-(const ContextIterator& x, const ContextIterator& y); + friend struct contextset_less_created_or_existed; + + + ContextDirOpVersion_t DirOpVersion; + ContextDirOpVersion_t getDirOpVersion(); + protected: + virtual Items_t& getSortedItems(); // see .cpp file for doco + public: + /** + * Standard STL begin()/end() for iterating over children + */ + typedef ContextIterator iterator; + typedef std::reverse_iterator reverse_iterator; + Context::iterator begin(); + Context::iterator end(); + Context::reverse_iterator rbegin(); + Context::reverse_iterator rend(); + Context::iterator find( const std::string& rdn ); + + private: + + /* Bitfield of flags */ + guint32 +/**/ Dirty:1, +/**/ AttributesHaveBeenCreated:1, +/**/ HaveDynamicAttributes:1, +/**/ updateMetaData_First_Time:1, +/**/ ensureUpdateMetaDataCalled_virgin:1, +/**/ ReadingDir:1, +/**/ HaveReadDir:1, +/**/ FiredStartReading:1, +/**/ WeAreInFreeList:1, +/**/ EAGenFactorys_isVirgin:1, +/**/ SubContextNamesCacheIsValid:1, //< ==1 if the cache of contextnames is valid +/**/ ContextWasCreatedNotDiscovered:1, //< ==1 If context was created after read() +/**/ HasBeenDeleted:1, //< ==1 when user has references but data on fs is gone. +/**/ m_overMountAttemptHasAlreadyFailed:1, //< ==1 when tryToOverMount() has already failed for this context +/**/ m_isNativeContext:1, //< cache which is true if we are a native context (file://) +/**/ m_ChainedViewContext_Called_SetupEventConnections:1, +/**/ m_tryToGetImplicitTreeSmushHasFailed_forDirectory:1, //< No implicit tree smushes for context +/**/ m_tryToGetImplicitTreeSmushHasFailed_forURL:1, //< Attempt to implicitly find uuidnode has failed +/**/ m_overMountAttemptHasAlreadyFailedEAOnly:1, //< Overmounting for EA is less powerful than for content. +/**/ m_forcePassiveViewCache:1, //< A cache used in getForcePassiveView() +/**/ m_forcePassiveViewCacheIsValid:1, //< if !true recalculate m_forcePassiveViewCache +/**/ m_holdingReferenceToParentContext:1; //< true if we have called getParent()->AddRef() + + friend struct tryToGetUUIDNode_StringARM; + friend struct Semantic::tryToGetUUIDNode_StringARM; + friend class FCA::DatabaseResultSetContext; + + protected: + + void setAttributesHaveBeenCreated() + { + AttributesHaveBeenCreated = 1; + } + + + class ReadingDirRAII + { + Context* m_c; + bool m_cache; + NOT_COPYABLE( ReadingDirRAII ); + public: + explicit ReadingDirRAII( Context* c, bool tmpState ) + : + m_c( c ), + m_cache( c->ReadingDir ) + { + if( m_c ) + m_c->ReadingDir = tmpState; + } + ~ReadingDirRAII() + { + if( m_c ) + m_c->ReadingDir = m_cache; + } + }; + friend class ReadingDirRAII; + + void setHasBeenDeleted( bool v ) + { + LG_CTX_D << "Context::setHasBeenDeleted() v:" << v << std::endl; + if( HasBeenDeleted && !v ) + { + LG_CTX_D << "Context::setHasBeenDeleted() url:" << getURL() + << " pb:" << isParentBound() + << std::endl; + + if( isParentBound() ) + { + LG_CTX_D << "Context::setHasBeenDeleted() url:" << getURL() + << " pnsc:" << getParent()->NumberOfSubContexts + << std::endl; + + getParent()->NumberOfSubContexts++; + LG_CTX_D << "Context::setHasBeenDeleted() url:" << getURL() + << " pnsc:" << getParent()->NumberOfSubContexts + << std::endl; + } + } + HasBeenDeleted = v; + } + + class FERRISEXP_API EnsureStartStopReadingIsFiredRAII + { + NOT_COPYABLE( EnsureStartStopReadingIsFiredRAII ); + protected: + Context* m_c; + public: + explicit EnsureStartStopReadingIsFiredRAII( Context* c ); + ~EnsureStartStopReadingIsFiredRAII(); + }; + + class FERRISEXP_API emitExistsEventForEachItemRAII : public EnsureStartStopReadingIsFiredRAII + { + NOT_COPYABLE( emitExistsEventForEachItemRAII ); + public: + explicit emitExistsEventForEachItemRAII( Context* c ); + ~emitExistsEventForEachItemRAII(); + }; + + class FERRISEXP_API staticDirContentsRAII : public EnsureStartStopReadingIsFiredRAII + { + NOT_COPYABLE( staticDirContentsRAII ); + public: + explicit staticDirContentsRAII( Context* c ); + ~staticDirContentsRAII(); + }; + + friend class EnsureStartStopReadingIsFiredRAII; + + void priv_ensureSubContext_helper_ins( fh_context c, bool created ); + + template < class SubT > + SubT* priv_ensureSubContext( const std::string& rdnconst ) + { + SubT* ret = 0; + ret = priv_ensureSubContext( rdnconst, ret ); + return ret; + } + + template < class SubT > + SubT* priv_ensureSubContext( const std::string& rdnconst, + bool shouldMonsterName, + bool created ) + { +// std::cerr << "priv_ensureSubContext() rdn:" << rdnconst << " created:" << created << std::endl; + SubT* ret = 0; + ret = priv_ensureSubContext( rdnconst, ret, shouldMonsterName, created ); + return ret; + } + public: + + template < class SubT > + SubT* priv_ensureSubContext( const std::string& rdnconst, + SubT*, + bool shouldMonsterName = false, + bool created = false ) + { + std::string rdn = rdnconst; + + try + { + LG_CTX_D << "Context::priv_readSubContext(1) url:" << getURL() << std::endl; + + { + Items_t::iterator subc_iter; + bool isBound = priv_isSubContextBound( rdn, subc_iter ); + LG_CTX_D << "Context::priv_readSubContext(2) url:" << getURL() << std::endl; + if( isBound ) + { + LG_CTX_D << "Context::priv_readSubContext(2.1) url:" << getURL() + << " iterHasBeenDeleted:" << (*subc_iter)->HasBeenDeleted + << std::endl; + } + + if( shouldMonsterName && isBound && !(*subc_iter)->HasBeenDeleted ) + { + rdn = this->monsterName( rdn ); + isBound = priv_isSubContextBound( rdn, subc_iter ); + LG_CTX_D << "Context::priv_readSubContext(3) url:" << getURL() << std::endl; + } + if( isBound ) + { + fh_context ret = *subc_iter; + LG_CTX_D << "Context::priv_readSubContext(4) url:" << getURL() + << " ret->HasBeenDeleted:" << ret->HasBeenDeleted + << " nsc:" << NumberOfSubContexts + << " ret:" << toVoid( ret ) + << " retp:" << ret->getParent() + << " this:" << this + << std::endl; + ret->setHasBeenDeleted( false ); + LG_CTX_D << "Context::priv_readSubContext(5) url:" << getURL() + << " HasBeenDeleted:" << HasBeenDeleted + << " nsc:" << NumberOfSubContexts + << " ret:" << toVoid( ret ) + << " retp:" << ret->getParent() + << " this:" << this + << std::endl; + if( created ) + Emit_Created( 0, ret, rdn, rdn, 0 ); + else + Emit_Exists( 0, ret, rdn, rdn, 0 ); + return dynamic_cast(GetImpl(ret)); + } + } + + LG_CTX_D << "Context::priv_readSubContext(create) url:" << getURL() << std::endl; + SubT* c = new SubT( this, rdn ); + priv_ensureSubContext_helper_ins( c, created ); + return c; + } + catch( NoSuchSubContext& e ) + { + std::cerr << "Context::priv_readSubContext() e:" << e.what() << std::endl; + throw e; + } + catch( FerrisNotSupportedInThisContext& e ) + { + std::cerr << "Context::priv_readSubContext() e:" << e.what() << std::endl; + throw e; + } + catch( std::exception& e ) + { + std::cerr << "Context::priv_readSubContext() strange e:" << e.what() << std::endl; + BackTrace(); + throw e; + } + } + + protected: + + template < class SubT, class Creator > + SubT* priv_ensureSubContext( const std::string& rdn, + SubT*, + const Creator& creator, + bool created = false ) + { + try + { + LG_CTX_D << "Context::priv_readSubContext(1) url:" << getURL() << std::endl; + + { + Items_t::iterator subc_iter; + if( priv_isSubContextBound( rdn, subc_iter ) ) + { + fh_context c = *subc_iter; + c->setHasBeenDeleted( false ); + if( created ) + Emit_Created( 0, c, rdn, rdn, 0 ); + else + Emit_Exists( 0, c, rdn, rdn, 0 ); + SubT* ret = dynamic_cast(GetImpl(c)); + creator.setupExisting( ret ); + return ret; + } + } + + SubT* c = creator.create( this, rdn ); + priv_ensureSubContext_helper_ins( c, created ); + creator.setupNew( c ); + return c; + } + catch( NoSuchSubContext& e ) + { + std::cerr << "Context::priv_readSubContext() e:" << e.what() << std::endl; + throw e; + } + catch( FerrisNotSupportedInThisContext& e ) + { + std::cerr << "Context::priv_readSubContext() e:" << e.what() << std::endl; + throw e; + } + catch( std::exception& e ) + { + std::cerr << "Context::priv_readSubContext() strange e:" << e.what() << std::endl; + BackTrace(); + throw e; + } + } + + + + void setIsNativeContext(); + + public: + + /** + * Assuming that !isActiveView() this returns an rdn which is unique + * attempting to use the given rdn and appending version numbers as needed. + */ + std::string monsterName( const std::string& rdn ); + + /** + * Mainly only interesting for internal APIs which can provide faster + * codepaths for file:// native contexts. + */ + virtual bool getIsNativeContext() const; + + + void setHasDynamicAttributes( bool v ); + + /** + * This is like addAttribute except it does no checking, and can add stateless + * DONT use this method directly, either use addAttribute() or + * tryAddStateLessAttribute() + * + * returns 1 if the attribute was added + */ + virtual bool setAttribute( const std::string& rdn, + EA_Atom* atx, + bool addToREA, + XSDBasic_t sct = XSD_UNKNOWN, + bool isStateLess = false ) + throw( AttributeAlreadyInUse ); + + /** + * If for all of our subcontexts each attribute with the same name + * has the same schema (eg. width, height) then this is true. + * + * Some contexts, for example XML files allow the same name attribute + * to have a different schema for each child. Such contexts will return + * false here. + */ + virtual bool getSubContextAttributesWithSameNameHaveSameSchema(); + + private: + + SubContextNames_t SubContextNamesCache; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * Add stateless attributes for emblem + * used in OnEmblemCreated and createStateLessAttributes() + */ + void createStateLessAttributesForEmblem( fh_emblem em ); + void OnEmblemCreated( fh_etagere et, fh_emblem em ); + + private: + friend class EAGenerator_XMP; + protected: + /** + * supplementStateLessAttributes_size() is called from + * supplementStateLessAttributes() to add size related augmentation + */ + virtual void supplementStateLessAttributes_size( std::string an ); + + /** + * supplementStateLessAttributes_timet() is called from + * supplementStateLessAttributes() to add unix time related augmentation + */ + virtual void supplementStateLessAttributes_timet( std::string an ); + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + protected: + + // help making the gtktreemodel faster + friend class GtkTreeModelStrongArm; + + /* + * Test if the given rdn can be inserted into the collection. + */ + virtual bool canInsert( const std::string& rdn ); + + virtual void emitExistsEventForEachItem(); + + + bool areReadingDir(); + + public: + + /* + * Debug only, this prints out the subcontexts info. + * Consider this method private to libferris' use only. + */ + virtual void dumpOutItems(); + + +// /** +// * Return 1 if added, 0 if not added because it was already there. +// */ +// virtual bool addAttribute( const std::string& rdn, +// EA_Atom* atom, +// bool addToREA = false ); + +// virtual bool addAttribute( const char* rdn, +// const EA_Atom_ReadOnly::GetIStream_Func_t& f, +// bool addToREA = false, +// Loki::TypeInfo t = typeid( Attribute ) ); + +// virtual bool addAttribute( const char* rdn, +// const EA_Atom_ReadOnly::GetIStream_Func_t& f_i, +// const EA_Atom_ReadWrite::GetIOStream_Func_t& f_io, +// const EA_Atom_ReadWrite::IOStreamClosed_Func_t& f_closed, +// bool addToREA = false, +// Loki::TypeInfo t = typeid( Attribute ) ); + +// virtual bool addAttribute( const std::string& rdn, +// const std::string& v, +// bool addToREA = false ); + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + +// virtual EA_Atom* tryAddHeapAttribute( const std::string& rdn, +// EA_Atom* a, +// bool addToREA = false ); + + private: + + friend class Private::CacheManagerImpl; +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend FERRISEXP_DLLLOCAL void DepthFirstDeletePCCTS_DropInOderList( childContext* cc ); +#endif + friend class UnionContext; + friend class DifferenceContext; + friend class SetIntersectionContext; + friend class SetSymmetricDifferenceContext; + friend class NormalContextXSLTFSWrapper; + friend class XSLTFS_DOMWrapper; + friend class SelectionContext; + friend class ManyBaseToOneChainedViewContext; + Items_t Items; + Items_t& getItems(); + + Items_t::iterator getItemIter( const std::string& rdn ); + fh_context getItem( const std::string& rdn ); + void eraseItemByName( Items_t& items, const std::string& rdn ); + void eraseItemByName( Items_t& items, Context* c ); + + gint32 NumberOfSubContexts; + + friend class CacheManager; + friend class FCA::LatticeRootConceptVFS_RootContextDropper; + friend class ContextVFS_RootContextDropper; + friend class RootContextVFS_RootContextDropper; + friend class RootContext; + friend struct RootRootContext; + + sigc::connection AttributeCountRaisedFromOne_Connection; + + protected: + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + private: + + /* + * Handling of overmounts. + * + * OverMountContext_Delegate points from the base context (eg native) to the + * overmounting context (eg db4) + * + * CoveredContext points from the overmounting context (eg db4) back to the + * covered context (eg native). + */ + fh_context OverMountContext_Delegate; + void setOverMountContext( const fh_context& c ); + void clearOverMountContext(); + void unOverMount( CacheManager::freelist_t& fl ); + void unOverMount_delete( CacheManager::freelist_t& fl, Context* c ); + fh_context findOverMounter( bool attemptingOverMountOnlyToFindEA = false ); + bool hasOverMounter(); + protected: + void setOverMountAttemptHasAlreadyFailed( bool v ); + + friend class MessageContext; + void setCoveredContext( const fh_context& c ); + Context* getCoveredContext(); // this || CoveredContext + public: // This is only public so that getBaseContext() can work as expected. + Context* getOverMountContext(); // this || OverMountContext_Delegate + private: + + /** + * Has to do some stuff with getOverMountContext() + */ + friend class PluginOutOfProcNotificationEngine; + + /********************************************************************************/ + /*** META DATA ABOUT PLUGIN MODULES *********************************************/ + /********************************************************************************/ + + virtual bool supportsMonitoring(); + virtual bool supportsReClaim(); + virtual bool supportsRename(); + virtual bool isRemote(); + + /** + * In some cases such as an XML file which is the result of an XSLT inside + * xsltfs:// the filesystem itself might want to override the automatic + * overmounting process. + */ + virtual bool disableOverMountingForContext(); + + /** + * If a subclass overrides priv_getSubContext() to check and make a subcontext + * without reading the whole dir (see native module) then it should override + * this method and return true. + * + * @return true if supports, false by default + */ + virtual bool priv_supportsShortCutLoading(); + protected: + bool supportsShortCutLoading(); + private: + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + virtual fh_context priv_rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems = true, + bool OverWriteDstIfExists = false ); + fh_context contextHasBeenRenamed( const std::string& oldrdn, const std::string& rdn ); + + /* + * Removal + */ + virtual bool supportsRemove(); + virtual void priv_remove( fh_context c ); + + public: + +// void removeSelf(); + void remove( const std::string& rdn ); + void remove( fh_context c ); + virtual fh_context rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems = true, + bool OverWriteDstIfExists = false ); + + fh_context copyTo( const std::string& newPath, bool OverWriteDstIfExists = false ); + + + Context( Context* CoveredContext = 0 ); + Context( Context* parent, const std::string& rdn ); + virtual ~Context(); + + + virtual fh_attribute createAttribute( const std::string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported, + AttributeAlreadyInUse ); + + virtual fh_attribute acquireAttribute( const std::string& rdn ) + throw( FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported ); + + + + fh_istream getCreateSubContextSchema(); + + virtual fh_context + createSubContext( const std::string& rdn, + fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + virtual fh_context + createSubContext( const std::string& rdn, fh_mdcontext md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + + virtual fh_context getRelativeContext( const std::string& xdn, RootContextFactory* f = 0 ) + throw( NoSuchSubContext ); + + + virtual ContextCollection::SubContextNames_t& getSubContextNames(); + virtual fh_context getSubContext( const std::string& rdn ) throw( NoSuchSubContext ); + + bool priv_isSubContextBound( const std::string& rdn, Items_t::iterator& iter ); + bool priv_isSubContextBound( const std::string& rdn ); + bool isSubContextBound( const std::string& rdn ); + + + + virtual void read( bool force = 0 ); + long guessSize() throw(); + + + bool hasSubContexts(); + virtual int SubContextCount(); + + NamingEvent_MedallionUpdated_Sig_t& getNamingEvent_MedallionUpdated_Sig(); + NamingEvent_Changed_Sig_t& getNamingEvent_Changed_Sig(); + NamingEvent_Deleted_Sig_t& getNamingEvent_Deleted_Sig(); + NamingEvent_Start_Execute_Sig_t& getNamingEvent_Start_Execute_Sig(); + NamingEvent_Stop_Execute_Sig_t& getNamingEvent_Stop_Execute_Sig(); + NamingEvent_Created_Sig_t& getNamingEvent_Created_Sig(); + NamingEvent_Moved_Sig_t& getNamingEvent_Moved_Sig(); + NamingEvent_Exists_Sig_t& getNamingEvent_Exists_Sig(); + NamingEvent_Start_Reading_Context_Sig_t& getNamingEvent_Start_Reading_Context_Sig(); + NamingEvent_Stop_Reading_Context_Sig_t& getNamingEvent_Stop_Reading_Context_Sig(); + ContextEvent_Headers_Received_Sig_t& getContextEvent_Headers_Received_Sig(); + + + virtual FerrisLoki::Handlable::ref_count_t AddRef(); + virtual FerrisLoki::Handlable::ref_count_t Release(); + virtual bool all_attributes_have_single_ref_count(); + + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + fh_emblem getAttributeRootEmblem(); + + void Emit_MedallionUpdated(); + void Emit_Changed( NamingEvent_Changed* e, + const std::string& olddn, const std::string& newdn, sigc::trackable* ExtraData ); + void Emit_Deleted( NamingEvent_Deleted* e, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Start_Execute( NamingEvent_Start_Execute* e, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Stop_Execute( NamingEvent_Stop_Execute* e, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Created( NamingEvent_Created* e, + const fh_context& newc, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Moved( NamingEvent_Moved* e, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Exists( NamingEvent_Exists* e, + const fh_context& newc, + std::string olddn, std::string newdn, sigc::trackable* ExtraData ); + void Emit_Start_Reading_Context( NamingEvent_Start_Reading_Context* e, + sigc::trackable* ExtraData ); + void Emit_Stop_Reading_Context( NamingEvent_Stop_Reading_Context* e, + sigc::trackable* ExtraData ); + + + protected: + + /** + * Used by getURL() to get the scheme:// part of the URL. + * mainly made availaible for root:// to override the scheme + * because its children are schemes themself. + */ + virtual std::string getURLScheme(); + public: +// virtual const std::string& getDirName() const; + virtual std::string getURL(); + + protected: + + /************************************************************* + * These are the methods that children might wish to override. + *************************************************************/ + virtual Context* priv_CreateContext( Context* parent, std::string rdn ) = 0; + Context* CreateContext( Context* parent, const std::string& rdn ) + { + return priv_CreateContext( parent, rdn ); + } + +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend FERRISEXP_API fh_context SL_SubCreate_alwaysThrow( fh_context c, fh_context md ); + class SubContextCreator + { + public: + /** + * This takes the context to create the subcontext on and the metadata + * returned from the client. + * + * @returns the new context that was created. + * + */ + typedef Loki::Functor< fh_context, + LOKI_TYPELIST_2( fh_context, fh_context ) > Perform_t; + + SubContextCreator( Perform_t f = SL_SubCreate_alwaysThrow, + std::string schema = "", + std::string simpleTypes = "" ) + : + Perform(f), + Schema(schema), + m_simpleTypes( simpleTypes ) + { + } + + std::string getSchema() + { + return Schema; + } + + std::string getXSDSimpleTypes() + { + return m_simpleTypes; + } + + fh_context perform( fh_context c, fh_context md ) + { + return Perform( c, md ); + } + + private: + Perform_t Perform; + std::string Schema; + std::string m_simpleTypes; + }; + + friend FERRISEXP_API fh_context SL_SubCreate_file( fh_context c, fh_context md ); + friend FERRISEXP_API fh_context SL_SubCreate_dir( fh_context c, fh_context md ); + friend FERRISEXP_API fh_context SL_SubCreate_ea( fh_context c, fh_context md ); + friend FERRISEXP_API fh_context SL_SubCreate_text ( fh_context c, fh_context md ); + + friend fh_context SL_edb_SubCreate_dir( fh_context c, fh_context md ); + friend fh_context SL_edb_SubCreate_file( fh_context c, fh_context md ); + friend fh_context SL_ipc_SubCreate_file( fh_context c, fh_context md ); + friend fh_context SL_ipc_sem_SubCreate_file( fh_context c, fh_context md ); + + friend fh_context SL_db4_SubCreate_dir( fh_context c, fh_context md ); + friend fh_context SL_db4_SubCreate_file( fh_context c, fh_context md ); +// friend fh_context SL_SubCreate_CustomType( std::string libname, +// fh_context c, fh_context md ); + friend struct SubCreate_CustomType; + friend class CreationStatelessFunctor; + + friend fh_context SL_commondb_SubCreate_dir( fh_context c, fh_context md ); + friend fh_context SL_commondb_SubCreate_file( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_commondb ( fh_context c, fh_context md ); + + friend fh_context SL_ldap_SubCreate_context( fh_context c, fh_context md ); +#endif + + public: + /** + * PRIVATE INTERNAL USE ONLY. This method is public only to allow templates + * in libferris itself to use it more easily. + */ + virtual FERRISEXP_API fh_context SubCreate_file( fh_context c, fh_context md ); + protected: + + + virtual fh_context SubCreate_ea( fh_context c, fh_context md ); +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + typedef std::map< std::string, SubContextCreator > CreateSubContextSchemaPart_t; + virtual fh_istream generateSchema( CreateSubContextSchemaPart_t& m ); + virtual void addStandardFileSubContextSchema( CreateSubContextSchemaPart_t& m ); + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + void addEAGeneratorCreateSubContextSchema( CreateSubContextSchemaPart_t& m ); + private: + void FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m, + bool followOvermount = true ); + friend void insertAllCreatorModules( Context::CreateSubContextSchemaPart_t& m ); + friend void insertAbstractCreatorModules( Context::CreateSubContextSchemaPart_t& m ); + friend void insertCreatorModules( Context::CreateSubContextSchemaPart_t& m, bool ); +#endif + private: + + + void addToCreateHistory( const std::string& fileType ); + + virtual fh_context + priv_createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + gboolean getUpdateMetaData_First_Time(); + protected: + virtual void updateMetaData(); + virtual void ensureUpdateMetaDataCalled(); + virtual void ensureAttributesAreCreated( const std::string& eaname = "" ); + private: + virtual void tryToFindAttributeByOverMounting( const std::string& eaname = "" ); + +// typedef ::Loki::Functor< void, +// LOKI_TYPELIST_2(const fh_context& ctx, +// const string& eaname)> ContextEAGenFunctor_t; +// typedef map< string, ContextEAGenFunctor_t > ContextEAGenMap_t; +// virtual ContextEAGenMap_t& getContextEAGenerators(); + + protected: + virtual void priv_createAttributes(); + virtual void createAttributes(); + + virtual void createStateLessAttributes( bool force = false ); + virtual void supplementStateLessAttributes( bool force = false ); + private: + + void tryToOverMount( bool silentIgnore = false, bool attemptingOverMountOnlyToFindEA = false ); + void readOverMount(); + protected: + virtual void priv_read(); + virtual fh_context priv_readSubContext( + const std::string& rdn, + bool created = false, + bool checkIfExistsAlready = true + ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ); + private: + fh_context priv_discoveredSubContext( const std::string& rdn, bool created = false ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ); + + + virtual long priv_guessSize() throw(); + + + /************************************************************* + * Helpers for context subclasses to add/remove items + *************************************************************/ + protected: + virtual fh_context Insert( Context* ctx, bool created = false, bool emit = true ) + throw( SubContextAlreadyInUse ); + + // Silent failure if not in collection + virtual void Remove( Context* ctx, bool emitdeleted = true ); + void Remove( fh_context ctx, bool emitdeleted = true ); + void Remove( const std::string& ctxName, bool emitdeleted = true ); + + private: + void ReadDone( NamingEvent_Stop_Reading_Context* src ); + protected: + virtual void clearContext(); + + /************************************************************* + * Some handy methods for emitting events at the right time. + *************************************************************/ + protected: + void ClearStartReadingFlag(); + void EnsureStartReadingIsFired(); + void EnsureStopReadingIsFired(); + + private: + /************************************************************* + * Reference counting mechanics. + * Used by garbo collector, so can not create more handles. + *************************************************************/ +// typedef list< fh_context > ViewContexts_t; +// /** +// * The base context keeps a collection of all the filtered/sorted/cached +// * contexts that are sitting ontop of it. This keeps the VM system more uniform. +// */ +// ViewContexts_t ViewContexts; + void TryToAddOurselfToFreeList(); + void RemoveOurselfFromFreeList(); + virtual int getMinimumReferenceCount(); + virtual void UnPageSubContextsIfNeeded(); + bool isReClaimable(); + bool reclaimContextObject( Context* a ); +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend FERRISEXP_DLLLOCAL void DepthFirstDelete( CacheManager::freelist_t& fl, Context* cc, bool callReclaimContextObject = true ); + typedef std::list< Context* > cptrlist_t; + friend FERRISEXP_DLLLOCAL void DepthFirstDelete( CacheManager::freelist_t& fl, Context* cc, cptrlist_t& l, bool callReclaimContextObject = true ); +#endif + + public: // FIXME: only for testing + void dumpRefDebugData( fh_ostream ss ); + protected: +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend void dumpEntireContextListMemoryManagementData( fh_ostream ss ); + friend FERRISEXP_DLLLOCAL void debug_ferris_check_for_single_ctx_violation( + Context* parentc, Context* childc ); +#endif + + + // memory management + friend class ContextStreamMemoryManager; + virtual void RegisterStreamWithContextMemoryManagement( fh_istream& ss ); +// // For Attribute::RegisterStreamWithContextMemoryManagement to +// // call StreamIsOpeningHandler + friend class Attribute; +// void StreamIsOpeningHandler( fh_istream ss ); + void StreamIsClosingHandler( FerrisLoki::Handlable* ); + + /************************************************************* + * Event mechanics. + *************************************************************/ + NamingEvent_MedallionUpdated_Sig_t NamingEvent_MedallionUpdated_Sig; + NamingEvent_Changed_Sig_t NamingEvent_Changed_Sig; + NamingEvent_Deleted_Sig_t NamingEvent_Deleted_Sig; + NamingEvent_Start_Execute_Sig_t NamingEvent_Start_Execute_Sig; + NamingEvent_Stop_Execute_Sig_t NamingEvent_Stop_Execute_Sig; + NamingEvent_Created_Sig_t NamingEvent_Created_Sig; + NamingEvent_Moved_Sig_t NamingEvent_Moved_Sig; + NamingEvent_Exists_Sig_t NamingEvent_Exists_Sig; + NamingEvent_Start_Reading_Context_Sig_t NamingEvent_Start_Reading_Context_Sig; + NamingEvent_Stop_Reading_Context_Sig_t NamingEvent_Stop_Reading_Context_Sig; + ContextEvent_Headers_Received_Sig_t ContextEvent_Headers_Received_Sig; + + fh_istream getSubContextCountStream ( Attribute* attr ); + fh_istream getAttributeCountStream ( Attribute* attr ); + fh_istream getDirNameStream ( Attribute* attr ); + fh_istream getDirNameExtensionStream ( Attribute* attr ); + fh_istream getDirPathStream ( Attribute* attr ); + fh_istream getEANamesStream ( Attribute* attr ); +// fh_istream getDigestStream ( std::string digestName, const std::string& rdn, EA_Atom* atom ); + + + /************************************************************* + * Stuff that Context adds too. + *************************************************************/ +// virtual void setAttribute(fh_attribute atx) +// throw( AttributeAlreadyInUse ); + + /************************************************************* + * Stuff for resolving relative paths + *************************************************************/ + public: + typedef std::list SplitPath_t; + + Context::SplitPath_t splitPath( const std::string& dn ); + std::string unSplitPath( const Context::SplitPath_t& pa ); + private: + fh_context priv_getRelativeContext( + SplitPath_t pa, + const std::string& xdn, + const std::string& full_xdn, + RootContextFactory* f + ) + throw( NoSuchSubContext ); + +// friend fh_context CreateDirWithParents( fh_context c, +// const std::string& n, +// int mode ); +// friend fh_context Shell::CreateDir( const std::string& path, +// bool WithParents, int mode ); + + /************************************************************* + * Stuff for matched EA generators. + *************************************************************/ + private: + friend class MetadataBrokerDispatchInformation; + + // factory object to generating EA + FERRIS_SMARTPTR( MatchedEAGeneratorFactory, fh_MatchedEAGeneratorFactory ); + + // Stateless EA factories can be shared between all Context objects + typedef std::list< fh_MatchedEAGeneratorFactory > s_StatelessEAGenFactorys_t; + const s_StatelessEAGenFactorys_t& getStatelessEAGenFactorys(); + + // Statefull EA factories keep some data inside the factory itself on a + // per context basis. As such we have to create a new factory for each context + typedef std::list< fh_MatchedEAGeneratorFactory > m_StatefullEAGenFactorys_t; + m_StatefullEAGenFactorys_t m_StatefullEAGenFactorys; + friend class EAGenFactorys_iterator_class; + + // Because we have to create a new copy for each statefull EA generator + // we keep a function around that can make factories + typedef std::list< MatchedEAGeneratorFactory* (*)() > s_StatefullEAGenFactorysFactorys_t; + struct EAGenData { + s_StatelessEAGenFactorys_t* SL; + s_StatefullEAGenFactorysFactorys_t* SF; + }; + // called only by ensureEAGenFactorysSetup() + void + getStaticEAGenFactorys( EAGenData& d, bool& SFEAGenDynamic ); + + // This is the method that should be used to make sure that the stateless + // and statefull ea generators are setup for this context + void ensureEAGenFactorysSetup(); + + // called only once to add stateless factories to s_StatelessEAGenFactorys + friend void AppendAllStaticEAGeneratorFactories_Stateless( + Context::s_StatelessEAGenFactorys_t& SL ); + + // called to setup each context with new statefull factories + friend bool AppendAllStaticEAGeneratorFactories_Statefull( + Context::m_StatefullEAGenFactorys_t& SF ); + + + + virtual bool VetoEA(); + +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + friend std::string getStrAttr( const fh_context& c, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ); + friend std::string getStrAttr( AttributeCollection* c, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ); + friend std::string setStrAttr( fh_context c, + const std::string& rdn, + const std::string& v, + bool create, + bool throw_for_errors, + bool dontDelegateToOvermountContext ); + +#endif + + public: + /************************************************************* + * Multiple mimetype engine support + *************************************************************/ + protected: + virtual std::string priv_getMimeType( bool fromContent = false ); + public: + std::string getMimeType( bool fromContent = false ); + virtual std::string getFileType(); + + + + /************************************************************/ + /*** medallions *********************************************/ + /************************************************************/ + public: + fh_medallion getMedallion(); + bool hasMedallion(); + + /************************************************************/ + /*** namespaces *********************************************/ + /************************************************************/ + public: + virtual stringlist_t getNamespacePrefixes(); + protected: + virtual void readNamespaces(); + virtual std::string resolveFerrisXMLNamespace( const std::string& s ); + + /************************************************************/ + /*** new branches *******************************************/ + /************************************************************/ + public: + /** + * Branch filesystems like medallion, signature, parents, + * children are all direct children of the filesystem returned + * from this call. + * + * + * / (This is the context which is returned, each branch + * filesystem is a child) + * medallion/ + * ... + * signatures/ + * ... + * parents/ + * ... + * children/ + * ... + */ + virtual fh_context getBranchFileSystem(); + + protected: + virtual std::string priv_getRecommendedEA(); + + + /************************************************************/ + /*** new image metadata interface *** 1.3.40 ****************/ + /************************************************************/ + public: + /** + * Get the filename extension + */ + std::string getNameExtension(); + + + /** + * A function that can create an image object from a context + * object + */ + typedef Loki::Functor< fh_image, LOKI_TYPELIST_1( const fh_context& ) > f_imageEAGenerator; + protected: + + /** + * a collection of image object creators given the filename extension. + * The key of the map is the filename extension for the image plugin + * std::pair is the function object itself and if the image will be writable. + */ + typedef std::map< std::string, std::pair< f_imageEAGenerator, bool > > s_imageEAGenerators_t; + static s_imageEAGenerators_t& getImageEAGenerators(); + + + public: + + + /** + * Get the image associated with this context + */ + fh_image getImage(); + /** + * Like getImage() but instead of throwing an exception when + * there is no image it will return 0 + */ + fh_image getImageOrNULL(); + + /** + * Subclasses of Context can override this if they know how to + * create an image object for embedded data. For example EFL + * eet files contain images which are embedded in the eet file. + * + * Subclasses do not need to worry about caching as the getImage() + * call which calls priv_getImage() will manage image object caching. + */ + virtual fh_image priv_getImage(); + + /** + * When an image needs to be written out before its removed from cache + * it can be tainted so that it is not written right away but can be + * modified further before writing. + */ + void taintImage( fh_image im ); + + /** + * Used by image plugins to register themselves for various filename extensions. + */ + static bool RegisterImageEAGeneratorModule( + const std::string& ext, + bool writable, + const std::string& implname, + const std::string& shortname ); + static bool UnrollRegisteredImageEAGeneratorModule( + const std::string& ext, + bool writable, + const std::string& implname, + const f_imageEAGenerator& f ); + + + protected: + + virtual void imageEAGenerator_priv_createAttributes( bool checkForImageLoader = true ); + bool imageEAGenerator_haveLoader(); + + static fh_istream imageEAGenerator_getMegapixelsStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getWidthStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getHeightStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getDepthPerColorStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getDepthStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getGammaStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getHasAlphaStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getAspectRatioStream ( Context*, const std::string&, EA_Atom* attr ); + static fh_istream imageEAGenerator_getRGBAStream ( Context*, const std::string&, EA_Atom* attr ); + + static fh_iostream imageEAGenerator_getWidthIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_iostream imageEAGenerator_getHeightIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + static void imageEAGenerator_updateWidthFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + static void imageEAGenerator_updateHeightFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + + static fh_iostream imageEAGenerator_getRGBAIOStream( Context* c, const std::string& rdn, EA_Atom* atom ); + static void imageEAGenerator_updateFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + + /** + * getImageWidth() and getImageHeight() allow context subclasses to + * provide special implementations of width/height finding. + */ + virtual int getImageWidth(); + virtual int getImageHeight(); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + public: + + bool isCompressedContext(); + + /** + * If this directory is part of an implicit smush set then return that set. + * failure is cached per session. + */ +// redlandea::fh_SmushSet tryToGetImplicitTreeSmush(); + Semantic::fh_SmushSet tryToGetImplicitTreeSmushSet(); + + + protected: + + void supplementFerrisLinkTargetFromAbsolute(); + fh_istream getFerrisLinkTargetAbsoluteStream( Context*, const std::string&, EA_Atom* attr ); + fh_istream getFerrisIsBrokenLinkStream( Context*, const std::string&, EA_Atom* attr ); + + + protected: +#define FERRIS_LS FERRISEXP_DLLLOCAL static +#define FERRIS_ES FERRISEXP_DLLLOCAL static + FERRIS_LS fh_iostream SL_getFerrisPostCopyActionStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void SL_FerrisPostCopyActionStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + FERRIS_LS fh_iostream SL_getFerrisPreCopyActionStream( Context* c, const std::string& rdn, EA_Atom* atom ); + FERRIS_LS void SL_FerrisPreCopyActionStreamClosed( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); +#undef FERRIS_LS +#undef FERRIS_ES + virtual void priv_postCopyAction( fh_context c ); + virtual void priv_preCopyAction( fh_context c ); + + + friend class MetadataWorker; + /** + * Used in the DBus metadata servers to select only a single plugin to be used + * for metadata generation and no others. + */ + virtual std::string getStrAttr_UsingRestrictedPlugins( const std::string& eaname, + const std::set< std::string >& plugins, + bool getAllLines = true ); + + public: + /** + * This will AddRef() the passed handlable object and it will be Release()ed when + * this Context object is deleted. This makes the handlable effectively have + * the same lifetime as the context. + */ + void addHandlableToBeReleasedWithContext( Handlable* h ); + private: + typedef std::list< Handlable* > m_handlableList_t; + m_handlableList_t* m_handlablesToReleaseWithContext; + + + public: + /** + * PRIVATE INTERNAL USE ONLY. This method is public only to allow templates + * in libferris itself to use it more easily. + */ + virtual FERRISEXP_API fh_context SubCreate_dir( fh_context c, fh_context md ); + + protected: + + + virtual void OnReadComplete_setupUserOverlayLinks(); + + virtual fh_istream getRecommendedEAUnionView(); + + + FERRISEXP_DLLLOCAL static fh_iostream + SL_getSubtitlesStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + FERRISEXP_DLLLOCAL static fh_iostream + SL_getDotEAStream( Context* c, const std::string& rdn, EA_Atom* atom ); + + public: + virtual void dumpTree(); + + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +}; + + +#include +#include + + +namespace Ferris +{ + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +// std::string setStrAttr( fh_context c, +// const std::string& rdn, +// const std::string& v, +// bool create = false ); + + + FERRISEXP_API bool isTrue( const std::string& s ); + FERRISEXP_API bool isFalse( const std::string& s ); + FERRISEXP_API bool isNumber( const std::string& s ); + + namespace Factory + { + FERRISEXP_API fh_context getCreateHistory(); + }; + + namespace Main + { + FERRISEXP_API gboolean EventPending(); + FERRISEXP_API void processEvent(); + FERRISEXP_API void processAllPendingEvents(); + FERRISEXP_API void mainLoop(); + }; + + + namespace Util + { + /** + * Class that returns true only once for operator()(); + */ + class FERRISEXP_API SingleShot + { + bool virgin; + + public: + + SingleShot(); + bool operator()(); + bool value(); + inline operator bool() { + return operator()(); + } + }; + + }; + + /** + * Get the first mimetype for the context 'c'. + * This function may cleanup what is in the "mimetype" EA a little + * before returning it. + */ + FERRISEXP_API std::string getMimeName( fh_context c ); + + /** + * Get a context iterator for the given context. + * ret = c->parent->find( c->name ) + */ + FERRISEXP_API Context::iterator toContextIterator( fh_context c ); + + + FERRISEXP_API void addEAToSet( std::set& theSet, const std::string commaSepEA ); + + + /** + * Execute a SPARQL query against the myrdf datastore. + */ + FERRISEXP_API fh_context ExecuteQueryAgainstMyRDF( const std::string& sparql ); + + + namespace ImplementationDetail + { + FERRISEXP_API stringset_t& getStaticLinkedRootContextNames(); + FERRISEXP_API bool appendToStaticLinkedRootContextNames( const std::string& s ); + + extern const ::Ferris::Handlable::ref_count_t MAX_REF_COUNT; + + }; + + + FERRISEXP_API void ParseOnly_FERRIS_POPT_OPTIONS( const std::string& PROGRAM_NAME, + int argc, + const char** argv ); + + FERRISEXP_API bool tryToUseOutOfProcessMetadataServer(); + + FERRISEXP_API std::string makeFerrisPluginPath( const std::string& dir, const std::string& libname = "" ); + +}; + + +#include +#define FERRIS_POPT_OPTIONS \ +{ 0, 0, POPT_ARG_INCLUDE_TABLE,::Ferris::Logging::getPopTable(), \ + 0, "Ferris options:", 0 }, + +#include + +// fh_mdcontext is used by some clients. +#include + + +#endif // ifndef _ALREADY_INCLUDED_FERRIS_H_ diff --git a/Ferris/FerrisAsTextPlugin.cpp b/Ferris/FerrisAsTextPlugin.cpp new file mode 100644 index 0000000..a7d8332 --- /dev/null +++ b/Ferris/FerrisAsTextPlugin.cpp @@ -0,0 +1,106 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisAsTextPlugin.cpp,v 1.2 2010/09/24 21:30:34 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + static stringmap_t& getFromMimeMap() + { + static stringmap_t o; + return o; + } + static stringmap_t& getFromFerrisTypeMap() + { + static stringmap_t o; + return o; + } + typedef list< pair< fh_matcher, string > > MatcherMap_t; + static MatcherMap_t& getFromMatcherMap() + { + static MatcherMap_t o; + return o; + } + + bool RegisterAsTextFromMime( const std::string& mimetype, + const std::string& libname ) + { + getFromMimeMap().insert( make_pair( mimetype, libname ) ); + } + + bool RegisterAsTextFromFerrisType( const std::string& mimetype, + const std::string& libname ) + { + getFromFerrisTypeMap().insert( make_pair( mimetype, libname ) ); + } + + bool RegisterAsTextFromMatcher( + const fh_matcher& ma, + const std::string& libname ) + { + getFromMatcherMap().push_back( make_pair( ma, libname ) ); + } + + + std::string getLibraryNameFromMime( const std::string& mimetype ) + { + stringmap_t::iterator mi = getFromMimeMap().find( mimetype ); + if( mi == getFromMimeMap().end() ) + return ""; + return mi->second; + } + + std::string getLibraryNameFromFerrisType( const std::string& s ) + { + stringmap_t::iterator mi = getFromFerrisTypeMap().find( s ); + if( mi == getFromFerrisTypeMap().end() ) + return ""; + return mi->second; + } + + std::string getLibraryNameFromMatcher( fh_context& c ) + { + for( MatcherMap_t::const_iterator ci = getFromMatcherMap().begin(); + ci != getFromMatcherMap().end(); ++ci ) + { + fh_matcher m = ci->first; + if( m( c ) ) + { + return ci->second; + } + } + return ""; + } + + +}; + diff --git a/Ferris/FerrisAsTextPlugin.hh b/Ferris/FerrisAsTextPlugin.hh new file mode 100644 index 0000000..f280b73 --- /dev/null +++ b/Ferris/FerrisAsTextPlugin.hh @@ -0,0 +1,97 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisAsTextPlugin.hh,v 1.3 2010/09/24 21:30:34 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ASTEXT_PLUGIN_H_ +#define _ALREADY_INCLUDED_FERRIS_ASTEXT_PLUGIN_H_ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#define FERRISEXP_ASTEXT_PLUGIN FERRISEXP_DLLLOCAL + +/** + * The factory calls the register functions to tell the main code where to + * find the function to handle the mime type (ie, a mapping from mime/ferris + * type to shared library is created by the _factory.cpp files). + * + * one the library is known it is opened and a function is called in that + * library to make the text version. + */ +namespace Ferris +{ + FERRISEXP_API bool RegisterAsTextFromMime( const std::string& mimetype, + const std::string& libname ); + FERRISEXP_API bool RegisterAsTextFromFerrisType( const std::string& ftype, + const std::string& libname ); + FERRISEXP_API bool RegisterAsTextFromMatcher( + const fh_matcher& ma, + const std::string& libname ); + + FERRISEXP_API std::string getLibraryNameFromMime ( const std::string& mimetype ); + FERRISEXP_API std::string getLibraryNameFromFerrisType( const std::string& ftype ); + FERRISEXP_API std::string getLibraryNameFromMatcher ( fh_context& c ); + + /** + * There should be a function in the above registered library 'libpath' + * that can create one of these objects. The object is then cached and + * used by future "as-text" requests in ferris.cpp + */ + class FERRISEXP_API AsTextStatelessFunctor + : + public Handlable + { + public: + virtual fh_istream getAsText( Context* c, const std::string& rdn, EA_Atom* atom ) = 0; + }; + FERRIS_SMARTPTR( AsTextStatelessFunctor, fh_AsTextStatelessFunctor ); + + +// typedef Loki::SingletonHolder< +// Loki::Factory< std::string, std::string > > AsTextFactory_t; + +// typedef AsTextFactory_t AsTextFromMimeFactory; +// typedef AsTextFactory_t AsTextFromFerrisTypeFactory; + +// template < class Base,class Sub > +// struct MakeObject +// { +// static Base* Create() +// { return new Sub(); } +// }; +}; + +#endif diff --git a/Ferris/FerrisBackup.cpp b/Ferris/FerrisBackup.cpp new file mode 100644 index 0000000..a09c075 --- /dev/null +++ b/Ferris/FerrisBackup.cpp @@ -0,0 +1,294 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + backup handler + + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisBackup.cpp,v 1.2 2010/09/24 21:30:34 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace Util + { + + BackupMaker::BackupMaker() + : + Suffix(""), + ModeString("existing"), + Mode( MODE_EXISTING ) + { + } + + void + BackupMaker::setSuffix( const std::string& s ) + { + Suffix = s; + } + + string + BackupMaker::getSuffix() + { + if( Suffix.length() ) + { + return Suffix; + } + else if( const gchar* p = g_getenv ("SIMPLE_BACKUP_SUFFIX") ) + { + Suffix = p; + } + else + { + Suffix = "~"; + } + return Suffix; + } + + void + BackupMaker::setMode( Mode_t m ) + { + if( m == MODE_NONE ) + { + ModeString = "none"; + } + else if( m == MODE_NUMBERED ) + { + ModeString = "numbered"; + } + else if( m == MODE_EXISTING ) + { + ModeString = "existing"; + } + else if( m == MODE_SIMPLE ) + { + ModeString = "simple"; + } + else + { + fh_stringstream ss; + ss << "unknown backup mode requested:" << m << endl; + Throw_UnknownBackupMode( tostr(ss), 0 ); + } + + Mode = m; + } + + void + BackupMaker::setMode( const std::string& s ) + { + if( s == "none" || s == "off" ) + { + Mode = MODE_NONE; + } + else if( s == "numbered" || s == "t" ) + { + Mode = MODE_NUMBERED; + } + else if( s == "existing" || s == "nil" ) + { + Mode = MODE_EXISTING; + } + else if( s == "simple" || s == "never" ) + { + Mode = MODE_SIMPLE; + } + else + { + fh_stringstream ss; + ss << "unknown backup mode requested:" << s << endl; + Throw_UnknownBackupMode( tostr(ss), 0 ); + } + + ModeString = Mode; + } + + bool + BackupMaker::impotent() + { + return Mode == MODE_NONE; + } + + + + std::string + BackupMaker::getBackupName_Simple( fh_context c ) + { + string rdn = c->getDirName(); + rdn += getSuffix(); + return rdn; + } + + int + BackupMaker::getHighestBackupNumber( fh_context c ) + { + typedef Context::SubContextNames_t SubContextNames_t; + typedef SubContextNames_t::iterator iter_t; + + SubContextNames_t scn = c->getParent()->getSubContextNames(); + int ret = 0; + string versioned_rdn_prefix = c->getDirName(); + versioned_rdn_prefix += ".~"; + + for( iter_t iter = scn.begin(); iter != scn.end(); ++iter ) + { + string n = *iter; + + if( starts_with( n, versioned_rdn_prefix ) ) + { + string ending = n.substr( versioned_rdn_prefix.length() ); + int revision = 0; + + fh_stringstream ss; + ss << ending; + ss >> revision; + + if( revision > ret ) + { + ret = revision; + } + } + } + + return ret; + } + + std::string + BackupMaker::getBackupName_Numbered( fh_context c ) + { + int n = 1 + getHighestBackupNumber( c ); + + fh_stringstream ss; + ss << c->getDirName() << ".~" << n << "~" << flush; +// cerr << "getBackupName_Numbered() ret:" << tostr(ss) << endl; + return tostr(ss); + } + + std::string + BackupMaker::getBackupName( fh_context c ) + { + string rdn = ""; + + switch( Mode ) + { + case MODE_NONE: rdn = c->getDirName(); break; + case MODE_SIMPLE: rdn = getBackupName_Simple( c ); break; + case MODE_NUMBERED: rdn = getBackupName_Numbered( c ); break; + case MODE_EXISTING: + if( getHighestBackupNumber( c ) > 0 ) + rdn = getBackupName_Numbered( c ); + else + rdn = getBackupName_Simple( c ); + break; + } + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "unknown backup mode requested. Mode" << Mode + << " ModeString:" << ModeString + << endl; + Throw_UnknownBackupMode( tostr(ss), 0 ); + } + + int maxlen = toType(getStrAttr( c, "fs-file-name-length-maximum", "0" )); + if( maxlen && maxlen < rdn.length() ) + { + fh_stringstream ss; + ss << "Backup name:" << rdn + << " would exceed the maximum filename length of:" << maxlen + << " for url:" << c->getURL(); + Throw_BackupNameWouldBeTooLong( tostr(ss), 0 ); + } + + return rdn; + } + + void + BackupMaker::operator()( fh_context c ) + { + bool isDir = isTrue(getStrAttr( c, "is-dir", "0" )); + int mode = toint(getStrAttr( c, "mode", "0" )); + fh_context parent = c->getParent(); + string BackupName = getBackupName( c ); + string OriginalName = c->getDirName(); + + + if( Mode == MODE_SIMPLE || Mode == MODE_EXISTING ) + { +// cerr << "parent:" << parent->getDirPath() << endl; +// cerr << "BackupName:" << BackupName << endl; +// cerr << "isbound:" << parent->isSubContextBound( BackupName ) << endl; + if( parent->isSubContextBound( BackupName ) ) + { + parent->remove( BackupName ); + } + +// string fqfn = c->appendToPath( parent->getDirPath(), BackupName ); +// cerr << "fqfn:" << fqfn << endl; +// ::remove( fqfn.c_str() ); + } + +// cerr << "BackupMaker::operator() calling rename()" +// << " c->url:" << c->getURL() +// << " c->name:" << c->getDirName() +// << " OriginalName:" << OriginalName +// << " BackupName:" << BackupName +// << endl; + parent->rename( OriginalName, BackupName ); +// cerr << "BackupMaker::operator() calling touch()" << endl; + Shell::touch( parent->getDirPath() + "/" + OriginalName, true, isDir, mode ); +// cerr << "BackupMaker::operator() returning" << endl; + } + + void + BackupMaker::operator()( fh_attribute a ) + { + fh_context c = a->getParent(); + string rdn = getBackupName( c ); + fh_attribute newa = c->createAttribute( rdn ); + fh_iostream oss = newa->getIOStream(); + + oss = a->copyTo( oss ); + } + + void + BackupMaker::perform( fh_context c ) + { + return operator()( c ); + } + + void + BackupMaker::perform( const std::string& path ) + { +// cerr << "BackupMaker::perform() path:" << path << endl; + return operator()( Resolve( path ) ); + } + + }; +}; diff --git a/Ferris/FerrisBackup.hh b/Ferris/FerrisBackup.hh new file mode 100644 index 0000000..4122882 --- /dev/null +++ b/Ferris/FerrisBackup.hh @@ -0,0 +1,85 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisBackup.hh,v 1.2 2010/09/24 21:30:34 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_BACKUP_H_ +#define _ALREADY_INCLUDED_FERRIS_BACKUP_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace Util + { + class FERRISEXP_API BackupMaker + { + public: + + enum Mode_t + { + MODE_NONE = 0, + MODE_NUMBERED, + MODE_EXISTING, + MODE_SIMPLE + }; + + BackupMaker(); + + void setSuffix( const std::string& s ); + std::string getSuffix(); + + void setMode( const std::string& s = "existing" ); + void setMode( Mode_t m ); + + bool impotent(); + + std::string getBackupName( fh_context c ); + + void operator()( fh_context c ); + void operator()( fh_attribute a ); + void perform( fh_context c ); + void perform( const std::string& path ); + + + private: + + Mode_t Mode; + std::string Suffix; + std::string ModeString; + + + std::string getBackupName_Numbered( fh_context c ); + int getHighestBackupNumber( fh_context c ); + std::string getBackupName_Simple( fh_context c ); + }; + }; +}; +#endif diff --git a/Ferris/FerrisBitMagic.hh b/Ferris/FerrisBitMagic.hh new file mode 100644 index 0000000..c349b96 --- /dev/null +++ b/Ferris/FerrisBitMagic.hh @@ -0,0 +1,9836 @@ +#define BMCOUNTOPT 1 + +// command to generate from bm 3.4.0 +// cat bmconst.h bmfwd.h bmdef.h bmfunc.h bmblocks.h bmvmin.h bm.h encoding.h bmalloc.h bmundef.h | sed 's/#include "/\/\/#include "/g' >|/tmp/b34.hh; dos2unix /tmp/b34.hh +// add in this header and comment it out for C++ +// Add in the SmallObj stuff. + + +// +// Small object allocation, by default both ptr_allocator and block_allocator use this to +// speed up small allocations. +// +#include + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +// This file contains the bitmagic bm.3.3.0 library source all bunched +// into one file. + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// LIC ////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +// BitMagic Library. + +// BitMagic library is open source software and distributed under the +// MIT license. The only restriction is to mention the author in any +// work derived from this. + + + + +// Copyright (c) 2002-2003 Anatoliy Kuznetsov. + +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: + +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// README /////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +// How to build BitMagic library: + +// BM is small software package and you probably can just take the +// sources and put it into your project directly. All library sources are in src +// directory. + +// However if you want to use our makefiles you need to follow the next simple +// instructions: + + +// Unix: +// ----- + +// - Apply environment variables by runing bmenv.sh : +// $ . bmenv.sh + +// - use GNU make (gmake) to build installation. + +// $gmake rebuild + +// or (DEBUG version) + +// $gmake DEBUG=YES rebuild + +// The default compiler on Unix and CygWin is g++. +// If you want to change the default you can do that in makefile.in +// (should be pretty easy to do) + + +// Windows: +// -------- + +// If you use cygwin installation please follow general Unix recommendations. +// If you use MSVC please use supplied bm.dsw and corresponding project files. + + +// Fine tuning and optimizations: +// ------------------------------ + +// All BM fine tuning parameters are controlled by the preprocessor defines. + + +// ================================================================================= + +// BM library includes some code optimized for 64-bit systems. To turn this +// optimization on you need to #define BM64OPT in you makefile or in bm.h file. + +// To turn SSE2 optimization #define BMSSE2OPT +// You will need compiler supporting Intel SSE2 intrinsics. +// It could be MSVC .Net or Intel C++. + +// The limitation is that you cannot use BM64OPT and BMSSE2OPT together. + +// ================================================================================= + +// BM library supports "restrict" keyword, some compilers +// (for example Intel C++ for Itanium) generate better +// code (out of order load-stores) when restrict keyword is helping. This option is +// turned OFF by default since most of the C++ compilers does not support it. +// To turn it ON please #define BM_HASRESTRICT in your project. Some compilers +// use "__restrict" keyword for this purpose. You can correct if by +// defineing BMRESTRICT macro to correct keyword. + +// ================================================================================= + +// Bitcounting optimization can be turned ON by defining BMCOUNTOPT. +// Please note this optimization is not completely thread safe. +// bvector<> template keeps mutable variable inside it and update it +// when it count() function is called. So it creates a certain chance that this +// function will be called from multiple threads and crash on updating this +// variable. + +// ================================================================================= + +// If you want to use BM library in STL-free project you need to define +// BM_NO_STL variable. It will disable inclusion of certain headers and also +// will make bvector iterators incompatible with STL algorithms +// (which you said you are not using anyway). + +// ================================================================================= + +// Different compilers use different conventions about return by value +// optimizations. + +// For instance operator or for bitvector can be implemented in two +// different ways: + +// --------- With explicit temp variable + +// template +// inline bvector operator| (const bvector& v1, +// const bvector& v2) +// { +// bvector ret(v1); +// ret.bit_or(v2); +// return ret; +// } + +// --------- Temp variable is hidden + +// template +// inline bvector operator| (const bvector& v1, +// const bvector& v2) +// { +// return bvector(v1).bit_or(v2); +// } + +// ---------- + +// Some compilers can successfully optimize one or both of this cases. +// BM implementation uses hidden temp variable unless you define +// BM_USE_EXPLICIT_TEMP + +// ================================================================================= + + + + +// Thank you for using BitMagic library! +// Anatoliy Kuznetsov (anatoliy_kuznetsov at yahoo.com) + + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// bm.h /////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +PermiFor more information please visit: http://bmagic.sourceforge.net +ssion is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BM__H__INCLUDED__ +#define BM__H__INCLUDED__ + +#include +#include +#include + +// define BM_NO_STL if you use BM in "STL free" environment and want +// to disable any references to STL headers +#ifndef BM_NO_STL +# include +#endif + + +//////////////////////////////////////////////////////////////////////////////// +//#include "bmconst.h" + +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMCONST__H__INCLUDED__ +#define BMCONST__H__INCLUDED__ + +namespace FerrisBitMagic +{ + +#ifdef _WIN32 + +typedef unsigned __int64 id64_t; + +#else + +typedef unsigned long long id64_t; + +#endif + +typedef unsigned int id_t; +typedef unsigned int word_t; +typedef unsigned short short_t; + + + +const unsigned id_max = 0xFFFFFFFF; + +// Data Block parameters + +const unsigned set_block_size = 2048u; +const unsigned set_block_shift = 16u; +const unsigned set_block_mask = 0xFFFFu; +const unsigned set_blkblk_mask = 0xFFFFFFu; + +// Word parameters + +const unsigned set_word_shift = 5u; +const unsigned set_word_mask = 0x1Fu; + + +// GAP related parameters. + +typedef unsigned short gap_word_t; + +const unsigned gap_max_buff_len = 1280; +const unsigned gap_max_bits = 65536; +const unsigned gap_equiv_len = + (sizeof(FerrisBitMagic::word_t) * FerrisBitMagic::set_block_size) / sizeof(gap_word_t); +const unsigned gap_levels = 4; +const unsigned gap_max_level = FerrisBitMagic::gap_levels - 1; + + +// Block Array parameters + +const unsigned set_array_size = 256u; +const unsigned set_array_shift = 8u; +const unsigned set_array_mask = 0xFFu; +const unsigned set_total_blocks = (FerrisBitMagic::set_array_size * FerrisBitMagic::set_array_size); + +const unsigned bits_in_block = FerrisBitMagic::set_block_size * sizeof(FerrisBitMagic::word_t) * 8; +const unsigned bits_in_array = FerrisBitMagic::bits_in_block * FerrisBitMagic::set_array_size; + + +#ifdef BM64OPT + +typedef id64_t wordop_t; +const id64_t all_bits_mask = 0xffffffffffffffffULL; + +# define DECLARE_TEMP_BLOCK(x) FerrisBitMagic::id64_t x[FerrisBitMagic::set_block_size / 2]; +const unsigned set_block_size_op = FerrisBitMagic::set_block_size / 2; + + +#else + +typedef word_t wordop_t; +const word_t all_bits_mask = 0xffffffff; + +# define DECLARE_TEMP_BLOCK(x) unsigned x[FerrisBitMagic::set_block_size]; +const unsigned set_block_size_op = FerrisBitMagic::set_block_size; + +#endif + +} // namespace + +#endif + + +//////////////////////////////////////////////////////////////////////////////// +//#include "bmdef.h" + +// Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + + +// BM library internal header +// +// Set all required preprocessor defines + + + +#ifndef BM_ASSERT + +# ifndef BM_NOASSERT +# include +# define BM_ASSERT assert +# else +# define BM_ASSERT(x) +# endif + +#endif + + +#define FULL_BLOCK_ADDR all_set::_block._p +#define IS_VALID_ADDR(addr) (addr && (addr != FULL_BLOCK_ADDR)) +#define IS_FULL_BLOCK(addr) (addr == FULL_BLOCK_ADDR) +#define IS_EMPTY_BLOCK(addr) (addr == 0) + +// Macro definitions to manipulate bits in pointers +// This trick is based on the fact that pointers allocated by malloc are +// aligned and bit 0 is never set. It means we are safe to use it. +// BM library keeps GAP flag in pointer. + +// Note: this hack is not universally portable so if it does not work +// in some particular case disable it by defining BM_DISBALE_BIT_IN_PTR + +#ifdef BM_DISBALE_BIT_IN_PTR + +# define BMGAP_PTR(ptr) ((FerrisBitMagic::gap_word_t*)ptr) +# define BMSET_PTRGAP(ptr) (void(0)) +# define BM_IS_GAP(obj, ptr, idx) ( obj.is_block_gap(idx) ) + +#else + +# if ULONG_MAX == 0xffffffff // 32-bit + +# define BMPTR_SETBIT0(ptr) ( ((FerrisBitMagic::id_t)ptr) | 1 ) +# define BMPTR_CLEARBIT0(ptr) ( ((FerrisBitMagic::id_t)ptr) & ~(FerrisBitMagic::id_t)1 ) +# define BMPTR_TESTBIT0(ptr) ( ((FerrisBitMagic::id_t)ptr) & 1 ) + +# else // 64-bit + +# define BMPTR_SETBIT0(ptr) ( ((FerrisBitMagic::id64_t)ptr) | 1 ) +# define BMPTR_CLEARBIT0(ptr) ( ((FerrisBitMagic::id64_t)ptr) & ~(FerrisBitMagic::id64_t)1 ) +# define BMPTR_TESTBIT0(ptr) ( ((FerrisBitMagic::id64_t)ptr) & 1 ) + +# endif + +# define BMGAP_PTR(ptr) ((FerrisBitMagic::gap_word_t*)BMPTR_CLEARBIT0(ptr)) +# define BMSET_PTRGAP(ptr) ptr = (FerrisBitMagic::word_t*)BMPTR_SETBIT0(ptr) +# define BM_IS_GAP(obj, ptr, idx) ( BMPTR_TESTBIT0(ptr)!=0 ) + +#endif + + + +#ifdef BM_HASRESTRICT +# ifndef BMRESTRICT +# define BMRESTRICT restrict +# endif +#else +# define BMRESTRICT +#endif + + + + +#ifndef BMSSE2OPT + +# ifndef BM_SET_MMX_GUARD +# define BM_SET_MMX_GUARD +# endif + +#else + +# ifndef BM_SET_MMX_GUARD +# define BM_SET_MMX_GUARD sse2_empty_guard bm_mmx_guard_; +# endif + +#endif + + +//////////////////////////////////////////////////////////////////////////////// + + + +// Vector based optimizations are incompatible with 64-bit optimization +// which is considered a form of vectorization +#ifdef BMSSE2OPT +# undef BM64OPT +# define BMVECTOPT +//////////////////////////////////////////////////////////////////////////////// +//# include "bmsse2.h" +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + + +#ifndef BMSSE2__H__INCLUDED__ +#define BMSSE2__H__INCLUDED__ + + +// Header implements processor specific intrinsics declarations for SSE2 +// instruction set +#include + + + +namespace FerrisBitMagic +{ + +/** @defgroup SSE2 Processor specific optimizations for SSE2 instructions + * @ingroup bmagic + */ + + +/*! + @brief SSE2 reinitialization guard class + + SSE2 requires to call _mm_empty() if we are intermixing + MMX integer commands with floating point arithmetics. + This class guards critical code fragments where SSE2 integer + is used. + + @ingroup SSE2 + +*/ +class sse2_empty_guard +{ +public: + __forceinline sse2_empty_guard() + { + _mm_empty(); + } + + __forceinline ~sse2_empty_guard() + { + _mm_empty(); + } +}; + +/* +# ifndef BM_SET_MMX_GUARD +# define BM_SET_MMX_GUARD sse2_empty_guard bm_mmx_guard_; +# endif +*/ + +/*! + @brief XOR array elements to specified mask + *dst = *src ^ mask + + @ingroup SSE2 +*/ +__forceinline +void sse2_xor_arr_2_mask(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end, + FerrisBitMagic::word_t mask) +{ + __m128i xmm2 = _mm_set_epi32(mask, mask, mask, mask); + do + { + __m128i xmm1 = _mm_load_si128(src); + + xmm1 = _mm_xor_si128(xmm1, xmm2); + _mm_store_si128(dst, xmm1); + ++dst; + ++src; + + } while (src < src_end); +} + +/*! + @brief Inverts array elements and NOT them to specified mask + *dst = ~*src & mask + + @ingroup SSE2 +*/ +__forceinline +void sse2_andnot_arr_2_mask(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end, + FerrisBitMagic::word_t mask) +{ + __m128i xmm2 = _mm_set_epi32(mask, mask, mask, mask); + do + { + //_mm_prefetch((const char*)(src)+1024, _MM_HINT_NTA); + //_mm_prefetch((const char*)(src)+1088, _MM_HINT_NTA); + + __m128i xmm1 = _mm_load_si128(src); + + xmm1 = _mm_andnot_si128(xmm1, xmm2); // xmm1 = (~xmm1) & xmm2 + _mm_store_si128(dst, xmm1); + ++dst; + ++src; + + } while (src < src_end); +} + +/*! + @brief AND array elements against another array + *dst &= *src + + @ingroup SSE2 +*/ +__forceinline +void sse2_and_arr(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end) +{ + __m128i xmm1, xmm2; + do + { + _mm_prefetch((const char*)(src)+512, _MM_HINT_NTA); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_and_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_and_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_and_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_and_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + } while (src < src_end); + +} + + + +/*! + @brief OR array elements against another array + *dst |= *src + + @ingroup SSE2 +*/ +__forceinline +void sse2_or_arr(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end) +{ + __m128i xmm1, xmm2; + do + { + _mm_prefetch((const char*)(src)+512, _MM_HINT_NTA); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_or_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_or_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_or_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_or_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + } while (src < src_end); +} + +/*! + @brief OR array elements against another array + *dst |= *src + + @ingroup SSE2 +*/ +__forceinline +void sse2_xor_arr(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end) +{ + __m128i xmm1, xmm2; + do + { + _mm_prefetch((const char*)(src)+512, _MM_HINT_NTA); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_xor_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_xor_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_xor_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_xor_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + } while (src < src_end); +} + + +/*! + @brief AND-NOT (SUB) array elements against another array + *dst &= ~*src + + @ingroup SSE2 +*/ +__forceinline +void sse2_sub_arr(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end) +{ + __m128i xmm1, xmm2; + do + { + _mm_prefetch((const char*)(src)+512, _MM_HINT_NTA); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_andnot_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_andnot_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_andnot_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + xmm1 = _mm_load_si128(src++); + xmm2 = _mm_load_si128(dst); + xmm1 = _mm_andnot_si128(xmm1, xmm2); + _mm_store_si128(dst++, xmm1); + + } while (src < src_end); +} + +/*! + @brief SSE2 block memset + *dst = value + + @ingroup SSE2 +*/ + +__forceinline +void sse2_set_block(__m128i* BMRESTRICT dst, + __m128i* BMRESTRICT dst_end, + FerrisBitMagic::word_t value) +{ + __m128i xmm0 = _mm_set_epi32 (value, value, value, value); + do + { + _mm_store_si128(dst, xmm0); +/* + _mm_store_si128(dst+1, xmm0); + _mm_store_si128(dst+2, xmm0); + _mm_store_si128(dst+3, xmm0); + + _mm_store_si128(dst+4, xmm0); + _mm_store_si128(dst+5, xmm0); + _mm_store_si128(dst+6, xmm0); + _mm_store_si128(dst+7, xmm0); + + dst += 8; +*/ + } while (++dst < dst_end); + + _mm_sfence(); +} + +/*! + @brief SSE2 block copy + *dst = *src + + @ingroup SSE2 +*/ +__forceinline +void sse2_copy_block(__m128i* BMRESTRICT dst, + const __m128i* BMRESTRICT src, + const __m128i* BMRESTRICT src_end) +{ + __m128i xmm0, xmm1, xmm2, xmm3; + do + { + _mm_prefetch((const char*)(src)+512, _MM_HINT_NTA); + + xmm0 = _mm_load_si128(src+0); + xmm1 = _mm_load_si128(src+1); + xmm2 = _mm_load_si128(src+2); + xmm3 = _mm_load_si128(src+3); + + _mm_store_si128(dst+0, xmm0); + _mm_store_si128(dst+1, xmm1); + _mm_store_si128(dst+2, xmm2); + _mm_store_si128(dst+3, xmm3); + + xmm0 = _mm_load_si128(src+4); + xmm1 = _mm_load_si128(src+5); + xmm2 = _mm_load_si128(src+6); + xmm3 = _mm_load_si128(src+7); + + _mm_store_si128(dst+4, xmm0); + _mm_store_si128(dst+5, xmm1); + _mm_store_si128(dst+6, xmm2); + _mm_store_si128(dst+7, xmm3); + + src += 8; + dst += 8; + + } while (src < src_end); +} + + +/*! + @brief Invert array elements + *dst = ~*dst + or + *dst ^= *dst + + @ingroup SSE2 +*/ +__forceinline +void sse2_invert_arr(FerrisBitMagic::word_t* first, FerrisBitMagic::word_t* last) +{ + __m128i xmm1 = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF); + __m128i* wrd_ptr = (__m128i*)first; + + do + { + _mm_prefetch((const char*)(wrd_ptr)+512, _MM_HINT_NTA); + + __m128i xmm0 = _mm_load_si128(wrd_ptr); + xmm0 = _mm_xor_si128(xmm0, xmm1); + _mm_store_si128(wrd_ptr, xmm0); + ++wrd_ptr; + } while (wrd_ptr < (__m128i*)last); +} + + + +/*! + SSE2 optimized bitcounting function implements parallel bitcounting + algorithm for SSE2 instruction set. + +
+unsigned CalcBitCount32(unsigned b)
+{
+    b = (b & 0x55555555) + (b >> 1 & 0x55555555);
+    b = (b & 0x33333333) + (b >> 2 & 0x33333333);
+    b = (b + (b >> 4)) & 0x0F0F0F0F;
+    b = b + (b >> 8);
+    b = (b + (b >> 16)) & 0x0000003F;
+    return b;
+}
+
+ + @ingroup SSE2 + +*/ +inline +FerrisBitMagic::id_t sse2_bit_count(const __m128i* block, const __m128i* block_end) +{ + const unsigned mu1 = 0x55555555; + const unsigned mu2 = 0x33333333; + const unsigned mu3 = 0x0F0F0F0F; + const unsigned mu4 = 0x0000003F; + + // Loading masks + __m128i m1 = _mm_set_epi32 (mu1, mu1, mu1, mu1); + __m128i m2 = _mm_set_epi32 (mu2, mu2, mu2, mu2); + __m128i m3 = _mm_set_epi32 (mu3, mu3, mu3, mu3); + __m128i m4 = _mm_set_epi32 (mu4, mu4, mu4, mu4); + __m128i mcnt; + mcnt = _mm_xor_si128(m1, m1); // cnt = 0 + + __m128i tmp1, tmp2; + do + { + __m128i b = _mm_load_si128(block); + ++block; + + // b = (b & 0x55555555) + (b >> 1 & 0x55555555); + tmp1 = _mm_srli_epi32(b, 1); // tmp1 = (b >> 1 & 0x55555555) + tmp1 = _mm_and_si128(tmp1, m1); + tmp2 = _mm_and_si128(b, m1); // tmp2 = (b & 0x55555555) + b = _mm_add_epi32(tmp1, tmp2); // b = tmp1 + tmp2 + + // b = (b & 0x33333333) + (b >> 2 & 0x33333333); + tmp1 = _mm_srli_epi32(b, 2); // (b >> 2 & 0x33333333) + tmp1 = _mm_and_si128(tmp1, m2); + tmp2 = _mm_and_si128(b, m2); // (b & 0x33333333) + b = _mm_add_epi32(tmp1, tmp2); // b = tmp1 + tmp2 + + // b = (b + (b >> 4)) & 0x0F0F0F0F; + tmp1 = _mm_srli_epi32(b, 4); // tmp1 = b >> 4 + b = _mm_add_epi32(b, tmp1); // b = b + (b >> 4) + b = _mm_and_si128(b, m3); // & 0x0F0F0F0F + + // b = b + (b >> 8); + tmp1 = _mm_srli_epi32 (b, 8); // tmp1 = b >> 8 + b = _mm_add_epi32(b, tmp1); // b = b + (b >> 8) + + // b = (b + (b >> 16)) & 0x0000003F; + tmp1 = _mm_srli_epi32 (b, 16); // b >> 16 + b = _mm_add_epi32(b, tmp1); // b + (b >> 16) + b = _mm_and_si128(b, m4); // (b >> 16) & 0x0000003F; + + mcnt = _mm_add_epi32(mcnt, b); // mcnt += b + + } while (block < block_end); + + __declspec(align(16)) FerrisBitMagic::id_t tcnt[4]; + _mm_store_si128((__m128i*)tcnt, mcnt); + + return tcnt[0] + tcnt[1] + tcnt[2] + tcnt[3]; +} + +__forceinline +__m128i sse2_and(__m128i a, __m128i b) +{ + return _mm_and_si128(a, b); +} + +__forceinline +__m128i sse2_or(__m128i a, __m128i b) +{ + return _mm_or_si128(a, b); +} + + +__forceinline +__m128i sse2_xor(__m128i a, __m128i b) +{ + return _mm_xor_si128(a, b); +} + +__forceinline +__m128i sse2_sub(__m128i a, __m128i b) +{ + return _mm_andnot_si128(b, a); +} + + +template +FerrisBitMagic::id_t sse2_bit_count_op(const __m128i* BMRESTRICT block, + const __m128i* BMRESTRICT block_end, + const __m128i* BMRESTRICT mask_block, + Func sse2_func) +{ + const unsigned mu1 = 0x55555555; + const unsigned mu2 = 0x33333333; + const unsigned mu3 = 0x0F0F0F0F; + const unsigned mu4 = 0x0000003F; + + // Loading masks + __m128i m1 = _mm_set_epi32 (mu1, mu1, mu1, mu1); + __m128i m2 = _mm_set_epi32 (mu2, mu2, mu2, mu2); + __m128i m3 = _mm_set_epi32 (mu3, mu3, mu3, mu3); + __m128i m4 = _mm_set_epi32 (mu4, mu4, mu4, mu4); + __m128i mcnt; + mcnt = _mm_xor_si128(m1, m1); // cnt = 0 + do + { + __m128i tmp1, tmp2; + __m128i b = _mm_load_si128(block++); + + tmp1 = _mm_load_si128(mask_block++); + + b = sse2_func(b, tmp1); + + // b = (b & 0x55555555) + (b >> 1 & 0x55555555); + tmp1 = _mm_srli_epi32(b, 1); // tmp1 = (b >> 1 & 0x55555555) + tmp1 = _mm_and_si128(tmp1, m1); + tmp2 = _mm_and_si128(b, m1); // tmp2 = (b & 0x55555555) + b = _mm_add_epi32(tmp1, tmp2); // b = tmp1 + tmp2 + + // b = (b & 0x33333333) + (b >> 2 & 0x33333333); + tmp1 = _mm_srli_epi32(b, 2); // (b >> 2 & 0x33333333) + tmp1 = _mm_and_si128(tmp1, m2); + tmp2 = _mm_and_si128(b, m2); // (b & 0x33333333) + b = _mm_add_epi32(tmp1, tmp2); // b = tmp1 + tmp2 + + // b = (b + (b >> 4)) & 0x0F0F0F0F; + tmp1 = _mm_srli_epi32(b, 4); // tmp1 = b >> 4 + b = _mm_add_epi32(b, tmp1); // b = b + (b >> 4) + b = _mm_and_si128(b, m3); // & 0x0F0F0F0F + + // b = b + (b >> 8); + tmp1 = _mm_srli_epi32 (b, 8); // tmp1 = b >> 8 + b = _mm_add_epi32(b, tmp1); // b = b + (b >> 8) + + // b = (b + (b >> 16)) & 0x0000003F; + tmp1 = _mm_srli_epi32 (b, 16); // b >> 16 + b = _mm_add_epi32(b, tmp1); // b + (b >> 16) + b = _mm_and_si128(b, m4); // (b >> 16) & 0x0000003F; + + mcnt = _mm_add_epi32(mcnt, b); // mcnt += b + + } while (block < block_end); + + __declspec(align(16)) FerrisBitMagic::id_t tcnt[4]; + _mm_store_si128((__m128i*)tcnt, mcnt); + + return tcnt[0] + tcnt[1] + tcnt[2] + tcnt[3]; +} + + + + +#define VECT_XOR_ARR_2_MASK(dst, src, src_end, mask)\ + sse2_xor_arr_2_mask((__m128i*)(dst), (__m128i*)(src), (__m128i*)(src_end), mask) + +#define VECT_ANDNOT_ARR_2_MASK(dst, src, src_end, mask)\ + sse2_andnot_arr_2_mask((__m128i*)(dst), (__m128i*)(src), (__m128i*)(src_end), mask) + +#define VECT_BITCOUNT(first, last) \ + sse2_bit_count((__m128i*) (first), (__m128i*) (last)) + +#define VECT_BITCOUNT_AND(first, last, mask) \ + sse2_bit_count_op((__m128i*) (first), (__m128i*) (last), (__m128i*) (mask), sse2_and) + +#define VECT_BITCOUNT_OR(first, last, mask) \ + sse2_bit_count_op((__m128i*) (first), (__m128i*) (last), (__m128i*) (mask), sse2_or) + +#define VECT_BITCOUNT_XOR(first, last, mask) \ + sse2_bit_count_op((__m128i*) (first), (__m128i*) (last), (__m128i*) (mask), sse2_xor) + +#define VECT_BITCOUNT_SUB(first, last, mask) \ + sse2_bit_count_op((__m128i*) (first), (__m128i*) (last), (__m128i*) (mask), sse2_sub) + +#define VECT_INVERT_ARR(first, last) \ + sse2_invert_arr(first, last); + +#define VECT_AND_ARR(dst, src, src_end) \ + sse2_and_arr((__m128i*) dst, (__m128i*) (src), (__m128i*) (src_end)) + +#define VECT_OR_ARR(dst, src, src_end) \ + sse2_or_arr((__m128i*) dst, (__m128i*) (src), (__m128i*) (src_end)) + +#define VECT_SUB_ARR(dst, src, src_end) \ + sse2_sub_arr((__m128i*) dst, (__m128i*) (src), (__m128i*) (src_end)) + +#define VECT_XOR_ARR(dst, src, src_end) \ + sse2_xor_arr((__m128i*) dst, (__m128i*) (src), (__m128i*) (src_end)) + +#define VECT_COPY_BLOCK(dst, src, src_end) \ + sse2_copy_block((__m128i*) dst, (__m128i*) (src), (__m128i*) (src_end)) + +#define VECT_SET_BLOCK(dst, dst_end, value) \ + sse2_set_block((__m128i*) dst, (__m128i*) (dst_end), (value)) + +} // namespace + +#endif +//////////////////////////////////////////////////////////////////////////////// +#endif + + +//////////////////////////////////////////////////////////////////////////////// +//#include "bmfwd.h" +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMFWD__H__INCLUDED__ +#define BMFWD__H__INCLUDED__ + +//#include "bmconst.h" + +namespace FerrisBitMagic +{ + +class block_allocator; +class ptr_allocator; + +template class mem_alloc; + +template class miniset; +template class bvmini; + +typedef FerrisBitMagic::bvmini standard_miniset; +typedef mem_alloc standard_allocator; + +template +class bvector; + + +} // namespace + +#endif +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//#include "bmfunc.h" +/* +// Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMFUNC__H__INCLUDED__ +#define BMFUNC__H__INCLUDED__ + +#include + + +#ifdef _MSC_VER +# pragma warning( disable: 4146 ) +#endif + +namespace FerrisBitMagic +{ + + +/*! @defgroup gapfunc GAP functions + * GAP functions implement different opereations on GAP compressed blocks + * and serve as a minimal building blocks. + * @ingroup bmagic + * + */ + +/*! @defgroup bitfunc BIT functions + * Bit functions implement different opereations on bit blocks + * and serve as a minimal building blocks. + * @ingroup bmagic + */ + + +/*! @brief Default GAP lengths table. + @ingroup gapfunc +*/ +template struct gap_len_table +{ + static const gap_word_t _len[FerrisBitMagic::gap_levels]; +}; + +template +const gap_word_t gap_len_table::_len[FerrisBitMagic::gap_levels] = + { 128, 256, 512, FerrisBitMagic::gap_max_buff_len }; + + +/*! @brief Alternative GAP lengths table. + Good for for memory saver mode and very sparse bitsets. + + @ingroup gapfunc +*/ +template struct gap_len_table_min +{ + static const gap_word_t _len[FerrisBitMagic::gap_levels]; +}; + +template +const gap_word_t gap_len_table_min::_len[FerrisBitMagic::gap_levels] = + { 32, 96, 128, 512 }; + + +//--------------------------------------------------------------------- + +/** Structure to aid in counting bits + table contains count of bits in 0-255 diapason of numbers + + @ingroup bitfunc +*/ +template struct bit_count_table +{ + static const unsigned char _count[256]; +}; + +template +const unsigned char bit_count_table::_count[256] = { + 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8 +}; + +//--------------------------------------------------------------------- + +/** Structure keeps all-left/right ON bits masks. + @ingroup bitfunc +*/ +template struct block_set_table +{ + static const unsigned _left[32]; + static const unsigned _right[32]; +}; + +template +const unsigned block_set_table::_left[32] = { + 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, + 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff, + 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, + 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff +}; + +template +const unsigned block_set_table::_right[32] = { + 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 0xfffffff0, + 0xffffffe0, 0xffffffc0, 0xffffff80, 0xffffff00, 0xfffffe00, + 0xfffffc00, 0xfffff800, 0xfffff000, 0xffffe000, 0xffffc000, + 0xffff8000, 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000, + 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 0xff000000, + 0xfe000000, 0xfc000000, 0xf8000000, 0xf0000000, 0xe0000000, + 0xc0000000, 0x80000000 +}; + + + +/** Structure keeps index of first ON bit for every byte. + @ingroup bitfunc +*/ +template struct first_bit_table +{ + static const char _idx[256]; +}; + +template +const char first_bit_table::_idx[256] = { + -1, + 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0, + 1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1, 0,2,0,1,0,3,0, + 1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1, + 0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0, + 2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4, + 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0, + 1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1, + 0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0, + 3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0 +}; + + +/*! + Define calculates number of 1 bits in 32-bit word. + @ingroup bitfunc +*/ + +#define BM_INCWORD_BITCOUNT(cnt, w) cnt += \ + FerrisBitMagic::bit_count_table::_count[(unsigned char)(w)] + \ + FerrisBitMagic::bit_count_table::_count[(unsigned char)((w) >> 8)] + \ + FerrisBitMagic::bit_count_table::_count[(unsigned char)((w) >> 16)] + \ + FerrisBitMagic::bit_count_table::_count[(unsigned char)((w) >> 24)]; + +#ifdef BM64OPT +/*! + Function calculates number of 1 bits in 64-bit word. + @ingroup bitfunc +*/ +inline FerrisBitMagic::id_t word_bitcount64(FerrisBitMagic::id64_t w) +{ + w = (w & 0x5555555555555555ULL) + (w >> 1 & 0x5555555555555555ULL); + w = (w & 0x3333333333333333ULL) + (w >> 2 & 0x3333333333333333ULL); + w = w + (w >> 4) & 0x0F0F0F0F0F0F0F0FULL; + w = w + (w >> 8); + w = w + (w >> 16); + w = w + (w >> 32) & 0x0000007F; + return (FerrisBitMagic::id_t)w; +} +#endif + + + +//--------------------------------------------------------------------- + +/** + Bit operations enumeration. +*/ +enum operation +{ + BM_AND = 0, + BM_OR, + BM_SUB, + BM_XOR +}; + +//--------------------------------------------------------------------- + +/** + Structure carries pointer on bit block with all bits 1 + @ingroup bitfunc +*/ +template struct all_set +{ + struct all_set_block + { + FerrisBitMagic::word_t _p[FerrisBitMagic::set_block_size]; + + all_set_block() + { + ::memset(_p, 0xFF, sizeof(_p)); + } + }; + + static all_set_block _block; +}; + + +template typename all_set::all_set_block all_set::_block; + + + +//--------------------------------------------------------------------- + +/*! + \brief Lexicographical comparison of two words as bit strings. + Auxiliary implementation for testing and reference purposes. + \param buf1 - First word. + \param buf2 - Second word. + \return <0 - less, =0 - equal, >0 - greater. + + @ingroup bitfunc +*/ +template int wordcmp0(T w1, T w2) +{ + while (w1 != w2) + { + int res = (w1 & 1) - (w2 & 1); + if (res != 0) return res; + w1 >>= 1; + w2 >>= 1; + } + return 0; +} + + +/*! + \brief Lexicographical comparison of two words as bit strings. + Auxiliary implementation for testing and reference purposes. + \param buf1 - First word. + \param buf2 - Second word. + \return <0 - less, =0 - equal, >0 - greater. + + @ingroup bitfunc +*/ +/* +template int wordcmp(T w1, T w2) +{ + T diff = w1 ^ w2; + return diff ? ((w1 & diff & (diff ^ (diff - 1)))? 1 : -1) : 0; +} +*/ + +template int wordcmp(T a, T b) +{ + T diff = a ^ b; + return diff? ( (a & diff & -diff)? 1 : -1 ) : 0; +} + + +// Low bit extraction +// x & (x ^ (x-1)) + + +/** + Internal structure. Copyright information. +*/ +template struct _copyright +{ + static const char _p[]; +}; + +template const char _copyright::_p[] = + "BitMagic Library. v.3.3.0 (c) 2002-2005 Anatoliy Kuznetsov."; + + +/*! + \brief Byte orders recognized by the library. +*/ +enum ByteOrder +{ + BigEndian = 0, + LittleEndian = 1 +}; + + +/** + Internal structure. Different global settings. +*/ +template struct globals +{ + struct bo + { + ByteOrder _byte_order; + + bo() + { + unsigned x; + unsigned char *s = (unsigned char *)&x; + s[0] = 1; + s[1] = 2; + s[2] = 3; + s[3] = 4; + + if(x == 0x04030201) + { + _byte_order = LittleEndian; + return; + } + + if(x == 0x01020304) + { + _byte_order = BigEndian; + return; + } + + BM_ASSERT(0); // "Invalid Byte Order\n" + _byte_order = LittleEndian; + } + }; + + static bo _bo; + + static ByteOrder byte_order() { return _bo._byte_order; } + +}; + +template typename globals::bo globals::_bo; + + + + + + +/* + \brief Binary search for the block where bit = pos located. + \param buf - GAP buffer pointer. + \param pos - index of the element. + \param is_set - output. GAP value (0 or 1). + \return GAP index. + @ingroup gapfunc +*/ +template +unsigned gap_bfind(const T* buf, unsigned pos, unsigned* is_set) +{ + BM_ASSERT(pos < FerrisBitMagic::gap_max_bits); + *is_set = (*buf) & 1; + + register unsigned start = 1; + register unsigned end = 1 + ((*buf) >> 3); + + while ( start != end ) + { + unsigned curr = (start + end) >> 1; + if ( buf[curr] < pos ) + start = curr + 1; + else + end = curr; + } + *is_set ^= ((start-1) & 1); + return start; +} + + +/*! + \brief Tests if bit = pos is true. + \param buf - GAP buffer pointer. + \param pos - index of the element. + \return true if position is in "1" gap + @ingroup gapfunc +*/ +template unsigned gap_test(const T* buf, unsigned pos) +{ + BM_ASSERT(pos < FerrisBitMagic::gap_max_bits); + + unsigned start = 1; + unsigned end = 1 + ((*buf) >> 3); + + if (end - start < 10) + { + unsigned sv = *buf & 1; + unsigned sv1= sv ^ 1; + if (buf[1] >= pos) return sv; + if (buf[2] >= pos) return sv1; + if (buf[3] >= pos) return sv; + if (buf[4] >= pos) return sv1; + if (buf[5] >= pos) return sv; + if (buf[6] >= pos) return sv1; + if (buf[7] >= pos) return sv; + if (buf[8] >= pos) return sv1; + if (buf[9] >= pos) return sv; + BM_ASSERT(0); + } + else + while ( start != end ) + { + unsigned curr = (start + end) >> 1; + if ( buf[curr] < pos ) + start = curr + 1; + else + end = curr; + } + return ((*buf) & 1) ^ ((--start) & 1); +} + + +/*! For each non-zero block executes supplied function. +*/ +template +void for_each_nzblock(T*** root, unsigned size1, unsigned size2, F& f) +{ + unsigned block_idx = 0; + + for (unsigned i = 0; i < size1; ++i) + { + T** blk_blk = root[i]; + + if (!blk_blk) + { + block_idx += FerrisBitMagic::set_array_size; + continue; + } + + for (unsigned j = 0;j < size2; ++j, ++block_idx) + { + if (blk_blk[j]) f(blk_blk[j], block_idx); + } + } +} + +/*! For each non-zero block executes supplied function-predicate. + Function returns if function-predicate returns true +*/ +template +bool for_each_nzblock_if(T*** root, unsigned size1, unsigned size2, F& f) +{ + unsigned block_idx = 0; + + for (unsigned i = 0; i < size1; ++i) + { + T** blk_blk = root[i]; + + if (!blk_blk) + { + block_idx += FerrisBitMagic::set_array_size; + continue; + } + + for (unsigned j = 0;j < size2; ++j, ++block_idx) + { + if (blk_blk[j]) + if (f(blk_blk[j], block_idx)) return true; + } + } + return false; +} + +/*! For each block executes supplied function. +*/ +template +void for_each_block(T*** root, unsigned size1, unsigned size2, F& f) +{ + unsigned block_idx = 0; + + for (unsigned i = 0; i < size1; ++i) + { + T** blk_blk = root[i]; + + if (blk_blk) + { + for (unsigned j = 0;j < size2; ++j, ++block_idx) + { + f(blk_blk[j], block_idx); + } + } + else + { + for (unsigned j = 0;j < size2; ++j, ++block_idx) + { + f(0, block_idx); + } + } + } +} + + + +/*! Special BM optimized analog of STL for_each +*/ +template F bmfor_each(T first, T last, F f) +{ + do + { + f(*first); + ++first; + } while (first < last); + return f; +} + +/*! Computes SUM of all elements of the sequence +*/ +template T sum_arr(T* first, T* last) +{ + T sum = 0; + while (first < last) + { + sum += *first; + ++first; + } + return sum; +} + + +/*! + \brief Calculates number of bits ON in GAP buffer. + \param buf - GAP buffer pointer. + \return Number of non-zero bits. + @ingroup gapfunc +*/ +template unsigned gap_bit_count(const T* buf) +{ + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + + register unsigned bits_counter = 0; + ++pcurr; + + if (*buf & 1) + { + bits_counter += *pcurr + 1; + ++pcurr; + } + ++pcurr; // set GAP to 1 + + while (pcurr <= pend) + { + bits_counter += *pcurr - *(pcurr-1); + pcurr += 2; // jump to the next positive GAP + } + + return bits_counter; +} + +/*! + \brief Counts 1 bits in GAP buffer in the closed [left, right] diapason. + \param buf - GAP buffer pointer. + \param left - leftmost bit index to start from + \param right- rightmost bit index + \return Number of non-zero bits. +*/ +template +unsigned gap_bit_count_range(const T* buf, T left, T right) +{ + BM_ASSERT(left <= right); + + const T* pcurr = buf; + const T* pend = pcurr + (*pcurr >> 3); + + unsigned bits_counter = 0; + unsigned is_set; + unsigned start_pos = gap_bfind(buf, left, &is_set); + + pcurr = buf + start_pos; + if (right <= *pcurr) // we are in the target block right now + { + if (is_set) + bits_counter = (right - left + 1); + return bits_counter; + } + if (is_set) + bits_counter += *pcurr - left + 1; + + unsigned prev_gap = *pcurr++; + is_set ^= 1; + while (right > *pcurr) + { + if (is_set) + bits_counter += *pcurr - prev_gap; + if (pcurr == pend) + return bits_counter; + prev_gap = *pcurr++; + is_set ^= 1; + } + if (is_set) + bits_counter += right - prev_gap; + + return bits_counter; +} + + + +/*! + \brief Lexicographical comparison of GAP buffers. + \param buf1 - First GAP buffer pointer. + \param buf2 - Second GAP buffer pointer. + \return <0 - less, =0 - equal, >0 - greater. + + @ingroup gapfunc +*/ +template int gapcmp(const T* buf1, const T* buf2) +{ + const T* pcurr1 = buf1; + const T* pend1 = pcurr1 + (*pcurr1 >> 3); + unsigned bitval1 = *buf1 & 1; + ++pcurr1; + + const T* pcurr2 = buf2; + unsigned bitval2 = *buf2 & 1; + ++pcurr2; + + while (pcurr1 <= pend1) + { + if (*pcurr1 == *pcurr2) + { + if (bitval1 != bitval2) + { + return (bitval1) ? 1 : -1; + } + } + else + { + if (bitval1 == bitval2) + { + if (bitval1) + { + return (*pcurr1 < *pcurr2) ? -1 : 1; + } + else + { + return (*pcurr1 < *pcurr2) ? 1 : -1; + } + } + else + { + return (bitval1) ? 1 : -1; + } + } + + ++pcurr1; ++pcurr2; + + bitval1 ^= 1; + bitval2 ^= 1; + } + + return 0; +} + + +/*! + \brief Abstract operation for GAP buffers. + Receives functor F as a template argument + \param dest - destination memory buffer. + \param vect1 - operand 1 GAP encoded buffer. + \param vect1_mask - XOR mask for starting bitflag for vector1 + can be 0 or 1 (1 inverts the vector) + \param vect2 - operand 2 GAP encoded buffer. + \param vect2_mask - same as vect1_mask + \param f - operation functor. + \note Internal function. + + @ingroup gapfunc +*/ +template +void gap_buff_op(T* BMRESTRICT dest, + const T* BMRESTRICT vect1, + unsigned vect1_mask, + const T* BMRESTRICT vect2, + unsigned vect2_mask, + F f) +{ + register const T* cur1 = vect1; + register const T* cur2 = vect2; + + unsigned bitval1 = (*cur1++ & 1) ^ vect1_mask; + unsigned bitval2 = (*cur2++ & 1) ^ vect2_mask; + + unsigned bitval = f(bitval1, bitval2); + unsigned bitval_prev = bitval; + + register T* res = dest; + *res = bitval; + ++res; + + while (1) + { + bitval = f(bitval1, bitval2); + + // Check if GAP value changes and we need to + // start the next one. + if (bitval != bitval_prev) + { + ++res; + bitval_prev = bitval; + } + + if (*cur1 < *cur2) + { + *res = *cur1; + ++cur1; + bitval1 ^= 1; + } + else // >= + { + *res = *cur2; + if (*cur2 < *cur1) + { + bitval2 ^= 1; + } + else // equal + { + if (*cur2 == (FerrisBitMagic::gap_max_bits - 1)) + { + break; + } + + ++cur1; + bitval1 ^= 1; + bitval2 ^= 1; + } + ++cur2; + } + + } // while + + unsigned dlen = (unsigned)(res - dest); + *dest = (*dest & 7) + (dlen << 3); + +} + + +/*! + \brief Abstract distance(similarity) operation for GAP buffers. + Receives functor F as a template argument + \param vect1 - operand 1 GAP encoded buffer. + \param vect2 - operand 2 GAP encoded buffer. + \param f - operation functor. + \note Internal function. + + @ingroup gapfunc +*/ +/* +template +unsigned gap_buff_count_op(const T* vect1, const T* vect2, F f) +{ + register const T* cur1 = vect1; + register const T* cur2 = vect2; + + unsigned bitval1 = (*cur1++ & 1); + unsigned bitval2 = (*cur2++ & 1); + unsigned bitval = f(bitval1, bitval2); + unsigned bitval_prev = bitval; + + unsigned count = 0; + T res; + T res_prev; + + while (1) + { + bitval = f(bitval1, bitval2); + + // Check if GAP value changes and we need to + // start the next one. + if (bitval != bitval_prev) + { + bitval_prev = bitval; + } + + if (*cur1 < *cur2) + { + if (bitval) + count += *cur1; + ++cur1; + bitval1 ^= 1; + } + else // >= + { + if (bitval) + count += *cur2; + if (*cur2 < *cur1) + { + bitval2 ^= 1; + } + else // equal + { + if (*cur2 == (FerrisBitMagic::gap_max_bits - 1)) + { + break; + } + + ++cur1; + bitval1 ^= 1; + bitval2 ^= 1; + } + ++cur2; + } + + } // while + + return count; +} +*/ + + +/*! + \brief Sets or clears bit in the GAP buffer. + + \param val - new bit value + \param buf - GAP buffer. + \param pos - Index of bit to set. + \param is_set - (OUT) flag if bit was actually set. + + \return New GAP buffer length. + + @ingroup gapfunc +*/ +template unsigned gap_set_value(unsigned val, + T* BMRESTRICT buf, + unsigned pos, + unsigned* BMRESTRICT is_set) +{ + BM_ASSERT(pos < FerrisBitMagic::gap_max_bits); + unsigned curr = gap_bfind(buf, pos, is_set); + + register T end = (*buf >> 3); + if (*is_set == val) + { + *is_set = 0; + return end; + } + *is_set = 1; + + register T* pcurr = buf + curr; + register T* pprev = pcurr - 1; + register T* pend = buf + end; + + // Special case, first bit GAP operation. There is no platform beside it. + // initial flag must be inverted. + if (pos == 0) + { + *buf ^= 1; + if ( buf[1] ) // We need to insert a 1 bit platform here. + { + ::memmove(&buf[2], &buf[1], (end - 1) * sizeof(gap_word_t)); + buf[1] = 0; + ++end; + } + else // Only 1 bit in the GAP. We need to delete the first GAP. + { + pprev = buf + 1; + pcurr = pprev + 1; + do + { + *pprev++ = *pcurr++; + } while (pcurr < pend); + --end; + } + } + else if (curr > 1 && ((unsigned)(*pprev))+1 == pos) // Left border bit + { + ++(*pprev); + if (*pprev == *pcurr) // Curr. GAP to be merged with prev.GAP. + { + --end; + if (pcurr != pend) // GAP merge: 2 GAPS to be deleted + { + --end; + ++pcurr; + do + { + *pprev++ = *pcurr++; + } while (pcurr < pend); + } + } + } + else if (*pcurr == pos) // Rightmost bit in the GAP. Border goes left. + { + --(*pcurr); + if (pcurr == pend) + { + ++end; + } + } + else // Worst case we need to split current block. + { + ::memmove(pcurr+2, pcurr,(end - curr + 1)*sizeof(T)); + *pcurr++ = pos - 1; + *pcurr = pos; + end+=2; + } + + // Set correct length word. + *buf = (*buf & 7) + (end << 3); + + buf[end] = FerrisBitMagic::gap_max_bits - 1; + return end; +} + +//------------------------------------------------------------------------ + +/** + \brief Searches for the next 1 bit in the GAP block + \param buf - GAP buffer + \param nbit - bit index to start checking from. + \param prev - returns previously checked value + + @ingroup gapfunc +*/ +template int gap_find_in_block(const T* buf, + unsigned nbit, + FerrisBitMagic::id_t* prev) +{ + BM_ASSERT(nbit < FerrisBitMagic::gap_max_bits); + + unsigned bitval; + unsigned gap_idx = FerrisBitMagic::gap_bfind(buf, nbit, &bitval); + + if (bitval) // positive block. + { + return 1; + } + + register unsigned val = buf[gap_idx] + 1; + *prev += val - nbit; + + return (val != FerrisBitMagic::gap_max_bits); // no bug here. +} + + + +/*! + \brief Sets bits to 1 in the bitblock. + \param dest - Bitset buffer. + \param bitpos - Offset of the start bit. + \param bitcount - number of bits to set. + + @ingroup bitfunc +*/ +inline void or_bit_block(unsigned* dest, + unsigned bitpos, + unsigned bitcount) +{ + unsigned nbit = unsigned(bitpos & FerrisBitMagic::set_block_mask); + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + FerrisBitMagic::word_t* word = dest + nword; + + if (bitcount == 1) // special case (only 1 bit to set) + { + *word |= unsigned(1 << nbit); + return; + } + + if (nbit) // starting position is not aligned + { + unsigned right_margin = nbit + bitcount; + + // here we checking if we setting bits only in the current + // word. Example: 00111000000000000000000000000000 (32 bits word) + + if (right_margin < 32) + { + unsigned mask = + block_set_table::_right[nbit] & + block_set_table::_left[right_margin-1]; + *word |= mask; + return; // we are done + } + else + { + *word |= block_set_table::_right[nbit]; + bitcount -= 32 - nbit; + } + ++word; + } + + // now we are word aligned, lets find out how many words we + // can now turn ON using loop + + for ( ;bitcount >= 32; bitcount -= 32) + { + *word++ = 0xffffffff; + } + + if (bitcount) + { + *word |= block_set_table::_left[bitcount-1]; + } +} + + +/*! + \brief SUB (AND NOT) bit interval to 1 in the bitblock. + \param dest - Bitset buffer. + \param bitpos - Offset of the start bit. + \param bitcount - number of bits to set. + + @ingroup bitfunc +*/ +inline void sub_bit_block(unsigned* dest, + unsigned bitpos, + unsigned bitcount) +{ + unsigned nbit = unsigned(bitpos & FerrisBitMagic::set_block_mask); + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + FerrisBitMagic::word_t* word = dest + nword; + + if (bitcount == 1) // special case (only 1 bit to set) + { + *word &= ~unsigned(1 << nbit); + return; + } + + if (nbit) // starting position is not aligned + { + unsigned right_margin = nbit + bitcount; + + // here we checking if we setting bits only in the current + // word. Example: 00111000000000000000000000000000 (32 bits word) + + if (right_margin < 32) + { + unsigned mask = + block_set_table::_right[nbit] & + block_set_table::_left[right_margin-1]; + *word &= ~mask; + return; // we are done + } + else + { + *word &= ~block_set_table::_right[nbit]; + bitcount -= 32 - nbit; + } + ++word; + } + + // now we are word aligned, lets find out how many words we + // can now turn ON using loop + + for ( ;bitcount >= 32; bitcount -= 32) + { + *word++ = 0; + } + + if (bitcount) + { + *word &= ~block_set_table::_left[bitcount-1]; + } +} + + +/*! + \brief XOR bit interval to 1 in the bitblock. + \param dest - Bitset buffer. + \param bitpos - Offset of the start bit. + \param bitcount - number of bits to set. + + @ingroup bitfunc +*/ +inline void xor_bit_block(unsigned* dest, + unsigned bitpos, + unsigned bitcount) +{ + unsigned nbit = unsigned(bitpos & FerrisBitMagic::set_block_mask); + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + FerrisBitMagic::word_t* word = dest + nword; + + if (bitcount == 1) // special case (only 1 bit to set) + { + *word ^= unsigned(1 << nbit); + return; + } + + if (nbit) // starting position is not aligned + { + unsigned right_margin = nbit + bitcount; + + // here we checking if we setting bits only in the current + // word. Example: 00111000000000000000000000000000 (32 bits word) + + if (right_margin < 32) + { + unsigned mask = + block_set_table::_right[nbit] & + block_set_table::_left[right_margin-1]; + *word ^= mask; + return; // we are done + } + else + { + *word ^= block_set_table::_right[nbit]; + bitcount -= 32 - nbit; + } + ++word; + } + + // now we are word aligned, lets find out how many words we + // can now turn ON using loop + + for ( ;bitcount >= 32; bitcount -= 32) + { + *word++ ^= 0xffffffff; + } + + if (bitcount) + { + *word ^= block_set_table::_left[bitcount-1]; + } +} + + +/*! + \brief SUB (AND NOT) GAP block to bitblock. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template +void gap_sub_to_bitset(unsigned* dest, const T* buf) +{ + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + if (*buf & 1) // Starts with 1 + { + sub_bit_block(dest, 0, *pcurr + 1); + ++pcurr; + } + ++pcurr; // now we are in GAP "1" again + + while (pcurr <= pend) + { + unsigned bitpos = *(pcurr-1) + 1; + BM_ASSERT(*pcurr > *(pcurr-1)); + unsigned gap_len = *pcurr - *(pcurr-1); + sub_bit_block(dest, bitpos, gap_len); + pcurr += 2; + } +} + + +/*! + \brief XOR GAP block to bitblock. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template +void gap_xor_to_bitset(unsigned* dest, const T* buf) +{ + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + if (*buf & 1) // Starts with 1 + { + xor_bit_block(dest, 0, *pcurr + 1); + ++pcurr; + } + ++pcurr; // now we are in GAP "1" again + + while (pcurr <= pend) + { + unsigned bitpos = *(pcurr-1) + 1; + BM_ASSERT(*pcurr > *(pcurr-1)); + unsigned gap_len = *pcurr - *(pcurr-1); + xor_bit_block(dest, bitpos, gap_len); + pcurr += 2; + } +} + + +/*! + \brief Adds(OR) GAP block to bitblock. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template +void gap_add_to_bitset(unsigned* dest, const T* buf) +{ + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + if (*buf & 1) // Starts with 1 + { + or_bit_block(dest, 0, *pcurr + 1); + ++pcurr; + } + ++pcurr; // now we are in GAP "1" again + + while (pcurr <= pend) + { + unsigned bitpos = *(pcurr-1) + 1; + BM_ASSERT(*pcurr > *(pcurr-1)); + unsigned gap_len = *pcurr - *(pcurr-1); + or_bit_block(dest, bitpos, gap_len); + pcurr += 2; + } +} + + +/*! + \brief ANDs GAP block to bitblock. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template +void gap_and_to_bitset(unsigned* dest, const T* buf) +{ + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + if (! (*buf & 1) ) // Starts with 0 + { + // Instead of AND we can SUB 0 gaps here + sub_bit_block(dest, 0, *pcurr + 1); + ++pcurr; + } + ++pcurr; // now we are in GAP "0" again + + while (pcurr <= pend) + { + unsigned bitpos = *(pcurr-1) + 1; + BM_ASSERT(*pcurr > *(pcurr-1)); + unsigned gap_len = *pcurr - *(pcurr-1); + sub_bit_block(dest, bitpos, gap_len); + pcurr += 2; + } +} + + +/*! + \brief Compute bitcount of bit block AND masked by GAP block. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc bitfunc +*/ +template +FerrisBitMagic::id_t gap_bitset_and_count(const unsigned* block, const T* buf) +{ + BM_ASSERT(block); + + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + FerrisBitMagic::id_t count = 0; + + if (*buf & 1) // Starts with 1 + { + count += bit_block_calc_count_range(block, 0, *pcurr); + ++pcurr; + } + ++pcurr; // now we are in GAP "1" again + + while (pcurr <= pend) + { + FerrisBitMagic::id_t c = bit_block_calc_count_range(block, *(pcurr-1)+1, *pcurr); + + count += c; + pcurr += 2; + } + return count; +} + + +/*! + \brief Compute bitcount of bit block SUB masked by GAP block. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc bitfunc +*/ +template +FerrisBitMagic::id_t gap_bitset_sub_count(const unsigned* block, const T* buf) +{ + BM_ASSERT(block); + + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + FerrisBitMagic::id_t count = 0; + + if (!(*buf & 1)) // Starts with 0 + { + count += bit_block_calc_count_range(block, 0, *pcurr); + ++pcurr; + } + ++pcurr; // now we are in GAP "0" again + + for (;pcurr <= pend; pcurr+=2) + { + count += bit_block_calc_count_range(block, *(pcurr-1)+1, *pcurr); + } + return count; +} + + + +/*! + \brief Compute bitcount of bit block XOR masked by GAP block. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc bitfunc +*/ +template +FerrisBitMagic::id_t gap_bitset_xor_count(const unsigned* block, const T* buf) +{ + BM_ASSERT(block); + + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + unsigned bitval = *buf & 1; + + register FerrisBitMagic::id_t count = bit_block_calc_count_range(block, 0, *pcurr); + if (bitval) + { + count = *pcurr + 1 - count; + } + + for (bitval^=1, ++pcurr; pcurr <= pend; bitval^=1, ++pcurr) + { + T prev = *(pcurr-1)+1; + FerrisBitMagic::id_t c = bit_block_calc_count_range(block, prev, *pcurr); + + if (bitval) // 1 gap; means Result = Total_Bits - BitCount; + { + c = (*pcurr - prev + 1) - c; + } + + count += c; + } + return count; +} + + +/*! + \brief Compute bitcount of bit block OR masked by GAP block. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc bitfunc +*/ +template +FerrisBitMagic::id_t gap_bitset_or_count(const unsigned* block, const T* buf) +{ + BM_ASSERT(block); + + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + unsigned bitval = *buf & 1; + + register FerrisBitMagic::id_t count; + if (bitval) + { + count = *pcurr + 1; + } + else + { + count = bit_block_calc_count_range(block, 0, *pcurr); + } + + for (bitval^=1, ++pcurr; pcurr <= pend; bitval^=1, ++pcurr) + { + T prev = *(pcurr-1)+1; + FerrisBitMagic::id_t c; + + if (bitval) + { + c = (*pcurr - prev + 1); + } + else + { + c = bit_block_calc_count_range(block, prev, *pcurr); + } + + count += c; + } + return count; +} + +/*! + \brief Bitblock memset operation. + + \param dst - destination block. + \param value - value to set. + + @ingroup bitfunc +*/ +inline +void bit_block_set(FerrisBitMagic::word_t* BMRESTRICT dst, FerrisBitMagic::word_t value) +{ +//#ifdef BMVECTOPT +// VECT_SET_BLOCK(dst, dst + FerrisBitMagic::set_block_size, value); +//#else + ::memset(dst, value, FerrisBitMagic::set_block_size * sizeof(FerrisBitMagic::word_t)); +//#endif +} + + +/*! + \brief GAP block to bitblock conversion. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template +void gap_convert_to_bitset(unsigned* dest, const T* buf) +{ + bit_block_set(dest, 0); + gap_add_to_bitset(dest, buf); +} + + +/*! + \brief GAP block to bitblock conversion. + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + \param dest_size - length of the destination buffer. + + @ingroup gapfunc +*/ +template +void gap_convert_to_bitset(unsigned* dest, const T* buf, unsigned dest_len) +{ + ::memset(dest, 0, dest_len * sizeof(unsigned)); + gap_add_to_bitset(dest, buf); +} + + + +/*! + \brief Smart GAP block to bitblock conversion. + + Checks if GAP block is ALL-ZERO or ALL-ON. In those cases returns + pointer on special static bitblocks. + + \param dest - bitblock buffer pointer. + \param buf - GAP buffer pointer. + \param set_max - max possible bitset length + + @ingroup gapfunc +*/ +template + unsigned* gap_convert_to_bitset_smart(unsigned* dest, + const T* buf, + id_t set_max) +{ + if (buf[1] == set_max - 1) + { + return (buf[0] & 1) ? FULL_BLOCK_ADDR : 0; + } + + gap_convert_to_bitset(dest, buf); + return dest; +} + + +/*! + \brief Calculates sum of all words in GAP block. (For debugging purposes) + \note For debugging and testing ONLY. + \param buf - GAP buffer pointer. + \return Sum of all words. + + @ingroup gapfunc +*/ +template unsigned gap_control_sum(const T* buf) +{ + unsigned end = *buf >> 3; + + register const T* pcurr = buf; + register const T* pend = pcurr + (*pcurr >> 3); + ++pcurr; + + if (*buf & 1) // Starts with 1 + { + ++pcurr; + } + ++pcurr; // now we are in GAP "1" again + + while (pcurr <= pend) + { + BM_ASSERT(*pcurr > *(pcurr-1)); + pcurr += 2; + } + return buf[end]; + +} + + +/*! + \brief Sets all bits to 0 or 1 (GAP) + \param buf - GAP buffer pointer. + \param set_max - max possible bitset length + + @ingroup gapfunc +*/ +template void gap_set_all(T* buf, + unsigned set_max, + unsigned value) +{ + BM_ASSERT(value == 0 || value == 1); + *buf = (*buf & 6u) + (1u << 3) + value; + *(++buf) = set_max - 1; +} + + +/*! + \brief Init gap block so it has block in it (can be whole block) + \param buf - GAP buffer pointer. + \param from - one block start + \param to - one block end + \param value - (block value)1 or 0 + \param set_max - max possible bitset length + + @ingroup gapfunc +*/ +template +void gap_init_range_block(T* buf, + unsigned from, + unsigned to, + unsigned value, + unsigned set_max) +{ + BM_ASSERT(value == 0 || value == 1); + + unsigned gap_len; + if (from == 0) + { + if (to == set_max - 1) + { + gap_set_all(buf, set_max, value); + } + else + { + gap_len = 2; + buf[1] = to; + buf[2] = set_max - 1; + buf[0] = (*buf & 6u) + (gap_len << 3) + value; + } + return; + } + // from != 0 + + value = !value; + if (to == set_max - 1) + { + gap_len = 2; + buf[1] = from - 1; + buf[2] = set_max - 1; + } + else + { + gap_len = 3; + buf[1] = from - 1; + buf[2] = to; + buf[3] = set_max - 1; + } + buf[0] = (*buf & 6u) + (gap_len << 3) + value; +} + + +/*! + \brief Inverts all bits in the GAP buffer. + \param buf - GAP buffer pointer. + + @ingroup gapfunc +*/ +template void gap_invert(T* buf) +{ + *buf ^= 1; +} + +/*! + \brief Temporary inverts all bits in the GAP buffer. + + In this function const-ness of the buffer means nothing. + Calling this function again restores the status of the buffer. + + \param buf - GAP buffer pointer. (Buffer IS changed) + + @ingroup gapfunc +*/ +/* +template void gap_temp_invert(const T* buf) +{ + T* buftmp = const_cast(buf); + *buftmp ^= 1; +} +*/ + +/*! + \brief Checks if GAP block is all-zero. + \param buf - GAP buffer pointer. + \param set_max - max possible bitset length + \returns true if all-zero. + + @ingroup gapfunc +*/ +template + bool gap_is_all_zero(const T* buf, unsigned set_max) +{ + return (((*buf & 1)==0) && (*(++buf) == set_max - 1)); +} + +/*! + \brief Checks if GAP block is all-one. + \param buf - GAP buffer pointer. + \param set_max - max possible bitset length + \returns true if all-one. + + @ingroup gapfunc +*/ +template + bool gap_is_all_one(const T* buf, unsigned set_max) +{ + return ((*buf & 1) && (*(++buf) == set_max - 1)); +} + +/*! + \brief Returs GAP block length. + \param buf - GAP buffer pointer. + \returns GAP block length. + + @ingroup gapfunc +*/ +template unsigned gap_length(const T* buf) +{ + return (*buf >> 3) + 1; +} + + +/*! + \brief Returs GAP block capacity. + \param buf - GAP buffer pointer. + \returns GAP block capacity. + + @ingroup gapfunc +*/ +template +unsigned gap_capacity(const T* buf, const T* glevel_len) +{ + return glevel_len[(*buf >> 1) & 3]; +} + + +/*! + \brief Returs GAP block capacity limit. + \param buf - GAP buffer pointer. + \param glevel_len - GAP lengths table (gap_len_table) + \returns GAP block limit. + + @ingroup gapfunc +*/ +template +unsigned gap_limit(const T* buf, const T* glevel_len) +{ + return glevel_len[(*buf >> 1) & 3]-4; +} + + +/*! + \brief Returs GAP blocks capacity level. + \param buf - GAP buffer pointer. + \returns GAP block capacity level. + + @ingroup gapfunc +*/ +template unsigned gap_level(const T* buf) +{ + return (*buf >> 1) & 3; +} + + +/*! + \brief Sets GAP block capacity level. + \param buf - GAP buffer pointer. + \param level new GAP block capacity level. + + @ingroup gapfunc +*/ +template void set_gap_level(T* buf, + unsigned level) +{ + BM_ASSERT(level < FerrisBitMagic::gap_levels); + *buf = ((level & 3) << 1) | (*buf & 1) | (*buf & ~7); +} + + +/*! + \brief Calculates GAP block capacity level. + \param len - GAP buffer length. + \param glevel_len - GAP lengths table + \return GAP block capacity level. + -1 if block does not fit any level. + @ingroup gapfunc +*/ +template +inline int gap_calc_level(int len, const T* glevel_len) +{ + if (len <= (glevel_len[0]-4)) return 0; + if (len <= (glevel_len[1]-4)) return 1; + if (len <= (glevel_len[2]-4)) return 2; + if (len <= (glevel_len[3]-4)) return 3; + + BM_ASSERT(FerrisBitMagic::gap_levels == 4); + return -1; +} + +/*! @brief Returns number of free elements in GAP block array. + Difference between GAP block capacity on this level and actual GAP length. + + @param buf - GAP buffer pointer + @parma glevel_len - GAP lengths table + + @return Number of free GAP elements + @ingroup gapfunc +*/ +template +inline unsigned gap_free_elements(const T* buf, const T* glevel_len) +{ + unsigned len = gap_length(buf); + unsigned capacity = gap_capacity(buf, glevel_len); + return capacity - len; +} + + +/*! + \brief Lexicographical comparison of BIT buffers. + \param buf1 - First buffer pointer. + \param buf2 - Second buffer pointer. + \param len - Buffer length in elements (T). + \return <0 - less, =0 - equal, >0 - greater. + + @ingroup bitfunc +*/ +template +int bitcmp(const T* buf1, const T* buf2, unsigned len) +{ + BM_ASSERT(len); + + const T* pend1 = buf1 + len; + do + { + T w1 = *buf1++; + T w2 = *buf2++; + T diff = w1 ^ w2; + + if (diff) + { + return (w1 & diff & -diff) ? 1 : -1; + } + + } while (buf1 < pend1); + + return 0; +} + + +/*! + \brief Converts bit block to GAP. + \param dest - Destinatio GAP buffer. + \param src - Source bitblock buffer. + \param bits - Number of bits to convert. + \param dest_len - length of the dest. buffer. + \return New ength of GAP block or 0 if conversion failed + (insufficicent space). + + @ingroup gapfunc +*/ +template + unsigned bit_convert_to_gap(T* BMRESTRICT dest, + const unsigned* BMRESTRICT src, + FerrisBitMagic::id_t bits, + unsigned dest_len) +{ + register T* BMRESTRICT pcurr = dest; + T* BMRESTRICT end = dest + dest_len; + register int bitval = (*src) & 1; + *pcurr |= bitval; + + ++pcurr; + *pcurr = 0; + register unsigned bit_idx = 0; + register int bitval_next; + + unsigned val = *src; + + do + { + // We can fast pace if *src == 0 or *src = 0xffffffff + + while (val == 0 || val == 0xffffffff) + { + bitval_next = val ? 1 : 0; + if (bitval != bitval_next) + { + *pcurr++ = bit_idx-1; + BM_ASSERT((pcurr-1) == (dest+1) || *(pcurr-1) > *(pcurr-2)); + if (pcurr >= end) + { + return 0; // OUT of memory + } + bitval = bitval_next; + } + bit_idx += sizeof(*src) * 8; + if (bit_idx >= bits) + { + goto complete; + } + ++src; + val = *src; + } + + + register unsigned mask = 1; + while (mask) + { + // Now plain bitshifting. Optimization wanted. + + bitval_next = val & mask ? 1 : 0; + if (bitval != bitval_next) + { + *pcurr++ = bit_idx-1; + BM_ASSERT((pcurr-1) == (dest+1) || *(pcurr-1) > *(pcurr-2)); + bitval = bitval_next; + if (pcurr >= end) + { + return 0; // OUT of memory + } + } + + mask <<= 1; + ++bit_idx; + + } // while mask + + if (bit_idx >= bits) + { + goto complete; + } + + ++src; + val = *src; + + } while(1); + +complete: + *pcurr = bit_idx-1; + unsigned len = (unsigned)(pcurr - dest); + *dest = (*dest & 7) + (len << 3); + return len; +} + +/*! + @ingroup bitfunc +*/ +template T bit_convert_to_arr(T* BMRESTRICT dest, + const unsigned* BMRESTRICT src, + FerrisBitMagic::id_t bits, + unsigned dest_len) +{ + register T* BMRESTRICT pcurr = dest; + T* BMRESTRICT end = dest + dest_len; + register unsigned bit_idx = 0; + + do + { + register unsigned val = *src; + // We can skip if *src == 0 + + while (val == 0) + { + bit_idx += sizeof(*src) * 8; + if (bit_idx >= bits) + { + return (T)(pcurr - dest); + } + val = *(++src); + } + + if (pcurr + sizeof(val)*8 > end) // insufficient space + { + return 0; + } + + for (int i = 0; i < 32; i+=4) + { + if (val & 1) + *pcurr++ = bit_idx; + val >>= 1; ++bit_idx; + if (val & 1) + *pcurr++ = bit_idx; + val >>= 1; ++bit_idx; + if (val & 1) + *pcurr++ = bit_idx; + val >>= 1; ++bit_idx; + if (val & 1) + *pcurr++ = bit_idx; + val >>= 1; ++bit_idx; + } + if (bits <= bit_idx) + break; + + val = *(++src); + + } while (1); + + return (T)(pcurr - dest); +} + + + +/*! + @brief Bitcount for bit string + + Function calculates number of 1 bits in the given array of words. + Make sure the addresses are aligned. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_block_calc_count(const FerrisBitMagic::word_t* block, + const FerrisBitMagic::word_t* block_end) +{ + BM_ASSERT(block < block_end); + FerrisBitMagic::id_t count = 0; + +#ifdef BM64OPT + + // 64-bit optimized algorithm. + + const FerrisBitMagic::id64_t* b1 = (FerrisBitMagic::id64_t*) block; + const FerrisBitMagic::id64_t* b2 = (FerrisBitMagic::id64_t*) block_end; + + FerrisBitMagic::id64_t acc = *b1++; // accumulator (sparse vectors optimization) + + do + { + FerrisBitMagic::id64_t in = *b1++; + FerrisBitMagic::id64_t acc_prev = acc; + acc |= in; + + if (acc_prev &= in) // counting bits in accumulator + { + acc = (acc & 0x5555555555555555ULL) + (acc >> 1 & 0x5555555555555555ULL); + acc = (acc & 0x3333333333333333ULL) + (acc >> 2 & 0x3333333333333333ULL); + acc = acc + (acc >> 4) & 0x0F0F0F0F0F0F0F0FULL; + acc = acc + (acc >> 8); + acc = acc + (acc >> 16); + acc = acc + (acc >> 32) & 0x0000007F; + count += (unsigned)acc; + + acc = acc_prev; + } + } while (b1 < b2); + count += word_bitcount64(acc); // count-in remaining accumulator + +#else + // For 32 bit code the fastest method is + // to use bitcount table for each byte in the block. + // As optimization for sparse bitsets used bits accumulator + // to collect ON bits using bitwise OR. + FerrisBitMagic::word_t acc = *block++; + do + { + FerrisBitMagic::word_t in = *block++; + FerrisBitMagic::word_t acc_prev = acc; + acc |= in; + if (acc_prev &= in) // accumulator miss: counting bits + { + BM_INCWORD_BITCOUNT(count, acc); + acc = acc_prev; + } + } while (block < block_end); + + BM_INCWORD_BITCOUNT(count, acc); // count-in remaining accumulator + +#endif + + return count; +} + +/*! + Function calculates number of times when bit value changed + (1-0 or 0-1). + + For 001 result is 2 + 010 - 3 + 011 - 2 + 111 - 1 + + @ingroup bitfunc +*/ + +inline +FerrisBitMagic::id_t bit_count_change(FerrisBitMagic::word_t w) +{ + unsigned count = 1; + w ^= (w >> 1); + + BM_INCWORD_BITCOUNT(count, w); + count -= (w >> ((sizeof(w) * 8) - 1)); + return count; +} + + +/*! + Function calculates number of times when bit value changed + (1-0 or 0-1) in the bit block. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_block_calc_count_change(const FerrisBitMagic::word_t* block, + const FerrisBitMagic::word_t* block_end) +{ + BM_ASSERT(block < block_end); + FerrisBitMagic::id_t count = 1; + +#ifdef BM64OPT + + // 64-bit optimized algorithm. + + const FerrisBitMagic::id64_t* b1 = (FerrisBitMagic::id64_t*) block; + const FerrisBitMagic::id64_t* b2 = (FerrisBitMagic::id64_t*) block_end; + + FerrisBitMagic::id64_t w, w0, w_prev, w_l; + w = w0 = *b1; + const int w_shift = sizeof(w) * 8 - 1; + w ^= (w >> 1); + count += word_bitcount64(w); + count -= (w_prev = (w0 >> w_shift)); // negative value correction + + for (++b1 ;b1 < b2; ++b1) + { + w = w0 = *b1; + ++count; + + if (!w) + { + count -= !w_prev; + w_prev = 0; + } + else + { + w ^= (w >> 1); + count += word_bitcount64(w); + + w_l = w0 & 1; + count -= (w0 >> w_shift); // negative value correction + count -= !(w_prev ^ w_l); // word border correction + + w_prev = (w0 >> w_shift); + } + } // for + +#else + + FerrisBitMagic::word_t w, w0, w_prev, w_l; + + w = w0 = *block; + const int w_shift = sizeof(w) * 8 - 1; + w ^= (w >> 1); + BM_INCWORD_BITCOUNT(count, w); + count -= (w_prev = (w0 >> w_shift)); // negative value correction + + for (++block ;block < block_end; ++block) + { + w = w0 = *block; + ++count; + + if (!w) + { + count -= !w_prev; + w_prev = 0; + } + else + { + w ^= (w >> 1); + BM_INCWORD_BITCOUNT(count, w); + + w_l = w0 & 1; + count -= (w0 >> w_shift); // negative value correction + count -= !(w_prev ^ w_l); // word border correction + + w_prev = (w0 >> w_shift); + } + } // for +#endif + return count; +} + + +/*! + Function calculates number of 1 bits in the given array of words in + the range between left anf right bits (borders included) + Make sure the addresses are aligned. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_block_calc_count_range(const FerrisBitMagic::word_t* block, + FerrisBitMagic::word_t left, + FerrisBitMagic::word_t right) +{ + BM_ASSERT(left <= right); + + FerrisBitMagic::id_t count = 0; + + unsigned nbit = left; // unsigned(left & FerrisBitMagic::set_block_mask); + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + const FerrisBitMagic::word_t* word = block + nword; + + if (left == right) // special case (only 1 bit to check) + { + return (*word >> nbit) & 1; + } + unsigned acc; + unsigned bitcount = right - left + 1; + + if (nbit) // starting position is not aligned + { + unsigned right_margin = nbit + (right - left); + + if (right_margin < 32) + { + unsigned mask = + block_set_table::_right[nbit] & + block_set_table::_left[right_margin]; + acc = *word & mask; + + BM_INCWORD_BITCOUNT(count, acc); + return count; + } + else + { + acc = *word & block_set_table::_right[nbit]; + BM_INCWORD_BITCOUNT(count, acc); + bitcount -= 32 - nbit; + } + ++word; + } + + // now when we are word aligned, we can count bits the usual way + for ( ;bitcount >= 32; bitcount -= 32) + { + acc = *word++; + BM_INCWORD_BITCOUNT(count, acc); + } + + if (bitcount) // we have a tail to count + { + acc = (*word) & block_set_table::_left[bitcount-1]; + BM_INCWORD_BITCOUNT(count, acc); + } + + return count; +} + + +// ---------------------------------------------------------------------- + +/*! Function inverts block of bits + @ingroup bitfunc +*/ +template void bit_invert(T* start, T* end) +{ +#ifdef BMVECTOPT + VECT_INVERT_ARR(start, end); +#else + do + { + start[0] = ~start[0]; + start[1] = ~start[1]; + start[2] = ~start[2]; + start[3] = ~start[3]; + start+=4; + } while (start < end); +#endif +} + +// ---------------------------------------------------------------------- + +/*! @brief Returns "true" if all bits in the block are 1 + @ingroup bitfunc +*/ +inline bool is_bits_one(const FerrisBitMagic::wordop_t* start, + const FerrisBitMagic::wordop_t* end) +{ + do + { + FerrisBitMagic::wordop_t tmp = + start[0] & start[1] & start[2] & start[3]; + if (tmp != FerrisBitMagic::all_bits_mask) + return false; + start += 4; + } while (start < end); + + return true; +} + +// ---------------------------------------------------------------------- + + +/*! @brief Returns "true" if all bits in the block are 0 + @ingroup bitfunc +*/ +inline bool bit_is_all_zero(const FerrisBitMagic::wordop_t* start, + const FerrisBitMagic::wordop_t* end) +{ + do + { + FerrisBitMagic::wordop_t tmp = + start[0] | start[1] | start[2] | start[3]; + if (tmp) + return false; + start += 4; + } while (start < end); + + return true; +} + +// ---------------------------------------------------------------------- + +// GAP blocks manipulation functions: + +/*! \brief GAP and functor */ +inline unsigned and_op(unsigned v1, unsigned v2) +{ + return v1 & v2; +} + + +/*! \brief GAP xor functor */ +inline unsigned xor_op(unsigned v1, unsigned v2) +{ + return v1 ^ v2; +} + + +/*! + \brief GAP AND operation. + + Function performs AND logical oparation on gap vectors. + If possible function put the result into vect1 and returns this + pointer. Otherwise result is put into tmp_buf, which should be + twice of the vector size. + + \param vect1 - operand 1 + \param vect2 - operand 2 + \param tmp_buf - pointer on temporary buffer + \return Result pointer (tmp_buf OR vect1) + + @ingroup gapfunc +*/ +inline gap_word_t* gap_operation_and(const gap_word_t* BMRESTRICT vect1, + const gap_word_t* BMRESTRICT vect2, + gap_word_t* BMRESTRICT tmp_buf) +{ + gap_buff_op(tmp_buf, vect1, 0, vect2, 0, and_op); + + return tmp_buf; +} + + +/*! + \brief GAP XOR operation. + + Function performs XOR logical oparation on gap vectors. + If possible function put the result into vect1 and returns this + pointer. Otherwise result is put into tmp_buf, which should be + twice of the vector size. + + \param vect1 - operand 1 + \param vect2 - operand 2 + \param tmp_buf - pointer on temporary buffer + \return Result pointer (tmp_buf) + + @ingroup gapfunc +*/ +inline gap_word_t* gap_operation_xor(const gap_word_t* BMRESTRICT vect1, + const gap_word_t* BMRESTRICT vect2, + gap_word_t* BMRESTRICT tmp_buf) +{ + gap_buff_op(tmp_buf, vect1, 0, vect2, 0, xor_op); + + return tmp_buf; +} + + + +/*! + \brief GAP OR operation. + + Function performs OR logical oparation on gap vectors. + If possible function put the result into vect1 and returns this + pointer. Otherwise result is put into tmp_buf, which should be + twice of the vector size. + + \param vect1 - operand 1 + \param vect2 - operand 2 + \param tmp_buf - pointer on temporary buffer + \return Result pointer (tmp_buf) + + @ingroup gapfunc +*/ +inline gap_word_t* gap_operation_or(const gap_word_t* BMRESTRICT vect1, + const gap_word_t* BMRESTRICT vect2, + gap_word_t* BMRESTRICT tmp_buf) +{ +// gap_invert(vect1); +// gap_temp_invert(vect2); + gap_buff_op(tmp_buf, vect1, 1, vect2, 1, and_op); +// gap_word_t* res = gap_operation_and(vect1, vect2, tmp_buf); +// gap_temp_invert(vect2); + + gap_invert(tmp_buf); +// gap_invert(vect1); + + return tmp_buf; +} + + +/*! + \brief GAP SUB (AND NOT) operation. + + Function performs SUB logical oparation on gap vectors. + If possible function put the result into vect1 and returns this + pointer. Otherwise result is put into tmp_buf, which should be + twice of the vector size. + + \param vect1 - operand 1 + \param vect2 - operand 2 + \param tmp_buf - pointer on temporary buffer + \return Result pointer (tmp_buf) + + @ingroup gapfunc +*/ +inline gap_word_t* gap_operation_sub(const gap_word_t* BMRESTRICT vect1, + const gap_word_t* BMRESTRICT vect2, + gap_word_t* BMRESTRICT tmp_buf) +{ +// gap_temp_invert(vect2); + + gap_buff_op(tmp_buf, vect1, 0, vect2, 1, and_op); +// gap_word_t* res = gap_operation_and(vect1, vect2, tmp_buf); +// gap_temp_invert(vect2); + + return tmp_buf; +} + + +// ---------------------------------------------------------------------- + +// BIT blocks manipulation functions: + + +/*! + \brief Bitblock copy operation. + + \param dst - destination block. + \param src - source block. + + @ingroup bitfunc +*/ +inline +void bit_block_copy(FerrisBitMagic::word_t* BMRESTRICT dst, const FerrisBitMagic::word_t* BMRESTRICT src) +{ +#ifdef BMVECTOPT + VECT_COPY_BLOCK(dst, src, src + FerrisBitMagic::set_block_size); +#else + ::memcpy(dst, src, FerrisBitMagic::set_block_size * sizeof(FerrisBitMagic::word_t)); +#endif +} + + +/*! + \brief Plain bitblock AND operation. + Function does not analyse availability of source and destination blocks. + + \param dst - destination block. + \param src - source block. + + @ingroup bitfunc +*/ +inline +void bit_block_and(FerrisBitMagic::word_t* BMRESTRICT dst, const FerrisBitMagic::word_t* BMRESTRICT src) +{ +#ifdef BMVECTOPT + VECT_AND_ARR(dst, src, src + FerrisBitMagic::set_block_size); +#else + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_ptr = (wordop_t*)src; + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_end = (wordop_t*)(src + FerrisBitMagic::set_block_size); + FerrisBitMagic::wordop_t* BMRESTRICT dst_ptr = (wordop_t*)dst; + + do + { + dst_ptr[0] &= wrd_ptr[0]; + dst_ptr[1] &= wrd_ptr[1]; + dst_ptr[2] &= wrd_ptr[2]; + dst_ptr[3] &= wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + } while (wrd_ptr < wrd_end); +#endif +} + + +/*! + \brief Function ANDs two bitblocks and computes the bitcount. + Function does not analyse availability of source blocks. + + \param src1 - first bit block + \param src1_end - first bit block end + \param src2 - second bit block + + @ingroup bitfunc +*/ +inline +unsigned bit_block_and_count(const FerrisBitMagic::word_t* src1, + const FerrisBitMagic::word_t* src1_end, + const FerrisBitMagic::word_t* src2) +{ + unsigned count; +#ifdef BMVECTOPT + count = VECT_BITCOUNT_AND(src1, src1_end, src2); +#else + count = 0; + do + { + BM_INCWORD_BITCOUNT(count, src1[0] & src2[0]); + BM_INCWORD_BITCOUNT(count, src1[1] & src2[1]); + BM_INCWORD_BITCOUNT(count, src1[2] & src2[2]); + BM_INCWORD_BITCOUNT(count, src1[3] & src2[3]); + + src1+=4; + src2+=4; + } while (src1 < src1_end); +#endif + return count; +} + + +/*! + \brief Function XORs two bitblocks and computes the bitcount. + Function does not analyse availability of source blocks. + + \param src1 - first bit block. + \param src1_end - first bit block end + \param src2 - second bit block. + + @ingroup bitfunc +*/ +inline +unsigned bit_block_xor_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + unsigned count; +#ifdef BMVECTOPT + count = VECT_BITCOUNT_XOR(src1, src1_end, src2); +#else + count = 0; + do + { + BM_INCWORD_BITCOUNT(count, src1[0] ^ src2[0]); + BM_INCWORD_BITCOUNT(count, src1[1] ^ src2[1]); + BM_INCWORD_BITCOUNT(count, src1[2] ^ src2[2]); + BM_INCWORD_BITCOUNT(count, src1[3] ^ src2[3]); + + src1+=4; + src2+=4; + } while (src1 < src1_end); +#endif + return count; +} + + +/*! + \brief Function SUBs two bitblocks and computes the bitcount. + Function does not analyse availability of source blocks. + + \param src1 - first bit block. + \param src1_end - first bit block end + \param src2 - second bit block. + + @ingroup bitfunc +*/ +inline +unsigned bit_block_sub_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + unsigned count; +#ifdef BMVECTOPT + count = VECT_BITCOUNT_SUB(src1, src1_end, src2); +#else + count = 0; + do + { + BM_INCWORD_BITCOUNT(count, src1[0] & ~src2[0]); + BM_INCWORD_BITCOUNT(count, src1[1] & ~src2[1]); + BM_INCWORD_BITCOUNT(count, src1[2] & ~src2[2]); + BM_INCWORD_BITCOUNT(count, src1[3] & ~src2[3]); + + src1+=4; + src2+=4; + } while (src1 < src1_end); +#endif + return count; +} + + +/*! + \brief Function ORs two bitblocks and computes the bitcount. + Function does not analyse availability of source blocks. + + \param src1 - first bit block + \param src1_end - first block end + \param src2 - second bit block. + + @ingroup bitfunc +*/ +inline +unsigned bit_block_or_count(const FerrisBitMagic::word_t* src1, + const FerrisBitMagic::word_t* src1_end, + const FerrisBitMagic::word_t* src2) +{ + unsigned count; +#ifdef BMVECTOPT + count = VECT_BITCOUNT_OR(src1, src1_end, src2); +#else + count = 0; + do + { + BM_INCWORD_BITCOUNT(count, src1[0] | src2[0]); + BM_INCWORD_BITCOUNT(count, src1[1] | src2[1]); + BM_INCWORD_BITCOUNT(count, src1[2] | src2[2]); + BM_INCWORD_BITCOUNT(count, src1[3] | src2[3]); + + src1+=4; + src2+=4; + } while (src1 < src1_end); +#endif + return count; +} + + +/*! + \brief bitblock AND operation. + + \param dst - destination block. + \param src - source block. + + \returns pointer on destination block. + If returned value equal to src means that block mutation requested. + NULL is valid return value. + + @ingroup bitfunc +*/ +inline FerrisBitMagic::word_t* bit_operation_and(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ + BM_ASSERT(dst || src); + + FerrisBitMagic::word_t* ret = dst; + + if (IS_VALID_ADDR(dst)) // The destination block already exists + { + + if (!IS_VALID_ADDR(src)) + { + if (IS_EMPTY_BLOCK(src)) + { + //If the source block is zero + //just clean the destination block + return 0; + } + } + else + { + // Regular operation AND on the whole block. + bit_block_and(dst, src); + } + } + else // The destination block does not exist yet + { + if(!IS_VALID_ADDR(src)) + { + if(IS_EMPTY_BLOCK(src)) + { + // The source block is empty. + // One argument empty - all result is empty. + return 0; + } + // Here we have nothing to do. + // Src block is all ON, dst block remains as it is + } + else // destination block does not exists, src - valid block + { + if (IS_FULL_BLOCK(dst)) + { + return const_cast(src); + } + // Nothng to do. + // Dst block is all ZERO no combination required. + } + } + + return ret; +} + + +/*! + \brief Performs bitblock AND operation and calculates bitcount of the result. + + \param src1 - first bit block. + \param src1_end - first bit block end + \param src2 - second bit block. + + \returns bitcount value + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_operation_and_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + if (IS_EMPTY_BLOCK(src1) || IS_EMPTY_BLOCK(src2)) + { + return 0; + } + return bit_block_and_count(src1, src1_end, src2); +} + + +/*! + \brief Performs bitblock SUB operation and calculates bitcount of the result. + + \param src1 - first bit block. + \param src1_end - first bit block end + \param src2 - second bit block + + \returns bitcount value + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_operation_sub_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + if (IS_EMPTY_BLOCK(src1)) + { + return 0; + } + + if (IS_EMPTY_BLOCK(src2)) // nothing to diff + { + return bit_block_calc_count(src1, src1_end); + } + return bit_block_sub_count(src1, src1_end, src2); +} + + +/*! + \brief Performs bitblock OR operation and calculates bitcount of the result. + + \param src1 - first bit block. + \param src1_end - first bit block end + \param src2 - second bit block. + + \returns bitcount value + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_operation_or_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + if (IS_EMPTY_BLOCK(src1)) + { + if (!IS_EMPTY_BLOCK(src2)) + return bit_block_calc_count(src2, src2 + (src1_end - src1)); + else + return 0; // both blocks are empty + } + else + { + if (IS_EMPTY_BLOCK(src2)) + return bit_block_calc_count(src1, src1_end); + } + + return bit_block_or_count(src1, src1_end, src2); +} + + +/*! + \brief Plain bitblock OR operation. + Function does not analyse availability of source and destination blocks. + + \param dst - destination block. + \param src - source block. + + @ingroup bitfunc +*/ +inline void bit_block_or(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ +#ifdef BMVECTOPT + VECT_OR_ARR(dst, src, src + FerrisBitMagic::set_block_size); +#else + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_ptr = (wordop_t*)src; + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_end = (wordop_t*)(src + set_block_size); + FerrisBitMagic::wordop_t* BMRESTRICT dst_ptr = (wordop_t*)dst; + + do + { + dst_ptr[0] |= wrd_ptr[0]; + dst_ptr[1] |= wrd_ptr[1]; + dst_ptr[2] |= wrd_ptr[2]; + dst_ptr[3] |= wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + + } while (wrd_ptr < wrd_end); +#endif +} + + +/*! + \brief Block OR operation. Makes analysis if block is 0 or FULL. + + \param dst - destination block. + \param src - source block. + + \returns pointer on destination block. + If returned value equal to src means that block mutation requested. + NULL is valid return value. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::word_t* bit_operation_or(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ + BM_ASSERT(dst || src); + + FerrisBitMagic::word_t* ret = dst; + + if (IS_VALID_ADDR(dst)) // The destination block already exists + { + if (!IS_VALID_ADDR(src)) + { + if (IS_FULL_BLOCK(src)) + { + // if the source block is all set + // just set the destination block + ::memset(dst, 0xFF, FerrisBitMagic::set_block_size * sizeof(FerrisBitMagic::word_t)); + } + } + else + { + // Regular operation OR on the whole block + bit_block_or(dst, src); + } + } + else // The destination block does not exist yet + { + if (!IS_VALID_ADDR(src)) + { + if (IS_FULL_BLOCK(src)) + { + // The source block is all set, because dst does not exist + // we can simply replace it. + return const_cast(FULL_BLOCK_ADDR); + } + } + else + { + if (dst == 0) + { + // The only case when we have to allocate the new block: + // Src is all zero and Dst does not exist + return const_cast(src); + } + } + } + return ret; +} + +/*! + \brief Plain bitblock SUB (AND NOT) operation. + Function does not analyse availability of source and destination blocks. + + \param dst - destination block. + \param src - source block. + + @ingroup bitfunc +*/ +inline +void bit_block_sub(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ +#ifdef BMVECTOPT + VECT_SUB_ARR(dst, src, src + FerrisBitMagic::set_block_size); +#else + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_ptr = (wordop_t*) src; + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_end = + (wordop_t*) (src + FerrisBitMagic::set_block_size); + FerrisBitMagic::wordop_t* dst_ptr = (wordop_t*)dst; + + // Regular operation AND-NOT on the whole block. + do + { + dst_ptr[0] &= ~wrd_ptr[0]; + dst_ptr[1] &= ~wrd_ptr[1]; + dst_ptr[2] &= ~wrd_ptr[2]; + dst_ptr[3] &= ~wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + } while (wrd_ptr < wrd_end); +#endif + +} + + +/*! + \brief bitblock SUB operation. + + \param dst - destination block. + \param src - source block. + + \returns pointer on destination block. + If returned value equal to src means that block mutation requested. + NULL is valid return value. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::word_t* bit_operation_sub(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ + BM_ASSERT(dst || src); + + FerrisBitMagic::word_t* ret = dst; + if (IS_VALID_ADDR(dst)) // The destination block already exists + { + if (!IS_VALID_ADDR(src)) + { + if (IS_FULL_BLOCK(src)) + { + // If the source block is all set + // just clean the destination block + return 0; + } + } + else + { + bit_block_sub(dst, src); + } + } + else // The destination block does not exist yet + { + if (!IS_VALID_ADDR(src)) + { + if (IS_FULL_BLOCK(src)) + { + // The source block is full + return 0; + } + } + else + { + if (IS_FULL_BLOCK(dst)) + { + // The only case when we have to allocate the new block: + // dst is all set and src exists + return const_cast(src); + } + } + } + return ret; +} + + +/*! + \brief Plain bitblock XOR operation. + Function does not analyse availability of source and destination blocks. + + \param dst - destination block. + \param src - source block. + + @ingroup bitfunc +*/ +inline +void bit_block_xor(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ +#ifdef BMVECTOPT + VECT_XOR_ARR(dst, src, src + FerrisBitMagic::set_block_size); +#else + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_ptr = (wordop_t*) src; + const FerrisBitMagic::wordop_t* BMRESTRICT wrd_end = + (wordop_t*) (src + FerrisBitMagic::set_block_size); + FerrisBitMagic::wordop_t* BMRESTRICT dst_ptr = (wordop_t*)dst; + + // Regular XOR operation on the whole block. + do + { + dst_ptr[0] ^= wrd_ptr[0]; + dst_ptr[1] ^= wrd_ptr[1]; + dst_ptr[2] ^= wrd_ptr[2]; + dst_ptr[3] ^= wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + } while (wrd_ptr < wrd_end); +#endif + +} + + +/*! + \brief bitblock XOR operation. + + \param dst - destination block. + \param src - source block. + + \returns pointer on destination block. + If returned value equal to src means that block mutation requested. + NULL is valid return value. + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::word_t* bit_operation_xor(FerrisBitMagic::word_t* BMRESTRICT dst, + const FerrisBitMagic::word_t* BMRESTRICT src) +{ + BM_ASSERT(dst || src); + if (src == dst) return 0; // XOR rule + + FerrisBitMagic::word_t* ret = dst; + + if (IS_VALID_ADDR(dst)) // The destination block already exists + { + if (!src) return dst; + + bit_block_xor(dst, src); + } + else // The destination block does not exist yet + { + if (!src) return dst; // 1 xor 0 = 1 + + // Here we have two cases: + // if dest block is full or zero if zero we need to copy the source + // otherwise XOR loop against 0xFF... + //BM_ASSERT(dst == 0); + return const_cast(src); // src is the final result + } + return ret; +} + +/*! + \brief Performs bitblock XOR operation and calculates bitcount of the result. + + \param src1 - first bit block. + \param src2 - second bit block. + + \returns bitcount value + + @ingroup bitfunc +*/ +inline +FerrisBitMagic::id_t bit_operation_xor_count(const FerrisBitMagic::word_t* BMRESTRICT src1, + const FerrisBitMagic::word_t* BMRESTRICT src1_end, + const FerrisBitMagic::word_t* BMRESTRICT src2) +{ + if (IS_EMPTY_BLOCK(src1) || IS_EMPTY_BLOCK(src2)) + { + if (IS_EMPTY_BLOCK(src1) && IS_EMPTY_BLOCK(src2)) + return 0; + const FerrisBitMagic::word_t* block = IS_EMPTY_BLOCK(src1) ? src2 : src1; + return bit_block_calc_count(block, block + (src1_end - src1)); + } + return bit_block_xor_count(src1, src1_end, src2); +} + + + +//------------------------------------------------------------------------ + +/** + \brief Searches for the next 1 bit in the BIT block + \param data - BIT buffer + \param nbit - bit index to start checking from + \param prev - returns previously checked value + + @ingroup bitfunc +*/ +inline +int bit_find_in_block(const FerrisBitMagic::word_t* data, + unsigned nbit, + FerrisBitMagic::id_t* prev) +{ + register FerrisBitMagic::id_t p = *prev; + int found = 0; + + for(;;) + { + unsigned nword = nbit >> FerrisBitMagic::set_word_shift; + if (nword >= FerrisBitMagic::set_block_size) break; + + register FerrisBitMagic::word_t val = data[nword] >> (p & FerrisBitMagic::set_word_mask); + + if (val) + { + while((val & 1) == 0) + { + val >>= 1; + ++nbit; + ++p; + } + ++found; + break; + } + else + { + p += (FerrisBitMagic::set_word_mask + 1) - (nbit & FerrisBitMagic::set_word_mask); + nbit += (FerrisBitMagic::set_word_mask + 1) - (nbit & FerrisBitMagic::set_word_mask); + } + } + *prev = p; + return found; +} + +/*! + \brief Unpacks word into list of ON bit indexes + \param w - value + \param bits - pointer on the result array + \return number of bits in the list + + @ingroup bitfunc +*/ +template unsigned bit_list(T w, B* bits) +{ + // Note: 4-bit table method works slower than plain check approach + unsigned octet = 0; + B* bp = bits; + do + { + if (w & 1) *bp++ = octet + 0; + if (w & 2) *bp++ = octet + 1; + if (w & 4) *bp++ = octet + 2; + if (w & 8) *bp++ = octet + 3; + if (w & 16) *bp++ = octet + 4; + if (w & 32) *bp++ = octet + 5; + if (w & 64) *bp++ = octet + 6; + if (w & 128) *bp++ = octet + 7; + + w >>= 8; + octet += 8; + } while (w); + return bp - bits; +} + + +/*! @brief Calculates memory overhead for number of gap blocks sharing + the same memory allocation table (level lengths table). + @ingroup gapfunc +*/ +template +unsigned gap_overhead(const T* length, + const T* length_end, + const T* glevel_len) +{ + BM_ASSERT(length && length_end && glevel_len); + + unsigned overhead = 0; + for (;length < length_end; ++length) + { + unsigned len = *length; + int level = gap_calc_level(len, glevel_len); + BM_ASSERT(level >= 0 && level < (int)FerrisBitMagic::gap_levels); + unsigned capacity = glevel_len[level]; + BM_ASSERT(capacity >= len); + overhead += capacity - len; + } + return overhead; +} + + +/*! @brief Finds optimal gap blocks lengths. + @param length - first element of GAP lengths array + @param length_end - end of the GAP lengths array + @param glevel_len - destination GAP lengths array + @ingroup gapfunc +*/ + +template +bool improve_gap_levels(const T* length, + const T* length_end, + T* glevel_len) +{ + BM_ASSERT(length && length_end && glevel_len); + + size_t lsize = length_end - length; + + BM_ASSERT(lsize); + + gap_word_t max_len = 0; + unsigned i; + for (i = 0; i < lsize; ++i) + { + if (length[i] > max_len) + max_len = length[i]; + } + if (max_len < 5 || lsize <= FerrisBitMagic::gap_levels) + { + glevel_len[0] = max_len + 4; + for (i = 1; i < FerrisBitMagic::gap_levels; ++i) + { + glevel_len[i] = FerrisBitMagic::gap_max_buff_len; + } + return true; + } + + glevel_len[FerrisBitMagic::gap_levels-1] = max_len + 5; + + unsigned min_overhead = gap_overhead(length, length_end, glevel_len); + bool is_improved = false; + gap_word_t prev_value = glevel_len[FerrisBitMagic::gap_levels-1]; + // + // main problem solving loop + // + for (i = FerrisBitMagic::gap_levels-2; ; --i) + { + unsigned opt_len = 0; + unsigned j; + bool imp_flag = false; + gap_word_t gap_saved_value = glevel_len[i]; + for (j = 0; j < lsize; ++j) + { +// if (length[j]+4 > prev_value) +// continue; + + glevel_len[i] = length[j]+4; + unsigned ov = gap_overhead(length, length_end, glevel_len); + if (ov <= min_overhead) + { + min_overhead = ov; + opt_len = length[j]+4; + imp_flag = true; + } + } + if (imp_flag) { + glevel_len[i] = opt_len; // length[opt_idx]+4; + is_improved = true; + } + else + { + glevel_len[i] = gap_saved_value; + } + if (i == 0) + break; + prev_value = glevel_len[i]; + } + // + // Remove duplicates + // + + T val = *glevel_len; + T* gp = glevel_len; + T* res = glevel_len; + for (i = 0; i < FerrisBitMagic::gap_levels; ++i) + { + if (val != *gp) + { + val = *gp; + *++res = val; + } + ++gp; + } + + // Filling the "unused" part with max. possible value + while (++res < (glevel_len + FerrisBitMagic::gap_levels)) + { + *res = FerrisBitMagic::gap_max_buff_len; + } + + return is_improved; + +} + + + +} // namespace FerrisBitMagic + +#endif + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//#include "bmvmin.h" +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMVMIN__H__INCLUDED__ +#define BMVMIN__H__INCLUDED__ + +namespace FerrisBitMagic +{ + + +#define BM_MINISET_GAPLEN (FerrisBitMagic::gap_len_table::_len[0]) +#define BM_MINISET_ARRSIZE(x) ((x / 32) + ( (x % 32) && 1 )) + +/*! @defgroup mset Small sets functionality + * Templates in this group are used to keep block types in BM library. + * Classes of this group can tune bvector template (MS parameter) + * for best performance or minimal memory usage. + * @ingroup bmagic + * @{ + */ + + +/*! + @brief Template class implements memory saving set functionality + + Template can be used as template parameter for bvector if we + want to tune bvector for minimal memory consumption. + + @sa bvmini +*/ +template class miniset +{ +public: + + miniset() + : m_buf(0), + m_type(1) + {} + + miniset(const miniset& mset) + { + if (mset.m_buf) + { + if (mset.m_type) + init_gapbuf(mset.m_buf); + else + init_bitbuf(mset.m_buf); + } + else + { + m_type = mset.m_type; + m_buf = 0; + } + } + + ~miniset() + { + if (m_buf) + { + A::deallocate(m_buf, m_type ? + (BM_MINISET_GAPLEN / (sizeof(FerrisBitMagic::word_t) / sizeof(FerrisBitMagic::gap_word_t))) + : + (BM_MINISET_ARRSIZE(N))); + } + } + + /// Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. + unsigned test(FerrisBitMagic::id_t n) const + { + return + !m_buf ? 0 + : + m_type ? + gap_test((gap_word_t*)m_buf, n) + : + m_buf[n>>FerrisBitMagic::set_word_shift] & (1<<(n & FerrisBitMagic::set_word_mask)); + } + + void set(FerrisBitMagic::id_t n, bool val=true) + { + if (m_type == 0) + { + if (!m_buf) + { + if (!val) return; + init_bitbuf(0); + } + + unsigned nword = n >> FerrisBitMagic::set_word_shift; + unsigned mask = unsigned(1) << (n & FerrisBitMagic::set_word_mask); + + val ? (m_buf[nword] |= mask) : (m_buf[nword] &= ~mask); + } + else + { + if (!m_buf) + { + if (!val) return; + init_gapbuf(0); + } + + unsigned is_set; + unsigned new_block_len = + gap_set_value(val, (gap_word_t*)m_buf, n, &is_set); + + if (new_block_len > unsigned(BM_MINISET_GAPLEN-4)) + { + convert_buf(); + } + } + } + + unsigned mem_used() const + { + return sizeof(*this) + + m_buf ? + (m_type ? (BM_MINISET_GAPLEN * sizeof(gap_word_t)) + : (BM_MINISET_ARRSIZE(N) * sizeof(FerrisBitMagic::word_t))) + : 0; + } + + void swap(miniset& mset) + { + FerrisBitMagic::word_t* buftmp = m_buf; + m_buf = mset.m_buf; + mset.m_buf = buftmp; + unsigned typetmp = m_type; + m_type = mset.m_type; + mset.m_type = typetmp; + } + + +private: + + void init_bitbuf(FerrisBitMagic::word_t* buf) + { + unsigned arr_size = BM_MINISET_ARRSIZE(N); + m_buf = A::allocate(arr_size, 0); + if (buf) + { + ::memcpy(m_buf, buf, arr_size * sizeof(FerrisBitMagic::word_t)); + } + else + { + ::memset(m_buf, 0, arr_size * sizeof(FerrisBitMagic::word_t)); + } + m_type = 0; + } + + void init_gapbuf(FerrisBitMagic::word_t* buf) + { + unsigned arr_size = + BM_MINISET_GAPLEN / (sizeof(FerrisBitMagic::word_t) / sizeof(FerrisBitMagic::gap_word_t)); + m_buf = A::allocate(arr_size, 0); + if (buf) + { + ::memcpy(m_buf, buf, arr_size * sizeof(FerrisBitMagic::word_t)); + } + else + { + *m_buf = 0; + gap_set_all((gap_word_t*)m_buf, FerrisBitMagic::gap_max_bits, 0); + } + m_type = 1; + } + + void convert_buf() + { + unsigned arr_size = BM_MINISET_ARRSIZE(N); + FerrisBitMagic::word_t* buf = A::allocate(arr_size, 0); + + gap_convert_to_bitset(buf, (gap_word_t*) m_buf, arr_size); + arr_size = + BM_MINISET_GAPLEN / (sizeof(FerrisBitMagic::word_t) / sizeof(FerrisBitMagic::gap_word_t)); + A::deallocate(m_buf, arr_size); + m_buf = buf; + m_type = 0; + } + +private: + FerrisBitMagic::word_t* m_buf; //!< Buffer pointer + unsigned m_type; //!< buffer type (0-bit, 1-gap) +}; + + +/*! + @brief Mini bitvector used in bvector template to keep block type flags + + Template is used as a default template parameter MS for bvector + Offers maximum performance comparing to miniset. + + @sa miniset +*/ +template class bvmini +{ +public: + + bvmini(int start_strategy = 0) + { + ::memset(m_buf, 0, sizeof(m_buf)); + } + + bvmini(const bvmini& mset) + { + ::memcpy(m_buf, mset.m_buf, sizeof(m_buf)); + } + + + /// Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. + unsigned test(FerrisBitMagic::id_t n) const + { + return m_buf[n>>FerrisBitMagic::set_word_shift] & (1<<(n & FerrisBitMagic::set_word_mask)); + } + + void set(FerrisBitMagic::id_t n, bool val=true) + { + unsigned nword = n >> FerrisBitMagic::set_word_shift; + unsigned mask = unsigned(1) << (n & FerrisBitMagic::set_word_mask); + + val ? (m_buf[nword] |= mask) : (m_buf[nword] &= ~mask); + } + + unsigned mem_used() const + { + return sizeof(*this); + } + + void swap(bvmini& mset) + { + for (unsigned i = 0; i < BM_MINISET_ARRSIZE(N); ++i) + { + FerrisBitMagic::word_t tmp = m_buf[i]; + m_buf[i] = mset.m_buf[i]; + mset.m_buf[i] = tmp; + } + } + +private: + FerrisBitMagic::word_t m_buf[BM_MINISET_ARRSIZE(N)]; +}; + + +/*!@} */ + +/*! + @brief Bitvector class with very limited functionality. + + Class implements simple bitset and used for internal + and testing purposes. +*/ +template class bvector_mini +{ +public: + bvector_mini(unsigned size) + : m_buf(0), + m_size(size) + { + unsigned arr_size = (size / 32) + 1; + m_buf = A::allocate(arr_size, 0); + ::memset(m_buf, 0, arr_size * sizeof(unsigned)); + } + bvector_mini(const bvector_mini& bvect) + : m_size(bvect.m_size) + { + unsigned arr_size = (m_size / 32) + 1; + m_buf = A::allocate(arr_size, 0); + ::memcpy(m_buf, bvect.m_buf, arr_size * sizeof(unsigned)); + } + + ~bvector_mini() + { + A::deallocate(m_buf, (m_size / 32) + 1); + } + + /// Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. + int is_bit_true(unsigned pos) const + { + unsigned char mask = (unsigned char)((char)0x1 << (pos & 7)); + unsigned char* offs = (unsigned char*)m_buf + (pos >> 3); // m_buf + (pos/8) + + return (*offs) & mask; + } + + /// Sets bit number pos to 1 + void set_bit(unsigned pos) + { + unsigned char mask = (unsigned char)(0x1 << (pos & 7)); + unsigned char* offs = (unsigned char*)m_buf + (pos >> 3); + *offs |= mask; + } + + + /// Sets bit number pos to 0 + void clear_bit(unsigned pos) + { + unsigned char mask = (unsigned char)(0x1 << (pos & 7)); + unsigned char* offs = (unsigned char*)m_buf + (pos >> 3); + + *offs &= ~mask; + } + + /// Counts number of bits ON + unsigned bit_count() const + { + register unsigned count = 0; + const unsigned* end = m_buf + (m_size / 32)+1; + + for (unsigned* start = m_buf; start < end; ++start) + { + register unsigned value = *start; + for (count += (value!=0); value &= value - 1; ++count); + } + return count; + } + + /// Comparison. + int compare(const bvector_mini& bvect) + { + unsigned cnt1 = bit_count(); + unsigned cnt2 = bvect.bit_count(); + + if (!cnt1 && !cnt2) return 0; + + unsigned cnt_min = cnt1 < cnt2 ? cnt1 : cnt2; + + if (!cnt_min) return cnt1 ? 1 : -1; + + unsigned idx1 = get_first(); + unsigned idx2 = bvect.get_first(); + + for (unsigned i = 0; i < cnt_min; ++i) + { + if (idx1 != idx2) + { + return idx1 < idx2 ? 1 : -1; + } + idx1 = get_next(idx1); + idx2 = bvect.get_next(idx2); + } + + BM_ASSERT(idx1==0 || idx2==0); + + if (idx1 != idx2) + { + if (!idx1) return -1; + if (!idx2) return 1; + return idx1 < idx2 ? 1 : -1; + } + + return 0; + } + + + /// Returns index of the first ON bit + unsigned get_first() const + { + unsigned pos = 0; + const unsigned char* ptr = (unsigned char*) m_buf; + + for (unsigned i = 0; i < (m_size/8)+1; ++i) + { + register unsigned char w = ptr[i]; + + + if (w != 0) + { + while ((w & 1) == 0) + { + w >>= 1; + ++pos; + } + return pos; + } + pos += sizeof(unsigned char) * 8; + } + return 0; + } + + + /// Returns index of next bit, which is ON + unsigned get_next(unsigned idx) const + { + register unsigned i; + + for (i = idx+1; i < m_size; ++i) + { + unsigned char* offs = (unsigned char*)m_buf + (i >> 3); + if (*offs) + { + unsigned char mask = (unsigned char)((char)0x1 << (i & 7)); + + if (*offs & mask) + { + return i; + } + } + else + { + i += 7; + } + } + return 0; + } + + + void combine_and(const bvector_mini& bvect) + { + const unsigned* end = m_buf + (m_size / 32)+1; + + const unsigned* src = bvect.get_buf(); + + for (unsigned* start = m_buf; start < end; ++start) + { + *start &= *src++; + } + } + + void combine_xor(const bvector_mini& bvect) + { + const unsigned* end = m_buf + (m_size / 32)+1; + + const unsigned* src = bvect.get_buf(); + + for (unsigned* start = m_buf; start < end; ++start) + { + *start ^= *src++; + } + } + + + void combine_or(const bvector_mini& bvect) + { + const unsigned* end = m_buf + (m_size / 32)+1; + + const unsigned* src = bvect.get_buf(); + + for (unsigned* start = m_buf; start < end; ++start) + { + *start |= *src++; + } + } + + void combine_sub(const bvector_mini& bvect) + { + const unsigned* end = m_buf + (m_size / 32)+1; + + const unsigned* src = bvect.get_buf(); + + for (unsigned* start = m_buf; start < end; ++start) + { + *start &= ~(*src++); + } + } + + const unsigned* get_buf() const { return m_buf; } + unsigned mem_used() const + { + return sizeof(bvector_mini) + (m_size / 32) + 1; + } + + void swap(bvector_mini& bvm) + { + BM_ASSERT(m_size == bvm.m_size); + FerrisBitMagic::word_t* buftmp = m_buf; + m_buf = bvm.m_buf; + bvm.m_buf = buftmp; + } + +private: + FerrisBitMagic::word_t* m_buf; + unsigned m_size; +}; + + + +} // namespace FerrisBitMagic + +#endif +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//#include "encoding.h" +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef ENCODING_H__INCLUDED__ +#define ENCODING_H__INCLUDED__ + +#include + +namespace FerrisBitMagic +{ + +// ---------------------------------------------------------------- +/*! + \brief Memory encoding. + + Class for encoding data into memory. + Properly handles aligment issues with integer data types. +*/ +class encoder +{ +public: + + encoder(unsigned char* buf, unsigned size); + void put_8(unsigned char c); + void put_16(FerrisBitMagic::short_t s); + void put_16(const FerrisBitMagic::short_t* s, unsigned count); + void put_32(FerrisBitMagic::word_t w); + void put_32(const FerrisBitMagic::word_t* w, unsigned count); + unsigned size() const; + +private: + + unsigned char* buf_; + unsigned char* start_; + unsigned int size_; +}; + +// ---------------------------------------------------------------- +/** + Class for decoding data from memory buffer. + Properly handles aligment issues with integer data types. +*/ +class decoder +{ +public: + decoder(const unsigned char* buf); + unsigned char get_8(); + FerrisBitMagic::short_t get_16(); + FerrisBitMagic::word_t get_32(); + void get_32(FerrisBitMagic::word_t* w, unsigned count); + void get_16(FerrisBitMagic::short_t* s, unsigned count); + unsigned size() const; +private: + const unsigned char* buf_; + const unsigned char* start_; +}; + + + +// ---------------------------------------------------------------- +// Implementation details. +// ---------------------------------------------------------------- + +/*! + \fn encoder::encoder(unsigned char* buf, unsigned size) + \brief Construction. + \param buf - memory buffer pointer. + \param size - size of the buffer +*/ +inline encoder::encoder(unsigned char* buf, unsigned size) +: buf_(buf), start_(buf), size_(size) +{ +} + +/*! + \fn void encoder::put_8(unsigned char c) + \brief Puts one character into the encoding buffer. + \param c - character to encode +*/ +inline void encoder::put_8(unsigned char c) +{ + *buf_++ = c; +} + +/*! + \fn encoder::put_16(FerrisBitMagic::short_t s) + \brief Puts short word (16 bits) into the encoding buffer. + \param s - short word to encode +*/ +inline void encoder::put_16(FerrisBitMagic::short_t s) +{ + *buf_++ = (unsigned char) s; + s >>= 8; + *buf_++ = (unsigned char) s; +} + +/*! + \brief Method puts array of short words (16 bits) into the encoding buffer. +*/ +inline void encoder::put_16(const FerrisBitMagic::short_t* s, unsigned count) +{ + for (unsigned i = 0; i < count; ++i) + { + put_16(s[i]); + } +} + + +/*! + \fn unsigned encoder::size() const + \brief Returns size of the current encoding stream. +*/ +inline unsigned encoder::size() const +{ + return (unsigned)(buf_ - start_); +} + +/*! + \fn void encoder::put_32(FerrisBitMagic::word_t w) + \brief Puts 32 bits word into encoding buffer. + \param w - word to encode. +*/ +inline void encoder::put_32(FerrisBitMagic::word_t w) +{ + *buf_++ = (unsigned char) w; + *buf_++ = (unsigned char) (w >> 8); + *buf_++ = (unsigned char) (w >> 16); + *buf_++ = (unsigned char) (w >> 24); +} + +/*! + \brief Encodes array of 32-bit words +*/ +inline void encoder::put_32(const FerrisBitMagic::word_t* w, unsigned count) +{ + for (unsigned i = 0; i < count; ++i) + { + put_32(w[i]); + } +} + + +// --------------------------------------------------------------------- + +/*! + \fn decoder::decoder(const unsigned char* buf) + \brief Construction + \param buf - pointer to the decoding memory. +*/ +inline decoder::decoder(const unsigned char* buf) +: buf_(buf), start_(buf) +{ +} + +/*! + \fn unsigned char decoder::get_8() + \brief Reads character from the decoding buffer. +*/ +inline unsigned char decoder::get_8() +{ + return *buf_++; +} + +/*! + \fn FerrisBitMagic::short_t decoder::get_16() + \brief Reads 16bit word from the decoding buffer. +*/ +inline FerrisBitMagic::short_t decoder::get_16() +{ + FerrisBitMagic::short_t a = (FerrisBitMagic::short_t)(buf_[0] + ((FerrisBitMagic::short_t)buf_[1] << 8)); + buf_ += sizeof(a); + return a; +} + +/*! + \fn FerrisBitMagic::word_t decoder::get_32() + \brief Reads 32 bit word from the decoding buffer. +*/ +inline FerrisBitMagic::word_t decoder::get_32() +{ + FerrisBitMagic::word_t a = buf_[0]+ ((unsigned)buf_[1] << 8) + + ((unsigned)buf_[2] << 16) + ((unsigned)buf_[3] << 24); + buf_+=sizeof(a); + return a; +} + + +/*! + \fn void decoder::get_32(FerrisBitMagic::word_t* w, unsigned count) + \brief Reads block of 32-bit words from the decoding buffer. + \param w - pointer on memory block to read into. + \param count - size of memory block in words. +*/ +inline void decoder::get_32(FerrisBitMagic::word_t* w, unsigned count) +{ + for (unsigned i = 0; i < count; ++i) + { + w[i] = get_32(); + } +} + +/*! + \fn void decoder::get_16(FerrisBitMagic::short_t* s, unsigned count) + \brief Reads block of 32-bit words from the decoding buffer. + \param s - pointer on memory block to read into. + \param count - size of memory block in words. +*/ +inline void decoder::get_16(FerrisBitMagic::short_t* s, unsigned count) +{ + for (unsigned i = 0; i < count; ++i) + { + s[i] = get_16(); + } +} + +/*! + \fn unsigned decoder::size() const + \brief Returns size of the current decoding stream. +*/ +inline unsigned decoder::size() const +{ + return (unsigned)(buf_ - start_); +} + + +} // namespace FerrisBitMagic + +#endif + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//#include "bmalloc.h" +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMALLOC__H__INCLUDED__ +#define BMALLOC__H__INCLUDED__ + +#include + +namespace FerrisBitMagic +{ + + +/*! @defgroup alloc Memory Allocation + * Memory allocation related units + * @ingroup bmagic + * + * @{ + */ + + +// /*! +// @brief Default malloc based bitblock allocator class. + +// Functions allocate and deallocate conform to STL allocator specs. +// @ingroup alloc +// */ +// class block_allocator +// { +// public: +// /** +// The member function allocates storage for an array of n FerrisBitMagic::word_t +// elements, by calling malloc. +// @return pointer to the allocated memory. +// */ +// static FerrisBitMagic::word_t* allocate(size_t n, const void *) +// { +// #ifdef BMSSE2OPT +// # ifdef _MSC_VER +// return (FerrisBitMagic::word_t*) ::_aligned_malloc(n * sizeof(FerrisBitMagic::word_t), 16); +// #else +// return (FerrisBitMagic::word_t*) ::_mm_malloc(n * sizeof(FerrisBitMagic::word_t), 16); +// # endif + +// #else +// return (FerrisBitMagic::word_t*) ::malloc(n * sizeof(FerrisBitMagic::word_t)); +// #endif +// } + +// /** +// The member function frees storage for an array of n FerrisBitMagic::word_t +// elements, by calling free. +// */ +// static void deallocate(FerrisBitMagic::word_t* p, size_t n) +// { +// #ifdef BMSSE2OPT +// # ifdef _MSC_VER +// ::_aligned_free(p); +// #else +// ::_mm_free(p); +// # endif + +// #else +// ::free(p); +// #endif +// } + +// }; + + + +/*! + @brief Default malloc based bitblock allocator class. + + Functions allocate and deallocate conform to STL allocator specs. + @ingroup alloc +*/ +class block_allocator +{ + static int getSAMaxSz() + { + return 256; + } + static FerrisLoki::FerrisSmallObjAllocator& getAlloc() + { + static FerrisLoki::FerrisSmallObjAllocator *ret = 0; + if( !ret ) + { + ret = new FerrisLoki::FerrisSmallObjAllocator( getSAMaxSz() ); + } + return *ret; + } + + +public: + + /** + The member function allocates storage for an array of n FerrisBitMagic::word_t + elements, by calling malloc. + @return pointer to the allocated memory. + */ + static FerrisBitMagic::word_t* allocate(size_t n, const void *) + { + if( n < getSAMaxSz() ) + { + return (FerrisBitMagic::word_t*)getAlloc().Allocate( n * sizeof(FerrisBitMagic::word_t) ); + } + +// std::cerr << "allocate() n:" << n << std::endl; + return (FerrisBitMagic::word_t*) ::malloc(n * sizeof(FerrisBitMagic::word_t)); + } + /** + The member function frees storage for an array of n FerrisBitMagic::word_t + elements, by calling free. + */ + static void deallocate(FerrisBitMagic::word_t* p, size_t n) + { + if( n < getSAMaxSz() ) + { + return getAlloc().Deallocate( p, n * sizeof(FerrisBitMagic::word_t) ); + } + +// std::cerr << "deallocate() n:" << n << std::endl; + ::free(p); + } +}; + + +/*! + @brief Default malloc based bitblock allocator class. + + Functions allocate and deallocate conform to STL allocator specs. + @ingroup alloc +*/ +class my_block_allocator +{ +public: + /** + The member function allocates storage for an array of n FerrisBitMagic::word_t + elements, by calling malloc. + @return pointer to the allocated memory. + */ + static FerrisBitMagic::word_t* allocate(size_t n, const void *) + { +// std::cerr << "allocate() n:" << n << std::endl; +#ifdef BMSSE2OPT +# ifdef _MSC_VER + return (FerrisBitMagic::word_t*) ::_aligned_malloc(n * sizeof(FerrisBitMagic::word_t), 16); +#else + return (FerrisBitMagic::word_t*) ::_mm_malloc(n * sizeof(FerrisBitMagic::word_t), 16); +# endif +#else + return (FerrisBitMagic::word_t*) ::malloc(n * sizeof(FerrisBitMagic::word_t)); +#endif + } + /** + The member function frees storage for an array of n FerrisBitMagic::word_t + elements, by calling free. + */ + static void deallocate(FerrisBitMagic::word_t* p, size_t) + { +#ifdef BMSSE2OPT +# ifdef _MSC_VER + ::_aligned_free(p); +#else + ::_mm_free(p); +# endif +#else + ::free(p); +#endif + } +}; + +// ------------------------------------------------------------------------- + +/*! @brief Default malloc based bitblock allocator class. + + Functions allocate and deallocate conform to STL allocator specs. +*/ +// class ptr_allocator +// { +// public: +// /** +// The member function allocates storage for an array of n void* +// elements, by calling malloc. +// @return pointer to the allocated memory. +// */ +// static void* allocate(size_t n, const void *) +// { +// return ::malloc(n * sizeof(void*)); +// } + +// /** +// The member function frees storage for an array of n FerrisBitMagic::word_t +// elements, by calling free. +// */ +// static void deallocate(void* p, size_t) +// { +// ::free(p); +// } +// }; + + +class ptr_allocator +{ + static int getSAMaxSz() + { + return 256; + } + static FerrisLoki::FerrisSmallObjAllocator& getAlloc() + { +// static Loki::SmallObjAllocator ret( 2*4096, getSAMaxSz() ); +// return ret; + static FerrisLoki::FerrisSmallObjAllocator* ret = 0; + if( !ret ) + { + ret = new FerrisLoki::FerrisSmallObjAllocator( getSAMaxSz() ); + } + return *ret; + } + +public: + static void* allocate(size_t n, const void *) + { + if( n < getSAMaxSz() ) + { + return (FerrisBitMagic::word_t*)getAlloc().Allocate( n * sizeof(void*) ); + } + + return ::malloc(n * sizeof(void*)); + } + + static void deallocate(void* p, size_t n) + { + if( n < getSAMaxSz() ) + { + return getAlloc().Deallocate( p, n * sizeof(void*) ); + } + + ::free(p); + } +}; + + +// ------------------------------------------------------------------------- + +/*! @brief BM style allocator adapter. + + Template takes two parameters BA - allocator object for bit blocks and + PA - allocator object for pointer blocks. +*/ +template class mem_alloc +{ +public: + typedef BA block_allocator_type; + typedef PA ptr_allocator_type; + +public: + + mem_alloc(const BA& block_alloc = BA(), const PA& ptr_alloc = PA()) + : block_alloc_(block_alloc), + ptr_alloc_(ptr_alloc) + {} + + /*! @brief Returns copy of the block allocator object + */ + block_allocator_type get_block_allocator() const + { + return BA(block_alloc_); + } + + /*! @brief Returns copy of the ptr allocator object + */ + ptr_allocator_type get_ptr_allocator() const + { + return PA(block_alloc_); + } + + + /*! @brief Allocates and returns bit block. + */ + FerrisBitMagic::word_t* alloc_bit_block() + { + return block_alloc_.allocate(FerrisBitMagic::set_block_size, 0); + } + + /*! @brief Frees bit block allocated by alloc_bit_block. + */ + void free_bit_block(FerrisBitMagic::word_t* block) + { + if (IS_VALID_ADDR(block)) + block_alloc_.deallocate(block, FerrisBitMagic::set_block_size); + } + + /*! @brief Allocates GAP block using bit block allocator (BA). + + GAP blocks in BM library belong to levels. Each level has a + correspondent length described in FerrisBitMagic::gap_len_table<>. + + @param level GAP block level. + */ + FerrisBitMagic::gap_word_t* alloc_gap_block(unsigned level, + const gap_word_t* glevel_len) + { + BM_ASSERT(level < FerrisBitMagic::gap_levels); + unsigned len = + glevel_len[level] / (sizeof(FerrisBitMagic::word_t) / sizeof(gap_word_t)); + + return (FerrisBitMagic::gap_word_t*)block_alloc_.allocate(len, 0); + } + + /*! @brief Frees GAP block using bot block allocator (BA) + */ + void free_gap_block(FerrisBitMagic::gap_word_t* block, + const gap_word_t* glevel_len) + { + BM_ASSERT(IS_VALID_ADDR((FerrisBitMagic::word_t*)block)); + + unsigned len = gap_capacity(block, glevel_len); + len /= sizeof(FerrisBitMagic::word_t) / sizeof(FerrisBitMagic::gap_word_t); + block_alloc_.deallocate((FerrisBitMagic::word_t*)block, len); + } + + /*! @brief Allocates block of pointers. + */ + void* alloc_ptr(unsigned size = FerrisBitMagic::set_array_size) + { + return ptr_alloc_.allocate(size, 0); + } + + /*! @brief Frees block of pointers. + */ + void free_ptr(void* p, unsigned size = FerrisBitMagic::set_array_size) + { + ptr_alloc_.deallocate(p, size); + } +private: + BA block_alloc_; + PA ptr_alloc_; +}; + +typedef mem_alloc standard_allocator; + +/** @} */ + + +} // namespace FerrisBitMagic + + +#endif +//////////////////////////////////////////////////////////////////////////////// + +namespace FerrisBitMagic +{ + + +#ifdef BMCOUNTOPT + +# define BMCOUNT_INC ++count_; +# define BMCOUNT_DEC --count_; +# define BMCOUNT_VALID(x) count_is_valid_ = x; +# define BMCOUNT_SET(x) count_ = x; count_is_valid_ = true; +# define BMCOUNT_ADJ(x) if (x) ++count_; else --count_; + +#else + +# define BMCOUNT_INC +# define BMCOUNT_DEC +# define BMCOUNT_VALID(x) +# define BMCOUNT_SET(x) +# define BMCOUNT_ADJ(x) + +#endif + + + +typedef FerrisBitMagic::miniset mem_save_set; + + +/** @defgroup bmagic BitMagic C++ Library + * For more information please visit: http://bmagic.sourceforge.net + * + */ + + +/** @defgroup bvector The Main bvector<> Group + * This is the main group. It includes bvector template: front end of the bm library. + * @ingroup bmagic + */ + + +/*! + @brief Block allocation strategies. + @ingroup bvector +*/ +enum strategy +{ + BM_BIT = 0, //!< No GAP compression strategy. All new blocks are bit blocks. + BM_GAP = 1 //!< GAP compression is ON. +}; + + +/*! + @brief bitvector with runtime compression of bits. + @ingroup bvector +*/ + +template +class bvector +{ +public: + + typedef Alloc allocator_type; + + /*! + @brief Structure with statistical information about bitset's memory + allocation details. + @ingroup bvector + */ + struct statistics + { + /// Number of bit blocks. + unsigned bit_blocks; + /// Number of GAP blocks. + unsigned gap_blocks; + /// Estimated maximum of memory required for serialization. + unsigned max_serialize_mem; + /// Memory used by bitvector including temp and service blocks + unsigned memory_used; + /// Array of all GAP block lengths in the bvector. + gap_word_t gap_length[FerrisBitMagic::set_total_blocks]; + /// GAP lengths used by bvector + gap_word_t gap_levels[FerrisBitMagic::gap_levels]; + }; + + /** + @brief Class reference implements an object for bit assignment. + Since C++ does not provide with build-in bit type supporting l-value + operations we have to emulate it. + + @ingroup bvector + */ + class reference + { + public: + reference(bvector& bv, FerrisBitMagic::id_t position) + : bv_(bv), + position_(position) + {} + + reference(const reference& ref) + : bv_(ref.bv_), + position_(ref.position_) + { + bv_.set(position_, ref.bv_.get_bit(position_)); + } + + operator bool() const + { + return bv_.get_bit(position_); + } + + const reference& operator=(const reference& ref) const + { + bv_.set(position_, (bool)ref); + return *this; + } + + const reference& operator=(bool value) const + { + bv_.set(position_, value); + return *this; + } + + bool operator==(const reference& ref) const + { + return bool(*this) == bool(ref); + } + + /*! Bitwise AND. Performs operation: bit = bit AND value */ + const reference& operator&=(bool value) const + { + bv_.set(position_, value); + return *this; + } + + /*! Bitwise OR. Performs operation: bit = bit OR value */ + const reference& operator|=(bool value) const + { + if (value != bv_.get_bit(position_)) + { + bv_.set_bit(position_); + } + return *this; + } + + /*! Bitwise exclusive-OR (XOR). Performs operation: bit = bit XOR value */ + const reference& operator^=(bool value) const + { + bv_.set(position_, value != bv_.get_bit(position_)); + return *this; + } + + /*! Logical Not operator */ + bool operator!() const + { + return !bv_.get_bit(position_); + } + + /*! Bit Not operator */ + bool operator~() const + { + return !bv_.get_bit(position_); + } + + /*! Negates the bit value */ + reference& flip() + { + bv_.flip(position_); + return *this; + } + + private: + bvector& bv_; //!< Reference variable on the parent. + FerrisBitMagic::id_t position_; //!< Position in the parent bitvector. + }; + + typedef bool const_reference; + + /*! + @brief Base class for all iterators. + @ingroup bvector + */ + class iterator_base + { + friend class bvector; + public: + iterator_base() : block_(0) {} + + bool operator==(const iterator_base& it) const + { + return (position_ == it.position_) && (bv_ == it.bv_); + } + + bool operator!=(const iterator_base& it) const + { + return ! operator==(it); + } + + bool operator < (const iterator_base& it) const + { + return position_ < it.position_; + } + + bool operator <= (const iterator_base& it) const + { + return position_ <= it.position_; + } + + bool operator > (const iterator_base& it) const + { + return position_ > it.position_; + } + + bool operator >= (const iterator_base& it) const + { + return position_ >= it.position_; + } + + /** + \fn bool FerrisBitMagic::bvector::iterator_base::valid() const + \brief Checks if iterator is still valid. Analog of != 0 comparison for pointers. + \returns true if iterator is valid. + */ + bool valid() const + { + return position_ != FerrisBitMagic::id_max; + } + + /** + \fn bool FerrisBitMagic::bvector::iterator_base::invalidate() + \brief Turns iterator into an invalid state. + */ + void invalidate() + { + position_ = FerrisBitMagic::id_max; + } + + public: + + /** Information about current bitblock. */ + struct bitblock_descr + { + const FerrisBitMagic::word_t* ptr; //!< Word pointer. + unsigned bits[32]; //!< Unpacked list of ON bits + unsigned idx; //!< Current position in the bit list + unsigned cnt; //!< Number of ON bits + FerrisBitMagic::id_t pos; //!< Last bit position before + }; + + /** Information about current DGAP block. */ + struct dgap_descr + { + const gap_word_t* ptr; //!< Word pointer. + gap_word_t gap_len; //!< Current dgap length. + }; + + protected: + FerrisBitMagic::bvector* bv_; //!< Pointer on parent bitvector + FerrisBitMagic::id_t position_; //!< Bit position (bit idx) + const FerrisBitMagic::word_t* block_; //!< Block pointer.(NULL-invalid) + unsigned block_type_; //!< Type of block. 0-Bit, 1-GAP + unsigned block_idx_; //!< Block index + + /*! Block type dependent information for current block. */ + union block_descr + { + bitblock_descr bit_; //!< BitBlock related info. + dgap_descr gap_; //!< DGAP block related info. + } bdescr_; + }; + + /*! + @brief Output iterator iterator designed to set "ON" bits based on + their indeces. + STL container can be converted to bvector using this iterator + @ingroup bvector + */ + class insert_iterator + { + public: +#ifndef BM_NO_STL + typedef std::output_iterator_tag iterator_category; +#endif + typedef unsigned value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(bvector& bvect) + : bvect_(bvect) + {} + + insert_iterator& operator=(FerrisBitMagic::id_t n) + { + bvect_.set(n); + return *this; + } + + /*! Returns *this without doing nothing */ + insert_iterator& operator*() { return *this; } + /*! Returns *this. This iterator does not move */ + insert_iterator& operator++() { return *this; } + /*! Returns *this. This iterator does not move */ + insert_iterator& operator++(int) { return *this; } + + protected: + FerrisBitMagic::bvector& bvect_; + }; + + /*! + @brief Constant input iterator designed to enumerate "ON" bits + @ingroup bvector + */ + class enumerator : public iterator_base + { + public: +#ifndef BM_NO_STL + typedef std::input_iterator_tag iterator_category; +#endif + typedef unsigned value_type; + typedef unsigned difference_type; + typedef unsigned* pointer; + typedef unsigned& reference; + + public: + enumerator() : iterator_base() {} + enumerator(const bvector* bvect, int position) + : iterator_base() + { + this->bv_ = const_cast*>(bvect); + if (position == 0) + { + go_first(); + } + else + { + this->invalidate(); + } + } + + FerrisBitMagic::id_t operator*() const + { + return this->position_; + } + + enumerator& operator++() + { + return this->go_up(); + } + + enumerator operator++(int) + { + enumerator tmp = *this; + this->go_up(); + return tmp; + } + + + void go_first() + { + BM_ASSERT(this->bv_); + + #ifdef BMCOUNTOPT + if (this->bv_->count_is_valid_ && + this->bv_->count_ == 0) + { + this->invalidate(); + return; + } + #endif + + typename FerrisBitMagic::bvector::blocks_manager* bman = + &(this->bv_->blockman_); + FerrisBitMagic::word_t*** blk_root = bman->blocks_root(); + + this->block_idx_ = this->position_= 0; + unsigned i, j; + + for (i = 0; i < bman->top_block_size(); ++i) + { + FerrisBitMagic::word_t** blk_blk = blk_root[i]; + + if (blk_blk == 0) // not allocated + { + this->block_idx_ += FerrisBitMagic::set_array_size; + this->position_ += FerrisBitMagic::bits_in_array; + continue; + } + + + for (j = 0; j < FerrisBitMagic::set_array_size; ++j,++(this->block_idx_)) + { + this->block_ = blk_blk[j]; + + if (this->block_ == 0) + { + this->position_ += bits_in_block; + continue; + } + + if (BM_IS_GAP((*bman), this->block_, this->block_idx_)) + { + this->block_type_ = 1; + if (search_in_gapblock()) + { + return; + } + } + else + { + this->block_type_ = 0; + if (search_in_bitblock()) + { + return; + } + } + + } // for j + + } // for i + + this->invalidate(); + } + + enumerator& go_up() + { + // Current block search. + ++this->position_; + typedef typename iterator_base::block_descr block_descr_type; + + block_descr_type* bdescr = &(this->bdescr_); + + switch (this->block_type_) + { + case 0: // BitBlock + { + + // check if we can get the value from the + // bits cache + + unsigned idx = ++(bdescr->bit_.idx); + if (idx < bdescr->bit_.cnt) + { + this->position_ = bdescr->bit_.pos + + bdescr->bit_.bits[idx]; + return *this; + } + this->position_ += 31 - bdescr->bit_.bits[--idx]; + + const FerrisBitMagic::word_t* pend = this->block_ + FerrisBitMagic::set_block_size; + + while (++(bdescr->bit_.ptr) < pend) + { + FerrisBitMagic::word_t w = *(bdescr->bit_.ptr); + if (w) + { + bdescr->bit_.idx = 0; + bdescr->bit_.pos = this->position_; + bdescr->bit_.cnt = FerrisBitMagic::bit_list(w, bdescr->bit_.bits); + this->position_ += bdescr->bit_.bits[0]; + return *this; + } + else + { + this->position_ += 32; + } + } + + } + break; + + case 1: // DGAP Block + { + if (--(bdescr->gap_.gap_len)) + { + return *this; + } + + // next gap is "OFF" by definition. + if (*(bdescr->gap_.ptr) == FerrisBitMagic::gap_max_bits - 1) + { + break; + } + gap_word_t prev = *(bdescr->gap_.ptr); + register unsigned val = *(++(bdescr->gap_.ptr)); + + this->position_ += val - prev; + // next gap is now "ON" + + if (*(bdescr->gap_.ptr) == FerrisBitMagic::gap_max_bits - 1) + { + break; + } + prev = *(bdescr->gap_.ptr); + val = *(++(bdescr->gap_.ptr)); + bdescr->gap_.gap_len = val - prev; + return *this; // next "ON" found; + } + + default: + BM_ASSERT(0); + + } // switch + + + // next bit not present in the current block + // keep looking in the next blocks. + ++(this->block_idx_); + unsigned i = this->block_idx_ >> FerrisBitMagic::set_array_shift; + unsigned top_block_size = this->bv_->blockman_.top_block_size(); + for (; i < top_block_size; ++i) + { + FerrisBitMagic::word_t** blk_blk = this->bv_->blockman_.blocks_[i]; + if (blk_blk == 0) + { + this->block_idx_ += FerrisBitMagic::set_array_size; + this->position_ += FerrisBitMagic::bits_in_array; + continue; + } + + unsigned j = this->block_idx_ & FerrisBitMagic::set_array_mask; + + for(; j < FerrisBitMagic::set_array_size; ++j, ++(this->block_idx_)) + { + this->block_ = blk_blk[j]; + + if (this->block_ == 0) + { + this->position_ += FerrisBitMagic::bits_in_block; + continue; + } + + if (BM_IS_GAP((this->bv_->blockman_), + this->block_, + this->block_idx_)) + { + this->block_type_ = 1; + if (search_in_gapblock()) + { + return *this; + } + } + else + { + this->block_type_ = 0; + if (search_in_bitblock()) + { + return *this; + } + } + + + } // for j + + } // for i + + + this->invalidate(); + return *this; + } + + + private: + bool search_in_bitblock() + { + BM_ASSERT(this->block_type_ == 0); + + typedef typename iterator_base::block_descr block_descr_type; + block_descr_type* bdescr = &(this->bdescr_); + + // now lets find the first bit in block. + bdescr->bit_.ptr = this->block_; + + const word_t* ptr_end = this->block_ + FerrisBitMagic::set_block_size; + + do + { + register FerrisBitMagic::word_t w = *(bdescr->bit_.ptr); + + if (w) + { + bdescr->bit_.idx = 0; + bdescr->bit_.pos = this->position_; + bdescr->bit_.cnt = + FerrisBitMagic::bit_list(w, bdescr->bit_.bits); + this->position_ += bdescr->bit_.bits[0]; + + return true; + } + else + { + this->position_ += 32; + } + + } + while (++(bdescr->bit_.ptr) < ptr_end); + + return false; + } + + bool search_in_gapblock() + { + BM_ASSERT(this->block_type_ == 1); + + typedef typename iterator_base::block_descr block_descr_type; + block_descr_type* bdescr = &(this->bdescr_); + + bdescr->gap_.ptr = BMGAP_PTR(this->block_); + unsigned bitval = *(bdescr->gap_.ptr) & 1; + + ++(bdescr->gap_.ptr); + + do + { + register unsigned val = *(bdescr->gap_.ptr); + + if (bitval) + { + gap_word_t* first = BMGAP_PTR(this->block_) + 1; + if (bdescr->gap_.ptr == first) + { + bdescr->gap_.gap_len = val + 1; + } + else + { + bdescr->gap_.gap_len = + val - *(bdescr->gap_.ptr-1); + } + + return true; + } + this->position_ += val + 1; + + if (val == FerrisBitMagic::gap_max_bits - 1) + { + break; + } + + bitval ^= 1; + ++(bdescr->gap_.ptr); + + } while (1); + + return false; + } + + }; + + /*! + @brief Constant input iterator designed to enumerate "ON" bits + counted_enumerator keeps bitcount, ie number of ON bits starting + from the position 0 in the bit string up to the currently enumerated bit + + When increment operator called current position is increased by 1. + + @ingroup bvector + */ + class counted_enumerator : public enumerator + { + public: +#ifndef BM_NO_STL + typedef std::input_iterator_tag iterator_category; +#endif + counted_enumerator() : bit_count_(0){} + + counted_enumerator(const enumerator& en) + : enumerator(en) + { + if (this->valid()) + bit_count_ = 1; + } + + counted_enumerator& operator=(const enumerator& en) + { + enumerator* me = this; + *me = en; + if (this->valid()) + this->bit_count_ = 1; + return *this; + } + + counted_enumerator& operator++() + { + this->go_up(); + if (this->valid()) + ++(this->bit_count_); + return *this; + } + + counted_enumerator operator++(int) + { + counted_enumerator tmp(*this); + this->go_up(); + if (this->valid()) + ++bit_count_; + return tmp; + } + + /*! @brief Number of bits ON starting from the . + + Method returns number of ON bits fromn the bit 0 to the current bit + For the first bit in bitvector it is 1, for the second 2 + */ + FerrisBitMagic::id_t count() const { return bit_count_; } + + private: + FerrisBitMagic::id_t bit_count_; + }; + + friend class iterator_base; + friend class enumerator; + +public: + +#ifdef BMCOUNTOPT + bvector(strategy strat = BM_BIT, + const gap_word_t* glevel_len=FerrisBitMagic::gap_len_table::_len, + FerrisBitMagic::id_t max_bits = 0, + const Alloc& alloc = Alloc()) + : count_(0), + count_is_valid_(true), + blockman_(glevel_len, max_bits, alloc), + new_blocks_strat_(strat) + {} + + bvector(const FerrisBitMagic::bvector& bvect) + : count_(bvect.count_), + count_is_valid_(bvect.count_is_valid_), + blockman_(bvect.blockman_), + new_blocks_strat_(bvect.new_blocks_strat_) + {} + +#else + /*! + \brief Constructs bvector class + \param strat - operation mode strategy, + BM_BIT - default strategy, bvector use plain bitset blocks, + (performance oriented strategy). + BM_GAP - memory effitent strategy, bvector allocates blocks + as array of intervals(gaps) and convert blocks into plain bitsets + only when enthropy grows. + \param glevel_len - pointer on C-style array keeping GAP block sizes. + (Put FerrisBitMagic::gap_len_table_min::_len for GAP memory saving mode) + \param max_bits - maximum number of bits addressable by bvector, 0 means "no limits" (recommended) + \sa FerrisBitMagic::gap_len_table FerrisBitMagic::gap_len_table_min + */ + bvector(strategy strat = BM_BIT, + const gap_word_t* glevel_len = FerrisBitMagic::gap_len_table::_len, + FerrisBitMagic::id_t max_bits = 0, + const Alloc& alloc = Alloc()) + : blockman_(glevel_len, max_bits, alloc), + new_blocks_strat_(strat) + {} + + bvector(const bvector& bvect) + : blockman_(bvect.blockman_), + new_blocks_strat_(bvect.new_blocks_strat_) + {} + +#endif + + bvector& operator = (const bvector& bvect) + { + if (bvect.blockman_.top_block_size() != blockman_.top_block_size()) + { + blockman_.set_top_block_size(bvect.blockman_.top_block_size()); + } + else + { + clear(false); + } + bit_or(bvect); + return *this; + } + + reference operator[](FerrisBitMagic::id_t n) + { + assert(n < FerrisBitMagic::id_max); + return reference(*this, n); + } + + + bool operator[](FerrisBitMagic::id_t n) const + { + assert(n < FerrisBitMagic::id_max); + return get_bit(n); + } + + void operator &= (const bvector& bvect) + { + bit_and(bvect); + } + + + + + void operator ^= (const bvector& bvect) + { + bit_xor(bvect); + } + + void operator |= (const bvector& bvect) + { + bit_or(bvect); + } + + void operator -= (const bvector& bvect) + { + bit_sub(bvect); + } + + bool operator < (const bvector& bvect) const + { + return compare(bvect) < 0; + } + + bool operator <= (const bvector& bvect) const + { + return compare(bvect) <= 0; + } + + bool operator > (const bvector& bvect) const + { + return compare(bvect) > 0; + } + + bool operator >= (const bvector& bvect) const + { + return compare(bvect) >= 0; + } + + bool operator == (const bvector& bvect) const + { + return compare(bvect) == 0; + } + + bool operator != (const bvector& bvect) const + { + return compare(bvect) != 0; + } + + bvector operator~() const + { + return bvector(*this).invert(); + } + + Alloc get_allocator() const + { + return blockman_.get_allocator(); + } + + + /*! + \brief Sets bit n if val is true, clears bit n if val is false + \param n - index of the bit to be set + \param val - new bit value + \return *this + */ + bvector& set(FerrisBitMagic::id_t n, bool val = true) + { + // calculate logical block number + unsigned nblock = unsigned(n >> FerrisBitMagic::set_block_shift); + + int block_type; + + FerrisBitMagic::word_t* blk = + blockman_.check_allocate_block(nblock, + val, + get_new_blocks_strat(), + &block_type); + + if (!blk) return *this; + + // calculate word number in block and bit + unsigned nbit = unsigned(n & FerrisBitMagic::set_block_mask); + + if (block_type == 1) // gap + { + unsigned is_set; + unsigned new_block_len; + + new_block_len = + gap_set_value(val, BMGAP_PTR(blk), nbit, &is_set); + if (is_set) + { + BMCOUNT_ADJ(val) + + unsigned threshold = + FerrisBitMagic::gap_limit(BMGAP_PTR(blk), blockman_.glen()); + + if (new_block_len > threshold) + { + extend_gap_block(nblock, BMGAP_PTR(blk)); + } + } + } + else // bit block + { + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + FerrisBitMagic::word_t* word = blk + nword; + FerrisBitMagic::word_t mask = (((FerrisBitMagic::word_t)1) << nbit); + + if (val) + { + if ( ((*word) & mask) == 0 ) + { + *word |= mask; // set bit + BMCOUNT_INC; + } + } + else + { + if ((*word) & mask) + { + *word &= ~mask; // clear bit + BMCOUNT_DEC; + } + } + } + + return *this; + } + + /*! + \brief Sets every bit in this bitset to 1. + \return *this + */ + bvector& set() + { + blockman_.set_all_one(); + set(FerrisBitMagic::id_max, false); + BMCOUNT_SET(id_max); + return *this; + } + + + /*! + \brief Sets all bits in the specified closed interval [left,right] + + \param left - interval start + \param right - interval end (closed interval) + \param value - value to set interval in + + \return *this + */ + bvector& set_range(FerrisBitMagic::id_t left, + FerrisBitMagic::id_t right, + bool value = true) + { + if (right < left) + { + return set_range(right, left, value); + } + + BMCOUNT_VALID(false) + BM_SET_MMX_GUARD + + // calculate logical number of start and destination blocks + unsigned nblock_left = unsigned(left >> FerrisBitMagic::set_block_shift); + unsigned nblock_right = unsigned(right >> FerrisBitMagic::set_block_shift); + + FerrisBitMagic::word_t* block = blockman_.get_block(nblock_left); + bool left_gap = BM_IS_GAP(blockman_, block, nblock_left); + + unsigned nbit_left = unsigned(left & FerrisBitMagic::set_block_mask); + unsigned nbit_right = unsigned(right & FerrisBitMagic::set_block_mask); + + unsigned r = + (nblock_left == nblock_right) ? nbit_right :(FerrisBitMagic::bits_in_block-1); + + // Set bits in the starting block + + FerrisBitMagic::gap_word_t tmp_gap_blk[5] = {0,}; + gap_init_range_block(tmp_gap_blk, + nbit_left, r, value, FerrisBitMagic::bits_in_block); + + combine_operation_with_block(nblock_left, + left_gap, + block, + (FerrisBitMagic::word_t*) tmp_gap_blk, + 1, + value ? BM_OR : BM_AND); + + if (nblock_left == nblock_right) // in one block + return *this; + + // Set (or clear) all blocks between left and right + + unsigned nb_to = nblock_right + (nbit_right ==(FerrisBitMagic::bits_in_block-1)); + + if (value) + { + for (unsigned nb = nblock_left+1; nb < nb_to; ++nb) + { + block = blockman_.get_block(nb); + if (IS_FULL_BLOCK(block)) + continue; + + bool is_gap = BM_IS_GAP(blockman_, block, nb); + + blockman_.set_block(nb, FULL_BLOCK_ADDR); + blockman_.set_block_bit(nb); + + if (is_gap) + { + blockman_.get_allocator().free_gap_block(BMGAP_PTR(block), + blockman_.glen()); + } + else + { + blockman_.get_allocator().free_bit_block(block); + } + + } // for + } + else // value == 0 + { + for (unsigned nb = nblock_left+1; nb < nb_to; ++nb) + { + block = blockman_.get_block(nb); + if (block == 0) // nothing to do + continue; + + blockman_.set_block(nb, 0); + blockman_.set_block_bit(nb); + + bool is_gap = BM_IS_GAP(blockman_, block, nb); + + if (is_gap) + { + blockman_.get_allocator().free_gap_block(BMGAP_PTR(block), + blockman_.glen()); + } + else + { + blockman_.get_allocator().free_bit_block(block); + } + + + } // for + } // if value else + + if (nb_to > nblock_right) + return *this; + + block = blockman_.get_block(nblock_right); + bool right_gap = BM_IS_GAP(blockman_, block, nblock_right); + + gap_init_range_block(tmp_gap_blk, + 0, nbit_right, value, FerrisBitMagic::bits_in_block); + + combine_operation_with_block(nblock_right, + right_gap, + block, + (FerrisBitMagic::word_t*) tmp_gap_blk, + 1, + value ? BM_OR : BM_AND); + + return *this; + } + + + /*! + \brief Sets bit n. + \param n - index of the bit to be set. + */ + void set_bit(FerrisBitMagic::id_t n) + { + set(n, true); + } + + /*! Function erturns insert iterator for this bitvector */ + insert_iterator inserter() + { + return insert_iterator(*this); + } + + + /*! + \brief Clears bit n. + \param n - bit's index to be cleaned. + */ + void clear_bit(FerrisBitMagic::id_t n) + { + set(n, false); + } + + + /*! + \brief Clears every bit in the bitvector. + + \param free_mem if "true" (default) bvector frees the memory, + otherwise sets blocks to 0. + */ + void clear(bool free_mem = false) + { + blockman_.set_all_zero(free_mem); + BMCOUNT_SET(0); + } + + /*! + \brief Clears every bit in the bitvector. + \return *this; + */ + bvector& reset() + { + clear(); + return *this; + } + + + /*! + \brief Returns count of bits which are 1. + \return Total number of bits ON. + */ + FerrisBitMagic::id_t count() const + { + #ifdef BMCOUNTOPT + if (count_is_valid_) return count_; + #endif + word_t*** blk_root = blockman_.get_rootblock(); + typename blocks_manager::block_count_func func(blockman_); + for_each_nzblock(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, func); + + BMCOUNT_SET(func.count()); + return func.count(); + } + + /*! \brief Computes bitcount values for all bvector blocks + \param arr - pointer on array of block bit counts + \return Index of the last block counted. + This number +1 gives you number of arr elements initialized during the + function call. + */ + unsigned count_blocks(unsigned* arr) const + { + FerrisBitMagic::word_t*** blk_root = blockman_.get_rootblock(); + typename blocks_manager::block_count_arr_func func(blockman_, &(arr[0])); + for_each_nzblock(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, func); + return func.last_block(); + } + + /*! + \brief Returns count of 1 bits in the given diapason. + \param left - index of first bit start counting from + \param right - index of last bit + \param block_count_arr - optional parameter (bitcount by bvector blocks) + calculated by count_blocks method. Used to improve performance of + wide range searches + \return Total number of bits ON. + */ + FerrisBitMagic::id_t count_range(FerrisBitMagic::id_t left, + FerrisBitMagic::id_t right, + unsigned* block_count_arr=0) const + { + assert(left <= right); + + unsigned count = 0; + + // calculate logical number of start and destination blocks + unsigned nblock_left = unsigned(left >> FerrisBitMagic::set_block_shift); + unsigned nblock_right = unsigned(right >> FerrisBitMagic::set_block_shift); + + const FerrisBitMagic::word_t* block = blockman_.get_block(nblock_left); + bool left_gap = BM_IS_GAP(blockman_, block, nblock_left); + + unsigned nbit_left = unsigned(left & FerrisBitMagic::set_block_mask); + unsigned nbit_right = unsigned(right & FerrisBitMagic::set_block_mask); + + unsigned r = + (nblock_left == nblock_right) ? nbit_right : (FerrisBitMagic::bits_in_block-1); + + typename blocks_manager::block_count_func func(blockman_); + + if (block) + { + if ((nbit_left == 0) && (r == (FerrisBitMagic::bits_in_block-1))) // whole block + { + if (block_count_arr) + { + count += block_count_arr[nblock_left]; + } + else + { + func(block, nblock_left); + } + } + else + { + if (left_gap) + { + count += gap_bit_count_range(BMGAP_PTR(block), + (gap_word_t)nbit_left, + (gap_word_t)r); + } + else + { + count += bit_block_calc_count_range(block, nbit_left, r); + } + } + } + + if (nblock_left == nblock_right) // in one block + { + return count + func.count(); + } + + for (unsigned nb = nblock_left+1; nb < nblock_right; ++nb) + { + block = blockman_.get_block(nb); + if (block_count_arr) + { + count += block_count_arr[nb]; + } + else + { + if (block) + func(block, nb); + } + } + count += func.count(); + + block = blockman_.get_block(nblock_right); + bool right_gap = BM_IS_GAP(blockman_, block, nblock_right); + + if (block) + { + if (right_gap) + { + count += gap_bit_count_range(BMGAP_PTR(block), + (gap_word_t)0, + (gap_word_t)nbit_right); + } + else + { + count += bit_block_calc_count_range(block, 0, nbit_right); + } + } + + return count; + } + + + FerrisBitMagic::id_t recalc_count() + { + BMCOUNT_VALID(false) + return count(); + } + + /*! + Disables count cache. Next call to count() or recalc_count() + restores count caching. + + @note Works only if BMCOUNTOPT enabled(defined). + Othewise does nothing. + */ + void forget_count() + { + BMCOUNT_VALID(false) + } + + /*! + \brief Inverts all bits. + */ + bvector& invert() + { + BMCOUNT_VALID(false) + BM_SET_MMX_GUARD + + FerrisBitMagic::word_t*** blk_root = blockman_.get_rootblock(); + typename blocks_manager::block_invert_func func(blockman_); + for_each_block(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, func); + set(FerrisBitMagic::id_max, false); + return *this; + } + + + /*! + \brief returns true if bit n is set and false is bit n is 0. + \param n - Index of the bit to check. + \return Bit value (1 or 0) + */ + bool get_bit(FerrisBitMagic::id_t n) const + { + BM_ASSERT(n < FerrisBitMagic::id_max); + + // calculate logical block number + unsigned nblock = unsigned(n >> FerrisBitMagic::set_block_shift); + + const FerrisBitMagic::word_t* block = blockman_.get_block(nblock); + + if (block) + { + // calculate word number in block and bit + unsigned nbit = unsigned(n & FerrisBitMagic::set_block_mask); + unsigned is_set; + + if (BM_IS_GAP(blockman_, block, nblock)) + { + is_set = gap_test(BMGAP_PTR(block), nbit); + } + else + { + unsigned nword = unsigned(nbit >> FerrisBitMagic::set_word_shift); + nbit &= FerrisBitMagic::set_word_mask; + + is_set = (block[nword] & (((FerrisBitMagic::word_t)1) << nbit)); + } + return is_set != 0; + } + return false; + } + + /*! + \brief returns true if bit n is set and false is bit n is 0. + \param n - Index of the bit to check. + \return Bit value (1 or 0) + */ + bool test(FerrisBitMagic::id_t n) const + { + return get_bit(n); + } + + /*! + \brief Returns true if any bits in this bitset are set, and otherwise returns false. + \return true if any bit is set + */ + bool any() const + { + #ifdef BMCOUNTOPT + if (count_is_valid_ && count_) return true; + #endif + + word_t*** blk_root = blockman_.get_rootblock(); + typename blocks_manager::block_any_func func(blockman_); + return for_each_nzblock_if(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, func); + } + + /*! + \brief Returns true if no bits are set, otherwise returns false. + */ + bool none() const + { + return !any(); + } + + /*! + \brief Flips bit n + \return *this + */ + bvector& flip(FerrisBitMagic::id_t n) + { + set(n, !get_bit(n)); + return *this; + } + + /*! + \brief Flips all bits + \return *this + */ + bvector& flip() + { + return invert(); + } + + /*! \brief Exchanges content of bv and this bitvector. + */ + void swap(bvector& bv) + { + blockman_.swap(bv.blockman_); +#ifdef BMCOUNTOPT + BMCOUNT_VALID(false) + bv.recalc_count(); +#endif + } + + + /*! + \fn FerrisBitMagic::id_t bvector::get_first() const + \brief Gets number of first bit which is ON. + \return Index of the first 1 bit. + \sa get_next + */ + FerrisBitMagic::id_t get_first() const { return check_or_next(0); } + + /*! + \fn FerrisBitMagic::id_t bvector::get_next(FerrisBitMagic::id_t prev) const + \brief Finds the number of the next bit ON. + \param prev - Index of the previously found bit. + \return Index of the next bit which is ON or 0 if not found. + \sa get_first + */ + FerrisBitMagic::id_t get_next(FerrisBitMagic::id_t prev) const + { + return (++prev == FerrisBitMagic::id_max) ? 0 : check_or_next(prev); + } + + /*! + @brief Calculates bitvector statistics. + + @param st - pointer on statistics structure to be filled in. + + Function fills statistics structure containing information about how + this vector uses memory and estimation of max. amount of memory + bvector needs to serialize itself. + + @sa statistics + */ + void calc_stat(struct statistics* st) const; + + /*! + \brief Logical OR operation. + \param vect - Argument vector. + */ + FerrisBitMagic::bvector& bit_or(const FerrisBitMagic::bvector& vect) + { + BMCOUNT_VALID(false); + combine_operation(vect, BM_OR); + return *this; + } + + /*! + \brief Logical AND operation. + \param vect - Argument vector. + */ + FerrisBitMagic::bvector& bit_and(const FerrisBitMagic::bvector& vect) + { + BMCOUNT_VALID(false); + combine_operation(vect, BM_AND); + return *this; + } + + /*! + \brief Logical XOR operation. + \param vect - Argument vector. + */ + FerrisBitMagic::bvector& bit_xor(const FerrisBitMagic::bvector& vect) + { + BMCOUNT_VALID(false); + combine_operation(vect, BM_XOR); + return *this; + } + + /*! + \brief Logical SUB operation. + \param vect - Argument vector. + */ + FerrisBitMagic::bvector& bit_sub(const FerrisBitMagic::bvector& vect) + { + BMCOUNT_VALID(false); + combine_operation(vect, BM_SUB); + return *this; + } + + + /*! + \brief Sets new blocks allocation strategy. + \param strat - Strategy code 0 - bitblocks allocation only. + 1 - Blocks mutation mode (adaptive algorithm) + */ + void set_new_blocks_strat(strategy strat) + { + new_blocks_strat_ = strat; + } + + /*! + \brief Returns blocks allocation strategy. + \return - Strategy code 0 - bitblocks allocation only. + 1 - Blocks mutation mode (adaptive algorithm) + \sa set_new_blocks_strat + */ + strategy get_new_blocks_strat() const + { + return new_blocks_strat_; + } + + void stat(unsigned blocks=0) const; + + /*! + \brief Optimization mode + Every next level means additional checks (better compression vs time) + \sa optimize + */ + enum optmode + { + opt_free_0 = 1, ///< Free unused 0 blocks + opt_free_01 = 2, ///< Free unused 0 and 1 blocks + opt_compress = 3 ///< compress blocks when possible + }; + + /*! + \brief Optimize memory bitvector's memory allocation. + + Function analyze all blocks in the bitvector, compresses blocks + with a regular structure, frees some memory. This function is recommended + after a bulk modification of the bitvector using set_bit, clear_bit or + logical operations. + + @sa optmode, optimize_gap_size + */ + void optimize(FerrisBitMagic::word_t* temp_block=0, optmode opt_mode = opt_compress) + { + word_t*** blk_root = blockman_.blocks_root(); + + if (!temp_block) + temp_block = blockman_.check_allocate_tempblock(); + + typename + blocks_manager::block_opt_func opt_func(blockman_, + temp_block, + (int)opt_mode); + for_each_nzblock(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, opt_func); + } + + + void optimize_gap_size() + { + struct bvector::statistics st; + calc_stat(&st); + + if (!st.gap_blocks) + return; + + gap_word_t opt_glen[FerrisBitMagic::gap_levels]; + ::memcpy(opt_glen, st.gap_levels, FerrisBitMagic::gap_levels * sizeof(*opt_glen)); + + improve_gap_levels(st.gap_length, + st.gap_length + st.gap_blocks, + opt_glen); + + set_gap_levels(opt_glen); + } + + + /*! + @brief Sets new GAP lengths table. All GAP blocks will be reallocated + to match the new scheme. + + @param glevel_len - pointer on C-style array keeping GAP block sizes. + */ + void set_gap_levels(const gap_word_t* glevel_len) + { + word_t*** blk_root = blockman_.blocks_root(); + + typename + blocks_manager::gap_level_func gl_func(blockman_, glevel_len); + + for_each_nzblock(blk_root, blockman_.top_block_size(), + FerrisBitMagic::set_array_size, gl_func); + + blockman_.set_glen(glevel_len); + } + + /*! + \brief Lexicographical comparison with a bitvector. + + Function compares current bitvector with the provided argument + bit by bit and returns -1 if our bitvector less than the argument, + 1 - greater, 0 - equal. + */ + int compare(const bvector& bvect) const + { + int res; + unsigned bn = 0; + + for (unsigned i = 0; i < blockman_.top_block_size(); ++i) + { + const FerrisBitMagic::word_t* const* blk_blk = blockman_.get_topblock(i); + const FerrisBitMagic::word_t* const* arg_blk_blk = + bvect.blockman_.get_topblock(i); + + if (blk_blk == arg_blk_blk) + { + bn += FerrisBitMagic::set_array_size; + continue; + } + + for (unsigned j = 0; j < FerrisBitMagic::set_array_size; ++j, ++bn) + { + const FerrisBitMagic::word_t* arg_blk = + arg_blk_blk ? arg_blk_blk[j] : 0; + const FerrisBitMagic::word_t* blk = blk_blk ? blk_blk[j] : 0; + + if (blk == arg_blk) continue; + + // If one block is zero we check if the other one has at least + // one bit ON + + if (!blk || !arg_blk) + { + const FerrisBitMagic::word_t* pblk; + bool is_gap; + + if (blk) + { + pblk = blk; + res = 1; + is_gap = BM_IS_GAP((*this), blk, bn); + } + else + { + pblk = arg_blk; + res = -1; + is_gap = BM_IS_GAP(bvect, arg_blk, bn); + } + + if (is_gap) + { + if (!gap_is_all_zero(BMGAP_PTR(pblk), FerrisBitMagic::gap_max_bits)) + { + return res; + } + } + else + { + FerrisBitMagic::wordop_t* blk1 = (wordop_t*)pblk; + FerrisBitMagic::wordop_t* blk2 = + (wordop_t*)(pblk + FerrisBitMagic::set_block_size); + if (!bit_is_all_zero(blk1, blk2)) + { + return res; + } + } + + continue; + } + + bool arg_gap = BM_IS_GAP(bvect, arg_blk, bn); + bool gap = BM_IS_GAP((*this), blk, bn); + + if (arg_gap != gap) + { + FerrisBitMagic::wordop_t temp_blk[FerrisBitMagic::set_block_size_op]; + FerrisBitMagic::wordop_t* blk1; + FerrisBitMagic::wordop_t* blk2; + + if (gap) + { + gap_convert_to_bitset((FerrisBitMagic::word_t*)temp_blk, + BMGAP_PTR(blk)); + + blk1 = (FerrisBitMagic::wordop_t*)temp_blk; + blk2 = (FerrisBitMagic::wordop_t*)arg_blk; + } + else + { + gap_convert_to_bitset((FerrisBitMagic::word_t*)temp_blk, + BMGAP_PTR(arg_blk)); + + blk1 = (FerrisBitMagic::wordop_t*)blk; + blk2 = (FerrisBitMagic::wordop_t*)temp_blk; + + } + res = bitcmp(blk1, blk2, FerrisBitMagic::set_block_size_op); + + } + else + { + if (gap) + { + res = gapcmp(BMGAP_PTR(blk), BMGAP_PTR(arg_blk)); + } + else + { + res = bitcmp((FerrisBitMagic::wordop_t*)blk, + (FerrisBitMagic::wordop_t*)arg_blk, + FerrisBitMagic::set_block_size_op); + } + } + + if (res != 0) + { + return res; + } + + + } // for j + + } // for i + + return 0; + } + + + /*! @brief Allocates temporary block of memory. + + Temp block can be passed to bvector functions requiring some temp memory + for their operation. (like serialize) + + @note method is marked const, but it's not quite true, since + it can in some cases modify the state of the block allocator + (if it has a state). (Can be important in MT programs). + + @sa free_tempblock + */ + FerrisBitMagic::word_t* allocate_tempblock() const + { + blocks_manager* bm = const_cast(&blockman_); + return bm->get_allocator().alloc_bit_block(); + } + + /*! @brief Frees temporary block of memory. + + @note method is marked const, but it's not quite true, since + it can in some cases modify the state of the block allocator + (if it has a state). (Can be important in MT programs). + + @sa allocate_tempblock + */ + void free_tempblock(FerrisBitMagic::word_t* block) const + { + blocks_manager* bm = const_cast(&blockman_); + bm->get_allocator().free_bit_block(block); + } + + /** + \brief Returns enumerator pointing on the first non-zero bit. + */ + enumerator first() const + { + typedef typename bvector::enumerator enumerator_type; + return enumerator_type(this, 0); + } + + /** + \fn bvector::enumerator bvector::end() const + \brief Returns enumerator pointing on the next bit after the last. + */ + enumerator end() const + { + typedef typename bvector::enumerator enumerator_type; + return enumerator_type(this, 1); + } + + + const FerrisBitMagic::word_t* get_block(unsigned nb) const + { + return blockman_.get_block(nb); + } + +private: + + FerrisBitMagic::id_t check_or_next(FerrisBitMagic::id_t prev) const + { + for (;;) + { + unsigned nblock = unsigned(prev >> FerrisBitMagic::set_block_shift); + if (nblock >= FerrisBitMagic::set_total_blocks) break; + + if (blockman_.is_subblock_null(nblock >> FerrisBitMagic::set_array_shift)) + { + prev += (FerrisBitMagic::set_blkblk_mask + 1) - + (prev & FerrisBitMagic::set_blkblk_mask); + } + else + { + unsigned nbit = unsigned(prev & FerrisBitMagic::set_block_mask); + + const FerrisBitMagic::word_t* block = blockman_.get_block(nblock); + + if (block) + { + if (IS_FULL_BLOCK(block)) return prev; + if (BM_IS_GAP(blockman_, block, nblock)) + { + if (gap_find_in_block(BMGAP_PTR(block), nbit, &prev)) + { + return prev; + } + } + else + { + if (bit_find_in_block(block, nbit, &prev)) + { + return prev; + } + } + } + else + { + prev += (FerrisBitMagic::set_block_mask + 1) - + (prev & FerrisBitMagic::set_block_mask); + } + + } + if (!prev) break; + } + + return 0; + } + + + void combine_operation(const FerrisBitMagic::bvector& bvect, + FerrisBitMagic::operation opcode) + { + typedef void (*block_bit_op)(FerrisBitMagic::word_t*, const FerrisBitMagic::word_t*); + typedef void (*block_bit_op_next)(FerrisBitMagic::word_t*, + const FerrisBitMagic::word_t*, + FerrisBitMagic::word_t*, + const FerrisBitMagic::word_t*); + + block_bit_op bit_func; + switch (opcode) + { + case BM_AND: + bit_func = bit_block_and; + break; + case BM_OR: + bit_func = bit_block_or; + break; + case BM_SUB: + bit_func = bit_block_sub; + break; + case BM_XOR: + bit_func = bit_block_xor; + break; + } + + + FerrisBitMagic::word_t*** blk_root = blockman_.blocks_root(); + unsigned block_idx = 0; + unsigned i, j; + + BM_SET_MMX_GUARD + + for (i = 0; i < blockman_.top_block_size(); ++i) + { + FerrisBitMagic::word_t** blk_blk = blk_root[i]; + + if (blk_blk == 0) // not allocated + { + const FerrisBitMagic::word_t* const* bvbb = + bvect.blockman_.get_topblock(i); + if (bvbb == 0) + { + block_idx += FerrisBitMagic::set_array_size; + continue; + } + + for (j = 0; j < FerrisBitMagic::set_array_size; ++j,++block_idx) + { + const FerrisBitMagic::word_t* arg_blk = bvect.blockman_.get_block(i, j); + + if (arg_blk != 0) + { + bool arg_gap = BM_IS_GAP(bvect.blockman_, arg_blk, block_idx); + + combine_operation_with_block(block_idx, 0, 0, + arg_blk, arg_gap, + opcode); + } + + } // for k + continue; + } + + for (j = 0; j < FerrisBitMagic::set_array_size; ++j, ++block_idx) + { + + FerrisBitMagic::word_t* blk = blk_blk[j]; + const FerrisBitMagic::word_t* arg_blk = bvect.blockman_.get_block(i, j); + + if (arg_blk || blk) + { + bool arg_gap = BM_IS_GAP(bvect.blockman_, arg_blk, block_idx); + bool gap = BM_IS_GAP((*this).blockman_, blk, block_idx); + + // Optimization branch. Statistically two bit blocks + // are bumping into each other quite frequently and + // this peace of code tend to be executed often and + // program does not go into nested calls. + // But logically this branch can be eliminated without + // loosing any functionality. +/* + if (!gap && !arg_gap) + { + if (IS_VALID_ADDR(blk) && arg_blk) + { + + if (bit_func2 && (j < FerrisBitMagic::set_array_size-1)) + { + FerrisBitMagic::word_t* blk2 = blk_blk[j+1]; + const FerrisBitMagic::word_t* arg_blk2 = bvect.get_block(i, j+1); + + bool arg_gap2 = BM_IS_GAP(bvect, arg_blk2, block_idx + 1); + bool gap2 = BM_IS_GAP((*this), blk2, block_idx + 1); + + if (!gap2 && !arg_gap2 && blk2 && arg_blk2) + { + bit_func2(blk, arg_blk, blk2, arg_blk2); + ++j; + ++block_idx; + continue; + } + + } + + bit_func(blk, arg_blk); + continue; + } + } // end of optimization branch... +*/ + combine_operation_with_block(block_idx, gap, blk, + arg_blk, arg_gap, + opcode); + } + + } // for j + + } // for i + + } + + void combine_operation_with_block(unsigned nb, + unsigned gap, + FerrisBitMagic::word_t* blk, + const FerrisBitMagic::word_t* arg_blk, + int arg_gap, + FerrisBitMagic::operation opcode) + { + if (gap) // our block GAP-type + { + if (arg_gap) // both blocks GAP-type + { + gap_word_t tmp_buf[FerrisBitMagic::gap_max_buff_len * 3]; // temporary result + + gap_word_t* res; + switch (opcode) + { + case BM_AND: + res = gap_operation_and(BMGAP_PTR(blk), + BMGAP_PTR(arg_blk), + tmp_buf); + break; + case BM_OR: + res = gap_operation_or(BMGAP_PTR(blk), + BMGAP_PTR(arg_blk), + tmp_buf); + break; + case BM_SUB: + res = gap_operation_sub(BMGAP_PTR(blk), + BMGAP_PTR(arg_blk), + tmp_buf); + break; + case BM_XOR: + res = gap_operation_xor(BMGAP_PTR(blk), + BMGAP_PTR(arg_blk), + tmp_buf); + break; + default: + assert(0); + res = 0; + } + + assert(res == tmp_buf); + unsigned res_len = FerrisBitMagic::gap_length(res); + + assert(!(res == tmp_buf && res_len == 0)); + + // if as a result of the operation gap block turned to zero + // we can now replace it with NULL + if (gap_is_all_zero(res, FerrisBitMagic::gap_max_bits)) + { + blockman_.set_block(nb, 0); + blockman_.set_block_bit(nb); + blockman_.get_allocator().free_gap_block(BMGAP_PTR(blk), + blockman_.glen()); + return; + } + + // mutation check + + int level = gap_level(BMGAP_PTR(blk)); + unsigned threshold = blockman_.glen(level)-4; + int new_level = gap_calc_level(res_len, blockman_.glen()); + + if (new_level == -1) + { + blockman_.convert_gap2bitset(nb, res); + return; + } + + if (res_len > threshold) + { + set_gap_level(res, new_level); + gap_word_t* new_blk = + blockman_.allocate_gap_block(new_level, res); + + FerrisBitMagic::word_t* p = (FerrisBitMagic::word_t*)new_blk; + BMSET_PTRGAP(p); + + blockman_.set_block_ptr(nb, p); + blockman_.get_allocator().free_gap_block(BMGAP_PTR(blk), + blockman_.glen()); + return; + } + + // gap opeartion result is in the temporary buffer + // we copy it back to the gap_block + + set_gap_level(tmp_buf, level); + ::memcpy(BMGAP_PTR(blk), tmp_buf, res_len * sizeof(gap_word_t)); + + return; + } + else // argument is BITSET-type (own block is GAP) + { + // since we can not combine blocks of mixed type + // we need to convert our block to bitset + + if (arg_blk == 0) // Combining against an empty block + { + if (opcode == BM_OR || + opcode == BM_SUB || + opcode == BM_XOR) + { + return; // nothing to do + } + + if (opcode == BM_AND) // ("Value" AND 0) == 0 + { + blockman_.set_block_ptr(nb, 0); + blockman_.set_block_bit(nb); + blockman_.get_allocator(). + free_gap_block(BMGAP_PTR(blk), + blockman_.glen()); + return; + } + } + + blk = blockman_.convert_gap2bitset(nb, BMGAP_PTR(blk)); + } + } + else // our block is BITSET-type + { + if (arg_gap) // argument block is GAP-type + { + if (IS_VALID_ADDR(blk)) + { + // special case, maybe we can do the job without + // converting the GAP argument to bitblock + switch (opcode) + { + case BM_OR: + gap_add_to_bitset(blk, BMGAP_PTR(arg_blk)); + return; + case BM_SUB: + gap_sub_to_bitset(blk, BMGAP_PTR(arg_blk)); + return; + case BM_XOR: + gap_xor_to_bitset(blk, BMGAP_PTR(arg_blk)); + return; + case BM_AND: + gap_and_to_bitset(blk, BMGAP_PTR(arg_blk)); + return; + + } // switch + } + + // the worst case we need to convert argument block to + // bitset type. + + gap_word_t* temp_blk = (gap_word_t*) blockman_.check_allocate_tempblock(); + arg_blk = + gap_convert_to_bitset_smart((FerrisBitMagic::word_t*)temp_blk, + BMGAP_PTR(arg_blk), + FerrisBitMagic::gap_max_bits); + + } + } + + // Now here we combine two plain bitblocks using supplied bit function. + FerrisBitMagic::word_t* dst = blk; + + FerrisBitMagic::word_t* ret; + if (dst == 0 && arg_blk == 0) + { + return; + } + + switch (opcode) + { + case BM_AND: + ret = bit_operation_and(dst, arg_blk); + goto copy_block; + case BM_XOR: + ret = bit_operation_xor(dst, arg_blk); + if (ret && (ret == arg_blk) && IS_FULL_BLOCK(dst)) + { + ret = blockman_.get_allocator().alloc_bit_block(); +#ifdef BMVECTOPT + VECT_XOR_ARR_2_MASK(ret, + arg_blk, + arg_blk + FerrisBitMagic::set_block_size, + FerrisBitMagic::all_bits_mask); +#else + FerrisBitMagic::wordop_t* dst_ptr = (wordop_t*)ret; + const FerrisBitMagic::wordop_t* wrd_ptr = (wordop_t*) arg_blk; + const FerrisBitMagic::wordop_t* wrd_end = + (wordop_t*) (arg_blk + FerrisBitMagic::set_block_size); + + do + { + dst_ptr[0] = FerrisBitMagic::all_bits_mask ^ wrd_ptr[0]; + dst_ptr[1] = FerrisBitMagic::all_bits_mask ^ wrd_ptr[1]; + dst_ptr[2] = FerrisBitMagic::all_bits_mask ^ wrd_ptr[2]; + dst_ptr[3] = FerrisBitMagic::all_bits_mask ^ wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + + } while (wrd_ptr < wrd_end); +#endif + break; + } + goto copy_block; + case BM_OR: + ret = bit_operation_or(dst, arg_blk); + copy_block: + if (ret && (ret == arg_blk) && !IS_FULL_BLOCK(ret)) + { + ret = blockman_.get_allocator().alloc_bit_block(); + bit_block_copy(ret, arg_blk); + } + break; + + case BM_SUB: + ret = bit_operation_sub(dst, arg_blk); + if (ret && ret == arg_blk) + { + ret = blockman_.get_allocator().alloc_bit_block(); +#ifdef BMVECTOPT + VECT_ANDNOT_ARR_2_MASK(ret, + arg_blk, + arg_blk + FerrisBitMagic::set_block_size, + FerrisBitMagic::all_bits_mask); +#else + + FerrisBitMagic::wordop_t* dst_ptr = (wordop_t*)ret; + const FerrisBitMagic::wordop_t* wrd_ptr = (wordop_t*) arg_blk; + const FerrisBitMagic::wordop_t* wrd_end = + (wordop_t*) (arg_blk + FerrisBitMagic::set_block_size); + + do + { + dst_ptr[0] = FerrisBitMagic::all_bits_mask & ~wrd_ptr[0]; + dst_ptr[1] = FerrisBitMagic::all_bits_mask & ~wrd_ptr[1]; + dst_ptr[2] = FerrisBitMagic::all_bits_mask & ~wrd_ptr[2]; + dst_ptr[3] = FerrisBitMagic::all_bits_mask & ~wrd_ptr[3]; + + dst_ptr+=4; + wrd_ptr+=4; + + } while (wrd_ptr < wrd_end); +#endif + } + break; + default: + assert(0); + ret = 0; + } + + if (ret != dst) // block mutation + { + blockman_.set_block(nb, ret); + blockman_.get_allocator().free_bit_block(dst); + } + } + +public: + void combine_operation_with_block(unsigned nb, + const FerrisBitMagic::word_t* arg_blk, + int arg_gap, + FerrisBitMagic::operation opcode) + { + FerrisBitMagic::word_t* blk = const_cast(get_block(nb)); + bool gap = BM_IS_GAP((*this), blk, nb); + combine_operation_with_block(nb, gap, blk, arg_blk, arg_gap, opcode); + } +private: + void combine_count_operation_with_block(unsigned nb, + const FerrisBitMagic::word_t* arg_blk, + int arg_gap, + FerrisBitMagic::operation opcode) + { + const FerrisBitMagic::word_t* blk = get_block(nb); + bool gap = BM_IS_GAP((*this), blk, nb); + combine_count_operation_with_block(nb, gap, blk, arg_blk, arg_gap, opcode); + } + + + /** + \brief Extends GAP block to the next level or converts it to bit block. + \param nb - Block's linear index. + \param blk - Blocks's pointer + */ + void extend_gap_block(unsigned nb, gap_word_t* blk) + { + blockman_.extend_gap_block(nb, blk); + } + + +public: + + /** + Embedded class managing bit-blocks on very low level. + Includes number of functor classes used in different bitset algorithms. + */ + class blocks_manager + { + friend class enumerator; + friend class block_free_func; + + public: + + typedef Alloc allocator_type; + + public: + + /** Base functor class */ + class bm_func_base + { + public: + bm_func_base(blocks_manager& bman) : bm_(bman) {} + + protected: + blocks_manager& bm_; + }; + + /** Base functor class connected for "constant" functors*/ + class bm_func_base_const + { + public: + bm_func_base_const(const blocks_manager& bman) : bm_(bman) {} + + protected: + const blocks_manager& bm_; + }; + + /** Base class for bitcounting functors */ + class block_count_base : public bm_func_base_const + { + protected: + block_count_base(const blocks_manager& bm) + : bm_func_base_const(bm) {} + + FerrisBitMagic::id_t block_count(const FerrisBitMagic::word_t* block, unsigned idx) const + { + id_t count = 0; + if (IS_FULL_BLOCK(block)) + { + count = FerrisBitMagic::bits_in_block; + } + else + { + if (BM_IS_GAP(this->bm_, block, idx)) + { + count = gap_bit_count(BMGAP_PTR(block)); + } + else // bitset + { + count = + bit_block_calc_count(block, + block + FerrisBitMagic::set_block_size); + } + } + return count; + } + }; + + + /** Bitcounting functor */ + class block_count_func : public block_count_base + { + public: + block_count_func(const blocks_manager& bm) + : block_count_base(bm), count_(0) {} + + FerrisBitMagic::id_t count() const { return count_; } + + void operator()(const FerrisBitMagic::word_t* block, unsigned idx) + { + count_ += this->block_count(block, idx); + } + + private: + FerrisBitMagic::id_t count_; + }; + + /** Bitcounting functor filling the block counts array*/ + class block_count_arr_func : public block_count_base + { + public: + block_count_arr_func(const blocks_manager& bm, unsigned* arr) + : block_count_base(bm), arr_(arr), last_idx_(0) + { + arr_[0] = 0; + } + + void operator()(const FerrisBitMagic::word_t* block, unsigned idx) + { + while (++last_idx_ < idx) + { + arr_[last_idx_] = 0; + } + arr_[idx] = this->block_count(block, idx); + last_idx_ = idx; + } + + unsigned last_block() const { return last_idx_; } + + private: + unsigned* arr_; + unsigned last_idx_; + }; + + /** bit value change counting functor */ + class block_count_change_func : public bm_func_base_const + { + public: + block_count_change_func(const blocks_manager& bm) + : bm_func_base_const(bm), + count_(0), + prev_block_border_bit_(0) + {} + + FerrisBitMagic::id_t block_count(const FerrisBitMagic::word_t* block, unsigned idx) + { + FerrisBitMagic::id_t count = 0; + FerrisBitMagic::id_t first_bit; + + if (IS_FULL_BLOCK(block) || (block == 0)) + { + count = 1; + if (idx) + { + first_bit = block ? 1 : 0; + count -= !(prev_block_border_bit_ ^ first_bit); + } + prev_block_border_bit_ = block ? 1 : 0; + } + else + { + if (BM_IS_GAP(this->bm_, block, idx)) + { + gap_word_t* gap_block = BMGAP_PTR(block); + count = gap_length(gap_block) - 1; + if (idx) + { + first_bit = gap_test(gap_block, 0); + count -= !(prev_block_border_bit_ ^ first_bit); + } + + prev_block_border_bit_ = + gap_test(gap_block, gap_max_bits-1); + } + else // bitset + { + count = bit_block_calc_count_change(block, + block + FerrisBitMagic::set_block_size); + if (idx) + { + first_bit = block[0] & 1; + count -= !(prev_block_border_bit_ ^ first_bit); + } + prev_block_border_bit_ = + block[set_block_size-1] >> ((sizeof(block[0]) * 8) - 1); + + } + } + return count; + } + + FerrisBitMagic::id_t count() const { return count_; } + + void operator()(const FerrisBitMagic::word_t* block, unsigned idx) + { + count_ += block_count(block, idx); + } + + private: + FerrisBitMagic::id_t count_; + FerrisBitMagic::id_t prev_block_border_bit_; + }; + + + /** Functor detects if any bit set*/ + class block_any_func : public bm_func_base_const + { + public: + block_any_func(const blocks_manager& bm) + : bm_func_base_const(bm) + {} + + bool operator()(const FerrisBitMagic::word_t* block, unsigned idx) + { + if (IS_FULL_BLOCK(block)) return true; + + if (BM_IS_GAP(this->bm_, block, idx)) // gap block + { + if (!gap_is_all_zero(BMGAP_PTR(block), FerrisBitMagic::gap_max_bits)) + { + return true; + } + } + else // bitset + { + FerrisBitMagic::wordop_t* blk1 = (wordop_t*)block; + FerrisBitMagic::wordop_t* blk2 = + (wordop_t*)(block + FerrisBitMagic::set_block_size); + if (!bit_is_all_zero(blk1, blk2)) + { + return true; + } + } + return false; + } + }; + + /*! Change GAP level lengths functor */ + class gap_level_func : public bm_func_base + { + public: + gap_level_func(blocks_manager& bm, const gap_word_t* glevel_len) + : bm_func_base(bm), + glevel_len_(glevel_len) + { + BM_ASSERT(glevel_len); + } + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + blocks_manager& bman = this->bm_; + + if (!BM_IS_GAP(bman, block, idx)) + return; + + gap_word_t* gap_blk = BMGAP_PTR(block); + + // TODO: Use the same code as in the optimize functor + if (gap_is_all_zero(gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, 0); + goto free_block; + } + else + if (gap_is_all_one(gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, FULL_BLOCK_ADDR); + free_block: + bman.get_allocator().free_gap_block(gap_blk, + bman.glen()); + bman.set_block_bit(idx); + return; + } + + unsigned len = gap_length(gap_blk); + int level = gap_calc_level(len, glevel_len_); + if (level == -1) + { + FerrisBitMagic::word_t* blk = + bman.get_allocator().alloc_bit_block(); + bman.set_block_ptr(idx, blk); + bman.set_block_bit(idx); + gap_convert_to_bitset(blk, gap_blk); + } + else + { + gap_word_t* gap_blk_new = + bman.allocate_gap_block(level, gap_blk, glevel_len_); + + FerrisBitMagic::word_t* p = (FerrisBitMagic::word_t*) gap_blk_new; + BMSET_PTRGAP(p); + bman.set_block_ptr(idx, p); + } + bman.get_allocator().free_gap_block(gap_blk, bman.glen()); + } + + private: + const gap_word_t* glevel_len_; + }; + + + /*! Bitblock optimization functor */ + class block_opt_func : public bm_func_base + { + public: + block_opt_func(blocks_manager& bm, + FerrisBitMagic::word_t* temp_block, + int opt_mode) + : bm_func_base(bm), + temp_block_(temp_block), + opt_mode_(opt_mode) + { + BM_ASSERT(temp_block); + } + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + blocks_manager& bman = this->bm_; + if (IS_FULL_BLOCK(block)) return; + + gap_word_t* gap_blk; + + if (BM_IS_GAP(bman, block, idx)) // gap block + { + gap_blk = BMGAP_PTR(block); + + if (gap_is_all_zero(gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, 0); + goto free_block; + } + else + if (gap_is_all_one(gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, FULL_BLOCK_ADDR); + free_block: + bman.get_allocator().free_gap_block(gap_blk, + bman.glen()); + bman.set_block_bit(idx); + } + } + else // bit block + { + if (opt_mode_ < 3) // free_01 optimization + { + FerrisBitMagic::wordop_t* blk1 = (wordop_t*)block; + FerrisBitMagic::wordop_t* blk2 = + (wordop_t*)(block + FerrisBitMagic::set_block_size); + + bool b = bit_is_all_zero(blk1, blk2); + if (b) + { + bman.get_allocator().free_bit_block(block); + bman.set_block_ptr(idx, 0); + return; + } + if (opt_mode_ == 2) // check if it is all 1 block + { + b = is_bits_one(blk1, blk2); + if (b) + { + bman.get_allocator().free_bit_block(block); + bman.set_block_ptr(idx, FULL_BLOCK_ADDR); + return; + } + } + } + + // try to compress + + gap_word_t* tmp_gap_blk = (gap_word_t*)temp_block_; + *tmp_gap_blk = FerrisBitMagic::gap_max_level << 1; + + unsigned threashold = bman.glen(FerrisBitMagic::gap_max_level)-4; + + unsigned len = bit_convert_to_gap(tmp_gap_blk, + block, + FerrisBitMagic::gap_max_bits, + threashold); + + + if (!len) return; + + // convertion successful + + bman.get_allocator().free_bit_block(block); + + // check if new gap block can be eliminated + + if (gap_is_all_zero(tmp_gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, 0); + } + else if (gap_is_all_one(tmp_gap_blk, FerrisBitMagic::gap_max_bits)) + { + bman.set_block_ptr(idx, FULL_BLOCK_ADDR); + } + else + { + int level = FerrisBitMagic::gap_calc_level(len, bman.glen()); + + gap_blk = + bman.allocate_gap_block(level, tmp_gap_blk); + bman.set_block_ptr(idx, (FerrisBitMagic::word_t*)gap_blk); + bman.set_block_gap(idx); + } + + + } + + } + private: + FerrisBitMagic::word_t* temp_block_; + int opt_mode_; + }; + + /** Bitblock invert functor */ + class block_invert_func : public bm_func_base + { + public: + block_invert_func(blocks_manager& bm) + : bm_func_base(bm) {} + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + if (!block) + { + this->bm_.set_block(idx, FULL_BLOCK_ADDR); + } + else + if (IS_FULL_BLOCK(block)) + { + this->bm_.set_block_ptr(idx, 0); + } + else + { + if (BM_IS_GAP(this->bm_, block, idx)) // gap block + { + gap_invert(BMGAP_PTR(block)); + } + else // bit block + { + FerrisBitMagic::wordop_t* wrd_ptr = (wordop_t*) block; + FerrisBitMagic::wordop_t* wrd_end = + (wordop_t*) (block + FerrisBitMagic::set_block_size); + bit_invert(wrd_ptr, wrd_end); + } + } + + } + }; + + + + private: + + + /** Set block zero functor */ + class block_zero_func : public bm_func_base + { + public: + block_zero_func(blocks_manager& bm, bool free_mem) + : bm_func_base(bm), + free_mem_(free_mem) + {} + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + blocks_manager& bman = this->bm_; + if (IS_FULL_BLOCK(block)) + { + bman.set_block_ptr(idx, 0); + } + else + { + if (BM_IS_GAP(bman, block, idx)) + { + gap_set_all(BMGAP_PTR(block), FerrisBitMagic::gap_max_bits, 0); + } + else // BIT block + { + if (free_mem_) + { + bman.get_allocator().free_bit_block(block); + bman.set_block_ptr(idx, 0); + } + else + { + bit_block_set(block, 0); + } + } + } + } + private: + bool free_mem_; //!< If "true" frees bitblocks memsets to '0' + }; + + /** Fill block with all-one bits functor */ + class block_one_func : public bm_func_base + { + public: + block_one_func(blocks_manager& bm) : bm_func_base(bm) {} + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + if (!IS_FULL_BLOCK(block)) + { + this->bm_.set_block_all_set(idx); + } + } + }; + + + /** Block deallocation functor */ + class block_free_func : public bm_func_base + { + public: + block_free_func(blocks_manager& bm) : bm_func_base(bm) {} + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + blocks_manager& bman = this->bm_; + if (BM_IS_GAP(bman, block, idx)) // gap block + { + bman.get_allocator().free_gap_block(BMGAP_PTR(block), + bman.glen()); + } + else + { + bman.get_allocator().free_bit_block(block); + } + } + }; + + + /** Block copy functor */ + class block_copy_func : public bm_func_base + { + public: + block_copy_func(blocks_manager& bm_target, + const blocks_manager& bm_src) + : bm_func_base(bm_target), + bm_src_(bm_src) + {} + + void operator()(FerrisBitMagic::word_t* block, unsigned idx) + { + bool gap = bm_src_.is_block_gap(idx); + FerrisBitMagic::word_t* new_blk; + + blocks_manager& bman = this->bm_; + + if (gap) + { + FerrisBitMagic::gap_word_t* gap_block = BMGAP_PTR(block); + unsigned level = gap_level(gap_block); + new_blk = (FerrisBitMagic::word_t*) + bman.get_allocator().alloc_gap_block(level, + bman.glen()); + int len = gap_length(BMGAP_PTR(block)); + ::memcpy(new_blk, gap_block, len * sizeof(gap_word_t)); + BMSET_PTRGAP(new_blk); + } + else + { + if (IS_FULL_BLOCK(block)) + { + new_blk = block; + } + else + { + new_blk = bman.get_allocator().alloc_bit_block(); + bit_block_copy(new_blk, block); + } + } + bman.set_block(idx, new_blk); + } + + private: + const blocks_manager& bm_src_; + }; + + public: + + blocks_manager(const gap_word_t* glevel_len, + FerrisBitMagic::id_t max_bits, + const Alloc& alloc = Alloc()) + : blocks_(0), + temp_block_(0), + alloc_(alloc) + { + ::memcpy(glevel_len_, glevel_len, sizeof(glevel_len_)); + if (!max_bits) // working in full-range mode + { + top_block_size_ = FerrisBitMagic::set_array_size; + } + else // limiting the working range + { + top_block_size_ = + max_bits / (FerrisBitMagic::set_block_size * sizeof(FerrisBitMagic::word_t) * + FerrisBitMagic::set_array_size * 8); + if (top_block_size_ < FerrisBitMagic::set_array_size) ++top_block_size_; + } + + // allocate first level descr. of blocks + blocks_ = (FerrisBitMagic::word_t***) alloc_.alloc_ptr(top_block_size_); + ::memset(blocks_, 0, top_block_size_ * sizeof(FerrisBitMagic::word_t**)); + volatile const char* vp = _copyright::_p; + char c = *vp; + c = 0; + } + + blocks_manager(const blocks_manager& blockman) + : blocks_(0), + top_block_size_(blockman.top_block_size_), + #ifdef BM_DISBALE_BIT_IN_PTR + gap_flags_(blockman.gap_flags_), + #endif + temp_block_(0), + alloc_(blockman.alloc_) + { + ::memcpy(glevel_len_, blockman.glevel_len_, sizeof(glevel_len_)); + + blocks_ = (FerrisBitMagic::word_t***)alloc_.alloc_ptr(top_block_size_); + ::memset(blocks_, 0, top_block_size_ * sizeof(FerrisBitMagic::word_t**)); + + blocks_manager* bm = + const_cast(&blockman); + + word_t*** blk_root = bm->blocks_root(); + + block_copy_func copy_func(*this, blockman); + for_each_nzblock(blk_root, top_block_size_, + FerrisBitMagic::set_array_size, copy_func); + } + + + void free_ptr(FerrisBitMagic::word_t** ptr) + { + if (ptr) alloc_.free_ptr(ptr); + } + + ~blocks_manager() + { + alloc_.free_bit_block(temp_block_); + deinit_tree(); + } + + /** + \brief Finds block in 2-level blocks array + \param nb - Index of block (logical linear number) + \return block adress or NULL if not yet allocated + */ + FerrisBitMagic::word_t* get_block(unsigned nb) const + { + unsigned block_idx = nb >> FerrisBitMagic::set_array_shift; + if (block_idx >= top_block_size_) return 0; + FerrisBitMagic::word_t** blk_blk = blocks_[block_idx]; + if (blk_blk) + { + return blk_blk[nb & FerrisBitMagic::set_array_mask]; // equivalent of % + } + return 0; // not allocated + } + + /** + \brief Finds block in 2-level blocks array + \param i - top level block index + \param j - second level block index + \return block adress or NULL if not yet allocated + */ + inline const FerrisBitMagic::word_t* get_block(unsigned i, unsigned j) const + { + if (i >= top_block_size_) return 0; + const FerrisBitMagic::word_t* const* blk_blk = blocks_[i]; + return (blk_blk == 0) ? 0 : blk_blk[j]; + } + + /** + \brief Function returns top-level block in 2-level blocks array + \param i - top level block index + \return block adress or NULL if not yet allocated + */ + const FerrisBitMagic::word_t* const * get_topblock(unsigned i) const + { + if (i >= top_block_size_) return 0; + return blocks_[i]; + } + + /** + \brief Returns root block in the tree. + */ + FerrisBitMagic::word_t*** get_rootblock() const + { + blocks_manager* bm = + const_cast(this); + + return bm->blocks_root(); + } + + void set_block_all_set(unsigned nb) + { + FerrisBitMagic::word_t* block = this->get_block(nb); + set_block(nb, const_cast(FULL_BLOCK_ADDR)); + + // If we keep block type flag in pointer itself we dp not need + // to clear gap bit + #ifdef BM_DISBALE_BIT_IN_PTR + set_block_bit(nb); + #endif + + if (BM_IS_GAP((*this), block, nb)) + { + alloc_.free_gap_block(BMGAP_PTR(block), glevel_len_); + } + else + { + alloc_.free_bit_block(block); + } + + } + + + /** + Function checks if block is not yet allocated, allocates it and sets to + all-zero or all-one bits. + + If content_flag == 1 (ALLSET block) requested and taken block is already ALLSET, + function will return NULL + + initial_block_type and actual_block_type : 0 - bitset, 1 - gap + */ + FerrisBitMagic::word_t* check_allocate_block(unsigned nb, + unsigned content_flag, + int initial_block_type, + int* actual_block_type, + bool allow_null_ret=true) + { + FerrisBitMagic::word_t* block = this->get_block(nb); + + if (!IS_VALID_ADDR(block)) // NULL block or ALLSET + { + // if we wanted ALLSET and requested block is ALLSET return NULL + unsigned block_flag = IS_FULL_BLOCK(block); + *actual_block_type = initial_block_type; + if (block_flag == content_flag && allow_null_ret) + { + return 0; // it means nothing to do for the caller + } + + if (initial_block_type == 0) // bitset requested + { + block = alloc_.alloc_bit_block(); + + // initialize block depending on its previous status + + bit_block_set(block, block_flag ? 0xFF : 0); + + set_block(nb, block); + } + else // gap block requested + { + FerrisBitMagic::gap_word_t* gap_block = allocate_gap_block(0); + gap_set_all(gap_block, FerrisBitMagic::gap_max_bits, block_flag); + set_block(nb, (FerrisBitMagic::word_t*)gap_block); + + set_block_gap(nb); + + return (FerrisBitMagic::word_t*)gap_block; + } + + } + else // block already exists + { + *actual_block_type = BM_IS_GAP((*this), block, nb); + } + + return block; + } + + /*! @brief Fills all blocks with 0. + @param free_mem - if true function frees the resources + */ + void set_all_zero(bool free_mem) + { + block_zero_func zero_func(*this, free_mem); + for_each_nzblock(blocks_, top_block_size_, + FerrisBitMagic::set_array_size, zero_func); + } + + /*! Replaces all blocks with ALL_ONE block. + */ + void set_all_one() + { + block_one_func func(*this); + for_each_block(blocks_, top_block_size_, + FerrisBitMagic::set_array_size, func); + } + + /** + Places new block into descriptors table, returns old block's address. + Old block is not deleted. + */ + FerrisBitMagic::word_t* set_block(unsigned nb, FerrisBitMagic::word_t* block) + { + FerrisBitMagic::word_t* old_block; + + register unsigned nblk_blk = nb >> FerrisBitMagic::set_array_shift; + + // If first level array not yet allocated, allocate it and + // assign block to it + if (blocks_[nblk_blk] == 0) + { + blocks_[nblk_blk] = (FerrisBitMagic::word_t**)alloc_.alloc_ptr(); + ::memset(blocks_[nblk_blk], 0, + FerrisBitMagic::set_array_size * sizeof(FerrisBitMagic::word_t*)); + + old_block = 0; + } + else + { + old_block = blocks_[nblk_blk][nb & FerrisBitMagic::set_array_mask]; + } + + // NOTE: block will be replaced without freeing, + // potential memory leak may lay here.... + blocks_[nblk_blk][nb & FerrisBitMagic::set_array_mask] = block; // equivalent to % + + return old_block; + + } + + + /** + Places new block into blocks table. + */ + void set_block_ptr(unsigned nb, FerrisBitMagic::word_t* block) + { + blocks_[nb >> FerrisBitMagic::set_array_shift][nb & FerrisBitMagic::set_array_mask] = block; + } + + + /** + \brief Converts block from type gap to conventional bitset block. + \param nb - Block's index. + \param gap_block - Pointer to the gap block, + if NULL block nb will be taken + \return new gap block's memory + */ + FerrisBitMagic::word_t* convert_gap2bitset(unsigned nb, gap_word_t* gap_block=0) + { + FerrisBitMagic::word_t* block = this->get_block(nb); + if (gap_block == 0) + { + gap_block = BMGAP_PTR(block); + } + + BM_ASSERT(IS_VALID_ADDR((FerrisBitMagic::word_t*)gap_block)); + BM_ASSERT(is_block_gap(nb)); // must be GAP type + + FerrisBitMagic::word_t* new_block = alloc_.alloc_bit_block(); + + gap_convert_to_bitset(new_block, gap_block); + + // new block will replace the old one(no deletion) + set_block_ptr(nb, new_block); + + alloc_.free_gap_block(BMGAP_PTR(block), glen()); + + // If GAP flag is in block pointer no need to clean the gap bit twice + #ifdef BM_DISBALE_BIT_IN_PTR + set_block_bit(nb); + #endif + + return new_block; + } + + + /** + \brief Extends GAP block to the next level or converts it to bit block. + \param nb - Block's linear index. + \param blk - Blocks's pointer + */ + void extend_gap_block(unsigned nb, gap_word_t* blk) + { + unsigned level = FerrisBitMagic::gap_level(blk); + unsigned len = FerrisBitMagic::gap_length(blk); + if (level == FerrisBitMagic::gap_max_level || len >= gap_max_buff_len) + { + convert_gap2bitset(nb); + } + else + { + FerrisBitMagic::word_t* new_blk = (FerrisBitMagic::word_t*)allocate_gap_block(++level, blk); + + BMSET_PTRGAP(new_blk); + + set_block_ptr(nb, new_blk); + alloc_.free_gap_block(blk, glen()); + } + } + + bool is_block_gap(unsigned nb) const + { + #ifdef BM_DISBALE_BIT_IN_PTR + return gap_flags_.test(nb)!=0; + #else + FerrisBitMagic::word_t* block = get_block(nb); + return BMPTR_TESTBIT0(block) != 0; + #endif + } + + void set_block_bit(unsigned nb) + { + #ifdef BM_DISBALE_BIT_IN_PTR + gap_flags_.set(nb, false); + #else + FerrisBitMagic::word_t* block = get_block(nb); + block = (FerrisBitMagic::word_t*) BMPTR_CLEARBIT0(block); + set_block_ptr(nb, block); + #endif + } + + void set_block_gap(unsigned nb) + { + #ifdef BM_DISBALE_BIT_IN_PTR + gap_flags_.set(nb); + #else + FerrisBitMagic::word_t* block = get_block(nb); + block = (FerrisBitMagic::word_t*)BMPTR_SETBIT0(block); + set_block_ptr(nb, block); + #endif + } + + /** + \fn bool FerrisBitMagic::bvector::blocks_manager::is_block_zero(unsigned nb, FerrisBitMagic::word_t* blk) + \brief Checks all conditions and returns true if block consists of only 0 bits + \param nb - Block's linear index. + \param blk - Blocks's pointer + \returns true if all bits are in the block are 0. + */ + bool is_block_zero(unsigned nb, const FerrisBitMagic::word_t* blk) const + { + if (blk == 0) return true; + + if (BM_IS_GAP((*this), blk, nb)) // GAP + { + gap_word_t* b = BMGAP_PTR(blk); + return gap_is_all_zero(b, FerrisBitMagic::gap_max_bits); + } + + // BIT + for (unsigned i = 0; i < FerrisBitMagic::set_block_size; ++i) + { + if (blk[i] != 0) + return false; + } + return true; + } + + + /** + \brief Checks if block has only 1 bits + \param nb - Index of the block. + \param blk - Block's pointer + \return true if block consists of 1 bits. + */ + bool is_block_one(unsigned nb, const FerrisBitMagic::word_t* blk) const + { + if (blk == 0) return false; + + if (BM_IS_GAP((*this), blk, nb)) // GAP + { + gap_word_t* b = BMGAP_PTR(blk); + return gap_is_all_one(b, FerrisBitMagic::gap_max_bits); + } + + // BIT block + + if (IS_FULL_BLOCK(blk)) + { + return true; + } + return is_bits_one((wordop_t*)blk, + (wordop_t*)(blk + FerrisBitMagic::set_block_size)); + } + + /*! Returns temporary block, allocates if needed. */ + FerrisBitMagic::word_t* check_allocate_tempblock() + { + return temp_block_ ? temp_block_ + : (temp_block_ = alloc_.alloc_bit_block()); + } + + /*! Assigns new GAP lengths vector */ + void set_glen(const gap_word_t* glevel_len) + { + ::memcpy(glevel_len_, glevel_len, sizeof(glevel_len_)); + } + + + FerrisBitMagic::gap_word_t* allocate_gap_block(unsigned level, + gap_word_t* src = 0, + const gap_word_t* glevel_len = 0) + { + if (!glevel_len) + glevel_len = glevel_len_; + gap_word_t* ptr = alloc_.alloc_gap_block(level, glevel_len); + if (src) + { + unsigned len = gap_length(src); + ::memcpy(ptr, src, len * sizeof(gap_word_t)); + // Reconstruct the mask word using the new level code. + *ptr = ((len-1) << 3) | (level << 1) | (*src & 1); + } + else + { + *ptr = level << 1; + } + return ptr; + } + + + unsigned mem_used() const + { + unsigned mem_used = sizeof(*this); + mem_used += temp_block_ ? sizeof(word_t) * FerrisBitMagic::set_block_size : 0; + mem_used += sizeof(FerrisBitMagic::word_t**) * top_block_size_; + + #ifdef BM_DISBALE_BIT_IN_PTR + mem_used += gap_flags_.mem_used() - sizeof(gap_flags_); + #endif + + for (unsigned i = 0; i < top_block_size_; ++i) + { + mem_used += blocks_[i] ? sizeof(void*) * FerrisBitMagic::set_array_size : 0; + } + + return mem_used; + } + + /** Returns true if second level block pointer is 0. + */ + bool is_subblock_null(unsigned nsub) const + { + return blocks_[nsub] == NULL; + } + + + FerrisBitMagic::word_t*** blocks_root() + { + return blocks_; + } + + /*! \brief Returns current GAP level vector + */ + const gap_word_t* glen() const + { + return glevel_len_; + } + + /*! \brief Returns GAP level length for specified level + \param level - level number + */ + unsigned glen(unsigned level) const + { + return glevel_len_[level]; + } + + /*! \brief Swaps content + \param bm another blocks manager + */ + void swap(blocks_manager& bm) + { + word_t*** btmp = blocks_; + blocks_ = bm.blocks_; + bm.blocks_ = btmp; + #ifdef BM_DISBALE_BIT_IN_PTR + gap_flags_.swap(bm.gap_flags_); + #endif + gap_word_t gltmp[FerrisBitMagic::gap_levels]; + + ::memcpy(gltmp, glevel_len_, sizeof(glevel_len_)); + ::memcpy(glevel_len_, bm.glevel_len_, sizeof(glevel_len_)); + ::memcpy(bm.glevel_len_, gltmp, sizeof(glevel_len_)); + } + + /*! \brief Returns size of the top block array in the tree + */ + unsigned top_block_size() const + { + return top_block_size_; + } + + /*! \brief Sets ne top level block size. + */ + void set_top_block_size(unsigned value) + { + assert(value); + if (value == top_block_size_) return; + + deinit_tree(); + top_block_size_ = value; + // allocate first level descr. of blocks + blocks_ = (FerrisBitMagic::word_t***)alloc_.alloc_ptr(top_block_size_); + ::memset(blocks_, 0, top_block_size_ * sizeof(FerrisBitMagic::word_t**)); + } + + /** \brief Returns reference on the allocator + */ + allocator_type& get_allocator() { return alloc_; } + + /** \brief Returns allocator + */ + allocator_type get_allocator() const { return alloc_; } + + private: + + void operator =(const blocks_manager&); + + void deinit_tree() + { + if (blocks_ == 0) return; + + block_free_func free_func(*this); + for_each_nzblock(blocks_, top_block_size_, + FerrisBitMagic::set_array_size, free_func); + + for(unsigned i = 0; i < top_block_size_; ++i) + { + FerrisBitMagic::word_t** blk_blk = blocks_[i]; + if (blk_blk) + alloc_.free_ptr(blk_blk); + } + + alloc_.free_ptr(blocks_, top_block_size_); + } + + private: + /// Tree of blocks. + FerrisBitMagic::word_t*** blocks_; + /// Size of the top level block array in blocks_ tree + unsigned top_block_size_; + #ifdef BM_DISBALE_BIT_IN_PTR + /// mini bitvector used to indicate gap blocks + MS gap_flags_; + #endif + /// Temp block. + FerrisBitMagic::word_t* temp_block_; + /// vector defines gap block lengths for different levels + gap_word_t glevel_len_[gap_levels]; + /// allocator + allocator_type alloc_; + }; + + const blocks_manager& get_blocks_manager() const + { + return blockman_; + } + + blocks_manager& get_blocks_manager() + { + return blockman_; + } + + +private: + +// This block defines two additional hidden variables used for bitcount +// optimization, in rare cases can make bitvector thread unsafe. +#ifdef BMCOUNTOPT + mutable id_t count_; //!< number of bits "ON" in the vector + mutable bool count_is_valid_; //!< actualization flag +#endif + + blocks_manager blockman_; //!< bitblocks manager + strategy new_blocks_strat_; //!< blocks allocation strategy. +}; + + + + + +//--------------------------------------------------------------------- + +template +inline bvector operator& (const bvector& v1, + const bvector& v2) +{ +#ifdef BM_USE_EXPLICIT_TEMP + bvector ret(v1); + ret.bit_and(v2); + return ret; +#else + return bvector(v1).bit_and(v2); +#endif +} + +//--------------------------------------------------------------------- + +template +inline bvector operator| (const bvector& v1, + const bvector& v2) +{ +#ifdef BM_USE_EXPLICIT_TEMP + bvector ret(v1); + ret.bit_or(v2); + return ret; +#else + return bvector(v1).bit_or(v2); +#endif +} + +//--------------------------------------------------------------------- + +template +inline bvector operator^ (const bvector& v1, + const bvector& v2) +{ +#ifdef BM_USE_EXPLICIT_TEMP + bvector ret(v1); + ret.bit_xor(v2); + return ret; +#else + return bvector(v1).bit_xor(v2); +#endif +} + +//--------------------------------------------------------------------- + +template +inline bvector operator- (const bvector& v1, + const bvector& v2) +{ +#ifdef BM_USE_EXPLICIT_TEMP + bvector ret(v1); + ret.bit_sub(v2); + return ret; +#else + return bvector(v1).bit_sub(v2); +#endif +} + + + + +// ----------------------------------------------------------------------- + +template +void bvector::calc_stat(typename bvector::statistics* st) const +{ + st->bit_blocks = st->gap_blocks + = st->max_serialize_mem + = st->memory_used = 0; + + ::memcpy(st->gap_levels, + blockman_.glen(), sizeof(gap_word_t) * FerrisBitMagic::gap_levels); + + unsigned empty_blocks = 0; + unsigned blocks_memory = 0; + gap_word_t* gapl_ptr = st->gap_length; + + st->max_serialize_mem = sizeof(id_t) * 4; + + unsigned block_idx = 0; + + // Walk the blocks, calculate statistics. + for (unsigned i = 0; i < blockman_.top_block_size(); ++i) + { + const FerrisBitMagic::word_t* const* blk_blk = blockman_.get_topblock(i); + + if (!blk_blk) + { + block_idx += FerrisBitMagic::set_array_size; + st->max_serialize_mem += sizeof(unsigned) + 1; + continue; + } + + for (unsigned j = 0;j < FerrisBitMagic::set_array_size; ++j, ++block_idx) + { + const FerrisBitMagic::word_t* blk = blk_blk[j]; + if (IS_VALID_ADDR(blk)) + { + st->max_serialize_mem += empty_blocks << 2; + empty_blocks = 0; + + if (BM_IS_GAP(blockman_, blk, block_idx)) // gap block + { + ++(st->gap_blocks); + + FerrisBitMagic::gap_word_t* gap_blk = BMGAP_PTR(blk); + + unsigned mem_used = + FerrisBitMagic::gap_capacity(gap_blk, blockman_.glen()) + * sizeof(gap_word_t); + + *gapl_ptr = gap_length(gap_blk); + + st->max_serialize_mem += *gapl_ptr * sizeof(gap_word_t); + blocks_memory += mem_used; + + ++gapl_ptr; + } + else // bit block + { + ++(st->bit_blocks); + unsigned mem_used = sizeof(FerrisBitMagic::word_t) * FerrisBitMagic::set_block_size; + st->max_serialize_mem += mem_used; + blocks_memory += mem_used; + } + } + else + { + ++empty_blocks; + } + } + } + + + st->max_serialize_mem += st->max_serialize_mem / 10; // 10% increment + + // Calc size of different odd and temporary things. + + st->memory_used += sizeof(*this) - sizeof(blockman_); + st->memory_used += blockman_.mem_used(); + st->memory_used += blocks_memory; +} + + +// ----------------------------------------------------------------------- + + + +template +void bvector::stat(unsigned blocks) const +{ + register FerrisBitMagic::id_t count = 0; + int printed = 0; + + if (!blocks) + { + blocks = FerrisBitMagic::set_total_blocks; + } + + unsigned nb; + for (nb = 0; nb < blocks; ++nb) + { + register const FerrisBitMagic::word_t* blk = blockman_.get_block(nb); + + if (blk == 0) + { + continue; + } + + if (IS_FULL_BLOCK(blk)) + { + if (blockman_.is_block_gap(nb)) // gap block + { + printf("[Alert!%i]", nb); + assert(0); + } + + unsigned start = nb; + for(unsigned i = nb+1; i < FerrisBitMagic::set_total_blocks; ++i, ++nb) + { + blk = blockman_.get_block(nb); + if (IS_FULL_BLOCK(blk)) + { + if (blockman_.is_block_gap(nb)) // gap block + { + printf("[Alert!%i]", nb); + assert(0); + --nb; + break; + } + + } + else + { + --nb; + break; + } + } + + +printf("{F.%i:%i}",start, nb); + ++printed; +/* + count += FerrisBitMagic::SET_BLOCK_MASK + 1; + + register const FerrisBitMagic::word_t* blk_end = blk + FerrisBitMagic::SET_BLOCK_SIZE; + unsigned count2 = ::bit_block_calc_count(blk, blk_end); + assert(count2 == FerrisBitMagic::SET_BLOCK_MASK + 1); +*/ + } + else + { + if (blockman_.is_block_gap(nb)) // gap block + { + unsigned bc = gap_bit_count(BMGAP_PTR(blk)); + unsigned sum = gap_control_sum(BMGAP_PTR(blk)); + unsigned level = gap_level(BMGAP_PTR(blk)); + count += bc; +printf("[ GAP %i=%i:%i ]", nb, bc, level); +//printf("%i", count); + if (sum != FerrisBitMagic::gap_max_bits) + { + printf("<=*"); + } + ++printed; + } + else // bitset + { + const FerrisBitMagic::word_t* blk_end = blk + FerrisBitMagic::set_block_size; + unsigned bc = bit_block_calc_count(blk, blk_end); + + count += bc; +printf("( BIT %i=%i )", nb, bc); +//printf("%i", count); + ++printed; + + } + } + if (printed == 10) + { + printed = 0; + printf("\n"); + } + } // for nb +// printf("\nCOUNT=%i\n", count); + printf("\n"); + +} + +//--------------------------------------------------------------------- + + +} // namespace + + +#endif + + + + + + +/* +Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information please visit: http://bmagic.sourceforge.net + +*/ + +#ifndef BMSERIAL__H__INCLUDED__ +#define BMSERIAL__H__INCLUDED__ + +/*! \defgroup bvserial bvector serialization + * bvector serialization + * \ingroup bmagic + * + */ + +#ifndef BM__H__INCLUDED__ +#define BM__H__INCLUDED__ + +//#include "bm.h" + +#endif + +//#include "encoding.h" +//#include "bmdef.h" + + +// Serialization related constants + + +const unsigned char set_block_end = 0; //!< End of serialization +const unsigned char set_block_1zero = 1; //!< One all-zero block +const unsigned char set_block_1one = 2; //!< One block all-set (1111...) +const unsigned char set_block_8zero = 3; //!< Up to 256 zero blocks +const unsigned char set_block_8one = 4; //!< Up to 256 all-set blocks +const unsigned char set_block_16zero= 5; //!< Up to 65536 zero blocks +const unsigned char set_block_16one = 6; //!< UP to 65536 all-set blocks +const unsigned char set_block_32zero= 7; //!< Up to 4G zero blocks +const unsigned char set_block_32one = 8; //!< UP to 4G all-set blocks +const unsigned char set_block_azero = 9; //!< All other blocks zero +const unsigned char set_block_aone = 10; //!< All other blocks one + +const unsigned char set_block_bit = 11; //!< Plain bit block +const unsigned char set_block_sgapbit = 12; //!< SGAP compressed bitblock +const unsigned char set_block_sgapgap = 13; //!< SGAP compressed GAP block +const unsigned char set_block_gap = 14; //!< Plain GAP block +const unsigned char set_block_gapbit = 15; //!< GAP compressed bitblock +const unsigned char set_block_arrbit = 16; //!< List of bits ON + + + + + + +#define SER_NEXT_GRP(enc, nb, B_1ZERO, B_8ZERO, B_16ZERO, B_32ZERO) \ + if (nb == 1) \ + enc.put_8(B_1ZERO); \ + else if (nb < 256) \ + { \ + enc.put_8(B_8ZERO); \ + enc.put_8((unsigned char)nb); \ + } \ + else if (nb < 65536) \ + { \ + enc.put_8(B_16ZERO); \ + enc.put_16((unsigned short)nb); \ + } \ + else \ + {\ + enc.put_8(B_32ZERO); \ + enc.put_32(nb); \ + } + + +#define BM_SET_ONE_BLOCKS(x) \ + {\ + unsigned end_block = i + x; \ + for (;i < end_block; ++i) \ + bman.set_block_all_set(i); \ + } \ + --i + + + namespace FerrisBitMagic +{ + + + +/*! + \brief Saves bitvector into memory. + + Function serializes content of the bitvector into memory. + Serialization adaptively uses compression(variation of GAP encoding) + when it is benefitial. + + \param buf - pointer on target memory area. No range checking in the + function. It is responsibility of programmer to allocate sufficient + amount of memory using information from calc_stat function. + + \param temp_block - pointer on temporary memory block. Cannot be 0; + If you want to save memory across multiple bvectors + allocate temporary block using allocate_tempblock and pass it to + serialize. + (Of course serialize does not deallocate temp_block.) + + \return Size of serialization block. + \sa calc_stat +*/ +/* + Serialization format: +
+
+ | HEADER | BLOCKS |
+
+ Header structure:
+   BYTE : Serialization type (0x1)
+   BYTE : Byte order ( 0 - Big Endian, 1 - Little Endian)
+   INT16: Reserved (0)
+   INT16: Reserved Flags (0)
+
+ 
+*/ +template +unsigned serialize(const BV& bv, unsigned char* buf, FerrisBitMagic::word_t* temp_block) +{ +// BM_ASSERT(temp_block); + + typedef typename BV::blocks_manager blocks_manager_type; + const blocks_manager_type& bman = bv.get_blocks_manager(); + + gap_word_t* gap_temp_block = (gap_word_t*) temp_block; + + + FerrisBitMagic::encoder enc(buf, 0); + + // Header + + ByteOrder bo = globals::byte_order(); + + enc.put_8(1); + enc.put_8((unsigned char)bo); + + unsigned i,j; + + // keep GAP levels information + enc.put_16(bman.glen(), FerrisBitMagic::gap_levels); +/* + for (i = 0; i < FerrisBitMagic::gap_levels; ++i) + { + enc.put_16(bman.glen()[i]); + } +*/ + // Blocks. + + for (i = 0; i < FerrisBitMagic::set_total_blocks; ++i) + { + FerrisBitMagic::word_t* blk = bman.get_block(i); + + // ----------------------------------------- + // Empty or ONE block serialization + + bool flag; + flag = bman.is_block_zero(i, blk); + if (flag) + { + // Look ahead for similar blocks + for(j = i+1; j < FerrisBitMagic::set_total_blocks; ++j) + { + FerrisBitMagic::word_t* blk_next = bman.get_block(j); + if (flag != bman.is_block_zero(j, blk_next)) + break; + } + if (j == FerrisBitMagic::set_total_blocks) + { + enc.put_8(set_block_azero); + break; + } + else + { + unsigned nb = j - i; + SER_NEXT_GRP(enc, nb, set_block_1zero, + set_block_8zero, + set_block_16zero, + set_block_32zero) + } + i = j - 1; + continue; + } + else + { + flag = bman.is_block_one(i, blk); + if (flag) + { + // Look ahead for similar blocks + for(j = i+1; j < FerrisBitMagic::set_total_blocks; ++j) + { + FerrisBitMagic::word_t* blk_next = bman.get_block(j); + if (flag != bman.is_block_one(j, blk_next)) + break; + } + if (j == FerrisBitMagic::set_total_blocks) + { + enc.put_8(set_block_aone); + break; + } + else + { + unsigned nb = j - i; + SER_NEXT_GRP(enc, nb, set_block_1one, + set_block_8one, + set_block_16one, + set_block_32one) + } + i = j - 1; + continue; + } + } + + // ------------------------------ + // GAP serialization + + if (BM_IS_GAP(bman, blk, i)) + { + gap_word_t* gblk = BMGAP_PTR(blk); + unsigned len = gap_length(gblk); + enc.put_8(set_block_gap); + enc.put_16(gblk, len-1); + /* + for (unsigned k = 0; k < (len-1); ++k) + { + enc.put_16(gblk[k]); + } + */ + continue; + } + + // ------------------------------- + // BIT BLOCK serialization + + // Try to reduce the size up to the reasonable limit. +/* + unsigned len = FerrisBitMagic::bit_convert_to_gap(gap_temp_block, + blk, + FerrisBitMagic::GAP_MAX_BITS, + FerrisBitMagic::GAP_EQUIV_LEN-64); +*/ + gap_word_t len; + + len = bit_convert_to_arr(gap_temp_block, + blk, + FerrisBitMagic::gap_max_bits, + FerrisBitMagic::gap_equiv_len-64); + + if (len) // reduced + { +// len = gap_length(gap_temp_block); +// enc.put_8(SET_BLOCK_GAPBIT); +// enc.memcpy(gap_temp_block, sizeof(gap_word_t) * (len - 1)); + enc.put_8(set_block_arrbit); + if (sizeof(gap_word_t) == 2) + { + enc.put_16(len); + } + else + { + enc.put_32(len); + } + enc.put_16(gap_temp_block, len); + } + else + { + enc.put_8(set_block_bit); + enc.put_32(blk, FerrisBitMagic::set_block_size); + //enc.memcpy(blk, sizeof(FerrisBitMagic::word_t) * FerrisBitMagic::set_block_size); + } + + } + + enc.put_8(set_block_end); + return enc.size(); + +} + +/*! + @brief Saves bitvector into memory. + Allocates temporary memory block for bvector. +*/ + +template +unsigned serialize(BV& bv, unsigned char* buf) +{ + typename BV::blocks_manager& bman = bv.get_blocks_manager(); + + return serialize(bv, buf, bman.check_allocate_tempblock()); +} + + + +/*! + @brief Bitvector deserialization from memory. + + @param buf - pointer on memory which keeps serialized bvector + @param temp_block - pointer on temporary block, + if NULL bvector allocates own. + @return Number of bytes consumed by deserializer. + + Function desrializes bitvector from memory block containig results + of previous serialization. Function does not remove bits + which are currently set. Effectively it means OR logical operation + between current bitset and previously serialized one. +*/ +template +unsigned deserialize(BV& bv, const unsigned char* buf, FerrisBitMagic::word_t* temp_block=0) +{ + typedef typename BV::blocks_manager blocks_manager_type; + blocks_manager_type& bman = bv.get_blocks_manager(); + + typedef typename BV::allocator_type allocator_type; + + FerrisBitMagic::wordop_t* tmp_buf = + temp_block ? (FerrisBitMagic::wordop_t*) temp_block + : (FerrisBitMagic::wordop_t*)bman.check_allocate_tempblock(); + + temp_block = (word_t*)tmp_buf; + + gap_word_t gap_temp_block[set_block_size*2+10]; + + + ByteOrder bo_current = globals::byte_order(); + FerrisBitMagic::decoder dec(buf); + + bv.forget_count(); + + BM_SET_MMX_GUARD + + // Reading header + + // unsigned char stype = + dec.get_8(); + ByteOrder bo = (FerrisBitMagic::ByteOrder)dec.get_8(); + + assert(bo == bo_current); // TO DO: Add Byte-Order convertions here + + unsigned i; + + gap_word_t glevels[FerrisBitMagic::gap_levels]; + // keep GAP levels information + for (i = 0; i < FerrisBitMagic::gap_levels; ++i) + { + glevels[i] = dec.get_16(); + } + + // Reading blocks + + unsigned char btype; + unsigned nb; + + for (i = 0; i < FerrisBitMagic::set_total_blocks; ++i) + { + // get the block type + + btype = dec.get_8(); + + + // In a few next blocks of code we simply ignoring all coming zero blocks. + + if (btype == set_block_azero || btype == set_block_end) + { + break; + } + + if (btype == set_block_1zero) + { + continue; + } + + if (btype == set_block_8zero) + { + nb = dec.get_8(); + i += nb-1; + continue; + } + + if (btype == set_block_16zero) + { + nb = dec.get_16(); + i += nb-1; + continue; + } + + if (btype == set_block_32zero) + { + nb = dec.get_32(); + i += nb-1; + continue; + } + + // Now it is turn of all-set blocks (111) + + if (btype == set_block_aone) + { + for (unsigned j = i; j < FerrisBitMagic::set_total_blocks; ++j) + { + bman.set_block_all_set(j); + } + break; + } + + if (btype == set_block_1one) + { + bman.set_block_all_set(i); + continue; + } + + if (btype == set_block_8one) + { + BM_SET_ONE_BLOCKS(dec.get_8()); + continue; + } + + if (btype == set_block_16one) + { + BM_SET_ONE_BLOCKS(dec.get_16()); + continue; + } + + if (btype == set_block_32one) + { + BM_SET_ONE_BLOCKS(dec.get_32()); + continue; + } + + FerrisBitMagic::word_t* blk = bman.get_block(i); + + + if (btype == set_block_bit) + { + if (blk == 0) + { + blk = bman.get_allocator().alloc_bit_block(); + bman.set_block(i, blk); + dec.get_32(blk, FerrisBitMagic::set_block_size); + //dec.memcpy(blk, sizeof(FerrisBitMagic::word_t) * FerrisBitMagic::set_block_size); + continue; + } + dec.get_32(temp_block, FerrisBitMagic::set_block_size); + //dec.memcpy(temp_block, sizeof(FerrisBitMagic::word_t) * FerrisBitMagic::set_block_size); + bv.combine_operation_with_block(i, + temp_block, + 0, BM_OR); + continue; + } + + if (btype == set_block_gap || btype == set_block_gapbit) + { + gap_word_t gap_head = + sizeof(gap_word_t) == 2 ? dec.get_16() : dec.get_32(); + + unsigned len = gap_length(&gap_head); + int level = gap_calc_level(len, bman.glen()); + --len; + if (level == -1) // Too big to be GAP: convert to BIT block + { + *gap_temp_block = gap_head; + dec.get_16(gap_temp_block+1, len - 1); + //dec.memcpy(gap_temp_block+1, (len-1) * sizeof(gap_word_t)); + gap_temp_block[len] = gap_max_bits - 1; + + if (blk == 0) // block does not exist yet + { + blk = bman.get_allocator().alloc_bit_block(); + bman.set_block(i, blk); + gap_convert_to_bitset(blk, gap_temp_block); + } + else // We have some data already here. Apply OR operation. + { + gap_convert_to_bitset(temp_block, + gap_temp_block); + + bv.combine_operation_with_block(i, + temp_block, + 0, + BM_OR); + } + + continue; + } // level == -1 + + set_gap_level(&gap_head, level); + + if (blk == 0) + { + gap_word_t* gap_blk = + bman.get_allocator().alloc_gap_block(level, bman.glen()); + gap_word_t* gap_blk_ptr = BMGAP_PTR(gap_blk); + *gap_blk_ptr = gap_head; + set_gap_level(gap_blk_ptr, level); + bman.set_block(i, (FerrisBitMagic::word_t*)gap_blk); + bman.set_block_gap(i); + for (unsigned k = 1; k < len; ++k) + { + gap_blk[k] = dec.get_16(); + } + gap_blk[len] = FerrisBitMagic::gap_max_bits - 1; + } + else + { + *gap_temp_block = gap_head; + for (unsigned k = 1; k < len; ++k) + { + gap_temp_block[k] = dec.get_16(); + } + gap_temp_block[len] = FerrisBitMagic::gap_max_bits - 1; + + bv.combine_operation_with_block(i, + (FerrisBitMagic::word_t*)gap_temp_block, + 1, + BM_OR); + } + + continue; + } + + if (btype == set_block_arrbit) + { + gap_word_t len = + sizeof(gap_word_t) == 2 ? dec.get_16() : dec.get_32(); + + // check the block type. + if (bman.is_block_gap(i)) + { + // Here we most probably does not want to keep + // the block GAP since generic bitblock offers better + // performance. + blk = bman.convert_gap2bitset(i); + } + else + { + if (blk == 0) // block does not exists yet + { + blk = bman.get_allocator().alloc_bit_block(); + bit_block_set(blk, 0); + bman.set_block(i, blk); + } + } + + // Get the array one by one and set the bits. + for (unsigned k = 0; k < len; ++k) + { + gap_word_t bit_idx = dec.get_16(); + or_bit_block(blk, bit_idx, 1); + } + + continue; + } +/* + if (btype == set_block_gapbit) + { + gap_word_t gap_head = + sizeof(gap_word_t) == 2 ? dec.get_16() : dec.get_32(); + + unsigned len = gap_length(&gap_head)-1; + + *gap_temp_block = gap_head; + dec.memcpy(gap_temp_block+1, (len-1) * sizeof(gap_word_t)); + gap_temp_block[len] = GAP_MAX_BITS - 1; + + if (blk == 0) // block does not exists yet + { + blk = A::alloc_bit_block(); + blockman_.set_block(i, blk); + gap_convert_to_bitset(blk, + gap_temp_block, + FerrisBitMagic::SET_BLOCK_SIZE); + } + else // We have some data already here. Apply OR operation. + { + gap_convert_to_bitset(temp_block, + gap_temp_block, + FerrisBitMagic::SET_BLOCK_SIZE); + + combine_operation_with_block(i, + temp_block, + 0, + BM_OR); + } + + continue; + } +*/ + BM_ASSERT(0); // unknown block type + + + } // for i + + return dec.size(); + +} + + + + +} // namespace bm + +//#include "bmundef.h" + +#endif + + + + +//////////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////////// +//#include "bmundef.h" + +// Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com) +// +// BM library internal header +// +// Cleaning the BM related preprocessor defines to eliminate the risks of collision +// with other programs. Please let me know if something is missing. +// + +#undef BMCOUNT_INC +#undef BMCOUNT_DEC +#undef BMCOUNT_VALID +#undef BMCOUNT_SET +#undef BMCOUNT_ADJ +#undef BMCOUNT_INC +#undef BMCOUNT_DEC +#undef BMCOUNT_VALID +#undef BMCOUNT_SET +#undef BMCOUNT_ADJ +#undef BMRESTRICT +#undef BMGAP_PTR +#undef BMSET_PTRGAP +#undef BM_IS_GAP +#undef BMPTR_SETBIT0 +#undef BMPTR_CLEARBIT0 +#undef BMPTR_TESTBIT0 +#undef BM_SET_MMX_GUARD +#undef SER_NEXT_GRP +#undef BM_SET_ONE_BLOCKS +#undef DECLARE_TEMP_BLOCK +#undef BM_MM_EMPTY +#undef BM_ASSERT +#undef FULL_BLOCK_ADDR +#undef IS_VALID_ADDR +#undef IS_FULL_BLOCK +#undef IS_EMPTY_BLOCK +#undef BM_INCWORD_BITCOUNT +#undef BM_MINISET_GAPLEN +#undef BM_MINISET_ARRSIZE + +#undef BMVECTOPT +#undef VECT_XOR_ARR_2_MASK +#undef VECT_ANDNOT_ARR_2_MASK +#undef VECT_INVERT_ARR +#undef VECT_AND_ARR +#undef VECT_OR_ARR +#undef VECT_SUB_ARR +#undef VECT_XOR_ARR + +#undef VECT_COPY_BLOCK +#undef VECT_SET_BLOCK + + + +///////////////////////////////////////////////////////////////////////////////// diff --git a/Ferris/FerrisBoost.cpp b/Ferris/FerrisBoost.cpp new file mode 100644 index 0000000..e8cef74 --- /dev/null +++ b/Ferris/FerrisBoost.cpp @@ -0,0 +1,301 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisBoost.cpp,v 1.6 2010/09/24 21:30:34 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; +using namespace boost; + +namespace Ferris +{ + + regexlist_t& stringlist_to_regexlist( regexlist_t& ret, const stringlist_t& sl ) + { + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + ret.push_back( boost::regex( *si ) ); + } + return ret; + } + void erase_any_matches( regexlist_t& rel, stringlist_t& sl ) + { + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ) + { + stringlist_t::iterator current = si; + ++si; + bool remove = false; + string query_string = *current; + + for( regexlist_t::iterator ri = rel.begin(); ri!=rel.end(); ++ri ) + { + if(boost::regex_search( query_string, *ri, boost::match_any )) + { + remove = true; + break; + } + } + + if( remove ) + sl.erase( current ); + } + } + + void erase_any_matches( const boost::regex& r, stringlist_t& sl ) + { + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ) + { + stringlist_t::iterator current = si; + ++si; + cerr << "test:" << *current << endl; + if(boost::regex_search( *current, r, boost::match_any )) + { + cerr << "erase:" << *current << endl; + sl.erase( current ); + } + } + } + + + std::string MakeCompositeRegexString( const stringlist_t& sl ) + { + stringstream ss; + + if( sl.empty() ) + return ""; + + int pos = 0; + bool optimizeDone = false; + for( pos = 0; !optimizeDone; ++pos ) + { + char ch = 0; + stringlist_t::const_iterator si = sl.begin(); + if( pos >= si->length() ) + { + optimizeDone = true; + break; + } + ch = (*si)[ pos ]; + for( ; si != sl.end(); ++si ) + { + if( pos >= si->length() ) + { + optimizeDone = true; + break; + } + if( ch != (*si)[ pos ] ) + { + optimizeDone = true; + break; + } + } + + if( optimizeDone ) + break; + + // + // All the strings share this si[pos] in common. + // + LG_STRF_D << "common char at pos:" << pos << " ch:" << ch << endl; + ss << ch; + } + + ss << "("; + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ) + { + ss << si->substr( pos ); + ++si; + if( si != sl.end() ) + ss << "|"; + } + ss << ")"; + + if( LG_STRF_D_ACTIVE ) + { + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + LG_STRF_D << "Given:" << *si << endl; + } + LG_STRF_D << "Result:" << ss.str() << endl; + } + + return ss.str(); + } + + boost::regex toregex( const std::string& s, regex::flag_type rflags ) + { + return boost::regex( s, rflags | regex::optimize ); + } + boost::regex toregex( const stringlist_t& sl, boost::regex::flag_type rflags ) + { + std::string s = MakeCompositeRegexString( sl ); + return toregex( s, rflags ); + } + fh_rex toregexh( const std::string& s, boost::regex::flag_type rflags ) + { + return new boost::regex( s, rflags | regex::optimize ); + } + fh_rex toregexh( const stringlist_t& sl, boost::regex::flag_type rflags ) + { + std::string s = MakeCompositeRegexString( sl ); + return toregexh( s, rflags ); + } + + boost::regex toregexi( const std::string& s, regex::flag_type rflags ) + { + return toregex( s, rflags | boost::regex::icase ); + } + boost::regex toregexi( const stringlist_t& sl, boost::regex::flag_type rflags ) + { + return toregex( sl, rflags | boost::regex::icase ); + } + fh_rex toregexhi( const std::string& s, boost::regex::flag_type rflags ) + { + return toregexh( s, rflags | boost::regex::icase ); + } + fh_rex toregexhi( const stringlist_t& sl, boost::regex::flag_type rflags ) + { + return toregexh( sl, rflags | boost::regex::icase ); + } + + string regex_match_single( const std::string& s, + const fh_rex& e, + boost::match_flag_type flags ) + { + boost::smatch matches; + if(regex_match( s, matches, e, flags )) + { +// cerr << "matches.size()" << endl; + if( matches.size() == 2 ) + { + string ret = matches[1]; + return ret; + } + } + return ""; + } + + string regex_match_single( const std::string& s, + const std::string& rex, + boost::match_flag_type flags ) + { + fh_rex r = toregexh( rex ); + return regex_match_single( s, r, flags ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct RegexCollectionPriv + { + fh_rex m_regex; + stringlist_t m_regexlist; + bool m_caseSensitive; + + RegexCollectionPriv( bool caseSensitive ) + : + m_regex( 0 ), + m_caseSensitive( caseSensitive ) + { + } + }; + + RegexCollection::RegexCollection( bool caseSensitive ) + : + m_priv( new RegexCollectionPriv( caseSensitive ) ) + { + } + RegexCollection::~RegexCollection() + { + } + + void + RegexCollection::append( const std::string& s ) + { + if( !s.empty() ) + { + m_priv->m_regex = 0; + m_priv->m_regexlist.push_back( s ); + } + } + + void + RegexCollection::append( const std::list< std::string >& sl ) + { + m_priv->m_regex = 0; + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + if( !si->empty() ) + m_priv->m_regexlist.push_back( *si ); + } + + + void RegexCollection::clear() + { + m_priv->m_regexlist.clear(); + m_priv->m_regex = 0; + } + + fh_rex + RegexCollection::getRegex() const + { + if( GetImpl(m_priv->m_regex) ) + return m_priv->m_regex; + if( m_priv->m_regexlist.empty() ) + return 0; + + string s = MakeCompositeRegexString( m_priv->m_regexlist ); + boost::regex::flag_type flags = boost::regex::optimize; + if( m_priv->m_caseSensitive ) + flags |= boost::regex::icase; + + m_priv->m_regex = toregexh( s, flags ); + return m_priv->m_regex; + } + + std::string replaceg( const std::string& s, + const std::string& rex, + const std::string& fmt, + boost::match_flag_type flags ) + { + typedef map< string, fh_rex > cache_t; + static cache_t cache; + cache_t::iterator iter = cache.find( s ); + if( iter == cache.end() ) + { + fh_rex r = toregexh( rex ); + iter = cache.insert( make_pair(s, r) ).first; + } + return replaceg( s, iter->second, fmt, flags ); + } + +}; diff --git a/Ferris/FerrisBoost.hh b/Ferris/FerrisBoost.hh new file mode 100644 index 0000000..78e2fff --- /dev/null +++ b/Ferris/FerrisBoost.hh @@ -0,0 +1,322 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisBoost.hh,v 1.11 2010/09/24 21:30:34 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_BOOST_H_ +#define _ALREADY_INCLUDED_FERRIS_BOOST_H_ + +#include +#include +#include +using namespace boost::lambda; + +#include +#include +#include + +namespace Ferris +{ +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility push(default) +#endif + + typedef std::list< boost::regex > regexlist_t; + + /** + * compile each item in 'sl' into a regex and place it into ret. + * return ret. + */ + regexlist_t& stringlist_to_regexlist( regexlist_t& ret, const stringlist_t& sl ); + + /** + * anything in 'sl' which matches any regex in 'rel' is removed from 'sl' + */ + void erase_any_matches( regexlist_t& rel, stringlist_t& sl ); + void erase_any_matches( const boost::regex& r, stringlist_t& sl ); + + + /** + * Convert a list of regexs to a single composite regex. + * eg, abstractly stringlist is elements, regex is (a|b|c). + * + * Common prefixes are shifted out, for example: + * file://foo + * file://bar + * gives file://(foo|bar) + */ + std::string MakeCompositeRegexString( const stringlist_t& sl ); + +// typedef Loki::SmartPtr< RootContextFactory, +// Loki::RefLinked, +// Loki::AllowConversion, +// FerrisLoki::FerrisExSmartPointerChecker, +// Loki::DefaultSPStorage > fh_regex; + + + /** + * Create a boost::regex using common optimization options. + */ + boost::regex toregex( const std::string& s, boost::regex::flag_type rflags = boost::regex::optimize ); + boost::regex toregex( const stringlist_t& sl, boost::regex::flag_type rflags = boost::regex::optimize ); + fh_rex toregexh( const std::string& s, boost::regex::flag_type rflags = boost::regex::optimize ); + fh_rex toregexh( const stringlist_t& sl, boost::regex::flag_type rflags = boost::regex::optimize ); + + /** + * Automatically add an icase flag. sorthand for toregex( foo, boost::regex::icase ). + * Note that if rflags is given then icase is implicitly added aswell + */ + boost::regex toregexi( const std::string& s, boost::regex::flag_type rflags = boost::regex::icase ); + boost::regex toregexi( const stringlist_t& sl, boost::regex::flag_type rflags = boost::regex::icase ); + fh_rex toregexhi( const std::string& s, boost::regex::flag_type rflags = boost::regex::icase ); + fh_rex toregexhi( const stringlist_t& sl, boost::regex::flag_type rflags = boost::regex::icase ); + + /** + * regex_match() has to match the whole string, regex_search() can be partial. + */ + inline bool regex_match(const std::string& s, + boost::smatch& m, + const fh_rex& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_match( s, m, *e, flags); + } + inline bool regex_match(const std::string& s, + const fh_rex& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_match( s, *e, flags); + } + + + inline bool regex_match(const std::string& s, + boost::smatch& m, + const RegexCollection& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_match( s, m, e.getRegex(), flags); + } + inline bool regex_match(const std::string& s, + const RegexCollection& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_match( s, e.getRegex(), flags); + } + + /** + * The regex_match_single() family allow you to pass a string and a + * regex to pluck out a single match with a (capture) expression. + * the capture is returned or "" if the regex didn't match exactly + * one capture. + */ + std::string regex_match_single( const std::string& s, + const fh_rex& e, + boost::match_flag_type flags = boost::match_default ); + std::string regex_match_single( const std::string& s, + const std::string& rex, + boost::match_flag_type flags = boost::match_default ); + + + + + inline bool regex_search( const std::string& s, + boost::smatch& m, + const fh_rex& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_search( s, m, *e, flags ); + } + inline bool regex_search( const std::string& s, + const fh_rex& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_search( s, *e, flags ); + } + inline bool regex_search( const std::string& s, + boost::smatch& m, + const RegexCollection& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_search( s, m, e.getRegex(), flags ); + } + inline bool regex_search( const std::string& s, + const RegexCollection& e, + boost::match_flag_type flags = boost::match_default ) + { + return regex_search( s, e.getRegex(), flags ); + } + + template + std::basic_string replaceg( const std::basic_string& s, + const boost::basic_regex& e, + const std::basic_string& fmt, + boost::match_flag_type flags = boost::match_default | boost::format_all ) + { + return boost::regex_replace( s, e, fmt, flags | boost::match_default | boost::format_all ); + } + template + std::basic_string replaceg( const std::basic_string& s, + const boost::basic_regex& e, + const char* fmt, + boost::match_flag_type flags = boost::match_default | boost::format_all ) + { + return boost::regex_replace( s, e, fmt, flags | boost::match_default | boost::format_all ); + } + + template + std::basic_string replaceg( const std::basic_string& s, + fh_rex e, + const std::basic_string& fmt, + boost::match_flag_type flags = boost::match_default | boost::format_all ) + { + return boost::regex_replace( s, *e, fmt, flags | boost::match_default | boost::format_all ); + } + template + std::basic_string replaceg( const std::basic_string& s, + fh_rex e, + const char* fmt, + boost::match_flag_type flags = boost::match_default | boost::format_all ) + { + return boost::regex_replace( s, *e, fmt, flags | boost::match_default | boost::format_all ); + } + + /** + * Convenience function for code that wants a staticly compiled regex + * but does not want to worry about singletons or the like. + * rex is compiled to a regex object and cached for future calls. + */ + std::string replaceg( const std::string& s, + const std::string& rex, + const std::string& fmt = "\\1", + boost::match_flag_type flags = boost::match_default | boost::format_all ); + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + // + // Allow quick and easy single time forward sweeps of begin() to end() + // + // typedef list< string > stringlist_t; + // stringlist_t sl; + // sl.push_back("foo"); + // sl.push_back("bar"); + // sl.push_back("bzt"); + // for( rs r( sl ); r; ++r ) + // { + // cerr << "r:" << *r << endl; + // } + + + + template + class range_sweep + : public boost::iterator_adaptor< range_sweep
, typename Col::iterator > + { + typedef boost::iterator_adaptor< range_sweep, typename Col::iterator > super_t; + typedef typename Col::iterator Iterator; + + friend class ::boost::iterator_core_access; + + Iterator m_e; + + public: +// range_sweep() {} + + explicit range_sweep( Iterator b, Iterator e ) + : super_t(b), m_e(e) {} + explicit range_sweep( Col& c ) + : super_t( c.begin() ), m_e( c.end() ) {} + +// template +// range_sweep( +// range_sweep const& r +// , typename enable_if_convertible::type* = 0 +// ) +// : super_t(r.base()) +// {} + + operator bool() + { + return this->base_reference()!=m_e; + } + + private: + typename super_t::reference dereference() const + { + return *(this->base_reference()); + } + + void increment() { ++this->base_reference(); } + void decrement() { --this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += n; + } + }; + + template + range_sweepmake_range_sweep( Col& c ) + { + return range_sweep( c.begin(), c.end() ); + } + + template + class rs : public range_sweep+ { + public: + explicit rs( typename Col::iterator b, typename Col::iterator e ) + : + range_sweep(b,e) {} + explicit rs( Col& c ) + : range_sweep( c ) {} + }; +// template +// rsmrs( Col& c ) +// { +// return rs( c.begin(), c.end() ); +// } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility pop +#endif + +}; +#endif diff --git a/Ferris/FerrisCLucene.hh b/Ferris/FerrisCLucene.hh new file mode 100644 index 0000000..ca46bc8 --- /dev/null +++ b/Ferris/FerrisCLucene.hh @@ -0,0 +1,91 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCLucene.hh,v 1.2 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CLUCENE_COMMON_H_ +#define _ALREADY_INCLUDED_FERRIS_CLUCENE_COMMON_H_ + +#include +#include + +namespace lucene +{ + namespace debug + { + class LuceneBase; + }; + namespace index + { + class IndexWriter; + class IndexReader; + class Term; + }; + namespace search + { + class Query; + class TermQuery; + class BooleanQuery; + class Hits; + }; + typedef search::Hits* l_Hits; + typedef Loki::SmartPtr< search::Query, + Loki::RefCounted, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_Query; +typedef Loki::SmartPtr< search::TermQuery, + Loki::RefCounted, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_TermQuery; +typedef Loki::SmartPtr< search::BooleanQuery, + Loki::RefCounted, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_BooleanQuery; +typedef Loki::SmartPtr< index::IndexWriter, + Loki::RefCounted, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_IndexWriter; +typedef Loki::SmartPtr< index::IndexReader, + Loki::RefCounted, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_IndexReader; +typedef Loki::SmartPtr< index::Term, + Loki::RefCounted, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > l_Term; + + +}; + + +#endif diff --git a/Ferris/FerrisContextPlugin.cpp b/Ferris/FerrisContextPlugin.cpp new file mode 100644 index 0000000..c23e5f5 --- /dev/null +++ b/Ferris/FerrisContextPlugin.cpp @@ -0,0 +1,32 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisContextPlugin.cpp,v 1.2 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + + diff --git a/Ferris/FerrisCopy.cpp b/Ferris/FerrisCopy.cpp new file mode 100644 index 0000000..ae914b3 --- /dev/null +++ b/Ferris/FerrisCopy.cpp @@ -0,0 +1,2882 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2002 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCopy.cpp,v 1.27 2011/04/27 21:31:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#define _XOPEN_SOURCE + +#include +#include + +#include +#include +#include // version info +#include + +#include +#include +#include + +#include +#include +#include +#include + + +#include +#include +#include +//#include + +// // sendfile(2) +// #include +// #include +// #include +// #include + + +using namespace std; + +namespace Ferris +{ + + FerrisCopy::CopyVerboseSignal_t& + FerrisCopy::getCopyVerboseSignal() + { + return CopyVerboseSignal; + } + + FerrisCopy::SkippingContextSignal_t& + FerrisCopy::getSkippingContextSignal() + { + return SkippingContextSignal; + } + + FerrisCopy::AskReplaceContextSignal_t& + FerrisCopy::getAskReplaceContextSignal() + { + return AskReplaceContextSignal; + } + + FerrisCopy::AskReplaceAttributeSignal_t& + FerrisCopy::getAskReplaceAttributeSignal() + { + return AskReplaceAttributeSignal; + } + + fh_cp_collector + FerrisCopy::getPoptCollector() + { + if( !isBound( Collector ) ) + { + Collector = new ContextPopTableCollector(); + } + + return Collector; + } + + static string toOctalString( int v ) + { + stringstream ss; + ss << oct << v; + return ss.str(); + } + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + + void + FerrisCopy::workStarting() + { + RecursiveIsInitial = true; + + ls.setDontFollowLinks( FollowOnlyForSrcUrl || DontFollowLinks ); + + LG_COPY_D << "work starting!" << endl; + LG_COPY_D << "srcURL:" << srcURL << endl; + LG_COPY_D << "dstURL:" << dstURL << endl; + LG_COPY_D << "About to read source context..." << endl; + } + + void + FerrisCopy::workComplete() + { + } + + string + FerrisCopy::dirname( fh_context ctx, string s ) + { + std::string n = ctx->getLastPartOfName( s ); + return s.substr( 0, s.length() - n.length() - 1 ); + } + + bool + FerrisCopy::ShouldEnterContext(fh_context ctx) + { + string earl = dstURL; + if( !RecursiveIsInitial ) + { + earl = ctx->appendToPath( earl, ctx->getDirName() ); + } + + LG_COPY_D << "ctx:" << ctx->getURL() << endl; + LG_COPY_D << "dst parent earl:" << earl << endl; + + fh_context tsrc = ctx; + fh_context tdstparent = Resolve( earl, RESOLVE_PARENT ); + + LG_COPY_D << "+++ should enter ctx:" << ctx->getDirPath() + << " src:" << tsrc->getDirPath() + << " dstURL:" << earl + << " dstparent:" << tdstparent->getDirPath() + << endl; + + if( AttemptToCopyIntoSelf( tsrc, tdstparent ) ) + { + fh_stringstream ss; + ss << "Attempt to copy into self"; + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + tostr(ss) ); + LG_COPY_D << "ShouldEnterContext() failing..." << endl; + cerr << "ShouldEnterContext() failing..." << endl; + return false; + } + + LG_COPY_D << "ShouldEnterContext() is true, src:" << tsrc->getDirPath() << endl; + return true; + } + + void + FerrisCopy::EnteringContext(fh_context ctx) + { + bool wasInitialCall = RecursiveIsInitial; + + if( RecursiveIsInitial ) + { + RecursiveIsInitial = false; + } + else + { + dstURL = ctx->appendToPath( dstURL, ctx->getDirName() ); + } + + src = ctx; + priv_setSrcContext( src, wasInitialCall ); + priv_setDstContext( dstURL, wasInitialCall ); + LG_COPY_D << "EnteringContext() ctx:" << ctx->getDirPath() + << " src:" << src->getDirPath() + << " dstURL:" << dstURL + << " dstparent:" << dstparent->getDirPath() + << endl; + perform_copy(); + } + + void + FerrisCopy::LeavingContext(fh_context ctx) + { +// dstURL = ctx->appendToPath( dstURL, ctx->getDirName() ); + LG_COPY_D << "START exit ctx:" << ctx->getDirPath() << " dstURL:" << dstURL << endl; + + bool isDir = toint( getStrAttr( ctx, "is-dir", "0" ) ); + + if( isDir ) + { + src = ctx; + dst = Resolve( dstURL ); + PreserveEA( "mode" ); + } + if( isDir && DstAttr.empty() ) + { + src = ctx; + dst = Resolve( dstURL ); + LG_COPY_D << "Leaving dir... " << endl + << " src:" << src->getURL() << endl + << " dstp:" << dstparent->getURL() << endl + << " dst:" << dst->getURL() << endl + << " getDstName():" << getDstName() + << " PreserveMTime:" << PreserveMTime + << " PreserveATime:" << PreserveATime + << endl; + if( PreserveMTime ) PreserveEA( "mtime" ); + if( PreserveATime ) PreserveEA( "atime" ); + } + + dstURL = dirname( ctx, dstURL ); + LG_COPY_D << "DONE exit ctx:" << ctx->getDirPath() << " dstURL:" << dstURL << endl; + } + + void + FerrisCopy::ShowAttributes( fh_context ctx ) + { + dstURL = ctx->appendToPath( dstURL, ctx->getDirName() ); + + fh_context src = ctx; + priv_setSrcContext( src, false ); + priv_setDstContext( dstURL, false ); + LG_COPY_D << "FerrisCopy::ShowAttributes() src:" << src->getURL() + << " dstURL:" << dstURL + << " dstparent:" << dstparent->getURL() + << endl; + perform_copy(); + dstURL = dirname( ctx, dstURL ); + } + + void + FerrisCopy::PrintEA( int i, const std::string& attr, const std::string& EA ) + { + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + void + FerrisCopy::priv_setSrcContext( fh_context c, bool isInitial ) + { + src = c; +// cerr << "priv_setSrcContext() old src:" << srcURL << endl; + srcURL = src->getURL(); +// cerr << "priv_setSrcContext() clean src:" << srcURL << endl; + } + + void + FerrisCopy::priv_setDstContext( const string& _dstURL, bool isInitial ) + { + dstURL = _dstURL; + LG_COPY_D << "About to read destination context...dstURL:" << dstURL << endl; + + if( MakeSoftLinksForNonDirs || MakeHardLinksForNonDirs ) + { + if( toType(getEA( src, "is-dir", "0" ))) + { + return; + } + } + + if( DstAttr.length() ) + { + dstparent = Resolve( dstURL ); + } + else + { + LG_COPY_D << "Resolve parent of url:" << dstURL << endl; + dstparent = Resolve( dstURL, RESOLVE_PARENT ); + LG_COPY_D << "Resolve parent, got dstparent:" + << dstparent->getURL() << endl; + } + } + + FerrisCopy::CopyPorgressSignal_t& + FerrisCopy::getCopyPorgressSignal() + { + return CopyPorgressSignal; + } + + FerrisCopy::CopyStartSignal_t& + FerrisCopy::getCopyStartSignal() + { + return CopyStartSignal; + } + + FerrisCopy::CopyEndSignal_t& + FerrisCopy::getCopyEndSignal() + { + return CopyEndSignal; + } + + + + /* + * return true if we are trying to copy into ourself. + */ + bool + FerrisCopy::AttemptToCopyIntoSelf( fh_context src, fh_context dstparent ) + { + LG_COPY_D << "AttemptToCopyIntoSelf() CopyIntoSelfTests:" << CopyIntoSelfTests << endl; + + + /* + * Assume that the user is not smoking crack. This could get them into + * big problems when the system has many symlinks and they are not 100% + * sure that the src != transative.parent( dst ) + */ + if( !CopyIntoSelfTests ) + { + return false; + } + + /** + * Make sure that the src != any of the destination parent directories. + */ + if( src->getIsNativeContext() && dstparent->getIsNativeContext() ) + { + string srcdev = getStrAttr( src, "dontfollow-device", "" ); + string srcinode = getStrAttr( src, "dontfollow-inode", "" ); + fh_context d = dstparent; + while( d ) + { + string dev = getStrAttr( d, "dontfollow-device", "" ); + string inode = getStrAttr( d, "dontfollow-inode", "" ); + + if( srcdev == dev && !dev.empty() + && srcinode == inode && !inode.empty() ) + { + return true; + } + + if( d->isParentBound() ) + d = d->getParent(); + else + break; + } + } + + + string realsrc = getStrAttr( src, "realpath", "" ); + string realdst = getStrAttr( dstparent, "realpath", "" ); + + LG_COPY_D << "AttemptToCopyIntoSelf() " + << " DstIsDirectory:" << DstIsDirectory + << " SrcIsDirectory:" << SrcIsDirectory + << " src:" << src->getURL() + << " dst:" << dstparent->getURL() + << " realsrc:" << realsrc + << " realdst:" << realdst + << " startwith:" << starts_with( realdst, realsrc ) + << endl; + + if( realsrc.empty() || realdst.empty() ) + { + bool attemptRecursiveCopy = false; + + if( realsrc.empty() && src->getIsNativeContext() ) + { + if( getStrAttr( src, "link-target-relative", "" ).empty() ) + { + attemptRecursiveCopy = true; + } + } + if( realdst.empty() && dstparent->getIsNativeContext() ) + { + if( dstparent->getOverMountContext() != dynamic_cast(GetImpl(dstparent))) + { + } + else + { + attemptRecursiveCopy = true; + } + } + + if( attemptRecursiveCopy ) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "error getting real paths" ); + return true; + } + return false; + } + + /* + * We could be in trouble if the src is a prefix of the destination + */ + if( starts_with( realdst, realsrc ) ) + { + /* + * preserving links of sources is ok + */ + if( FollowOnlyForSrcUrl || DontFollowLinks ) + { + if( toint( getEA( src, "is-link", "0" ))) + { + return false; + } + } + + /* + * Assume this is a prefix. + */ +// return true; + } + + return false; + } + + + void + FerrisCopy::perform_copy() + { + try + { + LG_COPY_D << "perform_copy(top)" << endl; + + if( AttemptToCopyIntoSelf( src, dstparent ) ) + { + LG_COPY_D << "perform_copy() AttemptToCopyIntoSelf is true, src:" << getSourceDescription() << endl; + fh_stringstream ss; + ss << "Attempt to copy into self"; + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + tostr(ss) ); + return; + } + + if( OneFileSystem ) + { + dev_t d = toType(getEA( src, "device", "0" )); + if( CurrentFileSystemDev != d ) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "Attempt to move to a different filesystem" ); + return; + } + } + LG_COPY_D << "perform_copy(2)" << endl; + + if( MakeSoftLinksForNonDirs || MakeHardLinksForNonDirs ) + { + if( toType(getEA( src, "is-dir", "0" ))) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "omitting directory" ); + return; + } + } + + LG_COPY_D << "perform_copy(3)" << endl; + LG_COPY_D << "dstparent isBound: " << isBound( dstparent ) << endl; + LG_COPY_D << "dstparent path: " << dstparent->getDirPath() << endl; + + /* + * Some checks on the destination + */ + if( DstAttr.length() ) + { + if( Interactive || UpdateMode ) + { + try + { + fh_attribute attr = dstparent->getAttribute( DstAttr ); + + if( !getAskReplaceAttributeSignal().emit( + *this, src, dst, + getSourceDescription(), + getDestinationDescription( dstparent ), + attr )) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "skipping" ); + return; + } + } + catch(...) + {} + } + if( !backupMaker.impotent() ) + { + try + { + fh_attribute attr = dstparent->getAttribute( DstAttr ); + backupMaker( attr ); + } + catch(...) + {} + } + + dstparent->acquireAttribute( DstAttr ); + dst = dstparent; + } + else + { + string rdn = getDstName(); + LG_COPY_D << "copying to context dstparent:" << dstparent->getURL() + << " rdn:" << rdn + << endl; + if( dstparent->isSubContextBound( rdn ) ) + { + fh_context c = dstparent->getSubContext( rdn ); + int isDir = toint(getStrAttr( c, "is-dir", "0" )); + + LG_COPY_D << "copying to existing c:" << c->getURL() + << " running checks isDir:" << isDir << endl; + + /* + * We need to run some extra checks and code if the destination + * already exists. We check again if the subcontext is bound + * because if the destination was a dir, then dstparent will + * have changed. + */ + if( !isDir || dstparent->isSubContextBound( rdn ) ) + { + if( !isDir ) + { + if( Interactive ) + { + fh_context dst = dstparent->getSubContext( rdn ); + + LG_COPY_D << "calling getAskReplaceContextSignal() emit" << endl; + LG_COPY_D << " srcdesc:" << getSourceDescription() + << " dstdesc:" << getDestinationDescription( dst ) + << endl; + + if( !getAskReplaceContextSignal().emit( + *this, src, dst, + getSourceDescription(), + getDestinationDescription( dst ) )) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "skipping" ); + return; + } + } + if( !backupMaker.impotent() ) + { + fh_context c = dstparent->getSubContext( rdn ); + backupMaker( c ); + } + + if( UpdateMode ) + { + fh_context dc = dstparent->getSubContext( rdn ); + time_t srctt = toType(getEA( src, "mtime", "-1" )); + time_t dsttt = toType(getEA( dc, "mtime", "-1" )); + + if( srctt == -1 || dsttt == -1 ) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "skipping" ); + return; + } + if( srctt <= dsttt ) + { + getSkippingContextSignal().emit( + *this, + getSourceDescription(), + "src not newer, skipping" ); + return; + } + } + } + + /* + * We only try to keep file/dir objects around if the src and + * dst are the same type. + */ + bool RemoveDst = false; + { + fh_context c = dstparent->getSubContext( rdn ); + string isf = "is-file"; + string isd = "is-dir"; + + if( getEA( src, isf, "" ) != getStrAttr( c, isf, "" ) || + getEA( src, isd, "" ) != getStrAttr( c, isd, "" ) ) + { + RemoveDst = true; + } + } + + LG_COPY_D << "About to maybe remove dst." + << " dstparent:" << dstparent->getURL() + << " rdn:" << rdn + << " RemoveDst:" << RemoveDst + << " ForceRemovePremptively:" << ForceRemovePremptively + << " src.file:" << getEA( src, "is-file", "" ) + << " src.dir:" << getEA( src, "is-dir", "" ) + << " dst.file:" << getStrAttr( src, "is-file", "" ) + << " dst.dir:" << getStrAttr( src, "is-dir", "" ) + << endl; + + if( ForceRemovePremptively || RemoveDst ) + { + dstparent->remove( rdn ); +// CreateObj( dstparent, rdn ); + } + } + } + + LG_COPY_D << "Setting dst. rdn:" << rdn + << " dstparent:" << dstparent->getURL() + << endl; + + if( dstparent->isSubContextBound( rdn ) ) + { + dst = dstparent->getSubContext( rdn ); + } + else + { + fh_context dc = CreateObj( dstparent, rdn ); + dst = dc; + } + } + + LG_COPY_D << "perform_copy() checking self copy" << endl; + + { + fh_attribute realdst; + if( DstAttr.length() ) + { + if( DstAttrNoCreate ) + realdst = dst->getAttribute( DstAttr ); + else + realdst = dst->acquireAttribute( DstAttr ); + } + else + { + realdst = dst->toAttribute(); + } + + + LG_COPY_D << "cp " << getSourceDescription() + << " to " << getDestinationDescription() << nl; + + if( Verbose ) + { + getCopyVerboseSignal().emit( *this, src, dst, + getSourceDescription(), + getDestinationDescription() ); + } + + + /* + * do we need to copy any bytes: make sure we + * follow links working out of the source has content. + */ + bool CopyFileBytes = toType(getEA( src, "is-file", "0" )); + if( FlattenSpecialToFile ) + { + CopyFileBytes = !toType(getEA( src, "is-dir", "0" )); + } + if( !src->isAttributeBound( "is-file" ) ) + { +// CopyFileBytes = true; + CopyFileBytes = isFalse(getEA( src, "is-dir", "1" )); + } + LG_COPY_D << "src.is-file:" << toType(getEA( src, "is-file", "0" )) << endl; + LG_COPY_D << "CopyFileBytes:" << CopyFileBytes << endl; + + + if( CopyFileBytes ) + { + m_DestinationFDCache = 0; + + LG_COPY_D << "destination is common file:" + << realdst->getDirPath() << endl; + + if( src && dst ) + { + // + // Give the destination context a chance to perform specific + // extra tasks knowing what the source is. + // eg. webphoto classes might want to update online tags from + // the source image. + // + LG_WEBPHOTO_D << "Setting ferris-pre-copy-action for dst:" << dst->getURL() + << " the source is:" << src->getURL() + << endl; + setStrAttr( dst, "ferris-pre-copy-action", + src->getURL(), false, false ); + } + +// /////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////// +// /////////////////////////////////////////////////////// +// /// FIXME: TESTING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// { +// std::streamsize inputsz = toType(getEA( src, "size", "-1" )); +// fh_ostream oss = OpenDestination( realdst, inputsz ); +// // fh_ifstream iss( "/home/ben/Documents/small-video-test.mp4" ); +// fh_ifstream iss( "/tmp/medium-test-image.jpg" ); + + +// oss = copyTo( +// iss, oss, +// toType( getEA( src, "block-size", "4096" )), +// toType( getEA( src, "size", "-1" ))); + +// oss << flush; +// exit(0); +// } + + + std::streamsize inputsz = toType(getEA( src, "size", "-1" )); + fh_ostream oss = OpenDestination( realdst, inputsz ); + oss = WrapForHoles( src, oss ); + + if( SrcAttr.length() ) + { + fh_attribute attr = src->getAttribute( SrcAttr ); + fh_istream iss = attr->getIStream(); + oss = copyTo( iss, oss ); + } + else + { + ferris_ios::openmode imode = ios::in; + + bool canUseSendfile = false; +// if( m_useSendfileIfPossible ) +// { +// if( src->getIsNativeContext() && +// dst->getIsNativeContext() ) +// { +// canUseSendfile = true; +// } +// } + +// if( canUseSendfile ) +// { +// off_t offset = 0; +// size_t bytesToCopyInOneCall = m_sendfileChunkSize; +// ssize_t bytesDone = 0; +// ssize_t sz = -1; + +// int in_fd = open( src->getDirPath().c_str(), +// O_LARGEFILE | O_RDONLY ); +// int out_fd = open( dst->getDirPath().c_str(), +// O_LARGEFILE | O_TRUNC | O_WRONLY ); + +// while( bytesDone < inputsz ) +// { +// sz = sendfile( out_fd, in_fd, +// &offset, +// bytesToCopyInOneCall ); +// if( sz < 0 ) +// { +// int eno = errno; +// stringstream ss; +// ss << "Error copying with sendfile(2) src:" << src->getURL() +// << " to dst:" << dst->getURL() +// << endl; +// cerr << ss.str() << endl; +// cerr << " in_fd:" << in_fd << endl; +// cerr << " out_fd:" << out_fd << endl; +// cerr << "bytesToCopyInOneCall:" << bytesToCopyInOneCall << endl; +// cerr << "eno:" << eno << endl; +// ThrowFromErrno( eno, ss.str(), 0 ); +// } + +// getCopyPorgressSignal().emit( *this, +// bytesDone, +// bytesToCopyInOneCall, +// inputsz ); + +// bytesDone += sz; +// } + +// cerr << "sendfile(2) copy complete" +// << " bytesDone:" << bytesDone +// << " inputsz:" << inputsz +// << endl; +// if( bytesDone != inputsz ) +// { +// stringstream ss; +// ss << "Final bytes copied count is incorrect." +// << " Wanted:" << inputsz +// << " But really copied:" << bytesDone +// << "\n Copying with sendfile(2) src:" << src->getURL() +// << " to dst:" << dst->getURL() +// << endl; +// Throw_CopyFailed( ss.str(), 0 ); +// } +// } +// else + + { + bool inInMMap = InputInMemoryMappedMode; + if( AutoInputInMemoryMappedModeSize ) + inInMMap |= inputsz > AutoInputInMemoryMappedModeSize; + + if( inInMMap ) + { + LG_COPY_D << "Turning on memory mapping for input file:" + << src->getURL() << endl; + imode |= ferris_ios::o_mmap; + imode |= ferris_ios::o_mseq; + } + + LG_COPY_D << "copying bytes from src:" << src->getDirPath() << endl; + fh_istream iss = src->getIStream( imode ); + oss = copyTo( + iss, oss, + toType( getEA( src, "block-size", "4096" )), + toType( getEA( src, "size", "-1" ))); + oss << flush; + } + + if( perform_fsyncAfterEachFile ) + { + int fd = open( dst->getDirPath().c_str(), O_WRONLY | O_LARGEFILE, S_IRWXU ); + if( fd == -1 ) + { + string es = errnum_to_string( "", errno ); + cerr << "open for fsync failed... reason:" << es << endl; + } + if( fd > 0 ) + { + if( -1 == fsync( fd ) ) + { + string es = errnum_to_string( "", errno ); + cerr << "fsync failed... reason:" << es << endl; + } + close( fd ); + } + } + } + +// /* Maybe read from an attribute not a context */ +// fh_attribute realsrc = src->toAttribute(); +// if( SrcAttr.length() ) +// { +// realsrc = src->getAttribute( SrcAttr ); +// } +// oss = realsrc->copyTo( oss ); + + if( m_DestinationFDCache ) + { + close( m_DestinationFDCache ); + m_DestinationFDCache = 0; + } + } + } + + PreserveEA(); + } + catch( FerrisCreateSubContextFailed& e ) + { + LG_COPY_D << "FerrisCreateSubContextFailed exception& e:" << e.what() << endl; + throw; + } + + catch (FerrisParentNotSetError& e) + { + LG_COPY_D << "pns exception& e:" << e.what() << endl; + throw; + } + catch( AttributeNotWritable& e) + { + LG_COPY_D << "anw exception& e:" << e.what() << endl; + throw; + } + catch( CanNotGetStream& e ) + { + LG_COPY_D << "ngs exception& e:" << e.what() << endl; + throw; + } + catch( NoSuchSubContext& e ) + { + LG_COPY_D << "no such sub exception& e:" << e.what() << endl; + throw; + } + catch( exception& e ) + { + LG_COPY_D << "exception& e:" << e.what() << endl; + } + } + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + static void m_AttributeUpdater_NULL( FerrisCopy*, + fh_context, + fh_context, + std::string, + std::string ) + { + } + + void + FerrisCopy::maybeStripTrailingSlashes() + { + if( StripTrailingSlashes ) + { + PostfixTrimmer trimmer; + trimmer.push_back( "/" ); + srcURL = trimmer( srcURL ); + dstURL = trimmer( dstURL ); + } + } + + FerrisCopy::FerrisCopy() + : + SrcAttr(""), + DstAttr(""), + DstAttrNoCreate( false ), + srcURL(""), + dstURL(""), + ForceOverWrite( false ), + ForceRemovePremptively( false ), + Interactive( false ), + Verbose( false ), + UpdateMode( false ), + StripTrailingSlashes( false ), + CopySrcWithParents( false ), + OneFileSystem( false ), + CurrentFileSystemDev( 0 ), + FlattenSpecialToFile( false ), + PreserveObjectMode( false ), + PreserveMTime( false ), + PreserveATime( false ), + PreserveOwner( false ), + PreserveGroup( false ), + MakeSoftLinksForNonDirs( false ), + MakeHardLinksForNonDirs( false ), + FollowOnlyForSrcUrl( false ), + DontFollowLinks( false ), + HoleMode( HOLEMODE_NEVER ), + MakeSoftLinksForNonDirsAbsolute( false ), + Recurse( false ), + Sloth( false ), + CopyIntoSelfTests( true ), + AutoClose( false ), + hadUserInteraction( false ), + DstIsDirectory( false ), + SrcIsDirectory( false ), + DoNotTryToOverMountDst( false ), +// m_AttributeUpdater( SigC::ptr_fun( &m_AttributeUpdater_NULL ) ), + m_AttributeUpdaterInUse( false ), + m_ExplicitSELinuxType( "" ), + m_ExplicitSELinuxContext( "" ), + m_CloneSELinuxContext( 0 ), + m_PrecacheSourceSize( false ), + m_PreserveRecommendedEA( 0 ), + m_PreserveRDFEA( true ), + m_PreserveFerrisTypeEA( true ), + perform_fsyncAfterEachFile( false ), + perform_preallocation( false ), + preallocate_with_fallocate( false ), + preallocate_with_ftruncate( false ), + InputInMemoryMappedMode( + isTrue( getEDBString( FDB_GENERAL, COPY_INPUT_IN_MMAP_MODE_BY_DEFAULT, "0" ))), + AutoInputInMemoryMappedModeSize( + Util::convertByteString( + getEDBString( FDB_GENERAL, COPY_INPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN, "0" ))), + OutputInMemoryMappedMode( + isTrue( getEDBString( FDB_GENERAL, COPY_OUTPUT_IN_MMAP_MODE_BY_DEFAULT, "0" ))), + AutoOutputInMemoryMappedModeSize( + Util::convertByteString( + getEDBString( FDB_GENERAL, COPY_OUTPUT_IN_MMAP_MODE_FOR_OBJECTS_LARGER_THAN, "0" ))), + m_useSendfileIfPossible( + Util::convertByteString( + getEDBString( FDB_GENERAL, USE_SENDFILE_IF_POSSIBLE, "0" ))), + m_sendfileChunkSize( + Util::convertByteString( + getEDBString( FDB_GENERAL, SENDFILE_CHUNK_SIZE, "262144" ))), + TotalBytesCopied( 0 ), + TotalBytesToCopy( 0 ) +// OutputInDirectMode( false ), +// AutoOutputInDirectModeSize( 0 ) + { + if( m_sendfileChunkSize < 4096 ) + m_sendfileChunkSize = 262144; + + setCloneSELinuxContext( 0 ); + backupMaker.setMode( Util::BackupMaker::MODE_NONE ); + } + + bool + FerrisCopy::setCopyIntoSelfTests( bool v ) + { + CopyIntoSelfTests = v; + return CopyIntoSelfTests; + } + + bool + FerrisCopy::setFSyncAfterEachFile( bool v ) + { + perform_fsyncAfterEachFile = v; + } + + bool + FerrisCopy::setPreallocateWith_fallocate( bool v ) + { + perform_preallocation |= v; + preallocate_with_fallocate = v; + } + + bool + FerrisCopy::setPreallocateWith_ftruncate( bool v ) + { + perform_preallocation |= v; + preallocate_with_ftruncate = v; + } + + + void + FerrisCopy::setRecurse( bool v ) + { + Recurse = v; + } + + void + FerrisCopy::setSloth( bool v ) + { + Sloth = v; + } + + void + FerrisCopy::setAutoClose( bool v ) + { + AutoClose = v; + } + + + + void + FerrisCopy::setHoleMode( HoleMode_t m ) + { + HoleMode = m; + } + + void + FerrisCopy::setPreserveAttributeList( const std::string& v ) + { +// cerr << "setPreserveAttributeList() v:" << v << endl; + istringstream iss( v ); + string x; + while(getline( iss, x, ',' )) + { + PreserveAttributeList.push_back( x ); + } + } + + void + FerrisCopy::setFollowOnlyForSrcUrl( bool v ) + { + FollowOnlyForSrcUrl = v; + } + + void + FerrisCopy::setDontFollowLinks( bool v ) + { + DontFollowLinks = v; + } + + void + FerrisCopy::setMakeSoftLinksForNonDirsAbsolute( bool v ) + { + MakeSoftLinksForNonDirsAbsolute = v; + } + + void + FerrisCopy::setMakeSoftLinksForNonDirs( bool v ) + { + MakeSoftLinksForNonDirs = v; + } + + void + FerrisCopy::setMakeHardLinksForNonDirs( bool v ) + { + MakeHardLinksForNonDirs = v; + } + + void + FerrisCopy::setPreserveMTime( bool v ) + { + PreserveMTime = v; + } + + void + FerrisCopy::setPreserveATime( bool v ) + { + PreserveATime = v; + } + + void + FerrisCopy::setPreserveOwner( bool v ) + { + PreserveOwner = v; + } + + void + FerrisCopy::setPreserveGroup( bool v ) + { + PreserveGroup = v; + } + + void + FerrisCopy::setPreserveObjectMode( bool v ) + { + PreserveObjectMode = v; + } + + void + FerrisCopy::setFlattenSpecialToFile( bool v ) + { + FlattenSpecialToFile = v; + } + + + void + FerrisCopy::setBackupMaker( const Util::BackupMaker& b ) + { + backupMaker = b; + } + + void + FerrisCopy::setBackupSuffix( const std::string& s ) + { + backupMaker.setMode( Util::BackupMaker::MODE_SIMPLE ); + backupMaker.setSuffix( s ); + } + + void + FerrisCopy::setExplicitSELinuxContext( const std::string& s ) + { + m_ExplicitSELinuxContext = s; + } + + void + FerrisCopy::setExplicitSELinuxType( const std::string& s ) + { + m_ExplicitSELinuxType = s; + } + + void + FerrisCopy::setCloneSELinuxContext( bool v ) + { + m_CloneSELinuxContext = v; + } + + void + FerrisCopy::setPrecacheSourceSize( bool v ) + { + m_PrecacheSourceSize = v; + } + + bool + FerrisCopy::shouldPrecacheSourceSize() + { + return m_PrecacheSourceSize; + } + + void + FerrisCopy::setPreserveRecommendedEA( bool v ) + { + m_PreserveRecommendedEA = v; + } + + void + FerrisCopy::setPreserveRDFEA( bool v ) + { + m_PreserveRDFEA = v; + } + + void + FerrisCopy::setPreserveFerrisTypeEA( bool v ) + { + m_PreserveFerrisTypeEA = v; + } + + + void + FerrisCopy::setPerformBackups( const std::string& s ) + { + backupMaker.setMode( s ); + } + + void + FerrisCopy::setOneFileSystem( bool v ) + { + OneFileSystem = v; + CurrentFileSystemDev = 0; + } + + void + FerrisCopy::setForceOverWrite( bool v ) + { + ForceOverWrite = v; + } + + void + FerrisCopy::setForceRemovePremptively( bool v ) + { + ForceRemovePremptively = v; + } + + void + FerrisCopy::setVerbose( bool v ) + { + Verbose = v; + } + + void + FerrisCopy::setStripTrailingSlashes( bool v ) + { + StripTrailingSlashes = v; + maybeStripTrailingSlashes(); + } + + void + FerrisCopy::setCopySrcWithParents( bool v ) + { + CopySrcWithParents = v; + } + + void + FerrisCopy::setInteractive( bool v ) + { + Interactive = v; + } + + void + FerrisCopy::setUpdateMode( bool v ) + { + UpdateMode = v; + } + + void + FerrisCopy::setSrcAttr( const string& s ) + { + SrcAttr = s; + } + + void + FerrisCopy::setDstAttr( const string& s ) + { + DstAttr = s; + } + + void + FerrisCopy::setDstAttrNoCreate( bool v ) + { + DstAttrNoCreate = v; + } + + void + FerrisCopy::setSrcURL( const string& s ) + { + srcURL = s; + maybeStripTrailingSlashes(); + LG_COPY_D << "setSrcURL() have:" << srcURL << endl; + } + + void + FerrisCopy::setDstURL( const string& s ) + { + dstURL = s; + dstURL_setByUser = s; + maybeStripTrailingSlashes(); + LG_COPY_D << "setDstURL() have:" << dstURL << endl; + } + + void + FerrisCopy::setDstIsDirectory( bool v ) + { + DstIsDirectory = v; + } + + void + FerrisCopy::setSrcIsDirectory( bool v ) + { + SrcIsDirectory = v; + } + + void + FerrisCopy::setDoNotTryToOverMountDst( bool v ) + { + DoNotTryToOverMountDst = v; + } + + + void + FerrisCopy::setInputInMemoryMappedMode( bool v ) + { + InputInMemoryMappedMode = v; + } + + void + FerrisCopy::setAutoInputInMemoryMappedModeSize( std::streamsize v ) + { + AutoInputInMemoryMappedModeSize = v; + } + + void + FerrisCopy::setOutputInMemoryMappedMode( bool v ) + { + OutputInMemoryMappedMode = v; + } + + void + FerrisCopy::setAutoOutputInMemoryMappedModeSize( std::streamsize v ) + { + AutoOutputInMemoryMappedModeSize = v; + } + + void + FerrisCopy::setUseSendfileIfPossible( bool v ) + { + m_useSendfileIfPossible = v; + } + + void + FerrisCopy::setSendfileChunkSize( long v ) + { + m_sendfileChunkSize = v; + } + + FerrisCopy::m_AttributeUpdater_t& + FerrisCopy::getAttributeUpdaterSignal() + { + m_AttributeUpdaterInUse = true; + return m_AttributeUpdater; + } + +// void +// FerrisCopy::setOutputInDirectMode( bool v ) +// { +// OutputInDirectMode = v; +// } + +// void +// FerrisCopy::setAutoOutputInDirectModeSize( std::streamsize v ) +// { +// AutoOutputInDirectModeSize = v; +// } + + + string + FerrisCopy::getDstName() + { + string rdn = dstparent->getLastPartOfName( dstURL ); +// if( string::npos != dstURL.rfind( "/" ) ) +// { +// rdn = dstURL.substr( dstURL.rfind( "/" )+1 ); +// } + + LG_COPY_D << "getDstName() dstURL:" << dstURL + << " rdn:" << rdn + << endl; + return rdn; + } + + fh_iostream + FerrisCopy::OpenDestination( fh_attribute& realdst, + std::streamsize inputsz, + bool firstcall ) + { + fh_iostream ret; + try + { + LG_COPY_D << "FerrisCopy::OpenDestination() realdst:" << realdst->getDirPath() << endl; + + /* + * open the target iostream taking into account any flags + * that the user may have set effecting the output file + */ + ferris_ios::openmode m = ios::out | ios::trunc; + + bool outInMMap = OutputInMemoryMappedMode; + if( AutoOutputInMemoryMappedModeSize ) + outInMMap |= inputsz > AutoOutputInMemoryMappedModeSize; + + LG_COPY_D << "FerrisCopy::OpenDestination() DstAttr:" << DstAttr + << " outInMMap:" << outInMMap << endl; + + if( DstAttr.empty() && outInMMap ) + { + LG_COPY_D << "Turning on memory mapping for output file:" + << src->getURL() << endl; + m |= ferris_ios::o_mmap; + m |= ferris_ios::o_mseq; + + LG_COPY_D << "Testing if we can trunc the output file to" + << "the size of the input file to improve speed" + << " dst:" << dst->getURL() + << " is-native:" << getStrAttr( dst, "is-native", "0" ) + << " inputsize:" << inputsz + << endl; + // + // It will help performance greatly to trunc the output file to the + // desired size right off the bat + // + if( isTrue( getStrAttr( dst, "is-native", "0" ))) + { + int rc = truncate( dst->getDirPath().c_str(), inputsz ); + if( rc ) + { + int en = errno; + fh_stringstream ss; + ss << "Failed to set the output file to the input file size:" << inputsz + << " src:" << getSourceDescription() + << " dst:" << getDestinationDescription() + << endl; + ThrowFromErrno( en, tostr(ss) ); + } + + // Dont retruncate the output file we just created + if( m & ios::trunc ) + m ^= ios::trunc; + } + } + + LG_COPY_D << "DstAttr.empty():" << DstAttr.empty() << endl; + LG_COPY_D << "outInMMap:" << outInMMap << endl; + + // + // try to preallocate the file bytes. + // + if( perform_preallocation && DstAttr.empty() && !outInMMap ) + { + LG_COPY_D << "is native:" << isTrue( getStrAttr( dst, "is-native", "0" )) << endl; + + if( isTrue( getStrAttr( dst, "is-native", "0" ))) + { + LG_COPY_D << "dst:" << dst->getDirPath().c_str() << endl; + + int fd = open( dst->getDirPath().c_str(), + O_WRONLY | O_CREAT| O_LARGEFILE | O_TRUNC, S_IRWXU ); + if( fd == -1 ) + { + string es = errnum_to_string( "", errno ); + LG_COPY_D << "open for preallocation failed... reason:" << es << endl; + cerr << "open for preallocation failed... reason:" << es << endl; + } + if( fd > 0 ) + { + if( preallocate_with_fallocate ) + { + cerr << "have fd, tring to fallocate()" << endl; + long rc = posix_fallocate( fd, 0, inputsz ); + cerr << "fallocate() rc:" << rc << endl; + if( rc ) + { + string es = errnum_to_string( "", errno ); + LG_COPY_W << "failed to preallocate space for file copy, fragmentation might result." << endl + << " reason:" << es + << endl; + cerr << "failed to preallocate space for file copy, fragmentation might result." << endl + << " reason:" << es + << endl; + } + } + if( preallocate_with_ftruncate ) + { + int rc = ftruncate( fd, inputsz ); + if( rc == -1 ) + { + string es = errnum_to_string( "", errno ); + LG_COPY_W << "failed to preallocate space for file copy with ftruncate, fragmentation might result." << endl + << " reason:" << es + << endl; + cerr << "failed to preallocate space for file copy with ftruncate, fragmentation might result." << endl + << " reason:" << es + << endl; + } + } + posix_fadvise( fd, 0, inputsz, POSIX_FADV_SEQUENTIAL | POSIX_FADV_DONTNEED); + // closed via +// m_DestinationFDCache = fd; + close( fd ); + } + } + } + +// if( OutputInDirectMode ) +// m |= ferris_ios::o_direct; + +// if( inputsz > AutoOutputInDirectModeSize ) +// { +// m |= ferris_ios::o_direct; +// } + +// cerr << "FerrisCopy::OpenDestination() dst:" << realdst->getDirPath() +// << " mode:" << int(m) +// << " r:" << ios::in +// << " w:" << ios::out +// << " t:" << ios::trunc +// << endl; + + if( DstAttr.empty() ) + { + int newmode = S_IWUSR | S_IRUSR | S_IXUSR; + + LG_COPY_D << "FerrisCopy::OpenDestination() no dstattr. setting mode." << endl; + LG_COPY_D << "FerrisCopy::OpenDestination() dst:" << dst << endl; + LG_COPY_D << "FerrisCopy::OpenDestination() newmode:" << toOctalString(newmode) << endl; + LG_COPY_D << "FerrisCopy::OpenDestination() dst-is-native:" + << dst->getIsNativeContext() << endl; + + try + { + setStrAttr( dst, "mode", toOctalString(newmode), + false, dst->getIsNativeContext() ); + } + catch( exception& e ) + { + LG_COPY_W << "Error setting mode to:" << toOctalString(newmode) + << " for target:" << dst->getURL() + << endl; + } + } + + // + // let the destination file know the source + // in case it wants to perform additional procesisng. + // FIXME: + // + if( DstAttr.empty() ) + { + } + + LG_COPY_D << "FerrisCopy::OpenDestination() getting ostream..." << endl; + ret = realdst->getIOStream( m ); + + } + catch( exception& e ) + { + if( ForceOverWrite && firstcall ) + { + if( DstAttr.length() ) + { + throw e; + } + + fh_context parent = dstparent; + string rdn = getDstName(); + LG_COPY_D << " -f option. realdst:" << realdst->getDirPath() + << " parent:" << parent->getDirPath() + << " rdn:" << rdn + << endl; + + parent->remove( rdn ); + realdst = CreateObj( parent, rdn )->toAttribute(); + return OpenDestination( realdst, inputsz, false ); + } + throw; + } + return ret; + } + + + /** + * Used by GetEA() to not follow for EA + */ + string + FerrisCopy::getEA_DontFollow( fh_context c, const std::string& n, string d ) + { + fh_stringstream ss; + ss << "dontfollow-" << n; + string eaname = tostr(ss); + + LG_COPY_D << "getEA_DontFollow() c:" << c->getURL() + << " n:" << n + << " n.bound:" << c->isAttributeBound( n ) + << " eaname:" << eaname + << " eaname.bound:" << c->isAttributeBound( eaname ) + << endl; + + if( c->isAttributeBound( eaname ) ) + { + return getStrAttr( c, eaname, d ); + } + return getStrAttr( c, n, d ); + } + + /** + * Obtain EA from either the lstat() data or stat() data depending + * on what options the user has set. + * + * Params are the same as for the getStrAttr() function. + */ + string + FerrisCopy::getEA( fh_context c, const std::string& n, string d ) + { + if( FollowOnlyForSrcUrl ) + { + if( srcIsCmdLineParam() ) + { + return getStrAttr( c, n, d ); + } + return getEA_DontFollow( c, n, d ); + } + + if( DontFollowLinks ) + { + return getEA_DontFollow( c, n, d ); + } + return getStrAttr( c, n, d ); + } + + /** + * Returns 1 if the current src is one that was given as setSrcURL() + */ + bool + FerrisCopy::srcIsCmdLineParam() + { + fh_context c = Resolve( srcURL_Root ); + return c->getURL() == srcURL; + } + + fh_context + FerrisCopy::CreateObj( fh_context c, string s ) + { + fh_context ret = priv_CreateObj( c, s ); + if( !m_ExplicitSELinuxContext.empty() ) + { + setStrAttr( ret, + "dontfollow-selinux-context", + m_ExplicitSELinuxContext, + true, true ); + } + if( !m_ExplicitSELinuxType.empty() ) + { + LG_COPY_D << "setting SEType to:" << m_ExplicitSELinuxType << endl; + setStrAttr( ret, + "dontfollow-selinux-type", + m_ExplicitSELinuxType, + true, true ); + } + return ret; + } + + fh_context + FerrisCopy::priv_CreateObj( fh_context c, string s ) + { + LG_COPY_D << "CreateObj() c:" << c->getURL() + << " s:" << s + << endl; + + if( c->isSubContextBound( s ) ) + { + fh_context dc = c->getSubContext( s ); + string srctype = getEA( src, "filesystem-filetype", "" ); + string dsttype = getStrAttr( dc, "filesystem-filetype", "" ); + LG_COPY_D << "CreateObj() dc:" << dc->getURL() + << " srctype:" << srctype + << " dsttype:" << dsttype + << endl; + + /* If the attribute is there then it must be the same for both */ + if( srctype == dsttype ) + { + return dc; + } + } + + if( toType(getEA( src, "is-dir", "0" ))) + { +// fh_mdcontext md = new f_mdcontext(); +// fh_mdcontext child = md->setChild( "dir", "" ); + + static fh_mdcontext md = new f_mdcontext(); + static fh_mdcontext child = md->setChild( "dir", "" ); + md->AddRef(); + child->AddRef(); + child->setChild( "mode", "700" ); + + + child->setChild( "name", s ); + + LG_COPY_D << "Create dir s:" << s << endl; + + if( PreserveObjectMode ) + { +// string modestr = getEA( src, "mode", "-1" ); +// LG_COPY_D << "Create dir mode:" << modestr << endl; +// child->setChild( "mode", modestr); + + int newmode = Factory::MakeInitializationMode( getEA( src, "mode", "0" ) ); + newmode |= S_IWUSR | S_IRUSR | S_IXUSR; + LG_COPY_D << "Create dir mode:" << toOctalString(newmode) << endl; + child->setChild( "mode", toOctalString(newmode) ); + + } + + fh_context newc = c->createSubContext( "", md ); + return newc; + } + + if( MakeSoftLinksForNonDirs || MakeHardLinksForNonDirs ) + { + if( c->isSubContextBound( s ) && ForceOverWrite ) + { + c->remove( s ); + } + } + + if( MakeSoftLinksForNonDirs ) + { + string target = srcURL_Root; + + /* switch modes if the user is doing a -R/-r copy */ + if( srcIsCmdLineParam() ) + { + LG_COPY_D << "making softlinks for recursive mode always" + << " makes absolute links, switching to" + << " --symbolic-link-absolute mode" << endl; + MakeSoftLinksForNonDirsAbsolute = true; + } + if( MakeSoftLinksForNonDirsAbsolute ) + { + target = src->getDirPath(); + } + + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "softlink", "" ); + child->setChild( "name", s ); + child->setChild( "link-target", target ); + + LG_COPY_D << "Create softlink s:" << s + << " c:" << c->getURL() + << " link-target:" << src->getDirPath() + << endl; + fh_context newc = c->createSubContext( "", md ); + return newc; + } + if( MakeHardLinksForNonDirs ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "hardlink", "" ); + child->setChild( "name", s ); + child->setChild( "link-target", src->getDirPath() ); + + LG_COPY_D << "Create hardlink s:" << s + << " link-target:" << src->getDirPath() + << endl; + fh_context newc = c->createSubContext( "", md ); + return newc; + } + + LG_COPY_D << "working out what type of destination file to make" << endl; + if( FlattenSpecialToFile ) + { + LG_COPY_D << "Flatten all non-dirs to a file. s:" << s << endl; + return Shell::CreateFile( c, s ); + } + + string objtype = getEA( src, "filesystem-filetype", "regular file" ); + LG_COPY_D << "objtype:" << objtype << endl; + if( objtype == "unknown" ) + { + /* FIXME: */ + objtype = "regular file"; + } + + LG_COPY_D << "objtype:" << objtype << endl; + if( objtype == "regular file" ) + { + LG_COPY_D << "Create a regular file c:" << c->getURL() + << " name:" << s + << endl; + +// fh_mdcontext md = new f_mdcontext(); +// fh_mdcontext child = md->setChild( "file", "" ); + static fh_mdcontext md = new f_mdcontext(); + static fh_mdcontext child = md->setChild( "file", "" ); + md->AddRef(); + child->AddRef(); + md->AddRef(); + child->AddRef(); + child->setChild( "mode", "600" ); + child->setChild( "preallocate", "" ); + child->setChild( "size", "" ); + + + + + + child->setChild( "name", s ); + if( PreserveObjectMode ) + { + int newmode = Factory::MakeInitializationMode( getEA( src, "mode", "0" ) ); +// cerr << "FCP: New file mode:" << newmode +// << " oct:" << oct << newmode << dec << endl; + newmode |= S_IWUSR | S_IRUSR; +// cerr << "FCP2: New file mode:" << newmode +// << " oct:" << oct << newmode << dec +// << " str:" << tostr(newmode) +// << " Ostr:" << toOctalString(newmode) +// << endl; + + child->setChild( "mode", toOctalString(newmode) ); + } + + string preallocsize = getEA( src, "size", "" ); + if( preallocsize.length() ) + { + child->setChild( "preallocate", preallocsize ); + child->setChild( "size", preallocsize ); + } + + fh_context newc = c->createSubContext( "", md ); + return newc; + } + + LG_COPY_D << "objtype:" << objtype << endl; + if( objtype == "fifo" ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "fifo", "" ); + child->setChild( "name", s ); + if( PreserveObjectMode ) + child->setChild( "mode", getEA( src, "mode", "-1" )); + fh_context newc = c->createSubContext( "", md ); + return newc; + } + + LG_COPY_D << "objtype4:" << objtype << endl; + if( objtype == "symbolic link" ) + { + LG_COPY_D << "Create a symlink for s:" << s << endl; + string target = getEA( src, "link-target-relative", "" ); + if( target.empty() ) + target = getEA( src, "link-target", "" ); + + LG_COPY_D << "target:" << target << endl; + + cerr << "Create a symlink for s:" << s + << " src:" << getSourceDescription() + << " c:" << c->getURL() + << " target:" << target + << " size:" << getEA( src, "size", "-1" ) + << endl; + + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "softlink", "" ); + child->setChild( "name", s ); + child->setChild( "link-target", target ); + fh_context newc = c->createSubContext( "", md ); + return newc; + } + if( toType(getEA( src, "is-special", "0" ))) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "special", "" ); + child->setChild( "name", s ); + child->setChild( "device", getEA( src, "device", "0" )); + if( PreserveObjectMode ) + child->setChild( "mode", getEA( src, "mode", "-1" )); + fh_context newc = c->createSubContext( "", md ); + return newc; + } + + /* FIXME: what to do here! */ + } + + void + FerrisCopy::PreserveEA( const std::string& eaname, + bool tryCreate, + const std::string& ExplicitPluginName ) + { + string s = getEA( src, eaname, "" ); + LG_COPY_D << "PreserveEA() eaname:" << eaname + << " src:" << src->getURL() + << " dst:" << dst->getURL() + << " s:" << s + << endl; + + if( s.length() ) + { + if( tryCreate ) + { +// fh_mdcontext md = new f_mdcontext(); +// fh_mdcontext child = md->setChild( "ea", "" ); +// if( !ExplicitPluginName.empty() ) +// child->setChild( "explicit-plugin-name", ExplicitPluginName ); +// child->setChild( "name", eaname ); +// child->setChild( "value", s ); + +// cerr << "create ea..." << eaname << endl; + static fh_mdcontext md = new f_mdcontext(); + static fh_mdcontext child = md->setChild( "ea", "" ); + md->AddRef(); + child->AddRef(); + md->AddRef(); + child->AddRef(); + child->setChild( "explicit-plugin-name", ExplicitPluginName ); + child->setChild( "name", eaname ); + child->setChild( "value", s ); + + dst->createSubContext( "", md ); + } + setStrAttr( dst, eaname, s, true, true ); + } + } + +// void FerrisCopy::ResetUserNumberEA() +// { +// string eaname = "user-owner-number"; +// fh_stringstream ss; +// ss << getuid(); +// setStrAttr( dst, eaname, tostr(ss) ); +// } + +// void FerrisCopy::ResetGroupNumberEA() +// { +// string eaname = "group-owner-number"; +// fh_stringstream ss; +// ss << getgid(); +// setStrAttr( dst, eaname, tostr(ss) ); +// } + + /** + * Note that mtime and atime should be last and in that order. + */ + void + FerrisCopy::PreserveEA() + { + /* cant do anything for preserving the EA of EA */ + if( !isBound(dst) && DstAttr.length() || SrcAttr.length() ) + return; + + if( src && dst ) + LG_COPY_D << "FerrisCopy::PreserveEA() src:" << src->getURL() + << " dst:" << dst->getURL() + << endl; + + if( src && dst ) + { + // + // Give the destination context a chance to perform specific + // extra tasks knowing what the source is. + // eg. webphoto classes might want to update online tags from + // the source image. + // + LG_WEBPHOTO_D << "Setting ferris-post-copy-action for dst:" << dst->getURL() + << " the source is:" << src->getURL() + << endl; + setStrAttr( dst, "ferris-post-copy-action", + src->getURL(), false, false ); + } + + /* + * We try to change the user even if we are not root to allow + * for future capabilities to be added to the proc for CHOWN + */ + if( PreserveOwner ) + { + string eaname = "user-owner-number"; + string s = getEA( src, eaname, "-1" ); + uid_t u = toType( s ); + if( u != -1 ) + { + bool canChange = Shell::canChangeFileToUser( u ); + if( System::gotRoot() || canChange ) + { + setStrAttr( dst, eaname, s ); + } +// else if( !canChange ) +// { +// ResetUserNumberEA(); +// } + } + } + + LG_WEBPHOTO_D << "TEST1" << endl; + + if( PreserveGroup ) + { + string eaname = "group-owner-number"; + string s = getEA( src, eaname, "-1" ); + gid_t g = toType( s ); + if( g != -1 ) + { + bool canChange = Shell::canChangeFileToGroup( g ); + + LG_COPY_D << "Shell::canChangeFileToGroup( g ) g:" << g + << " ret:" << Shell::canChangeFileToGroup( g ) + << endl; + + if( System::gotRoot() || canChange ) + { + setStrAttr( dst, eaname, s ); + } +// else if( !canChange ) +// { +// ResetGroupNumberEA(); +// } + } + } + + if( m_PreserveFerrisTypeEA ) + { + PreserveEA( "ferris-type",1 ); + } + + if( !PreserveAttributeList.empty() ) + { + typedef PreserveAttributeList_t::iterator ITER; + for( ITER iter = PreserveAttributeList.begin(); + iter != PreserveAttributeList.end(); ++iter ) + { + cerr << "attempt to preserve:" << *iter << endl; + PreserveEA( *iter, 1 ); + } + } + + LG_WEBPHOTO_D << "TEST2" << endl; + + if( m_PreserveRDFEA ) + { + LG_COPY_D << "rdf-ea-names:" << getEA( src, "rdf-ea-names", "" ) << endl; + stringlist_t sl = Util::parseCommaSeperatedList( getEA( src, "rdf-ea-names", "" ) ); + stringlist_t::const_iterator end = sl.end(); + LG_COPY_D << "rdf preserve list sz:" << sl.size() << endl; + + for( stringlist_t::const_iterator si = sl.begin(); si!=end; ++si ) + { + PreserveEA( *si, 1, "rdf" ); + } + } + + LG_COPY_D << "m_PreserveRecommendedEA:" << m_PreserveRecommendedEA << endl; + if( m_PreserveRecommendedEA ) + { + string rea = getStrAttr( src, "recommended-ea", "" ); + LG_COPY_D << "m_PreserveRecommendedEA:" << m_PreserveRecommendedEA + << " rea:" << rea << endl; + stringlist_t sl = Util::parseCommaSeperatedList( getEA( src, "rdf-ea-names", "" ) ); + stringlist_t::const_iterator end = sl.end(); + for( stringlist_t::const_iterator si = sl.begin(); si!=end; ++si ) + { + PreserveEA( *si, 1 ); + } + } + LG_WEBPHOTO_D << "TEST5" << endl; + + // handle the case that the old file is on a local disk which supports + // kernel-ea and the new file is on an NFS share which doesn't by + // downgrading the EA to live in RDF for the new file. + if( DstAttr.empty() ) + { + string xfseanames = getEA( src, "xfs-ea-names", "" ); + LG_COPY_D << "xfs-ea-names:" << xfseanames << endl; + stringlist_t sl = Util::parseCommaSeperatedList( xfseanames ); + LG_COPY_D << "xfs preserve list sz:" << sl.size() << endl; + + // + // If the transfer is + // local-disk -> local-disk + // then the kernel itself will have preserved the EA for us. + // As such a test for the first xfs-ea will tell is that they are already + // copied. + // + // If the transfer is NFS -> local-disk + // then we will have already handled RDF EA above and the remote + // file will not have any kernel-ea attached. + // + // If the transfer is local-disk -> NFS then the xfs-ea will not + // have been preserved and this test will find that the first xfs-ea + // is indeed not already existing for the destination. + // + if( !sl.empty() ) + { + const std::string& ea = sl.front(); + if( !dst->isAttributeBound( ea ) ) + { + // + // The xfs-ea are not already preserved by the kernel + // lets do it ourselves. + // + stringlist_t::const_iterator end = sl.end(); + for( stringlist_t::const_iterator si = sl.begin(); si!=end; ++si ) + { + PreserveEA( *si, 1 ); + } + } + } + } + + LG_WEBPHOTO_D << "TEST6" << endl; + + + // try to preserve the SELinux security context + if( m_CloneSELinuxContext ) + { + string ea = getStrAttr( src, "dontfollow-selinux-context", "" ); + LG_COPY_D << "m_CloneSELinuxContext:" << m_CloneSELinuxContext + << " setting to ea:" << ea << endl; + + if( !ea.empty() ) + { + setStrAttr( dst, "dontfollow-selinux-context", + ea, true, true ); + } + } + + if( m_AttributeUpdaterInUse ) + { + m_AttributeUpdater( this, src, dst, + getSourceDescription(), + getDestinationDescription() ); + } + + LG_WEBPHOTO_D << "TEST7" << endl; + + + /* this is mode_t preserve */ + LG_COPY_D << "PreserveObjectMode:" << PreserveObjectMode << endl; + if( PreserveObjectMode ) + { + LG_COPY_D << "src-is-dir:" << isTrue( getStrAttr( src, "is-dir", "0" ) ) << endl; + + if( !isTrue( getStrAttr( src, "is-dir", "0" ) ) ) + PreserveEA( "mode" ); + } + LG_WEBPHOTO_D << "TEST8" << endl; + + if( PreserveMTime ) PreserveEA( "mtime" ); + if( PreserveATime ) PreserveEA( "atime" ); + } + + + /** + * Depending on the user settings try to make holes in the output file too. + */ + fh_ostream + FerrisCopy::WrapForHoles( fh_context src, fh_ostream ss ) + { + switch( HoleMode ) + { + case HOLEMODE_NEVER: return ss; + case HOLEMODE_HEURISTIC: + if( !toint(getEA( src, "has-holes", "0" ))) + { + return ss; + } + /* fall through */ + case HOLEMODE_ALWAYS: + return Factory::MakeHoleyOStream( + ss, toint(getEA( src, "block-size", "4096" ))); + } + } + + string + FerrisCopy::getSourceDescription() + { + if( SrcAttr.length() ) + { + fh_stringstream ss; + ss << src->getURL() << "@" << SrcAttr << endl; + return tostr(ss); + } + return src->getURL(); + } + + string + FerrisCopy::getDestinationDescription( fh_context c ) + { + if( !isBound(c) ) + { + c = dst; + } + + if( DstAttr.length() ) + { + fh_stringstream ss; + ss << c->getURL() << "@" << DstAttr << endl; + return tostr(ss); + } + return c->getURL(); + } + + + void + FerrisCopy::perform() + { + copy(); + } + + void + FerrisCopy::copy() + { +// TotalBytesCopied = 0; +// TotalBytesToCopy = 0; + + dstURL = dstURL_setByUser; + + LG_COPY_D << "srcURL:" << srcURL << endl; + LG_COPY_D << "dstURL:" << dstURL << endl; + + + src = Resolve( srcURL ); + LG_COPY_D << "dstURL:" << dstURL << endl; + +// /* +// * Should we work out the statistics for the src dir? +// */ +// if( m_PrecacheSourceSize ) +// { +// LG_COPY_D << "Precaching the size and other metadata for the src:" << src->getURL() << endl; +// Ferrisls ls; +// fh_display_aggdata d = createDisplayAggregateData( &ls ); + +// if( isTrue( getStrAttr( src, "is-dir", "0" ))) +// d->ShowAttributes( src ); +// ls.setURL( src->getURL() ); +// ls(); +// const Ferrisls_aggregate_t& data = d->getData( AGGDATA_RECURSIVE ); + +// LG_COPY_D << "total bytes in source:" << Util::convertByteString(data.size) << endl; +// TotalBytesToCopy = data.sizeFilesOnly; +// } + + /* If the destination exists and is a dir, then we want to copy + * into that dir. */ + try + { + fh_context c = Resolve( dstURL ); + + string isDirEAName = "is-dir-try-automounting"; + if( DoNotTryToOverMountDst ) + isDirEAName = "is-dir"; + + if( DstIsDirectory || toType(getEA( c, isDirEAName, "0" ))) + { + LG_COPY_D << "concluded DstIsDirectory. " + << " isDirEAName:" << isDirEAName + << " dstURL:" << dstURL + << " srcURL:" << srcURL + << " src:" << src->getURL() + << " dirname:" << src->getDirName() + << endl; + dstURL = src->appendToPath( dstURL, src->getDirName() ); + } + } + catch( exception& e ) + { + LG_COPY_D << "cought 1:" << e.what() << endl; + } + + LG_COPY_D << "Check onefs:" << OneFileSystem << endl; + if( OneFileSystem ) + { + dev_t d = toType(getEA( src, "device", "0" )); + CurrentFileSystemDev = d; + } + + + LG_COPY_D << "CopySrcWithParents:" << CopySrcWithParents << endl; + /* + * Monster the destination for --parents option. + */ + if( CopySrcWithParents ) + { + if( DstAttr.length() ) + { + dstparent = Resolve( dstURL ); + dstparent = Shell::CreateDir( dstparent, srcURL, 1 ); + } + else + { + dstparent = Resolve( dstURL ); + dstparent = Shell::CreateDir( dstparent, srcURL, 1 ); + dstparent = dstparent->getParent(); + } + dstURL = dstparent->appendToPath( dstURL, srcURL ); + } + + /* update this for link following code */ + srcURL_Root = srcURL; + + LG_COPY_D << "Recurse:" << Recurse << endl; + /* + * + * Start the copy action + * + */ + if( Recurse ) + { + bool shouldReallyRecurse = toint(getEA( src, "is-dir", "0" )); + + LG_COPY_D << "cp-prep1 Recurse:" << Recurse + << " SrcIsDirectory:" << SrcIsDirectory + << " shouldReallyRecurse:" << shouldReallyRecurse + << endl; + + if( SrcIsDirectory ) + { + try + { + src->read(); + shouldReallyRecurse = true; + } + catch( ... ) + {} + } + + LG_COPY_D << "cp-prep2 Recurse:" << Recurse + << " SrcIsDirectory:" << SrcIsDirectory + << " DontFollowLinks:" << DontFollowLinks + << " shouldReallyRecurse:" << shouldReallyRecurse + << endl; + + /* + * The other posibility is if we are starting on a link an it + * is ok to follow cmd line softlinks. + */ + if( !DontFollowLinks && !shouldReallyRecurse ) + { + shouldReallyRecurse |= toint(getEA( src, "dontfollow-is-link", "0" )); + } + + if( shouldReallyRecurse ) + { + LG_COPY_D << "cp-prep3 Recurse:" << Recurse + << " SrcIsDirectory:" << SrcIsDirectory + << " DontFollowLinks:" << DontFollowLinks + << " shouldReallyRecurse:" << shouldReallyRecurse + << " srcURL:" << srcURL + << endl; + + ls.setDisplay( this ); + ls.setURL( srcURL ); + ls.setRecursiveList( true ); + ls.setDontFollowLinks( DontFollowLinks ); + ls(); + return; + } + + /* Fall through for copying a file/special object */ + } + + /* Normal single obj -> single object copy */ + priv_setSrcContext( src ); + priv_setDstContext( dstURL ); + + LG_COPY_D << "About to perform_copy()" + << " src:" << src->getURL() << endl + << " dstURL:" << dstURL << endl; + perform_copy(); + LG_COPY_D << "perform_copy() complete!" + << " src:" << src->getURL() << endl + << " dstURL:" << dstURL << endl; + } + + std::streamsize + FerrisCopy::getTotalBytesCopied() + { + return TotalBytesCopied; + } + std::streamsize + FerrisCopy::getTotalBytesToCopy() + { + return TotalBytesToCopy; + } + gdouble + FerrisCopy::getTotalPercentageOfBytesCopied() + { + return getTotalBytesCopied() * 1.0/ getTotalBytesToCopy(); + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + ContextPopTableCollector::ContextPopTableCollector() + { + reset(); + } + + + void ContextPopTableCollector::poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + const string key = opt->longName; + LG_COPY_D << "poptCallback() key:" << key << " -a" << ArchiveMode << endl; + } + + void ContextPopTableCollector::reset() + { + DstNameCSTR = 0; + SrcAttr = ""; + DstAttr = ""; + BackupSuffix = 0; + PerformBackupsWithMode = 0; + HoleCreation = 0; + PreserveAttributeList = 0; + ExplicitSELinuxType = 0; + ExplicitSELinuxContext = 0; + CloneSELinuxContext = 0; + PrecacheSourceSize = 0; + DontPrecacheSourceSize = 0; + PreserveRecommendedEA = 0; + DontPreserveRDFEA = 0; + DontPreserveFerrisTypeEA = 0; + Force = 0; + ForceRemovePremptively = 0; + Interactive = 0; + CopySrcWithParents = 0; + StripTrailingSlashes = 0; + UpdateMode = 0; + Verbose = 0; + ShowVersion = 0; + OneFileSystem = 0; + PerformBackups = 0; + PreserveFileAttrs = 0; + MakeSoftLinksForNonDirs= 0; + MakeSoftLinksForNonDirsAbsolute= 0; + MakeHardLinksForNonDirs= 0; + FollowOnlyForSrcUrl = 0; + DontFollowLinks = 0; + FollowLinks = 0; + Recurse = 0; + Sloth = 0; + AutoClose = 0; + RecurseAndFlatten = 0; + ArchiveMode = 0; + ShowMeter = 0; + DisableCopyIntoSelfTests= 0; + DstIsDirectory = 0; + SrcIsDirectory = 0; + DoNotTryToOverMountDst = 0; + InputInMemoryMappedMode = 0; + AutoInputInMemoryMappedModeSize_CSTR = 0; + OutputInMemoryMappedMode = 0; + AutoOutputInMemoryMappedModeSize_CSTR = 0; + useSendfileIfPossible = 0; + SendfileChunkSize = 0; + + FSyncAfterEachFile = 0; + DontFSyncAfterEachFile = 0; + PreallocateWith_fallocate = 0; + PreallocateWith_ftruncate = 0; + +// OutputInDirectMode = 0; +// AutoOutputInDirectModeSize_CSTR = 0; + } + + + void + ContextPopTableCollector::ArgProcessingDone( poptContext optCon ) + { + if( ShowVersion ) + { + cout << "ferriscp version: $Id: FerrisCopy.cpp,v 1.27 2011/04/27 21:31:10 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + if( ArchiveMode ) + { + FollowOnlyForSrcUrl = 0; + FollowLinks = 0; + DontFollowLinks = 1; + PreserveFileAttrs = 1; + Recurse = 1; + } + + if( Force || ForceRemovePremptively ) + { + Interactive = 0; + } + + if( RecurseAndFlatten ) + { + Recurse = 1; + } + + cp->setForceOverWrite( Force ); + cp->setForceRemovePremptively( ForceRemovePremptively ); + cp->setInteractive( Interactive ); + cp->setUpdateMode( UpdateMode ); + cp->setVerbose( Verbose ); + cp->setStripTrailingSlashes( StripTrailingSlashes ); + cp->setCopySrcWithParents( CopySrcWithParents ); + + cp->setPerformBackups( "none" ); + if( PerformBackups ) + cp->setPerformBackups( "simple" ); + if( PerformBackupsWithMode ) + cp->setPerformBackups( PerformBackupsWithMode ); + + if( BackupSuffix ) cp->setBackupSuffix( BackupSuffix ); + if( DstAttr ) cp->setDstAttr( DstAttr ); + if( SrcAttr ) cp->setSrcAttr( SrcAttr ); + if( ExplicitSELinuxType ) cp->setExplicitSELinuxType( ExplicitSELinuxType ); + if( ExplicitSELinuxContext ) cp->setExplicitSELinuxContext( ExplicitSELinuxContext ); + if( CloneSELinuxContext ) cp->setCloneSELinuxContext( CloneSELinuxContext ); + { + bool p = isTrue( getEDBString( FDB_GENERAL, CFG_PRECALCULATE_FOR_COPY_K, CFG_PRECALCULATE_FOR_COPY_DEFAULT ) ); + if( DontPrecacheSourceSize ) + p = false; + if( PrecacheSourceSize ) + p = true; + cp->setPrecacheSourceSize( p ); + } + + if( PreserveRecommendedEA ) cp->setPreserveRecommendedEA( PreserveRecommendedEA ); + if( DontPreserveRDFEA ) cp->setPreserveRDFEA( !DontPreserveRDFEA ); + if( DontPreserveFerrisTypeEA ) cp->setPreserveFerrisTypeEA( !DontPreserveFerrisTypeEA ); + + if( PreserveFileAttrs ) + { + cp->setPreserveMTime( true ); + cp->setPreserveATime( true ); + cp->setPreserveOwner( true ); + cp->setPreserveGroup( true ); + cp->setPreserveObjectMode( true ); + } + + if( (FollowLinks && ( FollowOnlyForSrcUrl || DontFollowLinks )) + || ( FollowOnlyForSrcUrl && DontFollowLinks ) + ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if( !FollowLinks ) + { + if( DontFollowLinks ) cp->setDontFollowLinks( DontFollowLinks ); + if( FollowOnlyForSrcUrl ) cp->setFollowOnlyForSrcUrl( FollowOnlyForSrcUrl ); + } + + if( MakeSoftLinksForNonDirs || MakeSoftLinksForNonDirsAbsolute ) + { + cp->setMakeSoftLinksForNonDirs( MakeSoftLinksForNonDirs ); + cp->setMakeSoftLinksForNonDirsAbsolute( MakeSoftLinksForNonDirsAbsolute ); + + if( MakeSoftLinksForNonDirs && Recurse ) + { + LG_COPY_D << "Can not Recurse and make relative links," + << " use --symbolic-link-absolute instead" << nl << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + } + if( MakeHardLinksForNonDirs ) + { + cp->setMakeHardLinksForNonDirs( MakeHardLinksForNonDirs ); + } + + FerrisCopy::HoleMode_t m = FerrisCopy::HOLEMODE_NEVER; + if( HoleCreation == "auto" ) m = FerrisCopy::HOLEMODE_HEURISTIC; + else if( HoleCreation == "always" ) m = FerrisCopy::HOLEMODE_ALWAYS; + cp->setHoleMode( m ); + + if( PreserveAttributeList ) + { + cp->setPreserveAttributeList( PreserveAttributeList ); + } + + cp->setRecurse( Recurse ); + cp->setFlattenSpecialToFile( RecurseAndFlatten ); + + if( FSyncAfterEachFile ) + cp->setFSyncAfterEachFile( FSyncAfterEachFile ); + if( DontFSyncAfterEachFile ) + cp->setFSyncAfterEachFile( !DontFSyncAfterEachFile ); + + cp->setPreallocateWith_fallocate( PreallocateWith_fallocate ); + cp->setPreallocateWith_ftruncate( PreallocateWith_ftruncate ); + + cp->setCopyIntoSelfTests( !DisableCopyIntoSelfTests ); + cp->setDstIsDirectory( DstIsDirectory ); + cp->setSrcIsDirectory( SrcIsDirectory ); + cp->setDoNotTryToOverMountDst( DoNotTryToOverMountDst ); + cp->setInputInMemoryMappedMode( InputInMemoryMappedMode ); + if( AutoInputInMemoryMappedModeSize_CSTR ) + { + guint64 v = Util::convertByteString( AutoInputInMemoryMappedModeSize_CSTR ); + cp->setAutoInputInMemoryMappedModeSize( v ); + } + + cp->setOutputInMemoryMappedMode( OutputInMemoryMappedMode ); + if( AutoOutputInMemoryMappedModeSize_CSTR ) + { + guint64 v = Util::convertByteString( AutoOutputInMemoryMappedModeSize_CSTR ); + cp->setAutoOutputInMemoryMappedModeSize( v ); + } + if( useSendfileIfPossible ) + cp->setUseSendfileIfPossible( useSendfileIfPossible ); + if( SendfileChunkSize ) + cp->setSendfileChunkSize( SendfileChunkSize ); + +// cp->setOutputInDirectMode( OutputInDirectMode ); +// if( AutoOutputInDirectModeSize_CSTR ) +// { +// guint64 v = Util::convertByteString( AutoOutputInDirectModeSize_CSTR ); +// cp->setAutoOutputInDirectModeSize( v ); +// } + + cp->setOneFileSystem( OneFileSystem ); + cp->setSloth( Sloth ); + cp->setAutoClose( AutoClose ); + } + + struct ::poptOption* + ContextPopTableCollector::getTable( fh_cp _cp ) + { + cp = _cp; + int extraTableLines = 5; + int tablesize = 90; + + tablesize = tablesize + extraTableLines; + allocTable( tablesize ); + + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + setEntry( + &table[i++], "src-attr", 0, POPT_ARG_STRING, &SrcAttr, + "Take an attribute off the source path rather than the context itself", + "" ); + setEntry( + &table[i++], "dst-attr", 0, POPT_ARG_STRING, &DstAttr, + "Write to an attribute in the destination context rather than the context itself", + "" ); + setEntry( + &table[i++], "dst-attr-no-create", 0, POPT_ARG_STRING, &DstAttrNoCreate, + "It is an error if the chosen dst-attr does not already exist", + "" ); + + setEntry( + &table[i++], "archive", 'a', POPT_ARG_NONE, &ArchiveMode, + "same as -dpR", "" ); + setEntry( + &table[i++], "", 'b', POPT_ARG_NONE, &PerformBackups, + "like --backup but does not accept an argument", "" ); + setEntry( + &table[i++], "backup", 0, POPT_ARG_STRING, &PerformBackupsWithMode, + "make a backup of each existing destination file", "CONTROL" ); + setEntry( + &table[i++], "disable-copyintoself-tests", 0, POPT_ARG_NONE, &DisableCopyIntoSelfTests, + "gain a little time by assuming the user is always right", "" ); + setEntry( + &table[i++], "dereference", 'L', POPT_ARG_NONE, &FollowLinks, + "always follow symbolic links", "" ); + setEntry( + &table[i++], "no-dereference", 'd', POPT_ARG_NONE, &DontFollowLinks, + "Copy symbolic links as symbolic links rather than copying the" + "files that they point to, and preserve hard links between source" + "files in the copies", "" ); + setEntry( + &table[i++], "dst-is-dir", 0, POPT_ARG_NONE, &DstIsDirectory, + "force treating destination as a directory (copy into db4/xml file)", "" ); + setEntry( + &table[i++], "src-is-dir", 0, POPT_ARG_NONE, &SrcIsDirectory, + "force treating source as a directory (copy from db4/xml file)", "" ); + setEntry( + &table[i++], "dont-try-to-mount-dst", 0, POPT_ARG_NONE, &DoNotTryToOverMountDst, + "Do not attempt to mount dst as a composite file", "0" ); + + setEntry( + &table[i++], "input-in-mmap-mode", 0, POPT_ARG_NONE, &InputInMemoryMappedMode, + "memory map the input file for reading. Using MADV_SEQUENTIAL madvise(2)", "" ); + + setEntry( + &table[i++], "auto-input-in-mmap-mode", 0, + POPT_ARG_STRING, &AutoInputInMemoryMappedModeSize_CSTR, + "input-in-mmap-mode input if file size is greater than given human readable value", "" ); + + setEntry( + &table[i++], "output-in-mmap-mode", 0, POPT_ARG_NONE, &OutputInMemoryMappedMode, + "memory map the output file for writing. Using MADV_SEQUENTIAL madvise(2)", "" ); + + setEntry( + &table[i++], "auto-output-in-mmap-mode", 0, + POPT_ARG_STRING, &AutoOutputInMemoryMappedModeSize_CSTR, + "output-in-mmap-mode output if file size of input is greater than given human readable value", "" ); + +// setEntry( +// &table[i++], "use-sendfile-if-possible", 0, +// POPT_ARG_NONE, &useSendfileIfPossible, +// "if sendfile(2) can be used for the copy then do it", "0" ); +// setEntry( +// &table[i++], "sendfile-chunk-size", 0, +// POPT_ARG_INT, &SendfileChunkSize, +// "override size of each chunk that is copied at once using sendfile(2)", "0" ); + +// setEntry( +// &table[i++], "output-in-direct-mode", 0, POPT_ARG_NONE, &OutputInDirectMode, +// "use O_DIRECT output to try to avoid any caching of data", "" ); + +// setEntry( +// &table[i++], "auto-output-in-direct-mode", 0, +// POPT_ARG_STRING, &AutoOutputInDirectModeSize_CSTR, +// "use O_DIRECT output if file size is greater than given human readable value", "" ); + + setEntry( + &table[i++], "force", 'f', POPT_ARG_NONE, &Force, + "if an existing destination file cannot be opened, remove it and try again", "" ); + + setEntry( + &table[i++], "follow", 'H', POPT_ARG_NONE, &FollowOnlyForSrcUrl, + "If a command line argument specifies a symbolic link, then copy the" + "file it points to rather than the symbolic link itself. However," + "copy (preserving its nature) any symbolic link that is encountered" + "via recursive traversal", "" ); + setEntry( + &table[i++], "interactive", 'i', POPT_ARG_NONE, &Interactive, + "prompt before overwrite", ""); + setEntry( + &table[i++], "link", 'l', POPT_ARG_NONE, &MakeHardLinksForNonDirs, + "Make hard links instead of copies of non-directories", "" ); + setEntry( + &table[i++], "preserve", 'p', POPT_ARG_NONE, &PreserveFileAttrs, + "preserve file attributes if possible", "" ); + setEntry( + &table[i++], "preserve-list", 0, POPT_ARG_STRING, &PreserveAttributeList, + "Also preserve these attributes if they exist in the src", "attr1,attr2,..." ); + setEntry( + &table[i++], "preserve-recommended-ea", 0, POPT_ARG_NONE, &PreserveRecommendedEA, + "Also preserve the attributes listed in recommended-ea for the source", "" ); + setEntry( + &table[i++], "dont-preserve-rdf-ea", 0, POPT_ARG_NONE, &DontPreserveRDFEA, + "Skip attempts to copy/link RDF EA", "" ); + setEntry( + &table[i++], "dont-preserve-ferris-filetype", 0, POPT_ARG_NONE, &DontPreserveFerrisTypeEA, + "Skip attempt to preserve ferris-type EA", "" ); + setEntry( + &table[i++], "parents", 0, POPT_ARG_NONE, &CopySrcWithParents, + "Form the name of each destination file by appending to the target" + " directory a slash and the specified name of the source file DIRECTORY", "" ); + setEntry( + &table[i++], "recursive", 'R', POPT_ARG_NONE, &Recurse, + "copy the contents of directories recursively", "" ); + setEntry( + &table[i++], "", 'r', POPT_ARG_NONE, &RecurseAndFlatten, + "copy the contents of directories recursively, flatten non-dir to files", "" ); + setEntry( + &table[i++], "remove-destination", 0, POPT_ARG_NONE, &ForceRemovePremptively, + "Remove each existing destination file before attempting to " + "open it (contrast with -f)", "" ); + setEntry( + &table[i++], "sloth", 0, POPT_ARG_NONE, &Sloth, + "keep the main window closed until it is needed", "" ); + setEntry( + &table[i++], "auto-close", '0', POPT_ARG_NONE, &AutoClose, + "If there is no user interaction or objects skipped then close client automatically", "" ); + setEntry( + &table[i++], "sparse", 0, POPT_ARG_STRING, &HoleCreation, + "control creation of sparse files", "WHEN" ); + setEntry( + &table[i++], "strip-trailing-slashes", '/', POPT_ARG_NONE, &StripTrailingSlashes, + "remove any trailing slashes from each SOURCE argument", "" ); + setEntry( + &table[i++], "suffix", 'S', POPT_ARG_STRING, &BackupSuffix, + "override the usual backup suffix", "SUFFIX" ); + setEntry( + &table[i++], "symbolic-link", 's', POPT_ARG_NONE, &MakeSoftLinksForNonDirs, + "Make symbolic links instead of copies of non-directories", "" ); + setEntry( + &table[i++], "symbolic-link-absolute", 0, POPT_ARG_NONE, + &MakeSoftLinksForNonDirsAbsolute, + "Make absolute symbolic links instead of copies of non-directories", "" ); + setEntry( + &table[i++], "update", 'u', POPT_ARG_NONE, &UpdateMode, + "copy only when the SOURCE file is newer than the destination" + " file or when the destination file is missing", "" ); + setEntry( + &table[i++], "verbose", 'v', POPT_ARG_NONE, &Verbose, + "explain what is being done", "" ); + setEntry( + &table[i++], "version", 0, POPT_ARG_NONE, &ShowVersion, + "show version information and quit", 0 ); + setEntry( + &table[i++], "one-file-system", 'x', POPT_ARG_NONE, &OneFileSystem, + "stay on this file system", 0 ); + + + setEntry( + &table[i++], "set", 0, POPT_ARG_STRING, &ExplicitSELinuxType, + "set SELinux type of copy to TYPE", 0 ); + setEntry( + &table[i++], "selinux-type", 0, POPT_ARG_STRING, &ExplicitSELinuxType, + "set SELinux type of copy to TYPE", 0 ); + setEntry( + &table[i++], "context", 'Z', POPT_ARG_STRING, &ExplicitSELinuxContext, + "set security context of copy to CONTEXT", 0 ); + setEntry( + &table[i++], "clone-context", 0, POPT_ARG_NONE, &CloneSELinuxContext, + "clone input file security context to output file", 0 ); + + setEntry( + &table[i++], "precache-copy-size", 0, POPT_ARG_NONE, &PrecacheSourceSize, + "workout how large the source is before copying", 0 ); + + setEntry( + &table[i++], "dont-precache-copy-size", 0, POPT_ARG_NONE, &DontPrecacheSourceSize, + "do not workout how large the source is before copying", 0 ); + + + setEntry( + &table[i++], "preallocate-with-fallocate", 0, POPT_ARG_NONE, &PreallocateWith_fallocate, + "preallocate byte range for destination files using fallocate", "" ); + + setEntry( + &table[i++], "preallocate-with-ftruncate", 0, POPT_ARG_NONE, &PreallocateWith_ftruncate, + "preallocate byte range for destination files using ftruncate", "" ); + + + setEntry( + &table[i++], "dont-fsync-after-each-file", 0, POPT_ARG_NONE, &DontFSyncAfterEachFile, + "disable fsync call after each file is copied", "" ); + + setEntry( + &table[i++], "fsync-after-each-file", 0, POPT_ARG_NONE, &FSyncAfterEachFile, + "enable fsync call after each file is copied", "" ); + + + + clearEntry( &table[i] ); + return table; + } + + + namespace Priv + { + struct ::poptOption* getCopyPopTableCollector( fh_cp cp ) + { + return cp->getPoptCollector()->getTable( cp ); + } + }; + + +}; diff --git a/Ferris/FerrisCopy.hh b/Ferris/FerrisCopy.hh new file mode 100644 index 0000000..36c18c8 --- /dev/null +++ b/Ferris/FerrisCopy.hh @@ -0,0 +1,628 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cp + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCopy.hh,v 1.12 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_COPY_H_ +#define _ALREADY_INCLUDED_FERRIS_COPY_H_ + +#include +#include +#include +#include +#include + +#include +#include + +#include + + +namespace FerrisUI +{ + class FerrisCopy_SignalHandler; +}; + +namespace Ferris +{ + + class FerrisCopy; + FERRIS_SMARTPTR( FerrisCopy, fh_cp ); + + class ContextPopTableCollector; + FERRIS_SMARTPTR( ContextPopTableCollector, fh_cp_collector ); + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API ContextPopTableCollector + : + public basic_PopTableCollector, + public Handlable + { + fh_cp cp; + + const char* DstNameCSTR ; + const char* SrcAttr ; + const char* DstAttr ; + unsigned long DstAttrNoCreate ; + const char* BackupSuffix ; + const char* PerformBackupsWithMode ; + const char* HoleCreation ; + const char* PreserveAttributeList ; + unsigned long Force ; + unsigned long ForceRemovePremptively ; + unsigned long Interactive ; + unsigned long CopySrcWithParents ; + unsigned long StripTrailingSlashes ; + unsigned long UpdateMode ; + unsigned long Verbose ; + unsigned long ShowVersion ; + unsigned long OneFileSystem ; + unsigned long PerformBackups ; + unsigned long PreserveFileAttrs ; + unsigned long MakeSoftLinksForNonDirs; + unsigned long MakeSoftLinksForNonDirsAbsolute; + unsigned long MakeHardLinksForNonDirs; + unsigned long FollowOnlyForSrcUrl ; + unsigned long DontFollowLinks ; + unsigned long FollowLinks ; + unsigned long Recurse ; + unsigned long RecurseAndFlatten ; + unsigned long Sloth ; + unsigned long AutoClose ; + unsigned long ArchiveMode ; + unsigned long ShowMeter ; + unsigned long DisableCopyIntoSelfTests; + unsigned long DstIsDirectory; + unsigned long SrcIsDirectory; + unsigned long DoNotTryToOverMountDst; + unsigned long InputInMemoryMappedMode; + const char* AutoInputInMemoryMappedModeSize_CSTR; + unsigned long OutputInMemoryMappedMode; + const char* AutoOutputInMemoryMappedModeSize_CSTR; + unsigned long useSendfileIfPossible; + unsigned long SendfileChunkSize; + unsigned long PreallocateWith_fallocate; + unsigned long PreallocateWith_ftruncate; + unsigned long DontFSyncAfterEachFile; + unsigned long FSyncAfterEachFile; + +// unsigned long OutputInDirectMode; +// const char* AutoOutputInDirectModeSize_CSTR; + + const char* ExplicitSELinuxType; + const char* ExplicitSELinuxContext; + unsigned long CloneSELinuxContext; + unsigned long PrecacheSourceSize; + unsigned long DontPrecacheSourceSize; + + unsigned long PreserveRecommendedEA; + unsigned long DontPreserveRDFEA; + unsigned long DontPreserveFerrisTypeEA; + + + public: + ContextPopTableCollector(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data); + + void reset(); + void ArgProcessingDone( poptContext optCon ); + struct ::poptOption* getTable( fh_cp _cp ); + }; + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API FerrisCopy + : + public Ferrisls_long_display + { + typedef Ferrisls_long_display _Base; + + friend class FerrisUI::FerrisCopy_SignalHandler; + fh_cp_collector Collector; + + public: + + typedef sigc::signal5< void, + FerrisCopy&, // thisobj, + fh_context, // src, + fh_context, // dst, + std::string, // srcDescription, + std::string // dstDescription + > CopyVerboseSignal_t; + + CopyVerboseSignal_t& getCopyVerboseSignal(); + + typedef sigc::signal3< void, + FerrisCopy&, // thisobj, + std::string, // srcDescription, + std::string // reason + > SkippingContextSignal_t; + + SkippingContextSignal_t& getSkippingContextSignal(); + + typedef sigc::signal5< bool, + FerrisCopy&, // thisobj, + fh_context, // src + fh_context, // dst + std::string, // srcDescription, + std::string // dstDescription + > AskReplaceContextSignal_t; + + AskReplaceContextSignal_t& getAskReplaceContextSignal(); + + typedef sigc::signal6< bool, + FerrisCopy&, // thisobj, + fh_context, // src + fh_context, // dst + std::string, // srcDescription, + std::string, // dstDescription + fh_attribute // dst attr + > AskReplaceAttributeSignal_t; + + AskReplaceAttributeSignal_t& getAskReplaceAttributeSignal(); + + fh_cp_collector getPoptCollector(); + + private: + + CopyVerboseSignal_t CopyVerboseSignal; + SkippingContextSignal_t SkippingContextSignal; + AskReplaceContextSignal_t AskReplaceContextSignal; + AskReplaceAttributeSignal_t AskReplaceAttributeSignal; + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + bool RecursiveIsInitial; + Ferrisls ls; + + virtual void workStarting(); + virtual void workComplete(); + std::string dirname( fh_context ctx, std::string s ); + virtual bool ShouldEnterContext(fh_context ctx); + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( int i, const std::string& attr, const std::string& EA ); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + void priv_setSrcContext( fh_context c, bool isInitial = true ); + void priv_setDstContext( const std::string& _dstURL, bool isInitial = true ); + + public: + + typedef sigc::signal4< void, + FerrisCopy&, // this + std::streamsize, // CurrentPosition + std::streamsize, // BlockSize + std::streamsize // FinalSize (may be -1) + > CopyPorgressSignal_t; + + typedef sigc::signal4< void, + FerrisCopy&, // this + std::streamsize, // CurrentPosition + std::streamsize, // BlockSize + std::streamsize // FinalSize (may be -1) + > CopyStartSignal_t; + + typedef sigc::signal4< void, + FerrisCopy&, // this + std::streamsize, // CurrentPosition + std::streamsize, // BlockSize + std::streamsize // FinalSize (may be -1) + > CopyEndSignal_t; + + CopyPorgressSignal_t& getCopyPorgressSignal(); + CopyStartSignal_t& getCopyStartSignal(); + CopyEndSignal_t& getCopyEndSignal(); + + private: + CopyPorgressSignal_t CopyPorgressSignal; + CopyStartSignal_t CopyStartSignal; + CopyEndSignal_t CopyEndSignal; + + + template< class T > + T copyTo( fh_istream iss, + T oss, + const std::streamsize BlockSize = 4096, + const std::streamsize FinalSize = -1 + ) + { + std::streamsize CurrentPosition = 0; + + LG_COPY_D << "---------Start copy-----------" + << " blocksize:" << BlockSize + << " finalsize:" << FinalSize + << " CurrentPos:" << CurrentPosition + << " oss is good():"<< oss->good() + << std::endl; + + getCopyStartSignal().emit( *this, CurrentPosition, + BlockSize, FinalSize ); + + char buffer[ BlockSize + 1 ]; + errno = 0; + + while( true ) + { + iss.read( buffer, BlockSize ); + std::streamsize BytesRead = iss.gcount(); + + LG_COPY_D << " iss is good():"<< iss->good() << std::endl; + LG_COPY_D << " iss is eof():"<< iss->eof() << std::endl; + LG_COPY_D << " iss is bad():"<< iss->bad() << std::endl; + LG_COPY_D << " iss is fail():"<< iss->fail() << std::endl; + LG_COPY_D << " iss is state:"<< iss->rdstate() << std::endl; + LG_COPY_D << " BytesRead:" << BytesRead << std::endl; + + if( iss.eof() ) + { + if( !BytesRead ) + { + /* at end of input */ + break; + } + /* Fall through and write the bytes out for the last partial block */ + } + else if( !iss ) + { + /* read error */ + int eno = errno; + fh_stringstream ss; + ss << "Failed to copy file." + << " src:" << getSourceDescription() + << " dst:" << getDestinationDescription() + << " read error! "; +// cerr << tostr(ss) << std::endl; + Throw_CopyFailed( errnum_to_string(tostr(ss), eno), 0 ); + } + + if( !oss.write( buffer, BytesRead )) + { + /* write error */ + int eno = errno; + fh_stringstream ss; + ss << "Failed to copy file." + << " src:" << getSourceDescription() + << " dst:" << getDestinationDescription() + << " write error! "; +// cerr << tostr(ss) << std::endl; + Throw_CopyFailed( errnum_to_string(tostr(ss), eno), 0 ); + } + + CurrentPosition += BytesRead; + TotalBytesCopied += BytesRead; + LG_COPY_D << " oss is good():"<< oss->good() << std::endl; + LG_COPY_D << " oss is state:"<< oss->rdstate() << std::endl; + + getCopyPorgressSignal().emit( *this, + CurrentPosition, + BlockSize, + FinalSize ); + } + + oss << std::flush; + + if( FinalSize != -1 && CurrentPosition != FinalSize ) + { + /* Something strange has happened, not read/write error */ + + fh_stringstream ss; + ss << "Failed to copy file." + << " src:" << getSourceDescription() + << " dst:" << getDestinationDescription() + << " CurrentPosition != FinalSize that was desired." + << " CurrentPosition:" << CurrentPosition + << " FinalSize:" << FinalSize; + Throw_CopyFailed( tostr(ss), 0 ); + } + + + + +// copy( istreambuf_iterator(iss), +// istreambuf_iterator(), +// ostreambuf_iterator(oss)); + + LG_COPY_D << " iss is good():"<< iss->good() << std::endl; + LG_COPY_D << " iss is eof():"<< iss->eof() << std::endl; + LG_COPY_D << " iss is state:"<< iss->rdstate() << std::endl; + LG_COPY_D << " oss is good():"<< oss->good() << std::endl; + LG_COPY_D << " oss is state:"<< oss->rdstate() << std::endl; + +// char xch; +// iss >> xch; +// if( !iss->eof() ) +// { +// fh_stringstream ss; +// ss << "Failed to copy file, path: " << getDirPath() +// << " iss is not at eof."; +// Throw_CopyFailed( tostr(ss), this ); +// } + + getCopyEndSignal().emit( *this, CurrentPosition, + BlockSize, FinalSize ); + + return oss; + } + + + /* + * return true if we are trying to copy into ourself. + */ + bool AttemptToCopyIntoSelf( fh_context src, fh_context dstparent ); + void perform_copy(); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + std::string srcURL; + /* This is the srcURL that was given originaily for a recursive parse, it is + * also relative if the srcURL was relative to begin with */ + std::string srcURL_Root; + std::string dstURL; + + /* this is cached so that the dstURL can change and then be restored in the + * next copy() call */ + std::string dstURL_setByUser; + + std::string SrcAttr; + std::string DstAttr; + + fh_context src; /* Source context */ + fh_context dstparent; /* parent(dst); needed when dc does not yet exist */ + fh_context dst; /* destination context */ + + bool DstAttrNoCreate; + bool ForceOverWrite; + bool ForceRemovePremptively; + bool Interactive; + bool Verbose; + bool UpdateMode; + bool StripTrailingSlashes; + bool CopySrcWithParents; + bool OneFileSystem; + dev_t CurrentFileSystemDev; + bool FlattenSpecialToFile; + bool PreserveObjectMode; + bool PreserveMTime; + bool PreserveATime; + bool PreserveOwner; + bool PreserveGroup; + bool FollowOnlyForSrcUrl; + bool DontFollowLinks; + bool Recurse; + bool CopyIntoSelfTests; + + bool perform_fsyncAfterEachFile; + bool perform_preallocation; + bool preallocate_with_fallocate; + bool preallocate_with_ftruncate; + + int m_DestinationFDCache; + + protected: + std::streamsize TotalBytesCopied; + std::streamsize TotalBytesToCopy; + bool Sloth; + bool AutoClose; + + /** + * If we are 'AutoClose' we dont auto close if we have + * interacted with the user + */ + bool hadUserInteraction; + + public: + enum HoleMode_t + { + HOLEMODE_NEVER, + HOLEMODE_ALWAYS, + HOLEMODE_HEURISTIC + }; + /** + * Signal which is fired for each file/dir to allow easy control over + * changing the lstat(), selinux, or other metadata for the destination. + * Signal is fired when destination file has been created and fully + * setup as per standard options like -Z, -a etc. ie, signal is the + * last thing to see the destination file. + */ + typedef sigc::signal5< void, + FerrisCopy*, // thisobj, + fh_context, // src, + fh_context, // dst, + std::string, // srcDescription, + std::string // dstDescription + > m_AttributeUpdater_t; + + private: + m_AttributeUpdater_t m_AttributeUpdater; + bool m_AttributeUpdaterInUse; + HoleMode_t HoleMode; + + typedef std::list< std::string > PreserveAttributeList_t; + PreserveAttributeList_t PreserveAttributeList; + + bool MakeSoftLinksForNonDirs; + bool MakeSoftLinksForNonDirsAbsolute; + bool MakeHardLinksForNonDirs; + bool DstIsDirectory; + bool SrcIsDirectory; + bool DoNotTryToOverMountDst; + bool InputInMemoryMappedMode; + std::streamsize AutoInputInMemoryMappedModeSize; + bool OutputInMemoryMappedMode; + std::streamsize AutoOutputInMemoryMappedModeSize; + bool m_useSendfileIfPossible; + long m_sendfileChunkSize; + +// bool OutputInDirectMode; +// std::streamsize AutoOutputInDirectModeSize; + + Util::BackupMaker backupMaker; + + bool m_CloneSELinuxContext; + bool m_PrecacheSourceSize; + std::string m_ExplicitSELinuxType; + std::string m_ExplicitSELinuxContext; + + bool m_PreserveRecommendedEA; + bool m_PreserveRDFEA; + bool m_PreserveFerrisTypeEA; + + void maybeStripTrailingSlashes(); + + fh_context priv_CreateObj( fh_context c, std::string s ); + +public: + + FerrisCopy(); + + bool setFSyncAfterEachFile( bool v ); + bool setPreallocateWith_fallocate( bool v ); + bool setPreallocateWith_ftruncate( bool v ); + bool setCopyIntoSelfTests( bool v ); + void setRecurse( bool v ); + void setSloth( bool v ); + void setAutoClose( bool v ); + void setHoleMode( HoleMode_t m ); + void setPreserveAttributeList( const std::string& v ); + void setFollowOnlyForSrcUrl( bool v ); + void setDontFollowLinks( bool v ); + void setMakeSoftLinksForNonDirsAbsolute( bool v ); + void setMakeSoftLinksForNonDirs( bool v ); + void setMakeHardLinksForNonDirs( bool v ); + void setPreserveMTime( bool v ); + void setPreserveATime( bool v ); + void setPreserveOwner( bool v ); + void setPreserveGroup( bool v ); + void setPreserveObjectMode( bool v ); + void setFlattenSpecialToFile( bool v ); + void setBackupMaker( const Util::BackupMaker& b ); + void setBackupSuffix( const std::string& s ); + void setExplicitSELinuxContext( const std::string& s ); + void setExplicitSELinuxType( const std::string& s ); + void setCloneSELinuxContext( bool v ); + void setPrecacheSourceSize( bool v ); + bool shouldPrecacheSourceSize(); + void setPreserveRecommendedEA( bool v ); + void setPreserveRDFEA( bool v ); + void setPreserveFerrisTypeEA( bool v ); + void setPerformBackups( const std::string& s ); + void setOneFileSystem( bool v ); + void setForceOverWrite( bool v ); + void setForceRemovePremptively( bool v ); + void setVerbose( bool v ); + void setStripTrailingSlashes( bool v ); + void setCopySrcWithParents( bool v ); + void setInteractive( bool v ); + void setUpdateMode( bool v ); + void setSrcAttr( const std::string& s ); + void setDstAttr( const std::string& s ); + void setDstAttrNoCreate( bool v ); + void setSrcURL( const std::string& s ); + void setDstURL( const std::string& s ); + void setDstIsDirectory( bool v ); + void setSrcIsDirectory( bool v ); + void setDoNotTryToOverMountDst( bool v ); + void setInputInMemoryMappedMode( bool v ); + void setAutoInputInMemoryMappedModeSize( std::streamsize v ); + void setOutputInMemoryMappedMode( bool v ); + void setAutoOutputInMemoryMappedModeSize( std::streamsize v ); + void setUseSendfileIfPossible( bool v ); + void setSendfileChunkSize( long v ); + + m_AttributeUpdater_t& getAttributeUpdaterSignal(); +// void setOutputInDirectMode( bool v ); +// void setAutoOutputInDirectModeSize( std::streamsize v ); + std::string getDstName(); + + fh_iostream OpenDestination( fh_attribute& realdst, + std::streamsize inputsz = 0, + bool firstcall = true ); + + std::string getEA_DontFollow( fh_context c, const std::string& n, std::string d ); + std::string getEA( fh_context c, const std::string& n, std::string d ); + + bool srcIsCmdLineParam(); + fh_context CreateObj( fh_context c, std::string s ); + + void PreserveEA( const std::string& eaname, bool tryCreate = 0, + const std::string& ExplicitPluginName = "" ); + void PreserveEA(); + + fh_ostream WrapForHoles( fh_context src, fh_ostream ss ); + std::string getSourceDescription(); + std::string getDestinationDescription( fh_context c = 0 ); + void perform(); + void copy(); + + std::streamsize getTotalBytesCopied(); + std::streamsize getTotalBytesToCopy(); + gdouble getTotalPercentageOfBytesCopied(); + + + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + namespace Priv + { + FERRISEXP_API struct ::poptOption* getCopyPopTableCollector( fh_cp cp ); + }; + +#define FERRIS_COPY_OPTIONS(cp) { 0, 0, POPT_ARG_INCLUDE_TABLE, \ +/**/ ::Ferris::Priv::getCopyPopTableCollector(cp), \ +/**/ 0, "common copy options:", 0 }, + +}; +#endif diff --git a/Ferris/FerrisCopy_private.hh b/Ferris/FerrisCopy_private.hh new file mode 100644 index 0000000..497edb6 --- /dev/null +++ b/Ferris/FerrisCopy_private.hh @@ -0,0 +1,364 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cp + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCopy_private.hh,v 1.5 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_COPY_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_COPY_PRIVATE_H_ + +#include +#include +#include + +#include +#include + +namespace Ferris +{ + +class FERRISEXP_DLLLOCAL ProgressMeter_TTY + : public Handlable +{ + std::streamsize Min; + std::streamsize Max; + std::streamsize Pos; + std::streamsize ConsoleWidth; + std::streamsize ConsolePosition; + +public: + + ProgressMeter_TTY() + { + reset(); + } + + void update( std::streamsize newpos ) + { + Pos = newpos; + double Percent = 1.0 * Pos / Max; + double ConsolePercent = Percent * ConsoleWidth; + std::streamsize NewConsolePosition = static_cast(ConsolePercent); + +// LG_COPY_D << " NewConsolePosition:" << NewConsolePosition +// << " Pos:" << Pos +// << " Max:" << Max +// << " ConsoleWidth:" << ConsoleWidth +// << " Percent:" << Percent +// << " ConsolePosition:" << ConsolePosition +// << " ConsolePercent:" << ConsolePercent +// << " diff:" << (NewConsolePosition - ConsolePosition) +// << std::endl; + + if( NewConsolePosition != ConsolePosition ) + { + std::streamsize diff = NewConsolePosition - ConsolePosition; + + for( ; diff > 0 ; --diff ) + { + std::cout << "#" << std::flush; + } + ConsolePosition = NewConsolePosition; + } + } + + void done() + { + std::cout << std::endl; + } + + void reset( std::streamsize NewMax = 100 ) + { + ConsoleWidth = 80; + if( const gchar* p = g_getenv ("COLUMNS") ) + { + ConsoleWidth = toType(p); + } + ConsolePosition = 0; + Max = NewMax; + Min = 0; + Pos = 0; + + if( !Max ) + Max = 1; + } +}; + + + class FerrisCopy_TTY; + FERRIS_SMARTPTR( FerrisCopy_TTY, fh_cp_tty ); + + +class FERRISEXP_DLLLOCAL FerrisCopy_TTY + : + public FerrisCopy +{ + typedef FerrisCopy _Base; + typedef FerrisCopy_TTY _Self; + ProgressMeter_TTY Progress; + bool ShowMeter; + + typedef std::vector MatchersList_t; + MatchersList_t AlwaysPermitMatchers; + + char askQ( std::string prompt ) + { + LG_COPY_D << "askQ() prompt:" << prompt << std::endl; + char ch='n'; + std::cout << prompt << std::flush; + std::cin >> ch; + LG_COPY_D << "askQ() reply ch:" << ch << " for prompt:" << prompt << std::endl; + return ch; + } + + char AskLoop( std::string prompt, int MaxNumericOption = -1 ) + { + while( char ch = askQ( prompt )) + { + switch( ch ) + { + case 'a': + case 'A': + setInteractive( false ); + return true; + + case 'n': + case 'N': + return false; + + case 'p': + case 'P': + alwaysPreserveExisting = true; + return false; + + case 'S': + case 's': + std::cout << "User requested to stop" << std::endl; + exit(0); + + case 'y': + case 'Y': + return true; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + int c = ch - (int)'0'; + if( c > MaxNumericOption ) + continue; + return ch; + } + } + } + } + + + + bool alwaysPreserveExisting; + +public: + + FerrisCopy_TTY() + : + ShowMeter( false ), + alwaysPreserveExisting( false ) + { + getCopyStartSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyStart )); + getCopyPorgressSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyPorgress )); + getCopyEndSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyEnd )); + getCopyVerboseSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyVerbose )); + getSkippingContextSignal().connect( sigc::mem_fun( *this, &_Self::OnSkippingContext )); + getAskReplaceContextSignal().connect( sigc::mem_fun( *this,&_Self::OnAskReplaceContext)); + getAskReplaceAttributeSignal().connect( sigc::mem_fun( *this,&_Self::OnAskReplaceAttribute)); + } + + virtual ~FerrisCopy_TTY() throw () + { + } + + void setShowMeter( bool v ) + { + ShowMeter = v; + } + + void OnCopyStart( FerrisCopy& thisobj, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + if( !ShowMeter ) return; + + if( FinalSize != -1 ) + Progress.reset( FinalSize ); + } + + void OnCopyPorgress( FerrisCopy& thisobj, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + if( !ShowMeter ) return; + + if( FinalSize != -1 ) + Progress.update( CurrentPosition ); + } + + void OnCopyEnd( FerrisCopy& thisobj, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + if( !ShowMeter ) return; + + Progress.done(); + } + + + void OnCopyVerbose( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + std::string srcDescription, + std::string dstDescription ) + { + std::cout << "cp " << getSourceDescription() + << " to " << getDestinationDescription() << std::endl; + } + + void OnSkippingContext( FerrisCopy& thisobj, std::string srcDescription, std::string reason ) + { + std::cerr << reason << ":" << srcDescription << std::endl; + } + + + bool OnAskReplaceContext( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + std::string srcDescription, + std::string dstDescription ) + { +// std::cerr << "OnAskReplaceContext() " +// << " srcdesc:" << srcDescription +// << " dstdesc:" << dstDescription +// << std::endl; + + if( alwaysPreserveExisting ) + { + return false; + } + + if( !AlwaysPermitMatchers.empty() ) + { + for( MatchersList_t::iterator iter = AlwaysPermitMatchers.begin(); + iter != AlwaysPermitMatchers.end(); ++iter ) + { + fh_matcher m = *iter; + if( m( dst ) ) + { + return true; + } + } + } + + + fh_stringstream pss; + pss << "Replace " << dstDescription << std::endl + << " (a)lways, (n)o, (p)reserve all existing, (s)top everything, (y)es" << std::endl; + + int MaxNumericOption = -1; + std::string extension = getStrAttr( dst, "name-extension", "" ); + MaxNumericOption++; + pss << "Always for: (0)-with extension:" << extension; + + std::string mimetype = getStrAttr( dst, "mimetype", "" ); + MaxNumericOption++; + pss << " (1)-with mimetype:" << mimetype; + + std::string filetype = getStrAttr( dst, "filetype", "" ); + MaxNumericOption++; + pss << " (2)-with filetype:" << filetype; + + + + pss << "? " << std::flush; + char ch = AskLoop( tostr(pss), 1 ); + if( ch == '0' ) + { + static Factory::EndingList r; + r.push_back( make_pair( std::string("name-extension"), std::string( extension ))); + fh_matcher m = Factory::ComposeEqualsMatcher( r ); + AlwaysPermitMatchers.push_back( m ); + } + else if( ch == '1' ) + { + static Factory::EndingList r; + r.push_back( make_pair( std::string("mimetype"), std::string( mimetype ))); + fh_matcher m = Factory::ComposeEqualsMatcher( r ); + AlwaysPermitMatchers.push_back( m ); + } + else if( ch == '2' ) + { + static Factory::EndingList r; + r.push_back( make_pair( std::string("filetype"), std::string( filetype ))); + fh_matcher m = Factory::ComposeEqualsMatcher( r ); + AlwaysPermitMatchers.push_back( m ); + } + return ch; + } + + bool OnAskReplaceAttribute( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + std::string srcDescription, + std::string dstDescription, + fh_attribute dstattr ) + { + if( alwaysPreserveExisting ) + { + return false; + } + + fh_stringstream pss; + pss << "Replace " << dstDescription << std::endl + << " (a)lways, (n)o, (p)reserve all existing, (s)top everything, (y)es? " << std::flush; + return AskLoop( tostr(pss) ); + } + +}; + + +}; + + +#endif + diff --git a/Ferris/FerrisCreationPlugin.cpp b/Ferris/FerrisCreationPlugin.cpp new file mode 100644 index 0000000..3f64766 --- /dev/null +++ b/Ferris/FerrisCreationPlugin.cpp @@ -0,0 +1,347 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCreationPlugin.cpp,v 1.6 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + mode_t getModeFromMetaData( fh_context md ) + { + LG_NATIVE_D << "getModeFromMetaData(T)" << endl; +// cerr << "getModeFromMetaData TOP" << endl; +// BackTrace(); + + string modestr = getStrSubCtx( md, "mode", "-1" ); + mode_t mode = 0; + LG_NATIVE_D << "getModeFromMetaData(1)" << endl; + +// cerr << "getModeFromMetaData() modestr:" << modestr << endl; + + if( modestr == "-1" ) + { + LG_NATIVE_D << "getModeFromMetaData(A)" << endl; + if( !md->isSubContextBound( "user-readable" ) + && !md->isSubContextBound( "user-writable" ) + && !md->isSubContextBound( "user-executable" ) + && !md->isSubContextBound( "group-readable" ) + && !md->isSubContextBound( "group-writable" ) + && !md->isSubContextBound( "group-executable" ) + && !md->isSubContextBound( "other-readable" ) + && !md->isSubContextBound( "other-writable" ) + && !md->isSubContextBound( "other-executable" ) ) + { + string rdn = md->getDirName(); + bool isDirectory = (rdn=="dir"); +// cerr << "getModeFromMetaData() USING DEFAULT u=rwx" +// << " isDir:" << isDirectory +// << endl; + if( isDirectory ) + mode = S_IRUSR | S_IWUSR | S_IXUSR; + else + mode = S_IRUSR | S_IWUSR; + } + else + { + mode = 0 + | (toint(getStrSubCtx( md, "user-readable", "1" )) ? S_IRUSR : 0) + | (toint(getStrSubCtx( md, "user-writable", "1" )) ? S_IWUSR : 0) + | (toint(getStrSubCtx( md, "user-executable", "0" )) ? S_IXUSR : 0) + | (toint(getStrSubCtx( md, "group-readable", "0" )) ? S_IRGRP : 0) + | (toint(getStrSubCtx( md, "group-writable", "0" )) ? S_IWGRP : 0) + | (toint(getStrSubCtx( md, "group-executable", "0" )) ? S_IXGRP : 0) + | (toint(getStrSubCtx( md, "other-readable", "0" )) ? S_IROTH : 0) + | (toint(getStrSubCtx( md, "other-writable", "0" )) ? S_IWOTH : 0) + | (toint(getStrSubCtx( md, "other-executable", "0" )) ? S_IXOTH : 0) + | 0; + } + } + else + { +// mode = toType( modestr ); + + LG_NATIVE_D << "getModeFromMetaData(B) modestr:" << modestr << endl; + + mode = Factory::MakeInitializationMode( modestr ); + LG_NATIVE_D << "getModeFromMetaData(C)" << endl; + } + + LG_NATIVE_D << "getModeFromMetaData() modestr:" << modestr + << " mode:" << mode + << endl; + + return mode; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL CreationModuleData + { + string libname; + string xsd; + string simpleTypes; + + CreationModuleData( + string libname, + string xsd, + string simpleTypes ) + : + libname( libname ), + xsd( xsd ), + simpleTypes( simpleTypes ) + { + } + }; + + + typedef map< string, CreationModuleData > pmap_t; + static pmap_t& getNativeMap() + { + static pmap_t o; + return o; + } + static pmap_t& getNonNativeMap() + { + static pmap_t o; + return o; + } + + static pmap_t& getMap( bool requiresNativeKernelDrive ) + { + if( requiresNativeKernelDrive ) + return getNativeMap(); + return getNonNativeMap(); + } + + bool RegisterCreationModule( const std::string& libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive, + const std::string& simpleTypes ) + { + getMap( requiresNativeKernelDrive ).insert( + make_pair( ferristype, CreationModuleData( libname, xsd, simpleTypes ))); + return true; + } + + struct FERRISEXP_DLLLOCAL SubCreate_CustomType + { + string libname; + + SubCreate_CustomType( string libname ) + : + libname( libname ) + { + } + + fh_context create( fh_context c, fh_context md ) + { + typedef map< string, fh_CreationStatelessFunctor > cache_t; + static cache_t cache; + cache_t::iterator ci = cache.find( libname ); + + LG_CREATE_D << "SL_SubCreate_CustomType() libname:" << libname << endl; + + /** + * cache it if its not there + */ + if( ci == cache.end() ) + { +// const string library_path = FERRIS_CREATION_PLUGIN_DIR + "/" + libname; + const string library_path = makeFerrisPluginPath( "creation", libname ); + + GModule* gmod = g_module_open ( library_path.c_str(), G_MODULE_BIND_LAZY ); + fh_CreationStatelessFunctor (*creator_function)(); + + if( !gmod ) + { + fh_stringstream ss; + ss << "Error, unable to open module file:" << library_path << " " + << g_module_error () + << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol( gmod, "Create", (gpointer*)&creator_function )) + { + ostringstream ss; + ss << "Error, unable to resolve Create in module file:" << library_path + << " this should never happen. Please report it to the mailing list" + << " " + << g_module_error() + << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + fh_CreationStatelessFunctor f = creator_function(); + LG_PLUGIN_D << "creator_function:" << toVoid( creator_function ) + << " f:" << toVoid(f) + << endl; + ci = cache.insert( make_pair( libname, f ) ).first; + } + + /** + * Should never happen + */ + if( ci == cache.end() || !ci->second ) + { + LG_PLUGIN_W << "SubCreate_CustomType::create() can't find library:" << libname + << endl; + fh_stringstream ss; + ss << "can't find library:" << libname << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), 0 ); + } + + + return ci->second->create( c, md ); + } + }; + + typedef map< string, SubCreate_CustomType* > CreateObjects_t; + + static void insertCreatorModules_init( CreateObjects_t& output, + pmap_t::iterator begin, + pmap_t::iterator end ) + { + for( pmap_t::iterator mi = begin; mi != end; ++mi ) + { + CreationModuleData& d = mi->second; + string ferristype = mi->first; + + SubCreate_CustomType* obj = new SubCreate_CustomType( d.libname ); + output.insert( make_pair( d.libname, obj )); + } + } + + + void insertCreatorModules( Context::CreateSubContextSchemaPart_t& m, + bool requiresNativeKernelDrive ) + { + typedef pmap_t::iterator itert; + typedef Loki::Functor< fh_context, + LOKI_TYPELIST_2( fh_context, fh_context ) > Perform_t; + static CreateObjects_t CreateObjects; + + if( CreateObjects.empty() ) + { + insertCreatorModules_init( CreateObjects, + getMap( false ).begin(), + getMap( false ).end() ); + insertCreatorModules_init( CreateObjects, + getMap( true ).begin(), + getMap( true ).end() ); + } + + for( itert mi = getMap( requiresNativeKernelDrive ).begin(); + mi != getMap( requiresNativeKernelDrive ).end(); ++mi ) + { + CreationModuleData& d = mi->second; + string ferristype = mi->first; + + LG_CREATE_D << "insertAllCreatorModules() ftype:" << ferristype + << " libname:" << d.libname + << " xsd:" << d.xsd + << endl; + +// typedef Loki::Functor< fh_context, +// LOKI_TYPELIST_3( string, fh_context, fh_context ) > WrappedFunc_t; +// WrappedFunc_t wf( SL_SubCreate_CustomType ); + +// m[ ferristype ] = Context::SubContextCreator( +// Loki::BindFirst( wf, d.libname ), +// d.xsd ); + +// if( ferristype == "dbxml" ) +// { +// cerr << "ferristype is dbxml. Making one on the side" << endl; +// SubCreate_CustomType* scc = CreateObjects[ d.libname ]; + +// try +// { +// fh_context c = Resolve( "/tmp/junk" ); +// fh_mdcontext md = new f_mdcontext(); +// fh_mdcontext child = md->setChild( "dbxml", "" ); +// child->setChild( "name", "frodo.dbxml" ); +// child->setChild( "value", "" ); +// fh_context newc = scc->create( c, md ); +// cerr << "newc:" << newc->getURL() << endl; +// } +// catch( exception& e ) +// { +// cerr << "ERROR:" << e.what() << endl; + +// } + +// // Perform_t f( CreateObjects[ d.libname ], &SubCreate_CustomType::create ); + +// } + + m[ ferristype ] = Context::SubContextCreator( + Perform_t( CreateObjects[ d.libname ], &SubCreate_CustomType::create ), + d.xsd, + d.simpleTypes ); + } + } + + void insertAllCreatorModules( Context::CreateSubContextSchemaPart_t& m ) + { + insertCreatorModules( m, false ); + insertCreatorModules( m, true ); + } + + void insertAbstractCreatorModules( Context::CreateSubContextSchemaPart_t& m ) + { + insertCreatorModules( m, false ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_context + CreationStatelessFunctor::SubCreate_file( fh_context c, fh_context md ) + { + return c->SubCreate_file( c, md ); + } + + fh_context + CreationStatelessFunctor::SubCreate_ea( fh_context c, fh_context md ) + { + return c->SubCreate_ea( c, md ); + } + + +}; + diff --git a/Ferris/FerrisCreationPlugin.hh b/Ferris/FerrisCreationPlugin.hh new file mode 100644 index 0000000..033fdf1 --- /dev/null +++ b/Ferris/FerrisCreationPlugin.hh @@ -0,0 +1,137 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCreationPlugin.hh,v 1.2 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_CREATION_PLUGIN_H_ +#define _ALREADY_INCLUDED_FERRIS_CREATION_PLUGIN_H_ + +#include + +// +// Its a PRIVATE header, so config.h is OK +// +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + + +/** + * The factory calls the register functions to tell the main code where to + * find the function to create a new context of the given type. + * + * once the library is known it is opened and a function is called in that + * library to make the new context. + * + * The registry stores the ferris-type, XSD for the new type, and the library name + * once a match is found the library is opened and a new object is created. + */ +namespace Ferris +{ + FERRISEXP_API mode_t getModeFromMetaData( fh_context md ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * There should be a function in the above registered library 'libpath' + * that can create one of these objects. The object is then cached and + * used by future creation requests of the ferris-type + */ + class FERRISEXP_API CreationStatelessFunctor + : + public Handlable + { + protected: + fh_context SubCreate_file( fh_context c, fh_context md ); + fh_context SubCreate_ea ( fh_context c, fh_context md ); + + public: + virtual fh_context create( fh_context c, fh_context md ) = 0; + }; + FERRIS_SMARTPTR( CreationStatelessFunctor, fh_CreationStatelessFunctor ); + + /** + * All creation factories should call here to register their shared object. + * Note that many calls to RegisterCreationModule() can be made for the one + * shared object. In such cases the creation method can demultiplex based on + * the rdn of the metadata supplied. See the ImageMagick creator as an example. + * + * @param libname Name of shared object that can create new Context(s) of + * type ferristype + * @param ferristype Ferris ID of new Context that can be created by shared + * object. + * @param xsd XSD schema that the creation can accept. + * @param requiresNativeKernelDrive If the creation process uses shared libraries + * that require direct access to the filesystem + * to perform creation then set this to true + * (the default). Otherwise set it to false so that + * the creator is registered for any underlying VFS + * context module. eg. if set to false this creation + * method will be allowed for embedded db4 or mysql + * filesystem. + * @param simpleTypes If there are any XSD types that are used in 'xsd' to restrict + * the valid values that a document instance can have then much + * XSD 'simpleType' tags should be contained in this string. + */ + FERRISEXP_API bool RegisterCreationModule( const std::string& libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive = true, + const std::string& simpleTypes = "" ); + + /** + * If a plugin registers multiple types for the one library, it should + * call here with any XSD SimpleTypes that it wants rather than + * registering the same simpletypes many times. + */ + FERRISEXP_API bool appendExtraGenerateSchemaSimpleTypes( const std::string& s ); + + /** + * Insert all creation modules no matter if they need native disk or not. + */ + FERRISEXP_API void insertAllCreatorModules( Context::CreateSubContextSchemaPart_t& m ); + + /** + * Insert only to creation modules that don't require native kernel disk IO. + */ + FERRISEXP_API void insertAbstractCreatorModules( Context::CreateSubContextSchemaPart_t& m ); +}; + +#endif diff --git a/Ferris/FerrisCurl.cpp b/Ferris/FerrisCurl.cpp new file mode 100644 index 0000000..81f6c2a --- /dev/null +++ b/Ferris/FerrisCurl.cpp @@ -0,0 +1,308 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCurl.cpp,v 1.5 2010/11/14 21:30:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris/FerrisCurl_private.hh" +#include + +#include + +#include +#include + +using namespace std; + + +namespace Ferris +{ + FerrisCurl::FerrisCurl() + : + m_resultDataSS( 0 ), + m_isPost( false ), + m_debugVerbose( false ) + { + } + + FerrisCurl::~FerrisCurl() + { + } + + void + FerrisCurl::setDebugVerbose( bool v ) + { + m_debugVerbose = v; + } + + void + FerrisCurl::setHttpAccept( const std::string& s ) + { + m_httpAccept = s; + } + + void + FerrisCurl::setContentType( const std::string& s ) + { + m_contentType = s; + } + + void + FerrisCurl::setMultiPartPostData( stringmap_t sl ) + { + m_multiPartPostData = sl; + } + + void + FerrisCurl::appendFileToUpload( fh_context c, string filename, string mimetype, string formElementName ) + { + m_filesToUpload.push_back( new FileToUpload( c, filename, mimetype, formElementName ) ); + } + + + void + FerrisCurl::appendFileToUpload( fh_context c ) + { + appendFileToUpload( c, "", "", "file" ); + } + + + + + std::string + FerrisCurl::post( const std::string& earl, const std::string& postData ) + { + m_isPost = 1; + return perform( earl, postData ); + } + + size_t ferriscurlWriteCallback(void *ptr, size_t size, size_t nmemb, void *userdata) + { + FerrisCurl* thisp = (FerrisCurl*)userdata; + int len=size*nmemb; + LG_CURL_D << "ferriscurlWriteCallback() len:" << len << endl; + + thisp->m_resultDataSS->write( (const char*)ptr, len ); + return len; + } + + FerrisCurl::FileToUpload::FileToUpload( + fh_context c, std::string filename, std::string mimetype, std::string formElementName ) + : + c(c), + filename( filename ), + mimetype( mimetype ), + formElementName( formElementName ) + { + if( mimetype.empty() ) + { + this->mimetype = getStrAttr( c, "mimetype", "" ); + LG_CURL_D << "no mimetype set for c:" << c->getURL() + << " read type as:" << this->mimetype + << endl; + } + if( filename.empty() ) + { + this->filename = c->getDirName(); + } + + LG_CURL_D << "FileToUpload() c:" << c->getURL() + << " mimetype:" << this->mimetype + << " filename:" << this->filename + << " formElementName:" << this->formElementName + << endl; + } + + FerrisCurl::FileToUpload::~FileToUpload() + { + LG_CURL_D << "~FileToUpload()" << endl; + } + + const string& + FerrisCurl::FileToUpload::getData() + { + LG_WEBPHOTO_D << "FileToUpload::getData() c:" << c->getURL() << endl; + LG_WEBPHOTO_D << "FileToUpload::getData() sz:" << getStrAttr( c, "content", "", true, true ).length() << endl; + m_data = getStrAttr( c, "content", "", true, true ); + return m_data; + } + + + std::string + FerrisCurl::perform( const std::string& earl, const std::string& postData ) + { + if( m_resultDataSS ) + delete m_resultDataSS; + m_resultDataSS = new std::stringstream(); + m_httpStatus = 0; + + struct curl_slist *slist=NULL; + + CURL* m_curl = 0; + m_curl=curl_easy_init(); + + curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, + ferriscurlWriteCallback); + curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, this ); + + char errbuf[CURL_ERROR_SIZE]; + errbuf[0] = 0; + curl_easy_setopt( m_curl, CURLOPT_ERRORBUFFER, errbuf ); + + curl_easy_setopt( m_curl, CURLOPT_URL, earl.c_str() ); + +// string proxyname = getEDBString( FDB_GENERAL, "curl-use-proxy-name", "" ); +// curl_easy_setopt( m_curl, CURLOPT_PROXY, proxyname.c_str() ); + + curl_easy_setopt( m_curl, CURLOPT_CUSTOMREQUEST, 0 ); + + if( !m_httpAccept.empty() ) + slist=curl_slist_append(slist, (const char*)m_httpAccept.c_str() ); + + if( m_isPost ) + { + if( !m_multiPartPostData.empty() ) + { + struct curl_httppost* post = NULL; + struct curl_httppost* last = NULL; + + LG_CURL_D << "have many part post form data... m_multiPartPostData.size:" + << m_multiPartPostData.size() << endl; + for( stringmap_t::iterator si = m_multiPartPostData.begin(); + si != m_multiPartPostData.end(); ++si ) + { + LG_CURL_D << "arg name:" << si->first << endl; + LG_CURL_D << "arg second.len:" << si->second.length() << endl; + +// if( si->first == "photo" ) +// { +// // curl_formadd(&post, &last, +// // // CURLFORM_PTRNAME, si->first.c_str(), +// // // CURLFORM_PTRCONTENTS, si->second.c_str(), +// // // CURLFORM_NAMELENGTH, si->first.length(), +// // // CURLFORM_CONTENTSLENGTH, si->second.length(), +// // CURLFORM_COPYNAME, "photo", +// // CURLFORM_CONTENTTYPE, "image/png", +// // // CURLFORM_FILENAME, "foobar.jpg", +// // CURLFORM_FILE, "/tmp/testing-image.png", +// // CURLFORM_END); + +// curl_formadd(&post, &last, +// CURLFORM_PTRNAME, si->first.c_str(), +// CURLFORM_NAMELENGTH, si->first.length(), +// CURLFORM_CONTENTTYPE, "image/png", +// CURLFORM_BUFFER, "foobar.jpg", +// CURLFORM_BUFFERPTR, si->second.c_str(), +// CURLFORM_BUFFERLENGTH, si->second.length(), +// CURLFORM_END); +// } +// else + { + curl_formadd(&post, &last, + CURLFORM_PTRNAME, si->first.c_str(), + CURLFORM_PTRCONTENTS, si->second.c_str(), + CURLFORM_NAMELENGTH, si->first.length(), + CURLFORM_CONTENTSLENGTH, si->second.length(), + CURLFORM_END); + } + } + + LG_CURL_D << "m_filesToUpload.sz:" << m_filesToUpload.size() << endl; + + for( m_filesToUpload_t::iterator iter = m_filesToUpload.begin(); + iter != m_filesToUpload.end(); ++iter ) + { + fh_FileToUpload ftu = *iter; + fh_context c = ftu->c; + + LG_CURL_D << "m_filesToUpload.form_name:" << ftu->formElementName << endl; + LG_CURL_D << "m_filesToUpload.mimetype:" << ftu->mimetype << endl; + LG_CURL_D << "m_filesToUpload.filename:" << ftu->filename << endl; + LG_CURL_D << "m_filesToUpload.data.sz:" << ftu->getData().length() << endl; + LG_CURL_D << "m_filesToUpload.url:" << c->getURL() << endl; + + curl_formadd(&post, &last, + CURLFORM_PTRNAME, ftu->formElementName.c_str(), + CURLFORM_NAMELENGTH, ftu->formElementName.length(), + CURLFORM_CONTENTTYPE, ftu->mimetype.c_str(), + CURLFORM_BUFFER, ftu->filename.c_str(), + CURLFORM_BUFFERPTR, ftu->getData().c_str(), + CURLFORM_BUFFERLENGTH, ftu->getData().length(), + CURLFORM_END); + + + +// // This works OK. +// curl_formadd(&post, &last, +// CURLFORM_COPYNAME, "photo", +// CURLFORM_FILE, "/tmp/libferris-webupload-fs-temp-image..jpg", +// CURLFORM_END); + + } + + curl_easy_setopt(m_curl, CURLOPT_HTTPPOST, post ); + } + else + { + curl_easy_setopt(m_curl, CURLOPT_POST, 1); + curl_easy_setopt(m_curl, CURLOPT_POSTFIELDS, postData.c_str() ); + curl_easy_setopt(m_curl, CURLOPT_POSTFIELDSIZE, postData.length() ); + } + } + else + { + curl_easy_setopt(m_curl, CURLOPT_HTTPPOST, 0); + curl_easy_setopt(m_curl, CURLOPT_POST, 0); + } + + if( !m_contentType.empty() ) + { + LG_CURL_D << "setting content type...:" << m_contentType << endl; + slist=curl_slist_append(slist, (const char*)m_contentType.c_str() ); + } + + LG_CURL_D << "m_debugVerbose:" << m_debugVerbose << endl; + curl_easy_setopt(m_curl, CURLOPT_VERBOSE, m_debugVerbose ); + + if(curl_easy_perform(m_curl)) + { + // error + LG_CURL_I << "Error:" << errbuf << endl; + } + else + { + curl_easy_getinfo(m_curl, CURLINFO_RESPONSE_CODE, &m_httpStatus); + } + + return m_resultDataSS->str(); + + } + + + +}; + diff --git a/Ferris/FerrisCurl_private.hh b/Ferris/FerrisCurl_private.hh new file mode 100644 index 0000000..a65ae54 --- /dev/null +++ b/Ferris/FerrisCurl_private.hh @@ -0,0 +1,95 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCurl_private.hh,v 1.4 2010/09/24 21:30:35 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +#ifndef _ALREADY_INCLUDED_FERRIS_FERRISCURL_H_ +#define _ALREADY_INCLUDED_FERRIS_FERRISCURL_H_ + +#include +#include +#include "Ferris/TypeDecl.hh" + +namespace Ferris +{ + size_t ferriscurlWriteCallback(void *ptr, size_t size, size_t nmemb, void *userdata); + + class FerrisCurl + { + friend size_t ferriscurlWriteCallback(void *ptr, size_t size, size_t nmemb, void *userdata); + + struct FileToUpload + : + public Handlable + { + fh_context c; + std::string filename; + std::string mimetype; + std::string formElementName; + std::string m_data; + + FileToUpload( fh_context c, std::string filename, std::string mimetype, std::string formElementName ); + ~FileToUpload(); + const std::string& getData(); + + NOT_COPYABLE( FileToUpload ); + }; + FERRIS_SMARTPTR( FileToUpload, fh_FileToUpload ); + + typedef std::list< fh_FileToUpload > m_filesToUpload_t; + m_filesToUpload_t m_filesToUpload; + stringmap_t m_multiPartPostData; + std::string m_httpAccept; + std::string m_contentType; + std::stringstream* m_resultDataSS; + long m_httpStatus; + bool m_isPost; + bool m_debugVerbose; + + std::string perform( const std::string& earl, + const std::string& postData = "" ); + + public: + FerrisCurl(); + ~FerrisCurl(); + + /** + * Turns on CURL debugging + */ + void setDebugVerbose( bool v ); + + void setHttpAccept( const std::string& s ); + void setContentType( const std::string& s ); + + std::string post( const std::string& earl, + const std::string& postData ); + + void setMultiPartPostData( stringmap_t sl ); + void appendFileToUpload( fh_context c ); + void appendFileToUpload( fh_context c, std::string filename, std::string mimetype, std::string formElementName ); + }; +}; +#endif diff --git a/Ferris/FerrisDOM.cpp b/Ferris/FerrisDOM.cpp new file mode 100644 index 0000000..05d8f64 --- /dev/null +++ b/Ferris/FerrisDOM.cpp @@ -0,0 +1,4345 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisDOM.cpp,v 1.31 2011/11/09 21:31:12 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef HAVE_XALAN +#include +#include +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "xerces/DOMTreeWalkerImpl.hpp" +#include "xerces/DOMRangeImpl.hpp" +#include "xerces/DOMAttrImpl.hpp" +#include "xerces/DOMTypeInfoImpl.hpp" +#include "xerces/DOMDocumentImpl.hpp" + + +#include + +using namespace std; +using namespace XERCES_CPP_NAMESPACE; + +#define STRING_OR_EMPTY( x ) (x) ? (x) : (XMLCh*)""; +#define X(str) XStr(str).unicodeForm() + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*** Support code to print a DOM (from DOMPrint.cpp) ***************************/ +/*** From here down to the next three line comment block is apache code ********/ +/*** though some of it is changed, so it should be considered tainted ********/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +// /* +// * The Apache Software License, Version 1.1 +// * +// * Copyright (c) 1999-2001 The Apache Software Foundation. All rights +// * reserved. +// * +// * Redistribution and use in source and binary forms, with or without +// * modification, are permitted provided that the following conditions +// * are met: +// * +// * 1. Redistributions of source code must retain the above copyright +// * notice, this list of conditions and the following disclaimer. +// * +// * 2. Redistributions in binary form must reproduce the above copyright +// * notice, this list of conditions and the following disclaimer in +// * the documentation and/or other materials provided with the +// * distribution. +// * +// * 3. The end-user documentation included with the redistribution, +// * if any, must include the following acknowledgment: +// * "This product includes software developed by the +// * Apache Software Foundation (http://www.apache.org/)." +// * Alternately, this acknowledgment may appear in the software itself, +// * if and wherever such third-party acknowledgments normally appear. +// * +// * 4. The names "Xerces" and "Apache Software Foundation" must +// * not be used to endorse or promote products derived from this +// * software without prior written permission. For written +// * permission, please contact apache\@apache.org. +// * +// * 5. Products derived from this software may not be called "Apache", +// * nor may "Apache" appear in their name, without prior written +// * permission of the Apache Software Foundation. +// * +// * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +// * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +// * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// * SUCH DAMAGE. +// * ==================================================================== +// * +// * This software consists of voluntary contributions made by many +// * individuals on behalf of the Apache Software Foundation, and was +// * originally based on software copyright (c) 1999, International +// * Business Machines, Inc., http://www.ibm.com . For more information +// * on the Apache Software Foundation, please see +// * . +// */ + +// static const XMLCh gEndElement[] = { chOpenAngle, chForwardSlash, chNull }; +// static const XMLCh gEndPI[] = { chQuestion, chCloseAngle, chNull}; +// static const XMLCh gStartPI[] = { chOpenAngle, chQuestion, chNull }; +// static const XMLCh gXMLDecl1[] = +// { +// chOpenAngle, chQuestion, chLatin_x, chLatin_m, chLatin_l +// , chSpace, chLatin_v, chLatin_e, chLatin_r, chLatin_s, chLatin_i +// , chLatin_o, chLatin_n, chEqual, chDoubleQuote, chNull +// }; +// static const XMLCh gXMLDecl2[] = +// { +// chDoubleQuote, chSpace, chLatin_e, chLatin_n, chLatin_c +// , chLatin_o, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chEqual +// , chDoubleQuote, chNull +// }; +// static const XMLCh gXMLDecl3[] = +// { +// chDoubleQuote, chSpace, chLatin_s, chLatin_t, chLatin_a +// , chLatin_n, chLatin_d, chLatin_a, chLatin_l, chLatin_o +// , chLatin_n, chLatin_e, chEqual, chDoubleQuote, chNull +// }; +// static const XMLCh gXMLDecl4[] = +// { +// chDoubleQuote, chQuestion, chCloseAngle +// , chLF, chNull +// }; + +// static const XMLCh gStartCDATA[] = +// { +// chOpenAngle, chBang, chOpenSquare, chLatin_C, chLatin_D, +// chLatin_A, chLatin_T, chLatin_A, chOpenSquare, chNull +// }; + +// static const XMLCh gEndCDATA[] = +// { +// chCloseSquare, chCloseSquare, chCloseAngle, chNull +// }; +// static const XMLCh gStartComment[] = +// { +// chOpenAngle, chBang, chDash, chDash, chNull +// }; + +// static const XMLCh gEndComment[] = +// { +// chDash, chDash, chCloseAngle, chNull +// }; + +// static const XMLCh gStartDoctype[] = +// { +// chOpenAngle, chBang, chLatin_D, chLatin_O, chLatin_C, chLatin_T, +// chLatin_Y, chLatin_P, chLatin_E, chSpace, chNull +// }; +// static const XMLCh gPublic[] = +// { +// chLatin_P, chLatin_U, chLatin_B, chLatin_L, chLatin_I, +// chLatin_C, chSpace, chDoubleQuote, chNull +// }; +// static const XMLCh gSystem[] = +// { +// chLatin_S, chLatin_Y, chLatin_S, chLatin_T, chLatin_E, +// chLatin_M, chSpace, chDoubleQuote, chNull +// }; +// static const XMLCh gStartEntity[] = +// { +// chOpenAngle, chBang, chLatin_E, chLatin_N, chLatin_T, chLatin_I, +// chLatin_T, chLatin_Y, chSpace, chNull +// }; +// static const XMLCh gNotation[] = +// { +// chLatin_N, chLatin_D, chLatin_A, chLatin_T, chLatin_A, +// chSpace, chDoubleQuote, chNull +// }; + +// static XMLFormatter* gFormatter = 0; +// static XMLCh* gEncodingName = 0; +// static XMLFormatter::UnRepFlags gUnRepFlags = XMLFormatter::UnRep_CharRef; + +// // --------------------------------------------------------------------------- +// // Local classes +// // --------------------------------------------------------------------------- + +// class DOMPrintFormatTarget : public XMLFormatTarget +// { +// ostream& oss; + +// public: +// DOMPrintFormatTarget( ostream& _oss = cout ) +// : +// oss(_oss) +// {}; +// ~DOMPrintFormatTarget() {}; + +// // ----------------------------------------------------------------------- +// // Implementations of the format target interface +// // ----------------------------------------------------------------------- + +// void writeChars(const XMLByte* const toWrite, +// const unsigned int count, +// XMLFormatter * const formatter) +// { +// // Surprisingly, Solaris was the only platform on which +// // required the char* cast to print out the string correctly. +// // Without the cast, it was printing the pointer value in hex. +// // Quite annoying, considering every other platform printed +// // the string with the explicit cast to char* below. +// oss.write((char *) toWrite, (int) count); +// }; + +// private: +// // ----------------------------------------------------------------------- +// // Unimplemented methods. +// // ----------------------------------------------------------------------- +// DOMPrintFormatTarget(const DOMPrintFormatTarget& other); +// void operator=(const DOMPrintFormatTarget& rhs); +// }; + +// ostream& operator<<(ostream& target, const DOMString& toWrite); +// ostream& operator<<(ostream& target, DOM_Node& toWrite); +// XMLFormatter& operator<< (XMLFormatter& strm, const DOMString& s); + +// // --------------------------------------------------------------------------- +// // ostream << DOM_Node +// // +// // Stream out a DOM node, and, recursively, all of its children. This +// // function is the heart of writing a DOM tree out as XML source. Give it +// // a document node and it will do the whole thing. +// // --------------------------------------------------------------------------- +// ostream& operator<<(ostream& target, DOMNode* toWrite) +// { +// // Get the name and value out for convenience +// const XMLCh* nodeName = toWrite->getNodeName(); +// const XMLCh* nodeValue = toWrite->getNodeValue(); +// unsigned long lent = XMLString::stringLen( nodeValue ); + +// switch (toWrite->getNodeType()) +// { +// case DOMNode::TEXT_NODE: +// { +// gFormatter->formatBuf( nodeValue, lent, XMLFormatter::CharEscapes); +// break; +// } + + +// case DOMNode::PROCESSING_INSTRUCTION_NODE : +// { +// *gFormatter << XMLFormatter::NoEscapes << gStartPI << nodeName; +// if (lent > 0) +// { +// *gFormatter << chSpace << nodeValue; +// } +// *gFormatter << XMLFormatter::NoEscapes << gEndPI; +// break; +// } + + +// case DOMNode::DOCUMENT_NODE : +// { +// DOMNode* child = toWrite->getFirstChild(); +// while( child ) +// { +// target << child; +// // add linefeed in requested output encoding +// *gFormatter << chLF; +// target << flush; +// child = child->getNextSibling(); +// } +// break; +// } + + +// case DOMNode::ELEMENT_NODE : +// { +// // The name has to be representable without any escapes +// *gFormatter << XMLFormatter::NoEscapes +// << chOpenAngle << nodeName; + +// // Output the element start tag. + +// // Output any attributes on this element +// DOMNamedNodeMap* attributes = toWrite->getAttributes(); +// int attrCount = attributes->getLength(); +// for (int i = 0; i < attrCount; i++) +// { +// DOMNode* attribute = attributes->item(i); + +// // +// // Again the name has to be completely representable. But the +// // attribute can have refs and requires the attribute style +// // escaping. +// // +// *gFormatter << XMLFormatter::NoEscapes +// << chSpace << attribute->getNodeName() +// << chEqual << chDoubleQuote +// << XMLFormatter::AttrEscapes +// << attribute->getNodeValue() +// << XMLFormatter::NoEscapes +// << chDoubleQuote; +// } + +// // +// // Test for the presence of children, which includes both +// // text content and nested elements. +// // +// DOMNode* child = toWrite->getFirstChild(); +// if ( child ) +// { +// // There are children. Close start-tag, and output children. +// // No escapes are legal here +// *gFormatter << XMLFormatter::NoEscapes << chCloseAngle; + +// while( child ) +// { +// target << child; +// child = child->getNextSibling(); +// } + +// // +// // Done with children. Output the end tag. +// // +// *gFormatter << XMLFormatter::NoEscapes << gEndElement +// << nodeName << chCloseAngle; +// } +// else +// { +// // +// // There were no children. Output the short form close of +// // the element start tag, making it an empty-element tag. +// // +// *gFormatter << XMLFormatter::NoEscapes << chForwardSlash << chCloseAngle; +// } +// break; +// } + + +// case DOMNode::ENTITY_REFERENCE_NODE: +// { +// DOMNode* child; +// #if 0 +// for (child = toWrite->getFirstChild(); child; child = child->getNextSibling()) +// { +// target << child; +// } +// #else +// // +// // Instead of printing the refernece tree +// // we'd output the actual text as it appeared in the xml file. +// // This would be the case when -e option was chosen +// // +// *gFormatter << XMLFormatter::NoEscapes << chAmpersand +// << nodeName << chSemiColon; +// #endif +// break; +// } + + +// case DOMNode::CDATA_SECTION_NODE: +// { +// *gFormatter << XMLFormatter::NoEscapes << gStartCDATA +// << nodeValue << gEndCDATA; +// break; +// } + + +// case DOMNode::COMMENT_NODE: +// { +// *gFormatter << XMLFormatter::NoEscapes << gStartComment +// << nodeValue << gEndComment; +// break; +// } + + +// case DOMNode::DOCUMENT_TYPE_NODE: +// { +// DOMDocumentType* doctype = (DOMDocumentType*)toWrite; + +// *gFormatter << XMLFormatter::NoEscapes << gStartDoctype +// << nodeName; + +// const XMLCh* id = doctype->getPublicId(); +// if( id ) +// { +// *gFormatter << XMLFormatter::NoEscapes << chSpace << gPublic +// << id << chDoubleQuote; +// id = doctype->getSystemId() ? doctype->getSystemId() : (XMLCh*)""; +// if ( id ) +// { +// *gFormatter << XMLFormatter::NoEscapes << chSpace +// << chDoubleQuote << id << chDoubleQuote; +// } +// } +// else +// { +// id = doctype->getSystemId(); +// if( id ) +// { +// *gFormatter << XMLFormatter::NoEscapes << chSpace << gSystem +// << id << chDoubleQuote; +// } +// } + +// id = doctype->getInternalSubset(); +// if( id ) +// *gFormatter << XMLFormatter::NoEscapes << chOpenSquare +// << id << chCloseSquare; + +// *gFormatter << XMLFormatter::NoEscapes << chCloseAngle; +// break; +// } + + +// case DOMNode::ENTITY_NODE: +// { +// DOMEntity* den = (DOMEntity*)toWrite; + +// *gFormatter << XMLFormatter::NoEscapes << gStartEntity +// << nodeName; + +// const XMLCh* id = den->getPublicId(); +// if ( id ) +// *gFormatter << XMLFormatter::NoEscapes << gPublic +// << id << chDoubleQuote; + +// id = den->getSystemId(); +// if ( id ) +// *gFormatter << XMLFormatter::NoEscapes << gSystem +// << id << chDoubleQuote; + +// id = den->getNotationName(); +// if ( id ) +// *gFormatter << XMLFormatter::NoEscapes << gNotation +// << id << chDoubleQuote; + +// *gFormatter << XMLFormatter::NoEscapes << chCloseAngle << chLF; + +// break; +// } + + +// // case DOMNode::XML_DECL_NODE: +// // { +// // DOMString str; + +// // *gFormatter << gXMLDecl1 << ((DOM_XMLDecl &)toWrite).getVersion(); + +// // *gFormatter << gXMLDecl2 << gEncodingName; + +// // str = ((DOM_XMLDecl &)toWrite).getStandalone(); +// // if (str != 0) +// // *gFormatter << gXMLDecl3 << str; + +// // *gFormatter << gXMLDecl4; + +// // break; +// // } + + +// default: +// LG_XML_W << "Unrecognized node type = " +// << (long)toWrite->getNodeType() << endl; +// } +// return target; +// } + +// // --------------------------------------------------------------------------- +// // ostream << DOMString +// // +// // Stream out a DOM string. Doing this requires that we first transcode +// // to char * form in the default code page for the system +// // --------------------------------------------------------------------------- +// // ostream& operator<< (ostream& target, const DOMString& s) +// // { +// // char *p = s.transcode(); +// // target << p; +// // delete [] p; +// // return target; +// // } + + +// // XMLFormatter& operator<< (XMLFormatter& strm, const DOMString& s) +// // { +// // unsigned int lent = s.length(); + +// // if (lent <= 0) +// // return strm; + +// // XMLCh* buf = new XMLCh[lent + 1]; +// // XMLString::copyNString(buf, s.rawBuffer(), lent); +// // buf[lent] = 0; +// // strm << buf; +// // delete [] buf; +// // return strm; +// // } + + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +// Here on in is all 100% (C) Ben Martin +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +namespace Ferris +{ + + class FERRISEXP_DLLLOCAL StringStreamFormatTarget + : + public XMLFormatTarget + { + fh_ostream& ss; + + public: + + StringStreamFormatTarget( fh_ostream& ss ) + : + ss( ss ) + { + } + virtual void writeChars( const XMLByte *const toWrite, + const XMLSize_t count, + XMLFormatter *const formatter ) + { + ss.write((char *)toWrite, (int)count); + } + }; + + + class FERRISEXP_DLLLOCAL FerrisDOMPrintErrorHandler + : + public DOMErrorHandler + { + bool throwForErrors; + + public: + + FerrisDOMPrintErrorHandler( bool throwForErrors = false ) + : + throwForErrors( throwForErrors ) + {}; + ~FerrisDOMPrintErrorHandler(){}; + + /** @name The error handler interface */ + bool handleError(const DOMError& domError); + void resetErrors(){}; + + private : + /* Unimplemented constructors and operators */ + FerrisDOMPrintErrorHandler(const DOMErrorHandler&); + void operator=(const DOMErrorHandler&); + }; + + bool + FerrisDOMPrintErrorHandler::handleError(const DOMError &domError) + { + char *msg_CSTR = XMLString::transcode(domError.getMessage()); + string msg = msg_CSTR; + XMLString::release(&msg_CSTR); + + // Display whatever error message passed from the serializer + if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING) + LG_XML_W << "Warning Message:" << msg << endl; + else + { + if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR) + { + LG_XML_I << "Error msg:" << msg << endl; + if( throwForErrors ) + Throw_XMLParseError( msg, 0 ); + } + else + { + LG_XML_I << "Fatal msg:" << msg << endl; + Throw_XMLFatalError( msg, 0 ); + } + } + + // Instructs the serializer to continue serialization if possible. + return true; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +// std::string tostr( const StrX& ds ) +// { +// string ret = ds.localForm(); +// cerr << "std::string tostr( StrX ds ) lf:" << ds.localForm() << endl; +// cerr << "std::string tostr( StrX ds ) ret:" << ret << endl; +// return ret; +// } + + std::string tostr( const XMLCh* xc ) + { + if( !xc ) + return ""; + + char* native_cstr = XMLString::transcode( xc ); + string ret = native_cstr; + XMLString::release( &native_cstr ); + return ret; + } + + std::string XMLToString( const XMLCh* xc, const std::string def ) + { + if( !xc ) + return def; + return tostr( xc ); + } + + +// std::string tostr( const XMLString& ds ) +// { +// ostringstream ss; +// char* tmp = XMLString::transcode( ds ); +// ss << tmp; +// XMLString::release( &tmp ); +// return tostr(ss); +// } + +// std::string tostr( const Ferris::DOMString& s ) +// { +// fh_stringstream ss; +// ss << (char*)s.c_str(); +// return tostr(ss); +// } + + namespace XML + { + static std::list< const DOMNode* > evalXPathGeneric( fh_domdoc doc, + std::string expression, + DOMXPathResult::ResultType type, + const DOMXPathNSResolver * resolver = 0 ) + { + std::list< const DOMNode* > ret; + + DOMXPathResult* result = doc->evaluate( X(expression.c_str()), + doc->getDocumentElement(), + resolver, + type, + 0 ); + + cerr << "have result...type:" << result->getResultType() << endl; + cerr << "snap length:" << result->getSnapshotLength() << endl; + + if( result->getResultType() == DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE ) + { + XMLSize_t sz = result->getSnapshotLength(); + for( XMLSize_t i=0; isnapshotItem(i); + ret.push_back( result->getNodeValue() ); + } + result->release(); + return ret; + } + + + if( result->getResultType() == DOMXPathResult::ORDERED_NODE_ITERATOR_TYPE + || result->getResultType() == DOMXPathResult::FIRST_ORDERED_NODE_TYPE + ) + { + while( true ) + { + cerr << "have node..." << endl; + ret.push_back( result->getNodeValue() ); + cerr << "have node2..." << endl; + if( result->getResultType() == DOMXPathResult::FIRST_ORDERED_NODE_TYPE + || !result->iterateNext() ) + break; + cerr << "have node3..." << endl; + } + } + cerr << "returning..." << endl; + return ret; + } + + + std::list< const DOMNode* > evalXPath( fh_domdoc doc, + std::string expression ) + { + std::list< const DOMNode* > ret; + ret = evalXPathGeneric( doc, expression, DOMXPathResult::ORDERED_NODE_ITERATOR_TYPE ); + return ret; + } + + std::list< const DOMElement* > evalXPathToElements( fh_domdoc doc, + std::string expression ) + { + std::list< const DOMNode* > tmp = + evalXPathGeneric( doc, expression, DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE ); + + std::list< const DOMElement* > ret; + for( std::list< const DOMNode* >::iterator iter = tmp.begin(); iter != tmp.end(); ++iter ) + { + ret.push_back( (const DOMElement*)*iter ); + } + + return ret; + } + + + static std::string performManyReplaces( const std::string& s, + const std::string& oldstr, + const std::string& newstr ) + { + string::size_type StartOfSearch = 0; + string ret = s; + string::size_type loc = string::npos; + + while( true ) + { + loc = ret.find( oldstr, StartOfSearch ); + if( loc == string::npos ) + break; + + StartOfSearch = max( StartOfSearch, loc+1 ); + if( newstr == "&" && ret.substr( loc, 5 ) == newstr ) + continue; + + ret.replace( loc, oldstr.length(), newstr ); + } + return ret; + } + + std::string escapeToXMLAttr( const std::string& s ) + { + Factory::ensureXMLPlatformInitialized(); + + string ret = s; + + ret = performManyReplaces( ret, "&", "&" ); + ret = performManyReplaces( ret, "<", "<" ); + ret = performManyReplaces( ret, ">", ">" ); + ret = performManyReplaces( ret, "\"", """ ); + + return ret; + +// DOMImplementation *impl = Factory::getDefaultDOMImpl(); +// DOMDocument* doc = impl->createDocument( 0, X("msg"), 0 ); +// DOMElement* root = doc->getDocumentElement(); +// setAttribute( root, "a", s ); +// string ret = getAttribute( root, "a" ); +// delete doc; +// return ret; + } + }; + + fh_stringstream& trimXMLDeclaration( fh_stringstream& ret, bool trim ) + { +// cerr << "trimXMLDeclaration:" << trim << endl; + if( !trim ) + return ret; + + string s; + getline( ret, s ); + if( starts_with( s, "" )) + { +// cerr << "trimming!" << endl; + + fh_stringstream ss; + copy( istreambuf_iterator(ret), + istreambuf_iterator(), + ostreambuf_iterator(ss)); + ret.str( ss.str() ); + } + + ret.clear(); + ret.seekg(0); + ret.clear(); + return ret; + } + + + fh_stringstream handleBadDeclaration( fh_stringstream ret ) + { + string s; + getline( ret, s ); + LG_XML_D << "first line:" << s << endl; + if( starts_with( s, "<" )) + { + LG_XML_D << "BAD first line:" << s << endl; + fh_stringstream ss; + ss << "\n"; + ss << "<"; + + ss << s.substr( strlen("<") ) << endl; + copy( istreambuf_iterator(ret), + istreambuf_iterator(), + ostreambuf_iterator(ss)); + ss.clear(); + ss.seekg(0); + ss.clear(); + LG_XML_D << "BAD first line NEW STREAM sz:" << tostr(ss).size() << endl; + LG_XML_D << "BAD first line NEW STREAM doc:" << tostr(ss) << endl; + return ss; + } + + ret.clear(); + ret.seekg(0); + ret.clear(); + return ret; + } + + fh_stringstream tostream( DOMNode& n, bool gFormatPrettyPrint ) + { + const XMLCh* gOutputEncoding = 0; + const XMLCh* gMyEOLSequence = 0; + + DOMImplementation* impl = Factory::getDefaultDOMImpl(); + DOMLSSerializer* theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer(); + DOMConfiguration* dc = theSerializer->getDomConfig(); + + theSerializer->setNewLine(gMyEOLSequence); +// theSerializer->setEncoding(gOutputEncoding); + + DOMErrorHandler *myErrorHandler = new FerrisDOMPrintErrorHandler(); + dc->setParameter(XMLUni::fgDOMErrorHandler, myErrorHandler ); + dc->setParameter(XMLUni::fgDOMWRTDiscardDefaultContent, true ); + + bool gSplitCdataSections = true; + bool gDiscardDefaultContent = true; + bool gWriteBOM = false; + + + if (dc->canSetParameter(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections)) + dc->setParameter(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections); + + if (dc->canSetParameter(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent)) + dc->setParameter(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent); + + if (dc->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint)) + dc->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint); + + if (dc->canSetParameter(XMLUni::fgDOMWRTBOM, gWriteBOM)) + dc->setParameter(XMLUni::fgDOMWRTBOM, gWriteBOM); + + fh_stringstream ss; + StringStreamFormatTarget* myFormTarget = new StringStreamFormatTarget( ss ); + + DOMLSOutput* theOutput = ((DOMImplementationLS*)impl)->createLSOutput(); + theOutput->setByteStream(myFormTarget); + theSerializer->write( &n, theOutput ); + + delete theSerializer; + delete myFormTarget; + delete myErrorHandler; + return handleBadDeclaration(ss); + + + +#if 0 + + const XMLCh* gOutputEncoding = 0; + const XMLCh* gMyEOLSequence = 0; + + // get a serializer, an instance of DOMWriter + DOMImplementation *impl = Factory::getDefaultDOMImpl(); + DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter(); + + // set user specified end of line sequence and output encoding + theSerializer->setNewLine(gMyEOLSequence); + theSerializer->setEncoding(gOutputEncoding); + + // plug in user's own error handler + DOMErrorHandler *myErrorHandler = new FerrisDOMPrintErrorHandler(); + theSerializer->setErrorHandler(myErrorHandler); + + bool gSplitCdataSections = true; + bool gDiscardDefaultContent = true; + bool gWriteBOM = false; + + + if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections)) + theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections); + + if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent)) + theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent); + + if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint)) + theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint); + + if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, gWriteBOM)) + theSerializer->setFeature(XMLUni::fgDOMWRTBOM, gWriteBOM); + + fh_stringstream ss; + StringStreamFormatTarget* myFormTarget = new StringStreamFormatTarget( ss ); +// MemBufFormatTarget* myFormTarget = new MemBufFormatTarget( 64000 ); + + + + theSerializer->writeNode( myFormTarget, n ); + + + + + + + +// const XMLByte* membufdata = myFormTarget->getRawBuffer(); +// unsigned int membufdatalen = myFormTarget->getLen(); + +// fh_stringstream ss; +// for( int i=0; icreateDOMWriter(); + +// // set user specified end of line sequence and output encoding +// theSerializer->setNewLine(gMyEOLSequence); +// theSerializer->setEncoding(gOutputEncoding); + +// // plug in user's own error handler +// DOMErrorHandler *myErrorHandler = new FerrisDOMPrintErrorHandler(); +// theSerializer->setErrorHandler(myErrorHandler); + +// bool gSplitCdataSections = true; +// bool gDiscardDefaultContent = true; +// bool gWriteBOM = false; + + +// if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections)) +// theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections); + +// if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent)) +// theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent); + +// if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint)) +// theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint); + +// if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, gWriteBOM)) +// theSerializer->setFeature(XMLUni::fgDOMWRTBOM, gWriteBOM); + +// fh_stringstream ss; +// StringStreamFormatTarget* myFormTarget = new StringStreamFormatTarget( ss ); +// // MemBufFormatTarget* myFormTarget = new MemBufFormatTarget( 64000 ); + + + +// theSerializer->writeNode(myFormTarget, *doc); + + + + + + + +// // const XMLByte* membufdata = myFormTarget->getRawBuffer(); +// // unsigned int membufdatalen = myFormTarget->getLen(); + +// // fh_stringstream ss; +// // for( int i=0; igetFirstChild(); +// // // if (aNode.getNodeType() == DOMNode::XML_DECL_NODE) +// // // { +// // // DOMString aStr = ((DOM_XMLDecl &)aNode).getEncoding(); +// // // if (aStr != "") +// // // { +// // // encNameStr = aStr; +// // // } +// // // } +// // unsigned int lent = XMLString::stringLen( encNameStr ); +// // gEncodingName = new XMLCh[lent + 1]; +// // XMLString::copyNString( gEncodingName, encNameStr, lent ); +// // gEncodingName[lent] = 0; +// // } + + +// gFormatter = new XMLFormatter(X("UTF-8"), formatTarget, +// XMLFormatter::NoEscapes, gUnRepFlags); +// ss << doc; +// *gFormatter << chLF; // add linefeed in requested output encoding +// ss << flush; + +// delete gFormatter; + +// cerr << "tostream() ss:" << tostr(ss) << endl; + + +// return ss; + + } + + namespace Private + { + + class FERRISEXP_DLLLOCAL XMLPlatformUtilsKeeper + { + XMLPlatformUtilsKeeper( const XMLPlatformUtilsKeeper &); + XMLPlatformUtilsKeeper& operator=( const XMLPlatformUtilsKeeper &); + + public: + + XMLPlatformUtilsKeeper() + { + // Initialize the XML4C2 system + try + { +// cerr << "XMLPlatformUtilsKeeper()" << endl; +// BackTrace(); + + XMLPlatformUtils::Initialize(); +#ifdef HAVE_XALAN + XALAN_CPP_NAMESPACE::XalanTransformer::initialize(); +#endif + } + catch(const XMLException& toCatch) + { + fh_stringstream ss; + ss << "Error during Xerces-c Initialization.\n" + << " Exception message:" + << toCatch.getMessage() << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + } + + ~XMLPlatformUtilsKeeper() + { +// #ifdef HAVE_XALAN +// XalanTransformer::terminate(); +// #endif +// XMLPlatformUtils::Terminate(); + } + }; + + typedef Loki::SingletonHolder< + XMLPlatformUtilsKeeper, + Loki::CreateUsingNew, + Loki::NoDestroy + > XMLPlatformUtilsSingleton; + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + void addAllAttributes( DOMDocument* doc, DOMElement* e, fh_context root, fh_context c ) + { + typedef AttributeCollection::AttributeNames_t ant; + ant an; + c->getAttributeNames( an ); + + for( ant::iterator iter = an.begin(); iter != an.end(); ++iter ) + { + e->setAttribute( X(iter->c_str()), + X(getStrAttr( c, *iter, "unknown" ).c_str()) ); + } + } + + + DOMElement* addDOMNode( DOMDocument* doc, DOMElement* e, fh_context root, fh_context c ) + { + LG_XML_D << "addDOMNode(1) c:" << c->getURL() << endl; + + string rdn = getStrAttr( c, "name", "undefined" ); + LG_XML_D << "addDOMNode(1a) c:" << c->getURL() << endl; + LG_XML_D << "addDOMNode(1a) rdn:" << rdn << endl; + + DOMElement* childe; + + try + { + if( rdn.length() && isdigit(rdn[0]) ) + { + rdn = "x" + rdn; + LG_XML_D << "addDOMNode(1b) rdn:" << rdn << endl; + } + + rdn = "context"; + childe = doc->createElement( X(rdn.c_str()) ); + } + catch( DOMException& e ) + { + LG_XML_D << "dom e" << endl; + LG_XML_D << "Cought DOM exception:" << e.code << endl; + } + + + LG_XML_D << "addDOMNode(1b) c:" << c->getURL() << endl; + e->appendChild(childe); + + LG_XML_D << "addDOMNode(2) c:" << c->getURL() << endl; + addAllAttributes( doc, childe, root, c ); + + LG_XML_D << "addDOMNode(3) c:" << c->getURL() << endl; + + fh_istream ss = c->getIStream(); + DOMText* childVal = doc->createTextNode( X(StreamToString(ss).c_str()) ); + childe->appendChild( childVal ); + + return childe; + } + + + void addAllContexts( DOMDocument* doc, DOMElement* e, fh_context root, fh_context c ) + { + typedef ContextCollection::SubContextNames_t cnt; + cnt cn = c->getSubContextNames(); + + LG_XML_D << "addAllContexts() c:" << c->getURL() << endl; + + for( cnt::iterator iter = cn.begin(); iter != cn.end(); ++iter ) + { + fh_context child = c->getSubContext( *iter ); + LG_XML_D << "addAllContexts() child:" << child->getURL() << endl; + + DOMElement* childe = addDOMNode( doc, e, root, child ); + addAllContexts( doc, childe, root, child ); + } + } + + + }; + + namespace Factory + { + /** + * If one only uses xml4c from ferris and not directly then this + * method need not be used. This is provided so that a program can + * use ferris to negotiate XML and also the xml4c API direclty. + * If you wish direct xml4c API use call here first to make sure + * what xml4c is initialized, this method is impotent after the first + * call. Not that this also initilizes xalan if it was around when + * ferris was being built. + */ + void ensureXMLPlatformInitialized() + { + ::Ferris::Private::XMLPlatformUtilsKeeper& u = + ::Ferris::Private::XMLPlatformUtilsSingleton::Instance(); + } + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + static void throw_xml( int c ) + { + throw DOMException( c, 0 ); + } + +static short myCompareDocumentPosition(const DOMNode* x1, const DOMNode* other) +{ + const DOMNode* thisNode = x1; + + // If the nodes are the same... + if (thisNode == other) + return 0; + + // If either node is of type ENTITY or NOTATION, compare as disconnected + XERCES_CPP_NAMESPACE::DOMNode::NodeType thisType = thisNode->getNodeType(); + XERCES_CPP_NAMESPACE::DOMNode::NodeType otherType = other->getNodeType(); + + // If either node is of type ENTITY or NOTATION, compare as disconnected + if (thisType == DOMNode::ENTITY_NODE || + thisType == DOMNode::NOTATION_NODE || + otherType == DOMNode::ENTITY_NODE || + otherType == DOMNode::NOTATION_NODE ) + { + return DOMNode::DOCUMENT_POSITION_DISCONNECTED; + } + + //if this is a custom node, we don't really know what to do, just return + //user should provide its own compareTreePosition logic, and shouldn't reach here + if(thisType > 12) { + return 0; + } + + //if it is a custom node we must ask it for the order + if(otherType > 12) { +// cerr << "Custom node compare!" << endl; + return 0; + } + + // Find the ancestor of each node, and the distance each node is from + // its ancestor. + // During this traversal, look for ancestor/descendent relationships + // between the 2 nodes in question. + // We do this now, so that we get this info correct for attribute nodes + // and their children. + + const DOMNode *node; + const DOMNode *thisAncestor = x1; + const DOMNode *otherAncestor = other; + int thisDepth=0; + int otherDepth=0; + for (node = x1; node != 0; node = node->getParentNode()) { + thisDepth +=1; + if (node == other) + { + // The other node is an ancestor of this one. + return DOMNode::DOCUMENT_POSITION_PRECEDING; + } + thisAncestor = node; + } + + for (node=other; node != 0; node = node->getParentNode()) { + otherDepth +=1; + if (node == x1) + { + // The other node is a descendent of the reference node. + return DOMNode::DOCUMENT_POSITION_FOLLOWING; + } + otherAncestor = node; + } + + + const DOMNode *otherNode = other; + + XERCES_CPP_NAMESPACE::DOMNode::NodeType thisAncestorType = thisAncestor->getNodeType(); + XERCES_CPP_NAMESPACE::DOMNode::NodeType otherAncestorType = otherAncestor->getNodeType(); + + // if the ancestor is an attribute, get owning element. + // we are now interested in the owner to determine position. + + if (thisAncestorType == DOMNode::ATTRIBUTE_NODE) { +// cerr << "DOMNode::ATTRIBUTE_NODE" << endl; + thisNode = ((DOMAttrImpl *)thisAncestor)->getOwnerElement(); + } + if (otherAncestorType == DOMNode::ATTRIBUTE_NODE) { + otherNode = ((DOMAttrImpl *)otherAncestor)->getOwnerElement(); + } + + // Before proceeding, we should check if both ancestor nodes turned + // out to be attributes for the same element + if (thisAncestorType == DOMNode::ATTRIBUTE_NODE && + otherAncestorType == DOMNode::ATTRIBUTE_NODE && + thisNode==otherNode) + { + return 0; // EQUIVALENT; + } + + // Now, find the ancestor of the owning element, if the original + // ancestor was an attribute + + if (thisAncestorType == DOMNode::ATTRIBUTE_NODE) + { + thisDepth=0; + for (node=thisNode; node != 0; node = node->getParentNode()) + { + thisDepth +=1; + if (node == otherNode) + { + // The other node is an ancestor of the owning element + return DOMNode::DOCUMENT_POSITION_PRECEDING; + } + thisAncestor = node; + } + for (node=otherNode; node != 0; node = node->getParentNode()) + { + if (node == thisNode) + { + // The other node is an ancestor of the owning element + return DOMNode::DOCUMENT_POSITION_FOLLOWING; + } + } + } + + // Now, find the ancestor of the owning element, if the original + // ancestor was an attribute + if (otherAncestorType == DOMNode::ATTRIBUTE_NODE) + { + otherDepth=0; + for (node=otherNode; node != 0; node = node->getParentNode()) + { + otherDepth +=1; + if (node == thisNode) + { + // The other node is a descendent of the reference + // node's element + return DOMNode::DOCUMENT_POSITION_FOLLOWING; + } + otherAncestor = node; + } + for (node=thisNode; node != 0; node = node->getParentNode()) + { + if (node == otherNode) + { + // The other node is an ancestor of the owning element + return DOMNode::DOCUMENT_POSITION_PRECEDING; + } + } + } + + // thisAncestor and otherAncestor must be the same at this point, + // otherwise, we are not in the same tree or document fragment + if (thisAncestor != otherAncestor) + { +// cerr << "DOMNode::TREE_POSITION_DISCONNECTED 2" << endl; + return DOMNode::DOCUMENT_POSITION_DISCONNECTED; + } + + + // Determine which node is of the greatest depth. + if (thisDepth > otherDepth) + { + for (int i= 0 ; i < thisDepth - otherDepth; i++) + thisNode = thisNode->getParentNode(); + } + else + { + for (int i = 0; i < otherDepth - thisDepth; i++) + otherNode = otherNode->getParentNode(); + } + + // We now have nodes at the same depth in the tree. Find a common + // ancestor. + DOMNode *thisNodeP, *otherNodeP; + for (thisNodeP = thisNode->getParentNode(), + otherNodeP = otherNode->getParentNode(); + thisNodeP != otherNodeP;) + { + thisNode = thisNodeP; + otherNode = otherNodeP; + thisNodeP = thisNodeP->getParentNode(); + otherNodeP = otherNodeP->getParentNode(); + } + + // See whether thisNode or otherNode is the leftmost + for (DOMNode *current = thisNodeP->getFirstChild(); + current != 0; + current = current->getNextSibling()) + { + if (current == otherNode) + { + return DOMNode::DOCUMENT_POSITION_PRECEDING; + } + else if (current == thisNode) + { + return DOMNode::DOCUMENT_POSITION_FOLLOWING; + } + } + // REVISIT: shouldn't get here. Should probably throw an + // exception + return 0; +} + + + Ferris_DOMNodeList::Ferris_DOMNodeList() + {} + Ferris_DOMNodeList::~Ferris_DOMNodeList() + {} + + void + Ferris_DOMNodeList::push_back( DOMNode* n ) + { + m_col.push_back( n ); + } + + DOMNode* + Ferris_DOMNodeList::front() const + { + if( m_col.empty() ) + return 0; + return m_col.front(); + } + DOMNode* + Ferris_DOMNodeList::back() const + { + if( m_col.empty() ) + return 0; + return m_col.back(); + } + + DOMNode* + Ferris_DOMNodeList::item(XMLSize_t index) const + { + if( index >= m_col.size() ) + return 0; + return m_col[ index ]; + } + XMLSize_t + Ferris_DOMNodeList::getLength() const + { + return m_col.size(); + } + + /********************/ + /********************/ + /********************/ + + static DOMNodeList* getNullNodeList() + { + static Ferris_DOMNodeList* ret = new Ferris_DOMNodeList(); + return ret; + } + + /********************/ + /********************/ + /********************/ + + Ferris_DOMNamedNodeMap::Ferris_DOMNamedNodeMap( const DOMNode *ownerNod ) + { + LG_XML_D << "Ferris_DOMNamedNodeMap() this:" << (void*)this << endl; + } + Ferris_DOMNamedNodeMap::~Ferris_DOMNamedNodeMap() + { + LG_XML_D << "~Ferris_DOMNamedNodeMap() this:" << (void*)this << endl; + } + + DOMNode* + Ferris_DOMNamedNodeMap::setNamedItem(DOMNode *arg) + { + const XMLCh* kx = arg->getNodeName(); + string k = tostr(kx); + m_nodes[ k ] = arg; + } + + DOMNode* + Ferris_DOMNamedNodeMap::item(XMLSize_t index) const + { + if( index > m_nodes.size() ) + return 0; + + m_nodes_t::iterator ni = m_nodes.begin(); + advance( ni, index ); + return ni->second; + } + + DOMNode* + Ferris_DOMNamedNodeMap::getNamedItem(const XMLCh *xname) const + { + string k = tostr(xname); + m_nodes_t::iterator ni = m_nodes.find( k ); + if( ni != m_nodes.end() ) + return ni->second; + return 0; + } + + XMLSize_t + Ferris_DOMNamedNodeMap::getLength() const + { + return m_nodes.size(); + } + + DOMNode* + Ferris_DOMNamedNodeMap::removeNamedItem(const XMLCh *xname) + { + string k = tostr(xname); + m_nodes.erase( m_nodes.find( k )); + } + + DOMNode* + Ferris_DOMNamedNodeMap::getNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { + LG_DOM_D << "Ferris_DOMNamedNodeMap::getNamedItemNS() ns:" << tostr(namespaceURI) + << " local:" << tostr(localName) << endl; + return getNamedItem( localName ); + } + + DOMNode* + Ferris_DOMNamedNodeMap::setNamedItemNS(DOMNode *arg) + { + LG_DOM_D << "Ferris_DOMNamedNodeMap::setNamedItemNS()" << endl; + return setNamedItem( arg ); + } + + DOMNode* + Ferris_DOMNamedNodeMap::removeNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName) + { + LG_DOM_D << "Ferris_DOMNamedNodeMap::removeNamedItemNS()" << endl; + return removeNamedItem( localName ); + } + + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + + + Ferris_DOM_NamespaceImplier::Ferris_DOM_NamespaceImplier() + : + m_localName( 0 ), + m_nsURI( 0 ) + { + } + + + Ferris_DOM_NamespaceImplier::~Ferris_DOM_NamespaceImplier() + { + if( m_localName > (XMLCh*)1 ) + XMLString::release( &m_localName ); + if( m_nsURI > (XMLCh*)1 ) + XMLString::release( &m_nsURI ); + } + + const XMLCh* + Ferris_DOM_NamespaceImplier::common_getNamespaceURI( const XMLCh* name ) const + { +// return 0; + + if( m_nsURI == (XMLCh*)1 ) + return 0; + if( m_nsURI ) + return m_nsURI; + + string n = tostr( name ); + LG_DOM_D << __PRETTY_FUNCTION__ << " n:" << n << endl; + + if( starts_with( n, "http://" ) ) + { + int p = n.rfind("/"); + string ret = n.substr( 0, p+1 ); + LG_DOM_D << __PRETTY_FUNCTION__ << " ret:" << ret << endl; + m_nsURI = XMLString::transcode( ret.c_str() ); + return m_nsURI; + } + m_nsURI = (XMLCh*)1; + return 0; + } + + const XMLCh* + Ferris_DOM_NamespaceImplier::common_getLocalName( const XMLCh* name ) const + { +// return 0; + + if( m_localName == (XMLCh*)1 ) + return 0; + if( m_localName ) + return m_localName; + + string n = tostr( name ); + LG_DOM_D << __PRETTY_FUNCTION__ << " n:" << n << endl; + + if( starts_with( n, "http://" ) ) + { + int p = n.rfind("/"); + string ret = n.substr( p+1 ); + LG_DOM_D << __PRETTY_FUNCTION__ << " ret:" << ret << endl; + m_localName = XMLString::transcode( ret.c_str() ); + return m_localName; + } + + return name; +// return 0; + } + + + + + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + /********************/ + + +// class Ferris_DOMAttr; +// class Ferris_DOMElement; +// class Ferris_DOMDocument; +// FERRIS_SMARTPTR( Ferris_DOMNodeList, fhx_nodelist ); +// FERRIS_SMARTPTR( Ferris_DOMNamedNodeMap, fhx_namednodemap ); +// FERRIS_SMARTPTR( Ferris_DOMAttr, fhx_attr ); +// FERRIS_SMARTPTR( Ferris_DOMElement, fhx_element ); +// FERRIS_SMARTPTR( Ferris_DOMDocument, fhx_doc ); + + + class FERRISEXP_DLLLOCAL Ferris_DOMAttr + : + public DOMAttr, + public Handlable, + public Ferris_DOM_NamespaceImplier + { + DOMElement* m_element; //< element we are attached to + fh_context m_context; + string m_eaname; + XMLCh* m_xname; + mutable XMLCh* m_xvalue; + + protected: + Ferris_DOMAttr(const Ferris_DOMAttr &) {}; + Ferris_DOMAttr & operator = (const Ferris_DOMAttr &) {return *this;}; + + public: + Ferris_DOMAttr( DOMElement* xelement, fh_context c, const std::string& eaname ) + : + m_element( xelement ), + m_context( c ), + m_eaname( eaname ), + m_xvalue( 0 ) + { + m_xname = XMLString::transcode( m_eaname.c_str() ); + } + + virtual ~Ferris_DOMAttr() + { + if( m_xname ) + XMLString::release( &m_xname ); + if( m_xvalue ) + XMLString::release( &m_xvalue ); + }; + + virtual const XMLCh* getName() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname << endl; + return m_xname; + } + + + virtual bool getSpecified() const + { + return true; + } + + virtual const XMLCh* getValue() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname + << " m_context:" << m_context->getURL() + << endl; + if( m_xvalue ) + XMLString::release( &m_xvalue ); + + string v = getStrAttr( m_context, m_eaname, "" ); + m_xvalue = XMLString::transcode( v.c_str() ); + LG_DOM_D << __PRETTY_FUNCTION__ << " v:" << v << endl; + return m_xvalue; + } + + virtual void setValue(const XMLCh *xv) + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname << endl; + string v = tostr(xv); + setStrAttr( m_context, m_eaname, v ); +// changed(); + } + + // DOM2 // + virtual DOMElement* getOwnerElement() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname << endl; + return m_element; + } + + // DOM3 // + virtual bool isId() const + { + return false; + } + + + virtual const DOMTypeInfo * getSchemaTypeInfo() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname << endl; + return &DOMTypeInfoImpl::g_DtdNotValidatedAttribute; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + // DOMNode // + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + virtual const XMLCh* getNodeName() const + { + return getName(); + } + + virtual const XMLCh* getNodeValue() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " eaname:" << m_eaname << endl; + return getValue(); + } + + virtual XERCES_CPP_NAMESPACE::DOMNode::NodeType getNodeType() const + { +// cerr << "Ferris_Attr getNodeType()" << endl; + return ATTRIBUTE_NODE; + } + + virtual DOMNode* getParentNode() const + { + return getOwnerElement(); + } + virtual DOMNodeList *getChildNodes() const + { + return getNullNodeList(); + } + virtual DOMNode* getFirstChild() const + { + return 0; + } + virtual DOMNode* getLastChild() const + { + return 0; + } + virtual DOMNode* getPreviousSibling() const + { + return 0; + } + virtual DOMNode* getNextSibling() const + { + return 0; + } + virtual DOMNamedNodeMap *getAttributes() const + { + return 0; + } + virtual DOMDocument* getOwnerDocument() const + { + return m_element->getOwnerDocument(); + } + + virtual DOMNode* cloneNode(bool deep) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual DOMNode* insertBefore(DOMNode *newChild, + DOMNode *refChild) + { + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* replaceChild(DOMNode *newChild, + DOMNode *oldChild) + { + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* removeChild(DOMNode *oldChild) + { + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* appendChild(DOMNode *newChild) + { + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual bool hasChildNodes() const + { + return false; + } + + virtual void setNodeValue(const XMLCh *nodeValue) + { + setValue( nodeValue ); + } + + // DOM2 // + + virtual void normalize() + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool isSupported(const XMLCh *feature, + const XMLCh *version) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + string getNSURI( const XMLCh* input ) const + { + return ""; + } + virtual const XMLCh* getNamespaceURI() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " n:" << tostr(getName()) << endl; + return common_getNamespaceURI( getName() ); + } + +// if( m_nsURI == 1 ) +// return 0; +// if( m_nsURI ) +// return m_nsURI; + +// // LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented! n:" << tostr(getName()) << endl; + +// string n = tostr( getName() ); +// LG_DOM_D << __PRETTY_FUNCTION__ << " n:" << n << endl; + +// if( starts_with( n, "http://" ) ) +// { +// int p = n.rfind("/"); +// string ret = n.substr( 0, p+1 ); +// LG_DOM_D << __PRETTY_FUNCTION__ << " ret:" << ret << endl; +// m_nsURI = XMLString::transcode( ret.c_str() ); +// return m_nsURI; +// } +// m_nsURI = 1; +// return 0; +// } + virtual const XMLCh* getPrefix() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual const XMLCh* getLocalName() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " name:" << tostr(getName()) << endl; + return common_getLocalName( getName() ); +// // LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + +// string n = tostr( getName() ); +// LG_DOM_D << __PRETTY_FUNCTION__ << " n:" << n << endl; + +// if( starts_with( n, "http://" ) ) +// { +// int p = n.rfind("/"); +// string ret = n.substr( p+1 ); +// LG_DOM_D << __PRETTY_FUNCTION__ << " ret:" << ret << endl; +// XMLCh* r = XMLString::transcode( ret.c_str() ); +// return r; +// } + +// return 0; + } + virtual void setPrefix(const XMLCh * prefix) + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + + virtual bool hasAttributes() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + // DOM3 // + virtual bool isSameNode(const DOMNode* other) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual bool isEqualNode(const DOMNode* arg) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual void* setUserData(const XMLCh* key, + void* data, + DOMUserDataHandler* handler) + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void* getUserData(const XMLCh* key) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual const XMLCh* getBaseURI() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual short compareDocumentPosition(const DOMNode* other) const + { + return myCompareDocumentPosition( this, other ); + } + virtual const XMLCh* getTextContent() const + { + string v = getStrAttr( m_context, m_eaname, "", true ); + LG_DOM_D << __PRETTY_FUNCTION__ << " c:" << m_context->getURL() + << " v:" << v + << endl; + //return ((Ferris_DOMElement*)getOwnerElement())->cacheString( v )); + return XMLString::transcode( v.c_str() ); + } + virtual void setTextContent(const XMLCh* textContent) + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual const XMLCh* lookupPrefix( const XMLCh* namespaceURI ) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const + { + return true; + } + + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + + // non-standard // + virtual void release() + { + } + }; + + /********************/ + /********************/ + /********************/ + + + XMLCh* + Ferris_DOMElement::cacheString( const std::string& s ) const + { + LG_DOM_D << "element::cacheString() s:" << s << endl; + + m_xcache_t::iterator xi = m_xcache.find( s ); + if( xi != m_xcache.end() ) + { + return xi->second; + } + + XMLCh* xs = XMLString::transcode( s.c_str() ); + m_xcache[ s ] = xs; + return xs; + } + + + Ferris_DOMElement::Ferris_DOMElement( Ferris_DOMDocument* m_doc, + DOMNode* m_parent, + fh_context c ) + : + m_doc( m_doc ), + m_parent( m_parent ), + m_context( c ), + m_cache_getChildNodes( 0 ), + m_fAttributes( 0 ) + { + LG_DOM_D << "element::element() c:" << c->getURL() << endl; + } + Ferris_DOMElement::~Ferris_DOMElement() + { + for( m_xcache_t::iterator xi = m_xcache.begin(); xi != m_xcache.end(); ++xi ) + { + XMLString::release( &xi->second ); + } + } + + const XMLCh* + Ferris_DOMElement::getTagName() const + { + LG_DOM_D << "element::getTagName() c:" << m_context->getURL() << endl; + return cacheString( m_context->getDirName() ); + } + + DOMAttr* + Ferris_DOMElement::getAttributeNode(const XMLCh* xname) const + { + if( LG_DOM_ACTIVE ) + { + string n = tostr( xname ); + LG_DOM_D << "element::getAttributeNode() c:" << m_context->getURL() + << " n:" << n + << endl; + } + +// return getAttributeNode( tostr( xname ) ); + + if( shouldHideAttribute( xname ) ) + return 0; + return (DOMAttr *)ensure_fAttributes()->getNamedItem( xname ); + } + + DOMNodeList* + Ferris_DOMElement::getElementsByTagName(const XMLCh *name) const + { +// cerr << "element::getElementsByTagName() c:" << m_context->getURL() << endl; + DOMDocumentImpl *docImpl = (DOMDocumentImpl *)getOwnerDocument(); + return docImpl->getDeepNodeList( this, name ); +// LG_DOM_D << "element::getElementsByTagName() c:" << m_context->getURL() << endl; +// return 0; + } + + void + Ferris_DOMElement::setAttribute(const XMLCh *name, const XMLCh *value) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setAttribute() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMAttr* + Ferris_DOMElement::setAttributeNode(DOMAttr *newAttr) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setAttributeNode() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMAttr* + Ferris_DOMElement::removeAttributeNode(DOMAttr *oldAttr) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::removeAttributeNode() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + void + Ferris_DOMElement::removeAttribute(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::removeAttribute() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + // DOM2 // + const XMLCh* + Ferris_DOMElement::getAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { +// LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getAttributeNS() c:" << m_context->getURL() << endl; +// return 0; + + DOMAttr * attr= + (DOMAttr *)(ensure_fAttributes()->getNamedItemNS(namespaceURI, localName)); + return (attr==0) ? XMLUni::fgZeroLenString : attr->getValue(); + } + + void + Ferris_DOMElement::setAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLCh *value) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setAttributeNS() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + void + Ferris_DOMElement::removeAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::removeAttributeNS() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMAttr* + Ferris_DOMElement::getAttributeNodeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { +// LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getAttributeNodeNS() c:" << m_context->getURL() << endl; +// return 0; + return (DOMAttr *)ensure_fAttributes()->getNamedItemNS(namespaceURI, localName); + + } + + DOMAttr* + Ferris_DOMElement::setAttributeNodeNS(DOMAttr *newAttr) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setAttributeNodeNS() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMNodeList* + Ferris_DOMElement::getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { + DOMDocumentImpl *docImpl = (DOMDocumentImpl *)getOwnerDocument();; + return docImpl->getDeepNodeList( this, namespaceURI, localName ); +// LG_DOM_D << "element::getElementsByTagNameNS() c:" << m_context->getURL() << endl; +// return 0; + } + + // DOM3 // + void + Ferris_DOMElement::setIdAttribute(const XMLCh* name, bool isId ) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setIdAttribute() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + void + Ferris_DOMElement::setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setIdAttributeNS() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + void + Ferris_DOMElement::setIdAttributeNode(const DOMAttr *idAttr, bool isId) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setIdAttributeNode() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + const DOMTypeInfo* + Ferris_DOMElement::getSchemaTypeInfo() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getTypeInfo() c:" << m_context->getURL() << endl; + return 0; + } + + + /***********/ + /***********/ + // DOMNode // + /***********/ + /***********/ + + const XMLCh* + Ferris_DOMElement::getNodeName() const + { + LG_DOM_D << "element::getNodeName() c:" << m_context->getURL() + << " ret:" << tostr(getTagName()) + << endl; +// cerr << "getNodeName(element) m_context:" << m_context->getURL() +// << " type:" << getNodeType() +// << endl; + return getTagName(); + } + + const XMLCh* + Ferris_DOMElement::getNodeValue() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getNodeValue() c:" << m_context->getURL() << endl; + return 0; + } + + XERCES_CPP_NAMESPACE::DOMNode::NodeType + Ferris_DOMElement::getNodeType() const + { + LG_DOM_D << "element::getNodeType() c:" << m_context->getURL() << endl; +// cerr << "Ferris_Element getNodeType()" << endl; + return ELEMENT_NODE; + } + + DOMNode* + Ferris_DOMElement::getParentNode() const + { + LG_DOM_D << "element::getParentNode() c:" << m_context->getURL() << endl; + return m_parent; + } + Ferris_DOMNodeList* + Ferris_DOMElement::getChildNodes_sub() const + { + LG_DOM_D << "element::getChildNodes_sub() c:" << m_context->getURL() + << " m_cache_getChildNodes:" << toVoid( m_cache_getChildNodes ) + << endl; + + if( m_cache_getChildNodes && + m_cache_getChildNodes->getLength() != m_context->getSubContextCount() ) + { + m_cache_getChildNodes = 0; + } + + if( !m_cache_getChildNodes ) + { + m_cache_getChildNodes = new Ferris_DOMNodeList(); + try + { + LG_DOM_D << "element::getChildNodes_sub(start) c:" << m_context->getURL() + << " count:" << m_context->getSubContextCount() + << endl; + for( Context::iterator ci = m_context->begin(); ci != m_context->end(); ++ci ) + { + LG_DOM_D << "element::getChildNodes_sub() add:" << (*ci)->getURL() << endl; + Ferris_DOMElement* e = new Ferris_DOMElement( m_doc, + (Ferris_DOMElement*)this, + *ci ); + m_cache_getChildNodes->push_back( e ); + changed(); + } + } + catch( exception& e ) + { +// cerr << "getChildNodes_sub() m_context:" << m_context->getURL() +// << " e:" << e.what() +// << endl; + } + } + return GetImpl( m_cache_getChildNodes ); + } + DOMNodeList* + Ferris_DOMElement::getChildNodes() const + { + LG_DOM_D << "element::getChildNodes() c:" << m_context->getURL() << endl; + return getChildNodes_sub(); + } + DOMNode* + Ferris_DOMElement::getFirstChild() const + { + LG_DOM_D << "element::getFirstChild() c:" << m_context->getURL() << endl; + return getChildNodes_sub()->front(); + } + DOMNode* + Ferris_DOMElement::getLastChild() const + { + LG_DOM_D << "element::getLastChild() c:" << m_context->getURL() << endl; + return getChildNodes_sub()->back(); + } + DOMNode* + Ferris_DOMElement::getPreviousSibling() const + { + LG_DOM_D << "element::getPreviousSibling() c:" << m_context->getURL() << endl; + if( m_parent ) + { + DOMNodeList* nl = m_parent->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n == this && i ) + { + return nl->item( i-1 ); + } + } + } + return 0; + } + DOMNode* + Ferris_DOMElement::getNextSibling() const + { + LG_DOM_D << "element::getNextSibling() c:" << m_context->getURL() << endl; + if( m_parent ) + { + DOMNodeList* nl = m_parent->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n == this ) + { +// cerr << "getNextSibling() found ourself at i:" << i << endl; +// cerr << "getNextSibling() ret:" << toVoid(nl->item( i+1 )) << endl; + return nl->item( i+1 ); + } + } + } + return 0; + } + DOMDocument* + Ferris_DOMElement::getOwnerDocument() const + { + LG_DOM_D << "element::getOwnerDocument() c:" << m_context->getURL() << endl; + return (DOMDocument*)m_doc; + } + + DOMNode* + Ferris_DOMElement::cloneNode(bool deep) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::cloneNode() c:" << m_context->getURL() << endl; + return 0; + } + + DOMNode* + Ferris_DOMElement::insertBefore(DOMNode *newChild, + DOMNode *refChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::insertBefore() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMNode* + Ferris_DOMElement::replaceChild(DOMNode *newChild, + DOMNode *oldChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::replaceChild() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMNode* + Ferris_DOMElement::removeChild(DOMNode *oldChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::removeChild() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + DOMNode* + Ferris_DOMElement::appendChild(DOMNode *newChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::appendChild() c:" << m_context->getURL() << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + bool + Ferris_DOMElement::hasChildNodes() const + { + LG_DOM_D << "element::hasChildNodes() c:" << m_context->getURL() + << " ret:" << (m_context->begin() != m_context->end()) + << endl; + return m_context->begin() != m_context->end(); + } + + void + Ferris_DOMElement::setNodeValue(const XMLCh *nodeValue) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setNodeValue() c:" << m_context->getURL() << endl; + } + + DOMElement* Ferris_DOMElement::getFirstElementChild() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + DOMElement* Ferris_DOMElement::getLastElementChild() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + DOMElement* Ferris_DOMElement::getPreviousElementSibling() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + DOMElement* Ferris_DOMElement::getNextElementSibling() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + XMLSize_t Ferris_DOMElement::getChildElementCount() const + { + LG_DOM_D << __PRETTY_FUNCTION__ << " " << endl; + return m_context->getSubContextCount(); + } + + + + // DOM2 // + + void + Ferris_DOMElement::normalize() + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::normalize() c:" << m_context->getURL() << endl; + } + bool + Ferris_DOMElement::isSupported(const XMLCh *feature, + const XMLCh *version) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::isSupported() c:" << m_context->getURL() << endl; + return false; + } + const XMLCh* + Ferris_DOMElement::getNamespaceURI() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getNamespaceURI() c:" << m_context->getURL() << endl; + return 0; + } + const XMLCh* + Ferris_DOMElement::getPrefix() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getPrefix() c:" << m_context->getURL() << endl; + return 0; + } + const XMLCh* + Ferris_DOMElement::getLocalName() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " implemented as directory name..." << endl; + return getTagName(); + +// LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; +// LG_DOM_D << "element::getLocalName() c:" << m_context->getURL() << endl; +// return 0; + } + void + Ferris_DOMElement::setPrefix(const XMLCh * prefix) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setPrefix() c:" << m_context->getURL() << endl; + } + + bool + Ferris_DOMElement::hasAttributes() const + { + LG_DOM_D << "element::hasAttributes() c:" << m_context->getURL() << endl; + return true; + } + + // DOM3 // + bool + Ferris_DOMElement::isSameNode(const DOMNode* other) const + { + if( const Ferris_DOMElement* other_e = dynamic_cast( other )) + { + return m_context->getURL() == other_e->m_context->getURL(); + } + + LG_DOM_D << __PRETTY_FUNCTION__ << " c:" << m_context->getURL() << endl; + return false; + } + bool + Ferris_DOMElement::isEqualNode(const DOMNode* arg) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::isEqualNode() c:" << m_context->getURL() << endl; + return false; + } + void* + Ferris_DOMElement::setUserData(const XMLCh* key, + void* data, + DOMUserDataHandler* handler) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::setUserData() c:" << m_context->getURL() << endl; + return 0; + } + void* + Ferris_DOMElement::getUserData(const XMLCh* key) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getUserData() c:" << m_context->getURL() << endl; + return 0; + } + const XMLCh* + Ferris_DOMElement::getBaseURI() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getBaseURI() c:" << m_context->getURL() << endl; + return 0; + } + + short + Ferris_DOMElement::compareDocumentPosition(const DOMNode* other) const + { + LG_DOM_D << "element::compareDocumentPosition() c:" << m_context->getURL() << endl; + return myCompareDocumentPosition( this, other ); + } + const XMLCh* + Ferris_DOMElement::getTextContent() const + { + string v = getStrAttr( m_context, "content", "", true ); + LG_DOM_D << "element::getTextContent() c:" << m_context->getURL() + << " v:" << v + << endl; + return cacheString( v ); + } + void + Ferris_DOMElement::setTextContent(const XMLCh* textContent) + { + string v = tostr( textContent ); + LG_DOM_D << "element::setTextContent() c:" << m_context->getURL() + << " v:" << v + << endl; + setStrAttr( m_context, "content", v ); + changed(); + } + + const XMLCh* + Ferris_DOMElement::lookupPrefix( const XMLCh* namespaceURI ) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::lookupPrefix() c:" << m_context->getURL() << endl; + return 0; + } + + bool + Ferris_DOMElement::isDefaultNamespace(const XMLCh* namespaceURI) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::isDefaultNamespace() c:" << m_context->getURL() << endl; + return true; + } + + const XMLCh* + Ferris_DOMElement::lookupNamespaceURI(const XMLCh* prefix) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::lookupNamespaceURI() c:" << m_context->getURL() << endl; + return 0; + } + + void* + Ferris_DOMElement::getFeature(const XMLCh* feature, const XMLCh* version) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + LG_DOM_D << "element::getFeature() c:" << m_context->getURL() << endl; + return 0; + } + + + // non-standard // + void + Ferris_DOMElement::release() + { + LG_DOM_D << "element::release() c:" << m_context->getURL() << endl; + } + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL Ferris_DOMImplementation : public DOMImplementation + { + protected : + Ferris_DOMImplementation(const Ferris_DOMImplementation &) {}; // no copy construtor. + Ferris_DOMImplementation & operator = (const Ferris_DOMImplementation &) {return *this;}; // No Assignment + + + public: + Ferris_DOMImplementation() {}; + virtual ~Ferris_DOMImplementation() {}; + + virtual bool hasFeature(const XMLCh *feature, const XMLCh *version) const + { + return false; + } + + // DOM2 // + virtual DOMDocumentType *createDocumentType(const XMLCh *qualifiedName, + const XMLCh *publicId, + const XMLCh *systemId) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + DOMDocument* createDocument(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + DOMDocumentType *doctype, + MemoryManager* const manager) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const + { + return 0; + } + + // non standard // + DOMDocument* createDocument(MemoryManager* const manager) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + static DOMImplementation *getImplementation() + { + static Ferris_DOMImplementation ret; + return &ret; + } + + static bool loadDOMExceptionMsg( + const DOMException::ExceptionCode msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ) + { + return false; + } + + static bool loadDOMExceptionMsg( + const DOMRangeException::RangeExceptionCode msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ) + { + return false; + } + + // DOMBuilder* createDOMBuilder( const short mode, + // const XMLCh* const, + // MemoryManager* const manager, + // XMLGrammarPool* const gramPool) + // { + // throw_xml( DOMException::NOT_SUPPORTED_ERR ); + // } + + // DOMWriter* createDOMWriter(MemoryManager* const manager) + // { + // throw_xml( DOMException::NOT_SUPPORTED_ERR ); + // } + + // virtual DOMInputSource* createDOMInputSource() + // { + // throw_xml( DOMException::NOT_SUPPORTED_ERR ); + // } + + virtual DOMLSParser* createLSParser(const DOMImplementationLSMode mode, + const XMLCh* const schemaType, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager, + XMLGrammarPool* const gramPool = 0) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMLSSerializer* createLSSerializer(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMLSInput* createLSInput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMLSOutput* createLSOutput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) + { + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + + + }; + + + /********************************************************************************/ + + // DomImpl!! + class FERRISEXP_DLLLOCAL Ferris_DOMDocument + : +// public DOMDocument, + public DOMDocumentImpl, + public Handlable + { + fh_context m_root; + + mutable Ferris_DOMElement* m_rootelement; + mutable fhx_nodelist m_cache_getChildNodes; + bool m_hideXMLAttribute; + bool m_hideEmblemAttributes; + bool m_hideSchemaAttributes; + + RefVectorOf* m_fRanges; + + protected: +// Ferris_DOMDocument(const Ferris_DOMDocument &) {}; +// Ferris_DOMDocument & operator = (const Ferris_DOMDocument &) {return *this;}; + + public: + Ferris_DOMDocument( fh_context c ) + : + DOMDocumentImpl( (const XMLCh*)0, (const XMLCh*)0, + 0, // doctype + 0, // domImpl + 0 // mem manager + ), + m_root( c ), m_rootelement( 0 ), + m_cache_getChildNodes( 0 ), + m_fRanges(0), + m_hideXMLAttribute( true ), + m_hideEmblemAttributes( true ), + m_hideSchemaAttributes( true ) + { + LG_DOM_D << "Ferris_DOMDocument()" << endl; + }; + virtual ~Ferris_DOMDocument() + { + LG_DOM_D << "~Ferris_DOMDocument() this:" << toVoid(this) << endl; + }; + + + bool hideAsXMLAttribute() + { + return m_hideXMLAttribute; + } + void hideAsXMLAttribute( bool v ) + { + m_hideXMLAttribute = v; + } + + bool hideEmblemAttributes() + { + return m_hideEmblemAttributes; + } + void hideEmblemAttributes( bool v ) + { + m_hideEmblemAttributes = v; + } + + + bool hideSchemaAttributes() + { + return m_hideSchemaAttributes; + } + void hideSchemaAttributes( bool v ) + { + m_hideSchemaAttributes = v; + } + + + virtual DOMElement* createElement(const XMLCh *tagName) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMDocumentFragment* createDocumentFragment() + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMText* createTextNode(const XMLCh *data) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMComment* createComment(const XMLCh *data) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMCDATASection* createCDATASection(const XMLCh *data) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMProcessingInstruction* createProcessingInstruction( + const XMLCh *target, const XMLCh *data) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual DOMAttr* createAttribute(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual DOMEntityReference* createEntityReference(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual DOMDocumentType* getDoctype() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual DOMImplementation* getImplementation() const + { + return new Ferris_DOMImplementation(); + } + + virtual DOMElement* getDocumentElement() const + { + if( !m_rootelement ) + { + m_rootelement = new Ferris_DOMElement( (Ferris_DOMDocument*)this, + (DOMNode*)this, + m_root ); + } +// cerr << "getDocumentElement() m_root:" << m_root->getURL() +// << " m_rootelement:" << toVoid(m_rootelement) << endl; + return m_rootelement; + } + + virtual DOMNodeList* getElementsByTagName(const XMLCh *tagname) const + { + LG_XML_D << "getElementsByTagName() tag:" << tostr(tagname) << endl; + + ((Ferris_DOMDocument*)this)->changed(); + return ((Ferris_DOMDocument*)this)->getDeepNodeList( this, tagname ); + } + + + virtual DOMNode* importNode(DOMNode *importedNode, bool deep) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { + LG_XML_D << "getElementsByTagNameNS() ns:" << tostr(namespaceURI) + << " local:" << tostr(localName) + << endl; + + ((Ferris_DOMDocument*)this)->changed(); + return ((Ferris_DOMDocument*)this)->getDeepNodeList( + this, namespaceURI, localName ); +// throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + + virtual DOMElement* getElementById(const XMLCh *elementId) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + // DOM3 // + virtual const XMLCh* getActualEncoding() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setActualEncoding(const XMLCh* actualEncoding) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual const XMLCh* getEncoding() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setEncoding(const XMLCh* encoding) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool getStandalone() const + { + return true; + } + virtual void setStandalone(bool standalone) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual const XMLCh* getVersion() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setVersion(const XMLCh* version) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual const XMLCh* getDocumentURI() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setDocumentURI(const XMLCh* documentURI) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool getStrictErrorChecking() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual void setStrictErrorChecking(bool strictErrorChecking) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual DOMErrorHandler* getErrorHandler() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setErrorHandler(DOMErrorHandler* const handler) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual DOMNode* adoptNode(DOMNode* source) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NOT_SUPPORTED_ERR ); + } + virtual void normalizeDocument() + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool canSetNormalizationFeature(const XMLCh* const name, bool state) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual void setNormalizationFeature(const XMLCh* const name, bool state) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool getNormalizationFeature(const XMLCh* const name) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + + + // ----------------------------------------------------------------------- + // Non-standard extensions + // ----------------------------------------------------------------------- + virtual DOMEntity *createEntity(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual DOMDocumentType *createDocumentType(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNotation *createNotation(const XMLCh *name) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMElement *createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLSSize_t lineNum, + const XMLSSize_t columnNum) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + +// ProxyMemoryManager _memMgr; +// const DOMXPathNSResolver* createNSResolver( DOMNode* nodeResolver ) { +// return _memMgr.createNSResolver(nodeResolver); +// } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + // DOMNode // + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + virtual const XMLCh* getNodeName() const + { + const int cachelen = 100; + static XMLCh cache[cachelen+1]; + XMLString::transcode( "document", cache, cachelen ); + return cache; + } + + virtual const XMLCh* getNodeValue() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual XERCES_CPP_NAMESPACE::DOMNode::NodeType getNodeType() const + { +// cerr << "Ferris_Doc getNodeType()" << endl; + return DOCUMENT_NODE; + } + + virtual DOMNode* getParentNode() const + { + return 0; + } + virtual DOMNodeList *getChildNodes() const + { + LG_XML_D << "getChildNodes()" << endl; + if( !m_cache_getChildNodes ) + { + m_cache_getChildNodes = new Ferris_DOMNodeList(); + m_cache_getChildNodes->push_back( getDocumentElement() ); + } + return GetImpl( m_cache_getChildNodes ); + } + virtual DOMNode* getFirstChild() const + { + LG_XML_D << "getFirstChild()" << endl; +// cerr << "getFirstChild(begin) this:" << toVoid(this) << endl; + DOMNode* ret = getDocumentElement(); +// cerr << "getFirstChild() ret:" << toVoid(ret) << endl; +// cerr << "getFirstChild(end)" << endl; + return ret; + } + virtual DOMNode* getLastChild() const + { + LG_XML_D << "getLastChild()" << endl; + return getDocumentElement(); + } + virtual DOMNode* getPreviousSibling() const + { + return 0; + } + virtual DOMNode* getNextSibling() const + { + return 0; + } + virtual DOMNamedNodeMap *getAttributes() const + { + return 0; + } + virtual DOMDocument* getOwnerDocument() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual DOMNode* cloneNode(bool deep) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual DOMNode* insertBefore(DOMNode *newChild, + DOMNode *refChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* replaceChild(DOMNode *newChild, + DOMNode *oldChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* removeChild(DOMNode *oldChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual DOMNode* appendChild(DOMNode *newChild) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + virtual bool hasChildNodes() const + { + return true; + } + + virtual void setNodeValue(const XMLCh *nodeValue) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + + // DOM2 // + + virtual void normalize() + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + virtual bool isSupported(const XMLCh *feature, + const XMLCh *version) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual const XMLCh* getNamespaceURI() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual const XMLCh* getPrefix() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual const XMLCh* getLocalName() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setPrefix(const XMLCh * prefix) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + } + + virtual bool hasAttributes() const + { + return true; + } + + // DOM3 // + virtual bool isSameNode(const DOMNode* other) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual bool isEqualNode(const DOMNode* arg) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return false; + } + virtual void* setUserData(const XMLCh* key, + void* data, + DOMUserDataHandler* handler) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void* getUserData(const XMLCh* key) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual const XMLCh* getBaseURI() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual short compareDocumentPosition(const DOMNode* other) const + { + return myCompareDocumentPosition( this, other ); + } + virtual const XMLCh* getTextContent() const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + virtual void setTextContent(const XMLCh* textContent) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + throw_xml( DOMException::NO_MODIFICATION_ALLOWED_ERR ); + } + + virtual const XMLCh* lookupPrefix( const XMLCh* namespaceURI ) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const + { + return true; + } + + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + void* getFeature(const XMLCh* feature, const XMLCh* version) const + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + } + + + // non-standard // + virtual void release() + { + } + + // DOMDocumentTraversal // + virtual DOMNodeIterator* createNodeIterator(DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion) + { + LG_DOM_W << __PRETTY_FUNCTION__ << " not implemented!" << endl; + return 0; + +// if (!root) { +// throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0); +// return 0; +// } + +// DOMNodeIteratorImpl* nodeIterator = new (this) DOMNodeIteratorImpl(this, root, whatToShow, filter, entityReferenceExpansion); + +// if (fNodeIterators == 0L) { +// fNodeIterators = new (this) NodeIterators(1, false); +// } +// fNodeIterators->addElement(nodeIterator); + +// return nodeIterator; + } + + virtual DOMTreeWalker* createTreeWalker(DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion) + { + LG_XML_D << "createTreeWalker()" << endl; + if (!root) { + throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0); + return 0; + } + + return new (this) DOMTreeWalkerImpl(root, whatToShow, filter, entityReferenceExpansion); + } + + + // DOMDocumentRange // + virtual DOMRange* createRange() + { + LG_XML_D << "createRange()" << endl; + + MemoryManager* const fMemoryManager = XMLPlatformUtils::fgMemoryManager; + + DOMRangeImpl* range = new (this) DOMRangeImpl(this, fMemoryManager); + + if (m_fRanges == 0L) { + //m_fRanges = new (this) Ranges(1, false); + m_fRanges = new (fMemoryManager) Ranges(1, false, fMemoryManager); // XMemory + } + m_fRanges->addElement(range); + return range; + +// DOMRangeImpl* range = new (this) DOMRangeImpl(this); + +// if (m_fRanges == 0L) { +// MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager; +// m_fRanges = new (this) RefVectorOf(1, false, manager); +// } +// m_fRanges->addElement(range); +// return range; + } + }; + + void + Ferris_DOMElement::changed() const + { + m_doc->changed(); + } + + int + Ferris_DOMElement::changes() const + { + return m_doc->changes(); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + bool + Ferris_DOMElement::shouldHideAttribute( const XMLCh* xname ) const + { + string n = tostr( xname ); + + if( m_doc->hideAsXMLAttribute() && ( n == "as-xml" || n == "as-rdf" ) ) + return true; + + return false; + } + + const XMLCh* + Ferris_DOMElement::getAttribute(const XMLCh* xname) const + { + LG_DOM_D << "element::getAttribute() c:" << m_context->getURL() << endl; + + if( shouldHideAttribute( xname ) ) + return XMLUni::fgZeroLenString; + + DOMNode * attr = ensure_fAttributes()->getNamedItem( xname ); + if (attr) + return attr->getNodeValue(); + + return XMLUni::fgZeroLenString; + + +// string n = tostr( xname ); +// if( m_doc->hideAsXMLAttribute() && ( n == "as-xml" || n == "as-rdf" ) ) +// return 0; + +// string v = getStrAttr( m_context, n, "" ); +// return cacheString( v ); + } +// DOMAttr* +// Ferris_DOMElement::getAttributeNode( const std::string& n ) const +// { +// LG_DOM_D << "element::getAttributeNode() c:" << m_context->getURL() << endl; + +// if( m_doc->hideAsXMLAttribute() && ( n == "as-xml" || n == "as-rdf" ) ) +// return 0; +// m_xattrcache_t::iterator ci = m_xattrcache.find( n ); +// if( ci != m_xattrcache.end() ) +// { +// return GetImpl(ci->second); +// } +// fhx_attr a = new Ferris_DOMAttr( (Ferris_DOMElement*)this, m_context, n ); +// m_xattrcache[ n ] = a; +// return GetImpl(a); +// } + bool + Ferris_DOMElement::hasAttribute(const XMLCh* xname) const + { + LG_DOM_D << "element::hasAttribute() c:" << m_context->getURL() << endl; + + string n = tostr( xname ); + if( m_doc->hideAsXMLAttribute() && ( n == "as-xml" || n == "as-rdf" ) ) + return false; + return m_context->isAttributeBound( n ); + } + bool + Ferris_DOMElement::hasAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const + { + LG_DOM_D << "element::hasAttributeNS() c:" << m_context->getURL() << endl; + return hasAttribute( localName ); + } + + Ferris_DOMNamedNodeMap* + Ferris_DOMElement::ensure_fAttributes() const + { + if( !m_fAttributes ) + { + m_fAttributes = new (getOwnerDocument()) Ferris_DOMNamedNodeMap( this ); + + typedef AttributeCollection::AttributeNames_t ant; + ant an; + m_context->getAttributeNames( an ); + + LG_DOM_D << "element::fAttributes(setup1) an.sz:" << an.size() << endl; + + for( ant::iterator iter = an.begin(); iter != an.end(); ++iter ) + { + const string eaname = *iter; + if( m_doc->hideAsXMLAttribute() && ( eaname == "as-xml" || eaname == "as-rdf" ) ) + continue; + if( m_doc->hideSchemaAttributes() && starts_with( eaname, "schema:" ) ) + continue; + if( m_doc->hideEmblemAttributes() && starts_with( eaname, "emblem:" ) ) + continue; + + LG_DOM_D << "element::fAttributes(setup2) eaname:" << eaname << endl; + +// DOMAttr* n = getAttributeNode( eaname ); + DOMAttr* n = new Ferris_DOMAttr( (Ferris_DOMElement*)this, m_context, eaname ); + m_fAttributes->setNamedItem( n ); + } + LG_DOM_D << "element::fAttributes(setup-end) c:" << m_context->getURL() + << " sz:" << m_fAttributes->getLength() << endl; + } + return m_fAttributes; + } + + DOMNamedNodeMap* + Ferris_DOMElement::getAttributes() const + { + LG_DOM_D << "element::getAttributes() c:" << m_context->getURL() << endl; + + Ferris_DOMNamedNodeMap* ret = ensure_fAttributes(); + return ret; + +// m_cache_getAttributes = 0; +// m_cache_getAttributes = new (getOwnerDocument()) Ferris_DOMNamedNodeMap( this ); +// // FIXME:! +// m_cache_getAttributes->AddRef(); + +// typedef AttributeCollection::AttributeNames_t ant; +// ant an; +// m_context->getAttributeNames( an ); + +// LG_DOM_D << "element::getAttributes() an.sz:" << an.size() << endl; + +// for( ant::iterator iter = an.begin(); iter != an.end(); ++iter ) +// { +// const string eaname = *iter; +// if( m_doc->hideAsXMLAttribute() && ( eaname == "as-xml" || eaname == "as-rdf" ) ) +// continue; +// if( m_doc->hideSchemaAttributes() && starts_with( eaname, "schema:" ) ) +// continue; +// if( m_doc->hideEmblemAttributes() && starts_with( eaname, "emblem:" ) ) +// continue; + +// LG_DOM_D << "element::getAttributes() eaname:" << eaname << endl; + +// DOMAttr* n = getAttributeNode( eaname ); +// m_cache_getAttributes->setNamedItem( n ); +// } +// LG_DOM_D << "element::getAttributes() c:" << m_context->getURL() +// << " sz:" << m_cache_getAttributes->getLength() << endl; + +// return GetImpl( m_cache_getAttributes ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + fh_domdoc makeDOM( fh_context c, + bool hideXMLAttribute, + bool hideEmblemAttributes, + bool hideSchemaAttributes ) + { + LG_XML_D << "makeDOM(1)" << endl; + ensureXMLPlatformInitialized(); + + Ferris_DOMDocument* doc = new Ferris_DOMDocument( c ); + fh_domdoc ret = doc; + doc->hideAsXMLAttribute( hideXMLAttribute ); + doc->hideEmblemAttributes( hideEmblemAttributes ); + doc->hideSchemaAttributes( hideSchemaAttributes ); + + return ret; + } + + + fh_context + mountDOM( fh_domdoc dom, const std::string& forcedURLPrefix ) + { + RootContextFactory fac; + +// fh_stringstream ss = tostream( dom ); +// fac.setContextClass( "xml" ); +// fac.AddInfo( RootContextFactory::ROOT, "/" ); +// fac.AddInfo( "StaticString", StreamToString(ss) ); +// fac.AddInfo( "forcedURLPrefix", forcedURLPrefix ); +// fh_context c = fac.resolveContext( RESOLVE_EXACT ); + +// fh_stringstream ss = tostream( dom ); + + fac.setContextClass( "xml" ); + fac.AddInfo( RootContextFactory::ROOT, "/" ); + { + stringstream ss; + ss << (void*)&dom; +// ss << (void*)GetImpl(dom); +// cerr << "setting dom.ptr:" << (void*)GetImpl(dom) << " dom.str:" << ss.str() << endl; + fac.AddInfo( "StaticDOM", ss.str() ); + } + + fac.AddInfo( "forcedURLPrefix", forcedURLPrefix ); + fh_context c = fac.resolveContext( RESOLVE_EXACT ); + + return c; + } + + + fh_context + mountDOM( fh_domdoc dom ) + { + return mountDOM( dom, "" ); + } + + class FERRISEXP_DLLLOCAL FerrisErrorHandler + : + public ErrorHandler + { + public: + FerrisErrorHandler() + {} + virtual ~FerrisErrorHandler() + {} + + virtual void warning(const SAXParseException& e) + { + LG_XML_W << "\nWarning at (file " << StrX(e.getSystemId()) + << ", line " << e.getLineNumber() + << ", char " << e.getColumnNumber() + << "): " << StrX(e.getMessage()) << endl; + } + + virtual void error(const SAXParseException& e) + { + LG_XML_I << "\nError at (file " << StrX(e.getSystemId()) + << ", line " << e.getLineNumber() + << ", char " << e.getColumnNumber() + << "): " << StrX(e.getMessage()) << endl; + } + + + virtual void fatalError(const SAXParseException& e) + { + LG_XML_ER << "\nFatal Error at (file " << StrX(e.getSystemId()) + << ", line " << e.getLineNumber() + << ", char " << e.getColumnNumber() + << "): " << StrX(e.getMessage()) << endl; + } + + virtual void resetErrors() + { + } + + private : + FerrisErrorHandler(const FerrisErrorHandler&); + void operator=(const FerrisErrorHandler&); + }; + + std::string& StreamToString( fh_stringstream& ss, std::string& ret ) + { + ret = ss.str(); + return ret; + } + + /** + * turn an input stream into an XML dom document + * + * @throws XMLParse if there were errors parsing the XML at iss + */ + fh_domdoc + StringToDOM( const std::string& s ) + { + ensureXMLPlatformInitialized(); + + + XMLFormatter::UnRepFlags gUnRepFlags = XMLFormatter::UnRep_CharRef; + +// auto_ptr< FerrisErrorHandler > ehan( new FerrisErrorHandler ); +// auto_ptr< XercesDOMParser > parser( new XercesDOMParser ); + // + // making these is relatively expensive. just make one and leak it. + // + static FerrisErrorHandler* ehan = 0; + if( !ehan ) + ehan = new FerrisErrorHandler(); + static XercesDOMParser* parser = 0; + if( !parser ) + { + parser = new XercesDOMParser(); + parser->setLoadExternalDTD( false ); + parser->setValidationScheme( XercesDOMParser::Val_Never ); +// parser->setDoNamespaces( 0 ); + parser->setDoNamespaces( 1 ); + parser->setDoSchema( 0 ); + parser->setErrorHandler( ehan ); + +// parser->setDoValidation( false ); +// parser->setErrorHandler( ehan.get() ); + } + + LG_XML_D << "doc:" << s << endl; + + int xl = s.length(); + const XMLByte* xb = (const XMLByte *)(s.data()); + MemBufInputSource xmlsrc( xb, xl, "rdn" ); + parser->parse( xmlsrc ); + + LG_XML_D << "error count:" << parser->getErrorCount() << endl; + if( parser->getErrorCount() ) + { + fh_stringstream ss; + ss << "Errors encountered creating DOM from stream. count:" + << parser->getErrorCount() + << " input:" << s + << endl; + int errorCount = parser->getErrorCount(); + fh_domdoc doc = parser->adoptDocument(); + + Throw_XMLParse( tostr(ss), errorCount, doc ); + } + return parser->adoptDocument(); + } + + fh_domdoc StreamToDOM( fh_stringstream& iss ) + { + return StringToDOM( tostr( iss ) ); + } + + + fh_domdoc StreamToDOM( fh_istream iss ) + { + return StringToDOM( StreamToString( iss ) ); + } + + + DOMImplementation* getDefaultDOMImpl() + { + ensureXMLPlatformInitialized(); + + XMLCh tempStr[100]; + XMLString::transcode("LS", tempStr, 99); + DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation( tempStr ); + return impl; + } + + fh_domdoc makeDOM( const std::string& rootname ) + { + DOMImplementation *impl = Factory::getDefaultDOMImpl(); + fh_domdoc doc = 0; + + if( !rootname.empty() ) + doc = impl->createDocument( 0, X(rootname.c_str()), 0 ); + else + doc = impl->createDocument(); + + return doc; + } + + + }; + + +// static DOMString xstr( const std::string& s ) +// { +// return DOMString( s.c_str() ); +// } + + + void setAttribute( DOMElement* e, const std::string& k, const std::string& v ) + { + e->setAttribute( X(k.c_str()), X(v.c_str()) ); + } + + void ensureAttribute( DOMDocument* dom, + DOMElement* e, const std::string& k, const std::string& v ) + { + if( !e->hasAttribute( X( k.c_str() ) ) ) + dom->createAttribute( X(k.c_str()) ); + + setAttribute( e, k, v ); + } + + + + string getAttribute( const DOMElement* e, XMLCh* kx ) + { + const XMLCh* vx = e->getAttribute( kx ); + string ret = tostr(vx); + return ret; + } + + string getAttribute( DOMElement* e, const std::string& k ) + { + XMLCh* kx = XMLString::transcode( k.c_str() ); + const XMLCh* vx = e->getAttribute( kx ); + XMLString::release( &kx ); + string ret = tostr(vx); + return ret; + } + + string getAttribute( const DOMElement* e, const std::string& k ) + { + XMLCh* kx = XMLString::transcode( k.c_str() ); + const XMLCh* vx = e->getAttribute( kx ); + XMLString::release( &kx ); + string ret = tostr(vx); + return ret; + +// XMLCh kx[4000]; +// XMLString::transcode( k.c_str(), kx, 200 ); +// const XMLCh* vx = e->getAttribute( kx ); +// char ctmp[4000]; +// XMLString::transcode( vx, ctmp, 99 ); +// return ctmp; + } + + void setAttributeNS( DOMElement* e, + const std::string& ns, + const std::string& k, + const std::string& v ) + { + if( !e ) + { + stringstream ss; + ss << "Can not create attribute k:" << k << endl; + Throw_FerrisCreateAttributeFailed( ss.str(), 0 ); + } + + if( ns.empty() ) + e->setAttribute( X(k.c_str()), X(v.c_str()) ); + else + e->setAttributeNS( X(ns.c_str()), X(k.c_str()), X(v.c_str()) ); + } + + std::string getAttributeNS( const DOMElement* e, + const std::string& ns, + const std::string& k ) + { + if( ns.empty() ) + return getAttribute( e, k ); + + XMLCh* nsx = XMLString::transcode( ns.c_str() ); + XMLCh* kx = XMLString::transcode( k.c_str() ); + const XMLCh* vx = e->getAttributeNS( nsx, kx ); + XMLString::release( &nsx ); + XMLString::release( &kx ); + string ret = tostr(vx); + return ret; + } + + + FERRISEXP_API std::string getStrSubCtx( DOMNode* c, + std::string subname, + std::string def, + bool getAllLines, + bool throw_for_errors ) + { + DOMElement* x = XML::getChildElement( c, subname.c_str() ); + if( !x ) + return def; + return XML::getChildText( x ); + } + + + void + EAUpdateErrorHandler_cerr::handleError( fh_context c, + const std::string& eaname, + const std::string& what ) + { + cerr << "EAUpdateErrorHandler c:" << c->getURL() << endl; + cerr << " eaname:" << eaname << " what:" << what << endl; + } + + namespace XML + { + /** + * Write a user message to the stream oss. Some out-of-band data is + * attached as a packet header and the program must use readMessage() + * to get data identical to 'm' back again. + */ + void writeMessage( fh_ostream oss, const stringmap_t& m ) + { +// LG_JOURNAL_D << "writeMsg(begin)" << endl; + Factory::ensureXMLPlatformInitialized(); + + DOMImplementation *impl = Factory::getDefaultDOMImpl(); + fh_domdoc doc = impl->createDocument( 0, X("msg"), 0 ); + DOMElement* root = doc->getDocumentElement(); + + string pid = tostr( getpid() ); + setAttribute( root, "pid", tostr( getpid() ) ); + setAttribute( root, "message-version", "1" ); +// LG_JOURNAL_D << "writeMsg() pid:" << pid << endl; + + for( stringmap_t::const_iterator mi = m.begin(); mi != m.end(); ++mi ) + { + const string& k = mi->first; + const string& v = mi->second; + + DOMElement* e = doc->createElement( X("keyval") ); + root->appendChild( e ); + setAttribute( e, "key", k ); + setAttribute( e, "value", v ); + } + + fh_stringstream ss = tostream( doc ); +// LG_JOURNAL_D << "writeMsg() ss:" << tostr(ss) << endl; + + std::copy( std::istreambuf_iterator(ss), + std::istreambuf_iterator(), + std::ostreambuf_iterator(oss)); + oss << flush; + } + + + /** + * Recreate the map data that was written using writeMessage() + * + * takes the map to alter as 'ret' to avoid copying a stringmap on return + */ + static stringmap_t& readMessage( const std::string& s, stringmap_t& ret ) + { + Factory::ensureXMLPlatformInitialized(); + static XMLCh* k_pid = XMLString::transcode( "pid" ); + static XMLCh* k_key = XMLString::transcode( "key" ); + static XMLCh* k_value = XMLString::transcode( "value" ); + + fh_domdoc doc = Factory::StringToDOM( s ); + DOMElement* root = doc->getDocumentElement(); +// string pid = getAttribute( root, "pid" ); + string pid = getAttribute( root, k_pid ); + + DOMNodeList* nl = root->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + +// string k = getAttribute( child, "key" ); +// string v = getAttribute( child, "value" ); +// ret[ k ] = v; + ret[ getAttribute( child, k_key ) ] = getAttribute( child, k_value ); + } + } + + return ret; + } + + stringmap_t& readMessage( fh_stringstream& iss, stringmap_t& ret ) + { + return readMessage( tostr( iss ), ret ); + } + + stringmap_t& readMessage( fh_istream iss, stringmap_t& ret ) + { + return readMessage( StreamToString( iss ), ret ); + } + + /** + * Write a list of string data to the stream such that + * the list can be read back using readList() + */ + void writeList( fh_ostream oss, const stringlist_t& l ) + { + stringmap_t m; + for( stringlist_t::const_iterator li = l.begin(); li != l.end(); ++li ) + m[ *li ] = ""; + writeMessage( oss, m ); + } + + stringlist_t& readList( fh_istream iss, stringlist_t& ret ) + { + stringmap_t m; + readMessage( iss, m ); + copy( map_domain_iterator( m.begin() ), + map_domain_iterator( m.end() ), + back_inserter( ret ) ); + return ret; + } + + + + /** + * Create XML describing the contents and EA for this context. + * optionally include the whole subtree in the output + * + * Note that recurse is currently ignored + */ + std::string contextToXML( fh_context c, bool recurse, bool includeContent ) + { + Factory::ensureXMLPlatformInitialized(); + + DOMImplementation *impl = Factory::getDefaultDOMImpl(); + fh_domdoc doc = impl->createDocument( 0, X("context"), 0 ); + + DOMElement* root = doc->getDocumentElement(); +// doc->appendChild( root ); + setAttribute( root, "taken-from-url", c->getURL() ); + + typedef AttributeCollection::AttributeNames_t::iterator I; + AttributeCollection::AttributeNames_t an; + c->getAttributeNames( an ); + + for( I ai = an.begin(); ai != an.end(); ++ai ) + { + string k = *ai; + if( !includeContent && k == "content" ) + continue; + if( k == "as-xml" ) + continue; + if( k == "as-rdf" ) + continue; + + try + { + string v = getStrAttr( c, k, "", true, true ); + + DOMElement* e = doc->createElement( X("keyval") ); + root->appendChild( e ); + setAttribute( e, "key", k ); +// setAttribute( e, "value", v ); + DOMText* payload = doc->createTextNode( X(v.c_str())); + e->appendChild( payload ); + } + catch( exception& e ) + { + } + } + +// string content = getStrAttr( c, "content", "", true, true ); +// DOMText* t = doc->createTextNode( X(content.c_str()) ); +// root->appendChild( t ); + + fh_stringstream retss = tostream( doc ); + return tostr( retss ); + } + + + + /** + * Get a child element node of basenode with has a attribute + * childattr=childvalue + * return 0 for failure to find such a node. + */ + static DOMNode* getChildNode( DOMNode* basenode, + const std::string& childattr, + const std::string& childvalue ) + { + DOMNodeList* nl = basenode->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + string k = getAttribute( child, childattr ); + if( k == childvalue ) + return child; + } + } + return 0; + } + + domnode_list_t getChildren( DOMElement* element ) + { + domnode_list_t nl; + getChildren( nl, element ); + return nl; + } + + + domnode_list_t& getChildren( domnode_list_t& nl, DOMElement* element ) + { + for( DOMNode* child = element->getFirstChild(); + child != 0; child = child->getNextSibling()) + { + nl.push_back( child ); + } + return nl; + } + + bool allWhitespaceNodes( DOMElement* element ) + { + bool ret = true; + + for( DOMNode* child = element->getFirstChild(); child != 0; child = child->getNextSibling()) + { + if( child->getNodeType() == DOMNode::TEXT_NODE ) + { + if( !XMLString::isWSCollapsed( child->getNodeValue() ) ) + { + return false; + } + } + } + return ret; + } + + string getChildText( DOMElement* n ) + { + if( !n ) + return ""; + + DOMNodeList* nl = n->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n->getNodeType() == DOMNode::TEXT_NODE ) + { + DOMText* x = (DOMText*)n; + return tostr( x->getData() ); + } + } + return ""; + } + + const std::string& setChildText( fh_domdoc doc, DOMElement* n, const std::string& s ) + { + removeAllTextChildren( n ); + DOMText* t = doc->createTextNode( X(s.c_str()) ); + n->appendChild( t ); + return s; + } + + const std::string& setChildText( DOMDocument* doc, DOMElement* n, const std::string& s ) + { + removeAllTextChildren( n ); + DOMText* t = doc->createTextNode( X(s.c_str()) ); + n->appendChild( t ); + return s; + } + + + void removeAllTextChildren( DOMElement* element ) + { + domnode_list_t nl; + getChildren( nl, element ); + + for( domnode_list_t::const_iterator ni = nl.begin(); ni!=nl.end(); ++ni ) + { + DOMNode* child = *ni; + LG_XML_D << "found child:" << tostr(child->getNodeName()) << endl; + if( child->getNodeType() == DOMNode::TEXT_NODE ) + { + LG_XML_D << "removing child:" << tostr(child->getNodeName()) << endl; + element->removeChild( child ); + } + } + } + + + static void applyXMLChange( fh_context c, + DOMElement* root, + fh_EAUpdateErrorHandler eh, + string key, + stringlist_t& eavaluelist ) + { + for( stringlist_t::iterator si = eavaluelist.begin(); + si != eavaluelist.end(); ++si ) + { + if( DOMNode* n = getChildNode( root, key, *si ) ) + { + DOMElement* child = (DOMElement*)n; +// string v = getAttribute( child, "value" ); + string v = getChildText( child ); + + try + { +// cerr << "applyXMLChange() k:" << *si << " v:" << v << endl; + setStrAttr( c, *si, v, true, true ); + } + catch( exception& e ) + { + eh->handleError( c, *si, e.what() ); + } + } + } + } + + + /** + * given XML data from contextToXML() update the contents and EA + * for this context to be what is given in s + * + * Note that a recursive change set can be given but recursion ignored. + * + * @param eh A object that is called to perform error handling. + * under some conditions a client may wish to ignore errors + * updating some EA, for example ctime updates will probably + * fail for filesystems. The default is to ignore all errors + * silently + */ + void updateFromXML( fh_context c, const std::string& xml_data, + bool recurse, + fh_EAUpdateErrorHandler eh ) + { + if( !eh ) + eh = new EAUpdateErrorHandler_Null; + + Factory::ensureXMLPlatformInitialized(); + + fh_stringstream iss; + iss << xml_data; + fh_domdoc doc = Factory::StreamToDOM( iss ); + DOMElement* root = doc->getDocumentElement(); + + stringlist_t firstAttributes; + firstAttributes.push_back( "mode" ); + firstAttributes.push_back( "group-owner-number" ); + firstAttributes.push_back( "user-owner-number" ); + firstAttributes.push_back( "content" ); + applyXMLChange( c, root, eh, "key", firstAttributes ); + + + stringlist_t allAttributes; + DOMNodeList* nl = root->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + string k = getAttribute( child, "key" ); + allAttributes.push_back( k ); + } + } + applyXMLChange( c, root, eh, "key", allAttributes ); + + + stringlist_t postAttributes; + postAttributes.push_back( "content" ); + postAttributes.push_back( "mtime" ); + postAttributes.push_back( "atime" ); + applyXMLChange( c, root, eh, "key", postAttributes ); + } + + DOMElement* createElement( fh_domdoc doc, + DOMElement* parent, + const std::string& childname ) + { + DOMElement* ret = doc->createElement( X(childname.c_str()) ); + parent->appendChild( ret ); + return ret; + } + + + DOMElement* getChildElement( DOMNode* node, const std::string& name ) + { + DOMNodeList* nl = node->getChildNodes(); + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + if( tostr(child->getNodeName()) == name ) + { + return child; + } + } + } + return 0; + } + + std::list< DOMElement* > getAllChildrenElements( DOMNode* node, + const std::string& name, + bool recurse ) + { + std::list< DOMElement* > ret; + getAllChildrenElements( node, name, ret, recurse ); + return ret; + } + + std::list< DOMElement* >& getAllChildrenElements( DOMNode* node, + const std::string& name, + std::list< DOMElement* >& ret, + bool recurse ) + { + DOMNodeList* nl = node->getChildNodes(); + + for( int i=0; i < nl->getLength(); ++i ) + { + DOMNode* n = nl->item( i ); + + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + if( tostr(child->getNodeName()) == name ) + { + ret.push_back( child ); + } + + if( recurse ) + { + getAllChildrenElements( child, name, ret, recurse ); + } + + } + } + return ret; + } + + DOMElement* + firstChild( DOMNode* node, const std::string& name ) + { + std::list< DOMElement* > l = XML::getAllChildrenElements( node, name, true ); + if( l.empty() ) + return 0; + return *(l.begin()); + } + + + }; + + namespace Private + { + class FERRISEXP_API FerrisIStreamBinMemInputStream : public BinInputStream + { + fh_istream m_iss; + + public: + FerrisIStreamBinMemInputStream( const fh_istream& iss ) + : + m_iss( iss ) + { + } + + virtual XMLFilePos curPos() const + { + return 0; + } + + XMLSize_t readBytes( XMLByte* const toFill, XMLSize_t maxToRead) + { + m_iss.read( (char*)toFill, maxToRead ); + unsigned int ret = m_iss.gcount(); +// cerr << "readBytes() max:" << maxToRead << " got:" << ret << endl; + return ret; + } + virtual const XMLCh* getContentType() const + { + return 0; + } + + + }; + + class FERRISEXP_API FerrisIStreamInputSource : public InputSource + { + fh_istream m_iss; + + public: + FerrisIStreamInputSource( + const fh_istream& iss, + const char* const bufId, + MemoryManager* const manager) + : + InputSource(bufId, manager), + m_iss( iss ) + { + } + + BinInputStream* makeStream() const + { +// return new (getMemoryManager()) FerrisIStreamBinMemInputStream( m_iss ); + return new FerrisIStreamBinMemInputStream( m_iss ); +// return 0; + } + }; + }; + + namespace Factory + { + InputSource* makeInputSource( const fh_istream& iss, + const char* const bufId, + MemoryManager* const manager ) + { + Private::FerrisIStreamInputSource* ret = new Private::FerrisIStreamInputSource( + iss, bufId, manager ); + return ret; + } + InputSource* makeInputSource( const fh_context& c ) + { + string earl = c->getURL(); + fh_istream iss = c->getIStream(); + return makeInputSource( iss, earl.c_str(), XMLPlatformUtils::fgMemoryManager ); + } + }; + + namespace Factory + { + XMLCh* makeXMLBase64encoded( const std::string& s ) + { + XMLSize_t bytes_length = 0; + XMLByte* bytes = Base64::encode( (const XMLByte* const)s.data(), + (XMLSize_t)s.size(), + &bytes_length ); + ArrayJanitor bytes_janitor( bytes ); + + XMLTransService::Codes resCode; + XMLTranscoder* myTranscoder = XMLPlatformUtils::fgTransService-> + makeNewTranscoderFor( XMLRecognizer::UTF_8, resCode, 16*1024, + XMLPlatformUtils::fgMemoryManager); + XMLSize_t charsEaten = 0; + +// cerr << "s:" << s << ":" << endl; +// cerr << "s.len:" << s.size() << " bytes_length:" << bytes_length << endl; + XMLCh* resultXMLString_Encoded = new XMLCh[ 16*1024 + 4*bytes_length +4 ]; + unsigned char charSizes[16*1024]; + myTranscoder->transcodeFrom( bytes, bytes_length, + resultXMLString_Encoded, 16*1024, + charsEaten, charSizes ); + + return resultXMLString_Encoded; + + } + }; + +}; diff --git a/Ferris/FerrisDOM.hh b/Ferris/FerrisDOM.hh new file mode 100644 index 0000000..7206452 --- /dev/null +++ b/Ferris/FerrisDOM.hh @@ -0,0 +1,497 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisDOM.hh,v 1.19 2011/11/09 21:31:12 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DOM_H_ +#define _ALREADY_INCLUDED_FERRIS_DOM_H_ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +//#include + +namespace Ferris +{ + using namespace XERCES_CPP_NAMESPACE; + + /** + * Client apps should use one of these to store their DOMDocument + * pointers in because the document will be reclaimed for them when + * the last reference goes out of scope. Implicit conversion is allowed + * so that native xerces-c API calls can be done on the smartptr. + */ + template + class FerrisXercesDOMSmartPtrStorage + { + public: + typedef T* StoredType; // the type of the pointee_ object + typedef T* InitPointerType; // + typedef T* PointerType; // type returned by operator-> + typedef T& ReferenceType; // type returned by operator* + + FerrisXercesDOMSmartPtrStorage() : pointee_(Default()) + {} + + // The storage policy doesn't initialize the stored pointer + // which will be initialized by the OwnershipPolicy's Clone fn + FerrisXercesDOMSmartPtrStorage(const FerrisXercesDOMSmartPtrStorage&) + {} + + template + FerrisXercesDOMSmartPtrStorage(const FerrisXercesDOMSmartPtrStorage&) + {} + + FerrisXercesDOMSmartPtrStorage(const StoredType& p) + : pointee_(p) + { + } + + PointerType operator->() const { return pointee_; } + + ReferenceType operator*() const { return *pointee_; } + + void Swap(FerrisXercesDOMSmartPtrStorage& rhs) + { std::swap(pointee_, rhs.pointee_); } + + // Accessors + friend inline PointerType GetImpl(const FerrisXercesDOMSmartPtrStorage& sp) + { return sp.pointee_; } + + friend inline PointerType GetImplX(const FerrisXercesDOMSmartPtrStorage& sp) + { return sp.pointee_; } + + friend inline const StoredType& GetImplRef(const FerrisXercesDOMSmartPtrStorage& sp) + { return sp.pointee_; } + + friend inline StoredType& GetImplRef(FerrisXercesDOMSmartPtrStorage& sp) + { return sp.pointee_; } + + protected: + // Destroys the data stored + // (Destruction might be taken over by the OwnershipPolicy) + void Destroy() + { + if( pointee_ ) + { +// LG_DOM_D << "Releasing a DOM:" << (void*)pointee_ << std::endl; + pointee_->release(); + } + } + + // Default value to initialize the pointer + static StoredType Default() + { return 0; } + + private: + // Data + StoredType pointee_; + }; + typedef Loki::SmartPtr< DOMDocument, + Loki::RefLinked, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisXercesDOMSmartPtrStorage > fh_domdoc; + typedef Loki::SmartPtr< XMLCh, + Loki::RefLinked, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisLoki::FerrisExArraySmartPtrStorage > fh_xmlch; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** From here to the next star comment block is from DOMTreeErrorReporter.hpp **/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + // --------------------------------------------------------------------------- + // This is a simple class that lets us do easy (though not terribly efficient) + // trancoding of XMLCh data to local code page for display. + // --------------------------------------------------------------------------- + class FERRISEXP_DLLLOCAL StrX + { + public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + StrX(const XMLCh* const toTranscode) + { + // Call the private transcoding method + fLocalForm = XMLString::transcode(toTranscode); + } + + ~StrX() + { + XMLString::release(&fLocalForm); + } + + StrX( const StrX& ci ) + { + fLocalForm = XMLString::replicate( ci.fLocalForm ); + } + + StrX& operator=( const StrX& ci ) + { + fLocalForm = XMLString::replicate( ci.fLocalForm ); + return *this; + } + + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + const char* localForm() const + { + return fLocalForm; + } + + private : + // ----------------------------------------------------------------------- + // Private data members + // + // fLocalForm + // This is the local code page form of the string. + // ----------------------------------------------------------------------- + char* fLocalForm; + }; + + inline std::ostream& operator<<(std::ostream& target, const StrX& toDump) + { + target << toDump.localForm(); + return target; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** From here to the next star comment block is from CreateDOMDocument.cpp **/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + // --------------------------------------------------------------------------- + // This is a simple class that lets us do easy (though not terribly efficient) + // trancoding of char* data to XMLCh data. + // --------------------------------------------------------------------------- + class FERRISEXP_DLLLOCAL XStr + { + public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + XStr(const char* const toTranscode) + { + // Call the private transcoding method + fUnicodeForm = XMLString::transcode(toTranscode); + } + + ~XStr() + { + XMLString::release(&fUnicodeForm); + } + + XStr( const XStr& ci ) + { + fUnicodeForm = XMLString::replicate( ci.fUnicodeForm ); + } + + XStr& operator=( const XStr& ci ) + { + fUnicodeForm = XMLString::replicate( ci.fUnicodeForm ); + return *this; + } + + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + const XMLCh* unicodeForm() const + { + return fUnicodeForm; + } + private : + // ----------------------------------------------------------------------- + // Private data members + // + // fUnicodeForm + // This is the Unicode XMLCh format of the string. + // ----------------------------------------------------------------------- + XMLCh* fUnicodeForm; + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** And now we start with ferris code ******************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_EXCEPTION XMLParse : public FerrisVFSExceptionBase + { + int errorCount; + fh_domdoc doc; + + public: + + inline XMLParse( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + int errorCount, + fh_domdoc doc, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ), + errorCount( errorCount ), + doc( doc ) + { + setExceptionName("XMLParse"); + } + + virtual ~XMLParse() throw() + {} + + inline fh_domdoc getDoc() + { return doc; } + + inline int getErrorCount() + { return errorCount; } + + + }; +#define Throw_XMLParse(e,ecount,doc) \ +throw XMLParse( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (ecount), (doc)) + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_API EAUpdateErrorHandler + : + public Handlable + { + public: + virtual void handleError( fh_context, + const std::string& eaname, + const std::string& what ) = 0; + }; + FERRIS_SMARTPTR( EAUpdateErrorHandler, fh_EAUpdateErrorHandler ); + + /** + * Dont do anything during errors + */ + class FERRISEXP_API EAUpdateErrorHandler_Null + : + public EAUpdateErrorHandler + { + public: + virtual void handleError( fh_context, + const std::string& eaname, + const std::string& what ) + { + } + }; + + /** + * print error info to cerr and do nothing + */ + class FERRISEXP_API EAUpdateErrorHandler_cerr + : + public EAUpdateErrorHandler + { + public: + virtual void handleError( fh_context c, + const std::string& eaname, + const std::string& what ); + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * if (trim) then remove the initial declaration + */ + fh_stringstream& trimXMLDeclaration( fh_stringstream& ret, bool trim = true ); + + FERRISEXP_API fh_stringstream tostream( fh_domdoc doc, bool gFormatPrettyPrint = true ); + FERRISEXP_API fh_stringstream tostream( DOMNode& n, bool gFormatPrettyPrint = true ); + + FERRISEXP_API std::string tostr( const XMLCh* xc ); + FERRISEXP_API std::string XMLToString( const XMLCh* xc, const std::string def = "" ); + + FERRISEXP_API void setAttribute( DOMElement* e, const std::string& k, const std::string& v ); + FERRISEXP_API void ensureAttribute( DOMDocument* dom, + DOMElement* e, const std::string& k, const std::string& v ); + + FERRISEXP_API std::string getAttribute( DOMElement* e, const std::string& k ); + FERRISEXP_API std::string getAttribute( const DOMElement* e, const std::string& k ); + + FERRISEXP_API void setAttributeNS( DOMElement* e, + const std::string& ns, + const std::string& k, + const std::string& v ); + FERRISEXP_API std::string getAttributeNS( const DOMElement* e, + const std::string& ns, + const std::string& k ); + + FERRISEXP_API std::string getStrSubCtx( DOMNode* c, + std::string subname, + std::string def = "", + bool getAllLines = false, + bool throw_for_errors = false ); + + + namespace XML + { + typedef std::list< const DOMNode* > DOMNodeList_t; + typedef std::list< const DOMElement* > DOMElementList_t; + FERRISEXP_API std::list< const DOMNode* > evalXPath( fh_domdoc doc, std::string expression ); + FERRISEXP_API std::list< const DOMElement* > evalXPathToElements( fh_domdoc doc, std::string expression ); + + FERRISEXP_API std::string escapeToXMLAttr( const std::string& s ); + + FERRISEXP_API void writeMessage( fh_ostream oss, const stringmap_t& m ); + FERRISEXP_API stringmap_t& readMessage( fh_stringstream& iss, stringmap_t& ret ); + FERRISEXP_API stringmap_t& readMessage( fh_istream iss, stringmap_t& ret ); + + FERRISEXP_API void writeList( fh_ostream, const stringlist_t& l ); + FERRISEXP_API stringlist_t& readList( fh_istream iss, stringlist_t& ret ); + + FERRISEXP_API std::string contextToXML( fh_context c, + bool recurse = false, + bool includeContent = true ); + FERRISEXP_API void updateFromXML( fh_context c, + const std::string& xml_data, + bool recurse = false, + fh_EAUpdateErrorHandler eh = 0 ); + + typedef std::list< DOMNode* > domnode_list_t; + FERRISEXP_API domnode_list_t& getChildren( domnode_list_t& nl, DOMElement* element ); + FERRISEXP_API domnode_list_t getChildren( DOMElement* element ); + FERRISEXP_API bool allWhitespaceNodes( DOMElement* element ); + + /** + * Get the contents of the first TEXT node under the given element + */ + FERRISEXP_API std::string getChildText( DOMElement* n ); + + /** + * Set the contents of the first TEXT node under the given element + */ + FERRISEXP_API const std::string& setChildText( fh_domdoc doc, DOMElement* n, const std::string& ); + FERRISEXP_API const std::string& setChildText( DOMDocument* doc, DOMElement* n, const std::string& s ); + + /** + * Clear away all TEXT type child nodes of a given XML element + */ + FERRISEXP_API void removeAllTextChildren( DOMElement* element ); + + /** + * Add a new element to the document with the given parent element + * @return the new element + */ + FERRISEXP_API DOMElement* createElement( fh_domdoc doc, + DOMElement* parent, + const std::string& childname ); + + /** + * Get the child element with the given name or null + */ + FERRISEXP_API DOMElement* getChildElement( DOMNode* node, const std::string& name ); + + /** + * Get all the children elements with the given name + */ + FERRISEXP_API std::list< DOMElement* > + getAllChildrenElements( DOMNode* node, + const std::string& name, + bool recurse = true ); + + FERRISEXP_API std::list< DOMElement* >& + getAllChildrenElements( DOMNode* node, + const std::string& name, + std::list< DOMElement* >& ret, + bool recurse = true ); + + /** + * Like getAllChildrenElements() but only get the first child element + */ + FERRISEXP_API DOMElement* + firstChild( DOMNode* node, const std::string& name ); + + + }; + + namespace Factory + { + FERRISEXP_API void ensureXMLPlatformInitialized(); + FERRISEXP_API fh_domdoc makeDOM( fh_context c, + bool hideXMLAttribute = true, + bool hideEmblemAttributes = true, + bool hideSchemaAttributes = true ); + FERRISEXP_API fh_context mountDOM( fh_domdoc dom ); + FERRISEXP_API fh_context mountDOM( fh_domdoc dom, const std::string& forcedURLPrefix ); + FERRISEXP_API fh_domdoc StreamToDOM( fh_istream iss ); + FERRISEXP_API fh_domdoc StreamToDOM( fh_stringstream& iss ); + FERRISEXP_API fh_domdoc StringToDOM( const std::string& s ); + + FERRISEXP_API DOMImplementation* getDefaultDOMImpl(); + + /** + * Create a new empty document + */ + FERRISEXP_API fh_domdoc makeDOM( const std::string& rootname ); + FERRISEXP_API InputSource* makeInputSource( const fh_istream& iss, + const char* const bufId, + MemoryManager* const + manager = XMLPlatformUtils::fgMemoryManager ); + FERRISEXP_API InputSource* makeInputSource( const fh_context& c ); + + FERRISEXP_API XMLCh* makeXMLBase64encoded( const std::string& s ); + }; +}; +#endif diff --git a/Ferris/FerrisDOM_private.hh b/Ferris/FerrisDOM_private.hh new file mode 100644 index 0000000..3d3dea0 --- /dev/null +++ b/Ferris/FerrisDOM_private.hh @@ -0,0 +1,276 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisDOM_private.hh,v 1.7 2010/09/24 21:30:36 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DOM_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_DOM_PRIV_H_ + +#include + +namespace Ferris +{ + using namespace XERCES_CPP_NAMESPACE; + + /********************/ + /********************/ + /********************/ + + class FERRISEXP_DLLLOCAL Ferris_DOM_NamespaceImplier + { + mutable XMLCh* m_localName; + mutable XMLCh* m_nsURI; + public: + explicit Ferris_DOM_NamespaceImplier(); + ~Ferris_DOM_NamespaceImplier(); + const XMLCh* common_getNamespaceURI( const XMLCh* name ) const; + const XMLCh* common_getLocalName( const XMLCh* name ) const; + }; + + /********************/ + /********************/ + /********************/ + + class FERRISEXP_DLLLOCAL Ferris_DOMNodeList + : + public DOMNodeList, + public Handlable + { + typedef std::vector< DOMNode* > m_col_t; + m_col_t m_col; + + protected: + Ferris_DOMNodeList(const Ferris_DOMNodeList &) {}; + Ferris_DOMNodeList & operator = (const Ferris_DOMNodeList &) {return *this;}; + + public: + Ferris_DOMNodeList(); + virtual ~Ferris_DOMNodeList(); + + void push_back( DOMNode* n ); + DOMNode* front() const; + DOMNode* back() const; + + // DOM1 // + virtual DOMNode *item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; + }; + + class FERRISEXP_DLLLOCAL Ferris_DOMNamedNodeMap + : + public DOMNamedNodeMap, + public Handlable + { + typedef std::map< std::string, DOMNode* > m_nodes_t; + mutable m_nodes_t m_nodes; + + protected: + Ferris_DOMNamedNodeMap(const Ferris_DOMNamedNodeMap &) {}; + Ferris_DOMNamedNodeMap & operator = (const Ferris_DOMNamedNodeMap &) {return *this;}; + + public: + Ferris_DOMNamedNodeMap( const DOMNode *ownerNod ); + virtual ~Ferris_DOMNamedNodeMap(); + + virtual DOMNode *setNamedItem(DOMNode *arg); + virtual DOMNode *item(XMLSize_t index) const; + virtual DOMNode *getNamedItem(const XMLCh *xname) const; + virtual XMLSize_t getLength() const; + virtual DOMNode *removeNamedItem(const XMLCh *xname); + virtual DOMNode* getNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMNode *setNamedItemNS(DOMNode *arg); + virtual DOMNode *removeNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName); + }; + + class Ferris_DOMAttr; + class Ferris_DOMElement; + class Ferris_DOMDocument; + FERRIS_SMARTPTR( Ferris_DOMNodeList, fhx_nodelist ); + FERRIS_SMARTPTR( Ferris_DOMNamedNodeMap, fhx_namednodemap ); + FERRIS_SMARTPTR( Ferris_DOMAttr, fhx_attr ); + FERRIS_SMARTPTR( Ferris_DOMElement, fhx_element ); + + class FERRISEXP_DLLLOCAL Ferris_DOMElement + : + public DOMElement, + public Handlable, + public Ferris_DOM_NamespaceImplier + { + Ferris_DOMDocument* m_doc; + DOMNode* m_parent; + + void changed() const; + int changes() const; + + fh_context m_context; + typedef std::map< std::string, XMLCh* > m_xcache_t; + mutable m_xcache_t m_xcache; + typedef std::map< std::string, fhx_attr > m_xattrcache_t; + mutable m_xattrcache_t m_xattrcache; + + mutable fhx_nodelist m_cache_getChildNodes; + mutable Ferris_DOMNamedNodeMap* m_fAttributes; + private: + Ferris_DOMElement(const Ferris_DOMElement& ); + Ferris_DOMElement & operator = (const Ferris_DOMElement& ); + + Ferris_DOMNamedNodeMap* ensure_fAttributes() const; + bool shouldHideAttribute( const XMLCh* xname ) const; + + protected: + + /** + * We have to keep UTF-16 strings around to look like a standard + * DOMElement. Reuse them if we can + */ + XMLCh* cacheString( const std::string& s ) const; + + public: + Ferris_DOMElement( Ferris_DOMDocument* m_doc, + DOMNode* m_parent, + fh_context c ); + virtual ~Ferris_DOMElement(); + + /** + * This is only for use within Ferris core library, but this header + * should only be available to libferris anyway + */ + fh_context getContext() const + { + return m_context; + } + + + virtual const XMLCh* getTagName() const; + virtual const XMLCh* getAttribute(const XMLCh* xname) const; +// virtual DOMAttr* getAttributeNode( const std::string& n ) const; + virtual DOMAttr* getAttributeNode(const XMLCh* xname) const; + virtual DOMNodeList * getElementsByTagName(const XMLCh *name) const; + virtual void setAttribute(const XMLCh *name, const XMLCh *value); + virtual DOMAttr* setAttributeNode(DOMAttr *newAttr); + virtual DOMAttr* removeAttributeNode(DOMAttr *oldAttr); + virtual void removeAttribute(const XMLCh *name); + + // DOM2 // + virtual const XMLCh* getAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual void setAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLCh *value); + virtual void removeAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName); + virtual DOMAttr* getAttributeNodeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMAttr* setAttributeNodeNS(DOMAttr *newAttr); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + + virtual bool hasAttribute(const XMLCh* xname) const; + virtual bool hasAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + + // DOM3 // + virtual void setIdAttribute(const XMLCh* name, bool isId); + virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId); + virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId); + virtual const DOMTypeInfo* getSchemaTypeInfo() const; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + // DOMNode // + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + virtual const XMLCh* getNodeName() const; + virtual const XMLCh* getNodeValue() const; + virtual XERCES_CPP_NAMESPACE::DOMNode::NodeType getNodeType() const; + virtual DOMNode* getParentNode() const; + virtual Ferris_DOMNodeList* getChildNodes_sub() const; + virtual DOMNodeList *getChildNodes() const; + virtual DOMNode* getFirstChild() const; + virtual DOMNode* getLastChild() const; + virtual DOMNode* getPreviousSibling() const; + virtual DOMNode* getNextSibling() const; + virtual DOMNamedNodeMap *getAttributes() const; + virtual DOMDocument* getOwnerDocument() const; + virtual DOMNode* cloneNode(bool deep) const; + virtual DOMNode* insertBefore(DOMNode *newChild, + DOMNode *refChild); + virtual DOMNode* replaceChild(DOMNode *newChild, + DOMNode *oldChild); + virtual DOMNode* removeChild(DOMNode *oldChild); + virtual DOMNode* appendChild(DOMNode *newChild); + virtual bool hasChildNodes() const; + virtual void setNodeValue(const XMLCh *nodeValue); + + virtual DOMElement* getFirstElementChild() const; + virtual DOMElement* getLastElementChild() const; + virtual DOMElement* getPreviousElementSibling() const; + virtual DOMElement* getNextElementSibling() const; + virtual XMLSize_t getChildElementCount() const; + + + // DOM2 // + + virtual void normalize(); + virtual bool isSupported(const XMLCh *feature, + const XMLCh *version) const; + virtual const XMLCh* getNamespaceURI() const; + virtual const XMLCh* getPrefix() const; + virtual const XMLCh* getLocalName() const; + virtual void setPrefix(const XMLCh * prefix); + virtual bool hasAttributes() const; + + // DOM3 // + virtual bool isSameNode(const DOMNode* other) const; + virtual bool isEqualNode(const DOMNode* arg) const; + virtual void* setUserData(const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + virtual void* getUserData(const XMLCh* key) const; + virtual const XMLCh* getBaseURI() const; + + virtual short compareDocumentPosition(const DOMNode* other) const; + virtual const XMLCh* getTextContent() const; + virtual void setTextContent(const XMLCh* textContent); + virtual const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const; + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const; + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const; + virtual void* getFeature( const XMLCh* feature, const XMLCh* version ) const; + virtual void release(); + + + + }; + +}; +#endif diff --git a/Ferris/FerrisDevContext.cpp b/Ferris/FerrisDevContext.cpp new file mode 100644 index 0000000..31f6201 --- /dev/null +++ b/Ferris/FerrisDevContext.cpp @@ -0,0 +1,288 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisDevContext.cpp,v 1.4 2010/09/24 21:30:36 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ +#define DUBCORE_DESCRIPTION "dc:description" + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FerrisDevGeneratorContext::FerrisDevGeneratorContext( Context* parent, const char* rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + FerrisDevGeneratorContext::~FerrisDevGeneratorContext() + { + } + + void + FerrisDevGeneratorContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL FerrisDevGeneratorContext_uuid + : + public FerrisDevGeneratorContext + { + typedef FerrisDevGeneratorContext_uuid _Self; + typedef FerrisDevGeneratorContext _Base; + + protected: + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ss; + ss << Util::makeUUID(); + return ss; + } + + + public: + + FerrisDevGeneratorContext_uuid( Context* parent, const char* rdn ) + : + FerrisDevGeneratorContext( parent, rdn ) + { + } + + virtual ~FerrisDevGeneratorContext_uuid() + { + } + + static fh_stringstream + SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "A file which generates a new UUID every time it is read"; + return ss; + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + + tryAddStateLessAttribute( DUBCORE_DESCRIPTION, + &_Self::SL_getDesc, + XSD_BASIC_STRING ); + } + } + + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + template< class T, const std::string& name > + class FERRISEXP_DLLLOCAL FerrisDevGeneratorContext_intX + : + public FerrisDevGeneratorContext + { + typedef FerrisDevGeneratorContext_intX< T, name > _Self; + + T m_state; + + string getKeyPrefix() + { + return "ferrisdev-generator-int-"; + } + + protected: + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ss; + ++m_state; + setEDBString( FDB_FERRISDEV, + getKeyPrefix() + name, + tostr( m_state )); + ss << m_state; + return ss; + } + + + public: + + FerrisDevGeneratorContext_intX( Context* parent, const char* rdn ) + : + FerrisDevGeneratorContext( parent, rdn ), + m_state( 0 ) + { + m_state = toType( getEDBString( FDB_FERRISDEV, + getKeyPrefix() + name, + "0" )); + } + + virtual ~FerrisDevGeneratorContext_intX() + { + } + + static fh_stringstream + SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "A file which generates a new integer every time it is read." + << " The last value returned is persisted by libferris and the integer" + << " will eventually overflow and start again"; + return ss; + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + + tryAddStateLessAttribute( DUBCORE_DESCRIPTION, + &_Self::SL_getDesc, + XSD_BASIC_STRING ); + } + } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + FerrisDevRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + string exstr_64 = "64"; + string exstr_32 = "32"; + + void + FerrisDevRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_context child = 0; + fh_fcontext fakedir = 0; + + fakedir = new FakeInternalContext( this, "generators" ); + addNewChild( fakedir ); + + child = new FerrisDevGeneratorContext_uuid( this, "uuid" ); + fakedir->addNewChild( child ); + child = new FerrisDevGeneratorContext_intX< guint64, exstr_64 >( this, "integer-64" ); + fakedir->addNewChild( child ); + child = new FerrisDevGeneratorContext_intX< guint32, exstr_32 >( this, "integer-32" ); + fakedir->addNewChild( child ); + } + } + + + + FerrisDevRootContext::FerrisDevRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + FerrisDevRootContext::~FerrisDevRootContext() + { + } + + void + FerrisDevRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + class FERRISEXP_DLLLOCAL FerrisDevRootContext_RootContextDropper + : + public RootContextDropper + { + public: + FerrisDevRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("ferrisdev"); + RootContextFactory::Register( "ferrisdev", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new FerrisDevRootContext(); + } + return c; + } + }; + static FerrisDevRootContext_RootContextDropper ___FerrisDevRootContext_static_init; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +}; diff --git a/Ferris/FerrisDevContext_private.hh b/Ferris/FerrisDevContext_private.hh new file mode 100644 index 0000000..3f4cb40 --- /dev/null +++ b/Ferris/FerrisDevContext_private.hh @@ -0,0 +1,96 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisDevContext_private.hh,v 1.2 2010/09/24 21:30:36 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_DEV_CONTEXT_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_DEV_CONTEXT_PRIVH_ + +#include +#include + +namespace Ferris +{ + /** + * Root context for ferrisdev:// + */ + class FERRISEXP_DLLLOCAL FerrisDevRootContext + : + public StateLessEAHolder< FerrisDevRootContext, FakeInternalContext > + { + typedef FerrisDevRootContext _Self; + typedef StateLessEAHolder< FerrisDevRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + + protected: + + virtual void priv_read(); + + public: + + FerrisDevRootContext(); + virtual ~FerrisDevRootContext(); + + void createStateLessAttributes( bool force = false ); + + + }; + + /** + * + * Generates a unique ID either based on a overflowing 64bit integer + * or a uuid depending on which file is read. + * + */ + class FERRISEXP_DLLLOCAL FerrisDevGeneratorContext + : + public StateLessEAHolder< FerrisDevGeneratorContext, leafContext > + { + friend class FerrisDevRootContext; + + typedef FerrisDevGeneratorContext _Self; + typedef StateLessEAHolder< FerrisDevGeneratorContext, leafContext > _Base; + + protected: + + public: + + FerrisDevGeneratorContext( Context* parent, const char* rdn ); + virtual ~FerrisDevGeneratorContext(); + + void createStateLessAttributes( bool force = false ); + + }; + + extern std::string exstr_64; + extern std::string exstr_32; + + +}; +#endif diff --git a/Ferris/FerrisEAGeneratorPlugin.cpp b/Ferris/FerrisEAGeneratorPlugin.cpp new file mode 100644 index 0000000..e278a90 --- /dev/null +++ b/Ferris/FerrisEAGeneratorPlugin.cpp @@ -0,0 +1,142 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisEAGeneratorPlugin.cpp,v 1.6 2010/09/24 21:30:36 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using std::cerr; +using std::endl; + +namespace Ferris +{ + + StaticEAGenFactorys_t& getStaticLinkedEAGenFactorys() + { + static StaticEAGenFactorys_t ret; + return ret; + } + + bool RegisterEAGeneratorModule( + const fh_matcher& ma, + const std::string& implname, + const std::string& shortname, + bool isDynamic, + bool hasState, + AttributeCreator::CreatePri_t CreatePri ) + { + StaticEAGenFactorys_t& fac = getStaticLinkedEAGenFactorys(); + +// std::cerr << "RegisterEAGeneratorModule() shortname:" << shortname +// << " isDyn:" << isDynamic +// << " hasState:" << hasState +// << " pri:" << CreatePri +// << std::endl; + + fac.push_back( + new StaticGModuleMatchedEAGeneratorFactory( ma, + implname, + shortname, + isDynamic, + hasState, + CreatePri )); + + // DEBUG +// cerr << "RegisterEAGeneratorModule() shortname:" << shortname << endl; +// fh_context c = 0; +// if( ma(c) ) +// { +// std::cerr << "matches" << std::endl; +// } + } + + FERRISEXP_API void + AppendAllStaticEAGeneratorFactories_Stateless( + Context::s_StatelessEAGenFactorys_t& SL ) + { + StaticEAGenFactorys_t& fac = getStaticLinkedEAGenFactorys(); + StaticEAGenFactorys_t::iterator end = fac.end(); + + for( StaticEAGenFactorys_t::iterator fi = fac.begin(); fi != end; ++fi ) + { + fh_StaticMatchedEAGeneratorFactory f = *fi; + + if( !f->hasState() ) + SL.push_back( f ); + } + } + + FERRISEXP_API bool + AppendAllStaticEAGeneratorFactories_Statefull( + Context::m_StatefullEAGenFactorys_t& SF ) + { + bool HaveDynamicAttributes = false; + + StaticEAGenFactorys_t& fac = getStaticLinkedEAGenFactorys(); + StaticEAGenFactorys_t::iterator end = fac.end(); + + for( StaticEAGenFactorys_t::iterator fi = fac.begin(); fi != end; ++fi ) + { + fh_StaticMatchedEAGeneratorFactory f = *fi; + + if( f->hasState() ) + SF.push_back( f->clone() ); + + HaveDynamicAttributes |= f->isDynamic(); + } + + return HaveDynamicAttributes; + } + + + + +// EAGenFactorys_t& AppendAllStaticEAGeneratorFactories( EAGenFactorys_t& ret ) +// { +// StaticEAGenFactorys_t& fac = getStaticLinkedEAGenFactorys(); +// StaticEAGenFactorys_t::iterator end = fac.end(); + +// for( StaticEAGenFactorys_t::iterator fi = fac.begin(); fi != end; ++fi ) +// { +// fh_StaticMatchedEAGeneratorFactory f = *fi; + +// if( f->hasState() ) +// { +// ret.push_back( f->clone() ); +// } +// else +// { +// ret.push_back( f ); +// } +// } +// return ret; +// } + + + +}; diff --git a/Ferris/FerrisEAGeneratorPlugin.hh b/Ferris/FerrisEAGeneratorPlugin.hh new file mode 100644 index 0000000..f37bb65 --- /dev/null +++ b/Ferris/FerrisEAGeneratorPlugin.hh @@ -0,0 +1,64 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisEAGeneratorPlugin.hh,v 1.3 2010/09/24 21:30:36 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAGEN_PLUGIN_H_ +#define _ALREADY_INCLUDED_FERRIS_EAGEN_PLUGIN_H_ + +#include +#include +#include + +namespace Ferris +{ + /** + * EA generator plugins are now (1.1.10)+ able to have their + * factory module bootstrapped statically to libferris.so + * + * @ma the matcher to tell if this plugin is interested in making attributes + * @implname Name of the main shared library for plugin + * @shortname User presentable one word description + * @isDynamic + * @hasState + * @CreatePri + * + */ + FERRISEXP_API bool RegisterEAGeneratorModule( + const fh_matcher& ma, + const std::string& implname, + const std::string& shortname, + bool isDynamic = false, + bool hasState = false, + AttributeCreator::CreatePri_t CreatePri = + AttributeCreator::CREATE_PRI_NOT_SUPPORTED + ); + + +}; + +#endif diff --git a/Ferris/FerrisEAGeneratorPlugin_private.hh b/Ferris/FerrisEAGeneratorPlugin_private.hh new file mode 100644 index 0000000..1ff9b74 --- /dev/null +++ b/Ferris/FerrisEAGeneratorPlugin_private.hh @@ -0,0 +1,56 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisEAGeneratorPlugin_private.hh,v 1.3 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAGEN_PLUGIN_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_EAGEN_PLUGIN_PRIV_H_ + +#include +#include + +namespace Ferris +{ + FERRISEXP_API void + AppendAllStaticEAGeneratorFactories_Stateless( + Context::s_StatelessEAGenFactorys_t& SL ); + + FERRISEXP_API bool + AppendAllStaticEAGeneratorFactories_Statefull( + Context::m_StatefullEAGenFactorys_t& SF ); + + FERRIS_SMARTPTR( StaticGModuleMatchedEAGeneratorFactory, fh_StaticMatchedEAGeneratorFactory ); + typedef std::list< fh_StaticMatchedEAGeneratorFactory > StaticEAGenFactorys_t; + FERRISEXP_API StaticEAGenFactorys_t& + getStaticLinkedEAGenFactorys(); + +// FERRISEXP_API EAGenFactorys_t& +// AppendAllStaticEAGeneratorFactories( EAGenFactorys_t& ret ); +}; + +#endif + diff --git a/Ferris/FerrisEvent.cpp b/Ferris/FerrisEvent.cpp new file mode 100644 index 0000000..c2218e8 --- /dev/null +++ b/Ferris/FerrisEvent.cpp @@ -0,0 +1,118 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisEvent.cpp,v 1.3 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +namespace Ferris +{ + + + void NamingEvent::setSource( fh_context s ) + { + source = s; + } + + NamingEvent::NamingEvent( fh_context _s, sigc::trackable* _uobj ) + : + source(_s), + uobj(_uobj) + { + } + + fh_context + NamingEvent::getSource() + { + return source; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + NamingEvent_Changed::NamingEvent_Changed( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + + NamingEvent_Deleted::NamingEvent_Deleted( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + + NamingEvent_Start_Execute::NamingEvent_Start_Execute( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + NamingEvent_Stop_Execute::NamingEvent_Stop_Execute( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + NamingEvent_Created::NamingEvent_Created( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + NamingEvent_Moved::NamingEvent_Moved( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + + NamingEvent_Exists::NamingEvent_Exists( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + NamingEvent_Start_Reading_Context::NamingEvent_Start_Reading_Context( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + NamingEvent_Stop_Reading_Context::NamingEvent_Stop_Reading_Context( fh_context _s, sigc::trackable* _uobj ) + : + NamingEvent( _s, _uobj ) + { + } + + +}; diff --git a/Ferris/FerrisEvent.hh b/Ferris/FerrisEvent.hh new file mode 100644 index 0000000..bcc271f --- /dev/null +++ b/Ferris/FerrisEvent.hh @@ -0,0 +1,109 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisEvent.hh,v 1.3 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EVENT_H_ +#define _ALREADY_INCLUDED_FERRIS_EVENT_H_ + +#include +#include + +namespace Ferris +{ + + class FERRISEXP_API NamingEvent + { + fh_context source; + sigc::trackable* uobj; + + protected: + + void setSource( fh_context s ); + + public: + + NamingEvent( fh_context _s, sigc::trackable* _uobj ); + fh_context getSource(); + }; + + class FERRISEXP_API NamingEvent_Changed : public NamingEvent + { + public: + NamingEvent_Changed( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Deleted : public NamingEvent + { + public: + NamingEvent_Deleted( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Start_Execute : public NamingEvent + { + public: + NamingEvent_Start_Execute( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Stop_Execute : public NamingEvent + { + public: + NamingEvent_Stop_Execute( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Created : public NamingEvent + { + public: + NamingEvent_Created( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Moved : public NamingEvent + { + public: + NamingEvent_Moved( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Exists : public NamingEvent + { + public: + NamingEvent_Exists( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Start_Reading_Context : public NamingEvent + { + public: + NamingEvent_Start_Reading_Context( fh_context _s, sigc::trackable* _uobj ); + }; + + class FERRISEXP_API NamingEvent_Stop_Reading_Context : public NamingEvent + { + public: + NamingEvent_Stop_Reading_Context( fh_context _s, sigc::trackable* _uobj ); + }; + +}; +#endif diff --git a/Ferris/FerrisException.cpp b/Ferris/FerrisException.cpp new file mode 100644 index 0000000..aa2bc3a --- /dev/null +++ b/Ferris/FerrisException.cpp @@ -0,0 +1,108 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisException.cpp,v 1.2 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +#ifdef FERRIS_HAVE_ATTR +#include +#endif + +using namespace std; + +namespace Ferris +{ + + + FerrisVFSExceptionBase::FerrisVFSExceptionBase( + const FerrisException_CodeState& state, + fh_ostream log, + const char* e, + Attribute* a + ) + : + FerrisExceptionBase( state, log, e ) + { + setAttribute( a ); + } + + FerrisVFSExceptionBase::~FerrisVFSExceptionBase() throw () + { + } + + const string& + FerrisVFSExceptionBase::whats() const + { + m_cache = _Base::whats(); + + try { + if( Attr + && Attr->isParentBound()) + { + m_cache += " For path:" + Attr->getDirPath(); + } + } + catch( exception& e ) + { + } + + return m_cache; + } + + + + + void ThrowFromErrno( int eno, const std::string& e, Attribute* a ) + { + string es = errnum_to_string( "", eno ); + + fh_stringstream ss; + ss << e << " reason:" << es; + + switch( eno ) + { + case EACCES: Throw_AccessDenied( tostr(ss), a ); + case ENOENT: Throw_NoSuchSubContext( tostr(ss), a ); + case ENOSPC: Throw_StorageFull( tostr(ss), a ); + case EDQUOT: Throw_QuotaStorageFull( tostr(ss), a ); + case ENOTSUP: Throw_NotSupported( tostr(ss), a ); + case EEXIST: Throw_ObjectExists( tostr(ss), a ); +#ifdef FERRIS_HAVE_ATTR + case ENOATTR: Throw_NoSuchObject( tostr(ss), a ); +#endif + } + Throw_GenericError( tostr(ss), a ); + } + + + +}; + diff --git a/Ferris/FerrisException.hh b/Ferris/FerrisException.hh new file mode 100644 index 0000000..73f53ad --- /dev/null +++ b/Ferris/FerrisException.hh @@ -0,0 +1,3201 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisException.hh,v 1.11 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_EXCEPTION_H_ +#define _ALREADY_INCLUDED_FERRIS_EXCEPTION_H_ + +#include +#include + +#include +#include +#include +#include + +namespace Ferris +{ + + /** + * Exception logging is a little different from using LG_XXX_D because we + * need to provide both a +ve and -ve stream and be able to have the macro + * inlined for passing the code as a function argument. + */ +#define LG_EXCEPTION_SWITCH( neededState ) \ + (Logging::LG_EXCEPTIONS::Instance().state() & neededState) \ + ? Logging::LG_EXCEPTIONS::Instance().getRealStream( neededState ) \ + : ::Ferris::Factory::getNullTimber() + + + + +class FERRISEXP_EXCEPTION FerrisVFSExceptionBase : public FerrisExceptionBase +{ + typedef FerrisExceptionBase _Base; + + Attribute* Attr; + mutable std::string m_cache; + +protected: + + inline void setAttribute( Attribute* a ) + { + Attr = a; + } + +public: + + FerrisVFSExceptionBase( const FerrisException_CodeState& state, + fh_ostream log, + const char* e = "", + Attribute* a = 0 ); + virtual ~FerrisVFSExceptionBase() throw (); + + virtual const std::string& whats() const; +}; + + +class FERRISEXP_EXCEPTION FerrisGLibCException : public FerrisVFSExceptionBase +{ +public: + + inline FerrisGLibCException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisGLibCException"); + } +}; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisStatException : public FerrisGLibCException +{ +public: + + inline FerrisStatException( + const FerrisException_CodeState& state, + const std::string& e, + Attribute* a=0) + : + FerrisGLibCException( state, (Enamel::get__t_l1er()), e, a ) + { + setExceptionName("FerrisStatException"); + } +}; +#define Throw_FerrisStatException(e,a) \ +throw FerrisStatException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisSetCWDException : public FerrisGLibCException +{ +public: + + inline FerrisSetCWDException( + const FerrisException_CodeState& state, + const std::string& e, + Attribute* a=0) + : + FerrisGLibCException( state, (Enamel::get__t_l1er()), e, a ) + { + setExceptionName("FerrisSetCWDException"); + } +}; +#define Throw_FerrisSetCWDException(e,a) \ +throw FerrisSetCWDException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +class FERRISEXP_EXCEPTION CanNotGetStream : public FerrisVFSExceptionBase +{ +public: + + inline CanNotGetStream( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CanNotGetStream"); + } +}; +#define Throw_CanNotGetStream(e,a) \ +throw CanNotGetStream( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NotSupported : public FerrisVFSExceptionBase +{ +public: + + inline NotSupported( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NotSupported"); + } +}; +#define Throw_NotSupported(e,a) \ +throw NotSupported( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisNotSupportedInThisContext : public NotSupported +{ +public: + + inline FerrisNotSupportedInThisContext( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + NotSupported( state, log, e.c_str(), a ) + { + setExceptionName("FerrisNotSupportedInThisContext"); + } +}; +#define Throw_FerrisNotSupportedInThisContext(e,a) \ +throw FerrisNotSupportedInThisContext( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION RootContextCreationFailed : public FerrisVFSExceptionBase +{ +public: + + inline RootContextCreationFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("RootContextCreationFailed"); + } +}; +#define Throw_RootContextCreationFailed(e,a) \ +throw RootContextCreationFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotDelete : public FerrisVFSExceptionBase +{ +public: + + inline CanNotDelete( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CanNotDelete"); + } +}; +#define Throw_CanNotDelete(e,a) \ +throw CanNotDelete( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchObject : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchObject( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchObject"); + } +}; +#define Throw_NoSuchObject(e,a) \ +throw NoSuchObject( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchUser : public NoSuchObject +{ +public: + + inline NoSuchUser( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + NoSuchObject( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchUser"); + } +}; +#define Throw_NoSuchUser(e,a) \ +throw NoSuchUser( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchGroup : public NoSuchObject +{ +public: + + inline NoSuchGroup( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + NoSuchObject( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchGroup"); + } +}; +#define Throw_NoSuchGroup(e,a) \ +throw NoSuchGroup( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ObjectExists : public FerrisVFSExceptionBase +{ +public: + + inline ObjectExists( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("ObjectExists"); + } +}; +#define Throw_ObjectExists(e,a) \ +throw ObjectExists( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ContextExists : public ObjectExists +{ +public: + + inline ContextExists( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + ObjectExists( state, log, e.c_str(), a ) + { + setExceptionName("ContextExists"); + } +}; +#define Throw_ContextExists(e,a) \ +throw ContextExists( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CopyFailed : public FerrisVFSExceptionBase +{ +public: + + inline CopyFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CopyFailed"); + } +}; +#define Throw_CopyFailed(e,a) \ +throw CopyFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION RemoveFailed : public FerrisVFSExceptionBase +{ +public: + + inline RemoveFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("RemoveFailed"); + } +}; +#define Throw_RemoveFailed(e,a) \ +throw RemoveFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION AttributeNotWritable : public FerrisVFSExceptionBase +{ +public: + + inline AttributeNotWritable( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("AttributeNotWritable"); + } +}; +#define Throw_AttributeNotWritable(e,a) \ +throw AttributeNotWritable( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION SubContextAlreadyInUse : public FerrisVFSExceptionBase +{ +public: + + inline SubContextAlreadyInUse( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("SubContextAlreadyInUse"); + } +}; +#define Throw_SubContextAlreadyInUse(e,a) \ +throw SubContextAlreadyInUse( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION AttributeAlreadyInUse : public FerrisVFSExceptionBase +{ +public: + + inline AttributeAlreadyInUse( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("AttributeAlreadyInUse"); + } +}; +#define Throw_AttributeAlreadyInUse(e,a) \ +throw AttributeAlreadyInUse( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCreateSubContextFailed : public FerrisVFSExceptionBase +{ +public: + + inline FerrisCreateSubContextFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCreateSubContextFailed"); + } +}; +#define Throw_FerrisCreateSubContextFailed(e,a) \ +throw FerrisCreateSubContextFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCreateSubContextNotSupported : public FerrisNotSupportedInThisContext +{ +public: + + inline FerrisCreateSubContextNotSupported( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisNotSupportedInThisContext( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCreateSubContextNotSupported"); + } +}; +#define Throw_FerrisCreateSubContextNotSupported(e,a) \ +throw FerrisCreateSubContextNotSupported( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCreateAttributeFailed : public FerrisVFSExceptionBase +{ +public: + + inline FerrisCreateAttributeFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCreateAttributeFailed"); + } +}; +#define Throw_FerrisCreateAttributeFailed(e,a) \ +throw FerrisCreateAttributeFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCreateAttributeNotSupported : public FerrisNotSupportedInThisContext +{ +public: + + inline FerrisCreateAttributeNotSupported( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisNotSupportedInThisContext( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCreateAttributeNotSupported"); + } +}; +#define Throw_FerrisCreateAttributeNotSupported(e,a) \ +throw FerrisCreateAttributeNotSupported( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchSubContext : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchSubContext( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchSubContext"); + } +}; +#define Throw_NoSuchSubContext(e,a) \ +throw NoSuchSubContext( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchAttribute : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchAttribute( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchAttribute"); + } +}; +#define Throw_NoSuchAttribute(e,a) \ +throw NoSuchAttribute( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ + (LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION NoSuchContextClass : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchContextClass( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchContextClass"); + } +}; +#define Throw_NoSuchContextClass(e,a) \ +throw NoSuchContextClass( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotReadContext : public FerrisVFSExceptionBase +{ +public: + + inline CanNotReadContext( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CanNotReadContext"); + } +}; +#define Throw_CanNotReadContext(e,a) \ +throw CanNotReadContext( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotReadContextPcctsParseFailed : public CanNotReadContext +{ + stringlist_t m_syntaxErrorList; +public: + + inline CanNotReadContextPcctsParseFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a, + stringlist_t syntaxErrorList ) + : + CanNotReadContext( state, log, e.c_str(), a ), + m_syntaxErrorList( syntaxErrorList ) + { + setExceptionName("CanNotReadContextPcctsParseFailed"); + } + virtual ~CanNotReadContextPcctsParseFailed() throw() + { + } + const stringlist_t& getSyntaxErrorList() + { + return m_syntaxErrorList; + } +}; +#define Throw_CanNotReadContextPcctsParseFailed( e, a, strlist ) \ +throw CanNotReadContextPcctsParseFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a), (strlist) ) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotDereferenceDanglingSoftLink : public FerrisVFSExceptionBase +{ +public: + + inline CanNotDereferenceDanglingSoftLink( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CanNotDereferenceDanglingSoftLink"); + } +}; +#define Throw_CanNotDereferenceDanglingSoftLink(e,a) \ +throw CanNotDereferenceDanglingSoftLink( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotMonitorDirWithFAM : public CanNotReadContext +{ + Fampp::FamppDirMonitorInitFailedException& ne; + +public: + + inline CanNotMonitorDirWithFAM( + const FerrisException_CodeState& state, + fh_ostream log, + Fampp::FamppDirMonitorInitFailedException& _ne, + const std::string& e, + Attribute* a=0) + : + CanNotReadContext( state, log, e.c_str(), a ), + ne(_ne) + { + setExceptionName("CanNotMonitorDirWithFAM"); + } +}; +#define Throw_CanNotMonitorDirWithFAM(e,a,ne) \ +throw CanNotMonitorDirWithFAM( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (ne), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisNotReadableAsContext : public FerrisVFSExceptionBase +{ +public: + + inline FerrisNotReadableAsContext( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisNotReadableAsContext"); + } +}; +#define Throw_FerrisNotReadableAsContext(e,a) \ +throw FerrisNotReadableAsContext( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisImageSaveFailed : public FerrisVFSExceptionBase +{ +public: + + inline FerrisImageSaveFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisImageSaveFailed"); + } +}; +#define Throw_FerrisImageSaveFailed(e,a) \ +throw FerrisImageSaveFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisImageLoadFailed : public FerrisVFSExceptionBase +{ +public: + + inline FerrisImageLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisImageLoadFailed"); + } +}; +#define Throw_FerrisImageLoadFailed(e,a) \ +throw FerrisImageLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisPNGImageLoadFailed : public FerrisImageLoadFailed +{ +public: + + inline FerrisPNGImageLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisImageLoadFailed( state, log, e.c_str(), a ) + { + setExceptionName("FerrisPNGImageLoadFailed"); + } +}; +#define Throw_FerrisPNGImageLoadFailed(e,a) \ +throw FerrisPNGImageLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisJPEGImageLoadFailed : public FerrisImageLoadFailed +{ +public: + + inline FerrisJPEGImageLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisImageLoadFailed( state, log, e.c_str(), a ) + { + setExceptionName("FerrisJPEGImageLoadFailed"); + } +}; +#define Throw_FerrisJPEGImageLoadFailed(e,a) \ +throw FerrisJPEGImageLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisGIMPImageLoadFailed : public FerrisImageLoadFailed +{ +public: + + inline FerrisGIMPImageLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisImageLoadFailed( state, log, e.c_str(), a ) + { + setExceptionName("FerrisGIMPImageLoadFailed"); + } +}; +#define Throw_FerrisGIMPImageLoadFailed(e,a) \ +throw FerrisGIMPImageLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +class FERRISEXP_EXCEPTION FerrisImlib2ImageLoadFailed : public FerrisImageLoadFailed +{ +public: + + inline FerrisImlib2ImageLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisImageLoadFailed( state, log, e.c_str(), a ) + { + setExceptionName("FerrisImlib2ImageLoadFailed"); + } +}; +#define Throw_FerrisImlib2ImageLoadFailed(e,a) \ +throw FerrisImlib2ImageLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisWaitTimedOut : public FerrisVFSExceptionBase +{ +public: + + inline FerrisWaitTimedOut( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisWaitTimedOut"); + } +}; +#define Throw_FerrisWaitTimedOut(e,a) \ +throw FerrisWaitTimedOut( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisSqlServerNameNotFound : public FerrisVFSExceptionBase +{ +public: + + inline FerrisSqlServerNameNotFound( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisSqlServerNameNotFound"); + } +}; +#define Throw_FerrisSqlServerNameNotFound(e,a) \ +throw FerrisSqlServerNameNotFound( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION GModuleOpenFailed : public FerrisVFSExceptionBase +{ +public: + + inline GModuleOpenFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("GModuleOpenFailed"); + } +}; +#define Throw_GModuleOpenFailed(e,a) \ +throw GModuleOpenFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisStreamLoadFailed : public FerrisVFSExceptionBase +{ +public: + + inline FerrisStreamLoadFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisStreamLoadFailed"); + } +}; +#define Throw_FerrisStreamLoadFailed(e,a) \ +throw FerrisStreamLoadFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + +class FERRISEXP_EXCEPTION FerrisCanNotCreateLeafOfLeaf : public FerrisVFSExceptionBase +{ +public: + + inline FerrisCanNotCreateLeafOfLeaf( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCanNotCreateLeafOfLeaf"); + } +}; +#define Throw_FerrisCanNotCreateLeafOfLeaf(e,a) \ +throw FerrisCanNotCreateLeafOfLeaf( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisOutOfMemory : public FerrisVFSExceptionBase +{ +public: + + inline FerrisOutOfMemory( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisOutOfMemory"); + } +}; +#define Throw_FerrisOutOfMemory(e,a) \ +throw FerrisOutOfMemory( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CanNotAddExternalAttribute : public FerrisVFSExceptionBase +{ +public: + + inline CanNotAddExternalAttribute( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CanNotAddExternalAttribute"); + } +}; +#define Throw_CanNotAddExternalAttribute(e,a) \ +throw CanNotAddExternalAttribute( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CurlStaticInitFailed : public FerrisVFSExceptionBase +{ +public: + + inline CurlStaticInitFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CurlStaticInitFailed"); + } +}; +#define Throw_CurlStaticInitFailed(e,a) \ +throw CurlStaticInitFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CurlEasyInitFailed : public FerrisVFSExceptionBase +{ +public: + + inline CurlEasyInitFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CurlEasyInitFailed"); + } +}; +#define Throw_CurlEasyInitFailed(e,a) \ +throw CurlEasyInitFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CurlPerformFailed : public FerrisVFSExceptionBase +{ + int r; +public: + + int getResultCode() + { + return r; + } + + inline CurlPerformFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0, + int _r=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ), + r(_r) + { + setExceptionName("CurlPerformFailed"); + } +}; +#define Throw_CurlPerformFailed(e,a,r) \ +throw CurlPerformFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a), int(r)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CurlStateError : public FerrisVFSExceptionBase +{ +public: + + inline CurlStateError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CurlStateError"); + } +}; +#define Throw_CurlStateError(e,a) \ +throw CurlStateError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCurlServerNameNotFound : public FerrisVFSExceptionBase +{ +public: + + inline FerrisCurlServerNameNotFound( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCurlServerNameNotFound"); + } +}; +#define Throw_FerrisCurlServerNameNotFound(e,a) \ +throw FerrisCurlServerNameNotFound( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION getIOStreamCloseUpdateFailed : public FerrisVFSExceptionBase +{ +public: + + inline getIOStreamCloseUpdateFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("getIOStreamCloseUpdateFailed"); + } +}; +#define Throw_getIOStreamCloseUpdateFailed(e,a) \ +throw getIOStreamCloseUpdateFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION getIOStreamCloseUpdatePermissionDenied : public getIOStreamCloseUpdateFailed +{ +public: + + inline getIOStreamCloseUpdatePermissionDenied( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + getIOStreamCloseUpdateFailed( state, log, e.c_str(), a ) + { + setExceptionName("getIOStreamCloseUpdatePermissionDenied"); + } +}; +#define Throw_getIOStreamCloseUpdatePermissionDenied(e,a) \ +throw getIOStreamCloseUpdatePermissionDenied( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION DTDCreationFailed : public FerrisVFSExceptionBase +{ +public: + + inline DTDCreationFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("DTDCreationFailed"); + } +}; +#define Throw_DTDCreationFailed(e,a) \ +throw DTDCreationFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION UnknownConfigLocation : public FerrisVFSExceptionBase +{ +public: + + inline UnknownConfigLocation( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("UnknownConfigLocation"); + } +}; +#define Throw_UnknownConfigLocation(e,a) \ +throw UnknownConfigLocation( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION RenameFailed : public FerrisVFSExceptionBase +{ +public: + + inline RenameFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("RenameFailed"); + } +}; +#define Throw_RenameFailed(e,a) \ +throw RenameFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION AccessDenied : public FerrisVFSExceptionBase +{ +public: + + inline AccessDenied( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("AccessDenied"); + } +}; +#define Throw_AccessDenied(e,a) \ +throw AccessDenied( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/* + * Use this with care, only as an action in cases that you dont expect + * to ever see. + */ +class FERRISEXP_EXCEPTION GenericError : public FerrisVFSExceptionBase +{ +public: + + inline GenericError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("GenericError"); + } +}; +#define Throw_GenericError(e,a) \ +throw GenericError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION BadlyFormedTime : public FerrisVFSExceptionBase +{ +public: + + inline BadlyFormedTime( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("BadlyFormedTime"); + } +}; +#define Throw_BadlyFormedTime(e,a) \ +throw BadlyFormedTime( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION BadlyFormedTimeString : public BadlyFormedTime +{ +public: + + inline BadlyFormedTimeString( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + BadlyFormedTime( state, log, e.c_str(), a ) + { + setExceptionName("BadlyFormedTimeString"); + } +}; +#define Throw_BadlyFormedTimeString(e,a) \ +throw BadlyFormedTimeString( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION SocketOptionsException : public FerrisVFSExceptionBase +{ +public: + + inline SocketOptionsException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("SocketOptionsException"); + } +}; +#define Throw_SocketOptionsException(e,a) \ +throw SocketOptionsException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION BackupException : public FerrisVFSExceptionBase +{ +public: + + inline BackupException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("BackupException"); + } +}; +#define Throw_BackupException(e,a) \ +throw BackupException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION UnknownBackupMode : public BackupException +{ +public: + + inline UnknownBackupMode( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + BackupException( state, log, e.c_str(), a ) + { + setExceptionName("UnknownBackupMode"); + } +}; +#define Throw_UnknownBackupMode(e,a) \ +throw UnknownBackupMode( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION BackupNameWouldBeTooLong : public BackupException +{ +public: + + inline BackupNameWouldBeTooLong( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + BackupException( state, log, e.c_str(), a ) + { + setExceptionName("BackupNameWouldBeTooLong"); + } +}; +#define Throw_BackupNameWouldBeTooLong(e,a) \ +throw BackupNameWouldBeTooLong( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION DVDReadException : public FerrisVFSExceptionBase +{ +public: + + inline DVDReadException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("DVDReadException"); + } +}; +#define Throw_DVDReadException(e,a) \ +throw DVDReadException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION StorageFull : public FerrisVFSExceptionBase +{ +public: + + inline StorageFull( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("StorageFull"); + } +}; +#define Throw_StorageFull(e,a) \ +throw StorageFull( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION QuotaStorageFull : public StorageFull +{ +public: + + inline QuotaStorageFull( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + StorageFull( state, log, e.c_str(), a ) + { + setExceptionName("QuotaStorageFull"); + } +}; +#define Throw_QuotaStorageFull(e,a) \ +throw QuotaStorageFull( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FileClipboard : public FerrisVFSExceptionBase +{ +public: + + inline FileClipboard( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FileClipboard"); + } +}; +#define Throw_FileClipboard(e,a) \ +throw FileClipboard( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CursorException : public FerrisVFSExceptionBase +{ +public: + + inline CursorException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CursorException"); + } +}; +#define Throw_CursorException(e,a) \ +throw CursorException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ParseError : public FerrisVFSExceptionBase +{ +public: + + inline ParseError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("ParseError"); + } +}; +#define Throw_ParseError(e,a) \ +throw ParseError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ProgramSpawn : public FerrisVFSExceptionBase +{ +public: + + inline ProgramSpawn( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("ProgramSpawn"); + } +}; +#define Throw_ProgramSpawn(e,a) \ +throw ProgramSpawn( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION Db4Exception : public FerrisVFSExceptionBase +{ + int db_errno; +public: + + inline Db4Exception( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0, + int db_errno = 0 ) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ), + db_errno( db_errno ) + { + setExceptionName("Db4Exception"); + } + + int get_errno() + { + return db_errno; + } + +}; +#define Throw_Db4Exception(e,a,eno) \ +throw Db4Exception( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a),(eno)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION eetException : public FerrisVFSExceptionBase +{ +public: + + inline eetException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("eetException"); + } +}; +#define Throw_eetException(e,a) \ +throw eetException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION GdbmException : public FerrisVFSExceptionBase +{ +public: + + inline GdbmException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("GdbmException"); + } +}; +#define Throw_GdbmException(e,a) \ +throw GdbmException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION tdbException : public FerrisVFSExceptionBase +{ +public: + + inline tdbException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("tdbException"); + } +}; +#define Throw_tdbException(e,a) \ +throw tdbException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION Db4KeyNotFound : public Db4Exception +{ +public: + + inline Db4KeyNotFound( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + Db4Exception( state, log, e.c_str(), a ) + { + setExceptionName("Db4KeyNotFound"); + } +}; +#define Throw_Db4KeyNotFound(e,a) \ +throw Db4KeyNotFound( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION eetKeyNotFound : public Db4Exception +{ +public: + + inline eetKeyNotFound( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + Db4Exception( state, log, e.c_str(), a ) + { + setExceptionName("eetKeyNotFound"); + } +}; +#define Throw_eetKeyNotFound(e,a) \ +throw eetKeyNotFound( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION InvalidSortSpecification : public FerrisVFSExceptionBase +{ +public: + + inline InvalidSortSpecification( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("InvalidSortSpecification"); + } +}; +#define Throw_InvalidSortSpecification(e,a) \ +throw InvalidSortSpecification( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ContentNotModified : public FerrisVFSExceptionBase +{ +public: + + inline ContentNotModified( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("ContentNotModified"); + } +}; +#define Throw_ContentNotModified(e,a) \ +throw ContentNotModified( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION ChildNotRunning : public FerrisVFSExceptionBase +{ +public: + + inline ChildNotRunning( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("ChildNotRunning"); + } +}; +#define Throw_ChildNotRunning(e,a) \ +throw ChildNotRunning( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION InvalidModeString : public FerrisVFSExceptionBase +{ +public: + + inline InvalidModeString( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("InvalidModeString"); + } +}; +#define Throw_InvalidModeString(e,a) \ +throw InvalidModeString( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION LDAPException : public FerrisVFSExceptionBase +{ +public: + + inline LDAPException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("LDAPException"); + } +}; +#define Throw_LDAPException(e,a) \ +throw LDAPException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CompressionException : public FerrisVFSExceptionBase +{ +public: + + inline CompressionException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CompressionException"); + } +}; +#define Throw_CompressionException(e,a) \ +throw CompressionException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION CompressionAlgoNotFoundException : public CompressionException +{ +public: + + inline CompressionAlgoNotFoundException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + CompressionException( state, log, e.c_str(), a ) + { + setExceptionName("CompressionAlgoNotFoundException"); + } +}; +#define Throw_CompressionAlgoNotFoundException(e,a) \ +throw CompressionAlgoNotFoundException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION IndexException : public FerrisVFSExceptionBase +{ +public: + + inline IndexException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("IndexException"); + } +}; +#define Throw_IndexException(e,a) \ +throw IndexException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FullTextIndexException : public IndexException +{ +public: + + inline FullTextIndexException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + IndexException( state, log, e.c_str(), a ) + { + setExceptionName("FullTextIndexException"); + } +}; +#define Throw_FullTextIndexException(e,a) \ +throw FullTextIndexException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION EAIndexException : public IndexException +{ +public: + + inline EAIndexException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + IndexException( state, log, e.c_str(), a ) + { + setExceptionName("EAIndexException"); + } +}; +#define Throw_EAIndexException(e,a) \ +throw EAIndexException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Thrown on assertions for the params given to functions / methods. + * You shouldn't get one of these if you follow the API docs. + */ +class FERRISEXP_EXCEPTION BadParam : public FerrisVFSExceptionBase +{ +public: + + inline BadParam( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("BadParam"); + } +}; +#define Throw_BadParam(e,a) \ +throw BadParam( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Exception involving Schemas + */ +class FERRISEXP_EXCEPTION SchemaException : public FerrisVFSExceptionBase +{ +public: + + inline SchemaException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("SchemaException"); + } +}; +#define Throw_SchemaException(e,a) \ +throw SchemaException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * When a schema is not available but is required by the method called then + * this exception is thrown + */ +class FERRISEXP_EXCEPTION SchemaNotFoundException : public SchemaException +{ +public: + + inline SchemaNotFoundException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + SchemaException( state, log, e.c_str(), a ) + { + setExceptionName("SchemaNotFoundException"); + } +}; +#define Throw_SchemaNotFoundException(e,a) \ +throw SchemaNotFoundException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Exception involving medallions + */ +class FERRISEXP_EXCEPTION MedallionException : public FerrisVFSExceptionBase +{ +public: + + inline MedallionException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("MedallionException"); + } +}; +#define Throw_MedallionException(e,a) \ +throw MedallionException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Exception involving etagere + */ +class FERRISEXP_EXCEPTION EtagereException : public FerrisVFSExceptionBase +{ +public: + + inline EtagereException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("EtagereException"); + } +}; +#define Throw_EtagereException(e,a) \ +throw EtagereException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Exception involving emblems + */ +class FERRISEXP_EXCEPTION EmblemException : public FerrisVFSExceptionBase +{ +public: + + inline EmblemException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("EmblemException"); + } +}; +#define Throw_EmblemException(e,a) \ +throw EmblemException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * When an emblem is not available but is required by the method called then + * this exception is thrown + */ +class FERRISEXP_EXCEPTION EmblemNotFoundException : public EmblemException +{ +public: + + inline EmblemNotFoundException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + EmblemException( state, log, e.c_str(), a ) + { + setExceptionName("EmblemNotFoundException"); + } +}; +#define Throw_EmblemNotFoundException(e,a) \ +throw EmblemNotFoundException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * If the add parent/child will violate the partial order then you get one + * of these. For example attempt to add a parent that is already a transitive parent. + */ +class FERRISEXP_EXCEPTION CanNotAddEmblemException : public EmblemException +{ +public: + + inline CanNotAddEmblemException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + EmblemException( state, log, e.c_str(), a ) + { + setExceptionName("CanNotAddEmblemException"); + } +}; +#define Throw_CanNotAddEmblemException(e,a) \ +throw CanNotAddEmblemException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * If a personality can not be found + */ +class FERRISEXP_EXCEPTION NoSuchPersonalityException : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchPersonalityException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchPersonalityException"); + } +}; +#define Throw_NoSuchPersonalityException(e,a) \ +throw NoSuchPersonalityException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * If a belief has not been expressed + */ +class FERRISEXP_EXCEPTION NoSuchBeliefException : public FerrisVFSExceptionBase +{ +public: + + inline NoSuchBeliefException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchBeliefException"); + } +}; +#define Throw_NoSuchBeliefException(e,a) \ +throw NoSuchBeliefException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Top level exception for agent errors + */ +class FERRISEXP_EXCEPTION AgentException : public FerrisVFSExceptionBase +{ +public: + + inline AgentException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("AgentException"); + } +}; +#define Throw_AgentException(e,a) \ +throw AgentException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Attempt to create an agent when there is already an + * agent with its name. + */ +class FERRISEXP_EXCEPTION AgentAlreadyExistsException : public AgentException +{ +public: + + inline AgentAlreadyExistsException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + AgentException( state, log, e.c_str(), a ) + { + setExceptionName("AgentAlreadyExistsException"); + } +}; +#define Throw_AgentAlreadyExistsException(e,a) \ +throw AgentAlreadyExistsException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Attempt to find an agent that doesn't exist + */ +class FERRISEXP_EXCEPTION NoSuchAgentException : public AgentException +{ +public: + + inline NoSuchAgentException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + AgentException( state, log, e.c_str(), a ) + { + setExceptionName("NoSuchAgentException"); + } +}; +#define Throw_NoSuchAgentException(e,a) \ +throw NoSuchAgentException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Agent is only binary classifier but attempt was made to set + * many emblems to classify with + */ +class FERRISEXP_EXCEPTION AgentOnlyHandlesOneEmblemException : public AgentException +{ +public: + + inline AgentOnlyHandlesOneEmblemException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + AgentException( state, log, e.c_str(), a ) + { + setExceptionName("AgentOnlyHandlesOneEmblemException"); + } +}; +#define Throw_AgentOnlyHandlesOneEmblemException(e,a) \ +throw AgentOnlyHandlesOneEmblemException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * XML Base + */ +class FERRISEXP_EXCEPTION XMLBase : public FerrisVFSExceptionBase +{ +public: + + inline XMLBase( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("XMLBase"); + } +}; +#define Throw_XMLBase(e,a) \ +throw XMLBase( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * XML Parse error + */ +class FERRISEXP_EXCEPTION XMLParseError : public XMLBase +{ +public: + + inline XMLParseError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + XMLBase( state, log, e.c_str(), a ) + { + setExceptionName("XMLParseError"); + } +}; +#define Throw_XMLParseError(e,a) \ +throw XMLParseError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * XML Fatal + */ +class FERRISEXP_EXCEPTION XMLFatalError : public XMLBase +{ +public: + + inline XMLFatalError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + XMLBase( state, log, e.c_str(), a ) + { + setExceptionName("XMLFatalError"); + } +}; +#define Throw_XMLFatalError(e,a) \ +throw XMLFatalError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * dbXML problem + */ +class FERRISEXP_EXCEPTION dbXMLException : public XMLBase +{ +public: + + inline dbXMLException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + XMLBase( state, log, e.c_str(), a ) + { + setExceptionName("dbXMLException"); + } +}; +#define Throw_dbXMLException(e,a) \ +throw dbXMLException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Problem with branch filesystem + */ +class FERRISEXP_EXCEPTION BranchFileSystem : public FerrisVFSExceptionBase +{ +public: + + inline BranchFileSystem( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("BranchFileSystem"); + } +}; +#define Throw_BranchFileSystem(e,a) \ +throw BranchFileSystem( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Problem with parsing a relative time string + */ +class FERRISEXP_EXCEPTION RelativeTimeParsing : public FerrisVFSExceptionBase +{ +public: + + inline RelativeTimeParsing( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("RelativeTimeParsing"); + } +}; +#define Throw_RelativeTimeParsing(e,a) \ +throw RelativeTimeParsing( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * Crypto Base + */ +class FERRISEXP_EXCEPTION CryptoBase : public FerrisVFSExceptionBase +{ +public: + + inline CryptoBase( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("CryptoBase"); + } +}; +#define Throw_CryptoBase(e,a) \ +throw CryptoBase( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * GPG initialization failure + */ +class FERRISEXP_EXCEPTION GPGMEInitFailed : public CryptoBase +{ +public: + + inline GPGMEInitFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + CryptoBase( state, log, e.c_str(), a ) + { + setExceptionName("GPGMEInitFailed"); + } +}; +#define Throw_GPGMEInitFailed(e,a) \ +throw GPGMEInitFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * bad signature + */ +class FERRISEXP_EXCEPTION BadSignature : public CryptoBase +{ +public: + + inline BadSignature( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + CryptoBase( state, log, e.c_str(), a ) + { + setExceptionName("BadSignature"); + } +}; +#define Throw_BadSignature(e,a) \ +throw BadSignature( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * key listing error + */ +class FERRISEXP_EXCEPTION KeylistException : public CryptoBase +{ +public: + + inline KeylistException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + CryptoBase( state, log, e.c_str(), a ) + { + setExceptionName("KeylistException"); + } +}; +#define Throw_KeylistException(e,a) \ +throw KeylistException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * XMP Metadata + */ +class FERRISEXP_EXCEPTION XMPBase : public FerrisVFSExceptionBase +{ +public: + + inline XMPBase( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("XMPBase"); + } +}; +#define Throw_XMPBase(e,a) \ +throw XMPBase( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * XMP Metadata + */ +class FERRISEXP_EXCEPTION XMPPacketScanFailed : public XMPBase +{ +public: + + inline XMPPacketScanFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + XMPBase( state, log, e.c_str(), a ) + { + setExceptionName("XMPPacketScanFailed"); + } +}; +#define Throw_XMPPacketScanFailed(e,a) \ +throw XMPPacketScanFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * GPhoto2 + */ +class FERRISEXP_EXCEPTION GPhoto2 : public FerrisVFSExceptionBase +{ +public: + + inline GPhoto2( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("GPhoto2"); + } +}; +#define Throw_GPhoto2(e,a) \ +throw GPhoto2( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * setup error in ~/.ferris + */ + +class NoOpenWithContext : public FerrisVFSExceptionBase +{ +public: + + inline NoOpenWithContext( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("NoOpenWithContext"); + } +}; +#define Throw_NoOpenWithContext(e,a) \ +throw NoOpenWithContext( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * no view/edit action defined for selection + */ + +class OpenActionIsNotDefined : public FerrisVFSExceptionBase +{ +public: + + inline OpenActionIsNotDefined( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("OpenActionIsNotDefined"); + } +}; +#define Throw_OpenActionIsNotDefined(e,a) \ +throw OpenActionIsNotDefined( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * something with DBus + */ + +class DBusException : public FerrisVFSExceptionBase +{ +public: + + inline DBusException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("DBusException"); + } +}; +#define Throw_DBusException(e,a) \ +throw DBusException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * something with DBus + */ + +class DBusConnectionException : public DBusException +{ +public: + + inline DBusConnectionException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + DBusException( state, log, e.c_str(), a ) + { + setExceptionName("DBusConnectionException"); + } +}; +#define Throw_DBusConnectionException(e,a) \ +throw DBusConnectionException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * something with web photo server, eg flickr + */ + +class WebPhotoException : public FerrisVFSExceptionBase +{ +public: + + inline WebPhotoException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("WebPhotoException"); + } +}; +#define Throw_WebPhotoException(e,a) \ +throw WebPhotoException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * something with sqlite3 database + */ + +class SQLiteException : public FerrisVFSExceptionBase +{ +public: + + inline SQLiteException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("SQLiteException"); + } +}; +#define Throw_SQLiteException(e,a) \ +throw SQLiteException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + */ + +class FerrisHALException : public FerrisVFSExceptionBase +{ +public: + + inline FerrisHALException( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisHALException"); + } +}; +#define Throw_FerrisHALException(e,a) \ +throw FerrisHALException( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * invalid syntax for a string -> filesystem + */ + +class SyntaxError : public FerrisVFSExceptionBase +{ +public: + + inline SyntaxError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("SyntaxError"); + } +}; +#define Throw_SyntaxError(e,a) \ +throw SyntaxError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * invalid ffilter syntax + */ + +class FFilterSyntaxError : public SyntaxError +{ + std::string m_data; +public: + + inline FFilterSyntaxError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + SyntaxError( state, log, e.c_str(), a ) + { + setExceptionName("FFilterSyntaxError"); + m_data = e; + } + virtual ~FFilterSyntaxError() throw() + { + } + virtual const std::string& whats() const + { + return m_data; + } +}; +#define Throw_FFilterSyntaxError(e,a) \ +throw FFilterSyntaxError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * invalid fulltext query syntax + */ + +class FulltextQuerySyntaxError : public SyntaxError +{ +public: + + inline FulltextQuerySyntaxError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + SyntaxError( state, log, e.c_str(), a ) + { + setExceptionName("FulltextQuerySyntaxError"); + } +}; +#define Throw_FulltextQuerySyntaxError(e,a) \ +throw FulltextQuerySyntaxError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +/** + * A URL/URI was given which was badly encoded. + */ + +class URLDecodeSyntaxError : public SyntaxError +{ +public: + + inline URLDecodeSyntaxError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + SyntaxError( state, log, e.c_str(), a ) + { + setExceptionName("URLDecodeSyntaxError"); + } +}; +#define Throw_URLDecodeSyntaxError(e,a) \ +throw URLDecodeSyntaxError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Errors (Really bad things, mainly errors with libferris.so itself) +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisInternalError : public FerrisVFSExceptionBase +{ +public: + + inline FerrisInternalError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("FerrisInternalError"); + } +}; +#define Throw_FerrisInternalError(e,a) \ +throw FerrisInternalError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(LG_EXCEPTION_SWITCH( Timber::_SBufT::PRI_DEBUG )), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisParentNotSetError : public FerrisInternalError +{ +public: + + inline FerrisParentNotSetError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisInternalError( state, log, e.c_str(), a ) + { + setExceptionName("FerrisParentNotSetError"); + } +}; +#define Throw_FerrisParentNotSetError(e,a) \ +throw FerrisParentNotSetError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1em()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisCanNotGetScriptNameError : public FerrisInternalError +{ +public: + + inline FerrisCanNotGetScriptNameError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisInternalError( state, log, e.c_str(), a ) + { + setExceptionName("FerrisCanNotGetScriptNameError"); + } +}; +#define Throw_FerrisCanNotGetScriptNameError(e,a) \ +throw FerrisCanNotGetScriptNameError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1em()), (e), (a)) + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +FERRISEXP_API void ThrowFromErrno( int eno, const std::string& e, Attribute* a=0); + +}; + + + +#endif // ifndef _ALREADY_INCLUDED_FERRIS_EXCEPTION_H_ diff --git a/Ferris/FerrisFileActions.cpp b/Ferris/FerrisFileActions.cpp new file mode 100644 index 0000000..4ceb3c3 --- /dev/null +++ b/Ferris/FerrisFileActions.cpp @@ -0,0 +1,656 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisFileActions.cpp,v 1.6 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "config.h" +#include "Ferris.hh" +#include "Runner.hh" +#include "FerrisFileActions.hh" +#include "FilteredContext.hh" + +#ifdef HAVE_DBUS +#include "DBus_private.hh" +#endif + +using namespace std; + +namespace Ferris +{ + static string tostr( FileActions::KnownFileOperations opcode ) + { + string opname = "unknown"; + + switch( opcode ) + { + case FileActions::OP_VIEW: + opname = "open"; + break; + case FileActions::OP_EDIT: + opname = "edit"; + break; + } + + return opname; + } + + namespace FileActions + { + KnownFileOperations fromString( const std::string& s, KnownFileOperations def ) + { + KnownFileOperations opcode = def; + if( s == "view" ) + opcode = OP_VIEW; + if( s == "edit" ) + opcode = OP_EDIT; + + return opcode; + } + + + static long ExecuteExternalApp( std::string exename, + ctxlist_t l , + bool supportsURL = false , + bool opensMany = true, + KnownFileOperations opcode = OP_UNKNOWN, + bool openDirWhenNothingSelected = false ) + { + fh_ExternalAppRunner h = new ExternalAppRunner( exename, supportsURL, opensMany ); + h->setOpCode( opcode ); + h->setOpenDirWhenNothingSelected( openDirWhenNothingSelected ); + return h->run( l ); + } + + static fh_context + CreateMimeType( const std::string& mimetype, + const std::string& mimepostfix ) + { + fh_stringstream ss; + ss << mimetype << mimepostfix << endl; + fh_context c = Resolve( "mime://" ); + c = Shell::CreateDir( c, tostr(ss), true ); + return c; + } + + + fh_context getOpenWithContext( const ctxlist_t& l ) + { + if( l.empty() ) + return 0; + string mimepostfix = "/actions"; + + LG_FILEACTIONS_D << "getOpenWithContext()" << endl; + + try + { + fh_context frontc = l.front(); + fh_context c = Resolve( "mime://filtered-bindings" ); + + LG_FILEACTIONS_D << "getOpenWithContext() have filtered bindings!" << endl; + + Context::iterator ce = c->end(); + for( Context::iterator ci = c->begin(); ci != ce; ++ci ) + { + fh_context ffc = *ci; + string ffilter = getStrSubCtx( ffc, "ffilter", "" ); + + if( !ffilter.empty() ) + { + fh_context ffilter_c = Factory::MakeFilter( ffilter ); + fh_matcher m = Factory::MakeMatcherFromContext( ffilter_c ); + + LG_FILEACTIONS_D << "Trying filtered binding at:" << ffc->getURL() + << " ffilter:" << ffilter + << endl; + + if( m(frontc) ) + { + LG_FILEACTIONS_D << "Found matching filtered binding at:" << ffc->getURL() + << " ffilter:" << ffilter + << endl; + fh_context ret = Shell::acquireContext( + ffc->getURL() + mimepostfix ); + return ret; + } + } + } + } + catch( exception& e ) + { + LG_FILEACTIONS_D << "getOpenWithContext() filtered bindings e:" << e.what() << endl; + } + + string mimename = getMimeName(l.front()); + + if( !mimename.length()) + { + fh_stringstream ss; + if( l.empty() ) + { + ss << "Nothing to get the mime type of." << endl; + } + else + { + ss << "Can not determine mime type of\n" + << l.front()->getURL() + << endl; + } + Throw_NoOpenWithContext( tostr(ss), 0 ); + } + +// cerr << "ContextView::getOpenWithContext() mime:" << mimename << endl; + + fh_stringstream ss; + ss << "mime://" << mimename << mimepostfix; + string mimeURL = tostr(ss); + + + try + { +// cerr << "ContextView::getOpenWithContext() mimeURL:" +// << mimeURL << endl; + fh_context c = Resolve( mimeURL ); + return c; + } + catch( exception& e ) + { + try + { + return CreateMimeType( mimename, mimepostfix ); + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Cant setup mime type\n" + << "e:" << e.what() + << endl; + Throw_NoOpenWithContext( tostr(ss), 0 ); + } + } + catch(...) + {} + + { + fh_stringstream ss; + ss << "No mimetype found for selection."; + Throw_NoOpenWithContext( tostr(ss), 0 ); + } + } + + long OpenWith( const std::string& n_const, const ctxlist_t& l ) + { + KnownFileOperations opcode = OP_UNKNOWN; + string n = n_const; + if( n == "view" ) + { + opcode = OP_VIEW; + n = "open"; + } + if( n == "edit" ) + opcode = OP_EDIT; + + cerr << "ContextView::open_with() n:" << n << endl; + fh_context mc = getOpenWithContext( l ); + fh_context c = mc->getSubContext( n ); + string appname = getStrAttr( c, "ferris-appname", "" ); + cerr << "ContextView::open_with() appname:" << appname << endl; + ExecuteApplicaionByShortcutName( appname, l, opcode ); + } + + + long ExecuteOperation( KnownFileOperations opcode, const ctxlist_t& l ) + { + if( l.empty() ) + return 0; + + string opname = tostr( opcode ); + + fh_context hc = l.front(); + string hc_mimename = getMimeName(hc); + fh_context mimebindc; + + string s; + fh_stringstream ss; + ss << "mime://" << hc_mimename << "/actions/" << opname; + LG_FILEACTIONS_D << "looking for action at:" << tostr(ss) << endl; + + try + { +// fh_context mc = getOpenWithContext( l ); +// fh_context c = mc->getSubContext( opname ); +// string appname = getStrAttr( c, "ferris-appname", "" ); + +// if( !appname.length() ) +// { +// fh_stringstream ss; +// ss << "No " << opname << " action is defined for this type" +// <<" mimetype:" << hc_mimename; +// Throw_OpenActionIsNotDefined( tostr(ss), 0 ); +// } + +// ExecuteApplicaionByShortcutName( appname, l ); + + fh_context owc = getOpenWithContext( l ); + fh_context mbc = owc->getSubContext( opname ); + +// fh_context mbc = Resolve( tostr(ss) ); + string appname = getStrAttr( mbc, "ferris-appname", "" ); + LG_FILEACTIONS_D << "appname:" << appname << endl; + + if( !appname.length() ) + { + fh_stringstream ss; + ss << "No " << opname << " action is defined for this type" + <<" mimetype:" << hc_mimename; + Throw_OpenActionIsNotDefined( tostr(ss), 0 ); + } + return ExecuteApplicaionByShortcutName( appname, l, opcode ); + } + catch( OpenActionIsNotDefined& e ) + { + throw; + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "No " << opname << " action is defined for this type" + << " mimetype:" << hc_mimename + << " e:" << e.what(); + Throw_OpenActionIsNotDefined( tostr(ss), 0 ); + } + } + + + long ExecuteApplicaionByShortcutName( string appname, ctxlist_t l, + KnownFileOperations opcode ) + { + fh_stringstream ss; + ss << "applications://" << appname; + LG_FILEACTIONS_D << "ExecuteApplicaionByShortcutName() app:" << tostr(ss) << endl; + fh_context ac = Resolve( tostr(ss) ); + + string exename = getStrAttr( ac, "ferris-exe", "" ); + int supportsURL = toint( getStrAttr( ac, "ferris-handles-urls", "0")); + int opensMany = toint( getStrAttr( ac, "ferris-opens-many", "0")); + int ignoreSelection = toint( getStrAttr( ac, "ferris-ignore-selection", "0")); + int openDirWhenNothingSelected = toint( + getStrAttr( ac, "ferris-open-dir-when-no-files-selected", "0")); + + LG_FILEACTIONS_D << "ExecuteApplication() exename:" << exename + << " supportsURL:" << supportsURL + << " opensMany:" << opensMany + << " ignoreSelection:" << ignoreSelection + << endl; + + if( string::npos != exename.rfind("\"") ) + { + exename = exename.substr( 0, exename.rfind("\"") ); + } + else + { + while( string::npos != exename.find("%f") ) + { + exename = exename.replace( exename.find("%f"), 2, "" ); + } + } + + return ExecuteExternalApp( exename, + ignoreSelection ? ctxlist_t() : l, + supportsURL, opensMany, opcode, openDirWhenNothingSelected ); + + } + + void setApplicationForOperationOnType( const ctxlist_t& l, + const std::string& appname, + KnownFileOperations opcode + ) + { + if( opcode == OP_UNKNOWN ) + { + stringstream ss; + ss << "Can not set unknown operation for file to app:" << appname; + Throw_NoSuchObject( tostr(ss), 0 ); + } + + string opname = tostr( opcode ); + fh_context mc = getOpenWithContext( l ); + fh_context c = Shell::acquireSubContext( mc, opname ); + try + { + fh_stringstream ss; + ss << "applications://" << appname; + LG_FILEACTIONS_D << "setApplicationForOperationOnType()" + << " checking app exists for app:" << tostr(ss) << endl; + fh_context ac = Resolve( tostr(ss) ); + } + catch( exception& e ) + { + stringstream ss; + ss << "Application doesn't exist! app:" << appname << " e:" << e.what(); + Throw_NoSuchObject( tostr(ss), 0 ); + } + setStrAttr( c, "ferris-appname", appname, true, true ); + } + + void setApplicationForOperationOnType( fh_context samplec, + const std::string& appname, + KnownFileOperations opcode + ) + { + ctxlist_t l; + l.push_back( samplec ); + setApplicationForOperationOnType( l, appname, opcode ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ExternalAppRunner::ExternalAppRunner( std::string exename, + bool supportsURL, + bool opensMany ) + : + m_exename( exename ), + m_supportsURL( supportsURL ), + m_opensMany( opensMany ), + m_rootContext( 0 ), + m_opcode( OP_UNKNOWN ), + m_openDirWhenNothingSelected( false ) + { + setupDefaultInheritedEnvironmentNames(); + } + + void + ExternalAppRunner::setupDefaultInheritedEnvironmentNames() + { + try + { + string envNamesCSV = getEDBString( + FDB_GENERAL, + "default-inherited-environment-names", + "", + true, + true ); + + set theSet; + addEAToSet( theSet, envNamesCSV ); + copy( theSet.begin(), theSet.end(), back_inserter( m_environmentVariablesToInherit )); + } + catch(...) + { + m_environmentVariablesToInherit.push_back( "PATH" ); + m_environmentVariablesToInherit.push_back( "PS1" ); + m_environmentVariablesToInherit.push_back( "PS2" ); + m_environmentVariablesToInherit.push_back( "PS3" ); + m_environmentVariablesToInherit.push_back( "PS4" ); + m_environmentVariablesToInherit.push_back( "TERM" ); + m_environmentVariablesToInherit.push_back( "HOME" ); + m_environmentVariablesToInherit.push_back( "DISPLAY" ); + } + } + + void + ExternalAppRunner::setSupportsURL( bool v ) + { + m_supportsURL = v; + } + + void + ExternalAppRunner::setOpensMany( bool v ) + { + m_opensMany = v; + } + + void + ExternalAppRunner::setRootContext( fh_context c ) + { + m_rootContext = c; + } + + stringlist_t& + ExternalAppRunner::getEnvironmentVariablesToInherit() + { + return m_environmentVariablesToInherit; + } + + void + ExternalAppRunner::setOpCode( KnownFileOperations opcode ) + { + m_opcode = opcode; + } + void + ExternalAppRunner::setOpenDirWhenNothingSelected( bool v ) + { + m_openDirWhenNothingSelected = v; + } + + + + long + ExternalAppRunner::run( const ctxlist_t& l ) + { + LG_FILEACTIONS_D << "ExternalAppRunner::run(top)" << endl; + LG_FILEACTIONS_D << "m_openDirWhenNothingSelected:" << m_openDirWhenNothingSelected << endl; + + if( l.empty() ) + { + LG_FILEACTIONS_D << "ExternalAppRunner::run() warning selection is empty..." << endl; + } + + + if( l.empty() ) + return 0; + + fh_context hc = l.front(); + LG_FILEACTIONS_D << "ExternalAppRunner::run(2)" << endl; + + if( !m_rootContext ) + { + if( hc->isParentBound() ) + m_rootContext = hc->getParent(); + else + m_rootContext = hc; + } + + LG_FILEACTIONS_D << "ExternalAppRunner::run(3)" << endl; + + typedef ctxlist_t OCL; + typedef OCL::const_iterator OCLI; + stringstream cmdss; + + fh_runner r = new Runner(); + r->setSpawnFlags( GSpawnFlags( r->getSpawnFlags() + | G_SPAWN_STDOUT_TO_DEV_NULL + | G_SPAWN_STDERR_TO_DEV_NULL + | G_SPAWN_SEARCH_PATH) ); + r->setSpawnFlags( GSpawnFlags( r->getSpawnFlags() & ~(G_SPAWN_DO_NOT_REAP_CHILD))); + + /* + * Resolve ~ paths explicitly + */ + if( starts_with( m_exename, "~/" )) + { + m_exename = Shell::getHomeDirPath() + m_exename.substr(1); + } + + r->setCommandLine( m_exename ); + cmdss << m_exename << " "; + + /****************************************/ + /****************************************/ + /****************************************/ + + r->setInheritENV( false ); + stringlist_t& envPreserve = getEnvironmentVariablesToInherit(); + for( stringlist_t::iterator iter = envPreserve.begin(); + iter != envPreserve.end(); ++iter ) + { + const char* value = g_getenv( iter->c_str() ); + if( value ) + { + string e = *iter + "=" + value; + LG_FILEACTIONS_D << "ExecuteExternalApp() exporting e:" << e << endl; + r->getEnvp().push_back( e ); + } + } + + string rooturl = m_rootContext->getURL(); + r->getEnvp().push_back( "EGO_SCRIPT_CURRENT_URL="+Shell::quote( rooturl )); + + string rootpath = m_rootContext->getDirPath(); + r->getEnvp().push_back( "EGO_SCRIPT_CURRENT_PATH="+Shell::quote( rootpath )); + LG_FILEACTIONS_D << "ExecuteExternalApp() setting env var:" + << "EGO_SCRIPT_CURRENT_URL=" << Shell::quote( rooturl ) + << "EGO_SCRIPT_CURRENT_PATH="<< Shell::quote( rootpath ) + << endl; + fh_stringstream pathss; + fh_stringstream urlss; + fh_stringstream pathssnl; + fh_stringstream urlssnl; + + for( OCLI iter = l.begin(); iter != l.end(); ++iter ) + { + pathss << " " << Shell::quote( (*iter)->getDirPath() ) << " "; + urlss << " " << Shell::quote( (*iter)->getURL() ) << " "; + + pathssnl << (*iter)->getDirPath() << endl; + urlssnl << (*iter)->getURL() << endl; + } + + r->getEnvp().push_back( "EGO_SCRIPT_SELECTED_FILE_PATHS="+tostr(pathss)); + r->getEnvp().push_back( "EGO_SCRIPT_SELECTED_URLS="+tostr(urlss)); + + r->getEnvp().push_back( "EGO_SCRIPT_SELECTED_FILE_PATHS_NL="+tostr(pathssnl)); + r->getEnvp().push_back( "EGO_SCRIPT_SELECTED_URLS_NL="+tostr(urlssnl)); + + LG_FILEACTIONS_D << "ExecuteExternalApp() setting env vars l.size:" << l.size() + << " EGO_SCRIPT_SELECTED_FILE_PATHS=" << tostr(pathss) + << " EGO_SCRIPT_SELECTED_URLS=" << tostr(urlss) + << endl; + + // + // For some actions, like image viewing, when nothing is explicitly selected + // we pass in the directory path itself so that all images in the directory + // can be shown + // + if( l.empty() && m_openDirWhenNothingSelected ) + { + string p; + + if( m_supportsURL ) + { + p = Shell::quote( rooturl ); + } + else + { + p = Shell::quote( rootpath ); + } + LG_FILEACTIONS_D << "adding:" << p << endl; + r->getArgv().push_back( p ); + cmdss << " \"" << p << "\" "; + } + + /****************************************/ + /****************************************/ + /****************************************/ + + for( OCLI iter = l.begin(); iter != l.end(); ++iter ) + { + string p; + + if( m_supportsURL ) + { + p = (*iter)->getURL(); + } + else + { + p = (*iter)->getDirPath(); + } + LG_FILEACTIONS_D << "adding:" << p << endl; + r->argvPushPath( p ); + cmdss << " \"" << p << "\" "; + } + + /****************************************/ + /****************************************/ + /****************************************/ + + r->Run(); + LG_FILEACTIONS_D << "execution of app:" << m_exename << " was OK" << endl; + + // + // Tell libferris to update the file-view EA + // + if( m_opcode != OP_UNKNOWN ) + { + string cmd = cmdss.str(); + for( OCLI iter = l.begin(); iter != l.end(); ++iter ) + { + string earl = (*iter)->getURL(); + if( contains( earl, "remembrance://" ) ) + continue; + + switch( m_opcode ) + { + case OP_VIEW: + setStrAttr( *iter, "file-view-command", cmd ); +#ifdef HAVE_DBUS + { + LG_DBUS_D << "Emitting desktop.Viewed for earl:" << earl << endl; + DBusConnection* conn = DBus::getSessionBus(); + DBus::Signal sig( "/", "org.libferris.desktop", "Viewed"); + sig.push_back( earl ); + sig.push_back( (string)(*iter)->getDirPath() ); + sig.push_back( cmd ); + sig.send( conn ); + LG_DBUS_D << "Done Emitting desktop.Viewed for earl:" << earl << endl; + } +#endif + break; + case OP_EDIT: + setStrAttr( *iter, "file-edit-command", cmd ); +#ifdef HAVE_DBUS + { + LG_DBUS_D << "Emitting desktop.Edited for earl:" << earl << endl; + DBusConnection* conn = DBus::getSessionBus(); + DBus::Signal sig( "/", "org.libferris.desktop", "Edited"); + sig.push_back( earl ); + sig.push_back( (*iter)->getDirPath() ); + sig.push_back( cmd ); + sig.send( conn ); + } +#endif + break; + } + } + } + return 0; + } + }; +}; diff --git a/Ferris/FerrisFileActions.hh b/Ferris/FerrisFileActions.hh new file mode 100644 index 0000000..a205637 --- /dev/null +++ b/Ferris/FerrisFileActions.hh @@ -0,0 +1,127 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisFileActions.hh,v 1.3 2010/09/24 21:30:37 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FILE_ACTIONS_H_ +#define _ALREADY_INCLUDED_FERRIS_FILE_ACTIONS_H_ + +#include + +namespace Ferris +{ + namespace FileActions + { + class ExternalAppRunner; + FERRIS_SMARTPTR( ExternalAppRunner, fh_ExternalAppRunner ); + + enum KnownFileOperations { + OP_VIEW = 1<<1, + OP_EDIT = 1<<2, + OP_DEFAULT = OP_VIEW, + OP_UNKNOWN = 1<<15 + }; + + FERRISEXP_API KnownFileOperations fromString( const std::string& s, KnownFileOperations def ); + + /** + * Perform a symbolic operation on the given collection of files + * such as viewing them + */ + FERRISEXP_API long ExecuteOperation( KnownFileOperations opcode, const ctxlist_t& l ); + + /** + * View/Edit are just two operations associated with a filetype + * This gets the base context showing all the operations available + * for the given selection + */ + FERRISEXP_API fh_context getOpenWithContext( const ctxlist_t& l ); + + /** + * View/Edit are just two operations associated with a filetype + */ + FERRISEXP_API long OpenWith( const std::string& n, const ctxlist_t& l ); + + /** + * Perform the symbolic application on the collection of files. + * The application name has to exist in apps:// for this method to work + */ + FERRISEXP_API long ExecuteApplicaionByShortcutName( std::string appname, ctxlist_t l, + KnownFileOperations opcode = OP_UNKNOWN ); + + /** + * Set the application to be executed for the given operation on the type + * of file passed in arg1 + */ + FERRISEXP_API void setApplicationForOperationOnType( const ctxlist_t& l, + const std::string& appname, + KnownFileOperations opcode = OP_VIEW ); + FERRISEXP_API void setApplicationForOperationOnType( fh_context samplec, + const std::string& appname, + KnownFileOperations opcode = OP_VIEW ); + + + /** + * Run an arbitrary executable command on the given collection of files. + * This is a class to allow intricate adjustments to things like environment + * variable inheritance and URL support possible. + */ + class FERRISEXP_API ExternalAppRunner + : + public Handlable + { + std::string m_exename; + bool m_supportsURL; + bool m_opensMany; + fh_context m_rootContext; + stringlist_t m_environmentVariablesToInherit; + KnownFileOperations m_opcode; + bool m_openDirWhenNothingSelected; + + void setupDefaultInheritedEnvironmentNames(); + + public: + + ExternalAppRunner( std::string exename, + bool supportsURL = true , + bool opensMany = true ); + + void setSupportsURL( bool v ); + void setOpensMany( bool v ); + void setRootContext( fh_context c ); + + stringlist_t& getEnvironmentVariablesToInherit(); + + long run( const ctxlist_t& l ); + + void setOpCode( KnownFileOperations opcode = OP_UNKNOWN ); + void setOpenDirWhenNothingSelected( bool v ); + }; + }; +}; +#endif + diff --git a/Ferris/FerrisGPG.cpp b/Ferris/FerrisGPG.cpp new file mode 100644 index 0000000..04eada9 --- /dev/null +++ b/Ferris/FerrisGPG.cpp @@ -0,0 +1,363 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGPG.cpp,v 1.4 2010/09/24 21:30:38 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +using namespace std; + + +namespace Ferris +{ +#ifdef FERRIS_HAVE_GPGME + + GPGMEContextHolder::GPGMEContextHolder( gpgme_ctx_t gctx ) : m_gctx( gctx ) + { + } + GPGMEContextHolder::GPGMEContextHolder() + : + m_gctx( 0 ) + { + gpgme_error_t e = gpgme_new( &m_gctx ); + if( e != GPG_ERR_NO_ERROR ) + { + fh_stringstream ss; + ss << "Error getting a context handle for GPGME"; + ss << "GPGME error:" << gpgme_strerror (e) << endl; + Throw_GPGMEInitFailed( tostr(ss), 0 ); + } + } + + GPGMEContextHolder::~GPGMEContextHolder() + { +// cerr << "~GPGMEContextHolder()" << endl; + if( m_gctx ) + gpgme_release( m_gctx ); + } + + gpgme_ctx_t + GPGMEContextHolder::operator*() + { + return m_gctx; + } + + gpgme_ctx_t getGPGMEContextSingleton() + { + static GPGMEContextHolder obj; + return obj; + } + + GPGMEDataHolder::GPGMEDataHolder() + : + m_gpt( 0 ) + { + gpgme_error_t e = gpgme_data_new( &m_gpt ); + if( e != GPG_ERR_NO_ERROR ) + { + fh_stringstream ss; + ss << "Error getting a data block handle for GPGME"; + ss << "GPGME error:" << gpgme_strerror (e) << endl; + Throw_GPGMEInitFailed( tostr(ss), 0 ); + } + } + // takes ownership of 'd' + GPGMEDataHolder::GPGMEDataHolder( gpgme_data_t d ) + : + m_gpt( d ) + { + } + GPGMEDataHolder::~GPGMEDataHolder() + { +// cerr << "Freeing m_gpt:" << toVoid( m_gpt ) << endl; + + if( m_gpt ) + gpgme_data_release( m_gpt ); + m_gpt = 0; + } + void + GPGMEDataHolder::TakeOwnership( gpgme_data_t newdata ) + { + if( m_gpt ) + gpgme_data_release( m_gpt ); + m_gpt = 0; + if( newdata ) + m_gpt = newdata; + } + + + + + /* + * The following two are an attempt to convert to the new 'cbs' style + * but they will give you a nasty stack smash instead of working :( + */ +// static ssize_t getGPGData_readf( void* hook, void* buffer, size_t count ) +// { +// cerr << "getGPGData_readf() hook:" << toVoid( hook ) +// << " count:" << count +// << endl; +// if( !buffer ) +// { +// return -1; +// } + +// fh_istream* issp = (fh_istream*)(hook); +// if( issp->eof() ) +// { +// return 0; +// } + +// (*issp).read( (char*)buffer, count ); +// return (*issp).gcount(); +// } + +// gpgme_data_t getGPGData( fh_istream& iss ) +// { +// gpgme_data_t ret = 0; + +// // gpgme_error_t e = gpgme_data_new_with_read_cb( +// // &ret, getGPGData_readf, &iss ); + +// gpgme_data_cbs cbs; +// // cbs.read = (gpgme_data_read_cb_t)getGPGData_readf; +// cbs.read = getGPGData_readf; +// cbs.write = 0; +// cbs.seek = 0; +// cbs.release = 0; +// gpgme_error_t e = gpgme_data_new_from_cbs( &ret, &cbs, &iss ); + +// if( e != GPG_ERR_NO_ERROR ) +// { +// fh_stringstream ss; +// ss << "Error setting up an IO handler for GPGME"; +// ss << "GPGME error:" << gpgme_strerror (e) << endl; +// Throw_GPGMEInitFailed( tostr(ss), 0 ); +// } + +// return ret; +// } + + + static int getGPGData_readf( void *hook, + char *buffer, size_t count, size_t *nread ) + { +// cerr << "getGPGData_readf() hook:" << toVoid( hook ) +// << " count:" << count +// << endl; + if( !buffer || !nread ) + { + return -1; + } + + fh_istream* issp = (fh_istream*)hook; + if( issp->eof() ) + { +// cerr << "getGPGData_readf EOF! hook:" << toVoid( hook ) +// << " count:" << count << endl; + *nread = 0; + return 0; + } + +// cerr << "getGPGData_readf hook:" << toVoid( hook ) +// << " count:" << count << endl; + + (*issp).read( buffer, count ); + *nread = (*issp).gcount(); + +// cerr << "getGPGData_readf() hook:" << toVoid( hook ) +// << " count:" << count +// << " *nread:" << (*nread) +// << endl; + + return 0; + } + + gpgme_data_t getGPGData( fh_istream* iss ) + { + gpgme_data_t ret; + gpgme_error_t e = gpgme_data_new_with_read_cb( &ret, getGPGData_readf, iss ); + + if( e != GPG_ERR_NO_ERROR ) + { + fh_stringstream ss; + ss << "Error setting up an IO handler for GPGME"; + ss << "GPGME error:" << gpgme_strerror (e) << endl; + Throw_GPGMEInitFailed( tostr(ss), 0 ); + } + + return ret; + } + + + static bool hasValidSignature( gpgme_ctx_t gctx, + fh_context plaintextc, + fh_istream iss, + bool passInPlainText = false ) + { + bool ret = false; + gpgme_error_t e = GPG_ERR_NO_ERROR; + GPGMEDataHolder gd( getGPGData( &iss ) ); + GPGMEDataHolder gpt; + GPGMEDataHolder scratch; + fh_istream tss; + +// cerr << "hasValidSignature(top) passInPlainText:" << passInPlainText << endl; +// if( plaintextc ) +// cerr << "hasValidSignature(top) plaintextc:" << plaintextc->getURL() << endl; + + if( passInPlainText ) + { + tss = plaintextc->getIStream( ios::in | ferris_ios::o_nouncrypt ); + gpt.TakeOwnership( getGPGData( &tss ) ); + } + +// cerr << "hasValidSignature(1) passInPlainText:" << passInPlainText << endl; +// if( plaintextc ) +// cerr << "hasValidSignature(1) plaintextc:" << plaintextc->getURL() << endl; + + if( passInPlainText ) e = gpgme_op_verify( gctx, gd, gpt, 0 ); + else e = gpgme_op_verify( gctx, gd, 0, scratch ); + +// cerr << "hasValidSignature(2) passInPlainText:" << passInPlainText << endl; +// if( plaintextc ) +// cerr << "hasValidSignature(2) plaintextc:" << plaintextc->getURL() << endl; + + if( e == GPG_ERR_NO_ERROR ) + ret = true; + if( e != GPG_ERR_NO_ERROR ) + { + fh_stringstream ss; + ss << "Error verifying signature"; + if( plaintextc ) + ss << "For url:" << plaintextc->getURL(); + ss << "GPGME error:" << gpgme_strerror (e) << endl; + Throw_BadSignature( tostr(ss), 0 ); + } + + return ret; + } + + static bool hasValidSignature( gpgme_ctx_t gctx, + fh_context plaintextc, + string detachedSignatureFileName, + bool passInPlainText ) + { + if( plaintextc->getParent()->isSubContextBound( detachedSignatureFileName )) + { + fh_context sigc = plaintextc->getParent()->getSubContext( detachedSignatureFileName ); + fh_istream sigiss = sigc->getIStream( ios::in | ferris_ios::o_nouncrypt ); + return hasValidSignature( gctx, + plaintextc, + sigiss, + passInPlainText ); + } + return false; + } + + + bool hasValidSignature( gpgme_ctx_t gctx, fh_context c ) + { + bool ret = false; + gpgme_error_t e = GPG_ERR_NO_ERROR; + string detachedSignatureFileName = c->getDirName(); + + ret |= hasValidSignature( gctx, c, c->getDirName() + ".sig", true ); + if( ret ) + { + return ret; + } + + fh_istream iss = c->getIStream( ios::in | ferris_ios::o_nouncrypt ); + ret |= hasValidSignature( gctx, c, iss, false ); + return ret; + } + + bool hasValidSignature( fh_context c ) + { + bool ret = false; + gpgme_error_t e = GPG_ERR_NO_ERROR; + GPGMEContextHolder gctx; + return hasValidSignature( gctx, c ); + } + +#endif + fh_istream getSignedDocumentStream( fh_context c, fh_istream iss ) + { + fh_stringstream ret; +#ifdef FERRIS_HAVE_GPGME + + gpgme_error_t e = GPG_ERR_NO_ERROR; + GPGMEContextHolder gctx; + GPGMEDataHolder gd( getGPGData( &iss ) ); + GPGMEDataHolder gpt; + + e = gpgme_op_verify( gctx, gd, 0, gpt ); + if( e == GPG_ERR_NO_ERROR ) + { +// cerr << "Sig verified" << endl; + const int buffersz = 4096; + char buffer[ buffersz + 1 ]; + + size_t nread = 0; + while( e == GPG_ERR_NO_ERROR ) + { + ssize_t bread = gpgme_data_read( gpt, buffer, buffersz ); + if( bread < 0 ) + { + fh_stringstream ess; + ess << "Failed to verify the signature, refusing to give stream." << endl + << " for c:" << c->getURL() + << endl; + cerr << tostr(ess) << endl; + Throw_BadSignature( tostr(ess), 0 ); + } + if( bread == 0 ) + break; + + nread = bread; + ret.write( buffer, nread ); + } + return ret; + } + + + fh_stringstream ess; + ess << "Failed to verify the signature, refusing to give stream." << endl + << " for c:" << c->getURL() + << endl; + cerr << tostr(ess) << endl; + Throw_BadSignature( tostr(ess), 0 ); +#endif + { + fh_stringstream ess; + ess << "No support for GPG in this libferris build :(" << endl; + Throw_BadSignature( tostr(ess), 0 ); + } + } +}; + diff --git a/Ferris/FerrisGPGContext.cpp b/Ferris/FerrisGPGContext.cpp new file mode 100644 index 0000000..315e8da --- /dev/null +++ b/Ferris/FerrisGPGContext.cpp @@ -0,0 +1,1424 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGPGContext.cpp,v 1.5 2010/09/24 21:30:38 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include // VirtualSoftlinkContext + +using namespace std; + +namespace Ferris +{ +#define DUBCORE_DESCRIPTION "dc:description" + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static std::string ValidityToString( gpgme_validity_t v ) + { + switch( v ) + { + case GPGME_VALIDITY_UNKNOWN : return( "unknown" ); + case GPGME_VALIDITY_UNDEFINED : return( "undefined" ); + case GPGME_VALIDITY_NEVER : return( "never" ); + case GPGME_VALIDITY_MARGINAL : return( "marginal" ); + case GPGME_VALIDITY_FULL : return( "full" ); + case GPGME_VALIDITY_ULTIMATE : return( "ultimate" ); + } + return( "unknown-gpgme" ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + gpgme_ctx_t + FerrisGPGRootContext::getGPGMEContext() + { + static GPGMEContextHolder obj; + return obj; + } + + void + FerrisGPGRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + + void + FerrisGPGRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_gpgallkeysContext allkeysc = 0; + fh_context child = 0; + + allkeysc = new FerrisGPGAllKeysDirectoryContext( this, "keys" ); + addNewChild( allkeysc ); + + child = new FerrisGPGUserIDToKeyContext( this, "by-uid", allkeysc ); + addNewChild( child ); + + child = new FerrisGPGUserIDToKeyContext( this, "by-name", allkeysc ); + addNewChild( child ); + + child = new FerrisGPGUserIDToKeyContext( this, "by-email", allkeysc ); + addNewChild( child ); + + child = new FerrisGPGUserIDToKeyContext( this, "by-comment", allkeysc ); + addNewChild( child ); + + } + } + + FerrisGPGRootContext::FerrisGPGRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + FerrisGPGRootContext::~FerrisGPGRootContext() + { + } + + void + FerrisGPGRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + class FERRISEXP_DLLLOCAL FerrisGPGRootContext_RootContextDropper + : + public RootContextDropper + { + public: + FerrisGPGRootContext_RootContextDropper() + { + RootContextFactory::Register( "gpg", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new FerrisGPGRootContext(); + } + return c; + } + }; + static FerrisGPGRootContext_RootContextDropper ___FerrisGPGRootContext_static_init; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + gpgme_ctx_t + FerrisGPGAllKeysDirectoryContext::getGPGMEContext() + { + if( FerrisGPGRootContext* cc = dynamic_cast( getParent() )) + { + return cc->getGPGMEContext(); + } + return 0; + } + + + void + FerrisGPGAllKeysDirectoryContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + FerrisGPGAllKeysDirectoryContext::FerrisGPGAllKeysDirectoryContext( Context* parent, + const std::string& rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + FerrisGPGAllKeysDirectoryContext::~FerrisGPGAllKeysDirectoryContext() + { + } + + fh_context + FerrisGPGAllKeysDirectoryContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "gpg://keys need to implement key creation method! FIXME" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + + void + FerrisGPGAllKeysDirectoryContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + void + FerrisGPGAllKeysDirectoryContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + fh_context child = 0; + + const char* PATTERN = 0; + int SECRET_ONLY = 0; + gpgme_error_t e = GPG_ERR_NO_ERROR; + gpgme_ctx_t gctx = getGPGMEContext(); + e = gpgme_op_keylist_start( gctx, PATTERN, SECRET_ONLY ); + + if( e != GPG_ERR_NO_ERROR ) + { + fh_stringstream ss; + ss << "Error starting to read the keylist"; + ss << "GPGME error:" << gpgme_strerror (e) << endl; + Throw_KeylistException( tostr(ss), 0 ); + } + + gpgme_key_t key; + while (!e) + { + e = gpgme_op_keylist_next (gctx, &key); + if (e) + break; + const char* rdn = key->subkeys->keyid; +// const char* rdn = key->uids->email; +// cerr << "FerrisGPGRootContext(list) rdn:" << rdn << endl; + + fh_context child = new FerrisGPGKeyContext( this, rdn, key ); + addNewChild( child ); +// cerr << "FerrisGPGRootContext(list) keyid:" << getStrAttr( child, "keyid", "none" ) << endl; + } + + if( gpgme_err_code(e) != GPG_ERR_EOF ) + { + fh_stringstream ss; + ss << "Error reading the keylist" << endl; + ss << "GPGME e:" << e << " GPG_ERR_EOF:" << GPG_ERR_EOF << " error:" << gpgme_strerror (e) << endl; + Throw_KeylistException( tostr(ss), 0 ); + } + } + } + + FerrisGPGAllKeysDirectoryContext* + FerrisGPGAllKeysDirectoryContext::priv_CreateContext( Context* parent, std::string rdn ) + { + return 0; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + gpgme_ctx_t + FerrisGPGUserIDToKeyContext::getGPGMEContext() + { + if( FerrisGPGRootContext* cc = dynamic_cast( getParent() )) + { + return cc->getGPGMEContext(); + } + return 0; + } + + + void + FerrisGPGUserIDToKeyContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + FerrisGPGUserIDToKeyContext::FerrisGPGUserIDToKeyContext( Context* parent, + const std::string& rdn, + fh_gpgallkeysContext allkc ) + : + _Base( parent, rdn ), + m_allkc( allkc ) + { + createStateLessAttributes(); + } + + FerrisGPGUserIDToKeyContext::~FerrisGPGUserIDToKeyContext() + { + } + + fh_context + FerrisGPGUserIDToKeyContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "gpg://keys need to implement key creation method! FIXME" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + + void + FerrisGPGUserIDToKeyContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + void + FerrisGPGUserIDToKeyContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + m_allkc->read( false ); + for( Context::iterator ci = m_allkc->begin(); ci != m_allkc->end(); ++ci ) + { + if( FerrisGPGKeyContext* cc = dynamic_cast< FerrisGPGKeyContext* >( GetImpl( *ci ))) + { + gpgme_key_t k = cc->getKey(); + gpgme_user_id_t uid = k->uids; + while( uid ) + { + string rdn = uid->uid; + + if( getDirName() == "by-uid" && uid->uid ) + { + rdn = uid->uid; + } + else if( getDirName() == "by-name" && uid->name ) + { + rdn = uid->name; + } + else if( getDirName() == "by-email" && uid->email ) + { + rdn = uid->email; + } + else if( getDirName() == "by-comment" && uid->comment ) + { + rdn = uid->comment; + } + + fh_context target = *ci; + + LG_CTX_D << "FerrisGPGUserIDToKeyContext::priv_read(1) " + << " target:" << target->getURL() + << " rdn:" << rdn + << endl; + + fh_context child = new VirtualSoftlinkContext( this, target, rdn ); + + LG_CTX_D << "FerrisGPGUserIDToKeyContext::priv_read(2) " + << " target:" << target->getURL() + << " rdn:" << rdn << endl; + LG_CTX_D << " child.rdn:" << child->getDirName() + << " child.url:" << child->getURL() + << endl; + + addNewChild( child ); + + uid = uid->next; + } + } + } + + for( Context::iterator ci = begin(); ci != end(); ++ci ) + { + fh_context c = *ci; + + LG_CTX_D << "FerrisGPGUserIDToKeyContext::priv_read(dump) c.rdn:" << c->getDirName() + << " EA(rdn):" << getStrAttr( c, "name", "n/a" ) + << " c.url:" << c->getURL() + << endl; + + } + + } + } + + FerrisGPGUserIDToKeyContext* + FerrisGPGUserIDToKeyContext::priv_CreateContext( Context* parent, std::string rdn ) + { + return 0; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FerrisGPGKeyContext::FerrisGPGKeyContext( Context* parent, + const char* rdn, + gpgme_key_t key ) + : + _Base( parent, rdn ), + m_key( key ) + { + createStateLessAttributes(); + } + + FerrisGPGKeyContext::~FerrisGPGKeyContext() + { + if( m_key ) + gpgme_key_release( m_key ); + } + + std::string + FerrisGPGKeyContext::priv_getRecommendedEA() + { + static string rea = "email,keyid,person-name,creation-time-display,expire-time-display"; + return rea; + } + + fh_stringstream + FerrisGPGKeyContext::SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "A GPG public or private key"; + return ss; + } + + fh_stringstream + FerrisGPGKeyContext::SL_getKeyID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + LG_CTX_D << "FerrisGPGKeyContext::SL_getKeyID() cc:" << toVoid( cc ) + << " m_key:" << toVoid( cc->m_key ) + << endl; + ss << cc->getSubKey()->keyid; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getKey()->uids->name; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getKey()->uids->email; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getFingerPrint( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + if( cc->getSubKey()->fpr ) + ss << cc->getSubKey()->fpr; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getAlgorithm( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << gpgme_pubkey_algo_name( cc->getSubKey()->pubkey_algo ); + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getKeyLength( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->length; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getKeyCreationTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->timestamp; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getKeyExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->expires; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getComment( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getKey()->uids->comment; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getUserIDRevoked( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getKey()->uids->revoked; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getUserIDInvalid( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getKey()->uids->invalid; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getIsSecretKey( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << ( !!cc->getSubKey()->secret ); + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getIsPublicKey( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << ( !cc->getSubKey()->secret ); + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getRevoked( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->revoked; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getInvalid( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->invalid; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getExpired( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->expired; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getDisabled( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->disabled; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getCanEncrypt( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->can_encrypt; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getCanSign( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->can_sign; + } + return ss; + } + fh_stringstream + FerrisGPGKeyContext::SL_getCanCertify( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGKeyContext* cc = dynamic_cast(c)) + { + ss << cc->getSubKey()->can_certify; + } + return ss; + } + + gpgme_key_t + FerrisGPGKeyContext::getKey() + { + return m_key; + } + + gpgme_subkey_t + FerrisGPGKeyContext::getSubKey() + { + return m_key->subkeys; + } + + + void + FerrisGPGKeyContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( DUBCORE_DESCRIPTION, &_Self::SL_getDesc, XSD_BASIC_STRING ); + SLEA( "keyid", &_Self::SL_getKeyID, XSD_BASIC_STRING ); + SLEA( "person-name", &_Self::SL_getPersonName, XSD_BASIC_STRING ); + SLEA( "email", &_Self::SL_getEmailAddress, XSD_BASIC_STRING ); + SLEA( "fingerprint", &_Self::SL_getFingerPrint, XSD_BASIC_STRING ); + SLEA( "algorithm", &_Self::SL_getAlgorithm, XSD_BASIC_STRING ); + SLEA( "key-length", &_Self::SL_getKeyLength, XSD_BASIC_INT ); + SLEA( "ctime", &_Self::SL_getKeyCreationTime, FXD_UNIXEPOCH_T ); + SLEA( "creation-time", &_Self::SL_getKeyCreationTime, FXD_UNIXEPOCH_T ); + SLEA( "expire-time", &_Self::SL_getKeyExpireTime, FXD_UNIXEPOCH_T ); + SLEA( "comment", &_Self::SL_getComment, XSD_BASIC_STRING ); + SLEA( "userid-revoked",&_Self::SL_getUserIDRevoked, XSD_BASIC_BOOL ); + SLEA( "userid-invalid",&_Self::SL_getUserIDInvalid, XSD_BASIC_BOOL ); + SLEA( "is-secret", &_Self::SL_getIsSecretKey, XSD_BASIC_BOOL ); + SLEA( "is-public", &_Self::SL_getIsPublicKey, XSD_BASIC_BOOL ); + SLEA( "revoked", &_Self::SL_getRevoked, XSD_BASIC_BOOL ); + SLEA( "invalid", &_Self::SL_getInvalid, XSD_BASIC_BOOL ); + SLEA( "expired", &_Self::SL_getExpired, XSD_BASIC_BOOL ); + SLEA( "disabled", &_Self::SL_getDisabled, XSD_BASIC_BOOL ); + SLEA( "can-encrypt", &_Self::SL_getCanEncrypt, XSD_BASIC_BOOL ); + SLEA( "can-sign", &_Self::SL_getCanSign, XSD_BASIC_BOOL ); + SLEA( "can-certify", &_Self::SL_getCanCertify, XSD_BASIC_BOOL ); +#undef SLEA + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + void + FerrisGPGKeyContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + gpgme_subkey_t skey = m_key->subkeys; +// if( skey ) +// skey = skey->next; + + while( skey ) + { + const char* rdn = skey->keyid; + + fh_context child = new FerrisGPGSubKeyContext( this, rdn, skey ); + addNewChild( child ); + + skey = skey->next; + } + + gpgme_user_id_t uid = m_key->uids; + while( uid ) + { + const char* rdn = uid->uid; + + fh_fcontext userid = new FakeInternalContext( this, "userids" ); + addNewChild( userid ); + + fh_context child = new FerrisGPGUserIDContext( this, rdn, getKey(), uid ); + userid->addNewChild( child ); + + uid = uid->next; + } + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + gpgme_key_t + FerrisGPGSubKeyContext::getKey() + { + if( FerrisGPGKeyContext* cc = dynamic_cast( getParent() )) + { + return cc->getKey(); + } + + return 0; + } + + gpgme_subkey_t + FerrisGPGSubKeyContext::getSubKey() + { + return m_subkey; + } + + void + FerrisGPGSubKeyContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + std::string + FerrisGPGSubKeyContext::priv_getMimeType( bool fromContent ) + { + return "application/gpgkey"; + } + + FerrisGPGSubKeyContext::FerrisGPGSubKeyContext( Context* parent, + const char* rdn, + gpgme_subkey_t subkey ) + : + _Base( parent, rdn, 0 ), + m_subkey( subkey ) + { + createStateLessAttributes(); + } + + FerrisGPGSubKeyContext::~FerrisGPGSubKeyContext() + { + } + + + void + FerrisGPGSubKeyContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + /****************************************/ + /****************************************/ + /****************************************/ + /****************************************/ + + + FerrisGPGUserIDContext::FerrisGPGUserIDContext( Context* parent, const char* rdn, + gpgme_key_t key, + gpgme_user_id_t uid ) + : + _Base( parent, rdn ), + m_key( key ), + m_uid( uid ) + { + createStateLessAttributes(); + } + + FerrisGPGUserIDContext::~FerrisGPGUserIDContext() + { + } + + + fh_stringstream + FerrisGPGUserIDContext::SL_getUID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->uid; + } + return ss; + } + fh_stringstream + FerrisGPGUserIDContext::SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->name; + } + return ss; + } + fh_stringstream + FerrisGPGUserIDContext::SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->email; + } + return ss; + } + fh_stringstream + FerrisGPGUserIDContext::SL_getComment( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->comment; + } + return ss; + } + fh_stringstream + FerrisGPGUserIDContext::SL_getValidity( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + gpgme_validity_t v = cc->m_uid->validity; + ss << ValidityToString( v ); + } + return ss; + } + fh_stringstream + FerrisGPGUserIDContext::SL_getValidityNumeric( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->validity; + } + return ss; + } + + fh_stringstream + FerrisGPGUserIDContext::SL_getRevoked( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->revoked; + } + return ss; + } + + fh_stringstream + FerrisGPGUserIDContext::SL_getInvalid( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGUserIDContext* cc = dynamic_cast(c)) + { + ss << cc->m_uid->invalid; + } + return ss; + } + + std::string + FerrisGPGUserIDContext::priv_getRecommendedEA() + { + return "person-name,comment,email,revoked,invalid,validity"; + } + + + void + FerrisGPGUserIDContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + + SLEA( "comment", &_Self::SL_getUID, XSD_BASIC_STRING ); + SLEA( "person-name", &_Self::SL_getPersonName, XSD_BASIC_STRING ); + SLEA( "email", &_Self::SL_getEmailAddress, XSD_BASIC_STRING ); + SLEA( "comment", &_Self::SL_getComment, XSD_BASIC_STRING ); + + SLEA( "validity", &_Self::SL_getValidity, XSD_BASIC_STRING ); + SLEA( "validity-numeric", &_Self::SL_getValidityNumeric, XSD_BASIC_INT ); + SLEA( "revoked", &_Self::SL_getRevoked, XSD_BASIC_BOOL ); + SLEA( "invalid", &_Self::SL_getInvalid, XSD_BASIC_BOOL ); + +#undef SLEA + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + class FERRISEXP_DLLLOCAL FerrisGPGSignaturesInternalContext + : + public FerrisBranchInternalContext + { + typedef FerrisGPGSignaturesInternalContext _Self; + typedef FerrisBranchInternalContext _Base; + + protected: + + virtual void priv_read_leaf() + { + EnsureStartStopReadingIsFiredRAII _raii( this ); + + LG_CTX_D << "FerrisGPGSignaturesInternalContext::read() is-file url:" + << getURL() + << " this:" << toVoid( dynamic_cast(this) ) + << " delegate:" << toVoid( GetImpl(Delegate) ) + << endl; + + GPGMEContextHolder gctx; + fh_istream dss = Delegate->getIStream( ios::in | ferris_ios::o_nouncrypt ); + GPGMEDataHolder inputdata( getGPGData( &dss ) ); + GPGMEDataHolder d; + GPGMEDataHolder plaintext; + + LG_CTX_D << "FerrisGPGSignaturesInternalContext::read()2 is-file url:" + << getURL() << endl; + + gpgme_error_t e = gpgme_op_verify( gctx, inputdata, 0, plaintext ); + + LG_CTX_D << "FerrisGPGSignaturesInternalContext::read()3 is-file url:" + << getURL() << endl; + + if( e == GPG_ERR_NO_ERROR ) + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + gpgme_verify_result_t result = gpgme_op_verify_result( gctx ); + LG_CTX_D << "FerrisGPGSignaturesInternalContext::read()4 is-file url:" + << getURL() << endl; + + gpgme_signature_t sig = result->signatures; + + while( sig ) + { + string rdn = sig->fpr; + + FerrisGPGSignatureContext* c = 0; + c = priv_ensureSubContext( rdn, c ); + c->constructObject( sig ); + + sig = sig->next; + } + } + } + + public: + + FerrisGPGSignaturesInternalContext( Context* theParent, + const fh_context& theDelegate, + const std::string& rdn ) + : + _Base( theParent, theDelegate, rdn ) + { + createStateLessAttributes(); + } + + virtual ~FerrisGPGSignaturesInternalContext() + { + } + }; + + FerrisBranchInternalContext* + FerrisGPGSignaturesInternalContext_Creator( Context* ctx, + const fh_context& theDelegate, + const std::string& rdn ) + { + return new FerrisGPGSignaturesInternalContext( ctx, theDelegate, rdn ); + } + + static bool FerrisGPGSignaturesInternalContext_Dropper = + FerrisBranchRootContext_Register( "branchfs-gpg-signatures", + BranchInternalContextCreatorFunctor_t( + FerrisGPGSignaturesInternalContext_Creator ) ); + + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + void + FerrisGPGSignatureContext::constructObject( gpgme_signature_t sig ) + { +// LG_CTX_D << " GPGME_SIGSUM_VALID:" << (sig->summary & GPGME_SIGSUM_VALID) << endl +// << " GPGME_SIGSUM_GREEN:" << (sig->summary & GPGME_SIGSUM_GREEN) << endl +// << " GPGME_SIGSUM_RED:" << (sig->summary & GPGME_SIGSUM_RED) << endl +// << " GPGME_SIGSUM_KEY_REVOKED:" << (sig->summary & GPGME_SIGSUM_KEY_REVOKED) << endl +// << " GPGME_SIGSUM_KEY_EXPIRED:" << (sig->summary & GPGME_SIGSUM_KEY_EXPIRED) << endl +// << " GPGME_SIGSUM_SIG_EXPIRED:" << (sig->summary & GPGME_SIGSUM_SIG_EXPIRED) << endl +// << " GPGME_SIGSUM_KEY_MISSING:" << (sig->summary & GPGME_SIGSUM_KEY_MISSING) << endl +// << " GPGME_SIGSUM_CRL_MISSING:" << (sig->summary & GPGME_SIGSUM_CRL_MISSING) << endl +// << " GPGME_SIGSUM_CRL_TOO_OLD:" << (sig->summary & GPGME_SIGSUM_CRL_TOO_OLD) << endl +// << " GPGME_SIGSUM_BAD_POLICY:" << (sig->summary & GPGME_SIGSUM_BAD_POLICY) << endl +// << " GPGME_SIGSUM_SYS_ERROR:" << (sig->summary & GPGME_SIGSUM_SYS_ERROR) << endl +// << " fingerprint:" << (sig->fpr ? sig->fpr : "") << endl +// << " status:" << sig->status << endl +// << " timestamp:" << sig->timestamp << endl +// << " timestamp:" << Time::toTimeString( sig->timestamp ) << endl +// << " exp_timestamp:" << sig->exp_timestamp << endl +// << " exp_timestamp:" << Time::toTimeString( sig->exp_timestamp ) << endl +// << " wrong_key_usage" << sig->wrong_key_usage << endl +// << " validity:" << sig->validity << endl +// << " validity-is-full:" << (sig->validity == GPGME_VALIDITY_FULL) << endl +// << " validity_reason:" << gpgme_strerror( sig->validity_reason ) << endl +// << endl; + + summary = sig->summary ; + fpr = sig->fpr ? sig->fpr : "" ; + status = sig->status ; + timestamp = sig->timestamp ; + exp_timestamp = sig->exp_timestamp ; + wrong_key_usage = sig->wrong_key_usage ; + validity = sig->validity ; + validity_reason = sig->validity_reason ; + } + + + FerrisGPGSignatureContext::FerrisGPGSignatureContext( + Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ), +// summary( 0 ), + fpr( 0 ), + status( 0 ), + timestamp( 0 ), + exp_timestamp( 0 ), + wrong_key_usage( 0 ), +// validity( 0 ), + validity_reason( 0 ) + { + createStateLessAttributes(); + } + + FerrisGPGSignatureContext::~FerrisGPGSignatureContext() + { + } + + std::string + FerrisGPGSignatureContext::priv_getRecommendedEA() + { + return "email,expire-time-display,is-valid,is-green,ctime-display,validity"; + } + + fh_stringstream + FerrisGPGSignatureContext::SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << "An individual digital signature from a collection of such " + << "signatures made about the data in a file"; + return ss; + } + + fh_stringstream + FerrisGPGSignatureContext::SL_getIsValid( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_VALID > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsGreen( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_GREEN > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsRed( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_RED > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsKeyRevoked( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_KEY_REVOKED > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsKeyExpired( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_KEY_EXPIRED > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsSigExpired( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_SIG_EXPIRED > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsKeyMissing( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_KEY_MISSING > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsCRLMissing( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_CRL_MISSING > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsCRLToOld( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_CRL_TOO_OLD > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getIsBadPolicy( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << ( cc->summary & GPGME_SIGSUM_BAD_POLICY > 0 ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getFingerPrint( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << cc->fpr; + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getStatus( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << gpgme_strerror( cc->status ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getSigCreationTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << cc->timestamp; + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getSigExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << cc->exp_timestamp; + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getSigHasExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << (cc->exp_timestamp != 0); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getWrongKeyUsage( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + ss << cc->wrong_key_usage; + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getValidity( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + gpgme_validity_t v = cc->validity; + ss << ValidityToString( v ); + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getValidityNumeric( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + gpgme_validity_t v = cc->validity; + ss << v; + } + return ss; + } + + std::pair< gpgme_key_t, fh_context > + FerrisGPGSignatureContext::getKey() + { + fh_context c = Resolve( "gpg://keys" ); + for( Context::iterator ci = c->begin(); ci != c->end(); ++ci ) + { + string civ = getStrAttr( *ci, "fingerprint", "" ); + if( civ == fpr ) + { + FerrisGPGKeyContext* kc = dynamic_cast( GetImpl( *ci ) ); + return make_pair( kc->getKey(), *ci ); + } + } + return make_pair( (gpgme_key_t)0, (Context*)0 ); + +// gpgme_error_t e = GPG_ERR_NO_ERROR; +// const char* PATTERN = 0; +// int SECRET_ONLY = 0; +// GPGMEContextHolder gctx; +// e = gpgme_op_keylist_start( gctx, PATTERN, SECRET_ONLY ); + +// if( e != GPG_ERR_NO_ERROR ) +// { +// fh_stringstream ss; +// ss << "Error starting to read the keylist"; +// ss << "GPGME error:" << gpgme_strerror (e) << endl; +// Throw_KeylistException( tostr(ss), 0 ); +// } + +// gpgme_key_t key; +// while (!e) +// { +// e = gpgme_op_keylist_next (gctx, &key); +// if (e) +// break; + +// gpgme_subkey_t sk = key->subkeys; +// while( sk ) +// { +// if( sk->keyid == SoughtKeyID.c_str() ) +// { +// return key; +// } +// sk = sk->next; +// } + +// } + +// if( gpgme_err_code(e) != GPG_ERR_EOF ) +// { +// fh_stringstream ss; +// ss << "Error reading the keylist" << endl; +// ss << "GPGME e:" << e << " GPG_ERR_EOF:" << GPG_ERR_EOF << " error:" << gpgme_strerror (e) << endl; +// Throw_KeylistException( tostr(ss), 0 ); +// } + } + fh_stringstream + FerrisGPGSignatureContext::SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + std::pair< gpgme_key_t, fh_context > p = cc->getKey(); + if( p.first ) + ss << p.first->uids->name; + } + return ss; + } + fh_stringstream + FerrisGPGSignatureContext::SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( FerrisGPGSignatureContext* cc = dynamic_cast(c)) + { + std::pair< gpgme_key_t, fh_context > p = cc->getKey(); + if( p.first ) + ss << p.first->uids->email; + } + return ss; + } + + void + FerrisGPGSignatureContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( DUBCORE_DESCRIPTION, &_Self::SL_getDesc, XSD_BASIC_STRING ); + SLEA( "is-valid", &_Self::SL_getIsValid, XSD_BASIC_BOOL ); + SLEA( "is-green", &_Self::SL_getIsGreen, XSD_BASIC_BOOL ); + SLEA( "is-red", &_Self::SL_getIsRed, XSD_BASIC_BOOL ); + SLEA( "key-revoked", &_Self::SL_getIsKeyRevoked, XSD_BASIC_BOOL ); + SLEA( "key-expired", &_Self::SL_getIsKeyExpired, XSD_BASIC_BOOL ); + SLEA( "sig-expired", &_Self::SL_getIsSigExpired, XSD_BASIC_BOOL ); + SLEA( "key-missing", &_Self::SL_getIsKeyMissing, XSD_BASIC_BOOL ); + SLEA( "crl-missing", &_Self::SL_getIsCRLMissing, XSD_BASIC_BOOL ); + SLEA( "revocation-list-missing", &_Self::SL_getIsCRLMissing, XSD_BASIC_BOOL ); + SLEA( "crl-too-old", &_Self::SL_getIsCRLToOld, XSD_BASIC_BOOL ); + SLEA( "revocation-list-too-old", &_Self::SL_getIsCRLToOld, XSD_BASIC_BOOL ); + SLEA( "bad-policy", &_Self::SL_getIsBadPolicy, XSD_BASIC_BOOL ); + + SLEA( "fingerprint", &_Self::SL_getFingerPrint, XSD_BASIC_STRING ); + SLEA( "status", &_Self::SL_getStatus, XSD_BASIC_STRING ); + + SLEA( "ctime", &_Self::SL_getSigCreationTime, FXD_UNIXEPOCH_T ); + SLEA( "creation-time", &_Self::SL_getSigCreationTime, FXD_UNIXEPOCH_T ); + SLEA( "expire-time", &_Self::SL_getSigExpireTime, FXD_UNIXEPOCH_T ); + SLEA( "has-expire-time", &_Self::SL_getSigHasExpireTime, XSD_BASIC_BOOL ); + + SLEA( "wrong-key-usage", &_Self::SL_getWrongKeyUsage, XSD_BASIC_BOOL ); + SLEA( "validity", &_Self::SL_getValidity, XSD_BASIC_STRING ); + SLEA( "validity-numeric", &_Self::SL_getValidityNumeric, XSD_BASIC_INT ); + + SLEA( "person-name", &_Self::SL_getPersonName, XSD_BASIC_STRING ); + SLEA( "email", &_Self::SL_getEmailAddress, XSD_BASIC_STRING ); + +#undef SLEA + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + void + FerrisGPGSignatureContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + std::pair< gpgme_key_t, fh_context > p = getKey(); + if( p.first && p.second ) + { + fh_context child = new VirtualSoftlinkContext( this, p.second ); + addNewChild( child ); + } + } + } + + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + +}; diff --git a/Ferris/FerrisGPGContext_private.hh b/Ferris/FerrisGPGContext_private.hh new file mode 100644 index 0000000..aad3d1c --- /dev/null +++ b/Ferris/FerrisGPGContext_private.hh @@ -0,0 +1,421 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGPGContext_private.hh,v 1.5 2010/09/24 21:30:38 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_GPG_CONTEXT_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_GPG_CONTEXT_PRIVH_ + +#include +#include +#include + +namespace Ferris +{ + class FerrisGPGAllKeysDirectoryContext; + FERRIS_CTX_SMARTPTR( FerrisGPGAllKeysDirectoryContext, fh_gpgallkeysContext ); + + /** + * Root context for gpg:// + */ + class FERRISEXP_DLLLOCAL FerrisGPGRootContext + : + public StateLessEAHolder< FerrisGPGRootContext, FakeInternalContext > + { + typedef FerrisGPGRootContext _Self; + typedef StateLessEAHolder< FerrisGPGRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + + public: + + FerrisGPGRootContext(); + virtual ~FerrisGPGRootContext(); + + void createStateLessAttributes( bool force = false ); + + gpgme_ctx_t getGPGMEContext(); + }; + + /** + * Context for showing the 'keys' directory + * + * Requires + * 1) able to read the list of keys currently on the keyring on priv_read() + * 2) able to create a new key for the keyring on createSubContext() + */ + class FERRISEXP_DLLLOCAL FerrisGPGAllKeysDirectoryContext + : + public StateLessEAHolder< FerrisGPGAllKeysDirectoryContext, FakeInternalContext > + { + typedef FerrisGPGAllKeysDirectoryContext _Self; + typedef StateLessEAHolder< FerrisGPGAllKeysDirectoryContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + protected: + + virtual void priv_read(); + virtual std::string priv_getMimeType( bool fromContent = false ) + { return MIMETYPE_DIRECTORY; } + + public: + + FerrisGPGAllKeysDirectoryContext( Context* parent, const std::string& rdn ); + virtual ~FerrisGPGAllKeysDirectoryContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + _Self* priv_CreateContext( Context* parent, std::string rdn ); + + gpgme_ctx_t getGPGMEContext(); + + }; + + + /** + * Context for showing links for each userid property to the key that it belongs to + * + */ + class FERRISEXP_DLLLOCAL FerrisGPGUserIDToKeyContext + : + public StateLessEAHolder< FerrisGPGUserIDToKeyContext, FakeInternalContext > + { + typedef FerrisGPGUserIDToKeyContext _Self; + typedef StateLessEAHolder< FerrisGPGUserIDToKeyContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + protected: + + virtual void priv_read(); + virtual std::string priv_getMimeType( bool fromContent = false ) + { return MIMETYPE_DIRECTORY; } + + fh_gpgallkeysContext m_allkc; + + public: + + FerrisGPGUserIDToKeyContext( Context* parent, const std::string& rdn, fh_gpgallkeysContext allkc ); + virtual ~FerrisGPGUserIDToKeyContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + _Self* priv_CreateContext( Context* parent, std::string rdn ); + + gpgme_ctx_t getGPGMEContext(); + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /** + */ + class FERRISEXP_DLLLOCAL FerrisGPGKeyContext + : + public StateLessEAHolder< FerrisGPGKeyContext, FakeInternalContext > + { + friend class FerrisGPGRootContext; + + typedef FerrisGPGKeyContext _Self; + typedef StateLessEAHolder< FerrisGPGKeyContext, FakeInternalContext > _Base; + + gpgme_key_t m_key; + + protected: + + virtual void priv_read(); + virtual std::string priv_getMimeType( bool fromContent = false ) + { return MIMETYPE_DIRECTORY; } + + public: + + virtual gpgme_key_t getKey(); + virtual gpgme_subkey_t getSubKey(); + + FerrisGPGKeyContext( Context* parent, const char* rdn, gpgme_key_t key ); + virtual ~FerrisGPGKeyContext(); + + virtual std::string priv_getRecommendedEA(); + static fh_stringstream SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getKeyID( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getFingerPrint( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getAlgorithm( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getKeyLength( Context* c, const std::string& rdn, EA_Atom* atom ); + + + static fh_stringstream SL_getKeyCreationTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getKeyExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getComment( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUserIDRevoked( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getUserIDInvalid( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsSecretKey( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsPublicKey( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRevoked( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getInvalid( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getExpired( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getDisabled( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getCanEncrypt( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getCanSign( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getCanCertify( Context* c, const std::string& rdn, EA_Atom* atom ); + + void createStateLessAttributes( bool force = false ); + + }; + + + class FERRISEXP_DLLLOCAL FerrisGPGSubKeyContext + : + public FerrisGPGKeyContext + { + typedef FerrisGPGSubKeyContext _Self; + typedef FerrisGPGKeyContext _Base; + + gpgme_subkey_t m_subkey; + + protected: + + virtual void priv_read(); + virtual std::string priv_getMimeType( bool fromContent = false ); + + public: + + virtual gpgme_key_t getKey(); + virtual gpgme_subkey_t getSubKey(); + + FerrisGPGSubKeyContext( Context* parent, const char* rdn, gpgme_subkey_t subkey ); + virtual ~FerrisGPGSubKeyContext(); + + void createStateLessAttributes( bool force = false ); + }; + + + class FERRISEXP_DLLLOCAL FerrisGPGUserIDContext + : + public StateLessEAHolder< FerrisGPGUserIDContext, leafContext > + { + typedef FerrisGPGUserIDContext _Self; + typedef StateLessEAHolder< FerrisGPGUserIDContext, leafContext > _Base; + + gpgme_key_t m_key; + gpgme_user_id_t m_uid; + + protected: + + public: + + + FerrisGPGUserIDContext( Context* parent, const char* rdn, + gpgme_key_t key, + gpgme_user_id_t uid ); + virtual ~FerrisGPGUserIDContext(); + + virtual std::string priv_getRecommendedEA(); + + static fh_stringstream SL_getUID( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getComment( Context* c, const std::string& rdn, EA_Atom* atom ); + + static fh_stringstream SL_getValidity( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getValidityNumeric( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRevoked( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getInvalid( Context* c, const std::string& rdn, EA_Atom* atom ); + + void createStateLessAttributes( bool force = false ); + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +// /** +// * Root context for gpg-signatures:// +// */ +// class FerrisGPGSignaturesRootContext +// : +// public StateLessEAHolder< FerrisGPGSignaturesRootContext, FakeInternalContext > +// { +// typedef FerrisGPGSignaturesRootContext _Self; +// typedef StateLessEAHolder< FerrisGPGSignaturesRootContext, FakeInternalContext > _Base; + +// virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + +// protected: + +// virtual void priv_read(); + +// public: + +// FerrisGPGSignaturesRootContext(); +// virtual ~FerrisGPGSignaturesRootContext(); + +// void createStateLessAttributes( bool force = false ); + +// gpgme_ctx_t getGPGMEContext(); +// }; + + +// /** +// * Context to mirror the underlying filesystem and carry the base fh_context pointer +// * down to the file level in the layer that is sitting above the normal filesystem. +// * +// * eg. gpg-signatures://file:///tmp will have a Delegate of /tmp +// * +// */ +// class FerrisGPGSignaturesInternalContext +// : +// public ChainedViewContext +// { +// typedef FerrisGPGSignaturesInternalContext _Self; +// typedef ChainedViewContext _Base; +// typedef Context _DontDelegateBase; + +// protected: + +// virtual void UnPageSubContextsIfNeeded(); +// virtual std::string private_getStrAttr( const std::string& rdn, +// const std::string& def = "", +// bool getAllLines = false , +// bool throwEx = false ); + +// public: + +// FerrisGPGSignaturesInternalContext( Context* theParent, const fh_context& theDelegate ); +// FerrisGPGSignaturesInternalContext( Context* theParent, const fh_context& theDelegate, +// const std::string& rdn ); +// virtual ~FerrisGPGSignaturesInternalContext(); + +// virtual std::string getDirName() const; + +// stringlist_t& getForceLocalAttributeNames(); + +// virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); +// virtual void OnExists ( NamingEvent_Exists* ev, std::string olddn, std::string newdn ); +// virtual void OnCreated( NamingEvent_Created* ev, std::string olddn, std::string newdn ); + +// virtual void read( bool force = 0 ); +// virtual long guessSize() throw(); + + +// void createStateLessAttributes( bool force = false ); +// _Self* priv_CreateContext( Context* parent, std::string rdn ); +// virtual fh_context priv_getSubContext( const std::string& rdn ) +// throw( NoSuchSubContext ); + +// gpgme_ctx_t getGPGMEContext(); + +// }; + + /** + * Context to show an individual signature for the collection of signatures in a signed item + */ + class FERRISEXP_DLLLOCAL FerrisGPGSignatureContext + : + public StateLessEAHolder< FerrisGPGSignatureContext, FakeInternalContext > + { + typedef FerrisGPGSignatureContext _Self; + typedef StateLessEAHolder< FerrisGPGSignatureContext, FakeInternalContext > _Base; + + gpgme_sigsum_t summary; + std::string fpr; + gpgme_error_t status; + time_t timestamp; + time_t exp_timestamp; + int wrong_key_usage : 1; + gpgme_validity_t validity; + gpgme_error_t validity_reason; + + protected: + + virtual void priv_read(); + + public: + + void constructObject( gpgme_signature_t sig ); + FerrisGPGSignatureContext( Context* parent, const std::string& rdn ); + virtual ~FerrisGPGSignatureContext(); + + virtual std::string priv_getRecommendedEA(); + + static fh_stringstream SL_getDesc( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsValid( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsGreen( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsRed( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsKeyRevoked( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsKeyExpired( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsSigExpired( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsKeyMissing( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsCRLMissing( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsCRLToOld( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getIsBadPolicy( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getFingerPrint( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getStatus( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getSigCreationTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getSigExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getSigHasExpireTime( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getWrongKeyUsage( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getValidity( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getValidityNumeric( Context* c, const std::string& rdn, EA_Atom* atom ); + + + // we return the context of the key in libferris as ->second so that it is not + // reclaimed by the memory manager and thus ->first is well defined as long + // as the pair is in scope. + std::pair< gpgme_key_t, fh_context > getKey(); + static fh_stringstream SL_getPersonName( Context* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getEmailAddress( Context* c, const std::string& rdn, EA_Atom* atom ); + + + void createStateLessAttributes( bool force = false ); + }; + + +}; +#endif diff --git a/Ferris/FerrisGPG_private.hh b/Ferris/FerrisGPG_private.hh new file mode 100644 index 0000000..2b746b2 --- /dev/null +++ b/Ferris/FerrisGPG_private.hh @@ -0,0 +1,105 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGPG_private.hh,v 1.3 2010/09/24 21:30:38 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_GPG_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_GPG_PRIV_H_ + +#include +#include +#include + +#ifdef FERRIS_HAVE_GPGME +extern "C" { +#include +}; +#endif + +namespace Ferris +{ +#ifdef FERRIS_HAVE_GPGME + + struct FERRISEXP_API GPGMEContextHolder + { + gpgme_ctx_t m_gctx; + + // takes ownership of gctx + GPGMEContextHolder( gpgme_ctx_t gctx ); + GPGMEContextHolder(); + ~GPGMEContextHolder(); + gpgme_ctx_t operator*(); + operator gpgme_ctx_t() + { + return m_gctx; + } + }; + + + struct FERRISEXP_API GPGMEDataHolder + { + private: + GPGMEDataHolder( const GPGMEDataHolder& ); + GPGMEDataHolder& operator=( const GPGMEDataHolder& d ); + + public: + gpgme_data_t m_gpt; + + GPGMEDataHolder(); + + // takes ownership of 'd' + GPGMEDataHolder( gpgme_data_t d ); + ~GPGMEDataHolder(); + + void TakeOwnership( gpgme_data_t newdata ); + operator gpgme_data_t() + { + return m_gpt; + } + }; + + gpgme_data_t getGPGData( fh_istream* iss ); + +#endif + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +#ifdef FERRIS_HAVE_GPGME + FERRISEXP_API gpgme_ctx_t getGPGMEContextSingleton(); + FERRISEXP_API bool hasValidSignature( gpgme_ctx_t gctx, fh_context c ); + FERRISEXP_API bool hasValidSignature( fh_context c ); +#endif + + FERRISEXP_API fh_istream getSignedDocumentStream( fh_context c, fh_istream iss ); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ +}; +#endif diff --git a/Ferris/FerrisHandle.cpp b/Ferris/FerrisHandle.cpp new file mode 100644 index 0000000..7a9016e --- /dev/null +++ b/Ferris/FerrisHandle.cpp @@ -0,0 +1,105 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisHandle.cpp,v 1.2 2010/09/24 21:30:39 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + + +// /** +// * We start with a single reference already to prevent boundary race +// * conditions. +// */ +// Handlable::Handlable() +// : +// ref_count(0) +// { +// // cerr << "Handlable::Handlable() " << endl; +// } + +// /** +// * Add another reference +// */ +// Handlable::ref_count_t +// Handlable::AddRef() +// { +// return ++ref_count; +// } + +// /** +// * Release a reference +// */ +// Handlable::ref_count_t +// Handlable::Release() +// { +// g_return_val_if_fail( ref_count >= 1 , 1 ); +// return --ref_count; +// } + +// Handlable::ref_count_t +// Handlable::getReferenceCount() +// { +// return ref_count; +// } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +// /** +// * Called by FerrisRefCounted<> when this object is about +// * to be deleted. This abstracts the AddRef() and Release() +// * from knowing when the policy decides to delete objects. +// */ +// void +// Handlable::AboutToBeDeleted() +// { +// // cerr << "HandlableBase::AboutToBeDeleted()" << endl; +// getGenericCloseSig().emit( this ); +// } + +// Handlable::GenericCloseSignal_t& +// Handlable::getGenericCloseSig() +// { +// return GenericCloseSignal; +// } + + + + + + +}; diff --git a/Ferris/FerrisHandle.hh b/Ferris/FerrisHandle.hh new file mode 100644 index 0000000..2b0b046 --- /dev/null +++ b/Ferris/FerrisHandle.hh @@ -0,0 +1,391 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisHandle.hh,v 1.2 2010/09/24 21:30:39 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#ifndef INCLUDED_FERRIS_HANDLE_H +#define INCLUDED_FERRIS_HANDLE_H + +#include + +#include + +#include + +#include +#include + +#include + + +namespace Ferris +{ + +// /** +// * Very much like Loki::DefaultSPStorage except that +// * DefaultSPStorage(const StoredType& p) : pointee_(p) {} +// * will bump the reference count so that code like the following +// * works +// * ContextSubType* sc = new ContextSubType(); // 1 +// * fh_context c = sc; // 2 +// * the 'c' var will bump the reference count so that when it goes +// * out of scope then the rc will return to what it was on the line (1) +// */ +// template +// class FerrisSmartPtrStorage +// { +// protected: +// typedef T* StoredType; // the type of the pointee_ object +// typedef T* PointerType; // type returned by operator-> +// typedef T& ReferenceType; // type returned by operator* + +// public: +// FerrisSmartPtrStorage() : pointee_(Default()) +// {} + +// // The storage policy doesn't initialize the stored pointer +// // which will be initialized by the OwnershipPolicy's Clone fn +// FerrisSmartPtrStorage(const FerrisSmartPtrStorage&) +// {} + +// template +// FerrisSmartPtrStorage(const FerrisSmartPtrStorage&) +// {} + +// FerrisSmartPtrStorage(const StoredType& p) +// : pointee_(p) +// { +// if( p ) +// { +// p->AddRef(); +// } +// } + +// PointerType operator->() const { return pointee_; } + +// ReferenceType operator*() const { return *pointee_; } + +// void Swap(FerrisSmartPtrStorage& rhs) +// { std::swap(pointee_, rhs.pointee_); } + +// // Accessors +// friend inline PointerType GetImpl(const FerrisSmartPtrStorage& sp) +// { return sp.pointee_; } + +// friend inline const StoredType& GetImplRef(const FerrisSmartPtrStorage& sp) +// { return sp.pointee_; } + +// friend inline StoredType& GetImplRef(FerrisSmartPtrStorage& sp) +// { return sp.pointee_; } + +// protected: +// // Destroys the data stored +// // (Destruction might be taken over by the OwnershipPolicy) +// void Destroy() +// { delete pointee_; } + +// // Default value to initialize the pointer +// static StoredType Default() +// { return 0; } + +// private: +// // Data +// StoredType pointee_; +// }; + + +// /** +// * SmartPtr<> policy class [OwnershipPolicy] for Handlable objects. +// * This class implements a intrusive reference count like the COMRefCounted +// * policy in the Modern C++ design book. +// */ +// template +// class FerrisRefCounted +// { +// public: + +// FerrisRefCounted() +// {} + +// FerrisRefCounted( const FerrisRefCounted& r) +// {} + +// template +// FerrisRefCounted(const FerrisRefCounted&) +// {} + +// /** +// * Create a new handle +// */ +// P Clone(const P& val) +// { +// if( val ) +// { +// // cerr << "Adding ref :" << (void*)val << endl; +// val->AddRef(); +// } +// return val; +// } + +// /** +// * Release a reference. This may trigger a getClosureSignal() to fire due to +// * the final reference being dropped. +// * +// * @param val Object that we are releasing an intrusive reference to +// * @return true if the object should die. +// */ +// bool Release(const P& val) +// { +// // cerr << "Removing ref :" << (void*)val << endl; +// if( !val ) +// { +// // cerr << "Release for a NULL object, return 0" << endl; +// return false; +// } + +// // P::ref_count_t +// int v = val->AddRef(); +// if( v == 2 ) +// { +// // cerr << "FerrisRefCounted::Release() calling about to delete." << endl; +// val->AboutToBeDeleted(); +// } + +// v = val->Release(); +// v = val->Release(); +// if( !v ) +// { +// /* +// * Time to die amigo +// */ +// return true; +// } + +// return false; +// } + +// enum { destructiveCopy = false }; + +// static void Swap(FerrisRefCounted&) +// { +// } +// }; + + +// /** +// * Base class for all classes that have handles using the FerrisRefCounted<> +// * policy. +// */ +// class Handlable : public SigC::Object // : public HandlableBase +// { +// // memory management +// friend class ContextStreamMemoryManager; + +// public: + +// typedef SigC::Signal1< void, Handlable* > GenericCloseSignal_t; + +// protected: + +// /** +// * Type for reference counts. This could be 16/32/64 bits. +// */ +// typedef gint16 ref_count_t; + +// public: // NB: testing only +// /** +// * shared reference count for all handles that point to this object. +// * Don't access outside object +// */ +// ref_count_t ref_count; + +// /* +// * Don't access outside object +// */ +// GenericCloseSignal_t GenericCloseSignal; + +// public: + +// Handlable(); + +// virtual ref_count_t AddRef(); +// virtual ref_count_t Release(); +// ref_count_t getReferenceCount(); + + + +// GenericCloseSignal_t& getGenericCloseSig(); +// virtual void AboutToBeDeleted(); + + +// }; + + + +// //////////////////////////////////////////////////////////////////////////////// +// // Emits a signal before last reference is dropped. +// //////////////////////////////////////////////////////////////////////////////// +// template +// class PtrHandlableSigEmitter +// : +// public SigC::Object +// { +// public: + +// typedef PtrHandlableSigEmitter ThisClass; + +// typedef T* PointerType; // type returned by operator-> +// typedef T& ReferenceType; // type returned by operator* + +// /** +// * A signal that is emitted when the object is about to die. +// */ +// typedef SigC::Signal1< void, ReferenceType > CloseSignal_t; + +// private: +// CloseSignal_t CloseSignal; + +// public: + +// CloseSignal_t& getCloseSig() +// { +// return CloseSignal; +// } + +// void EmitClose( Handlable* ) +// { +// // cerr << "PtrHandlableSigEmitter::EmitClose() " << endl; +// getCloseSig().emit( (PointerType)this ); +// } + +// PtrHandlableSigEmitter( Handlable* han ) +// { +// // cerr << "PtrHandlableSigEmitter::HandlableSigEmitter() " << endl; +// han->getGenericCloseSig().connect(slot(this, &ThisClass::EmitClose)); +// // cerr << "PtrHandlableSigEmitter::HandlableSigEmitter() " << endl; +// } + +// virtual ~PtrHandlableSigEmitter() +// { +// } + + +// typedef PtrHandlableSigEmitter _Self; + +// }; + + + + +// template +// typename T::_Self::CloseSignal_t& +// getCloseSig( T& obj ) +// { +// typename T::_Self * hook = &obj; +// return hook->getCloseSig(); +// } + + +// // template +// // inline bool isBound(const T& sp) +// // { +// // // return ::Loki::GetImpl(sp) != 0 ; +// // return GetImpl(sp) != 0 ; +// // } + +// template class CHECKER> +// inline bool isBound( const Loki::SmartPtr< T, +// FerrisRefCounted, +// CONVERTER, +// CHECKER, +// FerrisSmartPtrStorage > & sp) +// { +// return GetImpl(sp) != 0 ; +// } + +// template class CHECKER, +// template class SPT> +// inline bool isBound( const Loki::SmartPtr< T, +// Ferris::FerrisRefCounted, +// CONVERTER, +// CHECKER, +// SPT >& sp) +// { +// return ::Loki::GetImpl(sp) != 0 ; +// } + + +// template < class HT, class OT > +// HT& Sink( HT& handle, const OT& obj ) +// { +// HT th( obj ); +// handle = th; +// return handle; +// } + + +// template +// inline To Upcast( To& dst, From& src ) +// { +// dst = GetImpl( src ); +// // Solved by using a new storage policy +// // dst->AddRef(); +// return dst; +// } + +// template +// inline To Upcast( To& dst, From* src ) +// { +// dst = src; +// // Solved by using a new storage policy +// // dst->AddRef(); +// return dst; +// } + +// template +// void* toVoid( T smptr ) +// { +// return (void*)(GetImpl(smptr)); +// } + +// template +// void* toVoid( T* obj ) +// { +// return (void*)(obj); +// } + +}; + + + + +#endif diff --git a/Ferris/FerrisKDE.cpp b/Ferris/FerrisKDE.cpp new file mode 100644 index 0000000..c1cffc6 --- /dev/null +++ b/Ferris/FerrisKDE.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisKDE.cpp,v 1.7 2011/07/31 21:30:49 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +#include "config.h" +#include "FerrisKDE.hh" + +#include +#include +#include + +#ifdef HAVE_KDE +#include +#include +#include +#include +#include +#include +#endif + + + +using namespace std; + + +namespace Ferris +{ + namespace KDE + { +#ifdef HAVE_KDE + + /** + * This exists because folks might want to use libferris compiled + * with KDE mime sniffing from an app which is not a KDE client. + * + * ie. We dont want to force command line clients to know anything + * about KDE if they just want to getStrAttr( ctx, "mimetype" ); + */ + class FERRISEXP_DLLLOCAL KAppHolder + { + KApplication& getKApp() + { + static KApplication* a = new KApplication( true ); + return *a; + } + + public: + KAppHolder() + { + if( !KApplication::kApplication() ) + { + KLocalizedString kl = KLocalizedString(); + QByteArray qba = "libferris"; + KAboutData* kabout = new KAboutData( qba, qba, kl, qba ); + int argc = 1; + char* argv[] = { "libferris", 0 }; + KCmdLineArgs::init( argc, argv, kabout ); + + getKApp(); + } + } + }; + + typedef Loki::SingletonHolder< KAppHolder, Loki::CreateUsingNew, Loki::NoDestroy > KAppSingleton; +#endif + + + void ensureKDEApplication() + { + installQTMsgHandler(); +#ifdef HAVE_KDE + if(getenv("DISPLAY") && strlen(getenv("DISPLAY"))) + KAppSingleton::Instance(); + else + ensureQApplication(); +#else + ensureQApplication(); +#endif + } + + + string getMimeType( fh_context c, bool fromContent ) + { +#ifdef HAVE_KDE + KAppSingleton::Instance(); + + if( fromContent ) + { + const int sz = 4096; + QByteArray array( sz, 1 ); + + fh_istream iss = c->getIStream(); + iss.read( array.data(), sz ); + + KMimeType::Ptr type = KMimeType::findByContent( array ); + return type->name().toUtf8().data(); + } + else + { + KUrl u; + u.setPath( c->getDirPath().c_str() ); + KMimeType::Ptr type = KMimeType::findByUrl( u ); + return type->name().toUtf8().data(); + } +#endif + return "document/unknown"; + } + }; + +}; diff --git a/Ferris/FerrisKDE.hh b/Ferris/FerrisKDE.hh new file mode 100644 index 0000000..2e0993f --- /dev/null +++ b/Ferris/FerrisKDE.hh @@ -0,0 +1,45 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisKDE.hh,v 1.3 2010/09/24 21:30:39 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_KDE3_H_ +#define _ALREADY_INCLUDED_FERRIS_KDE3_H_ + +#include +#include + +namespace Ferris +{ + namespace KDE + { + FERRISEXP_API void ensureKDEApplication(); + FERRISEXP_API std::string getMimeType( fh_context c, bool fromContent = false ); + }; +}; + +#endif diff --git a/Ferris/FerrisMove.cpp b/Ferris/FerrisMove.cpp new file mode 100644 index 0000000..7eab180 --- /dev/null +++ b/Ferris/FerrisMove.cpp @@ -0,0 +1,743 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris mv + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisMove.cpp,v 1.8 2010/09/24 21:30:39 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include // version info +#include +#include // myrdf smushing + +using namespace std; + +// #undef LG_MOVE_D +// #define LG_MOVE_D cerr + +namespace Ferris +{ + + FerrisMv::FerrisMv() + : + AutoClose( false ), + hadUserInteraction( false ), + m_AttributeUpdaterInUse( false ), + DstIsDirectory( false ), + SpecialCaseDstIsDirectory( false ) + { + backupMaker.setMode( "none" ); + + getSkippingContextSignal().connect( sigc::mem_fun( *this, &_Self::OnSkippingContext )); + } + + FerrisMv::SkippingContextSignal_t& + FerrisMv::getSkippingContextSignal() + { + return SkippingContextSignal; + } + + + void + FerrisMv::OnSkippingContext( FerrisMv& thisobj, + string srcDescription, + string dstDescription, + string reason ) + { + cout << "skipping " << srcDescription + << " to " << dstDescription; + if( reason.length() ) + { + cout << " reason:" << reason; + } + cout << endl; + } + + bool + FerrisMv::SameFileSystem( const std::string& sname, const std::string& dname ) + { + fh_context src = Resolve( sname ); + + /* Check if destination is a directory */ + fh_context dst; + bool UseParentForDst = false; + try + { + dst = Resolve( dname ); +// if( !toint( getStrAttr( dst, "is-dir", "0" ))) + if( !toint( getStrAttr( dst, "is-dir-try-automounting", "0" ))) + UseParentForDst = true; + } + catch( exception& e ) + { + UseParentForDst = true; + } + + if( UseParentForDst ) + dst = Resolve( dname, RESOLVE_PARENT ); + + +// bool ret = getStrAttr( src, "fs-id", "0") == getStrAttr( dst, "fs-id", "-1"); + string srcID = getStrAttr( src, "fs-id", "0"); + string dstID = getStrAttr( dst, "fs-id", "0"); + bool ret = (srcID == dstID); + + // + // Some filesystems like tmpfs return 0. If we are moving from a tmpfs + // into an XML file then both will return 0 but clearly this is not able + // to be preformed within the filesystem itself. + // + if( ret && srcID == "0" ) + { + bool sn = src->getIsNativeContext(); + bool dn = dst->getIsNativeContext(); + bool som = src->getOverMountContext() != dynamic_cast(GetImpl(src)); + bool dom = dst->getOverMountContext() != dynamic_cast(GetImpl(dst)); + + LG_MOVE_D << "FerrisMv::SameFileSystem() sn:" << sn << " dn:" << dn + << " som:" << som << " dom:" << dom + << endl; + + if( som || dom ) + ret = false; +// if( sn && !dn || dn && !sn ) +// ret = false; + } + + LG_MOVE_D << "FerrisMv::SameFileSystem() src:" << src->getURL() + << " src-id:" << getStrAttr( src, "fs-id", "0") + << " dst:" << dst->getURL() + << " dst-id:" << getStrAttr( dst, "fs-id", "0") + << " UseParentForDst:" << UseParentForDst + << " ret:" << ret + << endl; + + return ret; + } + + void + FerrisMv::handleSingleFileBackup( const std::string& p ) + { + if( !backupMaker.impotent() ) + { + fh_context c = Resolve( p ); + backupMaker( c ); + } + } + + + void + FerrisMv::setMovingToDir( bool v ) + { + MovingToDir = v; + } + + void + FerrisMv::setBackupSuffix( const std::string& s ) + { + backupMaker.setMode( Util::BackupMaker::MODE_SIMPLE ); + backupMaker.setSuffix( s ); + } + + void + FerrisMv::setExplicitSELinuxContext( const std::string& s ) + { + m_ExplicitSELinuxContext = s; + } + + void + FerrisMv::setExplicitSELinuxType( const std::string& s ) + { + m_ExplicitSELinuxType = s; + } + + void + FerrisMv::setCloneSELinuxContext( bool v ) + { + m_CloneSELinuxContext = v; + } + + void + FerrisMv::setPerformBackups( const std::string& s ) + { + backupMaker.setMode( s ); + } + + void + FerrisMv::setForce( bool v ) + { + Force = v; + } + + void + FerrisMv::setInteractive( bool v ) + { + Interactive = v; + } + + void + FerrisMv::setVerbose( bool v ) + { + Verbose = v; + } + + void + FerrisMv::setUpdateMode( bool v ) + { + UpdateMode = v; + } + + + void + FerrisMv::maybeStripTrailingSlashes() + { + if( StripTrailingSlashes ) + { + PostfixTrimmer trimmer; + trimmer.push_back( "/" ); + srcURL = trimmer( srcURL ); + dstURL = trimmer( dstURL ); + } + } + + void + FerrisMv::setStripTrailingSlashes( bool v ) + { + StripTrailingSlashes = v; + maybeStripTrailingSlashes(); + } + + + void + FerrisMv::setShowMeter( bool v ) + { + ShowMeter = v; + } + + void + FerrisMv::setSloth( bool v ) + { + Sloth = v; + } + + void + FerrisMv::setAutoClose( bool v ) + { + AutoClose = v; + } + + void + FerrisMv::setDstIsDirectory( bool v ) + { + DstIsDirectory = v; + } + + + + std::string + FerrisMv::getSrcURL() + { + return srcURL; + } + + void + FerrisMv::setSrcURL( const string& s ) + { + srcURL = s; + maybeStripTrailingSlashes(); + } + + void + FerrisMv::setDstURL( const string& s ) + { + dstURL = attemptToAbsoluteURL(s); + maybeStripTrailingSlashes(); + } + + string + FerrisMv::getSrcName() + { + fh_context c = Resolve( srcURL ); + LG_MOVE_D << "FerrisMv::getSrcName() srcURL:" << srcURL + << " dirname:" << c->getDirName() + << endl; + return c->getDirName(); + } + + bool + FerrisMv::handleUpdateMode( const std::string& oldrdn, const std::string& newrdn ) + { + if( UpdateMode ) + { + try + { + fh_context sc = Resolve( srcURL ); + fh_context dc = Resolve( dstURL ); + time_t srctt = toType(getStrAttr( sc, "mtime", "-1" )); + time_t dsttt = toType(getStrAttr( dc, "mtime", "-1" )); + + if( srctt == -1 || dsttt == -1 ) + { + getSkippingContextSignal().emit( *this, oldrdn, newrdn, "" ); + return true; + } + if( srctt <= dsttt ) + { + getSkippingContextSignal().emit( *this, oldrdn, newrdn, "src not newer" ); + return true; + } + } + catch( NoSuchSubContext& e ) + { + } + catch( exception& e ) + { + getSkippingContextSignal().emit( *this, oldrdn, newrdn, + "problem resolving destination" ); + return true; + } + } + return false; + } + + bool + FerrisMv::handleInteractiveMode( const std::string& oldrdn, const std::string& newrdn ) + { + if( !Interactive ) + return true; + + if( Interactive ) + { + cout << "move " << oldrdn << " to " << newrdn << " ? " << flush; + char c; + cin >> c; + if( c == 'y' || c == 'Y' ) + return true; + } + return false; + } + + bool + FerrisMv::handleVerboseMode( const std::string& oldrdn, const std::string& newrdn ) + { + if( Verbose ) + { + cout << "moving " << oldrdn << " to " << newrdn << endl; + } + return false; + } + + fh_cp FerrisMv::getCopyObject() + { + fh_cp_tty fcp = new FerrisCopy_TTY(); + fcp->setShowMeter( ShowMeter ); + fcp->setDstIsDirectory( DstIsDirectory ); + return fcp; + } + + fh_rm FerrisMv::getRemoveObject() + { + fh_rm frm = FerrisRm::CreateObject(); + return frm; + } + + void + FerrisMv::crossVolumeMove() + { + try + { +// cerr << "its dir cp/rm code! srcURL:" << srcURL << " dstURL:" << dstURL << endl; + + fh_cp fcp = getCopyObject(); + fh_rm frm = getRemoveObject(); + + { + /* copy it and delete src */ + + fcp->setSrcURL( srcURL ); + fcp->setDstURL( dstURL ); + fcp->setForceOverWrite( Force ); + fcp->setInteractive( Interactive ); + fcp->setUpdateMode( UpdateMode ); + fcp->setVerbose( Verbose ); + fcp->setRecurse( true ); + fcp->setFollowOnlyForSrcUrl( 0 ); + fcp->setDontFollowLinks( 1 ); + fcp->setPreserveMTime( true ); + fcp->setPreserveATime( true ); + fcp->setPreserveOwner( true ); + fcp->setPreserveGroup( true ); + fcp->setPreserveObjectMode( true ); + fcp->setStripTrailingSlashes( StripTrailingSlashes ); + fcp->setBackupMaker( backupMaker ); + fcp->setExplicitSELinuxContext( m_ExplicitSELinuxContext ); + fcp->setExplicitSELinuxType( m_ExplicitSELinuxType ); + fcp->setCloneSELinuxContext( m_CloneSELinuxContext ); + fcp->setDstIsDirectory( SpecialCaseDstIsDirectory || DstIsDirectory ); + fcp->copy(); + fcp->DetachAllSignals(); + } + + +// cerr << " -*- copy done. -*- " << endl; +// cerr << " srcURL:" << srcURL << endl; + + frm->setInteractive( Interactive ); + frm->setVerbose( Verbose ); + frm->setTarget( srcURL ); + frm->setRecurse( true ); + frm->remove(); + + } + catch( exception& e ) + { + cerr << "problem moving files, exiting. e:" << e.what() << endl; + } + LG_MOVE_D << "recursive copy complete." << endl; + } + + void + FerrisMv::move() + { + LG_MOVE_D << "FerrisMv::move() srcURL:" << srcURL << " dstURL:" << dstURL << endl; + + SpecialCaseDstIsDirectory = false; + + fh_context c = Resolve( srcURL, RESOLVE_PARENT ); + string oldrdn = getSrcName(); + + string newrdn = dstURL; + + // + // if moving inside bookmarks:// and other places + // + try + { + fh_context bm = Resolve("bookmarks://"); + + if( starts_with( c->getURL(), bm->getURL() ) ) + { + fh_context dst = Resolve( dstURL ); + string durl = dst->getURL(); + bool forceDstToDir = false; + + LG_MOVE_D << "Checking if dst is a bookmarks path... dst:" << durl << endl + << " bm:" << bm->getURL() + << endl; + forceDstToDir |= starts_with( durl, "bookmarks://" ); + forceDstToDir |= starts_with( durl, bm->getURL() ); + LG_MOVE_D << "forceDstToDir:" << forceDstToDir << endl; + + if( forceDstToDir ) + { + MovingToDir = true; + SpecialCaseDstIsDirectory = true; + } + } + } + catch( exception& e ) + { + } + + + if( MovingToDir ) + { + fh_stringstream ss; + ss << dstURL << "/" << oldrdn; + newrdn = tostr(ss); + } + + LG_MOVE_D << "oldrdn:" << oldrdn << " newrdn:" << newrdn << endl; + + if( handleUpdateMode( oldrdn, newrdn ) ) return; + LG_MOVE_D << "move(2) oldrdn:" << oldrdn << " newrdn:" << newrdn << endl; + if( !handleInteractiveMode( oldrdn, newrdn ) ) return; + LG_MOVE_D << "move(3) oldrdn:" << oldrdn << " newrdn:" << newrdn << endl; + if( handleVerboseMode( oldrdn, newrdn ) ) return; + LG_MOVE_D << "move(4) oldrdn:" << oldrdn << " newrdn:" << newrdn << endl; + + if( !SameFileSystem( srcURL, dstURL ) ) + { + LG_MOVE_D << "cross volume move() srcURL:" << srcURL + << " dstURL:" << dstURL << endl; + crossVolumeMove(); + } + else + { + LG_MOVE_D << "single volume move() srcURL:" << srcURL + << " dstURL:" << dstURL << endl; + handleSingleFileBackup( dstURL ); + LG_MOVE_D << "move() src parent:" << c->getURL() + << " oldrdn:" << oldrdn + << " newrdn:" << newrdn + << endl; + fh_context oldchild = c->getSubContext( oldrdn ); + string oldearl = oldchild->getURL(); + +// stringlist_t rdf_ea_sl = Util::parseCommaSeperatedList( +// getStrAttr( oldchild, "rdf-ea-names", "" ) ); +// stringmap_t rdf_ea_map; +// if( !rdf_ea_sl.empty() ) +// { +// stringlist_t::const_iterator end = rdf_ea_sl.end(); +// for( stringlist_t::const_iterator si = rdf_ea_sl.begin(); si!=end; ++si ) +// { +// rdf_ea_map[ *si ] = getStrAttr( oldchild, *si, "", true, true ); +// } +// } + + + fh_context child = c->rename( oldrdn, newrdn, true, true ); //Force ); + + if( !m_ExplicitSELinuxContext.empty() ) + { + setStrAttr( child, + "dontfollow-selinux-context", + m_ExplicitSELinuxContext, + true, true ); + } + if( !m_ExplicitSELinuxType.empty() ) + { + setStrAttr( child, + "dontfollow-selinux-type", + m_ExplicitSELinuxType, + true, true ); + } + + Semantic::myrdfSmush( child, oldearl ); + +// if( !rdf_ea_map.empty() ) +// { +// stringmap_t::const_iterator end = rdf_ea_map.end(); +// for( stringmap_t::const_iterator mi = rdf_ea_map.begin(); mi!=end; ++mi ) +// { +// setStrAttr( child, mi->first, mi->second, true, true ); +// } +// } + + + if( m_AttributeUpdaterInUse ) + { + fh_cp fcp = getCopyObject(); + fcp->getAttributeUpdaterSignal().emit( + GetImpl(fcp), oldchild, child, + oldchild->getURL(), child->getURL() ); + } + } + } + + + fh_mv_collector + FerrisMv::getPoptCollector() + { + if( !isBound( Collector ) ) + { + Collector = new MovePopTableCollector(); + } + return Collector; + } + + FerrisMv::m_AttributeUpdater_t& + FerrisMv::getAttributeUpdaterSignal() + { + m_AttributeUpdaterInUse = true; + fh_cp fcp = getCopyObject(); + return fcp->getAttributeUpdaterSignal(); + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + MovePopTableCollector::MovePopTableCollector() + { + reset(); + } + + + void MovePopTableCollector::poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + } + + void MovePopTableCollector::reset() + { + Force = 0; + Interactive = 0; + Verbose = 0; + ShowVersion = 0; + Sloth = 0; + AutoClose = 0; + ShowMeter = 0; + UpdateMode = 0; + StripTrailingSlashes = 0; + PerformBackups = 0; + ArchiveMode = 0; + BackupSuffix = 0; + ExplicitSELinuxContext = 0; + ExplicitSELinuxType = 0; + CloneSELinuxContext = 0; + PerformBackupsWithMode = 0; + DstIsDirectory = 0; + + } + + void + MovePopTableCollector::ArgProcessingDone( poptContext optCon ) + { + if( ShowVersion ) + { + cout << "ferrismv version: $Id: FerrisMove.cpp,v 1.8 2010/09/24 21:30:39 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + if( Force ) + { + Interactive = 0; + } + + mv->setForce( Force ); + mv->setInteractive( Interactive ); + mv->setVerbose( Verbose ); +// mv->setRecurse( Recurse ); + mv->setSloth( Sloth ); + mv->setAutoClose( AutoClose ); + mv->setStripTrailingSlashes( StripTrailingSlashes ); + mv->setShowMeter( ShowMeter ); + mv->setUpdateMode( UpdateMode ); + mv->setDstIsDirectory( DstIsDirectory ); + + mv->setPerformBackups( "none" ); + if( PerformBackups ) mv->setPerformBackups( "simple" ); + if( PerformBackupsWithMode ) mv->setPerformBackups( PerformBackupsWithMode ); + if( BackupSuffix ) mv->setBackupSuffix( BackupSuffix ); + if( ExplicitSELinuxContext ) + mv->setExplicitSELinuxContext( ExplicitSELinuxContext ); + if( ExplicitSELinuxType ) + mv->setExplicitSELinuxType( ExplicitSELinuxType ); + if( CloneSELinuxContext ) + mv->setCloneSELinuxContext( CloneSELinuxContext ); + } + + struct ::poptOption* + MovePopTableCollector::getTable( fh_mv _mv ) + { + mv = _mv; + int extraTableLines = 5; + int tablesize = 22; + + tablesize = tablesize + extraTableLines; + allocTable( tablesize ); + + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + setEntry( + &table[i++], "", 'a', POPT_ARG_NONE, &ArchiveMode, + "ignored (should become like cp -a", "" ); + setEntry( + &table[i++], "", 'b', POPT_ARG_NONE, &PerformBackups, + "like --backup but does not accept an argument", "" ); + setEntry( + &table[i++], "backup", 0, POPT_ARG_STRING, &PerformBackupsWithMode, + "make a backup of each existing destination file", "CONTROL" ); + setEntry( + &table[i++], "force", 'f', POPT_ARG_NONE, &Force, + "ignore non existent files, never prompt", "" ); + setEntry( + &table[i++], "interactive", 'i', POPT_ARG_NONE, &Interactive, + "prompt before any removal", ""); + setEntry( + &table[i++], "show-progress-meter", 0, POPT_ARG_NONE, &ShowMeter, + "Show a one line progress meter", "" ); + setEntry( + &table[i++], "sloth", 0, POPT_ARG_NONE, &Sloth, + "keep the main window closed until it is needed", "" ); + setEntry( + &table[i++], "auto-close", '0', POPT_ARG_NONE, &AutoClose, + "If there is no user interaction or objects skipped then close client automatically", "" ); + setEntry( + &table[i++], "strip-trailing-slashes", '/', POPT_ARG_NONE, &StripTrailingSlashes, + "remove any trailing slashes from each SOURCE argument", "" ); + setEntry( + &table[i++], "suffix", 'S', POPT_ARG_STRING, &BackupSuffix, + "override the usual backup suffix", "SUFFIX" ); + setEntry( + &table[i++], "update", 'u', POPT_ARG_NONE, &UpdateMode, + "copy only when the SOURCE file is newer than the destination" + " file or when the destination file is missing", "" ); + setEntry( + &table[i++], "verbose", 'v', POPT_ARG_NONE, &Verbose, + "explain what is being done", "" ); + setEntry( + &table[i++], "version", 0, POPT_ARG_NONE, &ShowVersion, + "show version information and quit", 0 ); + setEntry( + &table[i++], "dst-is-dir", 0, POPT_ARG_NONE, &DstIsDirectory, + "force treating destination is a directory (copy into db4/xml file)", "" ); + + setEntry( + &table[i++], "set", 0, POPT_ARG_STRING, &ExplicitSELinuxType, + "set SELinux type of copy to TYPE", 0 ); + setEntry( + &table[i++], "selinux-type", 0, POPT_ARG_STRING, &ExplicitSELinuxType, + "set SELinux type of copy to TYPE", 0 ); + setEntry( + &table[i++], "context", 'Z', POPT_ARG_STRING, &ExplicitSELinuxContext, + "set security context of copy to CONTEXT", 0 ); + setEntry( + &table[i++], "clone-context", 0, POPT_ARG_NONE, &CloneSELinuxContext, + "clone input file security context to output file", 0 ); + + clearEntry( &table[i] ); + return table; + } + + + + namespace Priv + { + struct ::poptOption* getMovePopTableCollector( fh_mv mv ) + { + return mv->getPoptCollector()->getTable( mv ); + } + }; + +}; diff --git a/Ferris/FerrisMove.hh b/Ferris/FerrisMove.hh new file mode 100644 index 0000000..0912c61 --- /dev/null +++ b/Ferris/FerrisMove.hh @@ -0,0 +1,219 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris mv + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisMove.hh,v 1.4 2010/09/24 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_MOVE_H_ +#define _ALREADY_INCLUDED_FERRIS_MOVE_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + + class FerrisMv; + FERRIS_SMARTPTR( FerrisMv, fh_mv ); + + class MovePopTableCollector; + FERRIS_SMARTPTR( MovePopTableCollector, fh_mv_collector ); + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API MovePopTableCollector + : + public basic_PopTableCollector, + public Handlable + { + fh_mv mv; + + unsigned long Force; + unsigned long Interactive; + unsigned long Verbose; + unsigned long ShowVersion; + unsigned long Sloth; + unsigned long AutoClose; + unsigned long ShowMeter; + unsigned long UpdateMode; + unsigned long StripTrailingSlashes; + unsigned long PerformBackups; + unsigned long ArchiveMode; + const char* BackupSuffix; + const char* PerformBackupsWithMode; + const char* ExplicitSELinuxContext; + const char* ExplicitSELinuxType; + unsigned long CloneSELinuxContext; + unsigned long DstIsDirectory; + + public: + MovePopTableCollector(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data); + + void reset(); + void ArgProcessingDone( poptContext optCon ); + struct ::poptOption* getTable( fh_mv _mv ); + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API FerrisMv + : + public Handlable + { + typedef FerrisMv _Self; + + public: + + FerrisMv(); + + std::string getSrcURL(); + void setSrcURL( const std::string& s ); + void setDstURL( const std::string& s ); + void move(); + + void setMovingToDir( bool v ); + void setBackupSuffix( const std::string& s ); + void setExplicitSELinuxContext( const std::string& s ); + void setExplicitSELinuxType( const std::string& s ); + void setCloneSELinuxContext( bool v ); + void setPerformBackups( const std::string& s ); + void setForce( bool v ); + void setInteractive( bool v ); + void setVerbose( bool v ); + void setUpdateMode( bool v ); + void setStripTrailingSlashes( bool v ); + void setShowMeter( bool v ); + void setSloth( bool v ); + void setAutoClose( bool v ); + void setDstIsDirectory( bool v ); + + fh_mv_collector getPoptCollector(); + + typedef sigc::signal4< void, + FerrisMv&, // thisobj, + std::string, // srcDescription, + std::string, // dstDescription, + std::string // reason + > SkippingContextSignal_t; + + SkippingContextSignal_t& getSkippingContextSignal(); + + typedef FerrisCopy::m_AttributeUpdater_t m_AttributeUpdater_t; + m_AttributeUpdater_t& getAttributeUpdaterSignal(); + + protected: + + bool m_AttributeUpdaterInUse; + + bool MovingToDir; + bool Force; + bool Interactive; + bool Verbose; + bool UpdateMode; + bool StripTrailingSlashes; + bool ShowMeter; + bool Sloth; + bool AutoClose; + bool DstIsDirectory; + bool SpecialCaseDstIsDirectory; + + /** + * If we are 'AutoClose' we dont auto close if we have + * interacted with the user + */ + bool hadUserInteraction; + + + + virtual void + OnSkippingContext( FerrisMv& thisobj, + std::string srcDescription, + std::string dstDescription, + std::string reason ); + + private: + + + std::string srcURL; + std::string dstURL; + fh_mv_collector Collector; + + void handleSingleFileBackup( const std::string& p ); + bool SameFileSystem( const std::string& sname, const std::string& dname ); + Util::BackupMaker backupMaker; + + std::string getSrcName(); + virtual bool handleUpdateMode( const std::string& oldrdn, const std::string& newrdn ); + /** + * Returns 1 if things should proceed and 0 if this context should be skipped + */ + virtual bool handleInteractiveMode( const std::string& oldrdn, const std::string& newrdn ); + virtual bool handleVerboseMode( const std::string& oldrdn, const std::string& newrdn ); + + virtual fh_cp getCopyObject(); + virtual fh_rm getRemoveObject(); + void crossVolumeMove(); + void maybeStripTrailingSlashes(); + + SkippingContextSignal_t SkippingContextSignal; + + std::string m_ExplicitSELinuxContext; + std::string m_ExplicitSELinuxType; + bool m_CloneSELinuxContext; + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + namespace Priv + { + FERRISEXP_API struct ::poptOption* getMovePopTableCollector( fh_mv mv ); + }; + +#define FERRIS_MOVE_OPTIONS(mv) { 0, 0, POPT_ARG_INCLUDE_TABLE, \ +/**/ ::Ferris::Priv::getMovePopTableCollector(mv), \ +/**/ 0, "common move options:", 0 }, + +}; +#endif diff --git a/Ferris/FerrisOpenSSL.cpp b/Ferris/FerrisOpenSSL.cpp new file mode 100644 index 0000000..d193ec4 --- /dev/null +++ b/Ferris/FerrisOpenSSL.cpp @@ -0,0 +1,217 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisOpenSSL.cpp,v 1.4 2010/09/24 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#include +#include + +using namespace std; + +void InitOpenSSL() +{ + bool virgin = true; + + if( virgin ) + { + virgin = false; + SSL_load_error_strings(); +// SSLeay_add_ssl_algorithms(); + SSL_library_init(); +// actions_to_seed_PRNG(); + } +} + +namespace Ferris +{ + std::string base64encode( const std::string& v ) + { + stringstream ret; + + BIO *bmem, *b64; + BUF_MEM *bptr; + + b64 = BIO_new(BIO_f_base64()); + bmem = BIO_new(BIO_s_mem()); + b64 = BIO_push(b64, bmem); + BIO_write(b64, v.data(), v.size() ); + BIO_flush(b64); + BIO_get_mem_ptr(b64, &bptr); + + ret.write( bptr->data, bptr->length ); +// ret << '\0'; + BIO_free_all(b64); + + return ret.str(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + template< + class _CharT, + class _Traits = std::char_traits < _CharT >, + class _Alloc = std::allocator < _CharT >, + class _BufferSizers = ferris_basic_streambuf_fourk + > + class FERRISEXP_DLLLOCAL basic_digest_streambuf + : + public ferris_basic_streambuf< _CharT, _Traits, _Alloc, _BufferSizers > + { + typedef ferris_basic_streambuf< _CharT, _Traits, _Alloc, _BufferSizers > _Base; + + // prohibit copy/assign + basic_digest_streambuf( const basic_digest_streambuf& ); + basic_digest_streambuf& operator = ( const basic_digest_streambuf& ); + + EVP_MD_CTX mdctx; + const EVP_MD *md; + unsigned char md_value[EVP_MAX_MD_SIZE]; + unsigned int md_len; + string m_digestValue; + + public: + + typedef char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef typename _Base::seekd_t seekd_t; + + + basic_digest_streambuf( const std::string& DigestName ) + { + InitOpenSSL(); + md = EVP_get_digestbyname(DigestName.c_str()); + if( !md ) + { + m_digestValue = "N/A"; + } + EVP_DigestInit(&mdctx, md); + } + + virtual ~basic_digest_streambuf() + { + } + + protected: + + /** + * Write out the data starting at buffer of length sz to the "external" + * device. + * + * return -1 for error or 0 for success + */ + virtual int write_out_given_data( const char_type* buffer, std::streamsize sz ) + { + EVP_DigestUpdate(&mdctx, buffer, sz ); + return sz; + } + + + virtual int make_new_data_avail( char_type* buffer, streamsize maxsz ) + { + cerr << "make_new_data_avail() m_digestValue.empty():" << m_digestValue.empty() << " maxsz:" << maxsz << endl; + + if( !m_digestValue.empty() ) + return -1; + + + if( m_digestValue.empty() ) + { + EVP_DigestFinal(&mdctx, md_value, &md_len); + fh_stringstream ret; + radixdump( ret, md_value, md_value + md_len, 16 ); + m_digestValue = ret.str(); + cerr << "md_len:" << md_len << endl; + cerr << "m_digestValue:" << m_digestValue << endl; + } + int sz = std::min( (streamsize)m_digestValue.size(), maxsz ); + cerr << "sz:" << sz << endl; + memcpy( buffer, m_digestValue.c_str(), sz ); + return sz; + } + }; + + + /** + * Digest output to two different streams at once. + */ + template< + class _CharT, + class _Traits = std::char_traits<_CharT>, + class _Alloc = std::allocator < _CharT >, + class _BufferSizers = ferris_basic_streambuf_fourk + > + class FERRISEXP_DLLLOCAL ferris_digest_iostream + : + public Ferris_iostream< _CharT, _Traits >, + public io_ferris_stream_traits< _CharT, _Traits > + { + typedef Ferris_iostream< _CharT, _Traits > _Base; + typedef ferris_digest_iostream<_CharT, _Traits> _Self; + + public: + + typedef char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_digest_streambuf<_CharT, _Traits, _Alloc, _BufferSizers> ss_impl_t; + typedef emptystream_methods< char_type, traits_type > delegating_methods; + + explicit + ferris_digest_iostream( const std::string& DigestName ) + : + _Base( new ss_impl_t( DigestName ) ) + {} + + ferris_digest_iostream( const ferris_digest_iostream& rhs ) + : _Base( rhs.ss ) + {} + virtual ~ferris_digest_iostream() {} + }; + + + namespace Factory + { + fh_iostream MakeDigestStream( std::string digestName ) + { + ferris_digest_iostream ret( digestName ); + return ret; + } + }; + + +}; diff --git a/Ferris/FerrisOpenSSL.hh b/Ferris/FerrisOpenSSL.hh new file mode 100644 index 0000000..4dfb30e --- /dev/null +++ b/Ferris/FerrisOpenSSL.hh @@ -0,0 +1,61 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisOpenSSL.hh,v 1.4 2010/09/24 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_OPENSSL_H_ +#define _ALREADY_INCLUDED_FERRIS_OPENSSL_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include + + +FERRISEXP_API void InitOpenSSL(); +namespace Ferris +{ + FERRISEXP_API std::string digest( fh_istream, std::string digestName = "md5" ); + FERRISEXP_API std::string digest( std::string, std::string digestName = "md5" ); + + FERRISEXP_API std::string base64encode( const std::string& v ); + + namespace Factory + { + fh_iostream MakeDigestStream( std::string digestName = "md5" ); + }; +}; + + + +#endif + diff --git a/Ferris/FerrisPopt.cpp b/Ferris/FerrisPopt.cpp new file mode 100644 index 0000000..d9ab7ab --- /dev/null +++ b/Ferris/FerrisPopt.cpp @@ -0,0 +1,165 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisPopt.cpp,v 1.2 2010/09/24 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include + +using namespace std; + +namespace Ferris +{ + + + namespace CallBacks + { + + poptCallable::poptCallable() + { + } + + poptCallable::~poptCallable() + { + } + + + void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + poptCallable* c = (poptCallable*)data; + c->poptCallback( con, reason, opt, arg, data ); + } + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + basic_PopTableCollector::basic_PopTableCollector() + : + table(0) + { + } + + basic_PopTableCollector::~basic_PopTableCollector() + { + if( table ) + delete[] table; + } + + + void + basic_PopTableCollector::setEntry( struct ::poptOption* p, + const string& _longname, + char shortname, + int arginfo, + void* arg, + const char* _descrip, + const char* _argDescrip ) + { + static list cache; + + cache.push_back( _longname ); const string& ln = cache.back(); + + p->longName = ln.length() ? ln.c_str() : 0; + p->shortName = shortname; + p->argInfo = arginfo; + p->arg = arg; + p->val = 0; + + p->descrip = 0; + if( _descrip ) + { + cache.push_back( _descrip ); + const string& des = cache.back(); + p->descrip = des.c_str(); + } + + p->argDescrip = 0; + if( _argDescrip ) + { + cache.push_back( _argDescrip ); + const string& ades = cache.back(); + p->argDescrip= ades.c_str(); + } + } + + + void + basic_PopTableCollector::setEntry( struct ::poptOption* p, + const string& _longname, + char shortname, + int arginfo, + void* arg, + const string& _descrip, + const string& _argDescrip) + { + setEntry( p, _longname, shortname, arginfo, arg, + _descrip.c_str(), _argDescrip.c_str() ); + } + + void + basic_PopTableCollector::setToCallbackEntry( struct ::poptOption* p ) + { + setEntry( p, "", 0, + POPT_ARG_CALLBACK, (void*)CallBacks::poptCallback, + "" ); + p->longName= 0; + p->descrip = (const char*)this; + p->argDescrip=""; + } + + + void + basic_PopTableCollector::clearEntry( struct ::poptOption* p ) + { + setEntry( p, "", 0, 0, 0 ); + p->longName = 0; + p->descrip = 0; + p->argDescrip=0; + } + + + void + basic_PopTableCollector::allocTable( int sz ) + { + int extraTableLines = 5; + + if( table ) + delete[] table; + table = new struct ::poptOption[ sz + extraTableLines ]; + } + + +}; diff --git a/Ferris/FerrisPopt.hh b/Ferris/FerrisPopt.hh new file mode 100644 index 0000000..ad5f720 --- /dev/null +++ b/Ferris/FerrisPopt.hh @@ -0,0 +1,118 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisPopt.hh,v 1.2 2010/09/24 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#ifndef _ALREADY_INCLUDED_FERRIS_POPT_H_ +#define _ALREADY_INCLUDED_FERRIS_POPT_H_ + +#include + +#include +#include + +#include + +namespace Ferris +{ + + namespace CallBacks + { + class FERRISEXP_DLLLOCAL poptCallable + { + poptCallable( const poptCallable& ); + poptCallable& operator=( poptCallable& ); + + public: + + poptCallable(); + virtual ~poptCallable(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) = 0; + }; + + }; + + class FERRISEXP_DLLLOCAL basic_PopTableCollector : public CallBacks::poptCallable + { + protected: + + struct ::poptOption* table; + + public: + + basic_PopTableCollector(); + virtual ~basic_PopTableCollector(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) = 0; + + /** + * The joy of using this method is that it caches all strings in + * a location that is not going to change for the lifetime of + * usage. Otherwise the caller would need to make sure such a + * cache exists. + */ + void setEntry( struct ::poptOption* p, + const std::string& _longname, + char shortname = 0, + int arginfo = POPT_ARG_NONE, + void* arg = 0, + const char* _descrip = "", + const char* _argDescrip = ""); + + void setEntry( struct ::poptOption* p, + const std::string& _longname, + char shortname, + int arginfo, + void* arg, + const std::string& _descrip, + const std::string& _argDescrip); + + void setToCallbackEntry( struct ::poptOption* p ); + void clearEntry( struct ::poptOption* p ); + + + void allocTable( int sz ); + +// virtual struct ::poptOption* getTable( +// const std::string& desc, +// const std::list& names ); + }; +}; + + + +#endif diff --git a/Ferris/FerrisQt.cpp b/Ferris/FerrisQt.cpp new file mode 100644 index 0000000..6eb22f2 --- /dev/null +++ b/Ferris/FerrisQt.cpp @@ -0,0 +1,1420 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisQt.cpp,v 1.6 2011/11/09 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#include "FerrisQt_private.hh" +#include + +#include +#include +#include +#include + +#include + +#define DEBUG LG_QIO_D + +using namespace std; + +#define DEBUGGING_UPLOAD_STREAMING +#undef DEBUGGING_UPLOAD_STREAMING + +namespace Ferris +{ + std::string URLencode( const std::string& d ) + { + QByteArray ba = QUrl::toPercentEncoding( d.c_str(), "", " " ); + return tostr(ba); + // QUrl u(d.c_str()); + // return tostr(u.toEncoded()); + } + + + std::string tostr( const QString& q ) + { + return q.toUtf8().data(); + } + std::string tostr( const QVariant& q ) + { + return tostr( q.toString() ); + } + // std::string tostr( const QByteArray& q ) + // { + // return (std::string)q; + // } + + std::string tostr( const QByteArray& q ) + { + std::stringstream ret; + ret.write( q.data(), q.size() ); + return ret.str(); + } + + QByteArray toba( const std::string& s ) + { + QByteArray ret( s.c_str(), s.length() ); + return ret; + } + + + // fh_stringstream& operator<<( fh_stringstream& S, const QString& q ) + // { + // S << tostr(q); + // return S; + // } + + stringmap_t to_std_map( const QList >& qm ) + { + map< string, string > ret; + for( QList >::const_iterator qi = qm.begin(); qi!=qm.end(); ++qi ) + { + ret.insert( make_pair( tostr(qi->first), tostr(qi->second))); + } + return ret; + } + + QUrl& addQueryItems( QUrl& u, const stringmap_t& m ) + { + for( stringmap_t::const_iterator mi = m.begin(); mi!=m.end(); ++mi ) + { + u.addQueryItem( mi->first.c_str(), mi->second.c_str() ); + } + return u; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + void OnGenericStreamClosed( FerrisLoki::Handlable* a ); + + template< + typename _CharT, + typename _Traits = std::char_traits < _CharT >, + typename _Alloc = std::allocator < _CharT > + > + class StreamToQIODevice_streambuf + : + public ferris_stringbuf<_CharT, _Traits> + { + + typedef std::basic_stringbuf<_CharT, _Traits, _Alloc> sb; + + public: + + typedef std::char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef ferris_stringbuf<_CharT, _Traits> _Base; + typedef StreamToQIODevice_streambuf<_CharT, _Traits, _Alloc> _Self; + typedef std::basic_string<_CharT, _Traits, _Alloc> _String; + + StreamToQIODevice* m_iodev; + int m_streamAutoClosing; + + void setDev( StreamToQIODevice* iodev ) + { + m_iodev = iodev; + } + ofstream debugStream; + + explicit + StreamToQIODevice_streambuf( std::ios_base::openmode m = std::ios_base::in | std::ios_base::out ) + : + _Base(m) + , m_iodev( 0 ) +#ifdef DEBUGGING_UPLOAD_STREAMING + , debugStream( "/tmp/debug-stream" ) +#endif + { + LG_QIO_D << "StreamToQIODevice_streambuf() this :" << (void*)this << endl; + m_streamAutoClosing = 0; + } + + explicit + StreamToQIODevice_streambuf( const _String& s, + std::ios_base::openmode m = std::ios_base::in | std::ios_base::out ) + : + _Base(s,m) + , m_iodev( 0 ) +#ifdef DEBUGGING_UPLOAD_STREAMING + , debugStream( "/tmp/debug-stream" ) +#endif + { + LG_QIO_D << "StreamToQIODevice_streambuf() this :" << (void*)this << endl; + m_streamAutoClosing = 0; + } + + virtual ~StreamToQIODevice_streambuf() + { + LG_QIO_D << "~StreamToQIODevice_streambuf() this :" << (void*)this << endl; +#ifdef DEBUGGING_UPLOAD_STREAMING + debugStream << flush; + debugStream.close(); +#endif + } + void handleWrite(); + streamsize xsputn( const char_type* s, std::streamsize n ) + { + streamsize ret = _Base::xsputn( s, n ); + +#ifdef DEBUGGING_UPLOAD_STREAMING + debugStream.write( s, n ); +#endif + LG_QIO_D << "xsputn() n:" << n << endl; + handleWrite(); + return ret; + } + + int_type overflow( int_type c ) + { + int_type ret = _Base::overflow( c ); + + LG_QIO_D << "overflow(c) c:" << c << " ret:" << ret << endl; +// handleWrite(); + return ret; + } + + virtual pos_type seekoff( off_type off, + ios_base::seekdir way, + ios_base::openmode m = ios_base::in | ios_base::out ) + { + LG_QIO_D << "seekoff() off:" << off << " way:" << way << " m:" << m << endl; + return _Base::seekoff( off, way, m ); + } + virtual pos_type seekpos( pos_type pos, + ios_base::openmode m = ios_base::in | ios_base::out ) + { + pos_type ret = pos; + + if( m & ios_base::out && !pos ) + { + } + else + { + ret = _Base::seekpos( pos, m ); + } + LG_QIO_D << "seekpos() pos:" << pos + << " ret:" << ret + << " m:" << m + << " in:" << ios_base::in + << " out:" << ios_base::out + << endl; + return ret; + } + + + + void emitClosing() + { + OnGenericStreamClosed( this ); + } + + + typedef __uint32_t ref_count_t; + + virtual ref_count_t AddRef() + { +// cerr << "StreamToQIODevice_streambuf::Addref() ref_count:" << this->ref_count << endl; +// BackTrace(); + return _Base::AddRef(); + } + virtual ref_count_t Release() + { +// cerr << "StreamToQIODevice_streambuf::Release() ref_count:" << this->ref_count << endl; + if( !m_streamAutoClosing ) + { + if( this->ref_count == 3 && m_iodev && m_iodev->getUserHasStream() ) + { + cerr << "STREAM IS CLOSING AUTOMATICALLY!" << endl; + LG_QIO_I << "STREAM IS CLOSING AUTOMATICALLY!" << endl; + ref_count_t ret = _Base::Release(); + + m_streamAutoClosing = 1; + + if( m_iodev ) + { + emitClosing(); + // m_iodev->writingComplete(); + } + return ret; + } + } + return _Base::Release(); + } + }; + +template< + typename _CharT, + typename _Traits = std::char_traits < _CharT >, + typename _Alloc = std::allocator < _CharT > + > +class StreamToQIODevice_stringstream + : + public Ferris_iostream<_CharT, _Traits>, +// public StreamHandlableSigEmitter< StreamToQIODevice_stringstream<_CharT, _Traits, _Alloc> >, + public stringstream_methods<_CharT, _Traits, io_ferris_stream_traits< _CharT, _Traits > > +{ + typedef StreamToQIODevice_streambuf<_CharT, _Traits, _Alloc> ss_impl_t; + typedef Loki::SmartPtr< ss_impl_t, + FerrisLoki::FerrisExRefCounted, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisLoki::FerrisExSmartPtrStorage > ss_t; + ss_t ss; + typedef Ferris_commonstream<_CharT, _Traits> _CS; + typedef io_ferris_stream_traits< _CharT, _Traits > _FerrisStreamTraits; + +public: + + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef stringstream_methods< + char_type, traits_type, + io_ferris_stream_traits< char_type, traits_type > > delegating_methods; + typedef StreamToQIODevice_stringstream< _CharT, _Traits, _Alloc > _Self; + + + explicit StreamToQIODevice_stringstream( + ss_t& _ss ) + : + ss( _ss ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + this->seekg( 0 ); + this->seekp( 0 ); + } + + + explicit StreamToQIODevice_stringstream( + std::ios_base::openmode m = _FerrisStreamTraits::DefaultOpenMode ) + : + ss( new ss_impl_t(m) ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + } + + explicit StreamToQIODevice_stringstream( + const std::basic_string<_CharT, _Traits>& s, + std::ios_base::openmode m = _FerrisStreamTraits::DefaultOpenMode ) + : + ss( new ss_impl_t( s, m ) ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + } + + StreamToQIODevice_stringstream( const StreamToQIODevice_stringstream& rhs ) + : + ss( rhs.ss ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + } + + + virtual ~StreamToQIODevice_stringstream() + { + } + + + StreamToQIODevice_stringstream& operator=( const StreamToQIODevice_stringstream& rhs ) + { +// LG_QIO_D << "StreamToQIODevice_stringstream& op = " << endl; + + setsb( &rhs ); + init( _CS::sb ); + this->exceptions( std::ios_base::goodbit ); + this->clear( rhs.rdstate() ); + this->copyfmt( rhs ); + return *this; + } + + + _Self* operator->() + { + return this; + } + + + ///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + + + ss_impl_t* + rdbuf() const + { + return GetImpl(ss); + } + + std::basic_string<_CharT, _Traits> str() const + { + return ss->str(); + } + + void str(const std::basic_string<_CharT, _Traits>& s ) + { + ss->str(s); + } + + enum + { + stream_readable = true, + stream_writable = true + }; + +}; + typedef StreamToQIODevice_stringstream fh_StreamToQIODevice_stringstream; + + + + template< + typename _CharT, + typename _Traits = std::char_traits<_CharT> + > + class StreamToQIODevice_IOStream + : + public Ferris_iostream< _CharT, _Traits > + { + typedef std::basic_streambuf<_CharT, _Traits> sb_t; + typedef Ferris_iostream<_CharT, _Traits> _CS; + typedef Ferris_iostream< _CharT, _Traits > _Base; + typedef StreamToQIODevice_IOStream<_CharT, _Traits> _Self; + + StreamToQIODevice* m_iodev; + + public: + + typedef std::char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef emptystream_methods< _CharT, _Traits > delegating_methods; + + void setDev( StreamToQIODevice* iodev ) + { + m_iodev = iodev; + } + StreamToQIODevice_IOStream() + : + m_iodev( 0 ) + { } + + template< class _Alloc > + StreamToQIODevice_IOStream( + ferris_stringbuf< char_type, traits_type, _Alloc >* streambuf ) + : + m_iodev( 0 ) + { + setsbT( streambuf ); + init( _CS::sb ); + this->exceptions( std::ios_base::goodbit ); + this->clear(); + } + + StreamToQIODevice_IOStream( const StreamToQIODevice_IOStream& rhs ) + : + m_iodev( 0 ) + { + setsb( &rhs ); + init( _CS::sb ); + this->exceptions( std::ios_base::goodbit ); + this->clear( rhs.rdstate() ); + this->copyfmt( rhs ); + + m_iodev = rhs.iodev; + } + + StreamToQIODevice_IOStream& operator=( const StreamToQIODevice_IOStream& rhs ) + { + setsb( &rhs ); + init( _CS::sb ); + this->exceptions( std::ios_base::goodbit ); + this->clear( rhs.rdstate() ); + this->copyfmt( rhs ); + this->m_iodev = rhs.iodev; + return *this; + } + + virtual ~StreamToQIODevice_IOStream(); + }; + + + /****************************************/ + /****************************************/ + /****************************************/ + + class StreamToQIODeviceImpl + : + public StreamToQIODevice + { + Q_OBJECT + typedef StreamToQIODeviceImpl _Self; + + mutable fh_StreamToQIODevice_stringstream m_stream; + bool m_streamClosed; + streamsize m_endpos; + streamsize m_totalPostSize; + streamsize m_uploadProgress; + QNetworkResponseWaiter m_queueSizeWaiter; + string m_prefixString; + string m_postfixString; + bool m_forceNoBlock; + stringlist_t m_extraDataChunks; + string m_contentType; + QNetworkReply* m_reply; + bool m_replyFinished; + + ofstream QDebugStream; + + //////////////////////// + // Ferris side interface + public: + StreamToQIODeviceImpl( streamsize totalPostSize = 0 ); + virtual ~StreamToQIODeviceImpl(); + void OnStreamClosed( fh_istream& ss, std::streamsize tellp ); + virtual fh_iostream getStream(); + virtual void writingComplete(); + virtual QNetworkReply* post( QNetworkAccessManager* qm, + QNetworkRequest& request, + const std::string& coreBlobDesc ); + virtual QByteArray readResponse(); + virtual void dataWritten(); + + virtual void addExtraDataChunk( const std::string& s ) + { + m_extraDataChunks.push_back(s); + } + virtual void setContentType( const std::string& s ) + { + m_contentType = s; + } + + + + //////////////////////// + // QT side interface + public: + virtual bool isSequential () const; + virtual bool atEnd () const; + virtual qint64 bytesAvailable () const; + virtual qint64 size () const; + + protected: + virtual qint64 readData ( char * data, qint64 maxSize ); + virtual qint64 writeData ( const char * data, qint64 maxSize ); + + + public slots: + void handleFinished() + { + cerr << "handleFinished()" << endl; + LG_QIO_I << "handleFinished(1)" << endl; + QNetworkReply* r = dynamic_cast(sender()); + LG_QIO_I << "handleFinished(1) r:" << r << endl; + getWaiter().unblock(r); + LG_QIO_I << "handleFinished(2)" << endl; + m_replyFinished = true; + + } + void uploadProgress ( qint64 bytesSent, qint64 bytesTotal ); + + // void readChannelFinished (); + // void readyRead (); + }; + + + StreamToQIODeviceImpl::StreamToQIODeviceImpl( streamsize totalPostSize ) + : + m_totalPostSize( totalPostSize ), + m_streamClosed( false ), + m_endpos( 0 ), + m_forceNoBlock( false ), + m_uploadProgress( 0 ), + m_contentType( "multipart/form-data" ), + m_reply( 0 ), + m_replyFinished( false ) +#ifdef DEBUGGING_UPLOAD_STREAMING + , QDebugStream( "/tmp/debug-stream-qio-data-read" ) +#endif +// , m_stream( 0, 0 ) + { + open( QIODevice::ReadOnly ); + + // int fd = Shell::generateTempFD( "streamqio-" ); + // int closeFD = 1; + // m_stream.setup( this, fd, closeFD ); + + m_stream.rdbuf()->setDev( this ); + + m_stream.getCloseSig().connect( + sigc::mem_fun(*this, &_Self::OnStreamClosed ) ); + } + + StreamToQIODeviceImpl::~StreamToQIODeviceImpl() + { +// cerr << "~StreamToQIODeviceImpl()" << endl; +// BackTrace(); + +#ifdef DEBUGGING_UPLOAD_STREAMING + QDebugStream << flush; + QDebugStream.close(); +#endif + } + + + void + StreamToQIODeviceImpl::OnStreamClosed( fh_istream& ss, std::streamsize tellp ) + { + LG_QIO_I << "StreamToQIODeviceImpl::OnStreamClosed()" << endl; + writingComplete(); + } + + fh_iostream + StreamToQIODeviceImpl::getStream() + { + m_userHasStream = 1; + return m_stream; + + // StreamToQIODevice_IOStream ret( m_stream.rdbuf() ); + // ret.setDev( this ); + // return ret; + } + + void + StreamToQIODeviceImpl::uploadProgress ( qint64 bytesSent, qint64 bytesTotal ) + { + LG_QIO_D << "uploadProgress... bytesSent:" << bytesSent << " total:" << bytesTotal << endl; + m_uploadProgress = bytesSent; + } + + QByteArray + StreamToQIODeviceImpl::readResponse() + { + LG_QIO_I << "StreamToQIODeviceImpl::readResponse() blocking m_replyFinished:" << m_replyFinished << endl; + if( !m_replyFinished ) + getWaiter().block( m_reply ); + LG_QIO_I << "StreamToQIODeviceImpl::readResponse() un blocked" << endl; + QByteArray ba = m_reply->readAll(); + LG_QIO_I << "StreamToQIODeviceImpl::readAll()" << endl; + LG_QIO_I << "reply->error:" << m_reply->error() << endl; + LG_QIO_I << "reply->size:" << ba.size() << endl; + return ba; + } + + + QNetworkReply* + StreamToQIODeviceImpl::post( QNetworkAccessManager* qm, + QNetworkRequest& req, + const std::string& coreBlobDesc ) + { + LG_QIO_D << "StreamToQIODeviceImpl::post(top)" << endl; + + m_uploadProgress = 0; + QUrl u = req.url(); + + string linesep = "\n"; + m_prefixString = ""; + m_postfixString = ""; + string boundry = "----------------------------7bccea7821d6"; + m_postfixString = linesep + "--" + boundry + "--\n"; + + { + stringstream ss; + stringmap_t argmap = to_std_map( u.queryItems() ); + for( stringmap_t::iterator si = argmap.begin(); si!=argmap.end(); ++si ) + { + ss << "--" << boundry << linesep; + ss << "Content-Disposition: form-data; name=\"" << si->first << "\"" << linesep; + ss << linesep; + ss << si->second << linesep; + u.removeQueryItem( si->first.c_str() ); + } + +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// + // FIXME: + + // ss << "--" << boundry << linesep; + // ss << "Content-Disposition: form-data; name=\"" << "extrajunk" << "\"" << linesep; + // ss << linesep; + // for( int i=0; i<4096; ++i ) + // ss << "X"; + // ss << linesep; + +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// +///////////////////////////////////////// + + + DEBUG << "m_extraDataChunks.sz: " << m_extraDataChunks.size() << endl; + for( stringlist_t::iterator si = m_extraDataChunks.begin(); si != m_extraDataChunks.end(); ++si ) + { + ss << "--" << boundry << linesep; + ss << *si; + + LG_QIO_D << "ADDING CHUNK:" << *si << endl; + } + + ss << "--" << boundry << linesep; + ss << coreBlobDesc << linesep; + ss << linesep; + + m_prefixString = ss.str(); + } + + if( !req.header(QNetworkRequest::ContentLengthHeader).isNull() ) + { + int cl = toint( tostr(req.header(QNetworkRequest::ContentLengthHeader))); + LG_QIO_D << "old cl:" << cl << endl; + cl += m_prefixString.length() + m_postfixString.length(); +// cl += coreBlobDesc.length(); + LG_QIO_D << " m_prefixString.sz:" << m_prefixString.length() << endl; + LG_QIO_D << "m_postfixString.sz:" << m_postfixString.length() << endl; + LG_QIO_D << "coreBlobDesc.sz:" << coreBlobDesc.length() << endl; + LG_QIO_D << " new cl:" << cl << endl; + req.setHeader(QNetworkRequest::ContentLengthHeader, tostr(cl).c_str() ); + } + + + + req.setUrl( u ); + { + stringstream ss; + ss << "" << m_contentType << "; boundary=" << boundry; +// ss << "multipart/form-data; boundary=" << boundry; + req.setHeader(QNetworkRequest::ContentTypeHeader, ss.str().c_str() ); + } + + + LG_QIO_D << "StreamToQIODeviceImpl::post(action!)" << endl; + QNetworkReply* reply = qm->post( req, this ); + m_reply = reply; + m_replyFinished = false; + connect( (QObject*)reply, + SIGNAL( finished() ), + SLOT( handleFinished() ) ); + connect( (QObject*)reply, + SIGNAL( uploadProgress(qint64,qint64) ), + SLOT( uploadProgress(qint64,qint64) ) ); + + LG_QIO_D << "prefix:" << m_prefixString << endl; + LG_QIO_D << "postfix:" << m_postfixString << endl; + + m_forceNoBlock = true; + m_stream << m_prefixString << flush; + m_forceNoBlock = false; + + return reply; + } + + + void + StreamToQIODeviceImpl::writingComplete() + { + if( m_streamClosed ) + return; + + m_stream << flush; + cerr << "StreamToQIODeviceImpl::writingComplete() 1" << endl; + LG_QIO_D << ".................. WRITINGCOMPLETE ................ " << endl; +// BackTrace(); + + m_forceNoBlock = true; + cerr << "StreamToQIODeviceImpl::writingComplete() 1b" << endl; + cerr << "StreamToQIODeviceImpl::writingComplete() 1c:" << m_postfixString << endl; + cerr << "StreamToQIODeviceImpl::writingComplete() 1d" << endl; + m_stream << m_postfixString << flush; + cerr << "StreamToQIODeviceImpl::writingComplete() 1c" << endl; + m_forceNoBlock = false; + + cerr << "StreamToQIODeviceImpl::writingComplete() 2" << endl; + dataWritten(); + cerr << "StreamToQIODeviceImpl::writingComplete() 3" << endl; + + streamsize tellg = m_stream->tellg(); + m_stream->seekg(0, ios::end); + m_endpos = m_stream->tellg(); + m_stream->seekg(tellg, ios::beg); + m_streamClosed = true; + cerr << "StreamToQIODeviceImpl::writingComplete() 4" << endl; + LG_QIO_D << "writingComplete() end." << endl; +// LG_QIO_D << "writingComplete() m_stream:" << m_stream.str() << endl; + + emit readChannelFinished(); + cerr << "StreamToQIODeviceImpl::writingComplete() 5" << endl; +#undef emit + getWritingCompleteSig().emit( 0 ); + } + + void + StreamToQIODeviceImpl::dataWritten() + { + LG_QIO_D << "dataWritten(top)" << endl; + if( m_forceNoBlock ) + { + LG_QIO_D << "dataWritten(m_forceNoBlock)" << endl; + return; + } + + // FIXME: Pause here until Qt has slurped out + // all of the new data. + + streamsize tellp = m_stream->tellp(); + streamsize tellg = m_stream->tellg(); + streamsize bufsz2 = tellp - tellg; + + streamsize maxQueueSize = 16*1024; + streamsize bufsz = bytesAvailable(); + LG_QIO_D << "dataWritten() maxQueueSize:" << maxQueueSize << endl; + LG_QIO_D << " m_uploadProgress:" << m_uploadProgress << endl; + LG_QIO_D << " tellp:" << tellp << endl; + LG_QIO_D << " tellg:" << tellg << endl; + LG_QIO_D << " bufsz:" << bufsz << " bufsz2:" << bufsz2 << endl; + + LG_QIO_D << "+++ Checking if write should stall for a while..." << endl; + + // FIXME: Qt 4.6 + // while( m_uploadProgress + maxQueueSize < tellp ) + // { + // LG_QIO_D << "should sleep, emitting a data ready and preparing..." << endl; + // Q_EMIT readyRead(); + + // LG_QIO_D << "Sleeping until stream is drained...tellp:" << tellp + // << " m_uploadProgress:" << m_uploadProgress << endl; + // m_queueSizeWaiter.block( 0 ); + // } + LG_QIO_D << "+++ Write progressing again..." << endl; + + // while( bufsz > maxQueueSize ) + // { + // LG_QIO_D << "should sleep, emitting a data ready and preparing..." << endl; + // emit readyRead(); + + // bufsz = bytesAvailable(); + // LG_QIO_D << "dataWritten() buffer size:" << bufsz << endl; + // LG_QIO_D << "Sleeping until stream is drained..." << endl; + // m_queueSizeWaiter.block(); + // } + + Q_EMIT readyRead(); + LG_QIO_D << "dataWritten(end)" << endl; + } + + bool + StreamToQIODeviceImpl::isSequential () const + { + LG_QIO_D << "StreamToQIODeviceImpl::isSequential() m_totalPostSize:" << m_totalPostSize << endl; + if( m_totalPostSize ) + return false; + return true; + } + + bool + StreamToQIODeviceImpl::atEnd () const + { + LG_QIO_D << "StreamToQIODeviceImpl::atEnd() ret:" << (!bytesAvailable()) + << " m_streamClosed:" << m_streamClosed << endl; + if( !m_streamClosed ) + return false; + + bool ret = !bytesAvailable(); + return ret; + } + + qint64 + StreamToQIODeviceImpl::bytesAvailable () const + { + // LG_QIO_D << "StreamToQIODeviceImpl::bytesAvailable()" << endl; + // LG_QIO_D << " is eof() :" << m_stream->eof() << endl; + // LG_QIO_D << " is good():" << m_stream->good() << endl; + // LG_QIO_D << " is state :" << m_stream->rdstate() << endl; + // LG_QIO_D << " is state :" << m_stream->rdstate() << endl; + +// /// FIXME: +// return 4096; + + streamsize tellg = m_stream->tellg(); + m_stream->seekg(0, ios::end); + streamsize endpos = m_stream->tellg(); + m_stream->seekg(tellg, ios::beg); + + qint64 ret = (endpos - tellg); + LG_QIO_D << "StreamToQIODeviceImpl::bytesAvailable() epos:" << endpos + << " tellg:" << tellg + << " ret:" << ret << endl; +// BackTrace(); + return ret + QIODevice::bytesAvailable(); + } + + qint64 + StreamToQIODeviceImpl::size () const + { + qint64 ret = QIODevice::size(); + LG_QIO_D << "StreamToQIODeviceImpl::size() ret:" << ret << endl; + return m_totalPostSize ? m_totalPostSize : ret; + } + + + qint64 + StreamToQIODeviceImpl::readData ( char * data, qint64 maxSize ) + { + LG_QIO_D << "StreamToQIODeviceImpl::readData()" << endl; + m_queueSizeWaiter.unblock( 0 ); + + m_stream->read( data, maxSize ); + streamsize bread = m_stream->gcount(); +#ifdef DEBUGGING_UPLOAD_STREAMING + QDebugStream.write( data, bread ); +#endif + LG_QIO_D << "StreamToQIODeviceImpl::readData() maxSize:" << maxSize << " bread:" << bread << endl; +// LG_QIO_D << "StreamToQIODeviceImpl::readData() m_stream:" << m_stream.str() << endl; + if( m_stream.eof() ) + { + if( !bread && atEnd() ) + { + return -1; + } + + m_stream.clear(); + } + return bread; + } + + + qint64 + StreamToQIODeviceImpl::writeData ( const char * data, qint64 maxSize ) + { + return -1; + } + + + + + namespace Factory + { + fh_StreamToQIODevice createStreamToQIODevice( streamsize totalPostSize ) + { + return new StreamToQIODeviceImpl( totalPostSize ); + } + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + template< typename _CharT, typename _Traits > + StreamToQIODevice_IOStream<_CharT,_Traits>::~StreamToQIODevice_IOStream() + { + cerr << "~StreamToQIODevice_IOStream() m_iodev:" << m_iodev << endl; + if( m_iodev ) + m_iodev->dataWritten(); + } + + + template< + typename _CharT, + typename _Traits, + typename _Alloc + > + void + StreamToQIODevice_streambuf<_CharT,_Traits,_Alloc>::handleWrite() + { + LG_QIO_D << "StreamToQIODevice_streambuf::handleWrite() m_iodev:" << m_iodev << endl; + if( m_iodev ) + { + LG_QIO_D << "StreamToQIODevice_streambuf::handleWrite() m_iodev:" << m_iodev + << " rc:" << this->ref_count + << " user-has-stream:" << m_iodev->getUserHasStream() + << endl; + m_iodev->dataWritten(); + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + class FERRISEXP_DLLLOCAL QAppHolder + { + public: + QAppHolder() + { + if( !QCoreApplication::instance() ) + { + static int argc = 1; + static char* argv[] = { (char*)"libferris", 0 }; + static QCoreApplication* app = new QCoreApplication(argc, argv); + } + } + }; + typedef Loki::SingletonHolder< QAppHolder, Loki::CreateUsingNew, Loki::NoDestroy > QAppSingleton; + + + + void myMessageOutput(QtMsgType type, const char *msg) + { + switch (type) { + case QtDebugMsg: + LG_QIO_D << "Qt-debug:" << msg << endl; + break; + case QtWarningMsg: + LG_QIO_W << "Qt-debug:" << msg << endl; + fprintf(stderr, "Warning: %s\n", msg); + break; + case QtCriticalMsg: + fprintf(stderr, "Critical: %s\n", msg); + break; + case QtFatalMsg: + fprintf(stderr, "Fatal: %s\n", msg); + abort(); + } + } + + void installQTMsgHandler() + { + qInstallMsgHandler(myMessageOutput); + } + + void ensureQApplication() + { + installQTMsgHandler(); + Main::processAllPendingEvents(); + QAppSingleton::Instance(); + } + + QNetworkAccessManager* + getQNonCachingManager() + { + static QNetworkAccessManager* m_qmanager = 0; + + if( !m_qmanager ) + { + m_qmanager = new QNetworkAccessManager(0); + } + return m_qmanager; + } + + QNetworkAccessManager* + getQManager( QNetworkCookieJar* cjar ) + { + static QNetworkAccessManager* m_qmanager = 0; + QNetworkAccessManager* ret = m_qmanager; + + if( !m_qmanager || cjar ) + { + ret = new QNetworkAccessManager(0); + if( cjar ) + { + ret->setCookieJar( cjar ); + } + else + { + m_qmanager = ret; + } + + if( isTrue( getEDBString( FDB_GENERAL, "curl-use-proxy", "" ))) + { + std::string proxyname = getEDBString( FDB_GENERAL, "curl-use-proxy-name", "" ); + int proxyport = toint( getEDBString( FDB_GENERAL, "curl-use-proxy-port", "3128" )); + std::string proxyuserpass = getEDBString( FDB_GENERAL, "curl-use-proxy-userpass", "" ); + stringlist_t t = Util::parseSeperatedList( proxyuserpass, ':' ); + std::string user = ""; + std::string pass = ""; + if( t.size() >= 2 ) + { + stringlist_t::iterator ti = t.begin(); + user = *ti; + ++ti; + pass = *ti; + } + + QNetworkProxy prox( QNetworkProxy::HttpProxy, + proxyname.c_str(), + proxyport, + user.c_str(), pass.c_str() ); +// LG_QIO_D << "Setting proxy to:" << proxyname << " port:" << proxyport << std::endl; + // prox.setCapabilities( QNetworkProxy::HostNameLookupCapability + // | QNetworkProxy::TunnelingCapability ); + + ret->setProxy( prox ); + } + } + return ret; + } + + + QNetworkResponseWaiter::QNetworkResponseWaiter() + : + m_refCount( 0 ) + { + m_loop = g_main_loop_new( 0, 0 ); + } + + + void + QNetworkResponseWaiter::block( QNetworkReply* r ) + { + LG_QIO_I << "block() this:" << this << " r:" << r << " m_refCount:" << m_refCount << endl; +// cerr << "block() this:" << this << " r:" << r << " m_refCount:" << m_refCount << endl; +// BackTrace(); + // ++m_refCount; + // if( m_refCount <= 0 ) + // { + // LG_QIO_D << "unblock() was already called!" << endl; + // Main::processAllPendingEvents(); + // return; + // } + + if( r ) + { + if( m_alreadyUnblocked.count(r) ) + { + LG_QIO_D << "QNetworkResponseWaiter::block() replay has already come!" << endl; + return; + } + } + + LG_QIO_D << "QNetworkResponseWaiter::block(top)" << endl; + g_main_loop_run( m_loop ); + LG_QIO_D << "QNetworkResponseWaiter::block(done)" << endl; + } + + void + QNetworkResponseWaiter::unblock( QNetworkReply* r ) + { + LG_QIO_I << "unblock() this:" << this << " r:" << r << " m_refCount:" << m_refCount << endl; +// --m_refCount; + if( r ) + m_alreadyUnblocked.insert(r); + g_main_loop_quit( m_loop ); + } + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + // template< + // typename _CharT, + // typename _Traits = std::char_traits < _CharT >, + // typename _Alloc = std::allocator < _CharT > + // > + class StreamFromQIODevice_streambuf + : + public QObject, + public ferris_basic_streambuf< char, std::char_traits > + { + Q_OBJECT + typedef char _CharT; + typedef std::char_traits _Traits; + typedef std::allocator < _CharT > _Alloc; + typedef std::basic_stringbuf<_CharT, _Traits, _Alloc> sb; + + public: + + typedef std::char_traits<_CharT> traits_type; + typedef traits_type::int_type int_type; + typedef traits_type::char_type char_type; + typedef traits_type::pos_type pos_type; + typedef traits_type::off_type off_type; + typedef ferris_basic_streambuf<_CharT, _Traits> _Base; + typedef StreamFromQIODevice_streambuf _Self; + typedef std::basic_string<_CharT, _Traits, _Alloc> _String; + + QIODevice* m_qio; + qint64 m_gpos; + bool m_maintainPos; + + explicit + StreamFromQIODevice_streambuf( QIODevice* qio, + bool maintainPos, + std::ios_base::openmode m = std::ios_base::in | std::ios_base::out ) + : + _Base() + , m_qio( qio ) + , m_maintainPos( maintainPos ) + , m_gpos( 0 ) + { + LG_QIO_D << "StreamFromQIODevice_streambuf()" << endl; + readingComplete = 0; + connect( (QObject*)qio, SIGNAL( readyRead() ), SLOT( OnReadyRead() ) ); + connect( (QObject*)qio, SIGNAL( readChannelFinished() ), SLOT( OnReadChannelFinished() ) ); + + } + + virtual ~StreamFromQIODevice_streambuf() + { + LG_QIO_D << "~StreamFromQIODevice_streambuf()" << endl; + } + + virtual pos_type seekoff( off_type off, + ios_base::seekdir way, + ios_base::openmode m = ios_base::in | ios_base::out ) + { + LG_QIO_D << "seekoff() off:" << off << " way:" << way << " m:" << m << endl; + return _Base::seekoff( off, way, m ); + } + virtual pos_type seekpos( pos_type pos, + ios_base::openmode m = ios_base::in | ios_base::out ) + { + LG_QIO_D << "seekpos()" << endl; + return _Base::seekpos( pos, m ); + } + int waiting; + int readingComplete; + + public slots: + void OnReadyRead() + { + LG_QIO_D << "OnReadyRead()" << endl; + waiting = 0; + } + void OnReadChannelFinished() + { + LG_QIO_I << "readChannelFinished()" << endl; + waiting = 0; + readingComplete = 1; + } + + public: + virtual int make_new_data_avail( char_type* buffer, std::streamsize maxsz ) + { + LG_QIO_D << "make_new_data_avail() maxsz:" << maxsz << endl; + LG_QIO_D << "make_new_data_avail() available:" << m_qio->bytesAvailable() << endl; + LG_QIO_D << "make_new_data_avail() atEnd:" << m_qio->atEnd() << endl; + LG_QIO_D << "make_new_data_avail() isOpen:" << m_qio->isOpen() << endl; + LG_QIO_D << "make_new_data_avail() pos:" << m_qio->pos() << endl; + + if( m_qio->bytesAvailable() < 1 ) + { + if( readingComplete ) + return 0; + + waiting = 1; + while( m_qio->isOpen() && waiting ) + { + Main::processAllPendingEvents(); + } + } + LG_QIO_D << "make_new_data_avail(2) maxsz:" << maxsz << endl; + LG_QIO_D << "make_new_data_avail(3) available:" << m_qio->bytesAvailable() << endl; + LG_QIO_D << "make_new_data_avail(4) pos:" << m_qio->pos() << endl; + LG_QIO_D << "make_new_data_avail(4) gpos:" << m_gpos << endl; + + qint64 rc = 0; + + if( m_maintainPos ) + { + qint64 pos = m_qio->pos(); + m_qio->seek( m_gpos ); + rc = m_qio->read( buffer, maxsz ); + m_gpos += rc; + m_qio->seek( pos ); + } + else + { + rc = m_qio->read( buffer, maxsz ); + } + + + LG_QIO_D << "make_new_data_avail(end) readingComplete:" << readingComplete + << " rc:" << rc << endl; + return rc; + } + int_type underflow() + { + int_type ret = _Base::underflow(); + LG_QIO_D << "underflow() ret:" << ret + << " this->gptr():" << (void*)this->gptr() + << " this->egptr():" << (void*)this->egptr() + << endl; + return ret; + } + + + }; + + +template< + typename _CharT, + typename _Traits = std::char_traits < _CharT >, + typename _Alloc = std::allocator < _CharT > + > +class StreamFromQIODevice_stringstream + : + public Ferris_iostream<_CharT, _Traits>, +// public StreamHandlableSigEmitter< StreamFromQIODevice_stringstream<_CharT, _Traits, _Alloc> >, + public stringstream_methods<_CharT, _Traits, io_ferris_stream_traits< _CharT, _Traits > > +{ +// typedef StreamFromQIODevice_streambuf<_CharT, _Traits, _Alloc> ss_impl_t; + typedef StreamFromQIODevice_streambuf ss_impl_t; + typedef Loki::SmartPtr< ss_impl_t, + FerrisLoki::FerrisExRefCounted, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + FerrisLoki::FerrisExSmartPtrStorage > ss_t; + ss_t ss; + typedef Ferris_commonstream<_CharT, _Traits> _CS; + typedef io_ferris_stream_traits< _CharT, _Traits > _FerrisStreamTraits; + +public: + + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef stringstream_methods< + char_type, traits_type, + io_ferris_stream_traits< char_type, traits_type > > delegating_methods; + typedef StreamFromQIODevice_stringstream< _CharT, _Traits, _Alloc > _Self; + + + explicit StreamFromQIODevice_stringstream( + ss_t& _ss ) + : + ss( _ss ) + { + this->setsbT( GetImpl(ss) ); + init( rdbuf() ); + this->seekg( 0 ); + this->seekp( 0 ); + } + + explicit StreamFromQIODevice_stringstream( + QIODevice* qio, + bool maintainPos, + std::ios_base::openmode m = _FerrisStreamTraits::DefaultOpenMode ) + : + ss( new ss_impl_t( qio, maintainPos, m ) ) + { + this->setsbT( GetImpl(ss) ); + init( rdbuf() ); + } + + StreamFromQIODevice_stringstream( const StreamFromQIODevice_stringstream& rhs ) + : + ss( rhs.ss ) + { + this->setsbT( GetImpl(ss) ); + init( rdbuf() ); + } + + + virtual ~StreamFromQIODevice_stringstream() + { + } + + + StreamFromQIODevice_stringstream& operator=( const StreamFromQIODevice_stringstream& rhs ) + { +// LG_QIO_D << "StreamFromQIODevice_stringstream& op = " << endl; + + setsb( &rhs ); + init( _CS::sb ); + this->exceptions( std::ios_base::goodbit ); + this->clear( rhs.rdstate() ); + this->copyfmt( rhs ); + return *this; + } + + + _Self* operator->() + { + return this; + } + + + ///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + + + ss_impl_t* + rdbuf() const + { + return GetImpl(ss); + } + + + enum + { + stream_readable = true, + stream_writable = false + }; + +}; +typedef StreamFromQIODevice_stringstream fh_StreamFromQIODevice_stringstream; + +namespace Factory +{ + fh_istream createIStreamFromQIODevice( QIODevice* qio, bool maintainPos ) + { + fh_StreamFromQIODevice_stringstream ret( qio, maintainPos ); + return ret; + } +}; + + + +}; + +#include +#include "FerrisQt_moc_impl.cpp" diff --git a/Ferris/FerrisQt_private.hh b/Ferris/FerrisQt_private.hh new file mode 100644 index 0000000..f3275d5 --- /dev/null +++ b/Ferris/FerrisQt_private.hh @@ -0,0 +1,247 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisQt_private.hh,v 1.6 2011/05/01 21:30:40 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_QT_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_QT_PRIV_H_ + + +#include +#include +#include + +#include +#include +#include + +#include +#include + +namespace Ferris +{ + FERRISEXP_API std::string tostr( const QString& q ); + FERRISEXP_API std::string tostr( const QVariant& q ); + FERRISEXP_API std::string tostr( const QByteArray& q ); + FERRISEXP_API QByteArray toba( const std::string& s ); +}; + +namespace std +{ + template < class ostream > + ostream& operator<<( ostream& ss, QByteArray& ba ) + { + ss.write( ba.data(), ba.size() ); + return ss; + } + template < class ostream > + ostream& operator<<( ostream& ss, QString& s ) + { + ss << ::Ferris::tostr(s); + return ss; + } + // // pesky warnings about ambigu + // template < class ostream > + // ostream& operator<<( ostream& ss, const char* s ) + // { + // std::operator<<( ss, s ); + // return ss; + // } +}; + + +namespace Ferris +{ +// FERRISEXP_API fh_stringstream& operator<<( fh_stringstream& S, const QString& q ); + + FERRISEXP_API std::string URLencode( const std::string& d ); + + FERRISEXP_API stringmap_t to_std_map( const QList >& qm ); + FERRISEXP_API QUrl& addQueryItems( QUrl& u, const stringmap_t& m ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FERRISEXP_API void installQTMsgHandler(); + FERRISEXP_API void ensureQApplication(); + FERRISEXP_API QNetworkAccessManager* getQManager( QNetworkCookieJar* cjar = 0 ); + FERRISEXP_API QNetworkAccessManager* getQNonCachingManager(); + + class FERRISEXP_API QNetworkResponseWaiter + { + GMainLoop* m_loop; + long m_refCount; + std::set< QNetworkReply* > m_alreadyUnblocked; + public: + QNetworkResponseWaiter(); + void block( QNetworkReply* r ); + void unblock( QNetworkReply* r ); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + class StreamToQIODevice; + FERRIS_SMARTPTR( StreamToQIODevice, fh_StreamToQIODevice ); + + namespace Factory + { + FERRISEXP_API fh_StreamToQIODevice createStreamToQIODevice( std::streamsize totalPostSize = 0 ); + + /** + * Allow read access to a QIODevice through a std::iostream interface. + */ + FERRISEXP_API fh_istream createIStreamFromQIODevice( QIODevice* qio, bool maintainPos = false ); + }; + + /** + * Abstraction bringing together a writable fh_ostream for libferris + * to use and a QIODevice for Qt to use to stream a POST over the network as + * data is written to the fh_ostream. + * + * Do not use getStream() until after you use post() to start the network IO. + * + * + * QNetworkAccessManager* qm = new QNetworkAccessManager(0); + * QUrl u( getURL() ); + * u.addQueryItem("v", "2.0"); + * QNetworkRequest req(u); + * + * int ContentLength = 21; + * req.setHeader(QNetworkRequest::ContentLengthHeader, tostr(ContentLength).c_str() ); + * x = Factory::createStreamToQIODevice(); + * stringstream blobss; + * blobss << "name=\"photo\"; ...; + * + * QNetworkReply* reply = x->post( qm, req, blobss.str() ); + * connect( reply, SIGNAL( finished() ), SLOT( handleFinished() ) ); + * + * fh_ostream oss = x->getStream(); + * oss << photo-jpeg-bytes; + * x->writingComplete(); + */ + class StreamToQIODevice + : + public QIODevice, + public Handlable + { + QNetworkResponseWaiter m_waiter; + + + protected: + bool m_userHasStream; + + // friend FERRISEXP_API fh_StreamToQIODevice + // Factory::createStreamToQIODevice( std::streamsize totalPostSize = 0 ); + + StreamToQIODevice( std::streamsize totalPostSize = 0 ) + : + m_userHasStream( false ) + { + } + + + + //////////////////////// + // Ferris side interface + public: + + bool getUserHasStream() + { + return m_userHasStream; + } + + QNetworkResponseWaiter& getWaiter() + { + std::cerr << "getWaiter() obj:" << (&m_waiter) << std::endl; + return m_waiter; + } + + /** + * This can be called multiple times, every time the + * return value drops scope, the class will try to write + * anything new to the network + */ + virtual fh_iostream getStream() = 0; + + /** + * When you are fully done, possibly after calling getStream() + * multiple times, call this to signal that the request is complete. + */ + virtual void writingComplete() = 0; + typedef sigc::signal1< void, + fh_StreamToQIODevice > WritingComplete_Sig_t; + WritingComplete_Sig_t& getWritingCompleteSig() + { + return WritingComplete_Sig; + } + + + + /** + * Move all the Query parameters from request.url() into the post body + * and setup a single streaming parameter in the post body using coreBlobDesc + * as the header for that blob. You can stream to the POST using getStream() + * and writingComplete() when done. + */ + virtual QNetworkReply* post( QNetworkAccessManager* qm, + QNetworkRequest& request, + const std::string& coreBlobDesc ) = 0; + + /** + * Once you have written all your data, the write stream closed, + * call here to read the reply. + */ + virtual QByteArray readResponse() = 0; + + /** + * You don't have to call this method, getStream() will call + * it for you when the stream drops out of scope. + */ + virtual void dataWritten() = 0; + + /** + * Add an extra complete data chunk to send to the server + * this is wrapped in the mime border and should be everything + * you want between two mime borders, not including the border + */ + virtual void addExtraDataChunk( const std::string& s ) = 0; + virtual void setContentType( const std::string& s ) = 0; + + + private: + WritingComplete_Sig_t WritingComplete_Sig; + + }; + + + + +}; + +#endif diff --git a/Ferris/FerrisRDFCore.cpp b/Ferris/FerrisRDFCore.cpp new file mode 100644 index 0000000..f87ed09 --- /dev/null +++ b/Ferris/FerrisRDFCore.cpp @@ -0,0 +1,1352 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + RDF core functions, use soprano behind a custom API + + Copyright (C) 2009 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRDFCore.cpp,v 1.9 2010/09/24 21:30:41 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" + +#include "FerrisRDFCore.hh" +#include "FerrisQt_private.hh" + +#include "Enamel.hh" + +#include "FerrisQt_private.hh" +#include +#include +#include +#include +#include +#include +#include + +#include "FerrisKDE.hh" + +#include "config.h" +#ifdef HAVE_NEPOMUK +#include +#endif + +//#undef LG_RDF_D +//#define LG_RDF_D cerr + +namespace Ferris +{ + std::string tostr( RDFCore::fh_node n ) + { + if( !isBound(n) ) + return "null node"; + return n->getURI()->toString(); + } + + namespace RDFCore + { + const std::string RDF_FERRIS_BASE = "http://witme.sf.net/libferris-core/0.1"; + + using namespace std; + using Soprano::LiteralValue; + + /****************************************/ + /****************************************/ + /****************************************/ + + bool operator==(const URI& __x, const URI& __y) + { + return __x.toString() != __y.toString(); + } + bool operator!=(const URI& __x, const URI& __y) + { + return !(__x == __y); + } + + + URI::URI( const std::string& uri ) + : + m_uri( uri ) + { + } + + URI::~URI() + { + } + + std::string + URI::toString() const + { + return m_uri; + } + + std::string + URI::getPath() const + { + return m_uri; + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + bool operator==(const fh_node& __x, const fh_node& __y) + { + return *__x == *__y; + } + bool operator==(const Node& __x, const Node& __y) + { + return *__x.m_node == *__y.m_node; + } + bool operator!=(const Node& __x, const Node& __y) + { + return !(__x == __y); + } + + Node::Node( Soprano::Node* n ) + : + m_node( n ) + { + } + + + fh_node Node::CreateURI( const std::string& uri ) + { + Soprano::Node* n = new Soprano::Node( QUrl( uri.c_str() ) ); + return new Node( n ); + } + + fh_node Node::CreateLiteral( const std::string& s ) + { + Soprano::Node* n = new Soprano::Node( LiteralValue( s.c_str() ) ); + return new Node( n ); + } + + fh_node Node::CreateLiteral( const std::wstring& s ) + { + Soprano::Node* n = new Soprano::Node( LiteralValue( (const char*)s.c_str() ) ); + return new Node( n ); + } + + fh_node Node::CreateBlankNode( const std::string& s ) + { + Soprano::Node n = Soprano::Node::createBlankNode( QString( s.c_str() ) ); + return new Node( new Soprano::Node(n) ); + } + + fh_node Node::CreateEmptyNode() + { + Soprano::Node* n = new Soprano::Node(); + return new Node( n ); + } + + + + Node::~Node() + { + } + + Soprano::Node + Node::getRAW() + { + return *m_node; + } + + fh_uri + Node::getURI() + { + return new URI(tostr( m_node->uri().toString() )); + } + + Soprano::Node::Type + Node::getType() + { + return m_node->type(); + } + + std::string + Node::getLiteralValue() + { + return tostr( m_node->literal().toString() ); + } + + std::string + Node::getLiteralLang() + { + return tostr( m_node->language() ); + } + + std::string + Node::getBlankID() + { + return tostr( m_node->identifier() ); + } + + bool + Node::isResource() + { + return m_node->isResource(); + } + + bool + Node::isLiteral() + { + return m_node->isLiteral(); + } + + bool + Node::isLiteralXML() + { + return m_node->isLiteral(); + } + + bool + Node::isBlank() + { + return m_node->isBlank(); + } + + std::string + Node::toString() + { + return tostr( m_node->toString() ); + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + bool operator==(const Statement& __x, const Statement& __y) + { + return *__x.m_statement == *__y.m_statement; + } + + bool operator!=(const Statement& __x, const Statement& __y) + { + return !(__x == __y); + } + + Statement::Statement( Soprano::Statement* m_statement ) + : + m_statement( m_statement ) + { + } + + Statement::Statement() + : + m_statement( new Soprano::Statement( + Soprano::Node(), + Soprano::Node(), + Soprano::Node() )) + { + } + + Statement::Statement( fh_node sub, fh_node pred, fh_node obj ) + : + m_statement( new Soprano::Statement( sub->getRAW(), + pred->getRAW(), + obj->getRAW() ) ) + { + } + + + Statement::~Statement() + { + } + + Soprano::Statement + Statement::getRAW() + { + return *m_statement; + } + + + void + Statement::setSubject( fh_node n ) + { + m_statement->setSubject( n->getRAW() ); + } + + void + Statement::setPredicate( fh_node n ) + { + m_statement->setPredicate( n->getRAW() ); + } + + void + Statement::setObject( fh_node n ) + { + m_statement->setObject( n->getRAW() ); + } + + fh_node + Statement::getSubject() + { + return new Node( new Soprano::Node(m_statement->subject()) ); + } + + fh_node + Statement::getPredicate() + { + return new Node( new Soprano::Node(m_statement->predicate()) ); + } + + fh_node + Statement::getObject() + { + return new Node( new Soprano::Node(m_statement->object()) ); + } + + + + void + Statement::clear() + { + m_statement->setSubject( Soprano::Node() ); + m_statement->setPredicate( Soprano::Node() ); + m_statement->setObject( Soprano::Node() ); + } + + bool + Statement::isComplete() + { + return m_statement->isValid(); + } + + std::string + Statement::toString() + { + stringstream ret; + ret << getSubject()->toString(); + ret << " "; + ret << getPredicate()->toString(); + ret << " "; + ret << getObject()->toString(); + return ret.str(); + } + + bool + Statement::match( fh_statement partial_st ) + { + return getSubject() == getSubject() + && getPredicate() == getPredicate() + && getObject() == getObject(); + + } + + std::string + Statement::toNTripleString( fh_model m ) + { + // FIXME + return ""; + } + + std::string + Statement::toRDFXMLString( fh_model m ) + { + // FIXME + return ""; + } + + std::string + Statement::toXString( fh_model m, const std::string& format ) + { + // FIXME + return ""; + } + + + + + /****************************************/ + /****************************************/ + /****************************************/ + + FERRISEXP_API bool operator==(const StatementIterator& __x, const StatementIterator& __y) + { + // cerr << "__x.valid:" << __x.m_iter.isValid() << endl; + // cerr << "__y.valid:" << __y.m_iter.isValid() << endl; + + if( (__x.m_iter.isValid() && !__y.m_iter.isValid()) + || + (!__x.m_iter.isValid() && __y.m_iter.isValid()) ) + { + return false; + } + if( !__x.m_iter.isValid() && !__y.m_iter.isValid() ) + return true; + + return *(__x.m_iter) == *(__y.m_iter); + } + + FERRISEXP_API bool operator!=(const StatementIterator& __x, const StatementIterator& __y) + { + return !(__x == __y); + } + + StatementIterator::StatementIterator( Soprano::StatementIterator m_iter ) + : + m_iter( m_iter ) + { + if( m_iter.isValid() ) + m_iter.next(); + } + + StatementIterator::~StatementIterator() + { + } + + void + StatementIterator::__advance() + { + bool v = m_iter.next(); +// cerr << "__advance() v:" << v << endl; + if( !v ) + { + m_iter = Soprano::StatementIterator(); + } + } + + + StatementIterator::reference + StatementIterator::operator*() + { + return new Statement( new Soprano::Statement(*m_iter) ); + } + + + NodeIterator + StatementIterator::iterateObjects () const + { + // if( !m_iter.isValid() ) + // { + // LG_RDF_D << "StatementIterator::iterateObjects() not valid" << endl; + // return NodeIterator(); + // } + + // LG_RDF_D << "StatementIterator::iterateObjects() IS valid" << endl; + return NodeIterator(m_iter.iterateObjects()); + } + + NodeIterator + StatementIterator::iteratePredicates () const + { + return NodeIterator(m_iter.iteratePredicates()); + } + + NodeIterator + StatementIterator::iterateSubjects () const + { + return NodeIterator(m_iter.iterateSubjects()); + } + + /****************************************/ + + bool operator==(const NodeIterator& __x, const NodeIterator& __y) + { +// return __x.m_base.current().toString() == __y.m_base.current().toString(); + + // LG_RDF_D << "operator==() x.valid:" << __x.m_base.isValid() + // << " y.valid:" << __y.m_base.isValid() + // << endl; + + if( (__x.m_base.isValid() && !__y.m_base.isValid()) + || + (!__x.m_base.isValid() && __y.m_base.isValid()) ) + { + return false; + } + if( !__x.m_base.isValid() && !__y.m_base.isValid() ) + return true; + + return *(__x.m_base) == *(__y.m_base); + + } + bool operator!=(const NodeIterator& __x, const NodeIterator& __y) + { + return !(__x == __y); + } + + + NodeIterator::NodeIterator( Soprano::NodeIterator base ) + : + m_base( base ) + { + // if( m_base.isValid() ) + // m_base.next(); + } + + NodeIterator::~NodeIterator() + { + } + + NodeIterator::reference + NodeIterator::operator*() + { + return new Node( new Soprano::Node(*m_base) ); + } + + + void + NodeIterator::__advance() + { + bool v = m_base.next(); + if( !v ) + { + // LG_RDF_D << "NodeIterator::__advance() no next!" << endl; + m_base = Soprano::NodeIterator(); + } + } + + + ////// + ////// + ////// + + FERRISEXP_API bool operator==(const BindingsIterator& __x, const BindingsIterator& __y) + { + if( (__x.m_iter.isValid() && !__y.m_iter.isValid()) + || + (!__x.m_iter.isValid() && __y.m_iter.isValid()) ) + { + return false; + } + if( !__x.m_iter.isValid() && !__y.m_iter.isValid() ) + return true; + + return false; +// return __x.m_iter == __y.m_iter; + } + FERRISEXP_API bool operator!=(const BindingsIterator& __x, const BindingsIterator& __y) + { + return !(__x == __y); + } + + BindingsIterator::BindingsIterator( Soprano::QueryResultIterator m_iter ) + : + m_iter( m_iter ) + { + if( m_iter.isValid() ) + m_iter.next(); + } + BindingsIterator::~BindingsIterator() + { + } + void + BindingsIterator::__advance() + { + bool v = m_iter.next(); + if( !v ) + { + m_iter = Soprano::QueryResultIterator(); + } + } + + int + BindingsIterator::bindingCount () const + { + return m_iter.bindingCount(); + } + + stringlist_t + BindingsIterator::bindingNames () const + { + QStringList ql = m_iter.bindingNames(); + stringlist_t ret; + for( QStringList::iterator qiter = ql.begin(); qiter != ql.end(); ++qiter ) + ret.push_back( tostr( *qiter ) ); + return ret; + } + + fh_node + BindingsIterator::operator[] (const std::string& name) const + { + Soprano::Node n = m_iter[ name.c_str() ]; + return new Node( new Soprano::Node( n ) ); + } + + fh_node + BindingsIterator::operator[] (int idx) const + { + Soprano::Node n = m_iter[ idx ]; + return new Node( new Soprano::Node( n ) ); + } + + + + /****************************************/ + /****************************************/ + /****************************************/ + + Model::Model( Soprano::Model* m ) + : + m_model( m ) + { + } + + fh_model + Model::FromMetadataContext( const std::string& earl ) + { + fh_context md = Shell::acquireContext( earl ); + return FromMetadataContext( md ); + } + + void addSettingIfPresent( fh_context md, + const std::string& filename, + Soprano::BackendOption option, + QList& ret ) + { + try + { + ret.append( + Soprano::BackendSetting( + option, + getStrSubCtx( md, filename, "", true, true ).c_str() ) ); + } + catch(...) + { + } + } + + fh_model + Model::FromMetadataContext( fh_context md ) + { + if( md->isSubContextBound( "metadata" ) ) + md = md->getSubContext( "metadata" ); + + string backendName = getStrSubCtx( md, "backend", "redland" ); + string dbpath = md->getParent()->getDirPath(); + Soprano::Model* model = 0; + LG_RDF_D << "FromMetadataContext() backend:" << backendName << " dbpath:" << dbpath << endl; + + const Soprano::Backend* backend = Soprano::PluginManager::instance()->discoverBackendByName( backendName.c_str() ); + QList settings; + settings.append( Soprano::BackendSetting( Soprano::BackendOptionStorageDir, dbpath.c_str() ) ); + + // QStringList userSettings = backendSettings.split( ';', QString::SkipEmptyParts ); + // foreach( const QString& setting, userSettings ) { + // QStringList keyValue = setting.split( '=' ); + // if ( keyValue.count() != 2 ) { + // errStream << "Invalid backend setting: " << setting; + // return 2; + // } + // settings << BackendSetting( keyValue[0], keyValue[1] ); + // } + if( backendName == "virtuoso" ) + { + addSettingIfPresent( md, "host", Soprano::BackendOptionHost, settings ); + addSettingIfPresent( md, "port", Soprano::BackendOptionPort, settings ); + addSettingIfPresent( md, "username", Soprano::BackendOptionUsername, settings ); + addSettingIfPresent( md, "password", Soprano::BackendOptionPassword, settings ); + } + else if( backendName != "sesame2" ) + { + settings << Soprano::BackendSetting( "name", "myrdf" ); + } + + // quiet down soprano qDebug messages + installQTMsgHandler(); + + if( isTrue( getStrSubCtx( md, "nepomuk-use-default-model", "0" ) )) + { +#ifdef HAVE_NEPOMUK + LG_RDF_D << "using default nepomuk model..." << endl; + KDE::ensureKDEApplication(); + Nepomuk::ResourceManager::instance()->init(); + model = Nepomuk::ResourceManager::instance()->mainModel(); +#else + cerr << "ERROR, nepomuk model requested but code not compiled to support it!" << endl; +#endif + } + else + { + string NepomukModelName = getStrSubCtx( md, "nepomuk-model-name", "" ); + if( !NepomukModelName.empty() ) + { + LG_RDF_D << "using dbus client...model:" << NepomukModelName << endl; + static Soprano::Client::DBusClient* client = new Soprano::Client::DBusClient( "org.kde.NepomukStorage" ); + model = client->createModel( NepomukModelName.c_str(), settings ); + if ( !model ) + { + cerr << "Failed to create Model: " << client->lastError() << endl; + } + } + else + { + LG_RDF_D << "using local storage..." << endl; + model = backend->createModel( settings ); + if ( !model ) + { + cerr << "Failed to create Model: " << backend->lastError() << endl; + } + } + } + + + return new Model( model ); + } + + + fh_model + Model::MemoryOnlyModel() + { + Soprano::Model* m = Soprano::createModel(); + fh_model ret = new Model( m ); + return ret; + } + + + fh_model + Model::FromRedland( fh_context c, const std::string& dbname ) + { + fh_context md = Shell::acquireSubContext( c, "metadata" ); + return FromMetadataContext( md ); + } + + + fh_model + Model::FromXMLString( const std::string& rdfxml ) + { + fh_model model = MemoryOnlyModel(); + fh_parser parser = new Parser(); + parser->ParseIntoModel( model, rdfxml, new URI( "file:///dev/null" ) ); + return model; + } + + void + Model::MergeRDFXML( const std::string& rdfxml, fh_uri base_uri ) + { + fh_parser parser = new Parser(); + parser->ParseIntoModel( this, rdfxml, base_uri ); + } + + Model::~Model() + { + } + + + fh_node + Model::CreateBlankNode() + { + Soprano::Node n = m_model->createBlankNode(); + return new Node( new Soprano::Node(n) ); + } + + void + Model::sync() + { + } + + int + Model::size() + { + return m_model->statementCount(); + } + + + void + Model::insert( fh_statement st ) + { + return addStatement( st ); + } + + void + Model::insert( StatementIterator iter, StatementIterator end ) + { + for( ; iter != end ; ++iter ) + { + insert( *iter ); + } + } + + void + Model::insert( fh_node subj, fh_node pred, fh_node obj ) + { + insert( new Statement( subj, pred, obj ) ); + } + + void + Model::insert( fh_model m ) + { + insert( m->begin(), m->end() ); + } + + StatementIterator + Model::begin() + { + return StatementIterator( m_model->listStatements() ); + } + + StatementIterator + Model::end() + { + return StatementIterator(); + } + + void + Model::addStatement( fh_statement st ) + { + LG_RDF_D << "addStatement()... " << endl + << " subj:" << st->getSubject()->toString() + << " pred:" << st->getPredicate()->toString() + << " obj:" << st->getObject()->toString() + << endl; + // cerr << "addStatement()... " << endl + // << " subj:" << st->getSubject()->toString() + // << " pred:" << st->getPredicate()->toString() + // << " obj:" << st->getObject()->toString() + // << endl; + // BackTrace(); + + m_model->addStatement( st->getSubject()->getRAW(), + st->getPredicate()->getRAW(), + st->getObject()->getRAW() ); + } + + StatementIterator + Model::find( const std::string& query, const std::string& queryLanguage ) + { + Soprano::Query::QueryLanguage ql = Soprano::Query::QueryLanguageSparql; + + Soprano::QueryResultIterator qri = m_model->executeQuery( query.c_str(), ql ); + Soprano::StatementIterator si = qri.iterateStatements(); + return StatementIterator( si ); + } + + BindingsIterator + Model::findBindings( const std::string& query, + const std::string& queryLanguage ) + { + Soprano::Query::QueryLanguage ql = Soprano::Query::QueryLanguageSparql; + Soprano::QueryResultIterator qri = m_model->executeQuery( query.c_str(), ql ); + return BindingsIterator( qri ); + } + + + + fh_ostream + Model::write( fh_ostream oss, + const std::string& serializerName, + const std::string& mimeType, + fh_uri type_uri ) + { + QByteArray* ba = new QByteArray( 0 ); + QTextStream stream( ba ); + + Soprano::StatementIterator data = m_model->listStatements(); + QString serialization = "application/x-nquads"; + + const Soprano::Serializer* serializer + = Soprano::PluginManager::instance()->discoverSerializerForSerialization( Soprano::mimeTypeToSerialization( serialization ), + serialization ); + stringstream emsg; + if ( serializer ) { + // + // As we support a bunch of default prefixes in queries, we do so with serialization + // + serializer->addPrefix( "rdf", Soprano::Vocabulary::RDF::rdfNamespace() ); + serializer->addPrefix( "rdfs", Soprano::Vocabulary::RDFS::rdfsNamespace() ); + serializer->addPrefix( "xsd", Soprano::Vocabulary::XMLSchema::xsdNamespace() ); + serializer->addPrefix( "nrl", Soprano::Vocabulary::NRL::nrlNamespace() ); + serializer->addPrefix( "nao", Soprano::Vocabulary::NAO::naoNamespace() ); + + if ( serializer->serialize( data, stream, Soprano::mimeTypeToSerialization( serialization ), serialization ) ) + { + oss << *ba << flush; + delete ba; + return oss; + } + else + { + emsg << "Failed to export statements: " << serializer->lastError() << endl; + } + } + else + { + emsg << "Could not find serializer plugin for serialization " << serialization << endl; + } + + delete ba; + Throw_ParseError( emsg.str(), 0 ); + } + + + StatementIterator + Model::findStatements( fh_statement partial_statement ) + { + StatementIterator ret( m_model->listStatements( partial_statement->getRAW() )); + return ret; + } + + + NodeIterator + Model::findSubjects( fh_node pred, fh_node obj ) + { + LG_RDF_D << "findSubjects() pred:" << toVoid( pred ) + << " obj:" << toVoid( obj ) + << endl; + + StatementIterator si = findStatements( + new Statement( Node::CreateEmptyNode(), + pred, + obj )); + return NodeIterator( si.iterateSubjects() ); + } + + NodeIterator + Model::findPredicates( fh_node subj, fh_node obj ) + { + LG_RDF_D << "findPredicates() subj:" << toVoid( subj ) + << " obj:" << toVoid( obj ) <getRAW(), + obj->getRAW() ); + Soprano::StatementIterator it = m_model->listStatements( st ); + QList< Soprano::Statement > all = it.allStatements(); + if( !all.empty() ) + { + Soprano::Statement s = *all.begin(); + return new Node( new Soprano::Node(s.subject()) ); + } + return 0; // Node::CreateEmptyNode(); + } + + fh_node + Model::getPredicate( fh_node subj, fh_node obj ) + { + Soprano::Statement st( subj->getRAW(), + Soprano::Node(), + obj->getRAW() ); + Soprano::StatementIterator it = m_model->listStatements( st ); + QList< Soprano::Statement > all = it.allStatements(); + if( !all.empty() ) + { + Soprano::Statement s = *all.begin(); + return new Node( new Soprano::Node(s.predicate()) ); + } + return 0; // Node::CreateEmptyNode(); + } + + fh_node + Model::getObject( fh_node subj, fh_node pred ) + { +// cerr << "Model::getObject()..." << endl +// << " subj:" << subj->toString() +// << " pred:" << pred->toString() +// // << " obj:" << uuidnode->toString() +// << endl; + + Soprano::Statement st( subj->getRAW(), + pred->getRAW(), + Soprano::Node() ); + + Soprano::StatementIterator it = m_model->listStatements( st ); + + QList< Soprano::Statement > all = it.allStatements(); + if( !all.empty() ) + { + Soprano::Statement s = *all.begin(); + return new Node( new Soprano::Node(s.object()) ); + } + + // trying to be faster. +// Soprano::NodeIterator ni = it.iterateObjects(); +// if( ni.next() ) +// // if( ni.isValid() ) +// { +// return new Node( new Soprano::Node( *ni ) ); +// } + + return 0; //Node::CreateEmptyNode(); + } + + NodeIterator + Model::getArcsIn( fh_node n ) + { +// LG_RDF_D "getArcsIn() n:" << toVoid( n ) +// << endl; + + Soprano::Statement st( Soprano::Node(), + Soprano::Node(), + n->getRAW() ); + StatementIterator it( m_model->listStatements( st ) ); + return NodeIterator( it.iteratePredicates() ); + } + + NodeIterator + Model::getArcsOut( fh_node n ) + { + LG_RDF_D << "Model::getArcsOut() this:" << toVoid( this ) + << " n:" << toVoid( n ) +// << " n.impl:" << toVoid( GetImpl( n )) +// << " raw:" << toVoid( getRAW() ) +// << " n.raw:" << toVoid( n->getRAW() ) + << endl; + + // // DEBUG + // { + // LG_RDF_D << "subject:" << tostr(n->getRAW().toString()) << endl; + // Soprano::Statement st( n->getRAW(), + // Soprano::Node(), + // Soprano::Node() ); + // Soprano::StatementIterator it( m_model->listStatements( st ) ); + // // if( it.isValid() ) + // // it.next(); + // for( int i=0; i<10; ++i) + // { + // Soprano::Statement z = *it; + // LG_RDF_D << "z.subj:" << tostr(z.subject().toString()) << endl + // << endl; + // it.next(); + // } + // } + // LG_RDF_D << "Model::getArcsOut() *********************************" << endl; + + Soprano::Statement st( n->getRAW(), + Soprano::Node(), + Soprano::Node() ); + StatementIterator it( m_model->listStatements( st ) ); + return NodeIterator( it.iteratePredicates() ); + } + + bool + Model::hasArcIn( fh_node n, fh_node p ) + { + Soprano::Statement st( Soprano::Node(), + p->getRAW(), + n->getRAW() ); + Soprano::StatementIterator it( m_model->listStatements( st ) ); + QList< Soprano::Statement > all = it.allStatements(); + return !all.empty(); + } + + bool + Model::hasArcOut( fh_node n, fh_node p ) + { + Soprano::Statement st( n->getRAW(), + p->getRAW(), + Soprano::Node() ); + Soprano::StatementIterator it( m_model->listStatements( st ) ); + QList< Soprano::Statement > all = it.allStatements(); + return !all.empty(); + } + + bool + Model::contains( fh_statement st ) + { + return m_model->containsStatement( st->getRAW() ); + } + + void + Model::erase( fh_statement st ) + { + LG_RDF_D << "Model::erase(st) pred:" << st->getPredicate()->toString() + << " obj:" << st->getObject()->toString() + << endl; + m_model->removeAllStatements( st->getRAW() ); + } + + void + Model::erase( fh_node subj, fh_node pred, fh_node obj ) + { + m_model->removeStatement( subj->getRAW(), pred->getRAW(), obj->getRAW() ); +// erase( new Statement( subj, pred, obj ) ); + } + + void + Model::erase( fh_node subj, fh_node pred ) + { + m_model->removeAllStatements( subj->getRAW(), pred->getRAW(), Soprano::Node() ); + + // NodeIterator end = NodeIterator(); + // NodeIterator oiter = findObjects( subj, pred ); + // LG_RDF_D << "Model::erase() oiter == end:" << (oiter == end) << endl; + // list< fh_statement > stack; + // for( ; oiter != end; ++oiter ) + // { + // LG_RDF_D << "erase, found object:" << (*oiter)->toString() << endl; + // fh_statement st = new Statement( subj, pred, *oiter ); + // stack.push_back( st ); + // } + // LG_RDF_D << "Model::erase(s,p) found count:" << stack.size() << endl; + + // for( list< fh_statement >::iterator iter = stack.begin(); + // iter != stack.end(); ++iter ) + // { + // erase( *iter ); + // } + } + + void + Model::erase( fh_node subj, fh_node pred, NodeIterator iter ) + { + nodelist_t nl; + for( ; iter != NodeIterator(); ++iter ) + { + LG_RDF_D << "Model::erase(objiter) obj:" << (*iter)->toString() << endl; + nl.push_back( *iter ); + } + + LG_RDF_D << "Model::erase( object iter ) nl.size:" << nl.size() << endl; + + for( nodelist_t::iterator ni = nl.begin(); ni != nl.end(); ) + { + fh_node n = *ni; + ++ni; + erase( subj, pred, n ); + } + } + + void + Model::erase( fh_model m ) + { + StatementIterator iter = m->begin(); + StatementIterator e = m->end(); + + for( ; iter!=e; ++iter ) + { + erase( *iter ); + } + } + + void + Model::eraseTransitive( fh_node subj ) + { + StatementList_t sl; + LG_RDF_D << "Model::eraseTransitive() subj:" << subj->toString() << endl; + + getTransitiveTree( subj, sl ); + LG_RDF_D << "Model::eraseTransitive() triples to remove count:" << sl.size() << endl; + for( StatementList_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + LG_RDF_D << "Erasing subj:" << (*si)->getObject()->toString() + << " pred:" << (*si)->getPredicate()->toString() + << " obj:" << (*si)->getObject()->toString() + << endl; + erase( *si ); + } + } + + + + void + Model::set( fh_node subj, fh_node pred, fh_node obj ) + { + LG_RDF_D << "Model::set() obj:" << obj->toString() << endl; + erase( subj, pred ); + insert( subj, pred, obj ); + } + + StatementList_t& + Model::getTransitiveTree( fh_node subj, StatementList_t& ret ) + { + cerr << "Model::getTransitiveTree() subj:" << tostr(subj) << endl; + LG_RDF_D << "Model::getTransitiveTree() subj:" << tostr(subj) << endl; + if( tostr(subj).empty() ) + return ret; + + NodeIterator end = NodeIterator(); + NodeIterator piter = getArcsOut( subj ); + for( ; piter != end; ++piter ) + { + LG_RDF_D << "Model::getTransitiveTree() pred:" << tostr(*piter) << endl; + NodeIterator oiter = findObjects( subj, *piter ); + for( ; oiter != end; ++oiter ) + { + fh_statement st = new Statement( subj, *piter, *oiter ); + ret.push_back( st ); + + LG_RDF_D << "Model::getTransitiveTree() st.o:" << tostr(subj) + << " st.p:" << tostr(*piter) + << " st.o:" << tostr(*oiter) + << endl; + if( tostr(*oiter).empty() ) + continue; + if( tostr(*piter) == "http://witme.sf.net/libferris.web/rdf/ferris-attr/rdf-cache-ea-names" ) + continue; + getTransitiveTree( *oiter, ret ); + } + } + return ret; + } + + + void + Model::RDFMerge( fh_node source, fh_node target ) + { + fh_node subj = source; + + NodeIterator end; + NodeIterator piter = getArcsOut( subj ); + for( ; piter != end; ++piter ) + { + NodeIterator oiter = findObjects( subj, *piter ); + for( ; oiter != end; ++oiter ) + { + fh_statement st = new Statement( target, *piter, *oiter ); + + NodeIterator io = findObjects( target, *piter ); + if( io == end ) + { + insert( st ); + } + } + } + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + Parser::Parser( const std::string& parser_name, + const std::string& mime_type, + fh_uri type_uri ) + : + m_parser( Soprano::PluginManager::instance()->discoverParserForSerialization( Soprano::SerializationRdfXml ) ) + { + if( !m_parser ) + { + LG_RDF_ER << "Failed to create parser!" << endl; + } + } + + Parser::~Parser() + { + if( m_parser ) + delete m_parser; + } + + const Soprano::Parser* + Parser::getRAW() + { + return m_parser; + } + + fh_model + Parser::ParseIntoModel( fh_model m, const std::string& s, fh_uri base_uri ) + { + string base_uri_string = ""; + if( isBound( base_uri ) ) + base_uri_string = base_uri->toString(); + + Soprano::StatementIterator it = m_parser->parseString( s.c_str(), + QUrl( base_uri_string.c_str() ), + Soprano::SerializationRdfXml ); + m->insert( StatementIterator( it ) ); + return m; + } + + + fh_model + Parser::ParseIntoModel( fh_model m, fh_context c, fh_uri base_uri ) + { + fh_istream iss = c->getIStream(); + return ParseIntoModel( m, iss, base_uri ); + } + + fh_model + Parser::ParseIntoModel( fh_model m, fh_istream iss, fh_uri base_uri ) + { + std::string s = StreamToString( iss ); + return ParseIntoModel( m, s, base_uri ); + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + + FERRISEXP_API fh_model getDefaultFerrisModel() + { + static fh_model m = 0; + + if( m ) + return m; + + + // + // Allow user customization of which storage to use for their RDF + // + bool usingCustomStore = false; + try + { +// fh_context rdfdbc = Resolve( "~/.ferris/rdfdb" ); +// std::string storage_name = getStrSubCtx( rdfdbc, "ferris-storage-name", "" ); +// std::string db_name = getStrSubCtx( rdfdbc, "ferris-db-name", "~/.ferris/rdfdb/myrdf" ); +// std::string db_options = getStrSubCtx( rdfdbc, "ferris-db-options", "" ); + +// if( !storage_name.empty() ) +// { +// // cerr << "storage_name:" << storage_name +// // << " db_name:" << db_name +// // << " db_options:" << db_options +// // << endl; + +// usingCustomStore = !storage_name.empty(); +// m = Model::FromMetadataContext( storage_name, db_name, db_options ); +// return m; +// } + } + catch( exception& e ) + { + if( usingCustomStore ) + throw; + } + +// fh_context dbc = Shell::acquireContext( "~/.ferris/rdf-soprano-db/metadata" ); + fh_context dbc = Shell::acquireContext( "~/.ferris/rdfdb/metadata" ); + m = Model::FromMetadataContext( dbc ); + return m; + } + + }; +}; diff --git a/Ferris/FerrisRDFCore.hh b/Ferris/FerrisRDFCore.hh new file mode 100644 index 0000000..b16e141 --- /dev/null +++ b/Ferris/FerrisRDFCore.hh @@ -0,0 +1,472 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + RDF core functions, use soprano behind a custom API + + Copyright (C) 2009 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRDFCore.hh,v 1.2 2010/09/24 21:30:41 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_RDF_CORE_H_ +#define _ALREADY_INCLUDED_FERRIS_RDF_CORE_H_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + namespace RDFCore + { + extern const std::string RDF_FERRIS_BASE; + + class StatementIterator; + class NodeIterator; + class BindingsIterator; + class URI; + class Parser; + class Model; + class Statement; + class Node; + FERRIS_SMARTPTR( URI, fh_uri ); + FERRIS_SMARTPTR( Parser, fh_parser ); + FERRIS_SMARTPTR( Model, fh_model ); + FERRIS_SMARTPTR( Statement, fh_statement ); + FERRIS_SMARTPTR( Node, fh_node ); + + typedef std::list< fh_node > nodelist_t; + + /** + * A list of statements + */ + typedef std::list< fh_statement > StatementList_t; + + /** + * Get the default model used for triples + */ + FERRISEXP_API fh_model getDefaultFerrisModel(); + + /****************************************/ + /****************************************/ + /****************************************/ + + FERRISEXP_API bool operator==(const URI& __x, const URI& __y); + FERRISEXP_API bool operator!=(const URI& __x, const URI& __y); + class FERRISEXP_API URI + : + public Handlable + { + NOT_COPYABLE( URI ); + friend bool operator==(const URI& __x, const URI& __y); + + std::string m_uri; + + public: + + explicit URI( const std::string& uri ); + virtual ~URI(); + + std::string toString() const; + std::string getPath() const; + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + FERRISEXP_API bool operator==(const fh_node& __x, const fh_node& __y); + FERRISEXP_API bool operator==(const Node& __x, const Node& __y); + FERRISEXP_API bool operator!=(const Node& __x, const Node& __y); + class FERRISEXP_API Node + : + public Handlable + { + Soprano::Node* m_node; + friend class Model; + friend class NodeIterator; + friend class BindingsIterator; + friend class Statement; + + Node( Soprano::Node* n ); + friend bool operator==(const Node& __x, const Node& __y); + + public: + + static fh_node CreateURI( const std::string& uri ); + static fh_node CreateLiteral( const std::string& s ); + static fh_node CreateLiteral( const std::wstring& s ); + static fh_node CreateBlankNode( const std::string& s ); + static fh_node CreateEmptyNode(); + + virtual ~Node(); + Soprano::Node getRAW(); + + fh_uri getURI(); + Soprano::Node::Type getType(); + + std::string getLiteralValue(); + std::string getLiteralLang(); + std::string getBlankID(); + + bool isResource(); + bool isLiteral(); + bool isLiteralXML(); + bool isBlank(); + + std::string toString(); + }; + struct fh_node_compare + { + bool operator()( fh_node n1, fh_node n2 ) const + { + return n1->toString() < n2->toString(); + } + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + FERRISEXP_API bool operator==(const Statement& __x, const Statement& __y); + FERRISEXP_API bool operator!=(const Statement& __x, const Statement& __y); + class FERRISEXP_API Statement + : + public Handlable + { + friend class StatementIterator; + + Soprano::Statement* m_statement; + + Statement( Soprano::Statement* m_statement ); + Statement( const Statement& ); + Statement& operator=( const Statement& ); + friend bool operator==(const Statement& __x, const Statement& __y); + + public: + + Statement(); + Statement( fh_node sub, fh_node pred, fh_node obj ); + + virtual ~Statement(); + Soprano::Statement getRAW(); + + void setSubject( fh_node n ); + void setPredicate( fh_node n ); + void setObject( fh_node n ); + + fh_node getSubject(); + fh_node getPredicate(); + fh_node getObject(); + + void clear(); + bool isComplete(); + std::string toString(); + bool match( fh_statement partial_st ); + + std::string toNTripleString( fh_model m ); + std::string toRDFXMLString( fh_model m ); + std::string toXString( fh_model m, const std::string& format ); + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + FERRISEXP_API bool operator==(const NodeIterator& __x, const NodeIterator& __y); + FERRISEXP_API bool operator!=(const NodeIterator& __x, const NodeIterator& __y); + class FERRISEXP_API NodeIterator + { + typedef NodeIterator _Self; + friend class Model; + friend class StatementIterator; + friend bool operator==(const NodeIterator& __x, const NodeIterator& __y); + + char m_part; + Soprano::NodeIterator m_base; + + void __advance(); + + public: + + typedef std::forward_iterator_tag iterator_category; + typedef fh_node value_type; + typedef long difference_type; + typedef fh_node pointer; + typedef fh_node reference; + + explicit NodeIterator( Soprano::NodeIterator base = Soprano::NodeIterator() ); + ~NodeIterator(); + reference operator*(); + _Self& operator++() { + __advance(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + __advance(); + return __tmp; + } + + }; + + + FERRISEXP_API bool operator==(const StatementIterator& __x, const StatementIterator& __y); + FERRISEXP_API bool operator!=(const StatementIterator& __x, const StatementIterator& __y); + class FERRISEXP_API StatementIterator + { + typedef StatementIterator _Self; + friend bool operator==(const StatementIterator& __x, const StatementIterator& __y); + + friend class Model; + friend class NodeIterator; + friend class Parser; + + Soprano::StatementIterator m_iter; + + protected: + + void __advance(); + + public: + + typedef std::forward_iterator_tag iterator_category; + typedef fh_statement value_type; + typedef long difference_type; + typedef fh_statement pointer; + typedef fh_statement reference; + + explicit StatementIterator( Soprano::StatementIterator m_iter = Soprano::StatementIterator() ); + ~StatementIterator(); + reference operator*(); + _Self& operator++() { + __advance(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + __advance(); + return __tmp; + } + + NodeIterator iterateObjects () const; + NodeIterator iteratePredicates () const; + NodeIterator iterateSubjects () const; + }; + + + FERRISEXP_API bool operator==(const BindingsIterator& __x, const BindingsIterator& __y); + FERRISEXP_API bool operator!=(const BindingsIterator& __x, const BindingsIterator& __y); + class FERRISEXP_API BindingsIterator + { + typedef BindingsIterator _Self; + friend class Model; + + void __advance(); + Soprano::QueryResultIterator m_iter; + + public: + + typedef std::forward_iterator_tag iterator_category; + typedef long difference_type; + + BindingsIterator( Soprano::QueryResultIterator m_iter = Soprano::QueryResultIterator() ); + ~BindingsIterator(); + + _Self& operator++() { + __advance(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + __advance(); + return __tmp; + } + friend bool operator==(const BindingsIterator& __x, const BindingsIterator& __y); + + int bindingCount () const; + stringlist_t bindingNames () const; + fh_node operator[] (const std::string& name) const; + fh_node operator[] (int idx) const; + }; + + + + /****************************************/ + /****************************************/ + /****************************************/ + + class FERRISEXP_API Model + : + public Handlable + { + Soprano::Model* m_model; + + Model( Soprano::Model* m ); + + public: + + /** + * load RDF model from metadata given at md + * + * md can either be the main directory or the "metadata" subdir. + */ + static fh_model FromMetadataContext( fh_context md ); + static fh_model FromMetadataContext( const std::string& earl ); + + /** + * load an existing RDF store from 'c' + * in this case, 'c' will or should contain a "metadata" subdirectory + * + * optionally, for redland, you can specify the prefix for the db files. + */ + static fh_model FromRedland( fh_context c, const std::string& dbname = "myrdf" ); + + /** + * load an existing RDF store from the string provided. + */ + static fh_model FromXMLString( const std::string& rdfxml ); + + /** + * Merge some more RDF/XML with existing model + */ + void MergeRDFXML( const std::string& rdfxml, fh_uri base_uri = 0 ); + + static fh_model MemoryOnlyModel(); + virtual ~Model(); + + fh_node CreateBlankNode(); + + void sync(); + int size(); + + void insert( fh_statement st ); + void insert( StatementIterator begin, + StatementIterator end = StatementIterator() ); + void insert( fh_node subj, fh_node pred, fh_node obj ); + void insert( fh_model m ); + + StatementIterator begin(); + StatementIterator end(); + + void addStatement( fh_statement st ); + fh_ostream write( fh_ostream oss, + const std::string& serializerName = "", + const std::string& mimeType = "", + fh_uri type_uri = 0 ); + + StatementIterator find( const std::string& query, + const std::string& queryLanguage = "sparql" ); + BindingsIterator findBindings( const std::string& query, + const std::string& queryLanguage = "sparql" ); + + StatementIterator findStatements( fh_statement partial_statement ); + NodeIterator findSubjects( fh_node pred, fh_node obj ); + NodeIterator findPredicates( fh_node subj, fh_node obj ); + NodeIterator findObjects( fh_node subj, fh_node pred ); + fh_node getSubject( fh_node pred, fh_node obj ); + fh_node getPredicate( fh_node subj, fh_node obj ); + fh_node getObject( fh_node subj, fh_node pred ); + NodeIterator getArcsIn( fh_node n ); + NodeIterator getArcsOut( fh_node n ); + bool hasArcIn( fh_node n, fh_node p ); + bool hasArcOut( fh_node n, fh_node p ); + + bool contains( fh_statement st ); + void erase( fh_statement st ); + void erase( fh_model m ); + void erase( fh_node subj, fh_node pred, fh_node obj ); + void erase( fh_node subj, fh_node pred ); + void erase( fh_node subj, fh_node pred, NodeIterator objiter ); + /** + * Get rid of all triples such as + * subj _p1 _o1 + * and any triples with _o1 as subject, and any of those + * where the object is the subject of another triple. + */ + void eraseTransitive( fh_node subj ); + + /** + * if there is a list/value for subj+pred remove it + * set the triple subj, pred, obj after this. + */ + void set( fh_node subj, fh_node pred, fh_node obj ); + + /** + * Get a tree with all the triples reachable from a single subject. + */ + StatementList_t& getTransitiveTree( fh_node subj, StatementList_t& ret ); + + + /** + * Any triples (?s,?p,?o) starting with source=?s are copied to target=?t + * (?t,?p,?o) only when (?t,?p,???) does not exist. + * + * This is not transative + */ + void RDFMerge( fh_node source, fh_node target ); + + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + + class FERRISEXP_API Parser + : + public Handlable + { + const Soprano::Parser* m_parser; + + public: + Parser( const std::string& parser_name = "", + const std::string& mime_type = "", + fh_uri type_uri = 0 ); + + virtual ~Parser(); + const Soprano::Parser* getRAW(); + + fh_model ParseIntoModel( fh_model m, const std::string& s, fh_uri base_uri = 0 ); + fh_model ParseIntoModel( fh_model m, fh_context c, fh_uri base_uri = 0 ); + fh_model ParseIntoModel( fh_model m, fh_istream iss, fh_uri base_uri = 0 ); + }; + + + /****************************************/ + /****************************************/ + /****************************************/ + + }; +}; +#endif diff --git a/Ferris/FerrisRemove.cpp b/Ferris/FerrisRemove.cpp new file mode 100644 index 0000000..e52746b --- /dev/null +++ b/Ferris/FerrisRemove.cpp @@ -0,0 +1,513 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRemove.cpp,v 1.4 2010/09/24 21:30:41 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + + FerrisRm::RemoveVerboseSignal_t& + FerrisRm::getRemoveVerboseSignal() + { + return RemoveVerboseSignal; + } + + FerrisRm::SkippingSignal_t& + FerrisRm::getSkippingSignal() + { + return SkippingSignal; + } + + FerrisRm::AskRemoveSignal_t& + FerrisRm::getAskRemoveSignal() + { + return AskRemoveSignal; + } + + void + FerrisRm::OnRemoveVerbose( FerrisRm& thisref, fh_context target, std::string desc ) + { + cout << "removing " << desc << endl; + } + + void + FerrisRm::OnSkipping( FerrisRm& thisref, std::string desc, std::string reason ) + { + if( Verbose ) + { + cerr << "skipping " << desc << " reason:" << reason << endl; + } + } + + bool + FerrisRm::OnAskRemove( FerrisRm& thisref, fh_context target, std::string desc ) + { + cout << "delete " << desc << " ? " << flush; + char c; + cin >> c; + return ( c == 'y' || c == 'Y' ); + } + + fh_context + FerrisRm::getTargetContext( const std::string& p ) + { + return Resolve( p ); + } + + std::string + FerrisRm::getTargetDescription( const std::string& p ) + { + return p; + } + + /** + * Remove all the files under p + */ + void + FerrisRm::removeTree( const std::string& p ) + { +// Ferrisls ls; +// fh_lsdisplay_rm ld = new Ferrisls_rm_display(); +// ld->setInteractive( Interactive ); +// ld->setVerbose( Verbose ); +// ls.setDisplay( ld ); +// ls.setURL( p ); +// ls.setRecursiveList( true ); +// ls.usePreorderTraversal( true ); +// ls.setDontFollowLinks( false ); +// ls(); + + ls.setDisplay( this ); + ls.setURL( p ); + ls.setRecursiveList( true ); + ls.usePreorderTraversal( true ); + ls.setDontFollowLinks( true ); //false ); + ls(); + } + + /******************************************************************************/ + /*** Tree methods *************************************************************/ + /******************************************************************************/ + + void + FerrisRm::PrintEA( int i, const std::string& attr, const std::string& EA ) + { + } + + void + FerrisRm::ShowAttributes( fh_context ctx ) + { + if( isBound(LastRecursiveContext) ) + removeObject( LastRecursiveContext ); + + LastRecursiveContext = ctx; + } + + void + FerrisRm::workStarting() + { + LastRecursiveContext = 0; + } + + void + FerrisRm::workComplete() + { + if( isBound(LastRecursiveContext) ) + { + removeObject( LastRecursiveContext ); + LastRecursiveContext = 0; + } + } + + void + FerrisRm::EnteringContext(fh_context ctx) + { + } + + void + FerrisRm::LeavingContext(fh_context ctx) + { + } + + void + FerrisRm::removeObject(fh_context ctx) + { + if( ! ctx->isParentBound() ) + { + string msg = "attempt to remove root entry denied!"; + cerr << msg << endl; + getSkippingSignal().emit( *this, getTargetDescription(ctx->getURL()), msg ); + return; + } + removeObject( ctx->getParent(), ctx->getDirName(), ctx->getURL() ); + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + void + FerrisRm::removeObject(fh_context parent, const std::string& rdn, const std::string& p ) + { + if( Force ) + { + if( !parent->isSubContextBound( rdn ) ) + { + getSkippingSignal().emit( *this, + getTargetDescription(p), + "Not existant object" ); + return; + } + } + + if( Interactive ) + { + if( ! getAskRemoveSignal().emit( *this, + getTargetContext(p), + getTargetDescription(p) )) + { + return; + } + } + + if( Verbose ) + { + getRemoveVerboseSignal().emit( *this, + getTargetContext(p), + getTargetDescription(p) ); + } + parent->remove( rdn ); + } + + + /** + * Remove the object at p + */ + void + FerrisRm::removeObject( const std::string& p ) + { + fh_context c; + + try + { + c = Resolve( p, RESOLVE_PARENT ); + c->read(); + } + catch( exception& e ) + { + if( Force ) + { + getSkippingSignal().emit( *this, + getTargetDescription(p), + "Not existant object" ); + return; + } + } + + string rdn = p; + if( string::npos != p.rfind( "/" ) ) + { + rdn = p.substr( p.rfind( "/" )+1 ); + } + + removeObject( c, rdn, p ); + +// if( Force ) +// { +// if( !c->isSubContextBound( rdn ) ) +// { +// getSkippingSignal().emit( *this, +// getTargetDescription(p), +// "Not existant object" ); +// return; +// } +// } + +// if( Interactive ) +// { +// // cout << "delete " << p << " ? " << flush; +// // char c; +// // cin >> c; +// // if(!( c == 'y' || c == 'Y' )) +// // return; + +// if( ! getAskRemoveSignal().emit( *this, +// getTargetContext(p), +// getTargetDescription(p) )) +// { +// return; +// } +// } + +// if( Verbose ) +// { +// // cout << "removing " << p << endl; +// getRemoveVerboseSignal().emit( *this, +// getTargetContext(p), +// getTargetDescription(p) ); +// } +// c->remove( rdn ); + } + + FerrisRm::FerrisRm() + : + Force( true ), + Interactive( true ), + Verbose( true ), + Recurse( false ), + Sloth( false ), + AutoClose( false ), + TargetURL(""), + LastRecursiveContext(0), + hadUserInteraction( false ) + { + getRemoveVerboseSignal().connect( sigc::mem_fun( *this, &_Self::OnRemoveVerbose )); + getSkippingSignal().connect( sigc::mem_fun( *this, &_Self::OnSkipping )); + getAskRemoveSignal().connect( sigc::mem_fun( *this, &_Self::OnAskRemove )); + } + + FerrisRm::~FerrisRm() + { + } + + fh_rm + FerrisRm::CreateObject() + { + return new FerrisRm(); + } + + void + FerrisRm::setForce( bool v ) + { + Force = v; + } + + void + FerrisRm::setVerbose( bool v ) + { + Verbose = v; + } + + void + FerrisRm::setInteractive( bool v ) + { + Interactive = v; + } + + void + FerrisRm::setRecurse( bool v ) + { + Recurse = v; + } + + void + FerrisRm::setSloth( bool v ) + { + Sloth = v; + } + + void + FerrisRm::setAutoClose( bool v ) + { + AutoClose = v; + } + + + + bool + FerrisRm::getSloth() + { + return Sloth; + } + + void + FerrisRm::setTarget( const std::string& removeTargetURL ) + { + TargetURL = removeTargetURL; + } + + void + FerrisRm::remove() + { +// cerr << "FerrisRm::remove() target:" << TargetURL << endl; + + if( !TargetURL.length() ) + { + fh_stringstream ss; + ss << "No target URL given for removal." << endl; + Throw_RemoveFailed( tostr(ss), 0 ); + } + + fh_context c; + + if( Recurse ) + { + removeTree( TargetURL ); + /* Recursive falls through to remove the dir node itself. */ + } + + removeObject( TargetURL ); + } + + void + FerrisRm::operator()() + { + remove(); + } + + fh_rm_collector + FerrisRm::getPoptCollector() + { + if( !isBound( Collector ) ) + { + Collector = new RemovePopTableCollector(); + } + return Collector; + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + + RemovePopTableCollector::RemovePopTableCollector() + { + reset(); + } + + + void RemovePopTableCollector::poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data) + { + const string key = opt->longName; +// LG_COPY_D << "poptCallback() key:" << key << " -a" << ArchiveMode << endl; + } + + void RemovePopTableCollector::reset() + { + Force = 0; + Interactive = 0; + Verbose = 0; + ShowVersion = 0; + Recurse = 0; + Sloth = 0; + AutoClose = 0; + } + + void + RemovePopTableCollector::ArgProcessingDone( poptContext optCon ) + { + if( ShowVersion ) + { + cout << "ferrisrm version: $Id: FerrisRemove.cpp,v 1.4 2010/09/24 21:30:41 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + if( Force ) + { + Interactive = 0; + } + + rm->setForce( Force ); + rm->setInteractive( Interactive ); + rm->setVerbose( Verbose ); + rm->setRecurse( Recurse ); + rm->setSloth( Sloth ); + rm->setAutoClose( AutoClose ); + } + + struct ::poptOption* + RemovePopTableCollector::getTable( fh_rm _rm ) + { + rm = _rm; + int extraTableLines = 5; + int tablesize = 20; + + tablesize = tablesize + extraTableLines; + allocTable( tablesize ); + + int i=0; + setToCallbackEntry( &table[i] ); + ++i; + + setEntry( + &table[i++], "force", 'f', POPT_ARG_NONE, &Force, + "ignore non existent files, never prompt", "" ); + setEntry( + &table[i++], "interactive", 'i', POPT_ARG_NONE, &Interactive, + "prompt before any removal", ""); + setEntry( + &table[i++], "recursive", 'R', POPT_ARG_NONE, &Recurse, + "remove the contents of directories recursively", "" ); + setEntry( + &table[i++], "recursive", 'r', POPT_ARG_NONE, &Recurse, + "remove the contents of directories recursively", "" ); + setEntry( + &table[i++], "sloth", 0, POPT_ARG_NONE, &Sloth, + "keep the main window closed until it is needed", "" ); + setEntry( + &table[i++], "auto-close", '0', POPT_ARG_NONE, &AutoClose, + "If there is no user interaction or objects skipped then close client automatically", "" ); + setEntry( + &table[i++], "verbose", 'v', POPT_ARG_NONE, &Verbose, + "explain what is being done", "" ); + setEntry( + &table[i++], "version", 0, POPT_ARG_NONE, &ShowVersion, + "show version information and quit", 0 ); + + clearEntry( &table[i] ); + return table; + } + + + + namespace Priv + { + struct ::poptOption* getRemovePopTableCollector( fh_rm rm ) + { + return rm->getPoptCollector()->getTable( rm ); + } + }; +}; diff --git a/Ferris/FerrisRemove.hh b/Ferris/FerrisRemove.hh new file mode 100644 index 0000000..05a80d9 --- /dev/null +++ b/Ferris/FerrisRemove.hh @@ -0,0 +1,212 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRemove.hh,v 1.3 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_REMOVE_H_ +#define _ALREADY_INCLUDED_FERRIS_REMOVE_H_ + +#include +#include +#include +#include +#include + +#include + +namespace FerrisUI +{ + class FerrisRm_SignalHandler; +}; + +namespace Ferris +{ + class RemovePopTableCollector; + FERRIS_SMARTPTR( RemovePopTableCollector, fh_rm_collector ); + + class FerrisRm; + FERRIS_SMARTPTR( FerrisRm, fh_rm ); + + + class FERRISEXP_API RemovePopTableCollector + : + public basic_PopTableCollector, + public Handlable + { + fh_rm rm; + + unsigned long Force; + unsigned long Interactive; + unsigned long Verbose; + unsigned long ShowVersion; + unsigned long Recurse; + unsigned long Sloth; + unsigned long AutoClose; + + public: + RemovePopTableCollector(); + + virtual void poptCallback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, + const void * data); + + void reset(); + void ArgProcessingDone( poptContext optCon ); + struct ::poptOption* getTable( fh_rm _rm ); + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API FerrisRm + : + public Ferrisls_display + { + typedef FerrisRm _Self; + typedef Ferrisls_display _Base; + + friend class FerrisUI::FerrisRm_SignalHandler; + + /** + * It makes things very difficult if we are removing a context when we just discover + * its existance, its much easier if we cache the context and remove it when we + * discover another context, we need to clear this at the start and remove it at + * then end, but that is a small price to pay. + */ + fh_context LastRecursiveContext; + Ferrisls ls; + + virtual void workStarting(); + virtual void workComplete(); + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + + protected: + + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( int i, const std::string& attr, const std::string& EA ); + + + public: + + typedef sigc::signal3< void, + FerrisRm&, // thisobj, + fh_context, // target, + std::string // target Description, + > RemoveVerboseSignal_t; + RemoveVerboseSignal_t& getRemoveVerboseSignal(); + + typedef sigc::signal3< void, + FerrisRm&, // thisobj, + std::string, // target Description, + std::string // reason + > SkippingSignal_t; + SkippingSignal_t& getSkippingSignal(); + + typedef sigc::signal3< bool, + FerrisRm&, // thisobj, + fh_context, // target, + std::string // target Description, + > AskRemoveSignal_t; + AskRemoveSignal_t& getAskRemoveSignal(); + + protected: + + virtual void OnRemoveVerbose( FerrisRm& thisref, fh_context target, std::string desc ); + virtual void OnSkipping( FerrisRm& thisref, std::string desc, std::string reason ); + virtual bool OnAskRemove( FerrisRm& thisref, fh_context target, std::string desc ); + + + bool Force; + bool Interactive; + bool Verbose; + bool Recurse; + bool Sloth; + bool AutoClose; + /** + * If we are 'AutoClose' we dont auto close if we have + * interacted with the user + */ + bool hadUserInteraction; + + + private: + + RemoveVerboseSignal_t RemoveVerboseSignal; + SkippingSignal_t SkippingSignal; + AskRemoveSignal_t AskRemoveSignal; + + std::string TargetURL; + fh_rm_collector Collector; + + void removeTree( const std::string& p ); + void removeObject( const std::string& p ); + void removeObject(fh_context ctx); + void removeObject(fh_context parent, const std::string& rdn, const std::string& p ); + + fh_context getTargetContext( const std::string& p ); + std::string getTargetDescription( const std::string& p ); + + protected: + + FerrisRm(); + + public: + + virtual ~FerrisRm(); + static fh_rm CreateObject(); + + void setForce( bool v ); + void setVerbose( bool v ); + void setInteractive( bool v ); + void setRecurse( bool v ); + void setSloth( bool v ); + void setAutoClose( bool v ); + bool getSloth(); + void setTarget( const std::string& removeTargetURL ); + + void remove(); + void operator()(); + + fh_rm_collector getPoptCollector(); + }; + + + namespace Priv + { + FERRISEXP_API struct ::poptOption* getRemovePopTableCollector( fh_rm rm ); + }; + +#define FERRIS_REMOVE_OPTIONS(rm) { 0, 0, POPT_ARG_INCLUDE_TABLE, \ +/**/ ::Ferris::Priv::getRemovePopTableCollector(rm), \ +/**/ 0, "common remove options:", 0 }, +}; +#endif diff --git a/Ferris/FerrisRemove_private.hh b/Ferris/FerrisRemove_private.hh new file mode 100644 index 0000000..cb9050a --- /dev/null +++ b/Ferris/FerrisRemove_private.hh @@ -0,0 +1,40 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRemove_private.hh,v 1.2 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_REMOVE_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_REMOVE_PRIVATE_H_ + +#include + +namespace Ferris +{ + + +}; +#endif diff --git a/Ferris/FerrisSTL.hh b/Ferris/FerrisSTL.hh new file mode 100644 index 0000000..22507af --- /dev/null +++ b/Ferris/FerrisSTL.hh @@ -0,0 +1,182 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSTL.hh,v 1.4 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_STL_H_ +#define _ALREADY_INCLUDED_FERRIS_STL_H_ + +namespace Ferris +{ + + /** + * Normal STL has limited sets, using lower_bound() on iterators + * allows lookup by a compare function but the lower_bound() + * member function doesn't allow a functor. Thus if one has a + * collection of classes which are sorted by a key (for example a + * string) and one wishes to use a string in the member function + * version of lower_bound() then they can't. + * + * This method will use a more efficient but non standard + * member function version of set::lower_bound() if it exists + * or will default to using the global lower_bound() function + * on begin() to end() bidirectional iterators if the std::set + * doesn't include the extended lower_bound() function. + * + * On systems without an extended set::lower_bound member function + * this call should be equal to + * lower_bound( col.begin(), col.end(), key, f ); + * though on systems with the extended set member it will perform + * much faster. + * + * @param col The collection to perform a lower_bound( begin, end ) + * style of operation on + * @param key The extended key which defines the object to find in col. + * @param f A function which compares objects of type col::key and + * ExtendedKey much like the functor argument in std::lower_bound() + * @return an iterator to the object in col which matches key or col.end() + */ + template < class Collection, class ExtendedKey, class StrictWeakOrdering > + inline typename Collection::iterator ex_lower_bound( Collection& col, + const ExtendedKey& key, + StrictWeakOrdering f ) + { +#ifdef FERRIS_STL_HAS_MEMBER_LOWER_BOUND_WITH_FUNCTOR + return col.lower_bound( key, f ); +#else + return lower_bound( col.begin(), col.end(), key, f ); +#endif + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + typedef std::map< std::string, std::string > StringMap_t; + + template < class Col, class E > + void ensure_back( Col& c, E& e ) + { + if( c.end() == find( c.begin(), c.end(), e ) ) + c.push_back( e ); + } + + template < class Col > + void erase( Col& c, const typename Col::value_type & e ) + { +// typename Col::iterator ci = c.find( e ); + typename Col::iterator ci = find( c.begin(), c.end(), e ); + if( ci != c.end() ) + c.erase( ci ); + } + + template < class Col > + bool contains( Col& c, const typename Col::value_type & e ) + { + typename Col::iterator ci = find( c.begin(), c.end(), e ); + return ci != c.end(); + } + + template < class Col, class OutputIterator > + OutputIterator copy( Col& c, OutputIterator e ) + { + return std::copy( c.begin(), c.end(), e ); + } + + +/** + * Copy data from the range first, last to result only copying + * data that passes pred + * + * @return result + (last - first); + */ + template + _OutputIter + copy_if( _InputIter first, + _InputIter last, + _OutputIter result, + _Predicate pred) + { + for ( ; first != last; ++first) + { + if (pred(*first)) + { + *result = *first; + ++result; + } + } + return result; + } + +/** + * Copy data from the range first, last to result stopping when + * pred fails for the first time. All items upto the item that + * pred failed on will be in the result. + * + * @return result + (last - first); + */ + template + _OutputIter + copy_until( _InputIter first, + _InputIter last, + _OutputIter result, + _Predicate pred) + { + for ( ; first != last; ++first) + { + if (pred(*first)) + { + *result = *first; + ++result; + } + } + return result; + } + + + + + template + struct itemInSet : public std::binary_function< ItemType, SetType, bool> + { + bool operator()(const ItemType& x, const SetType& se) const + { + return se.end() != se.find( x ); + } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +}; +#endif diff --git a/Ferris/FerrisSemantic.cpp b/Ferris/FerrisSemantic.cpp new file mode 100644 index 0000000..ab93fb4 --- /dev/null +++ b/Ferris/FerrisSemantic.cpp @@ -0,0 +1,1251 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + soprano RDF higher level semantic functions. + + Copyright (C) 2003+ Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSemantic.cpp,v 1.4 2011/04/08 21:30:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include +#include + +using namespace std; + +//#undef LG_RDF_D +//#define LG_RDF_D cerr + +namespace Ferris +{ + namespace Semantic + { + namespace Wordnet + { + + // word offset after the # in a word node [L#102037721cat] + static const int WORD_NODE_TEXT_OFFSET = 9; + + string RDFSCHEMA = "http://www.dcc.uchile.cl/~agraves/wordnet/1.0/schema#"; + string WNPFX = "http://www.dcc.uchile.cl/~agraves/wordnet/1.0/"; + + fh_node& hasWord() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "hasWord" ); + return ret; + } + fh_node& hasSynSet() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "hasSynSet" ); + return ret; + } + fh_node& NounSynSet() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "NounSynSet" ); + return ret; + } + fh_node& Type() + { + static fh_node ret = Node::CreateURI( "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" ); + return ret; + } + fh_node& hasGloss() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "hasGloss" ); + return ret; + } + fh_node& hyponymOf() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "hyponymOf" ); + return ret; + } + fh_node& partMeronymOf() + { + static fh_node ret = Node::CreateURI( RDFSCHEMA + "partMeronymOf" ); + return ret; + } + + ::Ferris::RDFCore::nodelist_t& getSynSet( fh_model m, + ::Ferris::RDFCore::nodelist_t& ret, + const std::string& word ) + { + fh_node wordNode = Node::CreateURI( WNPFX + "words#" + word ); + + NodeIterator end = NodeIterator(); + NodeIterator oiter = m->findSubjects( hasWord(), wordNode ); + for( ; oiter != end; ++oiter ) + { + fh_node subject = *oiter; + NodeIterator oiter = m->findObjects( subject, hasSynSet() ); + for( ; oiter != end; ++oiter ) + { + fh_node synset = *oiter; + ret.push_back( synset ); + } + } + return ret; + } + + std::string getNodeID( fh_node n ) + { + stringstream ret; + string s = n->getURI()->toString(); + ret << " id=\"" << s.substr( s.rfind("#")+1 ) << "\" "; + return ret.str(); + } + + std::string getWordNodeAsString( fh_node n ) + { + stringstream ret; + string s = n->getURI()->toString(); + string sub = s.substr( s.rfind("#")+1 ); + if( !sub.empty() && sub[0] >= '0' && sub[0] <= '9' && sub.length() > WORD_NODE_TEXT_OFFSET ) + sub = sub.substr( WORD_NODE_TEXT_OFFSET ); + + ret << sub; + return ret.str(); + } + + fh_model getWordnetModel() + { + fh_context md = Shell::acquireContext("~/.ferris/wordnet/metadata"); + return Model::FromMetadataContext( md ); + } + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct tryToGetUUIDNode_StringARM + { + static void set_tryToGetImplicitTreeSmushHasFailed_forURL( fh_context c, bool v ) + { + c->m_tryToGetImplicitTreeSmushHasFailed_forURL = v; + } + static bool get_tryToGetImplicitTreeSmushHasFailed_forURL( fh_context c ) + { + return c->m_tryToGetImplicitTreeSmushHasFailed_forURL; + } + }; + + /****************************************/ + /****************************************/ + /****************************************/ + + class TransitiveRDFNodeCopy + { + fh_model m_outmodel; + fh_model m_inmodel; + fh_node m_inRootNode; + fh_node m_newRootSubject; + bool m_OverwriteExisting; + bool m_createNewBNodes; + + typedef map< fh_node, fh_node, fh_node_compare > m_bnodeMapping_t; + m_bnodeMapping_t m_bnodeMapping; + + public: + TransitiveRDFNodeCopy( fh_model outmodel, + fh_model inmodel, + fh_node n, + bool clone = true ) + : + m_outmodel( outmodel ), + m_inmodel( inmodel ), + m_inRootNode( n ), + m_newRootSubject( 0 ), + m_OverwriteExisting( true ), + m_createNewBNodes( false ) + { + if( !clone ) + { + m_OverwriteExisting = false; + m_createNewBNodes = true; + } + } + + void setNewRootSubject( fh_node n ) + { + m_newRootSubject = n; + } + void setOverwriteExisting( bool v ) + { + m_OverwriteExisting = v; + } + void setCreateNewBNodes( bool v ) + { + m_createNewBNodes = v; + } + + void insertAllObjects( fh_node n, fh_node newRootSubject ) + { + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects(begin) " + << " n:" << n->toString() + << endl; + + NodeIterator end = NodeIterator(); + NodeIterator piter = m_inmodel->getArcsOut( n ); + for( ; piter != end; ++piter ) + { + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects() " + << " pred:" << (*piter)->toString() + << endl; + + NodeIterator oiter = m_inmodel->findObjects( n, *piter ); + for( ; oiter != end; ++oiter ) + { + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects() " + << " obj:" << (*oiter)->toString() + << endl; + + fh_statement st = new Statement( n, *piter, *oiter ); +// if( !m_outmodel->contains( st ) ) + { + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects(making) " + << " m_createNewBNodes:" << m_createNewBNodes + << " m_OverwriteExisting:" << m_OverwriteExisting + << " newRootSubject:" << toVoid(newRootSubject) + << " obj:" << (*oiter)->toString() + << endl; + if( m_createNewBNodes ) + { + fh_node o = st->getObject(); + if( o->isBlank() ) + { + fh_node b = m_outmodel->CreateBlankNode(); + st->setObject( b ); + m_bnodeMapping[ o ] = b; + } + fh_node s = st->getSubject(); + if( s->isBlank() ) + { + fh_node b = m_bnodeMapping[ s ]; + st->setSubject( b ); + } + } + if( newRootSubject ) + st->setSubject( newRootSubject ); + + if( m_OverwriteExisting + || !m_outmodel->getObject( st->getSubject(), st->getPredicate() ) ) + { + m_outmodel->insert( st ); + } + + } + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects(recurse) " + << " object-becoming-node:" << (*oiter)->toString() + << endl; + insertAllObjects( *oiter, 0 ); + } + } + + LG_RDF_D << "TransitiveRDFNodeCopy::insertAllObjects(end) " + << " n:" << n->toString() + << endl; + } + void operator()() + { + insertAllObjects( m_inRootNode, m_newRootSubject ); + } + }; + +// typedef map< fh_node, fh_node, fh_node_compare > bnodeMapping_t; +// bnodeMapping_t bnodeMapping; +// static void +// insertAllObjects( fh_model outmodel, +// fh_model inmodel, +// fh_node n, +// fh_node newRootSubject, +// bool dontSetExisting, +// bnodeMapping_t& bnodeMapping, +// bool createNewBNodes ) +// { +// NodeIterator end = NodeIterator(); +// NodeIterator piter = inmodel->getArcsOut( n ); +// for( ; piter != end; ++piter ) +// { +// NodeIterator oiter = inmodel->findObjects( n, *piter ); +// for( ; oiter != end; ++oiter ) +// { +// fh_statement st = new Statement( n, *piter, *oiter ); +// if( !outmodel->contains( st ) ) +// { +// if( createNewBNodes ) +// { +// fh_node o = st->getObject(); +// if( o->isBlank() ) +// { +// fh_node b = Node::CreateBlankNode(); +// st->setObject( b ); +// bnodeMapping[ o ] = b; +// } +// fh_node s = st->getSubject(); +// if( s->isBlank() ) +// { +// fh_node b = bnodeMapping[ s ]; +// st->setSubject( b ); +// } +// } +// if( newRootSubject ) +// st->setSubject( newRootSubject ); + +// if( !dontSetExisting || !outmodel->getObject( st->getSubject(), st->getPredicate() ) ) +// outmodel->insert( st ); + +// insertAllObjects( outmodel, inmodel, *oiter, 0, dontSetExisting, bnodeMapping, createNewBNodes ); +// } +// } +// } +// } + /* + * Use 'n' as a subject node and insert all of its transitive triples + * into the output model 'outmodel'. Nodes are copied from 'inmodel' + */ + static void + insertAllObjects( fh_model outmodel, fh_model inmodel, fh_node n ) + { + bool clone = true; + TransitiveRDFNodeCopy trdf_copy( outmodel, inmodel, n, clone ); + trdf_copy(); + } + + /******************************/ + /******************************/ + /******************************/ + + + static const std::string ATTR_PREFIX = + "http://witme.sf.net/libferris.web/rdf/ferris-attr/"; + static const std::string SCHEMA_PREFIX = + "http://witme.sf.net/libferris.web/rdf/ferris-schema/"; + + + static std::string getURI( const std::string& baseuri, + const std::string& ferrisEAName, + const std::string& pfx = "" ) + { + std::string ret = baseuri; + if( !pfx.empty() && starts_with( ferrisEAName, pfx ) ) + ret += ferrisEAName.substr( pfx.length() ); + else + ret += ferrisEAName; + + return ret; + } + + std::string getAttrPrefix() + { + return ATTR_PREFIX; + } + + + std::string getPredicateURI( const std::string& rdn ) + { + if( starts_with( rdn, "schema:" )) + { + return getURI( SCHEMA_PREFIX, rdn, "schema:" ); + } + return getURI( ATTR_PREFIX, rdn ); + } + + std::string stripPredicateURIPrefix( const std::string& pred ) + { + string ret = pred; + + PrefixTrimmer trimmer; + trimmer.push_back( ATTR_PREFIX ); + trimmer.push_back( SCHEMA_PREFIX ); + ret = trimmer( ret ); + + return ret; + } + + void myrdfSmush( fh_context existingc, + fh_context oldc, + bool unifyUUIDNodes ) + { + return myrdfSmush( existingc, oldc->getURL(), unifyUUIDNodes ); + } + + void myrdfSmush( fh_context existingc, + const std::string& oldpath_maybe_relative, + bool unifyUUIDNodes ) + { + string oldearl = oldpath_maybe_relative; + if( oldearl.empty() ) + { + stringstream ss; + ss << "No old URL given for existingc:" << existingc->getURL() << endl; + Throw_NoSuchObject( tostr(ss), 0 ); + } + if( string::npos == oldearl.find("/") ) + { + string existing_path = existingc->getURL(); + int epos = existing_path.rfind("/"); + existing_path = existing_path.substr( 0, epos ); + existing_path += "/" + oldearl; + oldearl = existing_path; + } + else if( oldearl[0] == '.' ) + { + stringlist_t el = Util::parseSeperatedList( existingc->getURL(), '/' ); + stringlist_t ol = Util::parseSeperatedList( oldearl, '/' ); + for( stringlist_t::const_iterator oiter = ol.begin(); + oiter != ol.end(); ++oiter ) + { + if( *oiter == ".." ) + { + stringlist_t::iterator tmp = el.end(); + --tmp; + el.erase( tmp ); + } + else if( *oiter == "." ) + { + } + else + { + el.push_back( *oiter ); + } + } + + stringstream ss; + for( stringlist_t::const_iterator eiter = el.begin(); + eiter != el.end(); ++eiter ) + { + ss << *eiter; + } + + oldearl = tostr(ss); + } + + LG_RDF_D << "smushing oldearl:" << oldearl << " existingc:" << existingc->getURL() << endl; + + fh_model m = getDefaultFerrisModel(); + fh_node oldURI = Node::CreateURI( oldearl ); + fh_node newURI = Node::CreateURI( existingc->getURL() ); + + if( unifyUUIDNodes ) + { + if( fh_node old_uuidnode = tryToGetUUIDNode( existingc ) ) + { + m->erase( Node::CreateURI( existingc->getURL() ), + uuidPredNode(), + old_uuidnode ); + } + + fh_statement partial_statement = new Statement(); + partial_statement->setSubject( oldURI ); + StatementIterator si = m->findStatements( partial_statement ); + for( StatementIterator si_end; si != si_end; ++si ) + { + fh_node pred = (*si)->getPredicate(); + fh_node obj = (*si)->getObject(); + + m->insert( newURI, pred, obj ); + } + } + else + { + fh_node n = m->getObject( oldURI, uuidPredNode() ); + if( n ) + { + fh_node uuidnode = ensureUUIDNode( existingc ); + + LG_RDF_D << "myrdfSmush()" << endl; + LG_RDF_D << "old uuidnode:" << n->toString() << endl; + LG_RDF_D << "new uuidnode:" << uuidnode->toString() << endl; + + bool clone = false; + TransitiveRDFNodeCopy trdf_copy( m,m, n, clone ); + trdf_copy.setNewRootSubject( uuidnode ); + trdf_copy(); + } + } + + + + +// stringlist_t rdf_ea_sl = Util::parseCommaSeperatedList( +// getStrAttr( oldchild, "rdf-ea-names", "" ) ); +// stringmap_t rdf_ea_map; +// if( !rdf_ea_sl.empty() ) +// { +// stringlist_t::const_iterator end = rdf_ea_sl.end(); +// for( stringlist_t::const_iterator si = rdf_ea_sl.begin(); si!=end; ++si ) +// { +// rdf_ea_map[ *si ] = getStrAttr( oldchild, *si, "", true, true ); +// } +// } + +// if( !rdf_ea_map.empty() ) +// { +// stringmap_t::const_iterator end = rdf_ea_map.end(); +// for( stringmap_t::const_iterator mi = rdf_ea_map.begin(); mi!=end; ++mi ) +// { +// setStrAttr( child, mi->first, mi->second, true, true ); +// } +// } + + } + + void myrdfSmushUnion( const stringlist_t& srcs ) + { + fh_model m = getDefaultFerrisModel(); + + typedef list< fh_node > nodes_t; + nodes_t nodes; + + for( stringlist_t::const_iterator si = srcs.begin(); + si != srcs.end(); ++si ) + { + nodes.push_back( Node::CreateURI( *si ) ); + } + + for( nodes_t::iterator ni = nodes.begin(); + ni != nodes.end(); ++ni ) + { + fh_node n = *ni; + + for( nodes_t::iterator nj = nodes.begin(); + nj != nodes.end(); ++nj ) + { + fh_node n2 = *nj; + if( n2 == n ) + continue; + + bool clone = false; + TransitiveRDFNodeCopy trdf_copy( m,m, n2, clone ); + trdf_copy.setNewRootSubject( n ); + trdf_copy(); + + +// fh_statement partial_statement = new Statement(); +// partial_statement->setSubject( n2 ); +// StatementIterator si = m->findStatements( partial_statement ); +// for( StatementIterator si_end; si != si_end; ++si ) +// { +// fh_node pred = (*si)->getPredicate(); +// fh_node obj = (*si)->getObject(); + +// if( !m->getObject( n, pred ) ) +// m->insert( n, pred, obj ); +// } + + } + } + } + +// COMMENT: sopranoea should use getPredicateURI() to prepend the URI part. +// FERRISEXP_API const std::string& getRDFBaseURI(); +// const std::string& getRDFBaseURI() +// { +// return RDF::RDF_FERRIS_BASE; +// } + + string regexEscape( const std::string& s ) + { + stringstream iss; + stringstream oss; + iss << s; + char ch; + while( iss >> noskipws >> ch ) + { + if( ( ch >= 'a' && ch <= 'z' ) + || ( ch >= 'A' && ch <= 'Z' ) + || ( ch >= '0' && ch <= '9' ) ) + { + oss << ch; + } + else + { + oss << '\\' << ch; + } + } + return oss.str(); + } + + + fh_node getFastSmushByNameNode( fh_SmushSet smushSet, fh_context c ) + { + stringstream ss; + ss << smushSet->getName() << "-"; + ss << c->getDirName(); + fh_node subject = Node::CreateURI( getPredicateURI( tostr(ss) ) ); + return subject; + } + + static fh_node createUUIDNode( fh_model m, fh_context c ) + { + LG_RDF_D << "createUUIDNode(top) c:" << c->getURL() << endl; + + string earl = c->getURL(); + fh_node earlnode = Node::CreateURI( earl ); + string uuid = Util::makeUUID(); + fh_node uuidnode = Node::CreateURI( getPredicateURI( uuid ) ); + LG_RDF_D << "createUUIDNode(2) c:" << c->getURL() << endl; + // cerr << "createUUIDNode() adding..." << endl + // << " subj:" << earlnode->toString() + // << " pred:" << uuidPredNode()->toString() + // << " obj:" << uuidnode->toString() + // << endl; + m->insert( earlnode, uuidPredNode(), uuidnode ); + + { + fh_context p = c->getParent(); + + if( fh_SmushSet smushSet = p->tryToGetImplicitTreeSmushSet() ) + { +// fh_rex rex = smushSet->getRegex(); +// if( rex && regex_search( earl, rex, boost::match_any ) ) + { + fh_node subject = getFastSmushByNameNode( smushSet, c ); + m->insert( subject, smushCacheUUIDPredNode(), uuidnode ); + LG_RDF_D << "Adding rdf smush cache node." << endl + << " subject:" << subject->toString() + << " pred:" << smushCacheUUIDPredNode()->toString() + << " uuid:" << uuidnode->toString() + << endl; + } + } + } + + LG_RDF_D << "createUUIDNode(3) c:" << c->getURL() << endl; + fh_node ret = uuidnode; +// fh_node ret = m->getObject( earlnode, uuidPredNode() ); + setUUIDNodeModificationTime( ret ); + LG_RDF_D << "createUUIDNode(4) c:" << c->getURL() << endl; + return ret; + } + + fh_node tryToGetUUIDNode( fh_context c ) + { + fh_model m = getDefaultFerrisModel(); + + fh_node earlnode = Node::CreateURI( c->getURL() ); + fh_node uuidnode = m->getObject( earlnode, uuidPredNode() ); + + if( uuidnode ) + LG_RDF_D << "tryToGetUUIDNode exists:" << uuidnode->toString() + << endl; + + // + // If the user has implicit tree smushes setup then we should see if there + // is a uuidnode attached with the same filename in one of the other paths + // in a smushset. If we find such a node then we automatically associate + // it with the current file. + // + if( !uuidnode && c->isParentBound() ) + { + fh_context p = c->getParent(); + + LG_RDF_D << "tryToGetUUIDNode() for c:" << c->getURL() << endl; + + if( !tryToGetUUIDNode_StringARM::get_tryToGetImplicitTreeSmushHasFailed_forURL( c ) ) + { + tryToGetUUIDNode_StringARM::set_tryToGetImplicitTreeSmushHasFailed_forURL( c, true ); + + if( fh_SmushSet smushSet = p->tryToGetImplicitTreeSmushSet() ) + { + // + // A smush set group leader concept. If the regex is matched then we don't + // do any smushing for this URL. This is handy for example when there is + // an ingress filesystem where new files are always created (like copied + // from a digital camera to there) and there is never any need to smush. + // + static const string smushLeaderRegexString = getEDBString( FDB_GENERAL, + CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_K, + CFG_RDF_GLOBAL_SMUSH_GROUP_LEADER_DEFAULT ); + if( !smushLeaderRegexString.empty() ) + { + static const fh_rex rex = toregexh( smushLeaderRegexString ); + if( regex_search( p->getURL(), rex, boost::match_any ) ) + { + LG_RDF_D << "tryToGetUUIDNode() group leader regex matches. Not doing any smushing." + << " smushLeaderRegexString:" << smushLeaderRegexString + << " for c:" << c->getURL() << endl; + if( uuidnode ) + return uuidnode; + return createUUIDNode( m, c ); + } + } + + // + // try to hit the new cache directly + // + { + fh_node subject = getFastSmushByNameNode( smushSet, c ); + LG_RDF_D << "Checking rdf smush cache node." << endl + << " subject:" << subject->toString() + << " pred:" << smushCacheUUIDPredNode()->toString() + << endl; + fh_node uuidnode = m->getObject( subject, smushCacheUUIDPredNode() ); + if( uuidnode ) + { + LG_RDF_D << "FAST Linking uuid:" << uuidnode->toString() + << " to c:" << c->getURL() << endl; + m->insert( earlnode, uuidPredNode(), uuidnode ); + setUUIDNodeModificationTime( uuidnode ); + return uuidnode; + } + } + + + +// cerr << "tryToGetUUIDNode() implicit smushing for c:" << c->getURL() << endl; + + stringstream queryiss; + queryiss << "PREFIX ferris: \n" + << endl + << "SELECT ?uuid ?earl" << endl + << " WHERE { " << endl + << " ?earl ferris:uuid ?uuid . " << endl + << " FILTER ( " << endl; + + string regex_string = smushSet->getRegexString(); + string regexq_filename = Util::replace_all( regexEscape( c->getDirName() ), '\\', "\\\\" ); + queryiss << " regex( str(?earl), " + << " \"" << regex_string << "(.*/)*" << regexq_filename << "$\") " << endl; +// stringlist_t sl; +// const SmushSet::m_smushes_t ss = smushSet->getSmushes(); +// for( rs r( ss ); r; ++r ) +// { +// sl.push_back( si->first ); +// } +// std::string compregex = MakeCompositeRegexString( sl ); + + +// bool virgin = true; +// const SmushSet::m_smushes_t ss = smushSet->getSmushes(); +// SmushSet::m_smushes_t::const_iterator si = ss.begin(); +// SmushSet::m_smushes_t::const_iterator se = ss.end(); +// for( ; si != se ; ++si ) +// { +// const string& regex_string = si->first; +// fh_regex r = si->second; +// string regexq_filename = Util::replace_all( regexEscape( c->getDirName() ), '\\', "\\\\" ); + +// if( !virgin ) +// queryiss << " || " ; +// virgin = false; + + +// queryiss << " regex( str(?earl), " +// << " \"" << regex_string << "(.*/)*" << regexq_filename << "$\") " << endl; +// } + + queryiss << " ) } LIMIT 1 " << endl; + + string query = queryiss.str(); + LG_RDF_D << "Implicit Tree Smush query:" << endl << query << endl; + + // + // + // + LG_RDF_W << "SPARQL is too slow to do at runtime. see apps/rdf/ferris-myrdf-inference" << endl; +// BindingsIterator iter = m->findBindings( query ); +// BindingsIterator e; +// for( ; iter != e ; ++iter ) +// { +// const BindingsIterator::binding& b = *iter; +// uuidnode = b.getByName( "uuid" ); +// // +// // attach the found uuidnode with the URL. +// // +// LG_RDF_D << "Linking uuid:" << uuidnode->toString() +// << " to c:" << c->getURL() << endl; +// m->insert( earlnode, uuidPredNode(), uuidnode ); +// setUUIDNodeModificationTime( uuidnode ); +// return uuidnode; +// } + + // A once off hit making sure that all directories in a tree smush + // will have a uuid node. + LG_RDF_D << "tryToGetUUIDNode() calling ensure for c:" << c->getURL() << endl; + return ensureUUIDNode( c ); + } + } + } + + return uuidnode; + } + + fh_node ensureUUIDNode( fh_model m, fh_context c ) + { + fh_node uuidnode = tryToGetUUIDNode( c ); + if( uuidnode ) + return uuidnode; + + LG_RDF_D << "ensureUUIDNode() creating for c:" << c->getURL() << endl; + return createUUIDNode( m, c ); + } + + + fh_node ensureUUIDNode( fh_context c ) + { + fh_model m = getDefaultFerrisModel(); + return ensureUUIDNode( m, c ); + } + + + fh_node& uuidMTimeNode() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( getPredicateURI( "mtime" ) ); + return ret; + } + + time_t getUUIDNodeModificationTime( ::Ferris::RDFCore::fh_node n ) + { + fh_model m = getDefaultFerrisModel(); + fh_node pred = uuidMTimeNode(); + fh_node obj = m->getObject( n, pred ); + if( obj ) + { + time_t ret = toType(obj->toString()); + LG_RDF_D << "getUUIDNodeModificationTime() ret:" << ret + << " for:" << n->toString() << endl; + return ret; + } + else + { + LG_RDF_D << "getUUIDNodeModificationTime() no data for:" << n->toString() << endl; + } + return 0; + } + + void setUUIDNodeModificationTime( ::Ferris::RDFCore::fh_node n, time_t t ) + { + fh_model m = getDefaultFerrisModel(); + if( !t ) + { + t = Time::getTime(); + } + + LG_RDF_D << "setUUIDNodeModificationTime() n:" << n->toString() + << " t:" << t << endl; +// cerr << "setUUIDNodeModificationTime() n:" << n->toString() +// << " t:" << t << endl; +// BackTrace(); + + fh_node pred = uuidMTimeNode(); + LG_RDF_D << "setUUIDNodeModificationTime() 2" << endl; + fh_node obj = Node::CreateLiteral( tostr(t) ); + LG_RDF_D << "setUUIDNodeModificationTime() 3" << endl; + LG_RDF_D << "setUUIDNodeModificationTime() n:" << n->toString() << endl; + LG_RDF_D << "setUUIDNodeModificationTime() pred:" << pred->toString() << endl; + LG_RDF_D << "setUUIDNodeModificationTime() obj:" << obj->toString() << endl; + m->set( n, pred, obj ); + LG_RDF_D << "setUUIDNodeModificationTime() 4" << endl; + m->sync(); + LG_RDF_D << "setUUIDNodeModificationTime() 5" << endl; + } + + void setSopranoEASubjectNode( ::Ferris::RDFCore::fh_node n, time_t t ) + { + fh_model m = getDefaultFerrisModel(); + + fh_node uuidnode = m->getSubject( uuidOutOfBandPredNode(), n ); + if( uuidnode ) + setUUIDNodeModificationTime( uuidnode, t ); + } + + + + + fh_node tryToGetSopranoEASubjectNode( fh_context c ) + { + LG_RDF_D << "tryToGetSopranoEASubjectNode(top) c:" << c->getURL() << endl; + + fh_model m = getDefaultFerrisModel(); + fh_node ret = tryToGetUUIDNode( c ); + LG_RDF_D << "tryToGetSopranoEASubjectNode(2) c:" << c->getURL() << endl; + if( ret ) + { + ret = m->getObject( ret, uuidOutOfBandPredNode() ); + LG_RDF_D << "tryToGetSopranoEASubjectNode(have node) c:" << c->getURL() << endl; + } + return ret; + } + + fh_node ensureSopranoEASubjectNode( fh_context c ) + { + fh_node ret = tryToGetSopranoEASubjectNode( c ); + if( ret ) + { + LG_RDF_D << "ensureSopranoEASubjectNode(exists) ret:" << ret->toString() << endl; + return ret; + } + + fh_model m = getDefaultFerrisModel(); + fh_node uuidnode = ensureUUIDNode( c ); +// fh_node mdnode = Node::CreateURI( getPredicateURI( Util::makeUUID() ) ); + fh_node mdnode = m->CreateBlankNode(); + m->set( uuidnode, uuidOutOfBandPredNode(), mdnode ); + setUUIDNodeModificationTime( uuidnode ); + LG_RDF_D << "ensureSopranoEASubjectNode() uuidnode:" << uuidnode->toString() << endl; + LG_RDF_D << "ensureSopranoEASubjectNode() ret:" << mdnode->toString() << endl; + return mdnode; + } + + + + fh_node& uuidPredNode() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( getPredicateURI( "uuid" ) ); + return ret; + } + + fh_node& smushCacheUUIDPredNode() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( getPredicateURI( "smushcacheuuid" ) ); + return ret; + } + + fh_node& uuidOutOfBandPredNode() + { + static fh_node ret = 0; + if( !ret ) + ret = Node::CreateURI( getPredicateURI( "out-of-band-ea" ) ); + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + SmushSet::~SmushSet() + { + } + + + const std::string& + SmushSet::getName() const + { + return m_name; + } + + void + SmushSet::setName( const std::string& n ) + { + m_treeSmushing->updateSmushName( m_name, n ); + m_name = n; + } + + + const SmushSet::m_smushes_t& + SmushSet::getSmushes() const + { + return m_smushes; + } + + const string& + SmushSet::getRegexString() + { + return m_regexString; + } + + fh_rex + SmushSet::getRegex() + { + if( !m_rex ) + { + if( !getRegexString().empty() ) + { + m_rex = toregexh( getRegexString() ); + } + } + return m_rex; + } + + + void + SmushSet::setSmushes( m_smushes_t& v ) + { + m_smushes = v; + stringlist_t sl; + for( rs r(m_smushes); r; ++r ) + sl.push_back( r->first ); + m_regexString = MakeCompositeRegexString( sl ); + } + + SmushSet::SmushSet( fh_TreeSmushing p, const std::string& name ) + : + m_treeSmushing( p ), + m_name( name ), + m_rex( 0 ) + { + } + + + TreeSmushing::TreeSmushing() + : + m_shouldSave( false ) + { + } + + TreeSmushing::~TreeSmushing() + { + } + + const TreeSmushing::m_smushSets_t& + TreeSmushing::getAll() const + { + return m_smushSets; + } + + + fh_SmushSet + TreeSmushing::getSmush( const std::string& n ) const + { + m_smushSets_t::const_iterator ci = m_smushSets.find( n ); + if( ci != m_smushSets.end() ) + return ci->second; + return 0; + } + + void + TreeSmushing::swap( fh_TreeSmushing other ) + { + m_smushSets.swap( other->m_smushSets ); + } + + fh_SmushSet + TreeSmushing::newSmush( const std::string& name ) + { + m_smushSets[ name ] = new SmushSet( this, name ); + return m_smushSets[ name ]; + } + + std::string + TreeSmushing::getBoostSerializePath() + { + return CleanupURL( "~/.ferris/tree-smushing.boost" ); + } + + template< class ArchiveClassT > + void + TreeSmushing::sync( ArchiveClassT& archive ) + { + m_smushSets_t::iterator ci = m_smushSets.begin(); + m_smushSets_t::iterator e = m_smushSets.end(); + + long sz = m_smushSets.size(); + archive << sz; + for( ; ci != e ; ++ci ) + { + archive << ci->first; + + fh_SmushSet ss = ci->second; + long sz = ss->m_smushes.size(); + archive << sz; + + SmushSet::m_smushes_t::iterator si = ss->m_smushes.begin(); + SmushSet::m_smushes_t::iterator se = ss->m_smushes.end(); + for( ; si != se; ++si ) + { + archive << si->first; + const Regex& rr = *(GetImpl(si->second)); + archive << rr; + } + } + } + + void + TreeSmushing::sync() + { + if( m_shouldSave ) + { + { + string fname = getBoostSerializePath() + ".txt"; + std::ofstream ofs( fname.c_str() ); + boost::archive::text_oarchive archive( ofs ); + sync( archive ); + } + + { + std::ofstream ofs( getBoostSerializePath().c_str() ); + boost::archive::binary_oarchive archive( ofs ); + sync( archive ); + } + } + } + + + template + void + TreeSmushing::load( Archive & archive ) + { + long sz = 0; + archive >> sz; + for( long iter = 0; iter < sz; ++iter ) + { + string name; + archive >> name; + fh_SmushSet ss = new SmushSet( this, name ); + long ss_sz = 0; + archive >> ss_sz; + + SmushSet::m_smushes_t smushes; + for( long ss_iter = 0; ss_iter < ss_sz; ++ss_iter ) + { + string s; + archive >> s; + + fh_regex r = new Regex(""); + Regex& rr = *(GetImpl(r)); + archive >> rr; + smushes.insert( make_pair( s, r ) ); + } + ss->setSmushes( smushes ); + m_smushSets.insert( make_pair( name, ss ) ); + } + } + + + TreeSmushing::TreeSmushing( bool shouldSave ) + : + m_shouldSave( shouldSave ) + { + if( m_shouldSave ) + { +// if( !access( getBoostSerializePath().c_str(), R_OK ) ) + { + try + { + std::ifstream ifs( getBoostSerializePath().c_str() ); + boost::archive::binary_iarchive archive( ifs ); + load( archive ); + } + catch( exception&e ) + { + string fname = getBoostSerializePath() + ".txt"; + std::ifstream ifs( fname.c_str() ); + boost::archive::text_iarchive archive( ifs ); + load( archive ); + } + + } + } + } + + void + TreeSmushing::updateSmushName( const std::string& oldname, const std::string& newname ) + { + m_smushSets_t::iterator ci = m_smushSets.find( oldname ); + if( ci != m_smushSets.end() ) + { + fh_SmushSet d = ci->second; + m_smushSets.erase( ci ); + m_smushSets[ newname ] = d; + } + } + + + fh_TreeSmushing getDefaultImplicitTreeSmushing() + { + static fh_TreeSmushing ret = 0; + if( !ret ) + { + ret = new TreeSmushing( true ); + } + return ret; + } + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + using namespace ::Ferris::Semantic; + + Semantic::fh_SmushSet + Context::tryToGetImplicitTreeSmushSet() + { + if( m_tryToGetImplicitTreeSmushHasFailed_forDirectory ) + return 0; + + string earl = getURL(); + earl += "/"; + fh_TreeSmushing ts = getDefaultImplicitTreeSmushing(); + const TreeSmushing::m_smushSets_t& a = ts->getAll(); + TreeSmushing::m_smushSets_t::const_iterator ai = a.begin(); + TreeSmushing::m_smushSets_t::const_iterator ae = a.end(); + + LG_RDF_D << "Context::tryToGetImplicitTreeSmush() earl:" << earl << endl; + + for( ; ai != ae ; ++ai ) + { + fh_SmushSet ret = ai->second; + const SmushSet::m_smushes_t& sm = ret->getSmushes(); + SmushSet::m_smushes_t::const_iterator si = sm.begin(); + SmushSet::m_smushes_t::const_iterator se = sm.end(); + + for( ; si != se; ++si ) + { + const string& n = si->first; + fh_regex r = si->second; + + LG_RDF_D << "Context::tryToGetImplicitTreeSmush() n:" << n << endl; + + if( (*r)( earl ) ) + { + return ret; + } + } + } + + m_tryToGetImplicitTreeSmushHasFailed_forDirectory = true; + return 0; + } + + +}; diff --git a/Ferris/FerrisSemantic.hh b/Ferris/FerrisSemantic.hh new file mode 100644 index 0000000..aec9a72 --- /dev/null +++ b/Ferris/FerrisSemantic.hh @@ -0,0 +1,257 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + soprano RDF higher level semantic functions. + + Copyright (C) 2003+ Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSemantic.hh,v 1.4 2011/04/08 21:30:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SEMANTIC_H_ +#define _ALREADY_INCLUDED_FERRIS_SEMANTIC_H_ + +#include +#include + +#ifdef emit +#undef emit +#endif + +#ifdef signal +#undef signal +#endif + + +namespace boost { + namespace serialization { + class access; + } +} + + +namespace Ferris +{ + namespace Semantic + { + using namespace ::Ferris::RDFCore; + + namespace Wordnet + { + FERRISEXP_API extern std::string RDFSCHEMA; + FERRISEXP_API extern std::string WNPFX; + + using ::Ferris::RDFCore::nodelist_t; +// typedef std::list< fh_node > nodelist_t; + + FERRISEXP_API fh_node& hasWord(); + FERRISEXP_API fh_node& hasSynSet(); + FERRISEXP_API fh_node& NounSynSet(); + FERRISEXP_API fh_node& Type(); + FERRISEXP_API fh_node& hasGloss(); + FERRISEXP_API fh_node& hyponymOf(); + FERRISEXP_API fh_node& partMeronymOf(); + + FERRISEXP_API nodelist_t& getSynSet( fh_model m, nodelist_t& ret, const std::string& word ); + FERRISEXP_API std::string getNodeID( fh_node n ); + FERRISEXP_API std::string getWordNodeAsString( fh_node n ); + + FERRISEXP_API fh_model getWordnetModel(); + }; + + + FERRISEXP_API std::string getAttrPrefix(); + FERRISEXP_API std::string getPredicateURI( const std::string& rdn ); + FERRISEXP_API std::string stripPredicateURIPrefix( const std::string& pred ); + + /** + * After a file is moved/copied outside of libferris this call can attach + * EA which is stored in myrdf.db to the new version of the context. + * eg. mv foo foo1; myrdfSmush( Resolve( foo1 ), foo ); + */ + FERRISEXP_API void myrdfSmush( fh_context existingc, const std::string& oldpath, bool unifyUUIDNodes = false ); + FERRISEXP_API void myrdfSmush( fh_context existingc, fh_context oldc, bool unifyUUIDNodes = false ); + + /** + * Merge the myrdf metadata for the given list of URLs making each URL + * see the union of this metadata. If an EA is bound for two URLs + * each URL will see its old value. So this really only imports the + * EAs which are not bound for each respective URL in the set from all + * the others in the set. + */ + FERRISEXP_API void myrdfSmushUnion( const stringlist_t& srcs ); + + /** + * Filesystem objects have a UUID node which has metadata attached to it. + * Conceptually it is something like this + * + * file-url uuid-pred uuidnode + * uuidnode soprano-ea-pred SopranoEASubjectNodeX + * SopranoEASubjectNodeX eaname eavalue + * + * Get the uuidnode with ensureUUIDNode(). + * Get the SopranoEASubjectNodeX to get all the out-of-band EA stored in myrdf + * using ensureSopranoEASubjectNode() + * + * The uuid-pred link can be made implicitly sometimes by libferris so its + * best to call tryToGetUUIDNode( fh_context ) to find the UUID node + * associated with a context if one exists. + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node tryToGetUUIDNode( fh_context c ); + + /** + * Like tryToGetUUIDNode() but if no such link exists it is created + * automatically. + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node ensureUUIDNode( fh_context c ); + FERRISEXP_API ::Ferris::RDFCore::fh_node ensureUUIDNode( ::Ferris::RDFCore::fh_model m, fh_context c ); + + /** + * Get the last time_t any of the RDF data relating to this uuidnode was + * changed. + */ + FERRISEXP_API time_t getUUIDNodeModificationTime( ::Ferris::RDFCore::fh_node n ); + + /** + * Record the time_t that an update for any RDF data relatiing to this + * uuidnode has changed. + */ + FERRISEXP_API void setUUIDNodeModificationTime( ::Ferris::RDFCore::fh_node n, + time_t t = 0 ); + FERRISEXP_API void setSopranoEASubjectNode( ::Ferris::RDFCore::fh_node n, + time_t t = 0 ); + + /** + * Try to get the subject node for a context where EAName EAValue predicate object + * pairings are stored. + * + * @see ensureSopranoEASubjectNode() + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node tryToGetSopranoEASubjectNode( fh_context c ); + FERRISEXP_API ::Ferris::RDFCore::fh_node ensureSopranoEASubjectNode( fh_context c ); + + /** + * This is mainly for applications like format converters which need to + * setup uuid-pred links themselves. + * Applications should use tryToGetUUIDNode() and ensureUUIDNode(). + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node& uuidPredNode(); + /** + * Used for creating a quick + * smushsetid-filename smushCacheUUIDPredNode() uuidnode + * cache for fast smushing on filename. + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node& smushCacheUUIDPredNode(); + + + /** + * This is mainly for applications like format converters which need to + * setup uuid-pred links themselves. + * Applications should use tryToGetUUIDNode() and ensureUUIDNode(). + */ + FERRISEXP_API ::Ferris::RDFCore::fh_node& uuidOutOfBandPredNode(); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + class FERRISEXP_API SmushSet + : + public Handlable + { + public: + virtual ~SmushSet(); + + const std::string& getName() const; + void setName( const std::string& n ); + + typedef std::map< std::string, fh_regex > m_smushes_t; + const m_smushes_t& getSmushes() const; + const std::string& getRegexString(); + fh_rex getRegex(); + void setSmushes( m_smushes_t& v ); + + private: + std::string m_name; + m_smushes_t m_smushes; + std::string m_regexString; + fh_rex m_rex; + friend class TreeSmushing; + fh_TreeSmushing m_treeSmushing; + SmushSet( fh_TreeSmushing p, const std::string& name ); + + friend class boost::serialization::access; + }; + + FERRISEXP_API fh_TreeSmushing getDefaultImplicitTreeSmushing(); + + class FERRISEXP_API TreeSmushing + : + public Handlable + { + public: + TreeSmushing(); + virtual ~TreeSmushing(); + + typedef std::map< std::string, fh_SmushSet > m_smushSets_t; + + const m_smushSets_t& getAll() const; + fh_SmushSet getSmush( const std::string& n ) const; + void swap( fh_TreeSmushing other ); + fh_SmushSet newSmush( const std::string& name ); + void sync(); + + template< class ArchiveClassT > + void sync( ArchiveClassT& archive ); + + + private: + bool m_shouldSave; + m_smushSets_t m_smushSets; + + TreeSmushing( bool shouldSave ); + friend fh_TreeSmushing getDefaultImplicitTreeSmushing(); + + static std::string getBoostSerializePath(); + + friend class SmushSet; + void updateSmushName( const std::string& oldname, const std::string& newname ); + + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) + { + ar & m_smushSets; + } + template void load( Archive & ar ); + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + }; +}; + +#endif diff --git a/Ferris/FerrisSlaveProcess.cpp b/Ferris/FerrisSlaveProcess.cpp new file mode 100644 index 0000000..16b04f9 --- /dev/null +++ b/Ferris/FerrisSlaveProcess.cpp @@ -0,0 +1,361 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSlaveProcess.cpp,v 1.4 2011/05/06 21:30:20 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FerrisSlaveProcess.hh" +#include "FerrisSlaveProcess_private.hh" +#include "ChildStreamServer.hh" + +using namespace std; + +namespace Ferris +{ + const int CPU_COUNT = 4; + const int GROUP_SLAVE_PROCESS_COUNT = CPU_COUNT * 1.5; + + + + class FerrisSlaveProcessImpl + : + public FerrisSlaveProcess + { + std::string m_taskname; + std::string m_cmdline; + + fh_runner m_runner; + fh_xstreamcol m_XMLCol; + fh_childserv m_ChildServ; + + fh_xstreamcol getXMLCol() + { + if( !m_XMLCol ) + { + m_XMLCol = ::Ferris::Factory::MakeXMLStreamCol(); + } + return m_XMLCol; + } + fh_childserv getChildServ() + { + if( !m_ChildServ ) + { + m_ChildServ = new ChildStreamServer(); + } + return m_ChildServ; + } + + + public: + FerrisSlaveProcessImpl( const std::string& taskname, + const std::string& cmd ); + + fh_runner getRunner(); + + ChildCompleteSig_t& getChildCompleteSig(); + MessageArrivedSig_t& getMessageArrivedSig(); + }; + + FerrisSlaveProcessImpl::FerrisSlaveProcessImpl( const std::string& taskname, + const std::string& cmd ) + : + m_runner( 0 ), + m_XMLCol(0), + m_ChildServ(0), + m_taskname( taskname ), + m_cmdline( cmd ) + { + } + + fh_runner + FerrisSlaveProcessImpl::getRunner() + { + if( !m_runner ) + { + m_runner = new Runner(); + m_runner->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_DO_NOT_REAP_CHILD )); + + // This is needed or we might miss the last bit of output + m_runner->setSpawnFlags( GSpawnFlags( m_runner->getSpawnFlags() & ~(G_SPAWN_DO_NOT_REAP_CHILD))); + + getXMLCol()->attach(m_runner); + getChildServ()->addChild(m_runner); + if( !m_cmdline.empty() ) + m_runner->setCommandLine( m_cmdline ); + + } + return m_runner; + } + + FerrisSlaveProcessImpl::ChildCompleteSig_t& + FerrisSlaveProcessImpl::getChildCompleteSig() + { + return getChildServ()->getChildCompleteSig(); + } + + FerrisSlaveProcessImpl::MessageArrivedSig_t& + FerrisSlaveProcessImpl::getMessageArrivedSig() + { + return getXMLCol()->getMessageArrivedSig(); + } + + fh_FerrisSlaveProcess + CreateFerrisSlaveProcess( const std::string& taskname, const std::string& cmd ) + { + return new FerrisSlaveProcessImpl( taskname, cmd ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + IRunnableSlaveProcessManager::IRunnableSlaveProcessManager( const std::string& processName ) + : + m_asyncSlave( 0 ) + { + m_asyncSlave = CreateFerrisSlaveProcess( processName, "" ); + m_asyncSlave->getChildCompleteSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncChildComeplete ) ); + } + + fh_FerrisSlaveProcess + IRunnableSlaveProcessManager::getSlaveProcess() + { + return m_asyncSlave; + } + + void + IRunnableSlaveProcessManager::OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ) + { + LG_BGPROC_D << "OnChildComeplete() estatus:" << estatus << endl; + /* + * Make sure that all async IO calls have been accepted. + */ + Main::processAllPendingEvents(); + Run(); +// gtk_idle_add(BackgroundEAReader_idle_cb, this); +// g_timeout_add( 1000, GSourceFunc(BackgroundEAReader_idle_cb), this ); + } + + + + /******************************/ + /******************************/ + /******************************/ + + GroupIRunnableSlaveProcessManager::GroupIRunnableSlaveProcessManager() + : + IRunnableSlaveProcessManager( "group" ) + { + } + + void + GroupIRunnableSlaveProcessManager::addIRunnable( fh_IRunnableSlaveProcessManager r ) + { + m_runnables.push_back( r ); + } + + void + GroupIRunnableSlaveProcessManager::Run() + { + LG_BGPROC_D << "Starting children, count:" << m_runnables.size() << endl; + + m_runnables_t::iterator iter = m_runnables.begin(); + m_runnables_t::iterator e = m_runnables.end(); + + for( ; iter!=e; ++iter ) + { + (*iter)->Run(); + } + LG_BGPROC_D << "STARTED children, count:" << m_runnables.size() << endl; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + BackgroundEAReader::BackgroundEAReader( fh_context target, const stringset_t& eanames ) + : + IRunnableSlaveProcessManager( "async get ea" ), + m_eanames( eanames ), + m_target( target ) + { + m_eanamesIter = m_eanames.begin(); + m_asyncSlave->getMessageArrivedSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncXMLMessage ) ); + } + + BackgroundEAReader::~BackgroundEAReader() + { +// cerr << "+++~BackgroundEAReader()" << endl; + } + + + void + BackgroundEAReader::Run() + { + const int maxEAPerProcess = 8; + + if( m_eanamesIter == m_eanames.end() ) + return; + + stringstream rdnlist; + for(int j=0 ; m_eanamesIter != m_eanames.end() && j < maxEAPerProcess; ++m_eanamesIter, ++j ) + { + string rdn = *m_eanamesIter; + rdnlist << rdn << ","; + } +// if( m_eanamesIter != m_eanames.end() ) +// ++m_eanamesIter; + + + fh_stringstream qss; + qss << "fcat " + << " --ferris-internal-async-message-slave " + << " --ferris-internal-async-message-slave-attrs=" << rdnlist.str() + << " " << m_target->getURL(); +// cerr << "+++cmd:" << tostr(qss) << endl; + LG_BGPROC_D << "this:" << toVoid(this) << " CMD:" << tostr(qss) << endl; + + m_asyncSlave->getRunner()->setCommandLine( tostr(qss) ); + m_asyncSlave->getRunner()->Run(); + LG_BGPROC_D << "this:" << toVoid(this) << " have started CMD:" << tostr(qss) << endl; + } + + void + BackgroundEAReader::OnAsyncXMLMessage( fh_xstreamcol h ) + { + stringmap_t& m = h->getStringMap(); + LG_BGPROC_D << "BackgroundEAReader::OnAsyncXMLMessage() m.sz:" << m.size() << endl; + for( stringmap_t::iterator mi = m.begin(); mi != m.end(); ++mi ) + { + LG_BGPROC_D << "this:" << toVoid(this) << " OnAsyncXMLMessage() k:" << mi->first << " v:" << mi->second << endl; + } + + if( m.end() != m.find("v") ) + { + string eaname = m["eaname"]; + string v = m["v"]; + LG_BGPROC_D << "have eaname:" << eaname << " v:" << v << endl; + + bool isError = false; + getObtainedEASig().emit( this, eaname, v, isError ); + } + else if( m.end() != m.find("outofband-error") ) + { + string emsg = m["outofband-error"]; + string eaname = m["eaname"]; + LG_BGPROC_W << "ERROR:" << emsg << endl; + bool isError = true; + getObtainedEASig().emit( this, eaname, emsg, isError ); + } + else + { + LG_BGPROC_W << "strange xml_msg_arrived()" << endl; + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + GroupBackgroundEAReader::GroupBackgroundEAReader( fh_context target, const stringset_t& eanames, int numberOfChildren ) + { + int eanamessz = eanames.size(); + int numberPerChild = ceil( eanamessz * 1.0 / numberOfChildren ); + + stringset_t::iterator iter = eanames.begin(); + stringset_t::iterator e = eanames.end(); + + LG_BGPROC_D << "GroupBackgroundEAReader() eanamessz:" << eanamessz + << " numberPerChild:" << numberPerChild + << " numberOfChildren:" << numberOfChildren + << endl; + for( int i=0; i < numberOfChildren; ++i ) + { + stringset_t tmp; + for(int j=0; iter!=e && jgetObtainedEASig().connect( sigc::mem_fun( *this, &_Self::OnChildBackgroundEA )); + + LG_BGPROC_D << "GroupBackgroundEAReader() eanamessz:" << eanamessz + << " numberPerChild:" << numberPerChild + << " numberOfChildren:" << numberOfChildren + << " child:" << i + << " childlist.sz:" << tmp.size() + << " ealist:" << Util::createCommaSeperatedList( tmp ) + << endl; + + } + } + + GroupBackgroundEAReader::~GroupBackgroundEAReader() + { + } + + void + GroupBackgroundEAReader::OnChildBackgroundEA( BackgroundEAReader* bgr, + const std::string& rdn, + const std::string& v, + bool isError ) + { + LG_BGPROC_D << "OnChildBackgroundEA() bgr:" << bgr << " rdn:" << rdn << " v:" << v << endl; + + getObtainedEASig().emit( bgr, rdn, v, isError ); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + fh_GroupBackgroundEAReader CreateGroupBackgroundEAReader( + fh_context target, const stringset_t& eanames, int numberOfChildren ) + { + if( !numberOfChildren ) + numberOfChildren = GROUP_SLAVE_PROCESS_COUNT; + + return new GroupBackgroundEAReader( target, eanames, numberOfChildren ); + } + }; + +}; + diff --git a/Ferris/FerrisSlaveProcess.hh b/Ferris/FerrisSlaveProcess.hh new file mode 100644 index 0000000..76d714f --- /dev/null +++ b/Ferris/FerrisSlaveProcess.hh @@ -0,0 +1,190 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSlaveProcess.hh,v 1.2 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SLAVE_PROCESS_H_ +#define _ALREADY_INCLUDED_FERRIS_SLAVE_PROCESS_H_ + +#include +#include +#include +#include + +namespace Ferris +{ + class FerrisSlaveProcess + : + public Handlable + { + public: + virtual fh_runner getRunner() = 0; + + typedef sigc::signal4< void, ChildStreamServer*, fh_runner, int, int > ChildCompleteSig_t; + virtual ChildCompleteSig_t& getChildCompleteSig() = 0; + + typedef sigc::signal1< void, fh_xstreamcol > MessageArrivedSig_t; + virtual MessageArrivedSig_t& getMessageArrivedSig() = 0; + }; + + + fh_FerrisSlaveProcess + CreateFerrisSlaveProcess( const std::string& taskname, + const std::string& cmd ); + + /********************************************************************************/ + /********************************************************************************/ + + /** + * This is a manager for some background process. For example BackgroundEAReader. + * The main goal of the class is to spawn a new background process in Run() and + * handle interaction with it, perhaps using a fh_FerrisSlaveProcess and handling + * interaction with a OnAsyncXMLMessage callback. + */ + class IRunnableSlaveProcessManager; + FERRIS_SMARTPTR( IRunnableSlaveProcessManager, fh_IRunnableSlaveProcessManager ); + + class IRunnableSlaveProcessManager + : public Handlable + { + typedef IRunnableSlaveProcessManager _Self; + protected: + fh_FerrisSlaveProcess m_asyncSlave; + IRunnableSlaveProcessManager( const std::string& processName ); + void OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ); + fh_FerrisSlaveProcess getSlaveProcess(); + public: + virtual void Run() = 0; + }; + + + class GroupIRunnableSlaveProcessManager; + FERRIS_SMARTPTR( GroupIRunnableSlaveProcessManager, fh_GroupIRunnableSlaveProcessManager ); + class GroupIRunnableSlaveProcessManager + : public IRunnableSlaveProcessManager + { + protected: + GroupIRunnableSlaveProcessManager(); + void addIRunnable( fh_IRunnableSlaveProcessManager r ); + + public: + + virtual void Run(); + + private: + + typedef std::list< fh_IRunnableSlaveProcessManager > m_runnables_t; + m_runnables_t m_runnables; + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class BackgroundEAReader; + FERRIS_SMARTPTR( BackgroundEAReader, fh_BackgroundEAReader ); + class GroupBackgroundEAReader; + FERRIS_SMARTPTR( GroupBackgroundEAReader, fh_GroupBackgroundEAReader ); + + class BackgroundEAReaderSignals + { + public: + typedef sigc::signal4< void, + BackgroundEAReader*, // this + const std::string&, // rdn, + const std::string&, // value, + bool > // if( true ) value is error for not reading rdn + ObtainedEASig_t; + ObtainedEASig_t& getObtainedEASig() + { + return m_ObtainedEASig; + } + private: + ObtainedEASig_t m_ObtainedEASig; + }; + + class BackgroundEAReader + : public IRunnableSlaveProcessManager, + public BackgroundEAReaderSignals + { + typedef BackgroundEAReader _Self; + + public: + + BackgroundEAReader( fh_context target, const stringset_t& eanames ); + ~BackgroundEAReader(); + + + virtual void Run(); + + private: + + void OnAsyncXMLMessage( fh_xstreamcol h ); + + fh_context m_target; + stringset_t m_eanames; + stringset_t::iterator m_eanamesIter; + }; + + /******************************/ + /******************************/ + /******************************/ + + class GroupBackgroundEAReader + : public GroupIRunnableSlaveProcessManager, + public BackgroundEAReaderSignals + { + typedef GroupBackgroundEAReader _Self; + + public: + + GroupBackgroundEAReader( fh_context target, const stringset_t& eanames, int numberOfChildren = 6 ); + ~GroupBackgroundEAReader(); + + + private: + + void OnChildBackgroundEA( BackgroundEAReader* bgr, + const std::string& rdn, + const std::string& v, + bool isError ); + }; + + namespace Factory + { + fh_GroupBackgroundEAReader CreateGroupBackgroundEAReader( + fh_context target, const stringset_t& eanames, int numberOfChildren = 0 ); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; +#endif diff --git a/Ferris/FerrisSlaveProcess_private.hh b/Ferris/FerrisSlaveProcess_private.hh new file mode 100644 index 0000000..8dd63ce --- /dev/null +++ b/Ferris/FerrisSlaveProcess_private.hh @@ -0,0 +1,34 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisSlaveProcess_private.hh,v 1.2 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SLAVE_PROCESS_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_SLAVE_PROCESS_PRIV_H_ + + +#endif diff --git a/Ferris/FerrisSmartPointerChecker.hh b/Ferris/FerrisSmartPointerChecker.hh new file mode 100644 index 0000000..a68fcdd --- /dev/null +++ b/Ferris/FerrisSmartPointerChecker.hh @@ -0,0 +1,22 @@ + +namespace Ferris +{ + + template + struct FerrisSmartPointerChecker + { + FerrisSmartPointerChecker() {} + template FerrisSmartPointerChecker(const FerrisSmartPointerChecker&) {} + template FerrisSmartPointerChecker(const Loki::NoCheck&) {} + template FerrisSmartPointerChecker(const Loki::AssertCheck&) {} + + static void OnDefault(const P&) {} + static void OnInit(const P&) {} + static void OnDereference(P val) + { + if( !val ) { ::Ferris::BackTrace(); assert(val); } + } + static void Swap(FerrisSmartPointerChecker&) {} + }; + +}; diff --git a/Ferris/FerrisSmartPointerChecker.hh.in b/Ferris/FerrisSmartPointerChecker.hh.in new file mode 100644 index 0000000..f00a5a3 --- /dev/null +++ b/Ferris/FerrisSmartPointerChecker.hh.in @@ -0,0 +1,22 @@ + +namespace Ferris +{ + + template + struct FerrisSmartPointerChecker + { + FerrisSmartPointerChecker() {} + template FerrisSmartPointerChecker(const FerrisSmartPointerChecker&) {} + template FerrisSmartPointerChecker(const Loki::NoCheck&) {} + template FerrisSmartPointerChecker(const Loki::AssertCheck&) {} + + static void OnDefault(const P&) {} + static void OnInit(const P&) {} + static void OnDereference(P val) + { + @FERRIS_SMARTPTR_ASSERT@ + } + static void Swap(FerrisSmartPointerChecker&) {} + }; + +}; diff --git a/Ferris/FerrisStdHashMap.hh b/Ferris/FerrisStdHashMap.hh new file mode 100644 index 0000000..5485e12 --- /dev/null +++ b/Ferris/FerrisStdHashMap.hh @@ -0,0 +1,69 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisStdHashMap.hh,v 1.5 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_STD_HASH_MAP_H_ +#define _ALREADY_INCLUDED_FERRIS_STD_HASH_MAP_H_ + +#ifdef STLPORT + +#include +#define FERRIS_STD_HASH_MAP std::hash_map + +#include +#define FERRIS_STD_HASH_SET std::hash_set + +#else + +#include +//#include +#include +namespace __gnu_cxx +{ + template<> + struct hash + { + size_t operator()(std::string& __s) const + { return __stl_hash_string(__s.c_str()); } + size_t operator()(const std::string& __s) const + { return __stl_hash_string(__s.c_str()); } + }; +}; +namespace std +{ + using __gnu_cxx::hash; +}; +#define FERRIS_STD_HASH_MAP __gnu_cxx::hash_map +#include +#define FERRIS_STD_HASH_SET __gnu_cxx::hash_set + + +#endif + + +#endif diff --git a/Ferris/FerrisVersioning.cpp b/Ferris/FerrisVersioning.cpp new file mode 100644 index 0000000..0fa3938 --- /dev/null +++ b/Ferris/FerrisVersioning.cpp @@ -0,0 +1,30 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisVersioning.cpp,v 1.2 2010/09/24 21:30:42 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include diff --git a/Ferris/FerrisVersioning.hh b/Ferris/FerrisVersioning.hh new file mode 100644 index 0000000..be67cd9 --- /dev/null +++ b/Ferris/FerrisVersioning.hh @@ -0,0 +1,92 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisVersioning.hh,v 1.2 2010/09/24 21:30:43 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_VERSIONING_H_ +#define _ALREADY_INCLUDED_FERRIS_VERSIONING_H_ + +#include +#include + +namespace Ferris +{ + typedef guint32 ContextDirOpVersion_t; + + template < class VersionType > + class VersionWatcher + { + VersionType ourVersion; + public: + VersionWatcher( VersionType v = 0 ) + : + ourVersion( v ) + { + } + + VersionWatcher( const VersionWatcher& v ) + { + ourVersion = v.ourVersion; + } + + VersionWatcher& operator=( const VersionWatcher& v ) + { + ourVersion = v.ourVersion; + return *this; + } + + + /** + * returns true if we have the same version still + */ + bool test( VersionType theirV ) + { + return ourVersion == theirV; + } + + void update( VersionType theirV ) + { + ourVersion = theirV; + } + + /** + * returns true if we have the same version still + */ + bool operator()( VersionType theirV ) + { + bool r = test(theirV); + ourVersion = theirV; + return r; + } + }; +}; + + + + +#endif + diff --git a/Ferris/FerrisWebServices.cpp b/Ferris/FerrisWebServices.cpp new file mode 100644 index 0000000..bb4f5e1 --- /dev/null +++ b/Ferris/FerrisWebServices.cpp @@ -0,0 +1,142 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices.cpp,v 1.3 2011/01/20 21:30:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FerrisWebServices_private.hh" + + +namespace Ferris +{ + + /****************************************/ + /****************************************/ + /****************************************/ + + WebServicesUpload::WebServicesUpload() + : + m_uploadSize( 0 ), + m_uploadFilename( "filename.avi" ), + m_streamToQIO( 0 ), + m_reply( 0 ), + m_uploadDefaultsToPrivate( false ) + { + } + + + WebServicesUpload::~WebServicesUpload() + { + } + + + void + WebServicesUpload::setFilename( const std::string& s ) + { + m_uploadFilename = s; + } + + void + WebServicesUpload::setLength( int sz ) + { + m_uploadSize = sz; + } + + void + WebServicesUpload::setTitle( const std::string& s ) + { + m_title = s; + } + + void + WebServicesUpload::setDescription( const std::string& s ) + { + m_desc = s; + } + + void + WebServicesUpload::setKeywords( const std::string& s ) + { + m_keywords = s; + } + + std::string + WebServicesUpload::getURL() + { + return m_url; + } + + std::string + WebServicesUpload::getID() + { + return m_id; + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + std::string filenameToContextType( const std::string& s ) + { + string ret = "video/mp4"; + + int p = s.rfind("."); + if( p != string::npos ) + { + string ext = s.substr( p+1 ); + ret = (string)"video/" + ext; + } + + if( ends_with( s, ".cr2" ) || ends_with( s, ".CR2" ) ) + ret = "image/cr2"; + if( ends_with( s, ".flv" )) + ret = "video/x-flv"; + if( ends_with( s, ".jpg" )) + ret = "image/jpeg"; + LG_WEBSERVICE_D << "filenameToContextType() ret:" << ret << " s:" << s << endl; + std::cerr << "filenameToContextType() ret:" << ret << " s:" << s << endl; + return ret; + } + + + /****************************************/ + /****************************************/ + /****************************************/ + + + + + + + /****************************************/ + /****************************************/ + /****************************************/ + +}; + + +#include "FerrisWebServices_private_moc.cpp" diff --git a/Ferris/FerrisWebServices_private.hh b/Ferris/FerrisWebServices_private.hh new file mode 100644 index 0000000..60b878c --- /dev/null +++ b/Ferris/FerrisWebServices_private.hh @@ -0,0 +1,348 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_WEB_SERVICES_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_WEB_SERVICES_PRIV_H_ + +#include +#include + +#include "Ferris/Context.hh" +#include "Ferris/FerrisQt_private.hh" + +namespace Ferris +{ + using std::endl; + using std::string; + + /****************************************/ + /****************************************/ + /****************************************/ + + class WebServicesUpload; + FERRIS_SMARTPTR( WebServicesUpload, fh_WebServicesUpload ); + + class FERRISEXP_API WebServicesUpload + : + public QObject, + public Handlable + { + Q_OBJECT; + + protected: + int m_uploadSize; + std::string m_uploadFilename; + std::string m_title; + std::string m_desc; + std::string m_keywords; + bool m_uploadDefaultsToPrivate; + fh_StreamToQIODevice m_streamToQIO; + QNetworkReply* m_reply; + + std::string m_url; + std::string m_id; + + protected: + WebServicesUpload(); + + public: + + virtual ~WebServicesUpload(); + + void setFilename( const std::string& s ); + void setLength( int sz ); + void setTitle( const std::string& s ); + void setDescription( const std::string& s ); + void setKeywords( const std::string& s ); + + std::string getURL(); + std::string getID(); + + virtual void streamingUploadComplete() = 0; + virtual fh_iostream createStreamingUpload( const std::string& ContentType ) = 0; + }; + + FERRISEXP_API std::string filenameToContextType( const std::string& s ); + + /****************************************/ + /****************************************/ + /****************************************/ + + + template < class ChildContextClass, class ParentContextClass = leafContext > + class FERRISEXP_API WebServicesFileUploadContext + : + public ParentContextClass + { + typedef ParentContextClass _Base; + typedef WebServicesFileUploadContext< ChildContextClass, ParentContextClass > _Self; + + protected: + fh_WebServicesUpload m_wsUpload; + std::string m_filename; + std::string m_title; + std::string m_desc; + std::string m_keywords; + std::string m_ContentType; + int m_ContentLength; + + public: + + virtual fh_WebServicesUpload getWebServicesUpload() = 0; + + WebServicesFileUploadContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ), + m_ContentLength( 0 ) + { + LG_WEBSERVICE_D << "ctor, have read:" << this->getHaveReadDir() << endl; + } + + ferris_ios::openmode + getSupportedOpenModes() + { + return + std::ios_base::in | + std::ios_base::out | + std::ios::trunc | + std::ios::ate | + std::ios::app | + std::ios_base::binary ; + } + + void OnStreamClosed( fh_istream& ss, std::streamsize tellp, ferris_ios::openmode m ) + { + LG_WEBSERVICE_D << "OnStreamClosed()" << endl; + if( !(m & std::ios::out) ) + return; + LG_WEBSERVICE_D << "OnStreamClosed() waiting..." << endl; + getWebServicesUpload()->streamingUploadComplete(); + + if( m_wsUpload ) + { + LG_WEBSERVICE_D << "OnStreamClosed video url:" << m_wsUpload->getURL() << endl; + LG_WEBSERVICE_D << "OnStreamClosed video id:" << m_wsUpload->getID() << endl; + } + } + + + + virtual void priv_preCopyAction( fh_context c ) + { + LG_WEBSERVICE_D << "preCopyAction(top) c:" << c->getURL() << endl; + +// fh_YoutubeUpload u = getYoutubeUpload(); + + m_filename = c->getDirName(); + string t = getStrAttr( c, "upload-filename", "" ); + if( !t.empty() ) + { + m_filename = t; + } + m_title = getStrAttr( c, "title", "" ); + LG_WEBSERVICE_D << "preCopyAction() title1:" << m_title << endl; + if( m_title.empty() ) + { + m_title = getStrAttr( c, "description", "" ); + LG_WEBSERVICE_D << "preCopyAction() title2:" << m_title << endl; + } + if( m_title.empty() ) + { + m_title = getStrAttr( c, "keywords", "" ); + LG_WEBSERVICE_D << "preCopyAction() title3:" << m_title << endl; + } + if( m_title.empty() ) + { + m_title = getStrAttr( c, "annotation", "" ); + LG_WEBSERVICE_D << "preCopyAction() title4:" << m_title << endl; + } + + m_ContentType = getStrAttr( c, "mimetype" ,"" ); + m_ContentLength = toint( getStrAttr( c, "size", "200" )); + + LG_WEBSERVICE_D << "m_ContentLength:" << m_ContentLength << endl; + } + + virtual void priv_postCopyAction( fh_context c ) + { + LG_WEBSERVICE_D << "postCopyAction() c:" << c->getURL() << endl; + // if( m_YoutubeUpload ) + // { + // getWebServicesUpload()->streamingUploadComplete(); + // } + } + + + fh_iostream + priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + fh_WebServicesUpload u = getWebServicesUpload(); + + string filename = m_filename; + string title = m_title; + string desc = m_desc; + string keywords = m_keywords; + + LG_WEBSERVICE_D << "priv_getIOStream() fn:" << filename + << " title:" << title << " desc:" << desc << endl; + if( filename.empty() ) + filename = this->getDirName(); + if( title.empty() ) + title = filename; + if( desc.empty() ) + desc = title; + + int ContentLength = 200; + if( m_ContentLength ) + ContentLength = m_ContentLength; + + u->setFilename( filename ); + u->setTitle( title ); + u->setDescription( desc ); + u->setKeywords( keywords ); + u->setLength( ContentLength ); + + string ContentType = filenameToContextType( filename ); + if( !m_ContentType.empty() ) + ContentType = m_ContentType; + + LG_WEBSERVICE_D << " ContentType:" << ContentType << endl; + LG_WEBSERVICE_D << "ContentLength:" << ContentLength << endl; + + fh_iostream ret = u->createStreamingUpload( ContentType ); + ret->getCloseSig().connect( bind( sigc::mem_fun(*this, &_Self::OnStreamClosed ), m )); + return ret; + } + + fh_istream + priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + fh_stringstream ret; + return ret; + } + + virtual void priv_FillCreateSubContextSchemaParts( Context::CreateSubContextSchemaPart_t& m ) + { + LG_WEBSERVICE_D << "upload file. setting file creation schema" << endl; + + m["ea"] = Context::SubContextCreator( + SL_SubCreate_ea, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + }; + + template < class ChildContextClass, class UploadFileContextClass, class ParentContextClass = FakeInternalContext > + class FERRISEXP_API WebServicesUploadDirectoryContext + : + public ParentContextClass + { + typedef ParentContextClass _Base; + typedef WebServicesUploadDirectoryContext< ChildContextClass, ParentContextClass > _Self; + + public: + + WebServicesUploadDirectoryContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + } + + bool isDir() + { + return true; + } + + void createStateLessAttributes( bool force = false ) + { + if( force || this->isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + this->supplementStateLessAttributes( true ); + } + } + + + + virtual fh_context SubCreate_file( fh_context c, fh_context md ) + { + string rdn = getStrSubCtx( md, "name", "" ); + string v = ""; + LG_WEBSERVICE_D << "SubCreate_file() rdn:" << rdn << " v:" << v << endl; + + if( WebServicesUploadDirectoryContext* cc = dynamic_cast(GetImpl(c))) + { + UploadFileContextClass* c = 0; + c = priv_ensureSubContext( rdn, c ); + return c; + } + std::stringstream ss; + ss << "Attempt to create a subobject on a context that is not an webservices one!" + << " url:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), GetImpl(c) ); + } + + void priv_FillCreateSubContextSchemaParts( Context::CreateSubContextSchemaPart_t& m ) + { + LG_WEBSERVICE_D << "priv_FillCreateSubContextSchemaParts()" << endl; + m["file"] = Context::SubContextCreator( ::Ferris::SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + void priv_read() + { + LG_WEBSERVICE_D << "priv_read() url:" << this->getURL() + << " have read:" << this->getHaveReadDir() + << endl; + Context::EnsureStartStopReadingIsFiredRAII _raii1( this ); + Context::emitExistsEventForEachItemRAII _raii2( this ); + } + }; + +}; +#endif diff --git a/Ferris/FerrisXalan.cpp b/Ferris/FerrisXalan.cpp new file mode 100644 index 0000000..00210bc --- /dev/null +++ b/Ferris/FerrisXalan.cpp @@ -0,0 +1,71 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisXalan.cpp,v 1.2 2010/09/24 21:30:45 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace XALAN_CPP_NAMESPACE; + +namespace Ferris +{ + XalanDOMString domstr( const std::string& s ) + { + return XalanDOMString( s.c_str() ); + } + + std::string tostr( const XalanDOMString& ds ) + { +#if XALAN_VERSION_MAJOR == 1 & XALAN_VERSION_MINOR == 8 + XalanDOMString::CharVectorType v = ds.transcode(); + std::string ret( v.begin(), v.end()-1 ); +#else + XalanDOMString::CharVectorType v; + ds.transcode( v ); + std::string ret( v.begin(), v.end()-1 ); +#endif + +// if( !ret.empty() && ret[ ret.length() ] == '\0' ) +// ret = ret.substr( 0, ret.length()-1 ); + return ret; + } + + + static XalanDOMString sstr( const std::string& s ) + { + return XalanDOMString( s.c_str() ); + } + +}; diff --git a/Ferris/FerrisXalan_private.hh b/Ferris/FerrisXalan_private.hh new file mode 100644 index 0000000..5e67044 --- /dev/null +++ b/Ferris/FerrisXalan_private.hh @@ -0,0 +1,48 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisXalan_private.hh,v 1.2 2010/09/24 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_XALANC_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_XALANC_PRIV_H_ + +#include "config.h" +#ifdef HAVE_XALAN + +#include + +#include + +namespace Ferris +{ + using namespace XALAN_CPP_NAMESPACE; + + FERRISEXP_API XalanDOMString domstr( const std::string& s ); + FERRISEXP_API std::string tostr( const XalanDOMString& ds ); +}; +#endif +#endif diff --git a/Ferris/Ferris_private.hh b/Ferris/Ferris_private.hh new file mode 100644 index 0000000..3ca4a35 --- /dev/null +++ b/Ferris/Ferris_private.hh @@ -0,0 +1,169 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferris_private.hh,v 1.10 2010/09/24 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_PRIV_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Ferris +{ + + extern const std::string FERRIS_CONFIG_APPS_DIR; + extern const std::string FERRIS_CONFIG_EVENT_DIR; + extern const std::string FERRIS_CONFIG_MIMEBIND_DIR; + extern const std::string EANAME_SL_EMBLEM_PREKEY; // "emblem:has-"; + extern const std::string EANAME_SL_EMBLEM_ID_PREKEY; // "emblem:has-"; + extern const std::string EANAME_SL_EMBLEM_TIME_PREKEY; // = "emblem:"; + extern const std::string EANAME_SL_EMBLEM_FUZZY_PREKEY;// = "emblem:has-fuzzy-"; + + FERRISEXP_API std::string + adjustRecommendedEAForDotFiles( Context* c, const std::string& s ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL items_lookup_compare + { + inline bool operator()( fh_context s1, fh_context s2 ) const + { + return s1->getDirName() < s2->getDirName(); + } + inline bool operator()( fh_context s1, const std::string s2 ) const + { + return s1->getDirName() < s2; + } + inline bool operator()( const std::string s1, fh_context s2 ) const + { + return s1 < s2->getDirName(); + } + }; + + FERRISEXP_DLLLOCAL void SL_FlushAggregateData( Context* c, + const std::string& rdn, EA_Atom* atom, + fh_istream ss ); + FERRISEXP_API fh_display_aggdata getCachedContextAggregateData( fh_context c, int m ); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + + /** + * Dumps debug data about all the known contexts and reference counts to ss + */ + FERRISEXP_API void dumpEntireContextListMemoryManagementData( fh_ostream ss ); + + typedef std::map< Context*, int > debug_mm_contexts_t; + FERRISEXP_API debug_mm_contexts_t& getMMCtx(); + FERRISEXP_API void addContextToMemoryManagementData( Context* c ); + FERRISEXP_API void remContextToMemoryManagementData( Context* c ); + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + + FERRISEXP_API fh_context SL_SubCreate_file( fh_context c, fh_context md ); + + + namespace Main + { + /** + * Check FDs that are registered with ferris for VFS modules and + * process data on them. This is used for example by ContextIterator + * to clear any queues of 'changes' to a VFS module before a iteration + * operation. + */ + FERRISEXP_API void processAllPending_VFSFD_Events(); + }; + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + /** + * Strip off tailstr from AttrName for an attribute in the context 'c'. + */ + FERRISEXP_API std::string + getBaseEAName( std::string tailstr, Context* c, const std::string& attrName ); + + + class FerrisInternal + { + public: + static void reparentSelectionContext( Context* parent, fh_context NewChildToAdopt, const std::string& rdn ); + }; + + + /* + * Keeps a collection of every context that exists for debugging memory handle + * ref counts. + */ +#define DEBUG_CONTEXT_MEMORY_MANAGEMENT 1 + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + namespace ImplementationDetail + { + /** + * get the --proxy foo:12 string if the user has a proxy configured. + */ + FERRISEXP_API std::string getCURLProxyCommandLineOption(); + }; + + FERRISEXP_DLLLOCAL bool isInheritingContext( Context* c ); + + FERRISEXP_API void ensureEAIndexPluginFactoriesAreLoaded(); + FERRISEXP_API void ensureFulltextIndexPluginFactoriesAreLoaded(); + + FERRISEXP_API bool setForceOutOfProcessMetadataOff( bool v ); + +}; + + +#endif // ifndef _ALREADY_INCLUDED_FERRIS_PRIV_H_ diff --git a/Ferris/Ferrisls.cpp b/Ferris/Ferrisls.cpp new file mode 100644 index 0000000..a99d84d --- /dev/null +++ b/Ferris/Ferrisls.cpp @@ -0,0 +1,2168 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferrisls client helper code. + + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls.cpp,v 1.22 2010/09/24 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "Trimming.hh" +#include "ValueRestorer.hh" +#include + +using namespace std; + + +namespace Ferris +{ + + + StringQuote::StringQuote( QuoteStyle v ) + : + style(LITERAL_QUOTING), + backslash_escapes(false), + quote_string("") + { + setStyle( v ); + } + + + + void + StringQuote::setStyle( QuoteStyle v ) + { + style = v; + + acceptable_chars.clear(); + backslash_escapes = false; + quote_string = ""; + + /***************************************/ + acceptable_chars.insert('~'); + + changelist_shell.push_back( make_pair( "??!", "?\?!" )); + changelist_shell.push_back( make_pair( "??'", "?\?'" )); + changelist_shell.push_back( make_pair( "??(", "?\?(" )); + changelist_shell.push_back( make_pair( "??)", "?\?)" )); + changelist_shell.push_back( make_pair( "??-", "?\?-" )); + changelist_shell.push_back( make_pair( "??/", "?\?/" )); + changelist_shell.push_back( make_pair( "??<", "?\?<" )); + changelist_shell.push_back( make_pair( "??=", "?\?=" )); + changelist_shell.push_back( make_pair( "??>", "?\?>" )); + + changelist_dollar_shell.push_back( make_pair( "#", "#" )); + changelist_dollar_shell.push_back( make_pair( "~", "~" )); + + changelist_shell.push_back( make_pair( " ", " " )); + changelist_shell.push_back( make_pair( "!", "!" )); + changelist_shell.push_back( make_pair( "\"", "\"" )); + changelist_shell.push_back( make_pair( "$", "$" )); + changelist_shell.push_back( make_pair( "&", "&" )); + changelist_shell.push_back( make_pair( "(", "(" )); + changelist_shell.push_back( make_pair( ")", ")" )); + changelist_shell.push_back( make_pair( "*", "*" )); + changelist_shell.push_back( make_pair( ";", ";" )); + changelist_shell.push_back( make_pair( "<", "<" )); + changelist_shell.push_back( make_pair( ">", ">" )); + changelist_shell.push_back( make_pair( "[", "[" )); + changelist_shell.push_back( make_pair( "^", "^" )); + changelist_shell.push_back( make_pair( "`", "`" )); + changelist_shell.push_back( make_pair( "|", "|" )); + changelist_shell.push_back( make_pair( "`", "`" )); + + changelist_dollar_shell.push_back( make_pair( "'", "'\\''" )); + /***************************************/ + /***************************************/ + + + switch( style ) + { + case LITERAL_QUOTING: + break; + case C_QUOTING: + backslash_escapes = true; + quote_string = "\""; + break; + + case SHELL_ALWAYS_QUOTING: + initShellQuoteString(); + /* Fall */ + case SHELL_QUOTING: + + changelist_shell.push_back( make_pair( "\'", "\'\\\'\'" )); + changelist_shell.push_back( make_pair( "\\/", "/" )); + + break; + + case ESCAPE_QUOTING: + backslash_escapes = true; + break; + +// case LOCALE_QUOTING: +// break; +// case CLOCALE_QUOTING: +// break; + } + + if( style == C_QUOTING || style == ESCAPE_QUOTING ) + { + changelist.push_back( make_pair( "\a", "\\a" )); + changelist.push_back( make_pair( "\b", "\\b" )); + changelist.push_back( make_pair( "\f", "\\f" )); + changelist.push_back( make_pair( "\v", "\\v" )); + + changelist_shell.push_back( make_pair( "\n", "\\n" )); + changelist_shell.push_back( make_pair( "\r", "\\r" )); + changelist_shell.push_back( make_pair( "\t", "\\t" )); + changelist_shell.push_back( make_pair( "\\", "\\\\" )); + } + + + acceptable_chars.insert('%'); + acceptable_chars.insert('+'); + acceptable_chars.insert(','); + acceptable_chars.insert('-'); + acceptable_chars.insert('.'); + acceptable_chars.insert('/'); + acceptable_chars.insert('0'); + acceptable_chars.insert('1'); + acceptable_chars.insert('2'); + acceptable_chars.insert('3'); + acceptable_chars.insert('4'); + acceptable_chars.insert('5'); + acceptable_chars.insert('6'); + acceptable_chars.insert('7'); + acceptable_chars.insert('8'); + acceptable_chars.insert('9'); + acceptable_chars.insert(':'); + acceptable_chars.insert('='); + acceptable_chars.insert('A'); + acceptable_chars.insert('B'); + acceptable_chars.insert('C'); + acceptable_chars.insert('D'); + acceptable_chars.insert('E'); + acceptable_chars.insert('F'); + acceptable_chars.insert('G'); + acceptable_chars.insert('H'); + acceptable_chars.insert('I'); + acceptable_chars.insert('J'); + acceptable_chars.insert('K'); + acceptable_chars.insert('L'); + acceptable_chars.insert('M'); + acceptable_chars.insert('N'); + acceptable_chars.insert('O'); + acceptable_chars.insert('P'); + acceptable_chars.insert('Q'); + acceptable_chars.insert('R'); + acceptable_chars.insert('S'); + acceptable_chars.insert('T'); + acceptable_chars.insert('U'); + acceptable_chars.insert('V'); + acceptable_chars.insert('W'); + acceptable_chars.insert('X'); + acceptable_chars.insert('Y'); + acceptable_chars.insert('Z'); + acceptable_chars.insert(']'); + acceptable_chars.insert('_'); + acceptable_chars.insert('a'); + acceptable_chars.insert('b'); + acceptable_chars.insert('c'); + acceptable_chars.insert('d'); + acceptable_chars.insert('e'); + acceptable_chars.insert('f'); + acceptable_chars.insert('g'); + acceptable_chars.insert('h'); + acceptable_chars.insert('i'); + acceptable_chars.insert('j'); + acceptable_chars.insert('k'); + acceptable_chars.insert('l'); + acceptable_chars.insert('m'); + acceptable_chars.insert('n'); + acceptable_chars.insert('o'); + acceptable_chars.insert('p'); + acceptable_chars.insert('q'); + acceptable_chars.insert('r'); + acceptable_chars.insert('s'); + acceptable_chars.insert('t'); + acceptable_chars.insert('u'); + acceptable_chars.insert('v'); + acceptable_chars.insert('w'); + acceptable_chars.insert('x'); + acceptable_chars.insert('y'); + acceptable_chars.insert('z'); + acceptable_chars.insert('{'); + acceptable_chars.insert('}'); + } + + + string + StringQuote::quote( const string& s, const string& q ) + { + if( !q.length() ) + { + return s; + } + string ret = q; + ret += s; + ret += q; + return ret; + } + + void + StringQuote::ShellMustBeQuoting() + { + if( style == SHELL_QUOTING ) + initShellQuoteString(); + } + + void + StringQuote::initShellQuoteString() + { + backslash_escapes = true; + quote_string = "'"; + } + + bool + StringQuote::performSubSt( const changelist_t& cl, const string& s, int& i, string& ret ) + { + bool performedSubSt = false; + + /* + * Do straight string -> string substitutions. + */ + for( changelist_t::const_iterator iter = cl.begin(); iter != cl.end(); ++iter ) + { + const string& fi = iter->first; + const string& se = iter->second; + + if( s.substr(i, fi.length()) == fi ) + { + i += fi.length(); + ret += se; + performedSubSt = true; + break; + } + } + return performedSubSt; + } + + string + StringQuote::operator()( const string& s ) + { + if( style == NO_QUOTING ) + { + return s; + } +// cerr << endl << "StringQuoter:" << s << endl; +// cerr << "quote_string:" << quote_string << endl; +// cerr << "backslash_escapes:" << backslash_escapes << endl; +// cerr << "style:" << style << endl; + string ret=""; + + if( style == SHELL_QUOTING ) + { + backslash_escapes = false; + quote_string = ""; + } + + for( int i=0; i < s.length(); ) + { + string::iterator iter; + + if( false ) + { + } + /* + * Must be sure to test for start of line chars first for ~ shell + */ + else if(!i && performSubSt( changelist_dollar, s, i, ret )) + { + } + else if(!i && performSubSt( changelist_dollar_shell, s, i, ret )) + { + ShellMustBeQuoting(); + } + /* + * Take care of characters that are always ok first. (speed) + */ + else if( acceptable_chars.find(s[i]) != acceptable_chars.end() ) + { + ret += s[i]; + ++i; + continue; + } + else if ( backslash_escapes && quote_string.length() + && s.substr( i, quote_string.length() ) == quote_string + ) + { + ret += "\\"; + ret += quote_string; + i += quote_string.length(); + continue; + } + else if(performSubSt( changelist, s, i, ret )) + { + } + else if(performSubSt( changelist_shell, s, i, ret )) + { + ShellMustBeQuoting(); + } + else + { + /* There is a nasty character here */ +// cerr << "nasty char!\n"; + ShellMustBeQuoting(); + + if( style == SHELL_QUOTING || style == SHELL_ALWAYS_QUOTING ) + { + char ch = s[i]; + + /* + * Most stuff is OK in shell mode, with the exception of the single + * quote nested inside a single quoted string! For this case we + * must close the single quote, have an escaped single quote and then + * reenter single quote mode. + */ +// if( ch == '\'' ) +// { +// ret += "\'\\\'\'"; +// } + if( ch == '\0' || ( ch >= '\a' && ch <= '\r' )) + { + ret += '?'; + } + else + { + ret += ch; + } + } + else if( style == C_QUOTING || style == ESCAPE_QUOTING ) + { + int radix = 8; + stringstream ss; + ss << "\\" << setw(2) << setbase(radix) << setfill('0') << (int)s[i]; + ret += tostr(ss); + } + else + { + ret += "?"; + } + ++i; + } + + } // for string traverse. + + return(quote(ret, quote_string)); + } + + string + StringQuote::getStringOptionName() + { + switch( style ) + { + case NO_QUOTING: return "none"; + case LITERAL_QUOTING: return "literal"; + case C_QUOTING: return "c"; + case SHELL_QUOTING: return "shell"; + case SHELL_ALWAYS_QUOTING: return "shell-always"; + case ESCAPE_QUOTING: return "escape"; + } + return ""; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + string + Ferrisls_display::ClassifyIfNeeded( const fh_context& ctx, + const string& attrName, + string s ) + { + if( ClassifyFileNameStyle != CLASSIFY_NONE && attrName == "name" ) + { + string fft = getStrAttr( ctx, "filesystem-filetype", "" ); + + if( fft == "directory" + && ClassifyFileNameStyle & CLASSIFY_DIR ) + { + s+="/"; + } + else if( fft == "symbolic link" + && ClassifyFileNameStyle & CLASSIFY_SYMLINK ) + { + s+="@"; + } + else if( fft == "socket" + && ClassifyFileNameStyle & CLASSIFY_SOCKET ) + { + s+="="; + } + else if( fft == "fifo" + && ClassifyFileNameStyle & CLASSIFY_FIFO ) + { + s+="|"; + } + else if( fft == "fifo" + && ClassifyFileNameStyle & CLASSIFY_FIFO ) + { + s+="|"; + } + else if( ClassifyFileNameStyle & CLASSIFY_EXE ) + { + if( getStrAttr( ctx, "runable", "0" ) == "1" ) + { + s+= "*"; + } + + } + } + return s; + } + + string + Ferrisls_display::QuoteIfNeeded( const fh_context& ctx, + const string& attrName, + const string& s ) + { + if( attrName == "name" ) + { + return Quoter(s); + } + return s; + } + + string + Ferrisls_display::DecorateIfNeeded( const fh_context& ctx, + const string& attrName, + string s ) + { + s = ClassifyIfNeeded( ctx, attrName, s ); + s = QuoteIfNeeded ( ctx, attrName, s ); + + return s; + } + + + Ferrisls_display::Ferrisls_display() + : + FieldSeperator(","), + RecordSeperator("\n"), + EnteredMonitoringLoop(false), + MonitorCreate(false), + MonitorDelete(false), + MonitorChanged(false), + ShowHeadings(true), + ShowContextNameInHeading(false), + NoSuchAttributeIndicator(" "), + FillChar(' '), + ClassifyFileNameStyle( CLASSIFY_NONE ), + Quoter( StringQuote::NO_QUOTING ), + ShowEAErorrs( false ) + { + } + + Ferrisls_display::~Ferrisls_display() + { + DetachAllSignals( true ); + } + + void + Ferrisls_display::DetachAllSignals( bool force ) + { + typedef std::map< fh_context, SignalCollection > SigCol_t; + + for( SigCol_t::iterator iter = SigCol.begin(); iter != SigCol.end(); ++iter ) + { + fh_context c = iter->first; + SignalCollection& sc = iter->second; + + sc.ExistsConnection.disconnect(); + if( force && MonitorCreate ) + { + sc.CreatedConnection.disconnect(); + } + if( force && MonitorChanged ) + { +// cerr << "disconnecting changed handler. url:" << c->getURL() << endl; + sc.ChangedConnection.disconnect(); + } + if( force && MonitorDelete ) + { + sc.DeletedConnection.disconnect(); + } + } + SigCol.clear(); + } + + + + + void + Ferrisls_display::workComplete() + { + if( Monitoring() ) + { + setEnteredMonitoringLoop(true); + Main::mainLoop(); + } + } + + void + Ferrisls_display::workStarting() + { + } + + void + Ferrisls_display::PrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA ) + { + cout << setfill(FillChar) << EA << FieldSeperator; + } + + + void + Ferrisls_display::setShowEAErrors( bool v ) + { + ShowEAErorrs = v; + } + + void + Ferrisls_display::PresentNamedAttribute( fh_context ctx, int i, const string& attr ) + { + try + { +// cerr << "PresentNamedAttribute() ctx:" << ctx->getURL() +// << " rdn:" << attr +// << " v:" << getStrAttr( ctx, attr, "" ) +// << endl; +// cerr << "PresentNamedAttribute() ctx:" << ctx->getURL() +// << " i:" << i +// << " is-bound:" << ctx->isAttributeBound( attr ) +// << " attr:" << attr +// << endl; + + if( !ctx->isAttributeBound( attr ) ) + { + PrintEA( ctx, i, attr, NoSuchAttributeIndicator ); + return; + } + +// fh_attribute att = ctx->getAttribute( attr ); +// fh_istream ios = att->getIStream(); +// string s=""; +// getline( ios, s ); + string s = getStrAttr( ctx, attr, "", false, true ); +// cerr << "s:" << s << endl; + + s = DecorateIfNeeded( ctx, attr, s ); + + PrintEA( ctx, i, attr, s ); + } + catch( NoSuchAttribute& e ) + { + LG_ATTR_D << "ferrisls NSA attr:" << attr << " e:" << e.what() << endl; + PrintEA( ctx, i, attr, NoSuchAttributeIndicator ); + } + catch( exception& e ) + { + LG_ATTR_D << "ferrisls general attr:" << attr << " e:" << e.what() << endl; + fh_stringstream ss; + if( ShowEAErorrs ) + { + ss << ""; + } + PrintEA( ctx, i, attr, tostr(ss) ); + } + catch( ... ) + { + PrintEA( ctx, i, attr, "failed-to-read" ); + } + } + + + void + Ferrisls_display::ShowAttributes( fh_context ctx ) + { +// cerr << "Ferrisls_display::ShowAttributes ctx:" << ctx->getURL() << endl; +// cerr << " name:" << getStrAttr( ctx, "name", "none" ) << endl; + PresentNamedAttribute( ctx, 0, "name" ); + cout << RecordSeperator << flush; + } + + bool + Ferrisls_display::ShouldEnterContext(fh_context ctx) + { + return true; + } + + void + Ferrisls_display::EnteringContext(fh_context ctx) + { + } + + void + Ferrisls_display::LeavingContext(fh_context ctx) + { + } + + void + Ferrisls_display::setShowContextNameInHeading( gboolean v ) + { + ShowContextNameInHeading = v; + } + + void + Ferrisls_display::setNameClassification( int v ) + { + ClassifyFileNameStyle = v; + } + + int + Ferrisls_display::getNameClassification() + { + return ClassifyFileNameStyle; + } + + void + Ferrisls_display::setNoSuchAttributeIndicator( const string& s ) + { + NoSuchAttributeIndicator = s; + } + + void + Ferrisls_display::setShowHeadings( gboolean v ) + { + ShowHeadings = v; + } + + void + Ferrisls_display::setFillChar( char c ) + { + FillChar = c; + } + + void + Ferrisls_display::setQuoteStyle( StringQuote::QuoteStyle v ) + { + Quoter.setStyle( v ); + } + + void + Ferrisls_display::setEnteredMonitoringLoop( bool v ) + { + EnteredMonitoringLoop = v; + } + + void + Ferrisls_display::setFieldSeperator( const string& c ) + { + FieldSeperator = c; + } + + void + Ferrisls_display::setRecordSeperator( const string& c ) + { +// cerr << "setRecordSeperator() c:" << c << endl; + RecordSeperator = c; + } + + + void + Ferrisls_display::setMonitorCreate( gboolean v ) + { + MonitorCreate = v; + } + + bool + Ferrisls_display::getMonitorCreate() + { + return MonitorCreate; + } + + + + void + Ferrisls_display::setMonitorDelete( gboolean v ) + { + MonitorDelete = v; + } + + void + Ferrisls_display::setMonitorChanged( gboolean v ) + { + MonitorChanged = v; + } + + bool + Ferrisls_display::Monitoring() + { + return MonitorCreate | MonitorDelete | MonitorChanged; + } + + + void + Ferrisls_display::AttachSignals( fh_context c ) + { + typedef Ferrisls_display _Self; + + SigCol[c].ExistsConnection + = c->getNamingEvent_Exists_Sig() .connect(sigc::mem_fun( *this, &_Self::OnExists )); + +// cerr << "Ferrisls_display::AttachSignals() MonitorCreate:" << MonitorCreate +// << " this:" << (void*)this +// << " c:" << c->getDirPath() +// << endl; + + if( MonitorCreate ) + { + SigCol[c].CreatedConnection + = c->getNamingEvent_Created_Sig().connect(sigc::mem_fun( *this, &_Self::OnCreated )); + } + if( MonitorDelete ) + { + SigCol[c].DeletedConnection + = c->getNamingEvent_Deleted_Sig().connect(sigc::mem_fun( *this, &_Self::OnDeleted )); + } + if( MonitorChanged ) + { +// cerr << "Connecting changed handler. url:" << c->getURL() << endl; + SigCol[c].ChangedConnection + = c->getNamingEvent_Changed_Sig().connect(sigc::mem_fun( *this, &_Self::OnChanged )); + } + } + + void + Ferrisls_display::DetachSignals( fh_context c ) + { + if( SigCol.find(c) != SigCol.end() ) + { + SigCol[c].ExistsConnection.disconnect(); +// if( MonitorCreate ) +// { +// SigCol[c].CreatedConnection.disconnect(); +// } +// if( MonitorChanged ) +// { +// SigCol[c].ChangedConnection.disconnect(); +// } +// if( MonitorDelete ) +// { +// SigCol[c].DeletedConnection.disconnect(); +// } + } + } + + + + void + Ferrisls_display::OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { + LG_CTXREC_D << "Ferrisls_display::OnExists() " << endl; + LG_CTXREC_D << "Ferrisls_display::OnExists() olddn:" << olddn << endl; + LG_CTXREC_D << "Ferrisls_display::OnExists() newdn:" << newdn << endl; + LG_CTXREC_D << "Ferrisls_display::OnExists() subc:" << toVoid(subc) << endl; + LG_CTXREC_D << "Ferrisls_display::OnExists() subc.url:" << subc->getURL() << endl; + + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + +// cerr << "Ferrisls_display::OnExists() c:" << toVoid(c) +// << " c.url:" << c->getURL() +// << " subc:" << toVoid( subc ) +// << " subc.url:" << subc->getURL() +// << " getAttr( subc, url ):" << getStrAttr( subc, "url", "none" ) +// << endl; + + if( EnteredMonitoringLoop ) + { + cout << "Discovered" << FieldSeperator; +// cout << "earl:" << subc->getURL() << endl; + } + ShowAttributes( subc ); + AttachSignals( subc ); + } + + void + Ferrisls_display::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + string olddn, string newdn ) + { + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + + cout << "Created" << FieldSeperator; + + ShowAttributes( subc ); + AttachSignals( subc ); +// cerr << "Ferrisls_display::OnCreated(exit) " << endl; + } + + void + Ferrisls_display::OnChanged( NamingEvent_Changed* ev, string olddn, string newdn ) + { +// cout << "--------OnChanged( enter ) -----------------------------" << endl; +// cerr << "OnChanged() old:" << olddn << endl; +// cerr << "OnChanged() new:" << newdn << endl; + + fh_context c = ev->getSource(); +// cout << "Path:" << c->getDirPath() << " c:" << (void*)c << endl; + cout << "Changed c:" << toVoid(c) << " " << FieldSeperator; + ShowAttributes( c ); +// cout << "--------OnChanged( exit ) -----------------------------" << endl; + } + + void Ferrisls_display::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + cout << "Deleted" << FieldSeperator << olddn << RecordSeperator; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + void + Ferrisls_long_display::StreamPrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA, + ostream* ss ) + { + +// if( HaveColumnWidths ) +// { +// (*ss) << setw(ColumnWidths[i]) +// << setfill(FillChar) +// << justificationC( ctx, attr ) +// << EA; +// } +// else +// { +// (*ss) << widthC( ctx, attr ) +// << setfill(FillChar) +// << justificationC( ctx, attr ) +// << EA; +// } +// (*ss) << FieldSeperator; + + + + fh_context sc = 0; + try + { + fh_context sc = ctx->getSchema( attr ); + } + catch( ... ) {} + +// cerr << "m_outputPrecision:" << m_outputPrecision << endl; + + if( m_outputPrecision ) + (*ss).precision( m_outputPrecision ); + +// { +// double v = 66.123456789; +// (*ss) << v << endl; +// } + + if( HaveColumnWidths ) + { + (*ss) << setw(ColumnWidths[i]) << setfill(FillChar) << justification(sc) << EA; + } + else + { +// cerr << "HaveColumnWidths:" << HaveColumnWidths << " sc:" << isBound(sc) << " attr:" << attr << endl; + + if( sc ) + { + (*ss) << width(sc) << setfill(FillChar) << justification(sc) << EA; + } + else + { + (*ss) << setfill(FillChar) << justification(sc) << EA; + } + } + (*ss) << FieldSeperator; + } + + + Ferrisls_long_display::Ferrisls_long_display() + : + HaveColumnWidths( false ), + ShowAllAttributes( false ), + HumanReadableSizes( false ), + m_hideXMLDecl( false ), + m_outputPrecision( 0 ) + { + } + + + + + void + Ferrisls_long_display::PrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA ) + { + StreamPrintEA( ctx, i, attr, EA, &cout ); + } + + + void + Ferrisls_long_display::ShowAttributes( fh_context ctx ) + { + int i=0; +// cerr << "Ferrisls_long_display::ShowAttributes ctx:" << ctx->getURL() << endl; + + stringset_t alreadyDone; + + for( Columns_t::iterator iter = Columns.begin(); + iter != Columns.end(); iter++, i++ ) + { + if( "recommended-ea" == *iter ) + { + string recEA = getStrAttr( ctx, *iter, "" ); + fh_stringstream ss( recEA ); + string s; + while( getline( ss, s, ',' ) ) + { + if( s.empty() ) + continue; + + s = modifyForHumanReadableSizes( s ); + PresentNamedAttribute( ctx, i++, s ); + alreadyDone.insert( s ); + } + } + else + { +// cerr << "Ferrisls_long_display::ShowAttributes a:" << *iter << endl; + PresentNamedAttribute( ctx, i, *iter ); + alreadyDone.insert( *iter ); + } + } + + if( fh_rex r = m_showColumnRegex.getRegex() ) + { + typedef AttributeCollection::AttributeNames_t ant; + ant an; + ctx->getAttributeNames( an ); + + for( ant::iterator anit = an.begin(); anit!=an.end(); ++anit ) + { + string eaname = *anit; + if( regex_match( eaname, r, boost::match_any ) ) + { + PresentNamedAttribute( ctx, i++, eaname ); + } + } + } + + cout << RecordSeperator; + } + + void + Ferrisls_long_display::EnteringContext(fh_context ctx) + { + if( ShowContextNameInHeading ) + { + cout << "Entering Context:" << ctx->getDirPath() +// << " size:" << ctx->SubContextCount() + << endl; + } + + if( ShowAllAttributes ) + { + set z; + + + Context::SubContextNames_t ls = ctx->getSubContextNames(); + for( Context::SubContextNames_t::iterator iter = ls.begin(); + iter != ls.end(); iter++ ) + { + fh_context subc = ctx->getSubContext( *iter ); + Context::AttributeNames_t an; + subc->getAttributeNames( an ); + + for( Context::AttributeNames_t::iterator iter = an.begin(); + iter != an.end(); iter++ ) + { + z.insert( *iter ); + } + } + + Columns.clear(); + copy( z.begin(), z.end(), back_inserter(Columns)); + } + +// cerr << "Ferrisls_long_display::EnteringContext() ShowHeadings:" << ShowHeadings << endl; + + if( ShowHeadings ) + { + int i=0; + + for( Columns_t::iterator iter = Columns.begin(); + iter != Columns.end(); iter++, i++ ) + { + if( "recommended-ea" == *iter ) + { + string recEA = getStrAttr( ctx, *iter, "" ); + fh_stringstream ss( recEA ); + string s; + while( getline( ss, s, ',' ) ) + { + s = modifyForHumanReadableSizes( s ); + PrintEA( ctx, i++, s, s ); + } + } + else + { + PrintEA( ctx, i, *iter, *iter ); + } + } + + cout << RecordSeperator; + } + } + + void + Ferrisls_long_display::setShowAllAttributes( gboolean v ) + { + ShowAllAttributes = v; + } + + void + Ferrisls_long_display::setColumns( const string& c ) + { + istringstream iss( c ); + string x; + while(getline( iss, x, ',' )) + { + Columns.push_back( x ); + } + } + + void + Ferrisls_long_display::appendShowColumnsRegex( const std::string& c ) + { + m_showColumnRegex.append( c ); + } + + + int + Ferrisls_long_display::setColumnWidths( const string& c ) + { + istringstream iss( c ); + int x; + char comma; + + while( iss >> x ) + { + ColumnWidths.push_back( x ); +// cerr << "Adding x:" << x << endl; + iss >> comma; + if( comma != ',' ) + return 0; + } + HaveColumnWidths = 1; + return 1; + } + + string + Ferrisls_long_display::modifyForHumanReadableSizes( const std::string& s ) + { + if( s == "size" ) + { + return "size-human-readable"; + } + return s; + } + + void + Ferrisls_long_display::setHumanReadableSizes( bool v ) + { + HumanReadableSizes = v; + } + + void + Ferrisls_long_display::setHideXMLDeclaration( bool v ) + { + m_hideXMLDecl = v; + } + + void + Ferrisls_long_display::setOutputPrecision( int v ) + { + m_outputPrecision = v; + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + void + Ferrisls_dired_display::PrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA ) + { + stringstream ss; + ostream* oss = &ss; + StreamPrintEA( ctx, i, attr, EA, oss ); + string s = tostr(ss); + int len = s.length(); + + if( attr == "name" ) + { + Coords.push_back( make_pair(runningOffset, runningOffset+len) ); + } + + cout << s; + runningOffset += len; + } + + void + Ferrisls_dired_display::workComplete() + { + cout << "//DIRED//"; + + for( Coords_t::iterator iter = Coords.begin(); + iter != Coords.end(); ++iter ) + { + cout << " " << iter->first << " " << iter->second; + } + cout << nl; + + cout << "//DIRED-OPTIONS// --quoting-style=" + << Quoter.getStringOptionName() + << endl; + + _Base::workComplete(); + } + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + void + Ferrisls_widthneeding_display::puts( const string& s ) + { + ConsolePosition += s.length(); + cout << s; + } + + void + Ferrisls_widthneeding_display::putnl() + { + cout << nl; + ConsolePosition = 0; + } + + + Ferrisls_widthneeding_display::Ferrisls_widthneeding_display() + : + ConsoleWidth(80), + ConsolePosition(0) + { + if( const gchar* p = g_getenv ("COLUMNS") ) + { + stringstream ss; + ss << p; + if(!(ss >> ConsoleWidth)) + { + cerr << "Ignoring bad COLUMNS environment variable" << endl; + ConsoleWidth = 80; + } + } + } + + void Ferrisls_widthneeding_display::setConsoleWidth( int v ) + { + ConsoleWidth = v; + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + Ferrisls_csv_display::Ferrisls_csv_display() + : + firstEntry(true) + { + } + + + + void + Ferrisls_csv_display::PrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA ) + { + if( firstEntry ) + { + EffectiveWidth = 0; + firstEntry = false; + puts(EA); + } + else + { + int NeededEndPos = ConsolePosition + + FieldSeperator.length() + EA.length(); + + if( NeededEndPos <= ConsoleWidth ) + { + puts(FieldSeperator); + puts(EA); + } + else + { + puts(","); + if( !EffectiveWidth ) + { + EffectiveWidth = ConsolePosition; + } + putnl(); + puts(EA); + } + } + } + + void Ferrisls_csv_display::workComplete() + { + putnl(); + _Base::workComplete(); + } + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + int + Ferrisls_nameCollector_display::GetColumnLeftMostCharPos( int idx ) + { + int ret = 0; + + for( int i=0; i < idx; ++i ) + { + ret += ColW[i]; + } + return ret; + } + + int + Ferrisls_nameCollector_display::GetColumnRightMostCharPos( int idx ) + { + return ColW[idx] + GetColumnLeftMostCharPos(idx); + } + + int + Ferrisls_nameCollector_display::GetColumnSize( int idx ) + { + return ColW[idx]; + } + + + void + Ferrisls_nameCollector_display::SetColumnSize( int idx, int v ) + { + ColW[idx] = v; + } + + + void + Ferrisls_nameCollector_display::initColW( int max ) + { + int i=0; + + MaxCol = max; + ColW.clear(); + for( i=0; i<=MaxCol; ++i ) + { + ColW.push_back( 0 ); + } + } + + int + Ferrisls_nameCollector_display::getMaxCol() + { + return MaxCol; + } + + + + Ferrisls_nameCollector_display::Ferrisls_nameCollector_display() + : + m_initialPrintComplete( false ) + { + } + + + void + Ferrisls_nameCollector_display::PrintEA( fh_context ctx, + int i, + const string& attr, + const string& EA ) + { +// cerr << "Ferrisls_nameCollector_display::PrintEA() ea:" << EA << endl; +// cerr << " m_initialPrintComplete:" << m_initialPrintComplete << endl; + if( m_initialPrintComplete ) + { + _Base::PrintEA( ctx, i, attr, EA ); + } + else + { + NameCollection.push_back( EA ); + } + } + + void + Ferrisls_nameCollector_display::workComplete() + { + m_initialPrintComplete = true; + /* Upcall */ + _Base::workComplete(); + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + void + Ferrisls_hv_display::Init() + { + int i = 0; + int max = ConsoleWidth; + int RunningLength = 0; + + /* + * Trim MaxCol based on the first line, this can be a large + * saving in terms of time. + */ + for( NameCollection_t::iterator iter = NameCollection.begin(); + iter != NameCollection.end(); ++iter, ++i ) + { + RunningLength+=iter->length(); + if( RunningLength > ConsoleWidth ) + { + max = i; + break; + } + } + initColW(max); + } + + void + Ferrisls_hv_display::workComplete() + { + int i; + + /* init */ + Init(); + +// cerr << "Ferrisls_hv_display::workComplete()" << endl; + /* Find the number of columns to use and their sizes */ + FindColumnSizes(); + + /* print output */ + PrintColumns(); + + /* Upcall */ + _Base::workComplete(); + } + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + void + Ferrisls_horiz_display::FindColumnSizes() + { + int SepLen = FieldSeperator.length(); + int fileNum = 0; + for( NameCollection_t::iterator iter = NameCollection.begin(); + iter != NameCollection.end(); + ) + { + int colidx = fileNum % getMaxCol(); + int curLen = iter->length()+SepLen; + + + /* + * Check if this column is to long + */ + if( GetColumnRightMostCharPos( colidx ) > ConsoleWidth ) + { + /* + * Trim column count to make this column one past the last one. + * not that colidx is % getMaxCol(), thus it is always in the range + * 0 - (getMaxCol()-1) inclusive. + */ + initColW( colidx ); + + /* + * Start again. + */ + iter = NameCollection.begin(); + fileNum = 0; + + continue; + } + + if( curLen > GetColumnSize( colidx ) ) + { +// cerr << "grow fileNum:" << fileNum +// << " colidx:" << colidx +// << " name:" << *iter +// << " lm:" << GetColumnLeftMostCharPos( colidx ) +// << " curLen:" << curLen +// << " CW:" << ConsoleWidth +// << endl; + + /* + * If we are making a column larger, then any of the + * columns from this one to getMaxCol()-1 may have become to large. + * so we must test all of them starting from this column + * that we are making larger. The reason that the test is + * outside the loop is to allow columns after this one to + * still be tested, as we are not resizing them but they + * may exceed the Console width due to a earlier column + * having been expanded. + */ + SetColumnSize( colidx, curLen ); + + // Check this columns length again // + continue; + } + ++iter; + ++fileNum; + } + } + + + void + Ferrisls_horiz_display::PrintColumns() + { + int fileNum=0; + for( NameCollection_t::iterator iter = NameCollection.begin(); + iter != NameCollection.end(); ++iter, ++fileNum ) + { + int i = fileNum % getMaxCol(); + + cout + << left + << setfill(FillChar) + << setw( GetColumnSize(i)- FieldSeperator.length() ) << *iter + << FieldSeperator; + + if( i == (getMaxCol()-1) ) + { + cout << nl; + } + } + + cout << nl; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +#include + + int + Ferrisls_vert_display::GetRowCount() + { + if( getMaxCol() <= 1 ) + return NameCollection.size(); + + double x = NameCollection.size(); + x = x / (getMaxCol()-1); + double c = ceil( x ); + return (int)c; + } + + bool Ferrisls_vert_display::checkfit() + { + int rows = GetRowCount(); + int r = 0; + int SepLen = FieldSeperator.length(); + +// cerr << "checkfit() maxcol:" << getMaxCol() << endl; +// cerr << "checkfit() rows:" << rows << endl; + + int NameCollection_size = NameCollection.size(); + + for( r=0; r < rows; ++r ) + { + int total = 0; + + for( int c=0; c < (getMaxCol()); ++c ) + { + NameCollection_t::iterator iter = NameCollection.begin(); + if( r + c*rows >= NameCollection_size ) + { + break; + } + advance( iter, r + c*rows ); + int curLen = iter->length()+SepLen; + + total += curLen; + + if( GetColumnSize( c ) < curLen ) + { + SetColumnSize(c, curLen ); + } + } + +// cerr << "row:" << r << " total:" << total << endl; + + if( total > ConsoleWidth ) + { + return false; + } + } + + return true; + } + + + + + void + Ferrisls_vert_display::FindColumnSizes() + { + int SepLen = FieldSeperator.length(); + int rows = GetRowCount(); + +// cerr << "FindColumnSizes() maxcol:" << getMaxCol() << endl; +// cerr << "FindColumnSizes() rows:" << rows << endl; + + /* + * Keep scaling it down until it fits. + */ + while( !checkfit() ) + { +// cerr << "FindColumnSizes() maxcol:" << getMaxCol() << endl; +// cerr << "FindColumnSizes() rows:" << rows << endl; + + initColW( getMaxCol() - 1 ); + } + if( getMaxCol() < 1 ) + initColW( 1 ); + } + + + void + Ferrisls_vert_display::PrintColumns() + { +// fh_context sc = ctx->getSchema( attr ); + int rows = GetRowCount(); + int r = 0; + +// cerr << "Ferrisls_vert_display::PrintColumns() rows:" << rows << endl; +// cerr << "Ferrisls_vert_display::PrintColumns() getMaxCol():" << getMaxCol() << endl; + + int NameCollection_size = NameCollection.size(); + + for( r=0; r < rows; ++r ) + { + for( int c=0; c < (getMaxCol()); ++c ) + { + NameCollection_t::iterator iter = NameCollection.begin(); +// cerr << "Ferrisls_vert_display::PrintColumns(iter) r:" << r +// << " c:" << c << " (r + c*rows):" << (r + c*rows) +// << " nc.sz:" << NameCollection.size() +// << endl; + + if( r + c*rows >= NameCollection_size ) + { + break; + } + + + advance( iter, r + c*rows ); + + cout << left // justification(sc) + << setfill(FillChar) + << setw( GetColumnSize(c)- FieldSeperator.length() ) + << *iter + << FieldSeperator; + } + cout << nl; + } + } + + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +Ferrisls::Ferrisls() + : + rctx(0), + ListDirectoryNodeOnly(0), + ForceReadRootDirectoryNodes(0), + ImplyListDirectoryNodeOnly( true ), + RecursiveList(0), + usingFilter(false), + HadErrors(false), + PreorderTraversal( false ), + DontFollowLinks( false ), + DontDecendIntoFiles( false ), + DontDescendRegexString(""), + DontDescendRegex(0) +{ +} + + void + Ferrisls::setDisplay( fh_lsdisplay v ) + { + Display = v; + } + + + void + Ferrisls::setFilterString( const string& v ) + { + usingFilter = true; + FilterString = v; + } + + void + Ferrisls::setSortString( const string& v ) + { + SortString = v; + } + + + + void + Ferrisls::setRecursiveList( gboolean x ) + { + RecursiveList = x; + } + + + void + Ferrisls::setListDirectoryNodeOnly( gboolean x ) + { + ListDirectoryNodeOnly = x; + } + + void + Ferrisls::setImplyListDirectoryNodeOnly( gboolean x ) + { + ImplyListDirectoryNodeOnly = x; + } + + void + Ferrisls::setForceReadRootDirectoryNodes( gboolean x ) + { + ForceReadRootDirectoryNodes = x; + } + + void + Ferrisls::setDontDescendRegex( const std::string& s ) + { + DontDescendRegexString = s; + DontDescendRegex = toregexh( s ); + } + + + +// void +// Ferrisls::setContextClass( const string& c ) throw( NoSuchContextClass ) +// { +// Factory.setContextClass( c ); +// } + +// void +// Ferrisls::setRoot( const string& c ) +// { +// Factory.AddInfo( RootContextFactory::ROOT, c ); +// } + + void + Ferrisls::setURL( const std::string& earl ) + { + theURL = earl; + } + + bool + Ferrisls::hadErrors() + { + return HadErrors; + } + + void + Ferrisls::hadErrors( bool v ) + { + HadErrors = v; + } + + void + Ferrisls::usePreorderTraversal( bool v ) + { + PreorderTraversal = v; + } + + bool + Ferrisls::usePreorderTraversal() + { + return PreorderTraversal; + } + + void + Ferrisls::setDontFollowLinks( bool v ) + { + DontFollowLinks = v; + } + + void + Ferrisls::setDontDecendIntoFiles( bool v ) + { + DontDecendIntoFiles = v; + } + + void + Ferrisls::MaybeRecurse( fh_context rctx ) + { + LG_CTXREC_D << "Ferrisls::MaybeRecurse() RecursiveList:" << RecursiveList << endl; + + if( RecursiveList ) + { + try + { + Context::SubContextNames_t ls = rctx->getSubContextNames(); + for( Context::SubContextNames_t::iterator iter = ls.begin(); + iter != ls.end(); iter++ ) + { + fh_context c = rctx->getSubContext( *iter ); + LG_CTXREC_D << "Ferrisls::MaybeRecurse() dfl:" << DontFollowLinks + << " c:" << c->getDirPath() + << endl; + + if( DontDescendRegex ) + { + if( regex_search( c->getURL(), + DontDescendRegex, + boost::match_any)) + { + LG_CTXREC_D << "Ferrisls::MaybeRecurse() matches dont descend regex." + << endl; + continue; + } + } + + if( DontFollowLinks ) + { + LG_CTXREC_D << "+++ Ferrisls::MaybeRecurse() c:" << c->getDirPath() + << " df-size:" << getStrAttr( c, "dontfollow-size", "0" ) + << " df-islink:" << getStrAttr( c, "dontfollow-is-link", "0" ) + << " islink:" << getStrAttr( c, "is-link", "0" ) + << endl; + if( int islink = toint(getStrAttr( c, "dontfollow-is-link", "0" ))) + { + continue; + } + } + + if( DontDecendIntoFiles ) + { +// cerr << "MaybeRecurse is-file:" << getStrAttr( c, "is-file", "0" ) << " url:" << c->getURL() << endl; + if( isTrue( getStrAttr( c, "is-file", "0" ) ) ) + continue; + } + + operator()(c); + } + } + catch( FerrisNotReadableAsContext& e ) + { + LG_CTXREC_D << "Ferrisls::MaybeRecurse() not a context rctx:" << rctx->getURL() + << " e:" << e.what() + << endl; + hadErrors( true ); + } + } + } + + void + Ferrisls::operator()( fh_context rctx ) + { + bool read=0; + + try + { +// cerr << "op() rctx:" << rctx << endl; +// cerr << "op() rctx:" << isBound(rctx) << endl; +// cerr << "op() rctx->impl:" << toVoid(rctx)) << endl; +// cerr << "op() path:" << rctx->getDirPath() << endl; + + LG_CTXREC_D << "Ferrisls::operator() rctx:" << rctx->getURL() << endl; + + if( ForceReadRootDirectoryNodes ) + rctx->read(); + + // This will regress in copy/move. +// if( !ListDirectoryNodeOnly && !isTrue( getStrAttr( rctx, "is-dir-try-automounting", "1" ) ) ) +// ListDirectoryNodeOnly = true; + + LG_CTXREC_D << "Ferrisls::operator() ListDirectoryNodeOnly:" << ListDirectoryNodeOnly << endl; + if( ListDirectoryNodeOnly ) + { + if( Display->ShouldEnterContext( rctx ) ) + { + getEnteringContext_Sig().emit( *this, rctx ); + Display->EnteringContext( rctx ); + Display->ShowAttributes( rctx ); + Display->LeavingContext( rctx ); + getLeavingContext_Sig().emit( *this, rctx ); + } + } + else + { + Display->DetachSignals( rctx ); + + if( !Display->ShouldEnterContext( rctx ) ) + return; + + getDiskReadStarted_Sig().emit( *this, rctx ); + OnExistsDiskReadContextsProcessed = 0; + sigc::connection DiskReadConnection = + rctx->getNamingEvent_Exists_Sig().connect( + sigc::mem_fun( *this, &_Self::OnExistsDiskRead )); + LG_CTXREC_D << "Ferrisls::operator()...calling read()" << endl; + rctx->read(); + DiskReadConnection.disconnect(); + getDiskReadDone_Sig().emit( *this, rctx ); + + /* We should only fire this when we know + * we are able to read the context */ + getEnteringContext_Sig().emit( *this, rctx ); + Display->EnteringContext( rctx ); + fh_context original_rtx = rctx; + + if( usePreorderTraversal() ) + { + MaybeRecurse( rctx ); + } + + + /* Filtering */ + if( usingFilter ) + { + fh_context filter = Factory::MakeFilter( FilterString ); + fh_context fc = Factory::MakeFilteredContext( rctx, filter ); + + /* + * We have to read the base context before we drop our handle + * to it + */ + getFilterStarted_Sig().emit( *this ); + rctx->read(); + rctx = fc; + } + + /* Sorting */ + if( SortString.length() ) + { +// cerr << "ferrisls: SortString:" << SortString +// << " rctx:" << rctx->getURL() +// << endl; + + rctx->read(); + fh_sorter sorter = Factory::MakeSorter( SortString ); + getSortStarted_Sig().emit( *this ); + fh_context sc = Factory::MakeSortedContext( rctx, sorter ); + +// if( DEBUG ) +// { +// cout << "ls::op() listing in order" << endl; +// Context::SubContextNames_t na = sc->getSubContextNames(); + +// for( Context::SubContextNames_t::iterator iter = na.begin(); +// iter != na.end(); ++iter ) +// { +// cout << "iter:" << sc->getSubContext(*iter)->getDirPath() << endl; +// } +// } + + rctx = sc; + } + + + Display->AttachSignals( rctx ); + getContextPropergationStarted_Sig().emit( *this, rctx ); + +// cerr << "Ferrisls.cpp dumping out contexts.:" << endl; +// rctx->dumpOutItems(); +// cerr << "Ferrisls.cpp rctx->read(1); url:" << rctx->getURL() << endl; + LG_CTXREC_D << "Ferrisls::operator()...calling read(2)" << endl; + rctx->read(); +// cerr << "Ferrisls.cpp rctx->read(2); url:" << rctx->getURL() << endl; + read=1; + + if( !usePreorderTraversal() ) + { + MaybeRecurse( original_rtx ); + } + Display->LeavingContext( rctx ); + getLeavingContext_Sig().emit( *this, rctx ); + } + } + catch( FerrisNotReadableAsContext& e ) + { + if( RecursiveList ) + { + } + else + { + LG_CTXREC_D << "Not readable as a context:" << e.what() << endl; +// cerr << "Not readable as a context:" << e.what() << endl; + hadErrors( true ); + } + } + catch( CanNotReadContext& e ) + { + LG_CTXREC_D << "Can not read context:" << rctx->getDirPath() + << " reason:" << e.what() + << endl; + cerr << "Can not read context:" << rctx->getDirPath() + << " reason:" << e.what() + << endl; + hadErrors( true ); + } + } + + void + Ferrisls::workComplete() + { + Display->workComplete(); + } + + int + Ferrisls::operator()() + { + Display->setEnteredMonitoringLoop(false); + Display->workStarting(); + + try + { +// rctx = Factory.resolveContext(); + rctx = Resolve( theURL ); + + // Make sure we revert this value before the next file. + Util::ValueRestorer< gboolean > _ListDirectoryNodeOnlyObj( ListDirectoryNodeOnly ); + if( !ListDirectoryNodeOnly + && ImplyListDirectoryNodeOnly + && isFalse( getStrAttr( rctx, "is-dir-try-automounting", "1" ) ) ) + { + ListDirectoryNodeOnly = true; + } + + operator()(rctx); + + if( Display->Monitoring() && rctx ) + { + if( !isTrue( getStrAttr( rctx, "is-active-view", "1" ) ) ) + { + cerr << "Warning, monitoring for events on a context which you have" + << " forced to be passive.\n No events will ever come!\n" + << " url:" << rctx->getURL() + << endl; + } + } + + workComplete(); + Display->DetachAllSignals( false ); + } + catch( RootContextCreationFailed& e ) + { + cerr << "Can not open root context. error: " << e.what() << endl; + throw e; + } + + return 0; + } + + void + Ferrisls::OnExistsDiskRead( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + + ++OnExistsDiskReadContextsProcessed; + + if( (OnExistsDiskReadContextsProcessed % 20) == 0 ) + { + getDiskReadProgress_Sig().emit( *this, c, OnExistsDiskReadContextsProcessed ); +// cerr << "Ferrisls::OnExistsDiskRead() context:" << subc->getDirPath() << endl; +// cerr << "Ferrisls::OnExistsDiskRead() n:"<< OnExistsDiskReadContextsProcessed << endl; + } + + } + + + + Ferrisls::FilterStarted_Sig_t& + Ferrisls::getFilterStarted_Sig() + { + return FilterStarted_Sig; + } + + Ferrisls::SortStarted_Sig_t& + Ferrisls::getSortStarted_Sig() + { + return SortStarted_Sig; + } + + Ferrisls::ContextPropergationStarted_Sig_t& + Ferrisls::getContextPropergationStarted_Sig() + { + return ContextPropergationStarted_Sig; + } + + Ferrisls::DiskReadStarted_Sig_t& + Ferrisls::getDiskReadStarted_Sig() + { + return DiskReadStarted_Sig; + } + + Ferrisls::DiskReadProgress_Sig_t& + Ferrisls::getDiskReadProgress_Sig() + { + return DiskReadProgress_Sig; + } + + Ferrisls::DiskReadDone_Sig_t& + Ferrisls::getDiskReadDone_Sig() + { + return DiskReadDone_Sig; + } + + Ferrisls::EnteringContext_Sig_t& + Ferrisls::getEnteringContext_Sig() + { + return m_EnteringContext_Sig; + } + + Ferrisls::LeavingContext_Sig_t& + Ferrisls::getLeavingContext_Sig() + { + return m_LeavingContext_Sig; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + + +}; + diff --git a/Ferris/Ferrisls.hh b/Ferris/Ferrisls.hh new file mode 100644 index 0000000..e8006cd --- /dev/null +++ b/Ferris/Ferrisls.hh @@ -0,0 +1,853 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferrisls client helper code. + + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls.hh,v 1.11 2010/09/24 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FERRISLS_H_ +#define _ALREADY_INCLUDED_FERRIS_FERRISLS_H_ + +#include +#include + +#include +#include + +namespace Ferris +{ + +/** + * + * Functor that adds quoting to internal contents of a string and quotes the + * string itself depending on the QuoteStyle. + * + * This functor is a mapping + * std::string -> std::string + * + * FIXME LOCALE_QUOTING and other LOCALE stuff doesn't work + * + */ + class FERRISEXP_API StringQuote + { + public: + + /** + * The type of quoting/escaping required. + * + * NO_QUOTING does absolutely nothing and is designed to be very fast. + * this is done to allow this functor to remain in use even + * if it is impotent. + * LITERAL_QUOTING This mode changes strange characters to a ? + * SHELL_QUOTING This subclass of LITERAL places ' quotes around the entire + * string if it contains characters that a shell may interpret. + * SHELL_ALWAYS_QUOTING This is a subclass of SHELL_QUOTING that always places + * quotes (') around the given string. + * + * C_QUOTING This mode places double quotes around the string and escapes + * any special chars like newline as \n and other characters as + * octal + * ESCAPE_QUOTING This subclass of C_QUOTING works exactly like C_QUOTING except + * no double quotes are added before and after the string. + * + */ + enum QuoteStyle + { + NO_QUOTING = 1<<0, + LITERAL_QUOTING = 1<<1, + C_QUOTING = 1<<2, + SHELL_QUOTING = 1<<3, + SHELL_ALWAYS_QUOTING = 1<<4, + ESCAPE_QUOTING = 1<<5, +// LOCALE_QUOTING = 1<<6, +// CLOCALE_QUOTING = 1<<7 + }; + + /** + * Quote style in use + */ + QuoteStyle style; + + /** + * Create a quoting functor with no quoting as the default. + */ + StringQuote( QuoteStyle v = NO_QUOTING ); + + /** + * These are characters that do not need to be treated specially. + * This is here so that the functor can operate fast on strings + * that do not contain heaps of troublesome characters. + */ + typedef std::set acceptable_chars_t; + acceptable_chars_t acceptable_chars; + + /** + * A mapping string -> string that defines a string to find and what to + * replace it with. + */ + typedef std::pair< std::string, std::string > change_t; + + /** + * A change group + */ + typedef std::vector< change_t > changelist_t; + + /** + * String translations that are to be performed on every character of the string. + * changelist_shell is the same as changelist except that a match in changelist_shell + * indicates that the string needs to be quoted for the shell. + */ + changelist_t changelist; + changelist_t changelist_shell; + + /** + * String translations that are to be performed only on strings starting at the + * first character of the given input string. + * changelist_shell is the same as changelist except that a match in changelist_shell + * indicates that the string needs to be quoted for the shell. + */ + changelist_t changelist_dollar; + changelist_t changelist_dollar_shell; + + /** + * String used to quote the string pre/postfix. This is needed because the + * quote string may need to be escaped in the output. + */ + std::string quote_string; + bool backslash_escapes; + + + /** + * Set the quoting style. Refer to the definition of QuoteStyle for the + * meanings of the various quote methods. + */ + void setStyle( QuoteStyle v ); + + /** + * Quotes the string s using the pre/postfix of q + */ + std::string quote( const std::string& s, const std::string& q ); + + /** + * If in shell mode make sure that this entry is pre/postfix quoted. + */ + void ShellMustBeQuoting(); + + /** + * Setup for shell mode. + */ + void initShellQuoteString(); + + /** + * Look through cl trying to match each key in cl with the string starting at + * offset i in string s, changing ret is needed. + * + * @return true if a change was made. + */ + bool performSubSt( const changelist_t& cl, const std::string& s, int& i, std::string& ret ); + + /** + * Perform a string -> string translation + */ + std::string operator()( const std::string& s ); + + std::string getStringOptionName(); + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + class Ferrisls; + + class FERRISEXP_API Ferrisls_display + : + public Handlable + { + public: + + enum { + CLASSIFY_NONE =1<<0, + CLASSIFY_EXE =1<<1, + CLASSIFY_DIR =1<<2, + CLASSIFY_SOCKET =1<<3, + CLASSIFY_FIFO =1<<4, + CLASSIFY_SYMLINK =1<<5 + }; + + protected: + + /* + * Maybe we should append chars to the name? (*|/=@) + */ + std::string ClassifyIfNeeded( const fh_context& ctx, + const std::string& attrName, + std::string s ); + + std::string QuoteIfNeeded( const fh_context& ctx, + const std::string& attrName, + const std::string& s ); + + virtual std::string DecorateIfNeeded( const fh_context& ctx, + const std::string& attrName, + std::string s ); + + gboolean MonitorCreate; + gboolean MonitorDelete; + gboolean MonitorChanged; + gboolean EnteredMonitoringLoop; + gboolean ShowHeadings; + gboolean ShowContextNameInHeading; + + std::string FieldSeperator; + std::string RecordSeperator; + + std::string NoSuchAttributeIndicator; + + char FillChar; + + int ClassifyFileNameStyle; + StringQuote Quoter; + + bool ShowEAErorrs; + + public: + + Ferrisls_display(); + virtual ~Ferrisls_display(); + + /** + * Called once at the start of a listing. Not called for each dir in a + * recursive listing. + */ + virtual void workStarting(); + + /** + * Called once at the end of a listing. Not called for each dir in a + * recursive listing. + */ + virtual void workComplete(); + + /** + * Called by PresentNamedAttribute with the logical equal of + * EA==getStrAttr(ctx,attr) but EA might be modified for quoting + * or encoded for shell display. + */ + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + void PresentNamedAttribute( fh_context ctx, int i, const std::string& attr ); + virtual void ShowAttributes( fh_context ctx ); + + /** + * Called before EnteringContext() to tell if we should actaully visit the context or not. + * if this method returns false then EnteringContext()/tree traversal/LeavingContext() + * are not preformed for ctx. + */ + virtual bool ShouldEnterContext(fh_context ctx); + + /** + * Called before listing a context. Paired with a LeavingContext() call + */ + virtual void EnteringContext(fh_context ctx); + + /** + * Called after listing a context before listing another. + */ + virtual void LeavingContext(fh_context ctx); + + void setShowContextNameInHeading( gboolean v );; + void setNameClassification( int v ); + int getNameClassification(); + void setNoSuchAttributeIndicator( const std::string& s ); + void setShowHeadings( gboolean v ); + void setFillChar( char c ); + void setQuoteStyle( StringQuote::QuoteStyle v ); + void setEnteredMonitoringLoop( bool v = true ); + void setFieldSeperator( const std::string& c ); + void setRecordSeperator( const std::string& c ); + void setMonitorCreate( gboolean v ); + bool getMonitorCreate(); + void setMonitorDelete( gboolean v ); + void setMonitorChanged( gboolean v ); + bool Monitoring(); + + void setShowEAErrors( bool v ); + + struct SignalCollection + { + sigc::connection ExistsConnection; + sigc::connection CreatedConnection; + sigc::connection ChangedConnection; + sigc::connection DeletedConnection; + }; + typedef std::map< fh_context, SignalCollection > SigCol_t; + SigCol_t SigCol; + + void AttachSignals( fh_context c ); + void DetachSignals( fh_context c ); + /** + * Detaches from exists signals, and if force from all other signals. + */ + void DetachAllSignals( bool force = true ); + + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnChanged( NamingEvent_Changed* ev, std::string olddn, std::string newdn ); + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + + }; + + FERRIS_SMARTPTR( Ferrisls_display, fh_lsdisplay ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + class FERRISEXP_API Ferrisls_long_display + : + public Ferrisls_display + { + gboolean ShowAllAttributes; + + /** + * Names of the attributes to show. + */ + typedef std::list Columns_t; + Columns_t Columns; + + RegexCollection m_showColumnRegex; + + bool HaveColumnWidths; + typedef std::vector ColumnWidths_t; + ColumnWidths_t ColumnWidths; + + bool HumanReadableSizes; + + int m_outputPrecision; + + protected: + + bool m_hideXMLDecl; + + void StreamPrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA, + std::ostream* ss ); + std::string modifyForHumanReadableSizes( const std::string& s ); + + public: + + Ferrisls_long_display(); + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + virtual void ShowAttributes( fh_context ctx ); + void EnteringContext(fh_context ctx); + void setShowAllAttributes( gboolean v ); + void setColumns( const std::string& c ); + void appendShowColumnsRegex( const std::string& c ); + int setColumnWidths( const std::string& c ); + void setHumanReadableSizes( bool v ); + + void setHideXMLDeclaration( bool v ); + void setOutputPrecision( int v ); + }; + + + FERRIS_SMARTPTR( Ferrisls_long_display, fh_lsdisplay_long ); + + + class FERRISEXP_API Ferrisls_dired_display + : + public Ferrisls_long_display + { + typedef Ferrisls_long_display _Base; + + typedef std::pair< int, int > StartEnd_t; + typedef std::vector Coords_t; + Coords_t Coords; + + int runningOffset; + + public: + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + virtual void workComplete(); + + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_widthneeding_display + : + public Ferrisls_display + { + protected: + + int ConsoleWidth; + int ConsolePosition; + + void puts( const std::string& s ); + void putnl(); + + public: + + Ferrisls_widthneeding_display(); + + void setConsoleWidth( int v ); + }; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_csv_display + : + public Ferrisls_widthneeding_display + { + typedef Ferrisls_widthneeding_display _Base; + + bool firstEntry; + int EffectiveWidth; + + public: + + Ferrisls_csv_display(); + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + virtual void workComplete(); + }; + + + FERRIS_SMARTPTR( Ferrisls_csv_display, fh_lsdisplay_csv ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_nameCollector_display + : + public Ferrisls_widthneeding_display + { + typedef Ferrisls_widthneeding_display _Base; + + typedef std::vector ColW_t; + ColW_t ColW; + int MaxCol; + bool m_initialPrintComplete; + + protected: + + typedef std::list NameCollection_t; + NameCollection_t NameCollection; + + int GetColumnLeftMostCharPos( int idx ); + int GetColumnRightMostCharPos( int idx ); + int GetColumnSize( int idx ); + void SetColumnSize( int idx, int v ); + void initColW( int max ); + int getMaxCol(); + + public: + + Ferrisls_nameCollector_display(); + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + virtual void workComplete(); + }; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_hv_display + : + public Ferrisls_nameCollector_display + { + typedef Ferrisls_nameCollector_display _Base; + + protected: + + virtual void Init(); + virtual void FindColumnSizes() = 0; + virtual void PrintColumns() = 0; + + public: + + virtual void workComplete(); + }; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +class FERRISEXP_API Ferrisls_horiz_display + : + public Ferrisls_hv_display + { + typedef Ferrisls_hv_display _Base; + + protected: + + void FindColumnSizes(); + void PrintColumns(); + }; + + FERRIS_SMARTPTR( Ferrisls_horiz_display, fh_lsdisplay_horiz ); + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_vert_display + : + public Ferrisls_hv_display + { + typedef Ferrisls_hv_display _Base; + + int GetRowCount(); + bool checkfit(); + + protected: + + void FindColumnSizes(); + void PrintColumns(); + }; + + FERRIS_SMARTPTR( Ferrisls_vert_display, fh_lsdisplay_vert ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_xmlraw_display + : + public Ferrisls_long_display + { + typedef Ferrisls_long_display _Base; + + virtual void workStarting(); + virtual void workComplete(); + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + + protected: + + struct Ferrisls_xmlraw_display_private* P; + + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + + + public: + Ferrisls_xmlraw_display(); + virtual ~Ferrisls_xmlraw_display(); + + }; + + FERRIS_SMARTPTR( Ferrisls_xmlraw_display, fh_lsdisplay_xmlraw ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_xml_display + : + public Ferrisls_long_display + { + typedef Ferrisls_long_display _Base; + + virtual void workStarting(); + virtual void workComplete(); + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + + protected: + + struct Ferrisls_xml_display_private* P; + + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + + + public: + Ferrisls_xml_display(); + virtual ~Ferrisls_xml_display(); + + }; + + FERRIS_SMARTPTR( Ferrisls_xml_display, fh_lsdisplay_xml ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_xmle_display + : + public Ferrisls_xml_display +{ + typedef Ferrisls_long_display _Base; + +protected: + + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + +public: + Ferrisls_xmle_display(); + virtual ~Ferrisls_xmle_display(); +}; + + FERRIS_SMARTPTR( Ferrisls_xmle_display, fh_lsdisplay_xmle ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_xml_xsltfs_debug_display + : + public Ferrisls_xml_display +{ + typedef Ferrisls_long_display _Base; + + void* ensureElementCreated( fh_context ctx ); + +protected: + + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + +public: + Ferrisls_xml_xsltfs_debug_display(); + virtual ~Ferrisls_xml_xsltfs_debug_display(); +}; + + FERRIS_SMARTPTR( Ferrisls_xml_xsltfs_debug_display, fh_lsdisplay_xml_xsltfs_debug ); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Ferrisls_rdf_display + : + public Ferrisls_long_display + { + typedef Ferrisls_long_display _Base; + + struct Ferrisls_rdf_display_private* P; + + virtual void workStarting(); + virtual void workComplete(); + virtual void EnteringContext(fh_context ctx); + virtual void LeavingContext(fh_context ctx); + + protected: + + virtual void ShowAttributes( fh_context ctx ); + virtual void PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ); + + public: + Ferrisls_rdf_display(); + virtual ~Ferrisls_rdf_display(); + + + }; + + FERRIS_SMARTPTR( Ferrisls_rdf_display, fh_lsdisplay_rdf ); + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +class FERRISEXP_API Ferrisls + : + public Handlable + { + typedef Ferrisls _Self; + + protected: + + std::string theURL; +// RootContextFactory Factory; + fh_context rctx; + + gboolean ListDirectoryNodeOnly; + gboolean ForceReadRootDirectoryNodes; + gboolean ImplyListDirectoryNodeOnly; + gboolean RecursiveList; + + gboolean usingFilter; + std::string FilterString; + std::string SortString; + + fh_lsdisplay Display; + + bool HadErrors; + + public: + + typedef sigc::signal2< void, Ferrisls&, fh_context > DiskReadStarted_Sig_t; + DiskReadStarted_Sig_t& getDiskReadStarted_Sig(); + + typedef sigc::signal2< void, Ferrisls&, fh_context > DiskReadDone_Sig_t; + DiskReadDone_Sig_t& getDiskReadDone_Sig(); + + typedef sigc::signal3< void, Ferrisls&, fh_context, long > DiskReadProgress_Sig_t; + DiskReadProgress_Sig_t& getDiskReadProgress_Sig(); + + typedef sigc::signal1< void, Ferrisls& > FilterStarted_Sig_t; + FilterStarted_Sig_t& getFilterStarted_Sig(); + + typedef sigc::signal1< void, Ferrisls& > SortStarted_Sig_t; + SortStarted_Sig_t& getSortStarted_Sig(); + + typedef sigc::signal2< void, Ferrisls&, fh_context > ContextPropergationStarted_Sig_t; + ContextPropergationStarted_Sig_t& getContextPropergationStarted_Sig(); + + Ferrisls(); + + void setDisplay( fh_lsdisplay v ); + void setFilterString( const std::string& v ); + void setSortString( const std::string& v ); + void setRecursiveList( gboolean x ); + void setListDirectoryNodeOnly( gboolean x ); + void setForceReadRootDirectoryNodes( gboolean x ); + void setImplyListDirectoryNodeOnly( gboolean x ); + void setDontDescendRegex( const std::string& s ); + +// void setContextClass( const std::string& c ) throw( NoSuchContextClass ); +// void setRoot( const std::string& c ); + void setURL( const std::string& earl ); + void operator()( fh_context rctx ); + int operator()(); + + void workComplete(); + + + /* For broadcasting disk read update msgs */ + long OnExistsDiskReadContextsProcessed; + void OnExistsDiskRead( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + bool hadErrors(); + + void setDontFollowLinks( bool v ); + void setDontDecendIntoFiles( bool v ); + void usePreorderTraversal( bool v ); + bool usePreorderTraversal(); + + typedef sigc::signal2< void, Ferrisls&, fh_context > EnteringContext_Sig_t; + EnteringContext_Sig_t& getEnteringContext_Sig(); + typedef sigc::signal2< void, Ferrisls&, fh_context > LeavingContext_Sig_t; + LeavingContext_Sig_t& getLeavingContext_Sig(); + + private: + EnteringContext_Sig_t m_EnteringContext_Sig; + LeavingContext_Sig_t m_LeavingContext_Sig; + + void MaybeRecurse( fh_context rctx ); + + bool PreorderTraversal; + bool DontFollowLinks; + bool DontDecendIntoFiles; + + void hadErrors( bool v ); + + DiskReadStarted_Sig_t DiskReadStarted_Sig; + DiskReadProgress_Sig_t DiskReadProgress_Sig; + DiskReadDone_Sig_t DiskReadDone_Sig; + FilterStarted_Sig_t FilterStarted_Sig; + SortStarted_Sig_t SortStarted_Sig; + ContextPropergationStarted_Sig_t ContextPropergationStarted_Sig; + + std::string DontDescendRegexString; + fh_rex DontDescendRegex; +}; + + + FERRIS_SMARTPTR( Ferrisls, fh_ls ); + +}; + + +#endif diff --git a/Ferris/Ferrisls_AggregateData.cpp b/Ferris/Ferrisls_AggregateData.cpp new file mode 100644 index 0000000..d74e86e --- /dev/null +++ b/Ferris/Ferrisls_AggregateData.cpp @@ -0,0 +1,325 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls_AggregateData.cpp,v 1.5 2010/09/24 21:30:49 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +namespace Ferris +{ +// Ferrisls_aggregate_t::Ferrisls_aggregate_t( const Ferrisls_aggregate_t& ) +// { +// reset(); +// } + +// Ferrisls_aggregate_t::Ferrisls_aggregate_t() +// { +// reset(); +// } + + + Ferrisls_aggregate_t operator+( const Ferrisls_aggregate_t& a1, const Ferrisls_aggregate_t& a2 ) + { + Ferrisls_aggregate_t ret; + ret.reset(); + + ret.count = a1.count + a2.count; + ret.maxdepth = a1.maxdepth + a2.maxdepth; + ret.hardlinkcount = a1.hardlinkcount + a2.hardlinkcount; + ret.size = a1.size + a2.size; + ret.filecount = a1.filecount + a2.filecount; + ret.dircount = a1.dircount + a2.dircount; + ret.sizeinblocks = a1.sizeinblocks + a2.sizeinblocks; + ret.sizeFilesOnly = a1.sizeFilesOnly + a2.sizeFilesOnly; + ret.oldestmtime = min( a1.oldestmtime, a2.oldestmtime ); + ret.oldestctime = min( a1.oldestctime, a2.oldestctime ); + ret.oldestatime = min( a1.oldestatime, a2.oldestatime ); + ret.oldestmtime_url = ""; + ret.oldestctime_url = ""; + ret.oldestatime_url = ""; + ret.newestmtime = min( a1.newestmtime, a2.newestmtime ); + ret.newestctime = min( a1.newestctime, a2.newestctime ); + ret.newestatime = min( a1.newestatime, a2.newestatime ); + ret.newestmtime_url = ""; + ret.newestctime_url = ""; + ret.newestatime_url = ""; + return ret; + } + + + Ferrisls_aggregate_data::Ferrisls_aggregate_data() + { + reset(); + RecordSeperator = ""; + } + + + void + Ferrisls_aggregate_data::UpdateAggregateData( Ferrisls_aggregate_t& d, fh_context ctx ) + { + if( (&d == &recd) ) + { + LG_CTX_D << "UpdateAggregateData() rec:" << (&d == &recd) << " ctx:" << ctx->getURL() << endl; +// BackTrace(); + } + + d.count++; + + Context* c = GetImpl(ctx); + if( NativeContext* nc = dynamic_cast(c) ) + { + const struct stat& sb = nc->getStat_Follow(); + + d.hardlinkcount = sb.st_nlink; + d.size += sb.st_size; + d.sizeinblocks += sb.st_blocks; + + if(S_ISREG(sb.st_mode)) + d.sizeFilesOnly += sb.st_size; + + LG_CTX_D << "UpdateAggregateData() blocks:" << sb.st_blocks << " ctx:" << ctx->getURL() << endl; + + if(S_ISREG(sb.st_mode)) d.filecount++; + else if(S_ISDIR(sb.st_mode)) d.dircount++; + + if( sb.st_atime < d.oldestatime ) + { + d.oldestatime = sb.st_atime; + d.oldestatime_url = ctx->getURL(); + } + if( sb.st_mtime < d.oldestmtime ) + { + d.oldestmtime = sb.st_mtime; + d.oldestmtime_url = ctx->getURL(); + } + if( sb.st_ctime < d.oldestctime ) + { + d.oldestctime = sb.st_ctime; + d.oldestctime_url = ctx->getURL(); + } + if( sb.st_atime > d.newestatime ) + { + d.newestatime = sb.st_atime; + d.newestatime_url = ctx->getURL(); + } + if( sb.st_mtime > d.newestmtime ) + { + d.newestmtime = sb.st_mtime; + d.newestmtime_url = ctx->getURL(); + } + if( sb.st_ctime > d.newestctime ) + { + d.newestctime = sb.st_ctime; + d.newestctime_url = ctx->getURL(); + } + } + } + + + void + Ferrisls_aggregate_data::ShowAttributes( fh_context ctx ) + { +// cerr << "Ferrisls_aggregate_data::ShowAttributes() url:" << ctx->getURL() << endl; + + if( isDirectSubContextOfRootContext( ctx ) ) + { + UpdateAggregateData( subd, ctx ); + } + + UpdateAggregateData( recd, ctx ); + } + + void + Ferrisls_aggregate_data::ShowHeader(fh_context ctx) + { + recd.maxdepth = std::max( recd.maxdepth, getDepthOfContext( ctx )); + } + + bool + Ferrisls_aggregate_data::isDirectSubContextOfRootContext( fh_context c ) + { + if( !isBound( RootContext ) || !c->isParentBound() ) + { + return false; + } + + return c->getParent() == GetImpl(RootContext); + } + + guint32 + Ferrisls_aggregate_data::getDepthOfContext( fh_context c ) + { + guint32 d = 0; + + while( GetImpl(c) != GetImpl(RootContext) ) + { + c = c->getParent(); + d++; + } + return d; + } + + + + void + Ferrisls_aggregate_data::reset() + { + recd.reset(); + subd.reset(); + } + + Ferrisls_aggregate_t& + Ferrisls_aggregate_data::getRecursiveData() + { + return recd; + } + + Ferrisls_aggregate_t& + Ferrisls_aggregate_data::getSubData() + { + return subd; + } + + Ferrisls_aggregate_t& + Ferrisls_aggregate_data::getData( int m ) + { + if( m & AGGDATA_RECURSIVE ) + { + return getRecursiveData(); + } + return getSubData(); + } + + void Ferrisls_aggregate_data::setData( const Ferrisls_aggregate_t& a, aggdata_mode_t m ) + { + if( m & AGGDATA_RECURSIVE ) + { + recd = a; + } + subd = a; + } + + + + aggdata_mode_t + Ferrisls_aggregate_data::getMode() + { + return Mode; + } + + void + Ferrisls_aggregate_data::setRootContext( fh_context c ) + { + RootContext = c; + } + + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + void + Ferrisls_aggregate_t::reset() + { + count = 0; + maxdepth = 0; + hardlinkcount = 0; + size = 0; + sizeFilesOnly = 0; + filecount = 0; + dircount = 0; + sizeinblocks = 0; + oldestmtime = Time::getTime(); + oldestctime = oldestmtime; + oldestatime = oldestmtime; + oldestmtime_url = ""; + oldestctime_url = ""; + oldestatime_url = ""; + newestmtime = 0; + newestctime = 0; + newestatime = 0; + newestmtime_url = ""; + newestctime_url = ""; + newestatime_url = ""; + } + + guint64 Ferrisls_aggregate_t::sizeIn1KBlocks() const + { + return sizeinblocks/2; + } + + guint64 Ferrisls_aggregate_t::byteSizeOnDisk() const + { + return sizeIn1KBlocks() * 1024; + } + + + + + fh_display_aggdata getAggregateData( fh_context c, + aggdata_mode_t m ) + { + fh_display_aggdata d = new Ferrisls_aggregate_data(); + fh_ls ls = new Ferrisls(); + + d->reset(); + d->setRootContext( c ); + + ls->setURL( c->getURL() ); + ls->setDisplay( d ); + ls->setRecursiveList( m & AGGDATA_RECURSIVE ); + ls->setDontDecendIntoFiles( true ); + + ls->operator()(); + d->UpdateAggregateData( d->getData( m ), c ); + + return d; + } + + + fh_display_aggdata createDisplayAggregateData( Ferrisls* ls ) + { + ls->setListDirectoryNodeOnly( false ); + ls->setForceReadRootDirectoryNodes( false ); + ls->setRecursiveList( true ); + ls->setDontDecendIntoFiles( true ); + ls->usePreorderTraversal( true ); + + fh_display_aggdata d = new Ferrisls_aggregate_data(); + d->reset(); + ls->setDisplay( d ); + return d; + } + + +}; + diff --git a/Ferris/Ferrisls_AggregateData.hh b/Ferris/Ferrisls_AggregateData.hh new file mode 100644 index 0000000..2431f3e --- /dev/null +++ b/Ferris/Ferrisls_AggregateData.hh @@ -0,0 +1,148 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls_AggregateData.hh,v 1.5 2010/09/24 21:30:50 ben Exp $ + + ******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#ifndef _ALREADY_INCLUDED_FERRIS_FERRISLS_AGGDATA_H_ +#define _ALREADY_INCLUDED_FERRIS_FERRISLS_AGGDATA_H_ + +#include +#include + +namespace Ferris +{ + + class FERRISEXP_API Ferrisls_aggregate_t + { + public: +// Ferrisls_aggregate_t( const Ferrisls_aggregate_t& ); +// Ferrisls_aggregate_t(); + + + /* 32 bit align */ + guint32 pad; + + /* generic ones that context class adds */ + guint32 count; + guint32 maxdepth; + + /* items only available in native VFS module */ + guint32 hardlinkcount; + guint64 size; + guint64 sizeFilesOnly; + guint64 sizeinblocks; + guint64 filecount; + guint64 dircount; + time_t oldestmtime; + time_t oldestctime; + time_t oldestatime; + std::string oldestmtime_url; + std::string oldestctime_url; + std::string oldestatime_url; + time_t newestmtime; + time_t newestctime; + time_t newestatime; + std::string newestmtime_url; + std::string newestctime_url; + std::string newestatime_url; + + void reset(); + guint64 sizeIn1KBlocks() const; + guint64 byteSizeOnDisk() const; + }; + + FERRISEXP_API Ferrisls_aggregate_t operator+( const Ferrisls_aggregate_t& a1, const Ferrisls_aggregate_t& a2 ); + + + + enum aggdata_mode_t + { + AGGDATA_DEFAULT = (1<<0), + AGGDATA_RECURSIVE = (1<<1), + + AGGDATA_SIZE = (1<<2) + }; + + + class FERRISEXP_API Ferrisls_aggregate_data + : + public Ferrisls_long_display + { + /* only direct subcontexts */ + Ferrisls_aggregate_t subd; + + /* all subcontexts recursively */ + Ferrisls_aggregate_t recd; + + aggdata_mode_t Mode; + + protected: + + friend fh_display_aggdata getAggregateData( fh_context c, aggdata_mode_t m ); + fh_context RootContext; + bool isDirectSubContextOfRootContext( fh_context c ); + guint32 getDepthOfContext( fh_context c ); + + void UpdateAggregateData( Ferrisls_aggregate_t& d, fh_context ctx ); + + public: + + Ferrisls_aggregate_data(); + + virtual void ShowAttributes( fh_context ctx ); + void ShowHeader(fh_context ctx); + + //////////////// + + void reset(); + + Ferrisls_aggregate_t& getRecursiveData(); + Ferrisls_aggregate_t& getSubData(); + Ferrisls_aggregate_t& getData( int m = 0 ); + void setData( const Ferrisls_aggregate_t& a, aggdata_mode_t m ); + + aggdata_mode_t getMode(); + + void setRootContext( fh_context c ); + }; + + FERRIS_SMARTPTR( Ferrisls_aggregate_data, fh_display_aggdata ); + + + /** + * Get the info requested on the given context. + */ + FERRISEXP_API fh_display_aggdata getAggregateData( fh_context c, + aggdata_mode_t m = AGGDATA_DEFAULT ); + + FERRISEXP_API fh_display_aggdata createDisplayAggregateData( Ferrisls* fls ); + + +}; + +#endif diff --git a/Ferris/Ferrisls_RDF.cpp b/Ferris/Ferrisls_RDF.cpp new file mode 100644 index 0000000..1153c3d --- /dev/null +++ b/Ferris/Ferrisls_RDF.cpp @@ -0,0 +1,117 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferrisls client helper code. + + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls_RDF.cpp,v 1.3 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "Trimming.hh" +#include "ValueRestorer.hh" +#include "FerrisSemantic.hh" +#include + +using namespace std; + + +namespace Ferris +{ + using namespace RDFCore; + + + +struct Ferrisls_rdf_display_private +{ + fh_model model; + Ferrisls_rdf_display_private() + : + model( 0 ) + { + model = Model::MemoryOnlyModel(); + } +}; + + + void + Ferrisls_rdf_display::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + string earl = ctx->getURL(); + + fh_node subj = Node::CreateURI( earl ); + fh_node pred = Node::CreateURI( Semantic::getPredicateURI(attr) ); + fh_node obj = Node::CreateLiteral( EA ); + + P->model->insert( subj, pred, obj ); + } + + void + Ferrisls_rdf_display::ShowAttributes( fh_context ctx ) + { + _Base::ShowAttributes( ctx ); + } + + void + Ferrisls_rdf_display::workStarting() + { + } + + void + Ferrisls_rdf_display::workComplete() + { + P->model->write( Factory::fcout() ); + } + + void + Ferrisls_rdf_display::EnteringContext(fh_context ctx) + { + } + + void + Ferrisls_rdf_display::LeavingContext(fh_context ctx) + { + } + + Ferrisls_rdf_display::Ferrisls_rdf_display() + : + P( new Ferrisls_rdf_display_private() ) + { + } + + Ferrisls_rdf_display::~Ferrisls_rdf_display() + { + if( P ) + delete P; + } + +}; diff --git a/Ferris/Ferrisls_XML.cpp b/Ferris/Ferrisls_XML.cpp new file mode 100644 index 0000000..800dbb1 --- /dev/null +++ b/Ferris/Ferrisls_XML.cpp @@ -0,0 +1,386 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferrisls client helper code. + + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Ferrisls_XML.cpp,v 1.4 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include "Trimming.hh" +#include "ValueRestorer.hh" +#include +#include +#include +#include +#include + +using namespace std; + +#define X(str) XStr(str).unicodeForm() + +namespace Ferris +{ + using namespace XML; + + + +Ferrisls_xmlraw_display::Ferrisls_xmlraw_display() +{ +} + + Ferrisls_xmlraw_display::~Ferrisls_xmlraw_display() + { + } + + + void + Ferrisls_xmlraw_display::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + fh_stringstream bss; + bss << EA; + std::string ealine; + getline( bss, ealine ); + PostfixTrimmer trimmer; + trimmer.push_back( "\r" ); + cout << " " << attr << "=\"" << trimmer( ealine ) << "\" "; + } + + void + Ferrisls_xmlraw_display::ShowAttributes( fh_context ctx ) + { + cout << " " << endl; + } + + void + Ferrisls_xmlraw_display::workStarting() + { + cout << "" << endl; + } + + void + Ferrisls_xmlraw_display::workComplete() + { + cout << "" << endl; + } + + void + Ferrisls_xmlraw_display::EnteringContext(fh_context ctx) + { + cout << "getURL() << "\" " + << " name=\"" << ctx->getDirName() << "\" " + << " >" << endl; + } + + void + Ferrisls_xmlraw_display::LeavingContext(fh_context ctx) + { + cout << "" << endl; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + + struct Ferrisls_xml_display_private + { + fh_domdoc m_dom; + DOMElement* m_ShowAttributes_element; + typedef FERRIS_STD_HASH_MAP< string, DOMElement* > m_elementmap_t; + m_elementmap_t m_elementmap; + bool m_trimXMLDecl; + + Ferrisls_xml_display_private() + : + m_dom( 0 ), + m_ShowAttributes_element( 0 ) + { + m_dom = Factory::makeDOM( "ferrisls" ); + } + + DOMElement* getParentElement( fh_context ctx ) + { + DOMElement* parent = 0; + if( ctx->isParentBound() ) + { + fh_context pc = ctx->getParent(); + parent = m_elementmap[ pc->getURL() ]; + } + if( !parent ) + { + parent = m_dom->getDocumentElement(); + } + return parent; + } + }; + + +Ferrisls_xml_display::Ferrisls_xml_display() + : + P( new Ferrisls_xml_display_private() ) +{ +} + + Ferrisls_xml_display::~Ferrisls_xml_display() + { + delete P; + } + + + void + Ferrisls_xml_display::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + fh_stringstream bss; + bss << EA; + std::string ealine; + getline( bss, ealine ); + PostfixTrimmer trimmer; + trimmer.push_back( "\r" ); +// cout << " " << attr << "=\"" << trimmer( ealine ) << "\" "; + setAttribute( P->m_ShowAttributes_element, attr, trimmer( ealine ) ); + } + + void + Ferrisls_xml_display::ShowAttributes( fh_context ctx ) + { +// cerr << "ShowAttributes() ctx:" << ctx->getURL() << endl; + DOMElement* parent = P->getParentElement( ctx ); + + DOMElement* el = XML::createElement( P->m_dom, parent, "context" ); + Util::ValueRestorer< DOMElement* > _obj( P->m_ShowAttributes_element, el ); + +// cout << " " << endl; + } + + void + Ferrisls_xml_display::workStarting() + { +// cout << "" << endl; + } + + void + Ferrisls_xml_display::workComplete() + { +// cout << "" << endl; + + bool gFormatPrettyPrint = true; + fh_stringstream ss = tostream( P->m_dom, gFormatPrettyPrint ); + ss = trimXMLDeclaration( ss, m_hideXMLDecl ); + cout << ss.str() << flush; + } + + void + Ferrisls_xml_display::EnteringContext(fh_context ctx) + { +// cerr << "EnteringContext() ctx:" << ctx->getURL() << endl; + DOMElement* parent = P->getParentElement( ctx ); + DOMElement* el = XML::createElement( P->m_dom, + parent, + "ferrisls" ); + P->m_elementmap[ ctx->getURL() ] = el; +// cerr << "EnteringContext(set el) ctx:" << ctx->getURL() << endl; + setAttribute( el, "url", ctx->getURL() ); + setAttribute( el, "name", ctx->getDirName() ); + + { + Util::ValueRestorer< DOMElement* > _obj( P->m_ShowAttributes_element, el ); + _Base::ShowAttributes( ctx ); + } + +// cout << "getURL() << "\" " +// << " name=\"" << ctx->getDirName() << "\" " +// << " >" << endl; + } + + void + Ferrisls_xml_display::LeavingContext(fh_context ctx) + { + P->m_elementmap[ ctx->getURL() ] = 0; +// cout << "" << endl; + } + + + ///////////////////////////////////////// + ///////////////////////////////////////// + ///////////////////////////////////////// + + + + void + Ferrisls_xmle_display::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + fh_stringstream bss; + + + DOMElement* el = XML::createElement( P->m_dom, P->m_ShowAttributes_element, attr ); + +// DOMText* childVal = P->m_dom->createTextNode( X(ealine.c_str()) ); +// DOMCDATASection* childVal = P->m_dom->createCDATASection( X(ealine.c_str()) ); + +// XMLTransService::Codes resCode; +// XMLTranscoder* myTranscoder = XMLPlatformUtils::fgTransService-> +// makeNewTranscoderFor( XMLRecognizer::US_ASCII, resCode, 16*1024, +// XMLPlatformUtils::fgMemoryManager); +// unsigned int charsEaten; +// // XMLCh resultXMLString_Encoded[16*1024+4]; +// XMLCh* resultXMLString_Encoded = new XMLCh[16*1024+4]; + +// cerr << "attr:" << attr << " sz:" << EA.size() << " data -->:" << EA << ":<--" << endl; +// unsigned char charSizes[16*1024]; +// myTranscoder->transcodeFrom( (const XMLByte*)EA.c_str(), EA.size(), +// resultXMLString_Encoded, 16*1024, +// charsEaten, charSizes ); + + +// delete myTranscoder; + +// XMLCh* xch = resultXMLString_Encoded; + +// XMLCh* xch = XMLString::transcode( EA.c_str() ); + + + int maxChars = EA.size(); + fh_xmlch xch = new XMLCh[ maxChars + 2 ]; + bool encodedOK = XMLString::transcode( EA.c_str(), xch, EA.size() ); + +// cerr << "attr:" << attr << " have-xch:" << isBound(xch) << endl; + if( encodedOK ) + { + DOMText* childVal = P->m_dom->createTextNode( xch ); + el->appendChild( childVal ); + } + else + { +// cerr << "Failed to get plain XML text attribute data for ea:" << EA << endl; + + xch = Factory::makeXMLBase64encoded( EA ); + + DOMText* childVal = P->m_dom->createTextNode( xch ); + el->appendChild( childVal ); + setAttribute( el, "encoding", "base64" ); + } + + + + } + + Ferrisls_xmle_display::Ferrisls_xmle_display() + : + Ferrisls_xml_display() + { + } + + Ferrisls_xmle_display::~Ferrisls_xmle_display() + { + } + + + ///////////////////////////////////////// + ///////////////////////////////////////// + ///////////////////////////////////////// + + + void + Ferrisls_xml_xsltfs_debug_display::PrintEA( fh_context ctx, + int i, + const std::string& attr, + const std::string& EA ) + { + Ferrisls_xml_display::PrintEA( ctx, i, attr, EA ); + } + + Ferrisls_xml_xsltfs_debug_display::Ferrisls_xml_xsltfs_debug_display() + : + Ferrisls_xml_display() + { + } + + Ferrisls_xml_xsltfs_debug_display::~Ferrisls_xml_xsltfs_debug_display() + { + } + + void + Ferrisls_xml_xsltfs_debug_display::ShowAttributes( fh_context ctx ) + { +// cerr << "ShowAttributes() ctx:" << ctx->getURL() << endl; + + DOMElement* el = (DOMElement*)ensureElementCreated( ctx ); + Util::ValueRestorer< DOMElement* > _obj( P->m_ShowAttributes_element, el ); + _Base::ShowAttributes( ctx ); + } + + void* + Ferrisls_xml_xsltfs_debug_display::ensureElementCreated( fh_context ctx ) + { + if( !P->m_elementmap[ ctx->getURL() ] ) + { + DOMElement* parent = P->getParentElement( ctx ); + DOMElement* el = XML::createElement( P->m_dom, + parent, + ctx->getDirName() ); + P->m_elementmap[ ctx->getURL() ] = el; + } + return P->m_elementmap[ ctx->getURL() ]; + } + + + void + Ferrisls_xml_xsltfs_debug_display::EnteringContext(fh_context ctx) + { + DOMElement* el = (DOMElement*)ensureElementCreated( ctx ); + setAttribute( el, "url", ctx->getURL() ); + setAttribute( el, "name", ctx->getDirName() ); + } + + void + Ferrisls_xml_xsltfs_debug_display::LeavingContext(fh_context ctx) + { + } + +}; + diff --git a/Ferris/FilteredContext.cpp b/Ferris/FilteredContext.cpp new file mode 100644 index 0000000..d4f2254 --- /dev/null +++ b/Ferris/FilteredContext.cpp @@ -0,0 +1,2267 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FilteredContext.cpp,v 1.19 2011/05/04 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Ferris +{ + /** + * Get the infered type of the data in the val param. + * The return value will be one of the strings from + * xsd/attributes/attributedomain/possiblesort + */ + std::string guessComparisonOperatorFromData( const std::string& val ) + { + std::string ret = "binary"; + + typedef list< pair< fh_regex, string > > Inferences_t; + Inferences_t Inferences; + + Inferences.push_back( make_pair( new Regex("^[0-9]+$"), "int" )); + Inferences.push_back( make_pair( new Regex("^[0-9]+\\.[0-9]+$"), "double" )); + Inferences.push_back( make_pair( new Regex("^[a-zA-Z0-9\\.\\*\\-\\_\\ ]+$"), "string" )); + Inferences.push_back( make_pair( new Regex("^[a-z0-9\\.\\*\\-\\_\\ ]+$"), "cis" )); + + for( Inferences_t::iterator ii = Inferences.begin(); ii != Inferences.end(); ++ii ) + { + if( ii->first->operator()( val ) ) + return ii->second; + } + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + inline bool getEAStringOrFalse( const fh_context& c, + const std::string eaname, + std::string& val ) + { + try + { + if( !isBound(c) ) + return false; + + fh_attribute a = c->getAttribute( eaname ); + fh_istream ss = a->getIStream(); + return getline( ss, val ); + } + catch(...) + { + } + return false; + } + + inline bool getEALongOrFalse( const fh_context& c, + const std::string eaname, + long& val ) + { + try + { + if( !isBound(c) ) + return false; + + fh_attribute a = c->getAttribute( eaname ); + fh_istream ss = a->getIStream(); + return (ss >> val); + } + catch(...) + { + } + return false; + } + + + inline bool getEADoubleOrFalse( const fh_context& c, + const std::string eaname, + double& val ) + { + try + { + if( !isBound(c) ) + return false; + + fh_attribute a = c->getAttribute( eaname ); + fh_istream ss = a->getIStream(); + return (ss >> val); + } + catch(...) + { + } + return false; + } + + template + inline bool getEAOrFalse( const fh_context& c, + const std::string eaname, + T& val ) + { + try + { + if( !isBound(c) ) + return false; + + fh_attribute a = c->getAttribute( eaname ); + fh_istream ss = a->getIStream(); + return (ss >> val); + } + catch(...) + { + } + return false; + } + + /** + * Perform some caching of what sorting order to use for the given EA. + * Note that the extra value "time" is added to those returned by getSchemaDefaultSort(). + * this is done so that conversions from relative time deltas as strings can be converted + * into an absolute time_t value for comparison. + * + * Also a extra value of "size" can be returned to allow automatic conversion + * of strings such as 100k or 5.5m to their integer version. + * + * This class will return the same sort order for all contexts with + * a common parent, once the parent changes the sort order can change too. + * + */ + struct FERRISEXP_DLLLOCAL schemaCache + { + string cname; + fh_context parent; + bool EAIsStatless; + bool HaveTestedEAIsStatless; + + schemaCache() + : + cname(""), parent(0), EAIsStatless(false), HaveTestedEAIsStatless(false) + { + } + + inline const std::string& getSchema( const std::string& eaname, const fh_context& c ) + { + bool updateCachedName = cname.empty() || !parent; + + // + // Different parent taints the cache. + // + if( !updateCachedName && c->isParentBound() && parent != c->getParent() ) + { + updateCachedName = true; + parent = c->getParent(); + } + + // + // For contexts which can change the schema for the same attribute + // in the same directory we have to not cache the schema unless we + // are looking at an attribute which is stateless and thus has a + // fixed schema still. + // + if( !updateCachedName + && !EAIsStatless + && parent + && !parent->getSubContextAttributesWithSameNameHaveSameSchema() ) + { + if( !HaveTestedEAIsStatless ) + { + HaveTestedEAIsStatless = true; + EAIsStatless = c->isStatelessAttributeBound( eaname ); + } + + updateCachedName = EAIsStatless; + } + + // + // if the cache is tainted then update the sort specifier + // + if( updateCachedName ) + { + fh_context sc = c->getSchema( eaname ); + stringlist_t sol = getSchemaDefaultSortList( sc ); + cname = sol.front(); + + XSDBasic_t sct = getSchemaType( c, eaname, XSD_UNKNOWN ); + +// cerr << "getSchema(update) sct:" << sct << endl; + if( FXD_UNIXEPOCH_T == sct ) + cname = "time"; + else if( FXD_FILESIZE == sct ) + cname = "size"; + } + return cname; + } + + inline const std::string& operator()( const std::string& eaname, const fh_context& c ) + { + return getSchema( eaname, c ); + } + }; + + + struct FERRISEXP_DLLLOCAL matcher_typesafe_base + { + string value; + std::string eaname; + mutable schemaCache m_schemaCache; + + matcher_typesafe_base( const std::string& eaname, const std::string& value ) + : + eaname( eaname ), + value( value ) + { + } + + typedef Loki::AssocVector< string, fh_matcher > FunctionTable_t; + mutable FunctionTable_t FunctionTable; + inline FunctionTable_t& getFunctionTable() const + { + return FunctionTable; + } + + inline bool operator()( const fh_context& c ) const + { + const std::string& cname = m_schemaCache( eaname, c ); + + FunctionTable_t::iterator fi = getFunctionTable().find( cname ); + if( fi != getFunctionTable().end() ) + { + fi->second( c ); + } + } + }; + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_presence + { + std::string eaname; + matcher_presence( const std::string& eaname ) : eaname( eaname ) {} + + inline bool operator()( const fh_context& c ) const + { + return( c->isAttributeBound(eaname) ); + } + }; + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_MakeHasOneOrMoreBytesMatcher + { + std::string eaname; + bool m_createIfNotThere; + + matcher_MakeHasOneOrMoreBytesMatcher( const std::string& eaname, + bool createIfNotThere = true ) + : + eaname( eaname ), + m_createIfNotThere( createIfNotThere ) + {} + + inline bool operator()( const fh_context& c ) const + { + if( !isBound(c) ) + return false; + + if( !c->isAttributeBound(eaname, m_createIfNotThere ) ) + return false; + + try + { + fh_attribute a = c->getAttribute( eaname ); + fh_istream iss = a->getIStream(); + char ch; + return iss >> ch; + } + catch( exception& e ) + { + return false; + } + } + }; + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_EAValueGreaterEqMTime + { + std::string eaname; + matcher_EAValueGreaterEqMTime( const std::string& eaname ) : eaname( eaname ) {} + + inline bool operator()( const fh_context& c ) const + { + if( !isBound(c) ) + return false; + + time_t eaname_tt = toType< time_t >( getStrAttr( c, eaname, "0" )); + time_t mtime_tt = toType< time_t >( getStrAttr( c, "mtime", "1" )); + +// cerr << "matcher_EAValueGreaterEqMTime() c:" << c->getURL() << endl +// << " eaname:" << eaname +// << " eaname_tt:" << eaname_tt +// << " mtime_tt:" << mtime_tt +// << " ret:" << ( eaname_tt >= mtime_tt ) +// << endl; + + return( eaname_tt >= mtime_tt ); + } + }; + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_equal + { + std::string eaname; + std::string value; + + matcher_equal( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( value ) + {} + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && s == value; + } + }; + + struct FERRISEXP_DLLLOCAL matcher_typesafe_equal + : + public matcher_typesafe_base + { + + matcher_typesafe_equal( const std::string& eaname, const std::string& value ) + : + matcher_typesafe_base( eaname, value ) + { + FunctionTable["string"] = Factory::MakeEqualBinaryMatcher( eaname, value ); + FunctionTable["cis"] = Factory::MakeEqualCISMatcher( eaname, value ); + FunctionTable["double"] = Factory::MakeEqualDoubleMatcher( eaname, toType(value)); + FunctionTable["float"] = Factory::MakeEqualDoubleMatcher( eaname, toType(value)); + FunctionTable["int"] = Factory::MakeEqualIntegerMatcher( eaname, toType(value)); + FunctionTable["binary"] = Factory::MakeEqualBinaryMatcher( eaname, value ); + + time_t tt = Time::ParseRelativeTimeString( value ); + FunctionTable["time"] = Factory::MakeEqualIntegerMatcher( eaname, tt ); + + guint64 sz = Util::convertByteString( value ); + FunctionTable["size"] = Factory::MakeEqualIntegerMatcher( eaname, sz ); + } + }; + + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_endswith + { + std::string eaname; + std::string value; + + matcher_endswith( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( value ) + {} + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && ends_with( s, value ); + } + }; + struct FERRISEXP_DLLLOCAL matcher_endswith_cis + { + std::string eaname; + std::string value; + + matcher_endswith_cis( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( toupperstring(value) ) + {} + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && ends_with( toupperstring(s), value ); + } + }; + + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_startswith + { + std::string eaname; + std::string value; + + matcher_startswith( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( value ) + {} + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && starts_with( s, value ); + } + }; + struct FERRISEXP_DLLLOCAL matcher_startswith_cis + { + std::string eaname; + std::string value; + + matcher_startswith_cis( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + value( toupperstring(value) ) + {} + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && starts_with( toupperstring(s), value ); + } + }; + + + /********************/ + /********************/ + /********************/ + + struct FERRISEXP_DLLLOCAL matcher_regex + { + mutable fh_rex r; + std::string eaname; + + matcher_regex( const std::string& eaname, + const std::string& value ) + : + eaname( eaname ), + r( toregexhi( value ) ) + { + static boost::regex hasUppers = toregex( "[A-Z]" ); + if( regex_search( value, hasUppers )) + { + r = toregexh( value ); + } + } + + inline bool operator()( const fh_context& c ) const + { + string s; + return getEAStringOrFalse( c, eaname, s ) + && regex_search( s, r ); +// && r->operator()( s ); + } + }; + + + /**********/ + /**********/ + /**********/ + +// struct matcher_greq +// { +// long value; +// std::string eaname; + +// matcher_greq( const std::string& eaname, long value ) +// : +// eaname( eaname ), +// value( value ) +// {} + +// inline bool operator()( const fh_context& c ) const +// { +// long v = 0; +// return getEALongOrFalse( c, eaname, v ) +// && v >= value; +// } +// }; + + struct FERRISEXP_DLLLOCAL matcher_typesafe_greq + : + public matcher_typesafe_base + { + + matcher_typesafe_greq( const std::string& eaname, const std::string& value ) + : + matcher_typesafe_base( eaname, value ) + { + FunctionTable["string"] = Factory::MakeGrEqBinaryMatcher( eaname, value ); + FunctionTable["cis"] = Factory::MakeGrEqCISMatcher( eaname, value ); + FunctionTable["double"] = Factory::MakeGrEqDoubleMatcher( eaname, toType(value)); + FunctionTable["float"] = Factory::MakeGrEqDoubleMatcher( eaname, toType(value)); + FunctionTable["int"] = Factory::MakeGrEqMatcher( eaname, toType(value)); + FunctionTable["binary"] = Factory::MakeGrEqBinaryMatcher( eaname, value ); + + time_t tt = Time::ParseRelativeTimeString( value ); + FunctionTable["time"] = Factory::MakeGrEqMatcher( eaname, tt ); + + guint64 sz = Util::convertByteString( value ); + FunctionTable["size"] = Factory::MakeGrEqMatcher( eaname, sz ); + + } + }; + + /**********/ + /**********/ + /**********/ + + template< class T, class Compare > + struct matcher_compare_numeric + { + T value; + std::string eaname; + + matcher_compare_numeric( const std::string& eaname, T value ) + : + eaname( eaname ), + value( value ) + {} + + inline bool operator()( const fh_context& c ) const + { + T v = 0; + return getEAOrFalse( c, eaname, v ) && Compare()( v, value ); + } + }; + + template< class Compare > + struct matcher_compare_case_sensitive_string + { + const std::string value; + std::string eaname; + + matcher_compare_case_sensitive_string( const std::string& eaname, const std::string& value ) + : + eaname( eaname ), + value( value ) + {} + + inline bool operator()( const fh_context& c ) const + { + std::string v = ""; + return getEAStringOrFalse( c, eaname, v ) && Compare()( v, value ); + } + }; + + template< class Compare > + struct matcher_compare_case_insensitive_string + { + const std::string value; + std::string eaname; + + matcher_compare_case_insensitive_string( const std::string& eaname, const std::string& value ) + : + eaname( eaname ), + value( tolowerstr()( value ) ) + {} + + inline bool operator()( const fh_context& c ) const + { + static tolowerstr tls; + std::string v = ""; + return getEAStringOrFalse( c, eaname, v ) && Compare()( tls( v ), value ); + } + }; + + struct FERRISEXP_DLLLOCAL matcher_typesafe_lteq + : + public matcher_typesafe_base + { + matcher_typesafe_lteq( const std::string& eaname, const std::string& value ) + : + matcher_typesafe_base( eaname, value ) + { + FunctionTable["string"] = Factory::MakeLtEqBinaryMatcher( eaname, value ); + FunctionTable["cis"] = Factory::MakeLtEqCISMatcher( eaname, value ); + FunctionTable["double"] = Factory::MakeLtEqDoubleMatcher( eaname, toType(value)); + FunctionTable["float"] = Factory::MakeLtEqDoubleMatcher( eaname, toType(value)); + FunctionTable["int"] = Factory::MakeLtEqMatcher( eaname, toType(value)); + FunctionTable["binary"] = Factory::MakeLtEqBinaryMatcher( eaname, value ); + + time_t tt = Time::ParseRelativeTimeString( value ); + FunctionTable["time"] = Factory::MakeLtEqMatcher( eaname, tt ); + + guint64 sz = Util::convertByteString( value ); + FunctionTable["size"] = Factory::MakeLtEqMatcher( eaname, sz ); + + } + }; + + /**********/ + /**********/ + /**********/ + +// struct matcher_greq_double +// { +// double value; +// std::string eaname; + +// matcher_greq_double( const std::string& eaname, double value ) +// : +// eaname( eaname ), +// value( value ) +// {} + +// inline bool operator()( const fh_context& c ) const +// { +// double v = 0.0; +// return getEADoubleOrFalse( c, eaname, v ) +// && v >= value; +// } +// }; + +// struct matcher_lteq_double +// { +// double value; +// std::string eaname; + +// matcher_lteq_double( const std::string& eaname, double value ) +// : +// eaname( eaname ), +// value( value ) +// {} + +// inline bool operator()( const fh_context& c ) const +// { +// double v = 0.0; +// return getEADoubleOrFalse( c, eaname, v ) +// && v <= value; +// } +// }; + + struct FERRISEXP_DLLLOCAL matcher_not + { + fh_matcher fun; + + matcher_not( fh_matcher fun ) + : + fun( fun ) + {} + + inline bool operator()( const fh_context& c ) + { + return !fun(c); + } + }; + + struct FERRISEXP_DLLLOCAL matcher_and + { + fh_matcher leftf; + fh_matcher rightf; + + matcher_and( fh_matcher leftf, fh_matcher rightf ) + : + leftf( leftf ), + rightf( rightf ) + {} + + inline bool operator()( const fh_context& c ) + { + return leftf( c ) && rightf( c ); + } + }; + + struct FERRISEXP_DLLLOCAL matcher_or + { + fh_matcher leftf; + fh_matcher rightf; + + matcher_or( fh_matcher leftf, fh_matcher rightf ) + : + leftf( leftf ), + rightf( rightf ) + {} + + inline bool operator()( const fh_context& c ) + { + return leftf( c ) || rightf( c ); + } + }; + + struct FERRISEXP_DLLLOCAL matcher_true + { + inline bool operator()( const fh_context& c ) const + { return true; } + }; + + struct FERRISEXP_DLLLOCAL matcher_false + { + inline bool operator()( const fh_context& c ) const + { return false; } + }; + + + namespace Factory + { + template + fh_matcher ComposeXMatcher( const EndingList& el ) + { + fh_matcher ret; + Util::SingleShot virgin; + + for( EndingList::const_iterator iter = el.begin(); + iter != el.end(); ++iter ) + { + if( virgin() ) + { + ret = MatcherXType( iter->first, iter->second ); + } + else + { + fh_matcher f = MatcherXType( iter->first, iter->second ); + ret = matcher_or( ret, f ); + } + } + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_matcher ComposeEqualsMatcher( const EndingList& el ) + { + return ComposeXMatcher( el ); + } + + fh_matcher ComposeEndsWithMatcher( const EndingList& el, bool caseSensitive ) + { + if( !caseSensitive ) + return ComposeXMatcher( el ); + return ComposeXMatcher( el ); + } + + fh_matcher + ComposeEndsWithMatcher( const char** beg, bool caseSensitive ) + { + Factory::EndingList ret; + + const char** iter = beg; + while( *iter ) + { + string f = *iter; + ++iter; + string s = *iter; + ++iter; + + ret.push_back( make_pair( f, s ) ); + } + return ComposeEndsWithMatcher( ret, caseSensitive ); + } + + fh_matcher ComposeRegexMatcher( const EndingList& el ) + { + return ComposeXMatcher( el ); + } + + fh_matcher MakeAlwaysTrueMatcher() + { + return matcher_true(); + } + + fh_matcher MakeAlwaysFalseMatcher() + { + return matcher_false(); + } + + fh_matcher MakeNotMatcher( const fh_matcher& m ) + { + return matcher_not( m ); + } + + fh_matcher MakeOrMatcher( const fh_matcher& leftm, const fh_matcher& rightm ) + { + return matcher_or( leftm, rightm ); + } + + fh_matcher MakeAndMatcher( const fh_matcher& leftm, const fh_matcher& rightm ) + { + return matcher_and( leftm, rightm ); + } + + fh_matcher MakePresenceMatcher( const std::string& eaname ) + { + return matcher_presence( eaname ); + } + + fh_matcher MakeHasOneOrMoreBytesMatcher( const std::string& eaname, + bool createIfNotThere ) + { + return matcher_MakeHasOneOrMoreBytesMatcher( eaname, createIfNotThere ); + } + + fh_matcher MakeEAValueGreaterEqMTime( const std::string& eaname ) + { + return matcher_EAValueGreaterEqMTime( eaname ); + } + + + + /********************/ + /********************/ + /********************/ + + fh_matcher MakeEqualMatcher( const std::string& eaname, const std::string& value ) + { + return MakeEqualBinaryMatcher( eaname, value ); + } + fh_matcher MakeEqualIntegerMatcher( const std::string& eaname, long value ) + { + return matcher_compare_numeric< long, equal_to< long > >( eaname, value ); + } + fh_matcher MakeEqualDoubleMatcher( const std::string& eaname, double value ) + { + return matcher_compare_numeric< double, equal_to< double > >( eaname, value ); + } + fh_matcher MakeEqualBinaryMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_sensitive_string< equal_to< string > >( eaname, value ); + } + fh_matcher MakeEqualCISMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_insensitive_string< equal_to< string > >( eaname, value ); + } + fh_matcher MakeTypeSafeEqualMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_typesafe_equal( eaname, value ); + } + + + /********************/ + /********************/ + /********************/ + + fh_matcher MakeEndsWithMatcher( const std::string& eaname, + const std::string& value ) + { + return matcher_endswith( eaname, value ); + } + fh_matcher MakeStartsWithMatcher( const std::string& eaname, + const std::string& value ) + { + return matcher_startswith( eaname, value ); + } + + + + fh_matcher MakeRegexMatcher( const std::string& eaname, + const std::string& value ) + { + return matcher_regex( eaname, value ); + } + + /********************/ + /********************/ + /********************/ + + fh_matcher MakeGrEqMatcher( const std::string& eaname, long value ) + { + return matcher_compare_numeric< long, greater_equal< long > >( eaname, value ); + } + + fh_matcher MakeGrEqDoubleMatcher( const std::string& eaname, double value ) + { + return matcher_compare_numeric< double, greater_equal< double > >( eaname, value ); + } + + fh_matcher MakeGrEqBinaryMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_sensitive_string< greater_equal< string > >( eaname, value ); + } + + fh_matcher MakeGrEqCISMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_insensitive_string< greater_equal< string > >( eaname, value ); + } + + fh_matcher MakeTypeSafeGrEqMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_typesafe_greq( eaname, value ); + } + + /********************/ + /********************/ + /********************/ + + fh_matcher MakeLtEqMatcher( const std::string& eaname, long value ) + { + return matcher_compare_numeric< long, less_equal< long > >( eaname, value ); + } + + fh_matcher MakeLtEqDoubleMatcher( const std::string& eaname, double value ) + { + return matcher_compare_numeric< double, less_equal< double > >( eaname, value ); + } + + fh_matcher MakeLtEqBinaryMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_sensitive_string< less_equal< string > >( eaname, value ); + } + + fh_matcher MakeLtEqCISMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_compare_case_insensitive_string< less_equal< string > >( eaname, value ); + } + + fh_matcher MakeTypeSafeLtEqMatcher( const std::string& eaname, const std::string& value ) + { + return matcher_typesafe_lteq( eaname, value ); + } + + /********************/ + /********************/ + /********************/ + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +/* + * Create an object factory with id of token here. + * + * What if, binary function is a template that takes a pointer to a class + * with + * void setLeft( VirtaulMatcher* ); + * void setRight( VirtaulMatcher* ); + * VirtaulMatcher* operator(); + * fh_matcher style function + * + */ + + const string TOKENATTR = "token"; + fh_matcher ResolveFilter( fh_context filter ); + string getToken( fh_context filter ); + + + namespace FilteredContextNameSpace + { + class BinaryOperationBase; + }; + + template < class Product > + struct MakeObject + { + static FilteredContextNameSpace::BinaryOperationBase* Create() + { + return new Product(); + } + }; + + + +// typedef Loki::SingletonHolder< +// Loki::Factory< +// FilteredContextNameSpace::BinaryOperationBase, +// string, +// FilteredContextNameSpace::BinaryOperationBase* (*)() +// > +// > +// OpFactory; + typedef Loki::SingletonHolder< + Loki::Factory< FilteredContextNameSpace::BinaryOperationBase, string >, + Loki::CreateUsingNew, Loki::NoDestroy > + OpFactory; + + + namespace FilteredContextNameSpace + { + + + class FERRISEXP_DLLLOCAL UnEscapeLDAPFilterValueFailed : public FerrisVFSExceptionBase + { + public: + + inline UnEscapeLDAPFilterValueFailed( + const FerrisException_CodeState& state, + fh_ostream log, + const string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("UnEscapeLDAPFilterValueFailed"); + } + }; +#define Throw_UnEscapeLDAPFilterValueFailed(e,a) \ +throw UnEscapeLDAPFilterValueFailed( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + + /* + * Convert \2A in the input string into '*' in the output string. + * Note that ctx is passed in for better debugging when exceptions + * are thrown. It should be the context that is closest to where + * the input was derived from. + * + * Char Hex + * '*' 0x2A + * '(' 0x28 + * ')' 0x29 + * '\' 0x5C + * '\0' 0x00 + * + * Extensions to LDAP + * + * '~' 0x7E (needed for =~ regex match) + */ + FERRISEXP_DLLLOCAL string + UnEscapeLDAPFilterValue( const string& input, const fh_context& ctx ) + { + LG_FILTERPARSE_D << "UnEscapeLDAPFilterValue() input:" << input << endl; + + ostringstream oss; + istringstream iss(input); + int bytesRead = 0; + char ch = 0; + + while( iss >> ch ) + { + + if( ch == '\\' ) + { + char ch1 = 0; + char ch2 = 0; + + if( iss >> ch1 ) + { + if( iss >> ch2 ) + { + stringstream tss; + int v = 0; + + if( ch1 >= '0' && ch1 <= '9' && ch2 >= '0' && ch2 <= '9' ) + { + tss << ch1 << ch2; + tss >> v; + oss << (char)v; + } + else + { + oss << ch << ch1 << ch2; + } + bytesRead += 3; + continue; + } + else + { + ++bytesRead; + oss << ch1; + continue; + } + } + else + { + ++bytesRead; + oss << ch; + break; + } + + +// else +// { +// ostringstream ss; +// ss << "Error in UnEscapeLDAPFilterValue() at offset:" << bytesRead; +// Throw_UnEscapeLDAPFilterValueFailed(tostr(ss),GetImpl(ctx)); +// } + } + ++bytesRead; + oss << ch; + } + + string output = tostr(oss); + LG_FILTERPARSE_D << "UnEscapeLDAPFilterValue() output:" << output << endl; + return output; + } + + + + class FERRISEXP_DLLLOCAL BinaryOperationBase + { + private: + + fh_context L; + fh_context R; + fh_context filter; + fh_istream orderedListStream; + + virtual fh_context getN() + { + string name; + getline( orderedListStream, name ); + + LG_FILTERPARSE_D << " getN() :" << name << endl; + fh_context c = filter->getSubContext( name ); + LG_FILTERPARSE_D << " c:" << c->getDirPath() << endl; + + return c; + } + + protected: + + public: + BinaryOperationBase() + : + L(0), R(0), filter(0) + { + } + + void setFilter( const fh_context& v ) + { + filter = v; + } + + + void setLeft ( fh_context v ) + { + LG_FILTERPARSE_D << " setLeft() v->path:" << v->getDirPath() << endl; + L = v; + } + + void setRight( fh_context v ) + { + R = v; + } + + virtual void setIStream( const fh_istream& v ) + { + orderedListStream = v; + } + + + + virtual fh_context getLeft() + { + LG_FILTERPARSE_D << " getLeft(1) isBound: " << isBound(L) << endl; + + if( isBound(L) ) + { + return L; + } + setLeft(getN()); + + LG_FILTERPARSE_D << " getLeft(2) isBound: " << isBound(L) << endl; +// L = getN(); + LG_FILTERPARSE_D << " getLeft(3) isBound: " << isBound(L) << endl; + return L; + } + + virtual fh_context getRight() + { + if( !isBound(L) ) + { + getLeft(); + } + + if( isBound(R) ) + { + return R; + } + setRight(getN()); + return R; + } + + virtual fh_context getNextNode() + { + if( !isBound(R) ) + { + getRight(); + } + return getN(); + } + + + virtual fh_matcher operator()() = 0; + }; + + + + template < const string& TypeID, class TypeClass > + class BinaryOperation : public BinaryOperationBase + { + protected: + + fh_context L; + fh_context R; + + public: + BinaryOperation() + : + L(0), R(0) + { + OpFactory::Instance().Register( TypeID, &MakeObject::Create ); + } + + + virtual void setLeft ( const fh_context& v ) + { + L = v; + } + + virtual void setRight( const fh_context& v ) + { + R = v; + } + + virtual fh_matcher operator()() = 0; + }; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string EqualsToken = "=="; + class FERRISEXP_DLLLOCAL EqualsOp : public BinaryOperation< EqualsToken, EqualsOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + if( val == "*" ) + { + return Factory::MakePresenceMatcher( key ); + } + + string comparisonOperator = guessComparisonOperatorFromData( val ); + + if( comparisonOperator == "string" ) + return Factory::MakeEqualBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "cis" ) + return Factory::MakeEqualCISMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "int" ) + return Factory::MakeEqualIntegerMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + if( comparisonOperator == "double" || comparisonOperator == "float" ) + return Factory::MakeEqualDoubleMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + return Factory::MakeEqualBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + + } + }; + static EqualsOp EqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string TypeSafeEqualsToken = "=?="; + class FERRISEXP_DLLLOCAL TypeSafeEqualsOp : public BinaryOperation< TypeSafeEqualsToken, TypeSafeEqualsOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + if( val == "*" ) + { + return Factory::MakePresenceMatcher( key ); + } + + return Factory::MakeTypeSafeEqualMatcher( key, UnEscapeLDAPFilterValue(val, valc) ); + } + }; + static TypeSafeEqualsOp TypeSafeEqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string ReEqualsToken = "=~"; + class FERRISEXP_DLLLOCAL ReEqualsOp : public BinaryOperation< ReEqualsToken, ReEqualsOp > + { + public: + virtual fh_matcher operator()() + { + string val = ""; + fh_context valc = 0; + + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + + try + { + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + valc = getRight(); + val = getToken( valc ); + } + catch( NoSuchSubContext& e ) + {} + + string key = getToken( getLeft() ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + +// cerr << "Make a RE matcher for" +// << " key:" << key << " val:" << val << endl; + + if( valc ) + val = UnEscapeLDAPFilterValue(val, valc); + + return Factory::MakeRegexMatcher( key, val ); + } + }; + static ReEqualsOp ReEqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string GrEqualsToken = ">="; + class FERRISEXP_DLLLOCAL GrEqualsOp : public BinaryOperation< GrEqualsToken, GrEqualsOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + string comparisonOperator = guessComparisonOperatorFromData( val ); + + if( comparisonOperator == "string" ) + return Factory::MakeGrEqBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "cis" ) + return Factory::MakeGrEqCISMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "int" ) + return Factory::MakeGrEqMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + if( comparisonOperator == "double" || comparisonOperator == "float" ) + return Factory::MakeGrEqDoubleMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + return Factory::MakeGrEqBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + } + }; + static GrEqualsOp GrEqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string TypeSafeGrEqualsToken = ">?="; + + class FERRISEXP_DLLLOCAL TypeSafeGrEqualsOp : public BinaryOperation< TypeSafeGrEqualsToken, TypeSafeGrEqualsOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + return Factory::MakeTypeSafeGrEqMatcher( + key, UnEscapeLDAPFilterValue(val, valc)); + } + }; + static TypeSafeGrEqualsOp TypeSafeGrEqualsOpObj; + + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string LtEqualsToken = "<="; + class FERRISEXP_DLLLOCAL LtEqualsOp : public BinaryOperation< LtEqualsToken, LtEqualsOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + string comparisonOperator = guessComparisonOperatorFromData( val ); + +// cerr << "LtEqualsOp compOp is:" << comparisonOperator +// << " value:" << val << endl; + + if( comparisonOperator == "string" ) + return Factory::MakeLtEqBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "cis" ) + return Factory::MakeLtEqCISMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + if( comparisonOperator == "int" ) + return Factory::MakeLtEqMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + if( comparisonOperator == "double" || comparisonOperator == "float" ) + return Factory::MakeLtEqDoubleMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + return Factory::MakeLtEqBinaryMatcher( key, UnEscapeLDAPFilterValue(val, valc)); + } + }; + static LtEqualsOp LtEqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string TypeSafeLtEqualsToken = " + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + return Factory::MakeTypeSafeLtEqMatcher( + key, UnEscapeLDAPFilterValue(val, valc)); + } + }; + static TypeSafeLtEqualsOp TypeSafeLtEqualsOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string GrEqualsTokenFloatingPoint = ".>="; + class FERRISEXP_DLLLOCAL GrEqualsOpFloatingPoint + : public BinaryOperation< GrEqualsTokenFloatingPoint, GrEqualsOpFloatingPoint > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + return Factory::MakeGrEqDoubleMatcher( + key, toType(UnEscapeLDAPFilterValue(val, valc))); + } + }; + static GrEqualsOpFloatingPoint GrEqualsOpFloatingPointObj; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string LtEqualsTokenFloatingPoint = ".<="; + class FERRISEXP_DLLLOCAL LtEqualsOpFloatingPoint + : public BinaryOperation< LtEqualsTokenFloatingPoint, LtEqualsOpFloatingPoint > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_context valc = getRight(); + string key = getToken( getLeft() ); + string val = getToken( valc ); + LG_FILTERPARSE_D << " key:" << key << " val:" << val << endl; + + return Factory::MakeLtEqDoubleMatcher( + key, toType( UnEscapeLDAPFilterValue(val, valc))); + } + }; + static LtEqualsOpFloatingPoint LtEqualsOpFloatingPointObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string EndsWithToken = "~"; + class FERRISEXP_DLLLOCAL EndsWithOp : public BinaryOperation< EndsWithToken, EndsWithOp > + { + public: + virtual fh_matcher operator()() + { + string key = getToken( getLeft() ); + string val = getToken( getRight() ); + return Factory::MakeEndsWithMatcher( key, val ); + } + }; + static EndsWithOp EndsWithOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string NotToken = "!"; + class FERRISEXP_DLLLOCAL NotOp : public BinaryOperation< NotToken, NotOp > + { + public: + virtual fh_matcher operator()() + { + fh_matcher orig = ResolveFilter( getLeft() ); + return Factory::MakeNotMatcher( orig ); + } + }; + static NotOp NotOpObj; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string AndToken = "&"; + class FERRISEXP_DLLLOCAL AndOp : public BinaryOperation< AndToken, AndOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_matcher leftm = ResolveFilter( getLeft() ); + fh_matcher rightm = ResolveFilter( getRight() ); + fh_matcher ret = Factory::MakeAndMatcher( leftm, rightm ); + + try + { + while( true ) + { + fh_matcher nextm = ResolveFilter( getNextNode() ); + ret = Factory::MakeAndMatcher( ret, nextm ); + } + } + catch( NoSuchSubContext& e ) + {} + + return ret; + } + }; + static AndOp AndOpObj; + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + const string OrToken = "|"; + class FERRISEXP_DLLLOCAL OrOp : public BinaryOperation< OrToken, OrOp > + { + public: + virtual fh_matcher operator()() + { + LG_FILTERPARSE_D << " OrOp" << endl; + LG_FILTERPARSE_D << " L:" << getLeft() ->getDirPath() << endl; + LG_FILTERPARSE_D << " R:" << getRight()->getDirPath() << endl; + fh_matcher leftm = ResolveFilter( getLeft() ); + fh_matcher rightm = ResolveFilter( getRight() ); + fh_matcher ret = Factory::MakeOrMatcher( leftm, rightm ); + + try + { + while( true ) + { + fh_matcher nextm = ResolveFilter( getNextNode() ); + ret = Factory::MakeOrMatcher( ret, nextm ); + } + } + catch( NoSuchSubContext& e ) + {} + + return ret; + } + }; + static OrOp OrOpObj; + + }; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + string + getToken( fh_context filter ) + { + LG_FILTERPARSE_D << " getToken() filter:" << filter->getDirPath() << endl; +// LG_FILTERPARSE_D << " dirpath:" << filter->getDirPath() << endl; +// LG_FILTERPARSE_D << " bound:" << isBound(filter) << endl; + + string token; +// filter->dumpAttributeNames(); +// LG_FILTERPARSE_D << " TOKENATTR: " << TOKENATTR << endl; +// LG_FILTERPARSE_D << " TOKENATTR: " << TOKENATTR << endl; + + try { +// LG_FILTERPARSE_D << " going1" << endl; + fh_attribute tattr = filter->getAttribute( TOKENATTR ); +// LG_FILTERPARSE_D << " going2" << endl; + + LG_FILTERPARSE_D << " getToken() tattr:" << tattr->getDirPath() << endl; + fh_istream tss = tattr->getIStream(); + getline( tss, token ); + LG_FILTERPARSE_D << " getToken() token:" << token << endl; + } + catch( FerrisExceptionBase& e ) + { + LG_FILTERPARSE_D << e.what() << endl; + } + catch( exception& e ) + { + LG_FILTERPARSE_D << "gen:" << e.what() << endl; + } + catch(...) + { + LG_FILTERPARSE_D << "getToken() cought an unkown exception!" <getInsideResolve(); + + LG_FILTERPARSE_D << " resolving filter:" << filter->getDirPath() << endl; + + string token = getToken( filter ); + LG_FILTERPARSE_D << " token:" << token << endl; + + FilteredContextNameSpace::BinaryOperationBase* bo = + OpFactory::Instance().CreateObject( token ); + + LG_FILTERPARSE_D << " filter:" << filter->getDirPath() << endl; +// filter->dumpAttributeNames(); +// LG_FILTERPARSE_D << " filter:" << filter->getDirPath() << endl; + + + fh_attribute inorderlist = filter->getAttribute( "in-order-insert-list" ); + +// string leftname; +// string rightname; + fh_istream inorderlistss = inorderlist->getIStream(); + bo->setFilter( filter ); + bo->setIStream( inorderlistss ); + + +// getline( inorderlistss, leftname ); +// getline( inorderlistss, rightname ); + +// LG_FILTERPARSE_D << " leftname :" << leftname << endl; +// LG_FILTERPARSE_D << " rightname:" << rightname << endl; +// fh_context leftc = filter->getSubContext( leftname ); +// LG_FILTERPARSE_D << " leftc:" << leftc->getDirPath() << endl; +// bo->setLeft ( leftc ); +// LG_FILTERPARSE_D << " filter:" << filter->getDirPath() << endl; +// bo->setRight( filter->getSubContext( rightname )); +// LG_FILTERPARSE_D << " filter:" << filter->getDirPath() << endl; + + fh_matcher ret = bo->operator()(); + delete bo; + return ret; + } + + + + namespace Factory + { + + fh_filtContext FilteredView( const fh_context& ctx, const fh_matcher& matcher ) + { + return new FilteredContext( ctx, matcher ); + } + + fh_matcher MakeMatcherFromContext( fh_context f ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + f->read(); + ContextCollection::SubContextNames_t names = f->getSubContextNames(); + fh_context root_of_filter = f->getSubContext( *(names.begin()) ); + fh_matcher filt = ResolveFilter( root_of_filter ); + return filt; + } + + fh_context MakeFilteredContext( fh_context& ctx, const std::string& filterString ) + { + fh_context filter = Factory::MakeFilter( filterString ); + return Factory::MakeFilteredContext( ctx, filter ); + } + + fh_context MakeFilteredContext( fh_context& ctx, fh_context& f ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + LG_FILTERPARSE_D << " f:" << f->getDirPath() << endl; + + f->read(); + + LG_FILTERPARSE_D << " SubContextCount: " << f->SubContextCount() << endl; + + ContextCollection::SubContextNames_t names = f->getSubContextNames(); + +// cerr << "--- MakeFilteredContext() ---" << endl; +// for( ContextCollection::SubContextNames_t::iterator iter = names.begin(); +// iter != names.end(); +// ++iter ) +// { +// cerr << "--- iter:" << *iter << endl; +// } +// cerr << "--- MakeFilteredContext() ---" << endl; +// cerr << " root_of_filter name:" << f->getDirName() << endl; +// cerr << " root_of_filter path:" << f->getDirPath() << endl; +// cerr << " root_of_filter rdn:" << *(names.begin()) << endl; + LG_FILTERPARSE_D << " root_of_filter rdn:" << *(names.begin()) << endl; + + + fh_context root_of_filter = f->getSubContext( *(names.begin()) ); + LG_FILTERPARSE_D << " root_of_filter:" << root_of_filter->getDirPath() << endl; + +// cerr << "MakeFilteredContext() f:" << f->getURL() +// << " f->staticstr:" << getStrAttr( f, "static-string", "" ) << endl; + + fh_matcher filt = ResolveFilter( root_of_filter ); + + LG_FILTERPARSE_D << " got matcher" << endl; + + + FilteredContext* retfc = new FilteredContext( ctx, filt ); + + fh_context ret; + Upcast( ret, retfc ); + retfc->setup(); + + retfc->setIsChainedViewContextRoot(); + +// cerr << "Setting filter EA to:" << getStrAttr( f, "static-string", "" ) << endl; + bool rc = retfc->addAttribute( "filter", + getStrAttr( f, "static-string", "" ), + FXD_FFILTER ); + + retfc->addAttribute( "in-order-insert-list", + getStrAttr( f, "in-order-insert-list", "" ), + FXD_STRINGLIST ); + +// cerr << "AddAttribute rc:" << rc << endl; +// cerr << "Getting filter EA:" << getStrAttr( retfc, "filter", "no" ) << endl; + +// { +// string v = "x value"; +// string k = "keyXXXXXXXX"; + +// retfc->addAttribute( k, v ); +// cerr << "Getting test EA:" << getStrAttr( retfc, k, "no2" ) << endl; + +// } + + return ret; + } + + fh_context MakeFilter( const string& v_const ) + { + string v = v_const; + + if( v.empty() ) + { + v = "(name=~.*)"; + } + + try + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + RootContextFactory fac; + + LG_FILTERPARSE_D << " filter:" << v << endl; + + fac.setContextClass( "ffilter" ); + fac.AddInfo( RootContextFactory::ROOT, "/" ); + fac.AddInfo( "StaticString", v ); + + LG_FILTERPARSE_D << " resolving(1) filter:" << v << endl; + fh_context c = fac.resolveContext( RESOLVE_EXACT ); + LG_FILTERPARSE_D << " resolving(2) filter:" << v << endl; + LG_FILTERPARSE_D << " resolving(2) c:" << c->getDirPath() << endl; + LG_FILTERPARSE_D << " resolving(3)" << endl; + + c->read(); + return c; + } + catch( CanNotReadContextPcctsParseFailed& e ) + { + stringstream ss; + const stringlist_t& sl = e.getSyntaxErrorList(); + ss << "Syntax error for ffilter:" << endl + << v << endl; + for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + { + ss << *si << endl; + } + Throw_FFilterSyntaxError( tostr(ss), 0 ); + } + catch( ... ) + { + throw; + } + } + + + fh_context MakeFilterFromFile( const string& v ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + RootContextFactory fac; + +// cerr << " filter:" << v << endl; + + fac.setContextClass( "ffilter" ); + fac.AddInfo( RootContextFactory::ROOT, v ); + fac.AddInfo( RootContextFactory::PATH, "" ); + fh_context c = fac.resolveContext( RESOLVE_EXACT ); + c->read(); + return c; + } + }; + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*** Filtered Context **********************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + void + FilteredContext::setupState( const fh_context& ctx, fh_matcher m ) + { + Delegate = ctx; + Matcher = m; + } + +/** + * Create a filtered context that uses the base context ctx and only exposes + * the contexts from the base context that return true under the predicate + * (matcher). Note that one *must* call setup() after this method for correct + * operation. + * + * @param ctx Base context + * @param matcher Predicate that must == true for each context from base to be shown + */ + FilteredContext::FilteredContext( + const fh_context& ctx, + fh_matcher matcher ) + : + ChainedViewContext(ctx, false), + Matcher( matcher ) + { + LG_FILTERPARSE_D << "======= FilteredContext::FilteredContext() ==========" << endl; + } + + FilteredContext::FilteredContext( Context* theParent, + const fh_context& ctx, + fh_matcher matcher ) + : + ChainedViewContext(ctx, false), + Matcher( matcher ) + { + setContext( theParent, ctx->getDirName() ); + } + + + FilteredContext::~FilteredContext() + { + LG_VM_D << "~FilteredContext() this:" << toVoid(this) << endl; + } + + + void + FilteredContext::populateFromDelegate() + { + LG_CTX_D << "FilteredContext::populateFromDelegate() url:" << getURL() << endl; + + Context::iterator ci = Delegate->begin(); + Context::iterator e = Delegate->end(); + + for( ; ci != e ; ++ci ) + { + try + { + filteringInsertContext( *ci ); + } + catch(NoSuchSubContext& e) + { + LG_CTX_ER << "FilteredContext::FilteredContext() " + << "Context:" << ci->getURL() + << " advertised but not presentable!" + << " e:" << e.what() + << endl; + } + } + + +// SubContextNames_t ls = Delegate->getSubContextNames(); + +// for( SubContextNames_t::iterator iter = ls.begin(); +// iter != ls.end(); iter++ ) +// { +// try { +// LG_FILTERPARSE_D << "Testing name:" << *iter << endl; +// fh_context c = Delegate->getSubContext( *iter ); +// filteringInsertContext( c ); +// } +// catch(NoSuchSubContext& e) +// { +// LG_CTX_ER << "FilteredContext::FilteredContext() " +// << "Context:" << *iter +// << " advertised but not presentable!" +// << " e:" << e.what() +// << endl; +// } +// } + } + + +/** + * Perform initial setup of items based on the matching predicate. Note that the + * caller *MUST* hold a reference to the object for this call to work. + */ + void + FilteredContext::setup() + { + LG_FILTERPARSE_D << "======= FilteredContext::setup() ==========" << endl; + +// cerr << "======= FilteredContext::setup() ==========" << endl; +// BackTrace(); + + populateFromDelegate(); + SetupEventConnections(); + } + + + + void + FilteredContext::read( bool force ) + { + if( ReadingDir ) + return; + + ReadingDirRAII __raii1( this, true ); + LG_CTX_D << "FilteredContext::read(starting) c:" << getURL() << endl; + +// if( !HaveReadDir ) +// { +// LG_CTX_D << "FilteredContext::read(1) c:" << getURL() << " sz:" << getItems().size() << endl; +// setup(); +// HaveReadDir = true; +// LG_CTX_D << "FilteredContext::read(1.b) c:" << getURL() << " sz:" << getItems().size() << endl; +// } +// else + { + ensureEventConnections(); + + if( isActiveView() && !getItems().empty() ) + { + LG_CTX_D << "FilteredContext::read(2) c:" << getURL() << " sz:" << getItems().size() << endl; + emitExistsEventForEachItem(); + } + else + { + LG_CTX_D << "FilteredContext::read(3) c:" << getURL() + << " sz:" << getItems().size() + << " Delegate.sz:" << Delegate->getItems().size() + << " local-version:" << getDirOpVersion() + << " delegate-version:" << Delegate->getDirOpVersion() + << endl; + if( getDirOpVersion() < Delegate->getDirOpVersion() ) + { + clearContext(); + populateFromDelegate(); + } + else + { + emitExistsEventForEachItem(); + } + } + } + + LG_CTX_D << "FilteredContext::read(complete) c:" << getURL() << endl; + } + + + +/** + * When a context is deleted from the base context it also gets removed from the filtering + * context. + */ + void + FilteredContext::OnDeleted( NamingEvent_Deleted* ev, string olddn, string newdn ) + { + Emit_Deleted( ev, newdn, olddn, 0 ); + Remove( ev->getSource()->getSubContext( olddn ) ); + } + + + + FilteredContext::filteringInsertContextCreator::filteringInsertContextCreator( const fh_context& ctx, + fh_matcher matcher ) + : + m_ctx( ctx ), + m_matcher( matcher ) + { + } + FilteredContext* + FilteredContext::filteringInsertContextCreator::create( Context* parent, const std::string& rdn ) const + { + return new FilteredContext( parent, m_ctx, m_matcher ); + } + void + FilteredContext::filteringInsertContextCreator::setupExisting( FilteredContext* fc ) const + { + fc->setupState( m_ctx, m_matcher ); + } + void + FilteredContext::filteringInsertContextCreator::setupNew( FilteredContext* fc ) const + { +// fc->SetupEventConnections(); + } + + + +/** + * If the matcher given at FilteredContext creation time allows the given context + * to be inserted then the context is inserted into this view, otherwise there + * is no action taken. + * + * @param c Context that may be inserted if it passes the filtering matcher. + */ + void + FilteredContext::filteringInsertContext( const fh_context& c, bool created ) + { + + LG_FILTERPARSE_D << "Filtering context:" << c->getDirPath() << endl; +// cerr << "Filtering context:" << c->getDirPath() << endl; +// BackTrace(); + + if( Matcher(c) ) + { + LG_FILTERPARSE_D << "PASS FOR Filtering context:" << c->getDirPath() << endl; + + FilteredContext* fc = 0; + fc = priv_ensureSubContext( c->getDirName(), fc, + filteringInsertContextCreator( c, Matcher ) ); + } + else + { + LG_FILTERPARSE_D << "FAIL FOR Filtering context:" << c->getDirPath() << endl; + } + } + + void + FilteredContext::UnPageSubContextsIfNeeded() + { +// cerr << "FilteredContext::UnPageSubContextsIfNeeded()" << endl; + if( isBound( Delegate ) ) + { + Delegate->UnPageSubContextsIfNeeded(); + } + + return; + } + + void + FilteredContext::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + LG_CTX_D << "FilteredContext::OnCreated() " << endl; + filteringInsertContext( subc, true ); + } + + +/** + * Add the newly discovered context to the view if it passes the matcher. + */ + void + FilteredContext::OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + string olddn, string newdn ) + { + LG_CTX_I << "FilteredContext::OnExists() " << endl; + filteringInsertContext( subc ); + } + + +/** + * Disallow and log any attempt to directly create a new context. + * All other methods should delegate the creation of new subcontexts to + * the underlying base context and from there the events will inform + * this context of the creation and we will in turn filter that new + * context. + */ + Context* + FilteredContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_CTX_ER << "priv_CreateContext() should never happen" << endl; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + int + FilteredContext::getNumberOfLocalAttributes() + { + return getLocalAttributeNames().size(); + } + + list< string >& + FilteredContext::getLocalAttributeNames() + { + static list< string > ret; + if( ret.empty() ) + { + ret.push_back( "filter" ); + ret.push_back( "in-order-insert-list" ); + } + return ret; + } + + + std::string + FilteredContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { +// cerr << "FilteredContext::private_getStrAttr() rdn:" << rdn +// << " local:" << ( find( getLocalAttributeNames().begin(), getLocalAttributeNames().end(), rdn ) +// != getLocalAttributeNames().end() ) +// << " OMCD:" << isBound(OverMountContext_Delegate) +// << " base::isBound:" << _Base::isAttributeBound( rdn ) +// << " ctx::isBound:" << Context::isAttributeBound( rdn ) +// << " del::isBound:" << Delegate->isAttributeBound( rdn ) +// << endl; + + if( find( getLocalAttributeNames().begin(), getLocalAttributeNames().end(), rdn ) + != getLocalAttributeNames().end() ) + return Context::private_getStrAttr( rdn, def, getAllLines, throwEx ); + return Delegate->private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + fh_attribute + FilteredContext::getAttribute( const string& rdn ) throw( NoSuchAttribute ) + { + if( find( getLocalAttributeNames().begin(), getLocalAttributeNames().end(), rdn ) + != getLocalAttributeNames().end() ) + { + return Context::getAttribute(rdn); + } + return Delegate->getAttribute(rdn); + } + + AttributeCollection::AttributeNames_t& + FilteredContext::getAttributeNames( AttributeNames_t& ret ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + Delegate->getAttributeNames( t1 ); + copy( getLocalAttributeNames().begin(), + getLocalAttributeNames().end(), + back_inserter( t2 ) ); + return mergeAttributeNames( ret, t1, t2 ); + } + + int + FilteredContext::getAttributeCount() + { + return getNumberOfLocalAttributes() + Delegate->getAttributeCount(); + } + + bool + FilteredContext::isAttributeBound( const std::string& rdn, + bool createIfNotThere + ) throw( NoSuchAttribute ) + { + if( find( getLocalAttributeNames().begin(), getLocalAttributeNames().end(), rdn ) + != getLocalAttributeNames().end() ) + return Context::isAttributeBound( rdn, createIfNotThere ); + return Delegate->isAttributeBound( rdn, createIfNotThere ); + } + +}; + diff --git a/Ferris/FilteredContext.hh b/Ferris/FilteredContext.hh new file mode 100644 index 0000000..bfaf52c --- /dev/null +++ b/Ferris/FilteredContext.hh @@ -0,0 +1,136 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FilteredContext.hh,v 1.5 2011/05/04 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_FILTERED_CONTEXT_HH_ +#define _ALREADY_INCLUDED_FERRIS_FILTERED_CONTEXT_HH_ + +namespace Ferris +{ + + namespace Factory + { + FERRISEXP_API fh_matcher ComposeEqualsMatcher( const EndingList& el ); + FERRISEXP_API fh_matcher ComposeEndsWithMatcher( const EndingList& el, bool caseSensitive = false ); + FERRISEXP_API fh_matcher ComposeEndsWithMatcher( const char** beg, bool caseSensitive = false ); + FERRISEXP_API fh_matcher ComposeRegexMatcher( const EndingList& el ); + FERRISEXP_API fh_matcher MakeAlwaysTrueMatcher(); + FERRISEXP_API fh_matcher MakeAlwaysFalseMatcher(); + FERRISEXP_API fh_matcher MakeNotMatcher( const fh_matcher& m ); + FERRISEXP_API fh_matcher MakeOrMatcher( const fh_matcher& leftm, const fh_matcher& rightm ); + FERRISEXP_API fh_matcher MakeAndMatcher( const fh_matcher& leftm, const fh_matcher& rightm ); + FERRISEXP_API fh_matcher MakePresenceMatcher( const std::string& eaname ); + FERRISEXP_API fh_matcher MakeHasOneOrMoreBytesMatcher( const std::string& eaname, + bool createIfNotThere = true ); + FERRISEXP_API fh_matcher MakeEAValueGreaterEqMTime( const std::string& eaname ); + + + FERRISEXP_API fh_matcher MakeEqualMatcher( const std::string& eaname, + const std::string& value ); + FERRISEXP_API fh_matcher MakeEqualIntegerMatcher( const std::string& eaname, + long value ); + FERRISEXP_API fh_matcher MakeEqualDoubleMatcher( const std::string& eaname, double value ); + FERRISEXP_API fh_matcher MakeEqualBinaryMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeEqualCISMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeTypeSafeEqualMatcher( const std::string& eaname, const std::string& value ); + + + FERRISEXP_API fh_matcher MakeEndsWithMatcher( const std::string& eaname, + const std::string& value ); + FERRISEXP_API fh_matcher MakeStartsWithMatcher( const std::string& eaname, + const std::string& value ); + FERRISEXP_API fh_matcher MakeRegexMatcher( const std::string& eaname, + const std::string& value ); + + FERRISEXP_API fh_matcher MakeLtEqMatcher( const std::string& eaname, long value ); + FERRISEXP_API fh_matcher MakeLtEqDoubleMatcher( const std::string& eaname, double value ); + FERRISEXP_API fh_matcher MakeLtEqBinaryMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeLtEqCISMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeTypeSafeLtEqMatcher( const std::string& eaname, const std::string& value ); + + FERRISEXP_API fh_matcher MakeGrEqMatcher( const std::string& eaname, long value ); + FERRISEXP_API fh_matcher MakeGrEqDoubleMatcher( const std::string& eaname, double value ); + FERRISEXP_API fh_matcher MakeGrEqBinaryMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeGrEqCISMatcher( const std::string& eaname, const std::string& value ); + FERRISEXP_API fh_matcher MakeTypeSafeGrEqMatcher( const std::string& eaname, const std::string& value ); + + } + + + + class FilteredContext; + FERRIS_SMARTPTR( FilteredContext, fh_filtContext ); + + namespace Factory + { + /** + * Create a filtered view of the given context using the matcher predicate + * + * @param ctx base of the new view + * @param matcher predicate + */ + FERRISEXP_API fh_filtContext FilteredView( const fh_context& ctx, const fh_matcher& matcher ); + + /** + * Turn a filter string into a filesystem ready to be used by + * MakeFilteredContext() to filter a view + */ + FERRISEXP_API fh_context MakeFilter( const std::string& v ); + + /** + * Read the file at 'v' and turn it into a filesystem ready to be used by + * MakeFilteredContext() to filter a view + */ + FERRISEXP_API fh_context MakeFilterFromFile( const std::string& v ); + + /** + * Take a filesystem created via either + * MakeFilter() + * MakeFilterFromFile() + * and a base filesystem 'ctx' and create a view with only objects + * passing the filter being shown + */ + FERRISEXP_API fh_context MakeFilteredContext( fh_context& ctx, fh_context& filter ); + FERRISEXP_API fh_context MakeFilteredContext( fh_context& ctx, const std::string& filterString ); + + /** + * Create a fh_matcher for external use on contexts + * nice for eg. selecting stuff in a GUI + */ + FERRISEXP_API fh_matcher MakeMatcherFromContext( fh_context c ); + + }; +}; +#endif + diff --git a/Ferris/FilteredContext_private.hh b/Ferris/FilteredContext_private.hh new file mode 100644 index 0000000..c06705f --- /dev/null +++ b/Ferris/FilteredContext_private.hh @@ -0,0 +1,144 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FilteredContext_private.hh,v 1.7 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FILTERED_CONTEXT_PRIVATE_HH_ +#define _ALREADY_INCLUDED_FILTERED_CONTEXT_PRIVATE_HH_ + +#include +#include +#include +#include + +namespace Ferris +{ + + FERRISEXP_API std::string guessComparisonOperatorFromData( const std::string& val ); + + + /* + * A context view that applies a matcher object to all items in the view. + * Items must pass the matcher to be presented via this view. + */ + class FERRISEXP_API FilteredContext + : + public ChainedViewContext + { + typedef FilteredContext _Self; + typedef ChainedViewContext _Base; + + fh_matcher Matcher; + + struct filteringInsertContextCreator + { + fh_context m_ctx; + fh_matcher m_matcher; + + filteringInsertContextCreator( const fh_context& ctx, fh_matcher matcher ); + FilteredContext* create( Context* parent, const std::string& rdn ) const; + void setupExisting( FilteredContext* fc ) const; + void setupNew( FilteredContext* fc ) const; + }; + + void setupState( const fh_context& ctx, fh_matcher m ); + FilteredContext( Context* theParent, const fh_context& ctx, fh_matcher matcher ); + virtual void UnPageSubContextsIfNeeded(); + + public: + + FilteredContext( const fh_context& ctx, fh_matcher matcher ); + virtual ~FilteredContext(); + + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + void filteringInsertContext( const fh_context& c, bool created = false ); + + virtual void read( bool force = 0 ); + + void populateFromDelegate(); + + // Setup is only to be called from the below function! + void setup(); + + protected: + + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** Handle ability to have local attributes aswell as those of delegate ********/ + /********************************************************************************/ + + int getNumberOfLocalAttributes(); + std::list< std::string >& getLocalAttributeNames(); + + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + public: + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + + + }; + + namespace FilteredContextNameSpace + { + extern const std::string EqualsToken; + extern const std::string TypeSafeEqualsToken; + extern const std::string ReEqualsToken; + extern const std::string GrEqualsToken; + extern const std::string TypeSafeGrEqualsToken; + extern const std::string LtEqualsToken; + extern const std::string TypeSafeLtEqualsToken; + extern const std::string GrEqualsTokenFloatingPoint; + extern const std::string LtEqualsTokenFloatingPoint; + extern const std::string EndsWithToken; + extern const std::string NotToken; + extern const std::string AndToken; + extern const std::string OrToken; + }; +}; + + +#endif + diff --git a/Ferris/ForwardEAIndexInterface.cpp b/Ferris/ForwardEAIndexInterface.cpp new file mode 100644 index 0000000..ea0be1a --- /dev/null +++ b/Ferris/ForwardEAIndexInterface.cpp @@ -0,0 +1,74 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2008 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ForwardEAIndexInterface.cpp,v 1.2 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "ForwardEAIndexInterface.hh" + +namespace Ferris +{ + namespace EAIndex + { + ForwardEAIndexInterface::ForwardEAIndexInterface() + : + m_precached( false ) + { + } + + + void + ForwardEAIndexInterface::addEAToPrecache( const std::string& rdn ) + { + m_precached = false; + m_EAToPrecache.insert( rdn ); + } + + void + ForwardEAIndexInterface::addEAToPrecache( const stringlist_t& sl ) + { + m_precached = false; + for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + m_EAToPrecache.insert( *si ); + } + + void + ForwardEAIndexInterface::addEAToPrecache( const stringset_t& sl ) + { + m_precached = false; + for( stringset_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + m_EAToPrecache.insert( *si ); + } + + void + ForwardEAIndexInterface::addDocumentID( docid_t id ) + { + m_docNumSet.insert( id ); + } + + + }; +}; diff --git a/Ferris/ForwardEAIndexInterface.hh b/Ferris/ForwardEAIndexInterface.hh new file mode 100644 index 0000000..390bfef --- /dev/null +++ b/Ferris/ForwardEAIndexInterface.hh @@ -0,0 +1,80 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2008 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ForwardEAIndexInterface.hh,v 1.2 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_EAIDX_FORWARDEAINDEXINTERFACE_H_ +#define _ALREADY_INCLUDED_FERRIS_EAIDX_FORWARDEAINDEXINTERFACE_H_ + +#include +#include + +namespace Ferris +{ + namespace EAIndex + { + /** + * EAIndex implementations that can offer forward lookups, + * url,eaname --> eavalue + * can implement this class to allow EA values to be exposed + * directly out of the EA Index. + */ + class FERRISEXP_API ForwardEAIndexInterface + : + public Handlable + { + public: + typedef guint32 docid_t; + typedef std::set< docid_t > docNumSet_t; + typedef docNumSet_t m_docNumSet_t; + + protected: + stringset_t m_EAToPrecache; + bool m_precached; + m_docNumSet_t m_docNumSet; + + ForwardEAIndexInterface(); + + public: + virtual void addEAToPrecache( const std::string& rdn ); + virtual void addEAToPrecache( const stringlist_t& sl ); + virtual void addEAToPrecache( const stringset_t& sl ); + virtual void addDocumentID( docid_t id ); + + virtual std::string getStrAttr( Context* c, + const std::string& earl, + const std::string& rdn, + const std::string& def, + bool throw_for_errors = true ) = 0; + + }; + + }; +}; + + +#endif diff --git a/Ferris/FullTextContext.cpp b/Ferris/FullTextContext.cpp new file mode 100644 index 0000000..76c63cf --- /dev/null +++ b/Ferris/FullTextContext.cpp @@ -0,0 +1,345 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextContext.cpp,v 1.5 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris::FullTextIndex; + + +namespace Ferris +{ + + void + FullTextQueryRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + void + FullTextQueryRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + // We have to setup the query engines. + fh_context child = 0; + + LG_IDX_D << "FullTextQueryRootContext::priv_read() setting up root" << endl; + + child = new FullTextQueryContext_Ranked( this, "ranked" ); + Insert( GetImpl(child), false, false ); + + child = new FullTextQueryContext_Boolean( this, "boolean" ); + Insert( GetImpl(child), false, false ); + +// LG_IDX_D << "priv_read() child ppath:" << child->getParent()->getDirPath() << endl; +// LG_IDX_D << "priv_read() child paddr:" << toVoid(child->getParent()) << endl; +// LG_IDX_D << "priv_read() child u:" << child->getURL() << endl; +// LG_IDX_D << "priv_read() child p:" << child->getDirPath() << endl; +// LG_IDX_D << "priv_read() child r:" << child->getDirName() << endl; + +// LG_IDX_D << "priv_read() setup root complete" << endl; +// dumpOutItems(); + } + } + + + + FullTextQueryRootContext::FullTextQueryRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + FullTextQueryRootContext::~FullTextQueryRootContext() + { + } + + fh_context + FullTextQueryRootContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "fulltextquery:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + + void + FullTextQueryRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + class FERRISEXP_DLLLOCAL FullTextQueryRootContext_RootContextDropper + : + public RootContextDropper + { + public: + FullTextQueryRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("fulltextquery"); + RootContextFactory::Register( "fulltextquery", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new FullTextQueryRootContext();; + } + return c; + } + }; + static FullTextQueryRootContext_RootContextDropper ___FullTextQueryRootContext_static_init; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + FullTextQueryRunnerContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["file"] = SubContextCreator( + SL_SubCreate_file, + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + void + FullTextQueryRunnerContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + // + // Treat the attempt to view a context as the initiation of a query + // if the dir isn't already there then call performQuery() to make it + // Short cut loading each dir unless absolutely needed. + // + fh_context + FullTextQueryRunnerContext::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + if( priv_isSubContextBound( rdn ) ) + { + return _Base::priv_getSubContext( rdn ); + } + + if( rdn.empty() ) + { + fh_stringstream ss; + ss << "NoSuchSubContext no rdn given"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + fh_context qc = performQuery( rdn ); + if( !isBound( qc ) ) + { + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + FerrisInternal::reparentSelectionContext( this, qc, rdn ); + SelectionContext* selc = dynamic_cast( GetImpl(qc) ); + selc->setReportedRDN( rdn ); + Insert( GetImpl( qc ) ); + + return qc; + } + catch( NoSuchSubContext& e ) + { + throw e; + } + catch( exception& e ) + { + string s = e.what(); + Throw_NoSuchSubContext( s, this ); + } + catch(...) + {} + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + FullTextQueryRunnerContext::FullTextQueryRunnerContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + FullTextQueryRunnerContext::~FullTextQueryRunnerContext() + { + } + + fh_context + FullTextQueryRunnerContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + string name = rdn; + if( name.empty() ) + { + fh_context child = md->getSubContext( "file" ); + name = getStrSubCtx( child, "name", "" ); + } + fh_context ret = performQuery( name ); + return ret; + } + + void + FullTextQueryRunnerContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + FullTextQueryContext_Ranked::FullTextQueryContext_Ranked( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + FullTextQueryContext_Ranked::~FullTextQueryContext_Ranked() + { + } + + void + FullTextQueryContext_Ranked::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + fh_context + FullTextQueryContext_Ranked::performQuery( const std::string& rdn ) + { + fh_context ret = 0; + LG_IDX_D << "FullTextQueryContext_Ranked::performQuery() rdn:" << rdn << endl; + + fh_ftquery q = Ferris::FullTextIndex::Factory::makeFullTextQuery( rdn, QUERYMODE_RANKED ); + if( shouldRunFullTextQueryFilesystemAsync() ) + { + ret = q->executeAsync(); + ret->addHandlableToBeReleasedWithContext( GetImpl(q) ); + } + else + { + ret = q->execute(); + } + + + return ret; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + FullTextQueryContext_Boolean::FullTextQueryContext_Boolean( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ) + { + createStateLessAttributes(); + } + + FullTextQueryContext_Boolean::~FullTextQueryContext_Boolean() + { + } + + void + FullTextQueryContext_Boolean::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + fh_context + FullTextQueryContext_Boolean::performQuery( const std::string& rdn ) + { + fh_context ret = 0; + LG_IDX_D << "FullTextQueryContext_Boolean::performQuery() rdn:" << rdn << endl; + + fh_ftquery q = Ferris::FullTextIndex::Factory::makeFullTextQuery( rdn, QUERYMODE_BOOLEAN ); + if( shouldRunFullTextQueryFilesystemAsync() ) + { + ret = q->executeAsync(); + ret->addHandlableToBeReleasedWithContext( GetImpl(q) ); + } + else + { + ret = q->execute(); + } + + return ret; + } + + + +}; diff --git a/Ferris/FullTextContext.hh b/Ferris/FullTextContext.hh new file mode 100644 index 0000000..434018e --- /dev/null +++ b/Ferris/FullTextContext.hh @@ -0,0 +1,142 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextContext.hh,v 1.2 2010/09/24 21:30:50 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXT_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXT_CONTEXT_H_ + +#include +#include + +namespace Ferris +{ + /** + * Root context for full text queries this is the context for + * fulltextquery:// + */ + class FERRISEXP_DLLLOCAL FullTextQueryRootContext + : + public StateLessEAHolder< FullTextQueryRootContext, FakeInternalContext > + { + typedef StateLessEAHolder< FullTextQueryRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + + public: + + FullTextQueryRootContext(); + virtual ~FullTextQueryRootContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + }; + + /** + * Provides assistance methods for the ranked and boolean query + * context classes. A query can be triggered either through the + * create interface or by just attempting to get a subcontext + */ + class FERRISEXP_DLLLOCAL FullTextQueryRunnerContext + : + public StateLessEAHolder< FullTextQueryRunnerContext, FakeInternalContext > + { + typedef StateLessEAHolder< FullTextQueryRunnerContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + + public: + + FullTextQueryRunnerContext( Context* parent, const std::string& rdn ); + virtual ~FullTextQueryRunnerContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + + /** + * Subcontext classes should override this method and perform a + * fulltext query when this is called. + */ + virtual fh_context performQuery( const std::string& rdn ) = 0; + }; + + + /** + * Class to perform ranked queries. + * fulltextquery://ranked + */ + class FERRISEXP_DLLLOCAL FullTextQueryContext_Ranked + : + public FullTextQueryRunnerContext + { + typedef FullTextQueryRunnerContext _Base; + + public: + + FullTextQueryContext_Ranked( Context* parent, const std::string& rdn ); + virtual ~FullTextQueryContext_Ranked(); + void createStateLessAttributes( bool force = false ); + virtual fh_context performQuery( const std::string& rdn ); + }; + + + /** + * Class to perform boolean queries. + * fulltextquery://boolean + */ + class FERRISEXP_DLLLOCAL FullTextQueryContext_Boolean + : + public FullTextQueryRunnerContext + { + typedef FullTextQueryRunnerContext _Base; + + public: + + FullTextQueryContext_Boolean( Context* parent, const std::string& rdn ); + virtual ~FullTextQueryContext_Boolean(); + void createStateLessAttributes( bool force = false ); + virtual fh_context performQuery( const std::string& rdn ); + }; + +}; +#endif diff --git a/Ferris/FullTextIndexer.cpp b/Ferris/FullTextIndexer.cpp new file mode 100644 index 0000000..07a6b8c --- /dev/null +++ b/Ferris/FullTextIndexer.cpp @@ -0,0 +1,908 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexer.cpp,v 1.8 2010/09/24 21:30:51 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "Indexing/IndexPrivate.hh" +#include +#include "Trimming.hh" +#include "Iterator.hh" +#include "Medallion_private.hh" +#include "Medallion.hh" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +// #undef LG_IDX_D +// #define LG_IDX_D cerr +#define DEBUG true + +using namespace std; + +namespace Ferris +{ + namespace FullTextIndex + { + + AddToFullTextIndexProgress_Sig_t& getNullAddToFullTextIndexProgress_Sig() + { + static AddToFullTextIndexProgress_Sig_t o; + return o; + } + + + const std::string IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K = "idxmgr-nonresolvable-not-to-remove-regex-k"; + + std::string GET_INDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( bool commaSeperated ) + { + string def = (std::string)"" + '\0'; + string ret = getEDBString( GET_FDB_GENERAL(), "EAINDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX", def ); + + if( commaSeperated ) + replace( ret.begin(), ret.end(), '\0', ',' ); + + return ret; + + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + string Lexicon::NULL_VALUE_TERM = ""; + string Lexicon::UNREADABLE_VALUE_TERM = ""; + + + Lexicon::Lexicon( fh_idx idx, PathManager* path_mgr ) + : + m_idx( idx ), + m_path_mgr( path_mgr ), + m_usingNullValue( false ), + m_usingUnreadableValue( false ) + + { + if( m_idx && !m_path_mgr ) + m_path_mgr = m_idx->tryToCastToPathManager(); +// if( m_idx && !m_path_mgr ) +// m_path_mgr = GetImpl(m_idx); + } + + Lexicon::~Lexicon() + { + } + + void + Lexicon::setIndex( fh_idx idx ) + { + m_idx = idx; + + if( m_idx && !m_path_mgr ) + m_path_mgr = m_idx->tryToCastToPathManager(); +// if( m_idx && !m_path_mgr ) +// m_path_mgr = GetImpl(m_idx); + } + + void + Lexicon::dumpTo( fh_ostream oss, bool asXML, const std::string& name ) + { + if( asXML ) oss << "" << endl; + + try + { + bool haveVisitedNull = !m_usingNullValue; + + std::string term = getFirstTerm(); + +// LG_IDX_D << "Starting Lexicon::dumpTo() name:" << name +// << " empty:" << term.empty() +// << " visitedNull:" << haveVisitedNull +// << endl; + + while( !term.empty() || !haveVisitedNull ) + { + termid_t id = lookup( term ); +// LG_IDX_D << "term.empty():" << term.empty() +// << " tid:" << id +// << " haveVisitedNull:" << haveVisitedNull +// << " un:" << m_usingNullValue +// << endl; + + if( id == NULL_VALUE_TERMID ) + { +// if( !m_usingNullValue ) +// break; + haveVisitedNull = true; + } + + if( m_usingNullValue && id == NULL_VALUE_TERMID ) + { + oss << "" + << "" << endl; + } + else if( m_usingUnreadableValue && id == UNREADABLE_VALUE_TERMID ) + { + oss << "" + << "" << endl; + } + else + { + if( asXML ) + oss << "" << term << "" << endl; + else + oss << term << ", " << id << endl; + } + + term = getNextTerm( term ); + } + } + catch( exception& e ) + { + oss << " Error traversing data:" << e.what() << " " << endl; + } + if( asXML ) oss << "" << endl; + } + + void + Lexicon::setUsingNullValue( bool v ) + { + m_usingNullValue = true; + } + + void + Lexicon::setUsingUnreadableValue( bool v ) + { + m_usingUnreadableValue = true; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL Lexicon_Cache + : + public Lexicon + { + typedef map< string, termid_t > m_cache_t; + m_cache_t m_cache; + fh_lexicon theDelegate; + + protected: + + virtual void setIndex( fh_idx idx ) + { + Lexicon::setIndex( idx ); + theDelegate->setIndex( idx ); + } + + public: + + Lexicon_Cache( fh_lexicon l ) + : + Lexicon( l->m_idx, l->m_path_mgr ), + theDelegate( l ) + { + } + + virtual ~Lexicon_Cache() + { + } + + virtual std::string getFirstTerm() + { + return theDelegate->getFirstTerm(); + } + virtual std::string getNextTerm( const std::string& s ) + { + return theDelegate->getNextTerm( s ); + } + + virtual void insert( const std::string& term, termid_t termid ) + { + m_cache[ term ] = termid; + theDelegate->insert( term, termid ); + } + + virtual termid_t lookup( const std::string& term ) + { + m_cache_t::iterator ci = m_cache.find( term ); + if( ci != m_cache.end() ) + return ci->second; + termid_t ret = theDelegate->lookup( term ); + m_cache[ term ] = ret; + return ret; + } + + virtual void dumpTo( fh_ostream oss, bool asXML, const std::string& name ) + { + theDelegate->dumpTo( oss, asXML, name ); + } + + virtual void sync() + { + theDelegate->sync(); + } + + virtual void prepareForInsertions() + { + theDelegate->prepareForInsertions(); + } + }; + + + fh_lexicon wrapWithCache( fh_lexicon l ) + { + fh_lexicon ret = new Lexicon_Cache( l ); + return ret; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + ReverseLexicon::ReverseLexicon() + : + m_path_mgr( 0 ), + m_filename( "" ), + m_usingNullValue( false ), + m_usingUnreadableValue( false ) + { + } + + ReverseLexicon::~ReverseLexicon() + { + sync(); + } + + void + ReverseLexicon::dumpTo( fh_ostream oss, bool asXML ) + { + if( asXML ) oss << "" << endl; + + try + { + termid_t id = getFirstTerm(); + while( id ) + { + string term = lookup( id ); + + if( m_usingNullValue && id == Lexicon::NULL_VALUE_TERMID ) + { + oss << "" + << "" << endl; + } + else if( m_usingUnreadableValue && id == Lexicon::UNREADABLE_VALUE_TERMID ) + { + oss << "" + << "" << endl; + } + else + { + if( asXML ) + oss << "" << term << "" << endl; + else + oss << term << ", " << id << endl; + } + + id = getNextTerm( id ); + } + } + catch( exception& e ) + { + oss << " Error traversing data:" << e.what() << " " << endl; + } + if( asXML ) oss << "" << endl; + } + + void + ReverseLexicon::setUsingNullValue( bool v ) + { + m_usingNullValue = true; + } + + void + ReverseLexicon::setUsingUnreadableValue( bool v ) + { + m_usingUnreadableValue = true; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL ReverseLexicon_Cache + : + public ReverseLexicon + { + typedef map< termid_t, string > m_cache_t; + m_cache_t m_cache; + fh_revlexicon theDelegate; + + protected: + virtual termid_t getFirstTerm() + { + return theDelegate->getFirstTerm(); + } + + virtual termid_t getNextTerm( termid_t t ) + { + return theDelegate->getNextTerm( t ); + } + + public: + + ReverseLexicon_Cache( fh_revlexicon l ) + : + ReverseLexicon(), + theDelegate( l ) + { + m_path_mgr = l->m_path_mgr; + m_filename = l->m_filename; + } + + virtual void insert( const std::string& s, termid_t id ) + { + m_cache[ id ] = s; + theDelegate->insert( s, id ); + } + + virtual std::string lookup( termid_t id ) + { + m_cache_t::iterator ci = m_cache.find( id ); + if( ci != m_cache.end() ) + { + return ci->second; + } + string ret = theDelegate->lookup( id ); + m_cache[ id ] = ret; + return ret; + } + + virtual bool exists( termid_t id ) + { + m_cache_t::iterator ci = m_cache.find( id ); + if( ci != m_cache.end() ) + { + return true; + } + bool ret = theDelegate->exists( id ); + return ret; + } + + virtual void dumpTo( fh_ostream oss, bool asXML ) + { + theDelegate->dumpTo( oss, asXML ); + } + + virtual void sync() + { + theDelegate->sync(); + } + + virtual void prepareForInsertions() + { + theDelegate->prepareForInsertions(); + } + }; + + + fh_revlexicon wrapWithCache( fh_revlexicon l ) + { + fh_revlexicon ret = new ReverseLexicon_Cache( l ); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + DocumentIndexer::DocumentIndexer( fh_idx idx ) + : + m_idx( idx ), + m_dontCheckIfAlreadyThere( false ), + m_filesIndexedCount( 0 ), + m_haveCalledPrepareForWrites( false ), + m_AddEvenIfAlreadyCurrent( false ), + m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent( false ) + { + if( m_idx ) + m_idx->prepareForInsertions(); + + getTokenBuffer.resize( LARGEST_TOKEN ); + } + + DocumentIndexer::~DocumentIndexer() + { + if( m_idx ) + m_idx->allWritesComplete(); + + if( m_idx ) + m_idx->sync(); + } + + AddToFullTextIndexProgress_Sig_t& + DocumentIndexer::getProgressSig() + { + return m_progressSig; + } + + + streamsize + DocumentIndexer::getBytesCompleted() + { + return m_bytesDone; + } + + string + DocumentIndexer::getToken( fh_istream& iss ) + { + int i = 0; + char c; + bool tokenHasBytes = false; + bool isAllNumeric = true; + int length = 0; + + while( iss.get(c) ) + { + ++m_bytesDone; + +// LG_IDX_D << c; + if( isalnum( c ) ) + { + // dont allow leading digits and trailing alphas + if( tokenHasBytes && isAllNumeric && !isdigit( c ) ) + { + break; + } + + tokenHasBytes = true; + getTokenBuffer[i++] = c; + + isAllNumeric = isAllNumeric && isdigit( c ); + + ++length; + if( length >= 255 ) + break; + if( isAllNumeric && length >= 4 ) + break; + + if( i == LARGEST_TOKEN ) + break; + + continue; + } + + if( tokenHasBytes ) + break; + } + + return getTokenBuffer.substr( 0, i ); + } + +// string +// DocumentIndexer::getToken( fh_istream& iss ) +// { +// stringstream ss; +// char c; +// bool tokenHasBytes = false; +// bool isAllNumeric = true; +// int length = 0; + +// while( iss >> noskipws >> c ) +// { +// ++m_bytesDone; + +// // LG_IDX_D << c; +// if( isalnum( c ) ) +// { +// // dont allow leading digits and trailing alphas +// if( tokenHasBytes && isAllNumeric && !isdigit( c ) ) +// { +// break; +// } + +// tokenHasBytes = true; +// ss << c; + +// isAllNumeric = isAllNumeric && isdigit( c ); + +// ++length; +// if( length >= 255 ) +// break; +// if( isAllNumeric && length >= 4 ) +// break; + +// continue; +// } + +// if( tokenHasBytes ) +// break; +// } + +// return tostr(ss); +// } + + void + DocumentIndexer::setDontCheckIfAlreadyThere( bool v ) + { + m_dontCheckIfAlreadyThere = v; + } + + bool + DocumentIndexer::getDontCheckIfAlreadyThere() + { + return m_dontCheckIfAlreadyThere; + } + + int + DocumentIndexer::getFilesIndexedCount() + { + return m_filesIndexedCount; + } + + + + + void + DocumentIndexer::sync() + { + m_idx->sync(); +// m_idx->sync( this m_filesIndexedCount ); + } + + void + DocumentIndexer::addContextToIndex( fh_context c ) + { + if( !m_haveCalledPrepareForWrites ) + { + m_haveCalledPrepareForWrites = true; + + int f = MetaFullTextIndexerInterface::PREPARE_FOR_WRITES_NONE; + if( !m_AddEvenIfAlreadyCurrent ) + f |= MetaFullTextIndexerInterface::PREPARE_FOR_WRITES_ISNEWER_TESTS; + + m_idx->prepareForWrites( f ); + } + + if( !m_AddEvenIfAlreadyCurrent ) + { + bool sup = m_idx->getIndexMethodSupportsIsFileNewerThanIndexedVersion(); + if( !sup && !m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent ) + { + m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent = true; + cerr << "WARNING: index doesn't support isNewer() checks" << endl; + } + + if( sup ) + { + bool isNewer = m_idx->isFileNewerThanIndexedVersion( c ); + if( !isNewer ) + { + LG_IDX_D << "Skipping because index is current for c:" + << c->getURL() << endl; +// if( m_verbose ) +// { +// cerr << "Skipping because index is current for c:" +// << c->getURL() << endl; +// } + return; + } + } + + if( fh_emblem em = getShouldSkipIndexingEmblem() ) + { + if( c->hasMedallion() ) + { + fh_medallion med = c->getMedallion(); + if( med && med->hasEmblem( em ) ) + { + LG_IDX_D << "Context has should-skip-indexing emblem... skipping c:" << c->getURL() << endl; + cerr << "Context has should-skip-indexing emblem... skipping c:" << c->getURL() << endl; + return; + } + } + } + } + + ++m_filesIndexedCount; + m_bytesDone = 0; + m_idx->addToIndex( c, this ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + + + + + + +// fh_idx createFullTextIndexNative( fh_context c, +// bool caseSensitive, +// bool dropStopWords, +// StemMode stemMode, +// const std::string& lex_class ) +// { +// fh_idx idx; +// idx = new FullTextIndexManager( c->getURL(), +// caseSensitive, +// dropStopWords, +// stemMode, +// lex_class ); +// return idx; +// } + + stringlist_t& getLexiconClassNames() + { + static stringlist_t sl; + return sl; + } + +bool appendToLexiconClassNames( const std::string& s ) +{ + getLexiconClassNames().push_back( s ); + return true; +} + +stringlist_t& getLexiconAliasNames() +{ + static stringlist_t sl; + return sl; +} + +bool appendToLexiconAliasNames( const std::string& s ) +{ + getLexiconAliasNames().push_back( s ); + return true; +} + + + stringlist_t& getReverseLexiconClassNames() + { + static stringlist_t sl; + return sl; + } + bool appendToReverseLexiconClassNames( const std::string& s ) + { + getReverseLexiconClassNames().push_back( s ); + return true; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + std::string stem( const std::string& s, StemMode sm ) + { + switch( sm ) + { + case STEM_NONE: return s; + case STEM_J_B_LOVINS_68: + { + if( s.empty() ) + return s; + + int slen = s.length(); + static string Buffer; + static int BufferSz = 0; + if( BufferSz < slen ) + { + BufferSz = slen; + Buffer.resize( slen+1 ); + } + Buffer[0] = (char)slen; + strncpy( (char*)Buffer.data() + 1, s.data(), slen ); + ferrismg_stem( (unsigned char*)Buffer.data() ); + +// LG_IDX_D << "oringial:" << s +// << " stem:" << Buffer.substr( 1, (int)Buffer[0] ) +// << endl; + + return Buffer.substr( 1, (int)Buffer[0] ); + + +// int slen = s.length(); +// stringstream ss; +// ss << (char)slen; +// ss << s; + +// string mystring = tostr(ss); +// ferrismg_stem( (unsigned char*)mystring.c_str() ); + +// // // string ret; +// // // char c = mystring[0]; +// // // ret.reserve( (int)c ); +// // // copy( mystring.begin()+1, mystring.begin()+1+(int)c, +// // // back_inserter(ret) ); + +// // // // LG_IDX_D << "stem() mystring:" << mystring +// // // // << " s:" << s +// // // // << " result.len:" << (int)c << " res:" << ret +// // // // << endl; +// // // return ret; + +// return mystring.substr( 1, (int)mystring[0] ); + } + } + LG_IDX_ER << "Bad stemmer chosen!" << endl; + return s; + } + + +std::string foldcase( const std::string& s, wordcase c ) +{ + static string ret; + bool hitSpace = true; + + ret.resize( s.length() ); + int i = 0; + + for( string::const_iterator iter = s.begin(); iter != s.end(); ++iter ) + { + switch( c ) + { + case CASE_UPPER: + ret[i] = (char)toupper( *iter ); + break; + + case CASE_LOWER: + ret[i] = (char)tolower( *iter ); + break; + + case CASE_CAPPED: + if( hitSpace ) + ret[i] = (char)toupper( *iter ); + else + ret[i] = (char)tolower( *iter ); + + hitSpace = *iter == ' ' || *iter == '\t'; + break; + } + ++i; + } + return ret; +} + +// The above version is faster. +// it does 1.6 seconds on the war of the worlds +// the below does 2.5 +// std::string foldcase( const std::string& s, wordcase c ) +// { +// fh_stringstream ret; +// bool hitSpace = true; + +// for( string::const_iterator iter = s.begin(); iter != s.end(); ++iter ) +// { +// switch( c ) +// { +// case CASE_UPPER: +// ret << (char)toupper( *iter ); +// break; + +// case CASE_LOWER: +// ret << (char)tolower( *iter ); +// break; + +// case CASE_CAPPED: +// if( hitSpace ) +// ret << (char)toupper( *iter ); +// else +// ret << (char)tolower( *iter ); + +// hitSpace = *iter == ' ' || *iter == '\t'; +// break; +// } +// } +// return tostr(ret); +// } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + UniqSortedTerms::UniqSortedTerms( fh_istream& iss, + fh_docindexer di, + bool isCaseSensitive, + StemMode stemmer, + const stringset_t& stopwords, + bool DropStopWords ) + { + string s; + while( !(s = di->getToken( iss )).empty() ) + { + if( !isCaseSensitive ) + { + s = foldcase( s ); + } + + s = stem( s, stemmer ); + + if( DropStopWords ) + { + if( stopwords.count( s ) ) + { + continue; + } + } + + ++m_uniqTerms[s]; + } + reset(); + + } + + void + UniqSortedTerms::reset() + { + m_end = m_uniqTerms.end(); + m_cur = m_uniqTerms.begin(); + } + + bool + UniqSortedTerms::next( string& s, int& termCount ) + { + if( m_cur == m_end ) + { + termCount=0; + s=""; + return false; + } + + s = m_cur->first; + termCount = m_cur->second; + ++m_cur; + return true; + } + + + }; +}; + diff --git a/Ferris/FullTextIndexer.hh b/Ferris/FullTextIndexer.hh new file mode 100644 index 0000000..9d974bb --- /dev/null +++ b/Ferris/FullTextIndexer.hh @@ -0,0 +1,532 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexer.hh,v 1.8 2010/09/24 21:30:51 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/** + * Feb 2004: miq decided that creating a switch at the level of + * FullTextIndexManager would make implementing optional support for + * Lucene indexing easiest. This means that the old + * FullTextIndexManager becomes a subclass of a new meta interface + * which is stored in FullTextIndexerMetaInterface.hh. The + * meta interface has to include no exception code because the current + * gcc3.3 doesn't support both C++ and Java exceptions in the one + * compilation unit. + * + * + * + */ +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_H_ + +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include "Ferris/FerrisStdHashMap.hh" +#include + +#include + + +namespace Ferris +{ + namespace EAIndex + { + class EAIndexManagerDB4; + }; + namespace AI + { + class SvmLight_BinaryClassifierAgentImplemenation; + }; + + + /** + * Support for full text indexing and querys + */ + namespace FullTextIndex + { + typedef guint32 termid_t; + + + + /** + * Stem the given word and return stemmed version + */ + FERRISEXP_API std::string stem( const std::string& s, StemMode sm = STEM_J_B_LOVINS_68 ); + + + enum wordcase { + CASE_UPPER = 1, + CASE_LOWER, + CASE_CAPPED + }; + + /** + * Fold case of word to given UPPER/lower/Capped + */ + FERRISEXP_API std::string foldcase( const std::string& s, wordcase c = CASE_LOWER ); + + + + + class Lexicon; + FERRIS_SMARTPTR( Lexicon, fh_lexicon ); + + class ReverseLexicon; + FERRIS_SMARTPTR( ReverseLexicon, fh_revlexicon ); + + + class PathManager; +// FERRIS_SMARTPTR( PathManager, fh_path_mgr ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /** + * Contains the mapping from + * Document term -> ID + * + * A collection of methods are defined to handle the persistence of this collection + * and additions to it. Subclasses are created to handle the storage in different + * formats + */ + class FERRISEXP_API Lexicon + : + public Handlable + { + friend class FullTextIndexManagerNative; + friend class ::Ferris::EAIndex::EAIndexManagerDB4; + friend class ::Ferris::EAIndex::EAIndexManagerDB4Tree; + friend class Lexicon_Cache; + friend class Lexitest; + friend class ::Ferris::AI::SvmLight_BinaryClassifierAgentImplemenation; + + protected: + + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setIndex( fh_idx idx ); + + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setPathManager( PathManager* path_mgr ) + { + m_path_mgr = path_mgr; + } + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setFileName( const std::string& fn ) + { + m_filename = fn; + } + virtual const std::string getFileName() + { + return m_filename; + } + + fh_idx m_idx; + PathManager* m_path_mgr; + std::string m_filename; + + Lexicon( fh_idx idx = 0, PathManager* path_mgr = 0 ); + + /** + * Used in dumpTo() and other debugging stuff. Gives the + * ability to (possibly slowly) walk the lexicon. + */ + virtual std::string getFirstTerm() + { + return ""; + } + virtual std::string getNextTerm( const std::string& s ) + { + return ""; + } + + bool m_usingNullValue; + bool m_usingUnreadableValue; + + public: + + virtual ~Lexicon(); + + /** + * A zero length string is allowed to exist if it has NULL_VALUE_TERMID + * and UNREADABLE_VALUE_TERMID can be added on index creation and then + * used to index attributes which can not be read when indexing occurs. + */ + enum { + NULL_VALUE_TERMID = 1, + UNREADABLE_VALUE_TERMID = 2 + }; + static std::string NULL_VALUE_TERM; + static std::string UNREADABLE_VALUE_TERM; + + void setUsingNullValue( bool v ); + void setUsingUnreadableValue( bool v ); + + + /** + * add a new term with the given termid. + */ + virtual void insert( const std::string& term, termid_t termid ) = 0; + + /** + * get the ID for the given term as set before with addTerm() + * or 0 if no such term exists. + */ + virtual termid_t lookup( const std::string& term ) = 0; + + /** + * Dump out the lexicon in the form + * term string, termid\n + * to the given stream. + * + * default uses getFirstTerm() / getNextTerm() + */ + virtual void dumpTo( fh_ostream oss, bool asXML = true, const std::string& name = "" ); + + /** + * Save all data to disk. Depending on what type of storage is + * being done, a sync may recreate the lexicon file by consolidating + * an overflow area into the new lexicon. + */ + virtual void sync() + {} + + /** + * For adding documents, some lexicon classes might perform much + * better if they are primed for adding new terms. Such is the + * case for prefixcoded lexicons where the entire lexicon can + * be read into RAM because it must be done for sync() anyway. + */ + virtual void prepareForInsertions() + {} + + }; + + /** + * Create a Lexicon object which caches previous results from another lexicon + * for quicker subsequent lookups + */ + FERRISEXP_API fh_lexicon wrapWithCache( fh_lexicon l ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Contains a mapping from + * ID -> string + * + * Subclasses are created to handle the storage in different formats + */ + class FERRISEXP_API ReverseLexicon + : + public Handlable + { + friend class FullTextIndexManagerNative; + friend class ::Ferris::EAIndex::EAIndexManagerDB4; + friend class ReverseLexicon_Cache; + friend class Lexitest; + + protected: + + bool m_usingNullValue; + bool m_usingUnreadableValue; + + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setPathManager( PathManager* path_mgr ) + { + m_path_mgr = path_mgr; + } + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setFileName( const std::string& fn ) + { + m_filename = fn; + } + virtual const std::string getFileName() + { + return m_filename; + } + + PathManager* m_path_mgr; + std::string m_filename; + + ReverseLexicon(); + + virtual termid_t getFirstTerm() = 0; + virtual termid_t getNextTerm( termid_t t ) = 0; + + /** + * Because we are made by factory now, this is like the constructor + * for subclasses + */ + virtual void setIndex( fh_idx idx = 0 ) + { + } + + public: + + virtual ~ReverseLexicon(); + + void setUsingNullValue( bool v ); + void setUsingUnreadableValue( bool v ); + + /** + * set future calls to lookup( id ) to return s + */ + virtual void insert( const std::string& s, termid_t id ) = 0; + + /** + * get the string associated with the given ID or "" if no such association + */ + virtual std::string lookup( termid_t id ) = 0; + + /** + * check if there is a string associated with the given ID + */ + virtual bool exists( termid_t id ) = 0; + + /** + * Dump out the lexicon in the form + * term string, termid\n + * to the given stream. + * + * default uses getFirstTerm() / getNextTerm() + */ + virtual void dumpTo( fh_ostream oss, bool asXML = true ); + + /** + * Save all data to disk. Depending on what type of storage is + * being done, a sync may recreate the lexicon file by consolidating + * an overflow area into the new lexicon. + */ + virtual void sync() + {} + + /** + * For adding documents, some lexicon classes might perform much + * better if they are primed for adding new terms. Such is the + * case for prefixcoded lexicons where the entire lexicon can + * be read into RAM because it must be done for sync() anyway. + */ + virtual void prepareForInsertions() + {} + + }; + + /** + * Create a ReverseLexicon object which caches previous results from another revlexicon + * for quicker subsequent lookups + */ + FERRISEXP_API fh_revlexicon wrapWithCache( fh_revlexicon l ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_API PathManager + { + public: + virtual std::string getBasePath() = 0; + virtual std::string getConfig( const std::string& k, const std::string& def, + bool throw_for_errors = false ) + { + return def; + } + virtual void setConfig( const std::string& k, const std::string& v ) + {} + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * class whos sole objective is to add new documents to the full text index. + */ + class FERRISEXP_API DocumentIndexer + : + public Handlable + { + AddToFullTextIndexProgress_Sig_t m_progressSig; + + friend fh_docindexer Factory::makeDocumentIndexer( fh_idx idx ); + DocumentIndexer( fh_idx idx ); + + fh_idx m_idx; + + std::streamsize m_bytesDone; + bool m_dontCheckIfAlreadyThere; + + // total number of files added to the index via this object + int m_filesIndexedCount; + bool m_haveCalledPrepareForWrites; + bool m_AddEvenIfAlreadyCurrent; + bool m_haveReportedIndexDoesNotSupportAddEvenIfAlreadyCurrent; + + enum { + LARGEST_TOKEN = 16*4096 + }; + std::string getTokenBuffer; + + public: + + /** + * syncs data to disk + */ + virtual ~DocumentIndexer(); + + /** + * A signal that is fired at intervals to allow UIs to update + * and show progress to the user when indexing a document + */ + AddToFullTextIndexProgress_Sig_t& getProgressSig(); + + /** + * Add the passed context to the index + */ + void addContextToIndex( fh_context c ); + + /** + * Sync the index to disk. + * For postgresql and relational indexes, if only a small amount + * of files were added then an analyze might not be performed. + */ + void sync(); + + /** + * Called by addContextToIndex() to get the next token and + * to update byte counts. + */ + std::string getToken( fh_istream& iss ); + + /** + * Get the number of bytes consumed by previous calls to getToken() + */ + std::streamsize getBytesCompleted(); + + /** + * This option can cause problems because its use allows + * the possibility for many items in the document map to + * exist numerous times. It is handy for building indexes + * when one is sure that a document is only going to be + * added once. Example: making a index for a cdrom before + * burning it to disk. + * + * Leave it as the default which is false, ie. a check is + * performed before a new docID is allocated. The only + * problem with this is that it can be slow to check if + * a URL has a docid without a reverse document map. + */ + void setDontCheckIfAlreadyThere( bool v ); + + bool getDontCheckIfAlreadyThere(); + + int getFilesIndexedCount(); + + + + }; + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + /** + * Class that takes tokens from a fh_docindexer, reads them + * all and builds a sorted collection which can + * then be enumerated by clients. + */ + class FERRISEXP_API UniqSortedTerms + { + typedef std::map< std::string, long > m_uniqTerms_t; + m_uniqTerms_t m_uniqTerms; + m_uniqTerms_t::const_iterator m_end; + m_uniqTerms_t::const_iterator m_cur; + + public: + + /** + * Bind this uniqSorter to the input stream and document + * indexer. + */ + UniqSortedTerms( fh_istream& iss, + fh_docindexer di, + bool isCaseSensitive, + StemMode stemmer, + const stringset_t& stopwords, + bool DropStopWords ); + + /** + * As the data returned from next() is all stored in RAM + * you can reset and iterate again. + */ + void reset(); + + + /** + * Get the next uniq token found in sorted order and the + * number of times it occured. + * + * puts output into s and termCount and returns true while + * there was a token and false if no next token existed on call. + */ + bool next( std::string& s, int& termCount ); + }; + + }; +}; +#endif + diff --git a/Ferris/FullTextIndexerCustomFerris.cpp b/Ferris/FullTextIndexerCustomFerris.cpp new file mode 100644 index 0000000..96ac61c --- /dev/null +++ b/Ferris/FullTextIndexerCustomFerris.cpp @@ -0,0 +1,64 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexerCustomFerris.cpp,v 1.2 2010/09/24 21:30:51 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "config.h" +#include "FullTextIndexerMetaInterface.hh" + +using namespace std; + +namespace Ferris +{ + namespace FullTextIndex + { + /************************************************************/ + /************************************************************/ + /************************************************************/ + + namespace + { + MetaFullTextIndexerInterface* CreateFullTextIndexer() + { + return CreateFullTextIndexerFromLibrary( "libftxcustomferris.so" ); + } + + static const std::string MetaIndexClassName = "native"; + namespace + { + static bool reged = MetaFullTextIndexerInterfaceFactory::Instance(). + Register( MetaIndexClassName, &CreateFullTextIndexer ); + static bool regedx = appendToMetaFullTextIndexClassNames( MetaIndexClassName ); + } + }; + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + }; +}; diff --git a/Ferris/FullTextIndexerMetaInterface.cpp b/Ferris/FullTextIndexerMetaInterface.cpp new file mode 100644 index 0000000..98bf956 --- /dev/null +++ b/Ferris/FullTextIndexerMetaInterface.cpp @@ -0,0 +1,705 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexerMetaInterface.cpp,v 1.13 2010/09/24 21:30:51 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" + +using namespace std; + +namespace Ferris +{ + + namespace FullTextIndex + { + using namespace ::STLdb4; + static const string DB_FULLTEXT = "full-text-index-config.db"; + static const string FULLTEXTROOT = "~/.ferris/full-text-index"; + static const char* CFG_IDX_DBNAME_K = "cfg-idx-dbname"; + + class FERRISEXP_DLLLOCAL MetaFullTextIndexerInterfacePriv + { + public: + MetaFullTextIndexerInterfacePriv() + : + m_config( 0 ), m_configNotAvailable( false ), m_base( 0 ), + m_configShouldBeReadOnly( false ) + {} + + stringmap_t m_configCache; + stringset_t m_stopWords; + fh_database m_config; + bool m_configNotAvailable; + bool m_configShouldBeReadOnly; + fh_database getConfigDB(); + fh_context m_base; + + /** + * Ensure that there is a db4 file there for setConfig() / getConfig() to use + */ + void ensureConfigFileCreated() + { + if( !m_config ) + { + m_config = ensureFerrisConfigFileExists( m_base->getDirPath(), DB_FULLTEXT ); + set_db4_string( getConfigDB(), "foo1", "bar" ); + getConfigDB()->sync(); + } + } + }; + + fh_database + MetaFullTextIndexerInterfacePriv::getConfigDB() + { +// cerr << "MetaFullTextIndexerInterfacePriv::getConfigDB(1) m_config:" << toVoid(m_config) +// << " m_configNotAvailable:" << m_configNotAvailable +// << endl; + + if( m_config || m_configNotAvailable ) + return m_config; + + string dbfilename = CleanupURL( m_base->getDirPath() + "/" + DB_FULLTEXT ); +// cerr << "MetaFullTextIndexerInterfacePriv::getConfigDB() dbfilename:" +// << dbfilename << endl; + try + { +// m_config = new Database( dbfilename ); + m_config = new Database( dbfilename, "", m_configShouldBeReadOnly ); + + } + catch( exception& e ) + { + cerr << "MetaFullTextIndexerInterfacePriv::getConfigDB() e:" << e.what() + << " path:" << dbfilename + << endl; + m_configNotAvailable = true; + } + return m_config; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + MetaFullTextIndexerInterface::addDocID( docNumSet_t& output, docid_t v ) + { + output.insert( v ); + } + + + MetaFullTextIndexerInterface::MetaFullTextIndexerInterface() + : + P( new MetaFullTextIndexerInterfacePriv() ) + { + } + + MetaFullTextIndexerInterface::~MetaFullTextIndexerInterface() + { + if( P ) + delete P; + } + + void + MetaFullTextIndexerInterface::LocalCommonConstruction() + { + P->ensureConfigFileCreated(); + } + + void + MetaFullTextIndexerInterface::private_initialize( const std::string& basepath ) + { + P->m_base = Shell::acquireContext( basepath ); + Setup(); + } + + std::string + MetaFullTextIndexerInterface::getPath() + { + return P->m_base->getDirPath(); + } + + std::string + MetaFullTextIndexerInterface::getURL() + { + return P->m_base->getURL(); + } + + bool + MetaFullTextIndexerInterface::isTSearch2IndexInGivenDatabase( const std::string& wanted_dbname ) + { + string classname = getConfig( IDXMGR_INDEX_CLASS_K, "" ); + string dbname = getConfig( CFG_IDX_DBNAME_K, "" ); + + return classname == "postgresql-tsearch2" + && dbname == wanted_dbname; + } + + bool + MetaFullTextIndexerInterface::isCLuceneIndex() + { + string classname = getConfig( IDXMGR_INDEX_CLASS_K, "" ); + return classname == "clucene"; + } + + void* + MetaFullTextIndexerInterface::BuildCLuceneQuery( const std::string& qstr, void* current_query_vp ) + { + fh_stringstream ss; + ss << "Attempt to BuildCLuceneQuery() against" + << " an index that doesn't support this method" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + std::string + MetaFullTextIndexerInterface::getConfig( const std::string& k, const std::string& def, bool throw_for_errors ) + { + fh_database db = P->getConfigDB(); + + if( P->m_configNotAvailable && !throw_for_errors ) + return def; + + stringmap_t::const_iterator ci = P->m_configCache.find( k ); + if( ci != P->m_configCache.end() ) + return ci->second; + +// cerr << "getConfig() k:" << k << endl; + string ret = get_db4_string( db, k, def, throw_for_errors ); + P->m_configCache[ k ] = ret; + return ret; + } + + void + MetaFullTextIndexerInterface::setConfig( const std::string& k, const std::string& v ) + { +// cerr << "MetaFullTextIndexerInterface::setConfig() k:" << k +// << " v:" << v << endl; + + P->m_configCache[ k ] = v; + + fh_database db = P->getConfigDB(); + set_db4_string( db, k, v ); + db->sync(); + } + + bool + MetaFullTextIndexerInterface::getDropStopWords() + { + return isTrue( getConfig( IDXMGR_DROPSTOPWORDS_CLASS_K, "0" )); + } + + stringset_t& + MetaFullTextIndexerInterface::getStopWords() + { + if( P->m_stopWords.empty() ) + { + stringlist_t sl = Util::parseCommaSeperatedList( + getConfig( IDXMGR_STOPWORDSLIST_K, IDXMGR_STOPWORDSLIST_DEFAULT ) ); + copy( sl.begin(), sl.end(), inserter( P->m_stopWords, P->m_stopWords.end() )); + } + return P->m_stopWords; + } + + bool + MetaFullTextIndexerInterface::isCaseSensitive() + { + return isTrue( getConfig( IDXMGR_CASESEN_CLASS_K, "0" )); + } + + + StemMode + MetaFullTextIndexerInterface::getStemMode() + { +// cerr << "MetaFullTextIndexerInterface::getStemMode() val:" +// << getConfig( IDXMGR_STEMMER_CLASS_K, "undefined" ) +// << endl; + + return StemMode( + toType( + getConfig( IDXMGR_STEMMER_CLASS_K, tostr(STEM_J_B_LOVINS_68) ))); + } + + bool + MetaFullTextIndexerInterface::supportsRankedQuery() + { + return isTrue(getConfig( IDXMGR_SUPPORTS_RANKED_K, "1" )); + } + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteXapianFullTextQuery( + const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve an Xapian query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteWebFullTextQuery( + const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve a web query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + + + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteTsearch2FullTextQuery( + const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve a TSearch2 query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteBeagleFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve a beagle query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteLuceneFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve a Lucene query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteExternalFullTextQuery( + const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + fh_stringstream ss; + ss << "Attempt to resolve a External query against" + << " an index that doesn't support this query format" + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + docNumSet_t& + MetaFullTextIndexerInterface::ExecuteRawFullTextQuery( + const std::string& queryString, + docNumSet_t& docnums, + int limit ) + { + LG_IDX_D << "MetaFullTextIndexerInterface::ExecuteRawFullTextQuery(1) q:" << queryString << endl; + try + { + return ExecuteXapianFullTextQuery( queryString, docnums, limit ); + } + catch( exception& e ) + { + LG_IDX_D << "Exception running xapian fulltext query:" << e.what() << endl; + } + LG_IDX_D << "MetaFullTextIndexerInterface::ExecuteRawFullTextQuery(2) q:" << queryString << endl; + try + { + return ExecuteTsearch2FullTextQuery( queryString, docnums, limit ); + } + catch( exception& e ) + { + LG_IDX_D << "Exception running tsearch2 fulltext query:" << e.what() << endl; + } + LG_IDX_D << "MetaFullTextIndexerInterface::ExecuteRawFullTextQuery(3) q:" << queryString << endl; + try + { + return ExecuteExternalFullTextQuery( queryString, docnums, limit ); + } + catch( exception& e ) + { + LG_IDX_D << "Exception running external fulltext query:" << e.what() << endl; + } + LG_IDX_D << "MetaFullTextIndexerInterface::ExecuteRawFullTextQuery(4) q:" << queryString << endl; + try + { + return ExecuteLuceneFullTextQuery( queryString, docnums, limit ); + } + catch( exception& e ) + { + LG_IDX_D << "Exception running lucene fulltext query:" << e.what() << endl; + } + + + fh_stringstream ss; + ss << "Attempt to resolve a RAW query against" + << " an index that doesn't support this query format" + << " queryString:" << queryString + << " limit:" << limit + << endl; + cerr << tostr(ss); + BackTrace(); + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + void + MetaFullTextIndexerInterface::prepareForInsertions() + { + } + + bool + MetaFullTextIndexerInterface::isCustomFerrisIndex() + { + return false; + } + + PathManager* + MetaFullTextIndexerInterface::tryToCastToPathManager() + { + return 0; + } + + void + MetaFullTextIndexerInterface::executeRankedQuery( fh_context selection, + std::string query_string, + int m_accumulatorsMaxSize, + int m_resultSetMaxSize ) + { + } + + + void + MetaFullTextIndexerInterface::removeDocumentsMatchingRegexFromIndex( const std::string& s, + time_t mustBeOlderThan ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + + + bool + MetaFullTextIndexerInterface::supportsRemove() + { + return false; + } + + void + MetaFullTextIndexerInterface::purgeDocumentInstancesOlderThan( time_t t ) + { + stringstream ss; + ss << "This index does not support the removal of documents.\n"; + Throw_NotSupported( tostr(ss), 0 ); + } + + void + MetaFullTextIndexerInterface::removeByURL( stringlist_t& sl ) + { + for( stringlist_t::iterator si = sl.begin(); si != sl.end(); ++si ) + { + removeDocumentsMatchingRegexFromIndex( *si ); + } + } + + stringlist_t + MetaFullTextIndexerInterface::getNonResolvableURLsNotToRemoveRegexes() + { + string t = getConfig( IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K, + GET_INDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT() ); + stringlist_t ret; + Util::parseNullSeperatedList( t, ret ); + return ret; + } + + + void + MetaFullTextIndexerInterface::queryFoundNonResolvableURLs( stringlist_t& sl ) + { + stringlist_t regexes = getNonResolvableURLsNotToRemoveRegexes(); + if( !regexes.empty() ) + { + erase_any_matches( toregexi( regexes ), sl ); + } + removeByURL( sl ); + } + + + + bool + MetaFullTextIndexerInterface::getIndexMethodSupportsIsFileNewerThanIndexedVersion() + { + return false; + } + + bool + MetaFullTextIndexerInterface::isFileNewerThanIndexedVersion( const fh_context& c ) + { + return true; + } + + + MetaFullTextIndexerInterface::SignalThrottle::SignalThrottle( long fireEveryN ) + : + m_fireEveryN( fireEveryN ), + m_nextFireAtByte( fireEveryN ) + { + } + bool MetaFullTextIndexerInterface::SignalThrottle::operator()( long current ) + { + bool ret = false; + if( current > m_nextFireAtByte ) + { + ret = true; + m_nextFireAtByte += m_fireEveryN; + } + return ret; + } + + MetaFullTextIndexerInterface::SignalThrottle + MetaFullTextIndexerInterface::getSignalThrottle() + { + SignalThrottle ret( 256*1024 ); + return ret; + } + + + void + MetaFullTextIndexerInterface::allWritesComplete() + { + } + void + MetaFullTextIndexerInterface::setOpenConfigReadOnly( bool v ) + { + P->m_configShouldBeReadOnly = v; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + fh_idx getDefaultFullTextIndex() + { + static fh_idx o = 0; + if( !o ) + { + o = getFullTextIndex( FULLTEXTROOT ); + } + return o; + } + + /** + * Get the lexicon, inverted file and document map rooted + * at the given path. + */ + fh_idx getFullTextIndex( const std::string& basepath ) + { + string index_classname = get_db4_string( basepath + "/" + DB_FULLTEXT, + IDXMGR_INDEX_CLASS_K, + IDXMGR_INDEX_CLASS_DEFAULT, + true, true ); + + ensureFulltextIndexPluginFactoriesAreLoaded(); + fh_idx idx = MetaFullTextIndexerInterfaceFactory::Instance(). + CreateObject( index_classname ); + idx->private_initialize( basepath ); + idx->LocalCommonConstruction(); + idx->CommonConstruction(); + return idx; + } + + fh_docindexer makeDocumentIndexer( fh_idx idx ) + { + if( !idx ) + idx = getDefaultFullTextIndex(); + + return new DocumentIndexer( idx ); + } + }; + + fh_idx createFullTextIndex( const std::string& index_classname, + fh_context c, + bool caseSensitive, + bool dropStopWords, + StemMode stemMode, + const std::string& lex_class, + fh_context md ) + { + if( !md ) + { + md = new CreateMetaDataContext(); + } + + if( stemMode != STEM_NONE ) + { + if( index_classname == "lucene" ) + { + if( stemMode != STEM_PORTER ) + { + fh_stringstream ss; + ss << "Invalid stemming mode for index module chosen." + << " lucene only supports no stemming or the porter algo." + << endl; + Throw_FullTextIndexException( tostr(ss), GetImpl(c) ); + } + } + if( index_classname == "native" ) + { + if( stemMode != STEM_J_B_LOVINS_68 ) + { + fh_stringstream ss; + ss << "Invalid stemming mode for index module chosen." + << " native only supports no stemming or the lovings_68 algo." + << endl; + Throw_FullTextIndexException( tostr(ss), GetImpl(c) ); + } + } + } + + ensureFulltextIndexPluginFactoriesAreLoaded(); + fh_idx idx = MetaFullTextIndexerInterfaceFactory::Instance(). + CreateObject( index_classname ); + idx->P->m_base = c; + idx->CreateIndexBeforeConfig( c, caseSensitive, dropStopWords, stemMode, + lex_class, md ); + + idx->P->ensureConfigFileCreated(); + idx->setConfig( IDXMGR_INDEX_CLASS_K, index_classname ); + idx->setConfig( IDXMGR_CASESEN_CLASS_K, tostr(caseSensitive)); + idx->setConfig( IDXMGR_DROPSTOPWORDS_CLASS_K, tostr(dropStopWords)); + idx->setConfig( IDXMGR_STEMMER_CLASS_K, tostr(stemMode)); + + idx->CreateIndex( c, caseSensitive, dropStopWords, stemMode, + lex_class, md ); + + idx->LocalCommonConstruction(); + idx->CommonConstruction(); + return idx; + } + + + stringlist_t& getMetaFullTextIndexClassNames() + { + static stringlist_t sl; + return sl; + } + + bool appendToMetaFullTextIndexClassNames( const std::string& s ) + { + getMetaFullTextIndexClassNames().push_back( s ); + return true; + } + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + MetaFullTextIndexerInterface* CreateFullTextIndexerFromLibrary( + const std::string& implnameraw ) + { + std::string libname = AUTOTOOLS_CONFIG_LIBDIR + "/ferris/plugins/fulltextindexers/" + + implnameraw; + + typedef ::Loki::Functor< MetaFullTextIndexerInterface*, + ::Loki::NullType > CreateFunc_t; + MetaFullTextIndexerInterface* (*CreateFuncPtr)(); + + typedef map< std::string, CreateFunc_t > cache_t; + static cache_t cache; + + cache_t::iterator ci = cache.find( libname ); + if( ci != cache.end() ) + { + return ci->second(); + } + + GModule* ghandle = g_module_open ( libname.c_str(), G_MODULE_BIND_LAZY ); + if( !ghandle ) + { + ostringstream ss; + ss << "Error, unable to open module file: " + << g_module_error () << endl + << " implementation is at:" << libname << endl + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "Create", + (gpointer*)&CreateFuncPtr)) + { + ostringstream ss; + ss << "Error, unable to resolve factory function in module file: " + << g_module_error () << endl + << " implementation is at:" << libname << endl + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + cache.insert( make_pair( libname, CreateFuncPtr )); + return CreateFuncPtr(); + + } + + + }; +}; + diff --git a/Ferris/FullTextIndexerMetaInterface.hh b/Ferris/FullTextIndexerMetaInterface.hh new file mode 100644 index 0000000..3a7f69a --- /dev/null +++ b/Ferris/FullTextIndexerMetaInterface.hh @@ -0,0 +1,529 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexerMetaInterface.hh,v 1.14 2010/09/24 21:30:51 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/*** + * This class/interface was created when the Lucene fulltext indexing was added. + * Some Main Operations were identified and support added as virtual methods + * in the meta interface. This header file has limitations on what can be + * #include<>ed and should be as light as possible. + * + * 1) Add a new fh_context to index + * 2) append all the document numbers matching a term to a list + * 3) resolve a docid to a fh_context + */ +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_METAINTERFACE_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_METAINTERFACE_H_ + +#include +#include +#include +#include +#include + +namespace Ferris +{ + namespace FullTextIndex + { + class PathManager; + typedef guint32 docid_t; + typedef std::set< docid_t > docNumSet_t; + + class MetaFullTextIndexerInterface; + FERRIS_SMARTPTR( MetaFullTextIndexerInterface, fh_idx ); + + class DocumentIndexer; + FERRIS_SMARTPTR( DocumentIndexer, fh_docindexer ); + + /** + * Progress signal for adding new contexts to the full text indexing + * engine. + * @param fh_context is the context being added + * @param std::streamsize is the current byte offset into the context being added + * @param std::streamsize is the total size of the context being added + */ + typedef sigc::signal3< void, fh_context, std::streamsize, std::streamsize > + AddToFullTextIndexProgress_Sig_t; + AddToFullTextIndexProgress_Sig_t& getNullAddToFullTextIndexProgress_Sig(); + + namespace Factory + { + /** + * Get the default lexicon, inverted file and document map for + * the user. + */ + FERRISEXP_API fh_idx getDefaultFullTextIndex(); + + /** + * Get the lexicon, inverted file and document map rooted + * at the given path. + */ + FERRISEXP_API fh_idx getFullTextIndex( const std::string& basepath ); + + /** + * Get an indexing object with defaults all setup how the user wishes + */ + FERRISEXP_API fh_docindexer makeDocumentIndexer( fh_idx idx = 0 ); + }; + + class MetaFullTextIndexerInterfacePriv; + class FERRISEXP_API MetaFullTextIndexerInterface + : + public Handlable + { + MetaFullTextIndexerInterfacePriv* P; + + friend fh_idx createFullTextIndex( const std::string& index_classname, + fh_context c, + bool caseSensitive, + bool dropStopWords, + StemMode stemMode, + const std::string& lex_class, + fh_context md ); + friend fh_idx Factory::getFullTextIndex( const std::string& basepath ); + + /** + * Called after object creation for indexes that are existing. + * New indexes will instead have CreateIndexBeforeConfig() and + * CreateIndex() called. + */ + void private_initialize( const std::string& basepath ); + /** + * Called for local object init before CommonConstruction() is called. + */ + void LocalCommonConstruction(); + + protected: + + void addDocID( docNumSet_t& output, docid_t v ); + + /** + * internal use only. + * creator must call private_initialize() next + */ + MetaFullTextIndexerInterface(); + + /** + * Called on object creation for existing indexes for + * subclasses to perform extra work. For new indexes + * CreateIndexBeforeConfig() and CreateIndex() will + * instead be called. After either Setup() or + * CreateIndex() is called then CommonConstruction() will + * be called so that common setup operations for the index + * can be performed. + * + * Note that during the call to CreateIndexBeforeConfig() + * there is no config file created yet, so setConfig() + * should not be called. Configuration information can be + * instead set during CreateIndex() which is called after + * CreateIndexBeforeConfig() has been called and after a + * config file has been created. There are two methods so + * that subclasses which are using an index engine that + * wipes out the entire directory contents on + * initialization such as Lucene does can create the index + * and then have the system make the config file *after* + * the index has been made so that the config file remains + * in existance. + * + * All of Setup(), CreateIndexBeforeConfig(), + * CreateIndex() and CommonConstruction() do not have to + * call the parent, they are here only as hooks for + * subclasses to perform needed work + */ + virtual void Setup() + {} + /** + * See Setup() + * + * @param md Will always be a valid context, its path and url + * are meaningless but it could contain EA which the + * user has set in a fcreate/gfcreate operation to + * pass in extra metadata for the creation process. + */ + virtual void CreateIndexBeforeConfig( fh_context c, + bool caseSensitive, + bool dropStopWords, + StemMode stemMode, + const std::string& lex_class, + fh_context md ) + {} + /** + * See Setup() + * + * @param md Will always be a valid context, its path and url + * are meaningless but it could contain EA which the + * user has set in a fcreate/gfcreate operation to + * pass in extra metadata for the creation process. + */ + virtual void CreateIndex( fh_context c, + bool caseSensitive, + bool dropStopWords, + StemMode stemMode, + const std::string& lex_class, + fh_context md ) = 0; + virtual void CommonConstruction() + {} + + + std::string getConfig( const std::string& k, const std::string& def, + bool throw_for_errors = false ); + void setConfig( const std::string& k, const std::string& v ); + + class SignalThrottle; + SignalThrottle getSignalThrottle(); + + class SignalThrottle + { + long m_fireEveryN; + long m_nextFireAtByte; + SignalThrottle( long fireEveryN ); + friend SignalThrottle MetaFullTextIndexerInterface::getSignalThrottle(); + public: + bool operator()( long current ); + }; + + + public: + virtual ~MetaFullTextIndexerInterface(); + + std::string getPath(); + std::string getURL(); + + stringlist_t getNonResolvableURLsNotToRemoveRegexes(); + + + /** + * Remove the files with these URLs from the index if possible. + * The user might explicitly deny removal of some URLs if they want. + * + * Relies on supportsRemove() and removeDocumentsMatchingRegexFromIndex() + */ + void removeByURL( stringlist_t& sl ); + + /** + * When a query system finds URLs it can't resolve it should call + * here. This will handle the possible removal of those URLs from + * the index depending on the user's desires. For example, they + * might not want to remove URLs which are on an NFS server which + * happens to be down at the moment. + */ + void queryFoundNonResolvableURLs( stringlist_t& sl ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Subclasses supporting isFileNewerThanIndexedVersion() should override this + * method and return true + */ + virtual bool getIndexMethodSupportsIsFileNewerThanIndexedVersion(); + /** + * Return true if the passed context is newer than when it was last added + * to the index. + */ + virtual bool isFileNewerThanIndexedVersion( const fh_context& c ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Used in the PG EA Index module to shortcut ferris-fulltext EA predicates + * when the fulltext index chosen is also in the same database. + */ + bool isTSearch2IndexInGivenDatabase( const std::string& wanted_dbname ); + + /** + * Used by the Clucene ea index module to shortcut embedded fulltext queries + */ + bool isCLuceneIndex(); + /** + * A special method to add in the CLucene query object for a fulltext query + * to the boolean query and return the result. + */ + virtual void* BuildCLuceneQuery( const std::string& qstr, void* current_query_vp ); + + + /** + * should stop words be dropped in this index + */ + bool getDropStopWords(); + + /** + * List of static stop words + */ + stringset_t& getStopWords(); + + /** + * should case be perserved. if not then case folding should be + * done to lower case. + */ + bool isCaseSensitive(); + + /** + * get the stemming algo that should be used to trim new items in + * the lexicon + */ + StemMode getStemMode(); + + /** + * Indexes may be created that only support boolean queries. + */ + virtual bool supportsRankedQuery(); + + /** + * Called to sync the various data structures that the index might + * have like; invertedFile, document map, lexicon etc. + */ + virtual void sync() + {} + + /** + * Called by DocumentIndexer to allow the index implementation to + * do once off preparations for adding new items to the index. + * Such preperations can be wound back in sync() after all documents + * have been added. + */ + enum prepareForWritesFlags { + PREPARE_FOR_WRITES_NONE = 0, + PREPARE_FOR_WRITES_ISNEWER_TESTS = 1<<1 + }; + virtual void prepareForWrites( int f = PREPARE_FOR_WRITES_NONE ) + {} + + + /** + * prepareForWrites() is called before any addToIndex() calls. + * This is called after all addToIndex() calls to allow subclasses + * to flush caches setup in prepareForWrites(). + */ + virtual void allWritesComplete(); + + /** + * Add the file at the given URL to the index. + * + * subclasses should make an effort to emit the progress signal + * so that UIs can update how far through the indexing is. + * Use the docIndexer object's getProgressSig() for progress reporting. + */ + virtual void addToIndex( fh_context c, + fh_docindexer di ) = 0; + + /** + * Add all the document ID's that match a given term + * to the collection passed in. + * + * @return output set for easy method chaining. + */ + virtual docNumSet_t& addAllDocumentsMatchingTerm( + const std::string& term, + docNumSet_t& output, + int limit ) = 0; + + /** + * Some indexing code might not store a persistent doc <-> id + * mapping. In such a case addAllDocumentsMatchingTerm() + * should keep building an internal one and this method will + * free that internal build up. + */ + virtual void cleanDocumentIDCache() + {} + + /** + * Resolve a document number to its URL. This call only has + * to be valid between one or more calls to + * addAllDocumentsMatchingTerm() and the subsequent call to + * cleanDocumentIDCache(). + */ + virtual std::string resolveDocumentID( docid_t ) = 0; + + + /** + * For the ability to pass in raw xipian format query + * strings and have them resolved to a set of docids. + * + * Mainly of interest for the xipian module unless other + * fulltext index modules wish to parse xipian format + * query strings and resolve them. + * + * default is to throw and error of unsupported query format. + */ + virtual + docNumSet_t& + ExecuteXapianFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + virtual + docNumSet_t& + ExecuteWebFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + + + /** + * For the ability to pass in raw tsearch2 format query + * strings and have them resolved to a set of docids. + * + * Mainly of interest for the pg tsearch2 module unless other + * fulltext index modules wish to parse tsearch2 format + * query strings and resolve them. + * + * default is to throw and error of unsupported query format. + */ + virtual + docNumSet_t& + ExecuteTsearch2FullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + virtual + docNumSet_t& + ExecuteExternalFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + virtual + docNumSet_t& + ExecuteBeagleFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + virtual + docNumSet_t& + ExecuteLuceneFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + /** + * Try to execute a queryString using the fulltext index backend. + * ie, a call to ExecuteXapianFullTextQuery() or + * ExecuteTsearch2FullTextQuery() is made depending on the backend + * in use. + */ + virtual + docNumSet_t& + ExecuteRawFullTextQuery( const std::string& queryString, + docNumSet_t& docnums, + int limit ); + + /** + * Called when the index is about to be added to. + */ + virtual void prepareForInsertions(); + + /** + * BRIDGE METHOD. returns true if this is a ferriscustom index. + */ + virtual bool isCustomFerrisIndex(); + + /** + * if(isCustomFerrisIndex()) cast the class to a path manager. + */ + virtual PathManager* tryToCastToPathManager(); + + /** + * if(isCustomFerrisIndex()) execute a ranked query + */ + virtual void executeRankedQuery( fh_context selection, + std::string query_string, + int m_accumulatorsMaxSize, + int m_resultSetMaxSize ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * If the index plugin supports the removal of documents, this method + * should be overriden to remove any documents with URLs matching the + * given regex. + */ + virtual void removeDocumentsMatchingRegexFromIndex( const std::string& s, + time_t mustBeOlderThan = 0 ); + + /** + * If a class provides the above method then override this and return 1; + */ + virtual bool supportsRemove(); + + /** + * When multiversioning, remove any instances of document data + * which are older than the given time. This never effects the + * current version of document data, only outdated versions. + */ + virtual void purgeDocumentInstancesOlderThan( time_t t ); + + protected: + + /** + * If an index plugin doesn't want to modify anything in the + * db file it should set this in Setup() to allow the db4 file + * to live on a read only NFS share if desired. + */ + void setOpenConfigReadOnly( bool v ); + + + }; + + + // factories for creating the indexes. + FERRISEXP_API stringlist_t& getMetaFullTextIndexClassNames(); + FERRISEXP_API bool appendToMetaFullTextIndexClassNames( const std::string& s ); + typedef Loki::SingletonHolder< + Loki::Factory< MetaFullTextIndexerInterface, std::string >, + Loki::CreateUsingNew, Loki::NoDestroy > + MetaFullTextIndexerInterfaceFactory; + + + // + // libferris 1.1.40+ function used by the loadable ftx index + // module factories to load an implementation and create + // an object of that MetaFullTextIndexerInterface subclass. + // + FERRISEXP_API MetaFullTextIndexerInterface* CreateFullTextIndexerFromLibrary( + const std::string& implnameraw ); + + }; + + FERRISEXP_API bool RegisterFulltextIndexPlugin( const char* libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive, + const std::string& simpleTypes ); + FERRISEXP_API void RegisterFulltextIndexPluginAlias( const char* libname, + const std::string& ferristype ); + + +}; + +#endif + diff --git a/Ferris/FullTextIndexerSyntheticDocID.cpp b/Ferris/FullTextIndexerSyntheticDocID.cpp new file mode 100644 index 0000000..45bb8bc --- /dev/null +++ b/Ferris/FullTextIndexerSyntheticDocID.cpp @@ -0,0 +1,68 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexerSyntheticDocID.cpp,v 1.2 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FullTextIndexerSyntheticDocID_private.hh" +#include "Enamel.hh" + +using namespace std; + +namespace Ferris +{ + namespace FullTextIndex + { + + std::string + FullTextIndexerSyntheticDocID::resolveDocumentID( docid_t id ) + { + Items_By_DocID_t::iterator diter = Items.get().find( id ); + if( diter == Items.get().end() ) + { + LG_IDX_W << "resolveDocumentID() id:" << id << " has no URL!" << endl; + return ""; + } + return diter->earl; + } + + int + FullTextIndexerSyntheticDocID::getDocID( const std::string earl ) + { + Items_By_Earl_t::iterator eiter + = Items.get().find( earl ); + if( eiter != Items.get().end() ) + { + return eiter->docid; + } + + static int newID = 0; + ++newID; + Items.insert( ContainerItem( newID, earl ) ); + return newID; + } + }; +}; diff --git a/Ferris/FullTextIndexerSyntheticDocID_private.hh b/Ferris/FullTextIndexerSyntheticDocID_private.hh new file mode 100644 index 0000000..5ae9a01 --- /dev/null +++ b/Ferris/FullTextIndexerSyntheticDocID_private.hh @@ -0,0 +1,99 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexerSyntheticDocID_private.hh,v 1.2 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace Ferris +{ + namespace FullTextIndex + { + class FERRISEXP_API FullTextIndexerSyntheticDocID + : + public MetaFullTextIndexerInterface + { + protected: + struct ContainerItem + { + int docid; + std::string earl; + ContainerItem( int docid = 0, const std::string& earl = "" ) + : + docid( docid ), + earl( earl ) + { + } + inline int getDocID() const + { + return docid; + } + inline const std::string& getEarl() const + { + return earl; + } + + }; + struct ITEMS_BY_DOCID {}; + struct ITEMS_BY_EARL {}; + + typedef boost::multi_index::multi_index_container< + ContainerItem, + boost::multi_index::indexed_by< + + boost::multi_index::ordered_unique< + boost::multi_index::tag, + boost::multi_index::const_mem_fun >, + + boost::multi_index::hashed_unique< + boost::multi_index::tag, + boost::multi_index::const_mem_fun > + > + > Items_t; + Items_t Items; + typedef Items_t::index::type Items_By_DocID_t; + typedef Items_t::index::type Items_By_Earl_t; + + virtual std::string resolveDocumentID( docid_t ); + int getDocID( const std::string earl ); + + }; + }; +}; + diff --git a/Ferris/FullTextIndexer_private.hh b/Ferris/FullTextIndexer_private.hh new file mode 100644 index 0000000..1dc3a8a --- /dev/null +++ b/Ferris/FullTextIndexer_private.hh @@ -0,0 +1,104 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextIndexer_private.hh,v 1.4 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_PRV_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_PRV_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace FullTextIndex + { +#define IDXMGR_INDEX_CLASS_K "index-manager-main-class-name" +#define IDXMGR_INDEX_CLASS_DEFAULT "lucene" +//#define IDXMGR_INDEX_CLASS_DEFAULT "native" + +#define IDXMGR_MAXPTRS_PER_SKIPLISTCHUNK_K "idxmgr-maxptrs-per-skiplistchunk-k" +#define IDXMGR_MAXPTRS_PER_SKIPLISTCHUNK_DEFAULT "512" +#define IDXMGR_DGAP_CODE_K "idxmgr-dgap-code-k" +#define IDXMGR_DGAP_CODE_DEFAULT "Interpolative" +#define IDXMGR_FDT_CODE_K "idxmgr-fdt-code-k" +#define IDXMGR_FDT_CODE_DEFAULT "Gamma" +#define IDXMGR_LEXICON_CLASS_K "index-manager-lexicon-class" +#define IDXMGR_LEXICON_CLASS_DEFAULT "FrontCodedBlocks (3-in-4)" +#define IDXMGR_INVERTEDFILE_CLASS_K "index-manager-inverted-file-class" +#define IDXMGR_INVERTEDFILE_CLASS_DEFAULT "native" +#define IDXMGR_CASESEN_CLASS_K "index-manager-case-sensitive" +#define IDXMGR_DROPSTOPWORDS_CLASS_K "index-manager-drop-stop-words" +#define IDXMGR_STOPWORDSLIST_K "index-manager-stop-words-list" +#define IDXMGR_STOPWORDSLIST_DEFAULT "the,a,and" +#define IDXMGR_STEMMER_CLASS_K "index-manager-stemmer" +#define IDXMGR_SUPPORTS_RANKED_K "index-manager-supports-ranked-query" + +#define IDXMGR_LEXICON_VERSION_K "index-manager-lexicon-version" +#define IDXMGR_INVERTEDFILE_VERSION_K "index-manager-invertedfile-version" +#define IDXMGR_DOCUMENTMAP_VERSION_K "index-manager-documentmap-version" +#define IDXMGR_LEXICON_VERSION_CURRENT 1 +#define IDXMGR_INVERTEDFILE_VERSION_CURRENT 1 +#define IDXMGR_DOCUMENTMAP_VERSION_CURRENT 1 + +#define IDXMGR_DOCMAP_USE_SECIDX_K "idxmgr-docmap-use-secidx-k" +#define IDXMGR_DOCMAP_USE_SECIDX_DEFAULT "1" + +#define IDXMGR_DOCMAP_REVOKED_ID_CACHE_K "idxmgr-docmap-revoked_id_cache-k" +#define IDXMGR_DOCMAP_REVOKED_ID_CACHE_DEFAULT "" + + FERRISEXP_API extern const std::string IDXMGR_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_K; + FERRISEXP_API std::string GET_INDEX_NONRESOLVABLE_NOT_TO_REMOVE_REGEX_DEFAULT( bool commaSeperated = false ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Create a new index. + */ + FERRISEXP_API fh_idx createFullTextIndex( + const std::string& index_classname, + fh_context c, + bool caseSensitive, + bool dropStopWords, + StemMode stemMode, + const std::string& lex_class, + fh_context md = 0 ); + + + }; +}; +#endif diff --git a/Ferris/FullTextQuery.cpp b/Ferris/FullTextQuery.cpp new file mode 100644 index 0000000..29a37d2 --- /dev/null +++ b/Ferris/FullTextQuery.cpp @@ -0,0 +1,864 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextQuery.cpp,v 1.8 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Resolver_private.hh" +#include "FullTextQuery.hh" +#include "FullTextIndexer.hh" +#include "Indexing/IndexPrivate.hh" +#include "FerrisSlaveProcess.hh" + + +using namespace std; + +namespace Ferris +{ + /** + * Support for full text indexing and querys + */ + namespace FullTextIndex + { + typedef Loki::SingletonHolder< Loki::Factory< FullTextQuery, QueryMode > > QueryFactory; + + static bool shouldRunFullTextQueryFilesystemAsync_val = false; + bool shouldRunFullTextQueryFilesystemAsync() + { + return shouldRunFullTextQueryFilesystemAsync_val; + } + + void shouldRunFullTextQueryFilesystemAsync( bool v ) + { + shouldRunFullTextQueryFilesystemAsync_val = v; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FullTextQuery::FullTextQuery( const std::string& s, fh_idx idx ) + : + m_idx( idx ), + m_accumulatorsMaxSize( 1000 ), + m_resultSetMaxSize( 100 ), + m_queryString( s ), + m_asyncSelection( 0 ), + m_asyncSlave( 0 ), + m_limit( 0 ) + { + } + + FullTextQuery::~FullTextQuery() + { + } + + + void FullTextQuery::setAccumulatorsMaxSize( int v ) + { + m_accumulatorsMaxSize = v; + } + + void FullTextQuery::setResultSetMaxSize( int v ) + { + m_resultSetMaxSize = v; + } + + void FullTextQuery::setQuery( const std::string& s ) + { + m_queryString = s; + } + + void + FullTextQuery::setLimit( int limit ) + { + m_limit = limit; + } + + + + void + FullTextQuery::setIndex( fh_idx idx ) + { + m_idx = idx; + } + + void + FullTextQuery::OnAsyncXMLMessage( fh_xstreamcol h ) + { + stringmap_t& m = h->getStringMap(); + LG_IDX_D << "FullTextQuery::OnAsyncXMLMessage() m.sz:" << m.size() << endl; + for( stringmap_t::iterator mi = m.begin(); mi != m.end(); ++mi ) + { + LG_IDX_D << "FullTextQuery::OnAsyncXMLMessage() k:" << mi->first << " v:" << mi->second << endl; + } + + if( m.end() != m.find("count") ) + { + LG_IDX_D << "result count:" << m["count"] << endl; + } + else if( m.end() != m.find("docids") ) + { + stringlist_t sl = Util::parseCommaSeperatedList( m["docids"] ); + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + string docid = *si; + LG_IDX_D << "docid:" << docid << endl; + } + } + else if( m.end() != m.find("earl") ) + { + LG_IDX_D << "have earl!" << endl; + string earl = m["earl"]; + LG_IDX_D << earl << endl; + + try + { + string earl = m["earl"]; + string docid = m["docid"]; + + fh_context ctx = Resolve( earl ); + m_asyncSelection->createSubContext( "", ctx ); + LG_IDX_D << "added earl:" << earl << endl; + } + catch( exception& e ) + { + LG_IDX_W << "ERROR:" << e.what() << endl; + cerr << "ERROR:" << e.what() << endl; + } + } + else if( m.end() != m.find("outofband-error") ) + LG_IDX_W << "ERROR:" << m["outofband-error"] << endl; + else if( m.end() != m.find("outofband-starting") ) + LG_IDX_D << "starting..." << endl; + else + { + LG_IDX_W << "strange xml_msg_arrived()" << endl; + } + + } + + + void + FullTextQuery::OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ) + { + LG_IDX_D << "OnChildComeplete() estatus:" << estatus << endl; + /* + * Make sure that all async IO calls have been accepted. + */ + Main::processAllPendingEvents(); + } + + + fh_context + FullTextQuery::executeAsync() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + + string query_string = m_queryString; + + fh_stringstream qss; + qss << "findexquery -P " << m_idx->getPath() << " --ferris-internal-async-message-slave " +// << " --limit " << limit << " " + << query_string; + LG_IDX_D << "cmd:" << tostr(qss) << endl; + + + m_asyncSelection = selection; + + m_asyncSlave = CreateFerrisSlaveProcess( "fulltext query", tostr(qss) ); + m_asyncSlave->getMessageArrivedSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncXMLMessage ) ); + m_asyncSlave->getChildCompleteSig().connect( sigc::mem_fun( *this, &_Self::OnAsyncChildComeplete ) ); + m_asyncSlave->getRunner()->Run(); + LG_IDX_D << "have started slave process..." << endl; + +// if( m_idx->isCustomFerrisIndex() ) +// m_idx->executeRankedQuery( selection, +// m_queryString, +// m_accumulatorsMaxSize, +// m_resultSetMaxSize ); + + return selection; + } + + + /********************************************************************************/ + /********************************************************************************/ + + std::string makeFullTextQueryFilterString( const std::string& qs, + QueryMode qm, + fh_idx idx ) + { + fh_stringstream ss; + ss << "(ftq"; + if( qm == QUERYMODE_RANKED ) + ss << "r"; + else + ss << "b"; + ss << "=" << qs; + ss << ")"; + return tostr(ss); + } + + + + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL RankedFullTextQuery + : + public FullTextQuery + { + + public: + + RankedFullTextQuery( const std::string& s = "" , fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool RankedFullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_RANKED, &MakeObject::Create ); + + fh_context + RankedFullTextQuery::execute() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + if( m_idx->isCustomFerrisIndex() ) + m_idx->executeRankedQuery( selection, + m_queryString, + m_accumulatorsMaxSize, + m_resultSetMaxSize ); + + return selection; + } + + + + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL BooleanFullTextQuery + : + public FullTextQuery + { + + public: + BooleanFullTextQuery( const std::string& s = "", fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool BooleanFullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_BOOLEAN, &MakeObject::Create ); + + /** + * Mount a boolean query string (eg. A & B | C ) as a filesystem + */ + fh_context MountBooleanQueryString( const string& v ) + { + RootContextFactory fac; + + fac.setContextClass( "fulltextboolean" ); + fac.AddInfo( RootContextFactory::ROOT, "/" ); + fac.AddInfo( "StaticString", v ); + + fh_context c = fac.resolveContext( RESOLVE_EXACT ); + c->read(); + return c; + } + + /** + * assume the query is mounted at q and execute the part at q returning + * result. This method may recurse to obtain subquery results. + */ + docNumSet_t& ExecuteBooleanQuery( fh_context q, + docNumSet_t& docnums, + fh_idx idx, + int limit ) + { + string token = getStrAttr( q, "token", "" ); + string tokenfc = foldcase(token); + fh_attribute orderedtla = q->getAttribute("in-order-insert-list"); + fh_istream orderedtls = orderedtla->getIStream(); + + if( tokenfc == "&" ) + { + string s; + getline( orderedtls, s ); + fh_context l = q->getSubContext( s ); + getline( orderedtls, s ); + fh_context r = q->getSubContext( s ); + + docNumSet_t ldocs; + docNumSet_t rdocs; + docNumSet_t tmp; + + ExecuteBooleanQuery( l, ldocs, idx, limit ); + ExecuteBooleanQuery( r, rdocs, idx, limit ); + set_intersection( ldocs.begin(), ldocs.end(), + rdocs.begin(), rdocs.end(), + inserter( tmp, tmp.begin() ) ); + docnums.insert( tmp.begin(), tmp.end() ); + } + else if( tokenfc == "|" ) + { + string s; + getline( orderedtls, s ); + fh_context l = q->getSubContext( s ); + getline( orderedtls, s ); + fh_context r = q->getSubContext( s ); + + docNumSet_t ldocs; + docNumSet_t rdocs; + docNumSet_t tmp; + + ExecuteBooleanQuery( l, ldocs, idx, limit ); + ExecuteBooleanQuery( r, rdocs, idx, limit ); + set_union( ldocs.begin(), ldocs.end(), + rdocs.begin(), rdocs.end(), + inserter( tmp, tmp.begin() ) ); + docnums.insert( tmp.begin(), tmp.end() ); + } + else if( tokenfc == "-" ) + { + string s; + getline( orderedtls, s ); + fh_context l = q->getSubContext( s ); + getline( orderedtls, s ); + fh_context r = q->getSubContext( s ); + + docNumSet_t ldocs; + docNumSet_t rdocs; + docNumSet_t tmp; + + ExecuteBooleanQuery( l, ldocs, idx, limit ); + ExecuteBooleanQuery( r, rdocs, idx, limit ); + set_difference( ldocs.begin(), ldocs.end(), + rdocs.begin(), rdocs.end(), + inserter( tmp, tmp.begin() ) ); + docnums.insert( tmp.begin(), tmp.end() ); + } + else if( tokenfc == "!" ) + { + cerr << "WARNING, negation is not coded yet!" << endl; + } + else + { + if( !idx->isCaseSensitive() ) + { + token = foldcase( token ); + } + token = stem( token, idx->getStemMode() ); + + idx->addAllDocumentsMatchingTerm( token, docnums, limit ); + +// fh_lexicon lex = idx->getLexicon(); +// fh_invertedfile inv = idx->getInvertedFile(); + +// LG_IDX_D << "looking up token:" << token << endl; +// termid_t tid = lex->lookup( token ); +// if( !tid ) +// { +// LG_IDX_D << "token not found in lexicon:" << token << endl; +// return docnums; +// } + +// fh_term term = inv->getTerm( tid ); + +// docNumSet_t tmp; +// term->getDocumentNumbers( tmp ); +// docnums.insert( tmp.begin(), tmp.end() ); + } + return docnums; + } + + + fh_context + BooleanFullTextQuery::execute() + { + string query_string = m_queryString; + + try + { + + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + if( m_queryString.empty() ) + { + return selection; + } + + LG_IDX_D << "ExecuteBooleanQuery() query:" << query_string + << " limit:" << m_limit + << endl; + + /* + * Assume by default that boolean queries without any operators are + * using implicit & operators + */ + if( string::npos != query_string.find(' ') + && string::npos == query_string.find('&') + && string::npos == query_string.find('|') + && string::npos == query_string.find('-') ) + { + bool v = true; + fh_stringstream iss; + fh_stringstream oss; + iss << query_string; + string s; + while( getline( iss, s, ' ') ) + { + if( !v ) + oss << " & "; + oss << s; + v = false; + } + query_string = tostr(oss); + } + + fh_context q = MountBooleanQueryString( query_string ); + fh_context root_of_q = q->getSubContext( *(q->getSubContextNames().begin()) ); + + docNumSet_t docnums; + ExecuteBooleanQuery( root_of_q, docnums, m_idx, m_limit ); + + selection->addAttribute( "filter", + makeFullTextQueryFilterString( m_queryString, + QUERYMODE_BOOLEAN, + m_idx ), + FXD_FFILTER, + true ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + LG_IDX_D << " Found matching document:" << *iter << endl; + + try + { + string earl = m_idx->resolveDocumentID( *iter ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + m_idx->queryFoundNonResolvableURLs( NonResolvables ); + + return selection; + } + catch( CanNotReadContextPcctsParseFailed& e ) + { + stringstream ss; + const stringlist_t& sl = e.getSyntaxErrorList(); + ss << "Syntax error for query:" << endl + << query_string << endl; + for( stringlist_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + { + ss << *si << endl; + } + Throw_FulltextQuerySyntaxError( tostr(ss), 0 ); + } + catch(...) + { + throw; + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL XapianFullTextQuery + : + public FullTextQuery + { + + public: + + XapianFullTextQuery( const std::string& s = "" , fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool XapianFullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_XAPIAN, &MakeObject::Create ); + + fh_context + XapianFullTextQuery::execute() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + docNumSet_t docnums; + m_idx->ExecuteXapianFullTextQuery( m_queryString, docnums, m_limit ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + LG_IDX_D << " Found matching document:" << *iter << endl; + + try + { + string earl = m_idx->resolveDocumentID( *iter ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + m_idx->queryFoundNonResolvableURLs( NonResolvables ); + + return selection; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL Tsearch2FullTextQuery + : + public FullTextQuery + { + + public: + + Tsearch2FullTextQuery( const std::string& s = "" , fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool Tsearch2FullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_TSEARCH2, &MakeObject::Create ); + + fh_context + Tsearch2FullTextQuery::execute() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + docNumSet_t docnums; + m_idx->ExecuteTsearch2FullTextQuery( m_queryString, docnums, m_limit ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + LG_IDX_D << " Found matching document:" << *iter << endl; + + try + { + string earl = m_idx->resolveDocumentID( *iter ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + m_idx->queryFoundNonResolvableURLs( NonResolvables ); + + return selection; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL BeagleFullTextQuery + : + public FullTextQuery + { + + public: + + BeagleFullTextQuery( const std::string& s = "" , fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool BeagleFullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_BEAGLE, &MakeObject::Create ); + + fh_context + BeagleFullTextQuery::execute() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + docNumSet_t docnums; + m_idx->ExecuteBeagleFullTextQuery( m_queryString, docnums, m_limit ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + LG_IDX_D << " Found matching document:" << *iter << endl; + + try + { + string earl = m_idx->resolveDocumentID( *iter ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + m_idx->queryFoundNonResolvableURLs( NonResolvables ); + + return selection; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL ExternalFullTextQuery + : + public FullTextQuery + { + + public: + + ExternalFullTextQuery( const std::string& s = "" , fh_idx idx = 0 ) + : + FullTextQuery( s, idx ) + { + } + + virtual fh_context execute(); + + static bool reged; + }; + bool ExternalFullTextQuery::reged = QueryFactory::Instance().Register( + QUERYMODE_EXTERNAL, &MakeObject::Create ); + + fh_context + ExternalFullTextQuery::execute() + { + /* + * We make a selection of the resulting objects and pass it + * back as a filesystem + */ + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + docNumSet_t docnums; + m_idx->ExecuteExternalFullTextQuery( m_queryString, docnums, m_limit ); + + stringlist_t NonResolvables; + for( docNumSet_t::iterator iter = docnums.begin(); iter != docnums.end(); ++iter ) + { + LG_IDX_D << " Found matching document:" << *iter << endl; + + try + { + string earl = m_idx->resolveDocumentID( *iter ); + try + { + fh_context ctx = Resolve( earl ); + selection->createSubContext( "", ctx ); + } + catch( exception& e ) + { + NonResolvables.push_back( earl ); + cerr << "Warning, e:" << e.what() << endl; + } + } + catch( exception& e ) + { + cerr << "Warning, e:" << e.what() << endl; + } + } + m_idx->queryFoundNonResolvableURLs( NonResolvables ); + + return selection; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + fh_ftquery makeFullTextQuery( const std::string& s, + QueryMode qm, + fh_idx idx, + int limit ) + { + if( qm == QUERYMODE_USERPREF ) + qm = QUERYMODE_RANKED; + if( !isBound( idx ) ) + idx = Factory::getDefaultFullTextIndex(); + + fh_ftquery ret = QueryFactory::Instance().CreateObject( qm ); + + ret->setIndex( idx ); + ret->setQuery( s ); + ret->setLimit( limit ); + + return ret; + } + }; + + + fh_context ExecuteQuery( const std::string& s, QueryMode qm, fh_idx idx, int limit ) + { + LG_IDX_D << "ExecuteQuery() query:" << s + << " mode:" << qm + << " limit:" << limit + << endl; + if( idx ) + LG_IDX_D << " idx:" << idx->getPath() << endl; + + + fh_ftquery q = Factory::makeFullTextQuery( s, qm, idx, limit ); + return q->execute(); + } + + fh_context ExecuteQueryAsync( const std::string& s, QueryMode qm, fh_idx idx, int limit ) + { + LG_IDX_D << "ExecuteQueryAsync() query:" << s + << " mode:" << qm + << endl; + if( idx ) + LG_IDX_D << " idx:" << idx->getPath() << endl; + + fh_ftquery q = Factory::makeFullTextQuery( s, qm, idx, limit ); + fh_context ret = q->executeAsync(); + ret->addHandlableToBeReleasedWithContext( GetImpl(q) ); + return ret; + } + + + }; +}; diff --git a/Ferris/FullTextQuery.hh b/Ferris/FullTextQuery.hh new file mode 100644 index 0000000..a57d0d2 --- /dev/null +++ b/Ferris/FullTextQuery.hh @@ -0,0 +1,175 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FullTextQuery.hh,v 1.7 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXTQUERY_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXTQUERY_H_ + +#include +#include +#include + +#include + +namespace Ferris +{ + /** + * Support for full text indexing and querys + */ + namespace FullTextIndex + { + FERRISEXP_API bool shouldRunFullTextQueryFilesystemAsync(); + FERRISEXP_API void shouldRunFullTextQueryFilesystemAsync( bool v ); + + FERRISEXP_API enum QueryMode { + QUERYMODE_USERPREF = 1<<1, + QUERYMODE_BOOLEAN = 1<<2, + QUERYMODE_RANKED = 1<<3, + QUERYMODE_XAPIAN = 1<<4, + QUERYMODE_TSEARCH2 = 1<<5, + QUERYMODE_EXTERNAL = 1<<6, + QUERYMODE_BEAGLE = 1<<7 + }; + FERRISEXP_API std::string makeFullTextQueryFilterString( const std::string& qs, + QueryMode qm, + fh_idx idx ); + + /** + * Execute the given query in the mode selected against either the given + * index or the default index if no index is given + */ + FERRISEXP_API fh_context ExecuteQuery( const std::string& s, + QueryMode qm = QUERYMODE_USERPREF, + fh_idx idx = 0, + int limit = 0 ); + FERRISEXP_API fh_context ExecuteQueryAsync( const std::string& s, + QueryMode qm = QUERYMODE_USERPREF, + fh_idx idx = 0, + int limit = 0 ); + + FERRISEXP_API fh_context MountBooleanQueryString( const std::string& v ); + FERRISEXP_API docNumSet_t& ExecuteBooleanQuery( fh_context q, + docNumSet_t& docnums, + fh_idx idx, + int limit ); + + + + class FullTextQuery; + FERRIS_SMARTPTR( FullTextQuery, fh_ftquery ); + + namespace Factory + { + /** + * Used for more advanced queries than ExecuteQuery() can provide. + * first call here to create a Query object and then you can setup + * ranked query cutoffs and other tweaks that are set to default + * values if ExecuteQuery() is used. + */ + FERRISEXP_API fh_ftquery makeFullTextQuery( const std::string& s, + QueryMode qm = QUERYMODE_USERPREF, + fh_idx idx = 0, + int limit = 0 ); + }; + + class FERRISEXP_API FullTextQuery + : + public Handlable + { + typedef FullTextQuery _Self; + typedef Handlable _Base; + + protected: + + fh_idx m_idx; + int m_accumulatorsMaxSize; + int m_resultSetMaxSize; + std::string m_queryString; + fh_context m_asyncSelection; + fh_FerrisSlaveProcess m_asyncSlave; + int m_limit; + + FullTextQuery( const std::string& s, fh_idx idx ); + + void OnAsyncXMLMessage( fh_xstreamcol h ); + void OnAsyncChildComeplete( ChildStreamServer* css, fh_runner r, int status, int estatus ); + + public: + + virtual ~FullTextQuery(); + + /********************************************************************************/ + /********************************************************************************/ + /*** the following have effect for all query types ******************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * set the index to use for future executions + */ + void setIndex( fh_idx idx ); + + /** + * set the query string + */ + void setQuery( const std::string& s ); + + /** + * Limit number of results, or 0 for no limit. + */ + void setLimit( int limit = 0 ); + + /** + * run the query + */ + virtual fh_context execute() = 0; + + /** + * run the query as a subprocess + */ + virtual fh_context executeAsync(); + + /********************************************************************************/ + /********************************************************************************/ + /*** the following are only effective for RANKED queries ************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * max Number of candidate documents to calculate for + */ + void setAccumulatorsMaxSize( int v ); + + /** + * only take the top v documents from the ranked results + */ + void setResultSetMaxSize( int v ); + }; + }; +}; +#endif diff --git a/Ferris/General.cpp b/Ferris/General.cpp new file mode 100644 index 0000000..5bc5e00 --- /dev/null +++ b/Ferris/General.cpp @@ -0,0 +1,1837 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: General.cpp,v 1.25 2010/11/17 21:30:44 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include + +#ifdef HAVE_BOOST +#define BOOST_UTF8_BEGIN_NAMESPACE namespace Ferris { +#define BOOST_UTF8_END_NAMESPACE }; +#define BOOST_UTF8_DECL +#include +#include +#endif + +#include + +/**********/ +/**********/ +/**********/ + +using namespace std; + +namespace Ferris +{ + std::string remove_prefix( const std::string& ret, const std::string& prefix ) + { + PrefixTrimmer pt; + pt.push_back( prefix ); + return pt( ret ); + } + + std::string remove_postfix( const std::string& ret, const std::string& postfix ) + { + PostfixTrimmer pt; + pt.push_back( postfix ); + return pt( ret ); + } + + + std::string tostr( const struct tm& tm ) + { + fh_stringstream ss; + ss << "< year:" << tm.tm_year << " month:" << tm.tm_mon + << " day:" << tm.tm_mday + << " hour:" << tm.tm_hour + << " min:" << tm.tm_min + << " sec:" << tm.tm_sec + << " />"; + return tostr(ss); + } + + + string toupperstring( const std::string& s ) + { + std::string ret = s; + + for( std::string::iterator p = ret.begin(); p != ret.end(); ++p ) + { + *p = ::toupper( *p ); + } + + return ret; + } + + string tolowerstring( const std::string& s ) + { + std::string ret = s; + + for( std::string::iterator p = ret.begin(); p != ret.end(); ++p ) + { + *p = ::tolower( *p ); + } + + return ret; + } + + std::string attemptToAbsoluteURL( + const std::string& maybeRelative, + const std::string& cwd_const ) + { + string cwd = cwd_const; + LG_CTX_D << "attemptToAbsoluteURL() mpath:" << maybeRelative << endl; + + int colonidx = maybeRelative.find( ":" ); + if( colonidx == string::npos ) + { + if( starts_with( maybeRelative, "/" ) ) + return maybeRelative; + + stringstream ss; + if( cwd.empty() ) + cwd = Shell::getCWDString(); + ss << cwd; + if( !ends_with( cwd, "/" ) ) + ss << "/"; + ss << maybeRelative; + LG_CTX_D << "attemptToAbsoluteURL() ret:" << tostr(ss) << endl; + return tostr(ss); + } + + LG_CTX_D << "attemptToAbsoluteURL(ret) mpath:" << maybeRelative << endl; + return maybeRelative; + } + + + std::basic_ostream< wchar_t, std::char_traits >& + operator<<(std::basic_ostream< wchar_t, std::char_traits >& oss, const std::string& s ) + { + std::wstring t; + t = Util::utf8_to_wstring( t, s ); + oss << t; + return oss; + } + + std::istream& getline( std::istream& ss, std::string& ret, const std::string& delim ) + { + stringstream retss; + char ch; + while( ss >> noskipws >> ch ) + { + if( delim.find(ch) != string::npos ) + { + ss.putback(ch); + break; + } + retss << ch; + } + ret = retss.str(); + return ss; + } + + stringpair_t + split( const std::string& data, const std::string& sep ) + { + int p = data.find( sep ); + string first = data.substr( 0, p ); + string second = data.substr( p+1 ); + return make_pair( first, second ); + } + + + + namespace Util + { + SingleShot::SingleShot() + : + virgin( true ) + {} + + bool SingleShot::operator()() + { + bool r = virgin; + virgin = false; + return r; + } + + bool SingleShot::value() + { + return virgin; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef wchar_t ucs4_t; + + std::locale& getUTF8Locale() + { + static std::locale old_locale; +#ifndef HAVE_BOOST + return old_locale; +#else + static std::locale utf8_locale(old_locale,new utf8_codecvt_facet); +// static std::locale utf8_locale(old_locale,new utf8_codecvt_facet); + return utf8_locale; +#endif + } + + std::string wstring_to_utf8( const std::wstring& s ) + { + std::string ret; + wstring_to_utf8( ret, s ); + return ret; + } + + std::string& wstring_to_utf8( std::string& ret, const std::wstring& s ) + { +#ifndef HAVE_BOOST + cerr << "ERROR: convert_to_wstring() requires boost to work" << endl; + ret = ""; + return ret; +#else + typedef mbstate_t ConversionState; // We use the default type + + enum { + NoError, + NoMoreInput, + ReadError, + ResultBufferFull, + ConversionError + }; + + wchar_t* transBuf = (wchar_t*)s.c_str(); + int transBufSize = s.length(); + + const int resultBufSize = 1024; + char resultBuf[resultBufSize]; + char *to = resultBuf; + char * const toLimit = resultBuf + resultBufSize; + + mbstate_t cs; + wchar_t * fromNext; + char *toNext; + std::locale& utf8_locale = getUTF8Locale(); + + codecvt_base::result + convResult = use_facet< codecvt >(utf8_locale).out + ((mbstate_t&)cs, (const wchar_t*)transBuf, (const wchar_t*)(transBuf + transBufSize), + (const wchar_t*&)fromNext, (char*)to, (char*)toLimit, (char*&)toNext); + + + + if(convResult == codecvt_base::ok) + { + string tmp( to, toNext - to ); + ret = tmp; + return ret; + } + + ret = ""; + return ret; +#endif + } + + + std::wstring utf8_to_wstring( const std::string& s ) + { + std::wstring ret; + utf8_to_wstring( ret, s ); + return ret; + } + + + std::wstring& utf8_to_wstring( std::wstring& ret, const std::string& s ) + { +// // glib2 attempt +// const gchar *to_codeset = "utf16"; +// // const gchar *from_codeset = "ISO-8859-1"; +// const gchar *from_codeset = "utf8"; +// gsize bytes_read = 0; +// gsize bytes_written = 0; +// GError* error = 0; + +// gchar* rstr = g_convert( s.c_str(), s.length()-1, +// to_codeset, +// from_codeset, +// &bytes_read, +// &bytes_written, +// &error ); +// if( rstr ) +// { +// cerr << "utf8_convert() bytes_written:" << bytes_written << endl; +// // wstring tmp( rstr, rstr+bytes_written ); +// // ret = tmp; +// ret.resize( bytes_written/2 ); +// memcpy( (void*)ret.data(), rstr, bytes_written ); +// g_free( rstr ); +// return ret; +// } +// if( error ) +// { +// cerr << "Error at input offset:" << bytes_read << " msg:" << error->message << endl; +// } + + + + + +#ifndef HAVE_BOOST + cerr << "ERROR: utf8_to_wstring() requires boost to work" << endl; + ret = L""; + return ret; +#else + typedef mbstate_t ConversionState; // We use the default type + + enum { + NoError, + NoMoreInput, + ReadError, + ResultBufferFull, + ConversionError + }; + + char* transBuf = (char*)s.c_str(); + int transBufSize = s.length(); + char* transBufEnd = (char*)s.c_str()+transBufSize; + + const int resultBufSize = transBufSize*2+10; +// const int resultBufSize = 1024; + wchar_t resultBuf[resultBufSize]; + wchar_t *to = resultBuf; + wchar_t * const toLimit = (resultBuf + resultBufSize); + + mbstate_t cs; + char * fromNext = 0; + wchar_t *toNext = 0; + std::locale& utf8_locale = getUTF8Locale(); + +// wofstream wof("/tmp/wof"); + wstringstream wss; + while( true ) + { +// cerr << "Calling in() transBuf:" << (void*)transBuf +// << " input-left:" << (transBufEnd-transBuf) +// << " to:" << (void*)to +// << " to-left:" << (toLimit-to) +// << endl; + codecvt_base::result + convResult = use_facet< codecvt >(utf8_locale).in + ((mbstate_t&)cs, (const char*)transBuf, (const char*)(transBufEnd), + (const char*&)fromNext, (wchar_t*)to, (wchar_t*)toLimit, (wchar_t*&)toNext); + + if(convResult == codecvt_base::partial) + { + cerr << "partial conversion. sz:" << (fromNext-transBuf) + << " fromNext - start:" << (fromNext - transBuf) + << " toNext - to:" << (toNext - to) + << endl; + wstring tmp( to, toNext - to ); + wss << tmp; +// wof << "tmp:" << tmp << endl; + + if( fromNext != transBuf ) + { + transBuf = fromNext; + to = toNext; + continue; + } + } + if(convResult == codecvt_base::ok) + { + wstring tmp( to, toNext - to ); + wss << tmp; + ret = wss.str(); + return ret; + } + cerr << "ERROR: utf8_to_wstring() error converting:" << convResult + << " partial:" << codecvt_base::partial + << " completed:" << (toNext - to) + << " transBufSize:" << transBufSize + << endl; + break; + } + + ret = L""; + return ret; +#endif + } + + std::string iso8859_to_utf8( const std::string& s ) + { + static iconv_t cd = (iconv_t)-1; + static bool v = true; + if( v ) + { + v = false; + const char* tocode = "UTF-8"; + const char* fromcode = "ISO-8859-1"; + static iconv_t scd = iconv_open( tocode, fromcode ); + cd = scd; + } + + if( cd != (iconv_t)-1 ) + { +// cerr << "iconv with cd" << endl; + char* inbuf = (char*)s.c_str(); + size_t inbytesleft = s.size(); + const size_t outbytessz = 2*inbytesleft + 10; + size_t outbytesleft = outbytessz; + char outbuf[ outbytessz+1 ]; + char* p = outbuf; + + size_t res = iconv( cd, &inbuf, &inbytesleft, &p, &outbytesleft ); + if( res >= 0 ) + { + string ret( outbuf, outbuf+(outbytessz-outbytesleft) ); +// cerr << "INPUT:" << s << endl; +// cerr << "iconv with cd res:" << res << endl; +// cerr << "iconv with cd ret:" << ret << endl; +// cerr << "outbytessz:" << outbytessz << endl; +// cerr << "outbytesleft:" << outbytesleft << endl; + return ret; + } + } + + // + // This is a hand made hack for the case where iconv is not desired. + // + unsigned char ch = 0; + stringstream iss; + stringstream oss; + iss << s; + while( iss >> noskipws >> ch ) + { +// cerr << "iso8859_to_utf8() ch:" << ch << " ch-int:" << (int)ch << endl; + if( ch < 128 ) + oss << ch; + else + { + int chi = ch; + oss << (char)(((chi&0x7c0)>>6) | 0xc0); + oss << (char)((chi&0x3f) | 0x80); + } + } + return tostr(oss); + } + + std::string convert_basename_to_utf8( const std::string& v ) + { + string ret = g_filename_display_name( v.c_str() ); + return ret; + } + + + string convert_url_to_utf8( const std::string& earl ) + { + string ret = earl; + + if( starts_with( earl, "file:" )) + { + ret = g_filename_display_name( earl.c_str() ); + } + + return ret; + } + + + std::string URLDecode( const std::string& s ) + { +#define SPC_BASE16_TO_10(x) (((x) >= '0' && (x) <= '9') ? ((x) - '0') : \ + (toupper((x)) - 'A' + 10)) + stringstream iss; + iss << s; + stringstream oss; + char ch; + while( iss >> noskipws >> ch ) + { + if( ch != '%' ) + oss << ch; + else + { + char ch2 = 0; + + if( iss >> noskipws >> ch ) + { + if( iss >> noskipws >> ch2 ) + { + if( isxdigit( ch ) ) + { + if( isxdigit( ch2 ) ) + { + oss << (char)((SPC_BASE16_TO_10(ch) * 16) + (SPC_BASE16_TO_10(ch2))); + continue; + } + } + oss << ch << ch2; + } + else + { + oss << ch; + } + } +// stringstream ess; +// ess << "Badly encoded URL s:" << s << endl; +// Throw_URLDecodeSyntaxError(ess.str(),0); + } + } + + return oss.str(); + +// string ret = s; +// ret = Util::replace_all( ret, "%20", " " ); +// return ret; + } + + std::string EscapeStringAsRegex( const std::string&s ) + { + string ret = s; + ret = replace_all( ret, '[', "\\\\[" ); + ret = replace_all( ret, '.', "\\\\." ); + return ret; + } + + + + std::string replace_all( const std::string& s, char oldc, char newc ) + { + string ret; + for( string::const_iterator iter = s.begin(); iter != s.end(); ++iter ) + { + if( *iter == oldc ) ret += newc; + else ret += *iter; + } + return ret; + } + + std::string replace_all( const std::string& s, char oldc, const std::string& news ) + { + string ret; + for( string::const_iterator iter = s.begin(); iter != s.end(); ++iter ) + { + if( *iter == oldc ) ret += news; + else ret += *iter; + } + return ret; + } + + std::string replace_all( const std::string& s, + const std::string& olds, + const std::string& news ) + { + string ret = s; + int olds_length = olds.length(); + int news_length = news.length(); + + int start = ret.find( olds ); + while( start != string::npos ) + { + ret.replace( start, olds_length, news ); + start = ret.find( olds, start + news_length ); + } + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static guint64 tryConvertByteString( const std::string& s, int& lastCharUsedPos ) + { + guint64 rawsize = 0; + guint64 shiftfactor = 0; + string postfix = ""; + bool parsedPostfix = false; + + fh_stringstream ss; + ss << s; + ss >> rawsize; + lastCharUsedPos = ss.tellg(); + ss >> postfix; + + if( !cmp_nocase( postfix, "k" ) || !cmp_nocase( postfix, "kb" ) ) + { + parsedPostfix = true; + shiftfactor = 10; + } + else if( !cmp_nocase( postfix, "m" ) || !cmp_nocase( postfix, "mb" ) ) + { + parsedPostfix = true; + shiftfactor = 20; + } + else if( !cmp_nocase( postfix, "g" ) || !cmp_nocase( postfix, "gb" ) ) + { + parsedPostfix = true; + shiftfactor = 30; + } + +// cerr << "convertByteString( " << s << " ) raw:" << rawsize +// << " postfix:" << postfix +// << " shift:" << shiftfactor +// << " ret:" << ( rawsize << shiftfactor ) +// << endl; + + if( parsedPostfix ) + lastCharUsedPos = ss.tellg(); + + return( rawsize << shiftfactor ); + } + + + guint64 convertByteString( const std::string& s ) + { + int dummy = 0; + return tryConvertByteString( s, dummy ); + } + + + /** + * Create a human readable string showing the given size + */ + std::string convertByteString( guint64 s ) + { + fh_stringstream ss; + guint64 base=1; + guint64 blksize = 1024; + + if( s < base*blksize ) + { + return tostr(s); + } + + base *= blksize; + if( s < base*blksize ) + { + float fs = ((float)s)/base; + ss.setf( ios_base::fixed, ios_base::floatfield ); + ss.precision(1); + ss << fs << "k"; + return tostr(ss); + } + + base *= blksize; + if( s < base*blksize ) + { + float fs = ((float)s)/base; + ss.setf( ios_base::fixed, ios_base::floatfield ); + ss.precision(1); + ss << fs << "M"; + return tostr(ss); + } + + base *= blksize; + if( s < base*blksize ) + { + float fs = ((float)s)/base; + ss.setf( ios_base::fixed, ios_base::floatfield ); + ss.precision(2); + ss << fs << "G"; + return tostr(ss); + } + + base *= blksize; + if( s < base*blksize ) + { + float fs = ((float)s)/base; + ss.setf( ios_base::fixed, ios_base::floatfield ); + ss.precision(3); + ss << fs << "T"; + return tostr(ss); + } + + base *= blksize; + if( s < base*blksize ) + { + float fs = ((float)s)/base; + ss.setf( ios_base::fixed, ios_base::floatfield ); + ss.precision(4); + ss << fs << "P"; + return tostr(ss); + } + + ss << s; + return tostr(ss); + } + + + + + static void + ParseKeyValueStringPair( const std::string& kv, + StringMap_t& m ) + { + string k,v; + fh_stringstream ss; + ss << kv; + getline( ss, k, '=' ); + getline( ss, v ); + if( !k.empty() ) + m.insert( make_pair( k, v )); +// cerr << "ParseKeyValueStringPair k:" << k << " v:" << v << endl; + } + + StringMap_t& + ParseKeyValueString( StringMap_t& ret, + const std::string& kvs, + const std::string& seps ) + { + string::const_iterator b = kvs.begin(); + string::const_iterator e = kvs.end(); + set< char > seps_set; + copy( seps.begin(), seps.end(), inserter( seps_set, seps_set.begin() )); + + for( ;; ) + { + string kv; + +// cerr << "STARTING LOOK FOR b:" << b << endl; + + // make sure that there is an embedded '=' for the key/value + // split. This also allows any of the seperators to appear + // in the key and parsing to work as expected. + while( b!=e ) + { + /* Copy kv pair from string */ + int oldkvlen = kv.length(); + + copy( b, + find_first_of( b, e, + seps.begin(), seps.end(), + equal_to() ), + back_insert_iterator< string >(kv) ); + b += ( kv.length() - oldkvlen ); + + if( b==e || kv.find('=') != string::npos ) + break; + + kv.push_back( *b ); + ++b; +// cerr << "Possible embedded sep. kvs:" << kvs << nl +// << " kv:" << kv << nl +// << " b:" << b << nl +// << " e:" << e +// << endl; + } +// cerr << "FOUND kv:" << kv << nl +// << " " << " b:" << b << endl; + + + /* Advance past seperators */ + while( seps_set.find( *b ) != seps_set.end() && b != e ) + ++b; +// b = find_first_of( b, e, +// seps.begin(), seps.end(), +// not_equal_to() ); + + ParseKeyValueStringPair( kv, ret ); + + /* Are we there yet? */ + if( b == e ) + break; + } + return ret; + } + + StringMap_t + ParseKeyValueString( const std::string& kvs, + const std::string& seps ) + { + StringMap_t ret; + ParseKeyValueString( ret, kvs, seps ); + return ret; + } + + StringMap_t + ParseKeyValueString( fh_istream& iss, + const std::string& seps ) + { + fh_stringstream tss; + char ch; + while( iss >> noskipws >> ch ) + tss << ch; + return ParseKeyValueString( tostr(tss), seps ); + } + + + string + CreateKeyValueString( const StringMap_t& sm, + const std::string kvsep, + const std::string atomsep ) + { + fh_stringstream ss; + bool v = true; + for( StringMap_t::const_iterator si=sm.begin(); si!=sm.end(); ++si ) + { + if( v ) v = false; + else ss << atomsep; + ss << si->first << kvsep << si->second; + } + return tostr(ss); + } + + + template<> + std::back_insert_iterator + parseSeperatedList > + ( const std::string& s, + stringlist_t& c, + std::back_insert_iterator out, + const char sepchar ) + { +// cerr << "parseSeperatedList(specialized) s:" << s << endl; + std::string tmp; + + std::stringstream ss(s); + while( std::getline( ss, tmp, sepchar )) + if( !tmp.empty() ) + { + *++out = tmp; + } + + return out; + } + template<> + void + parseSeperatedList( const std::string& s, + stringlist_t& c, + const char sepchar ) + { + parseSeperatedList( s, c, back_inserter(c), sepchar ); + } + + + + + + stringlist_t& parseSeperatedList( const std::string& s, + const char sepchar, + stringlist_t& ret ) + { + parseSeperatedList( s, ret, sepchar ); + return ret; + +// string tmp; + +// fh_stringstream ss(s); +// while( getline( ss, tmp, sepchar )) +// if( !tmp.empty() ) +// ret.push_back( tmp ); + +// return ret; + } + stringset_t& parseSeperatedList( const std::string& s, + const char sepchar, + stringset_t& ret ) + { + parseSeperatedList( s, ret, sepchar ); + return ret; + } + + + stringlist_t parseSeperatedList( const std::string& s, const char sepchar ) + { + stringlist_t ret; + return parseSeperatedList( s, sepchar, ret ); + } + + string createSeperatedList( const stringlist_t& l, const char sepchar ) + { + return createSeperatedList( l.begin(), l.end(), sepchar ); + +// fh_stringstream ss; +// bool virgin = true; + +// l.sort(); + +// for( stringlist_t::iterator iter = l.begin(); +// iter != l.end(); iter++ ) +// { +// if( virgin ) { virgin = false; } +// else { ss << sepchar; } + +// ss << *iter; +// } + +// return tostr(ss); + } + std::string createSeperatedList( const stringset_t& l, const char sepchar ) + { + return createSeperatedList( l.begin(), l.end(), sepchar ); + } + + std::string createSeperatedList( const stringlist_t& l, + const std::string& sepchar ) + { + return createSeperatedList( l.begin(), l.end(), sepchar ); + } + std::string createSeperatedList( const stringset_t& l, + const std::string& sepchar ) + { + return createSeperatedList( l.begin(), l.end(), sepchar ); + } + + + stringlist_t parseCommaSeperatedList( const std::string& s ) + { + return parseSeperatedList( s, ',' ); + } + void parseCommaSeperatedList( const std::string& s, stringlist_t& sl ) + { + return parseSeperatedList( s, sl, ',' ); + } + void parseCommaSeperatedList( const std::string& s, stringset_t& sl ) + { + return parseSeperatedList( s, sl, ',' ); + } + string createCommaSeperatedList( const stringlist_t& l ) + { + return createSeperatedList( l, ',' ); + } + string createCommaSeperatedList( const stringset_t& l ) + { + return createSeperatedList( l, ',' ); + } + stringlist_t parseNullSeperatedList( const std::string& s ) + { + return parseSeperatedList( s, '\0' ); + } + stringlist_t& parseNullSeperatedList( const std::string& s, stringlist_t& ret ) + { + parseSeperatedList( s, '\0', ret ); + return ret; + } + std::string createNullSeperatedList( stringlist_t& l ) + { + return createSeperatedList( l, '\0' ); + } + + + std::string makeUUID() + { + char buf[40]; + uuid_t uu; + uuid_generate_time( uu ); + uuid_unparse( uu, buf ); + return buf; + } + }; + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + namespace Time + { + template + basic_ostream& + operator<< (basic_ostream& os, const struct tm& tm ) + { + os << "< year:" << tm.tm_year << " month:" << tm.tm_mon + << " day:" << tm.tm_mday + << " hour:" << tm.tm_hour + << " min:" << tm.tm_min + << " sec:" << tm.tm_sec + << " />"; + return os; + } + + + /** + * Update any unfilled in parts of the given tm with data from the + * reference time given. Note that the parameter tm is updated in + * this function. + * + * @param tm time to update + * @param ref reference time to copy data from or the current time. + * @returns The updated time + */ + struct tm& + FreshenTime( struct tm& tm, struct tm ref ) + { + struct tm tmp; + + if( !ref.tm_year ) + { + time_t tt = getTime(); + tmp = *(localtime( &tt )); + ref = tmp; + } + + if( -1 == tm.tm_sec ) tm.tm_sec = ref.tm_sec; + if( -1 == tm.tm_min ) tm.tm_min = ref.tm_min; + if( -1 == tm.tm_hour ) tm.tm_hour = ref.tm_hour; + if( -1 == tm.tm_mday ) tm.tm_mday = ref.tm_mday; + if( -1 == tm.tm_mon ) tm.tm_mon = ref.tm_mon; + if( -1 == tm.tm_year ) tm.tm_year = ref.tm_year; + return tm; + } + + /** + * A wrapper for time(2) that throws and exception on the rare case that + * time(2) fails. + */ + time_t getTime() + { + time_t tt = time( 0 ); + if( tt == -1 ) + { + int eno = errno; + fh_stringstream ss; + ss << "can not get time with time(2)"; + ThrowFromErrno( eno, tostr(ss), 0 ); + } + return tt; + } + + /** + * Sleep the given number of seconds and fractions of seconds. + */ + void Sleep( double t ) + { + unsigned int usecs = 0; + t *= 1000000; + usecs = (unsigned int)t; + usleep(usecs); + } + + + + class FERRISEXP_DLLLOCAL EnvironmentAssignmentIsInit + { + string k; + string v; + bool wasSet; + + public: + EnvironmentAssignmentIsInit( const std::string& s ) + : + k( s ), + wasSet( false ) + { + const char* vc = getenv( k.c_str() ); + if( vc ) + { + wasSet = true; + v = vc; + } + } + ~EnvironmentAssignmentIsInit() + { + if( wasSet ) + setenv( k.c_str(), v.c_str(), true ); + } + }; + + + struct tm + operator+( const struct tm& t1, const struct tm& t2 ) + { + struct tm ret; + bzero( &ret, sizeof(ret)); + + ret.tm_year = t1.tm_year + t2.tm_year; + ret.tm_mon = t1.tm_mon + t2.tm_mon; + ret.tm_mday = t1.tm_mday + t2.tm_mday; + ret.tm_hour = t1.tm_hour + t2.tm_hour; + ret.tm_min = t1.tm_min + t2.tm_min; + ret.tm_sec = t1.tm_sec + t2.tm_sec; + + return ret; + } + + time_t toTime( struct tm *tm ) + { + return mktime( tm ); + } + time_t toTime( struct tm tm ) + { + return mktime( &tm ); + } + + std::string toXMLDateTime( time_t tt ) + { + return toTimeString( tt, "%Y-%m-%dT%H:%M:%SN%z" ); + } + + + + /** + * Convert a time string into a struct tm trying first the default format + * given and then a list of predefined possible data matches. + * + * As of 0.9.71 the autoFresh param was added. The default is to call + * FreshenTime() on the return value before returning. This allows time + * relative to now to be parsed, for example, 9:30 and the day, year, month + * info is gleemed from the current time. + * Note that the old style of exact match or -1 in data feild can still be + * obtained using autoFresh=false. In this case the returned tm struct may be + * missing information if that is not present in stddatestr. One can use + * FreshenTime to fill in missing data from the return value with data from any + * given reference time. + * + * Note that if autoFresh==false, any data that is not present in the stddatestr + * given is set to -1. So a call to FreshenTime() is highly advised to set those + * to a valid state. + * + * @param stddatestr Date string to parse + * @param defaultformat Format string to parse the data string with as a first + * attempt. If that fails then a list of other date formats is attempted. + * @param autoFresh if true (the default) then FreshenTime() is called on the + * date before return + * + * @seealso FreshenTime() + * @throws Throw_BadlyFormedTimeString if stddatestr can not be parsed with any + * of the default time/date formats + */ + struct tm + ParseTimeString( const std::string& stddatestr, + const std::string& defaultformat, + bool autoFresh ) + { + LG_TIME_D << "ParseTimeString() stddatestr:" << stddatestr << endl; + + const char* datestr = stddatestr.c_str(); + const char* eos = datestr + strlen( datestr ); + struct tm tm; + + typedef vector formats_t; + formats_t formats; + + string httpdate = "%a, %e %b %Y %H:%M:%S"; + + if( !defaultformat.empty() ) + formats.push_back( defaultformat ); + formats.push_back( httpdate ); + formats.push_back( "%a %b %e %H:%M:%S +0000 %Y" ); + formats.push_back( "%y %b %e %H:%M:%S" ); + formats.push_back( "%y %b %e %H:%M" ); + formats.push_back( "%y %e %b %H:%M:%S" ); + formats.push_back( "%y %e %b %H:%M" ); + formats.push_back( "%Y %b %e %H:%M:%S" ); + formats.push_back( "%Y %b %e %H:%M" ); + formats.push_back( "%Y %e %b %H:%M:%S" ); + formats.push_back( "%Y %e %b %H:%M" ); + formats.push_back( "%b %e %H:%M:%S" ); + formats.push_back( "%b %e %H:%M" ); + formats.push_back( "%e %b %H:%M:%S" ); + formats.push_back( "%e %b %H:%M" ); + formats.push_back( "%Y-%m-%dT%H:%M:%S%z" ); + formats.push_back( "%Y-%m-%dT%H:%M:%SZ" ); + formats.push_back( "%Y-%m-%dT%H:%M:%S" ); + formats.push_back( "%Y-%m-%d %H:%M:%S" ); + formats.push_back( "%Y:%m:%d %H:%M:%S" ); + formats.push_back( "%d/%m/%y %H:%M:%S" ); + formats.push_back( "%d/%m/%y %H:%M" ); + formats.push_back( "%d/%m/%Y %H:%M:%S" ); + formats.push_back( "%d/%m/%Y %H:%M" ); + formats.push_back( "%d/%m %H:%M:%S" ); + formats.push_back( "%d/%m %H:%M" ); + formats.push_back( "%b%n%d%n%H:%M" ); + formats.push_back( "%a%n%H:%M" ); + formats.push_back( "%d%n%H:%M" ); + formats.push_back( "%Y-%m-%d" ); + formats.push_back( "%H:%M:%S" ); + formats.push_back( "%H:%M" ); + + for( formats_t::iterator iter = formats.begin(); iter != formats.end(); ++iter ) + { + string format = *iter; + +// cerr << "ParseTimeString() stddatestr:" << stddatestr << endl; +// cerr << "ParseTimeString() format:" << format << endl; + + memset( &tm, 0, sizeof(struct tm)); + tm.tm_sec = -1; + tm.tm_min = -1; + tm.tm_hour = -1; + tm.tm_mday = -1; + tm.tm_mon = -1; + tm.tm_year = -1; + const char* rc = strptime( datestr, format.c_str(), &tm ); + LG_TIME_D << "ParseTimeString() stddatestr:" << stddatestr + << " format:" << format + << " rc:" << (void*)rc + << " eos:" << (void*)eos + << endl; + + if( rc == eos ) + { + LG_TIME_D << "ParseTimeString() stddatestr:" << stddatestr + << " got struct tm:" << tm + << endl; + FreshenTime( tm ); + return tm; + } + + /* + * PURE DEBUG + */ + if( *iter == httpdate ) + { + int e = errno; + string es = errnum_to_string( "", e ); + LG_TIME_D << " iter is httpdate rc:" << (rc?rc:"null") + << " es:" << es << endl + << " date:" << datestr + << " format:" << format + << endl; + + char buf[255]; + string sf = format; + sf += " - Z:%Z - z:%z"; + strftime(buf, sizeof(buf), sf.c_str(), &tm); +// cerr << buf << endl; + } + + + /* + * Handle tagging of GMT and TZ data explicitly, %Z doesn't + * work in most places. + */ + if( *iter == httpdate && rc ) + { + string tz; + + stringstream restss; + restss << rc; + restss >> tz; + + if( tz.empty() ) + { + LG_TIME_D << "ParseTimeString() http date without TZ info " + << " stddatestr:" << stddatestr + << endl; + continue; + } + + EnvironmentAssignmentIsInit tzrevert("TZ"); + + stringstream tzss; + tzss << ":" << tz << endl; + setenv( "TZ", tostr( tzss ).c_str(), true ); + + /* + * Trim off the %Z timezone data + */ + string truncTime = stddatestr.substr( 0, rc - datestr ); + const char* begintt = truncTime.c_str(); + + rc = strptime( begintt, format.c_str(), &tm ); + if( rc == begintt + strlen( begintt ) ) + { + LG_TIME_D << "ParseTimeString() stddatestr:" << stddatestr + << " got struct tm:" << tm + << endl; + FreshenTime( tm ); + return tm; + } + } + } + + fh_stringstream ss; + ss << "Can not parse given time:" << stddatestr; + Throw_BadlyFormedTimeString( tostr(ss), 0 ); + } + + static bool UsingFormatOverRide = false; + static string FormatOverRide = ""; + + /** + * Override the users default preference for date/time presentation + */ + void setDefaultTimeFormat( const std::string& s ) + { + UsingFormatOverRide = true; + FormatOverRide = s; + LG_CTX_D << "SL_setTimeStrFTimeStream() FormatOverRide:" << FormatOverRide << endl; + + } + + /** + * Get the users preference for date/time presentation + */ + std::string getDefaultTimeFormat() + { + if( UsingFormatOverRide ) + { + return FormatOverRide; + } + return getEDBString( FDB_GENERAL, "strftime-format-string", "%y %b %e %H:%M" ); + } + + /** + * Format a time_t to a string using the users desired date/time presentation + * options. + */ + std::string toTimeString( time_t TT, const std::string desired_format ) + { + const int bufmaxlen = 1025; + char buf[bufmaxlen]; + struct tm* TM = 0; + string format = desired_format.empty() ? getDefaultTimeFormat() : desired_format; + + TM = localtime( &TT ); + + if( TM && strftime( buf, bufmaxlen, format.c_str(), TM) ) + { + string s = buf; + return s; + } + // FIXME + return ""; + } + + string toHMSString( int v, bool canOmitMinutes ) + { + bool haveLargerUnit = false; + stringstream ret; + if( v >= 3600 ) + { + int h = (v-(v%3600))/3600; + v -= h * 3600; + ret << setfill('0') << setw(2) << h << ":"; + haveLargerUnit = true; + } + if( v >= 60 || !canOmitMinutes ) + { + int m = (v-(v%60))/60; + v -= m * 60; + if( haveLargerUnit ) + ret << setfill('0') << setw(2); + ret << m << ":"; + haveLargerUnit = true; + } + ret << setfill('0') << setw(2) << (v%60); + + return ret.str(); + } + + + /** + * Parse a string like; (note 0.25 is 250 millis) + * + * 0.25 + * 10s + * 30m + * 2h + * 5d + * + * into a integer representing the number of milliseconds until that interval + * will have come to pass + * + * @param s like the above interval string + * @return number of millis represented by s + */ + guint64 + ParseSimpleIntervalString( const std::string& s ) + { + if( s.find(".") ) + { + double f = toType(s); + f *= 1000; + return guint64(f); + } + + guint64 ret = toint(s) * 1000; + char postfix = s[ s.length() - 1 ]; + + switch( postfix ) + { + case 's': break; + case 'm': ret *= 60; break; + case 'h': ret *= 3600; break; + case 'd': ret *= 24 * 3600; break; + default: break; + } + return ret; + } + + /** + * Parse a string unit time into the number of seconds it represents + */ + static time_t unitToDelta( const std::string& unit ) + { + time_t delta = 0; + const time_t minute = 60; + const time_t hour = 60 * minute; + const time_t day = 24 * hour; + const time_t week = 7 * day; + const time_t qu = 13 * week; + const time_t year = 52 * week; + + if( contains( unit, "minute" ) || contains( unit, "min" )) + delta = minute; + else if( contains( unit, "hour" ) ) + delta = hour; + else if( contains( unit, "day" ) ) + delta = day; + else if( contains( unit, "week" ) ) + delta = week; + else if( contains( unit, "month" ) ) + delta = 30*day; + else if( contains( unit, "qu" ) ) + delta = qu; + else if( contains( unit, "year" ) ) + delta = year; + else if( contains( unit, "h" ) ) + delta = hour; + else if( contains( unit, "d" )) + delta = day; + else if( contains( unit, "w" )) + delta = week; + else if( contains( unit, "qu" ) ) + delta = qu; + else if( contains( unit, "y" )) + delta = year; + + return delta; + } + + static void moveByYears( struct tm& mytime, int yearOffset ) + { + mytime.tm_year += yearOffset; + time_t tt = mktime( &mytime ); + mytime = *(localtime( &tt )); + } + + + static void moveByMonths( struct tm& mytime, int monthOffset ) + { + mytime.tm_mon += monthOffset; + time_t tt = mktime( &mytime ); + mytime = *(localtime( &tt )); + +// int yrs = abs( monthOffset ) % 12; +// if( monthOffset<0 ) yrs *= -1; + +// mytime.tm_year += yrs; +// monthOffset -= yrs; +// int delta = monthOffset > 1 ? 1 : -1; +// while( monthOffset != 0 ) +// { +// if( mytime.tm_mon > 0 && mytime.tm_mon < 11 ) +// mytime.tm_mon--; +// else +// { +// mytime.tm_mon = 11; +// mytime.tm_year--; +// } +// } + } + + static void moveByDays( struct tm& mytime, int dayOffset ) + { + mytime.tm_mday += dayOffset; + time_t tt = mktime( &mytime ); + mytime = *(localtime( &tt )); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + RelativeTimeOrIntegerStringParser::RelativeTimeOrIntegerStringParser( + const std::string& defaultIntegerRegex ) + : + m_wasLastConvertTimeValue( false ) + { + addIntegerRegex( defaultIntegerRegex ); + } + + + void + RelativeTimeOrIntegerStringParser::addIntegerRegex( const std::string& v ) + { + m_convertToIntegerRegexs.append( v ); + } + +// static long tointX( const std::string& s ) +// { +// LG_EAIDX_D << "tointX() s:" << s << endl; +// long ret; +// ::Ferris::fh_stringstream ss(s); +// ss >> ret; +// return ret; + +// // int ret; +// // std::stringstream ss(s); +// // ss >> ret; +// // return ret; +// } + + guint64 + RelativeTimeOrIntegerStringParser::convert( const std::string& v ) + { + m_wasLastConvertTimeValue = false; + + if( fh_rex r = m_convertToIntegerRegexs.getRegex() ) + { + if( regex_match( v, r, boost::match_any ) ) + { +// LG_EAIDX_D << "toint(3.2) v:" << toint(v) << endl; +// LG_EAIDX_D << "toint(3.3) v:" << tointX(v) << endl; +// LG_EAIDX_D << "toint(3.ret) v:" << toType( v ) << endl; +// cerr << "RelativeTimeOrIntegerStringParser::convert(int) v:" << v << endl; + return toType( v ); + } + } + + int lastCharUsedPos = 0; + guint64 sz = Util::tryConvertByteString( v, lastCharUsedPos ); +// cerr << "RelativeTimeOrIntegerStringParser::convert(bytestring) v:" << v << ":" << endl; +// cerr << "RelativeTimeOrIntegerStringParser::convert(bytestring) sz:" << sz << endl; +// cerr << "RelativeTimeOrIntegerStringParser::convert(bytestring) lastCharUsedPos:" << lastCharUsedPos << endl; +// cerr << "RelativeTimeOrIntegerStringParser::convert(bytestring) len:" << v.length() << endl; +// cerr << "str.length:" << v.length() << " lastchar:" << lastCharUsedPos << endl; + if( lastCharUsedPos != v.length() ) // !sz && v != "0" ) + { + time_t tt = Time::ParseRelativeTimeString( v ); + sz = tt; + m_wasLastConvertTimeValue = true; + } + return sz; + } + + bool + RelativeTimeOrIntegerStringParser::wasLastConvertTimeValue() + { + return m_wasLastConvertTimeValue; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Benchmark::Benchmark( const std::string& name, + bool startAutomatically ) + : + m_name( name ) + { + setOutputStream( Factory::fcerr() ); + if( startAutomatically ) + start(); + } + + Benchmark::~Benchmark() + { + if( m_running ) + { + stop(); + print(); + } + } + + void + Benchmark::handleError( int eno ) + { + cerr << "got an error:" << eno << endl; + } + + int + Benchmark::timeval_subtract (struct timeval * result, + struct timeval * x, + struct timeval * y) + { + /* Perform the carry for the later subtraction by updating Y. */ + if (x->tv_usec < y->tv_usec) { + int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; + y->tv_usec -= 1000000 * nsec; + y->tv_sec += nsec; + } + if (x->tv_usec - y->tv_usec > 1000000) { + int nsec = (x->tv_usec - y->tv_usec) / 1000000; + y->tv_usec += 1000000 * nsec; + y->tv_sec -= nsec; + } + + /* Compute the time remaining to wait. + `tv_usec' is certainly positive. */ + result->tv_sec = x->tv_sec - y->tv_sec; + result->tv_usec = x->tv_usec - y->tv_usec; + + /* Return 1 if result is negative. */ + return x->tv_sec < y->tv_sec; + } + + void + Benchmark::start() + { + m_running = true; + int rc = gettimeofday( &m_startTime, 0 ); + if( rc == -1 ) + handleError( errno ); + + } + + void + Benchmark::stop() + { + int rc = gettimeofday( &m_stopTime, 0 ); + m_running = false; + if( rc == -1 ) + handleError( errno ); + } + + void + Benchmark::setOutputStream( fh_ostream oss ) + { + m_oss = oss; + } + + void + Benchmark::print() + { + if( m_running ) + stop(); + + struct timeval diff; + timeval_subtract( &diff, &m_stopTime, &m_startTime ); + int sec = diff.tv_sec; + int msec = diff.tv_usec/1000; + int mins = (int)floor( diff.tv_sec / 60.0 ); + m_oss << m_name; + if( mins > 0 ) + { + sec = sec - (60*mins); + m_oss << " completed in " << mins << " mins and " + << setw(2) << setfill('0') << sec; + } +// else if( sec > 0 ) +// { +// m_oss << " completed in sec:" << sec; +// if( sec < 5 ) +// m_oss << " and " +// << setw(2) << setfill('0') << msec +// << " milliseconds." << flush; +// } + else + { + m_oss << " completed in sec:" << sec; + } + + m_oss << '.' << setw(3) << setfill('0') << msec << endl; +///// << " usec:" << diff.tv_usec << endl; + } + + float + Benchmark::getElapsedTime() + { + if( m_running ) + stop(); + + struct timeval diff; + timeval_subtract( &diff, &m_stopTime, &m_startTime ); + int msec = diff.tv_usec/1000; + float ret = diff.tv_sec + (msec / 1000.0); + return ret; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + }; + + namespace Bindings + { + + std::string pread( fh_istream& iss, size_t count, size_t offset ) + { + std::string str = ""; + str.resize( count + 1 ); + iss.seekg( offset, ios_base::beg ); + iss.read( (char*)str.c_str(), count ); + size_t c = iss.gcount(); + str[ c ] = '\0'; + str.resize( c ); + return str; + } + + std::string preadio( fh_iostream& iss, size_t count, size_t offset ) + { + std::string str = ""; + str.resize( count + 1 ); + iss.seekg( offset, ios_base::beg ); + iss.read( (char*)str.c_str(), count ); + size_t c = iss.gcount(); + str[ c ] = '\0'; + str.resize( c ); + return str; + } + std::string readline( fh_iostream& iss ) + { + std::string ret; + getline( iss, ret ); + return ret; + } + + void seekgio( fh_iostream& oss, long offset, int whence ) + { + oss.seekg( offset, (ios_base::seekdir)whence ); + } + + + void seekp( fh_iostream& oss, long offset, int whence ) + { + oss.seekp( offset, (ios_base::seekdir)whence ); + } + + + + size_t pwrite( fh_iostream& oss, const std::string& str, size_t count, size_t offset ) + { + oss.seekp( offset, ios_base::beg ); + oss.write( str.c_str(), count ); + if( oss.bad() ) + return 0; + return count; + } + + size_t ferriswrite( fh_iostream& oss, const std::string& str ) + { + size_t count = str.length(); + oss.write( str.c_str(), count ); + if( oss.bad() ) + return 0; + return count; + } + + void fsync( fh_iostream& oss ) + { + oss << flush; + } + + size_t tellgi( fh_istream& iss ) + { + size_t ret = iss.tellg(); + return ret; + } + + size_t tellgio( fh_iostream& oss ) + { + size_t ret = oss.tellg(); + return ret; + } + + size_t tellp ( fh_iostream& oss ) + { + size_t ret = oss.tellp(); + return ret; + } + bool goodi ( fh_istream& iss ) + { + return iss.good(); + } + + bool goodio( fh_iostream& oss ) + { + return oss.good(); + } + + bool eofi ( fh_istream& iss ) + { + return iss.eof(); + } + + bool eofio ( fh_iostream& oss ) + { + return oss.eof(); + } + + ferris_ios::openmode get_ios_in() + { + return ios::in; + } + + ferris_ios::openmode get_ios_out() + { + return ios::out; + } + + ferris_ios::openmode get_ios_trunc() + { + return ios::trunc; + } + + ferris_ios::openmode get_ios_ate() + { + return ios::ate; + } + ferris_ios::openmode get_ios_app() + { + return ios::app; + } + + int get_ios_beg() + { + return ios_base::beg; + } + + int get_ios_cur() + { + return ios_base::cur; + } + int get_ios_end() + { + return ios_base::end; + } + + void fireCloseSig( fh_iostream& oss ) + { + oss.getCloseSig().emit( oss, oss.tellp() ); + + } + + + }; + +}; diff --git a/Ferris/General.hh b/Ferris/General.hh new file mode 100644 index 0000000..d9f86f4 --- /dev/null +++ b/Ferris/General.hh @@ -0,0 +1,556 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: General.hh,v 1.17 2010/11/17 21:30:44 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +#ifndef _ALREADY_INCLUDED_FERRIS_GENERAL_H_ +#define _ALREADY_INCLUDED_FERRIS_GENERAL_H_ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#pragma GCC visibility push(default) + +namespace Ferris +{ + FERRISEXP_API std::string remove_prefix( const std::string& ret, const std::string& prefix ); + FERRISEXP_API std::string remove_postfix( const std::string& ret, const std::string& postfix ); + + FERRISEXP_API std::string tostr( const struct tm& tm ); + FERRISEXP_API stringpair_t split( const std::string& data, const std::string& sep ); + + /** + * Convert s into upper case. + */ + FERRISEXP_API std::string toupperstring( const std::string& s ); + FERRISEXP_API std::string tolowerstring( const std::string& s ); + + /** + * Convert a perhaps relative path to an absolute one. + * The current working directory can be given explicitly in cwd. + * Note that this handles URLs as being absolute. + * + * This is an attempt because the path itself is not checked for existance. + */ + FERRISEXP_API std::string attemptToAbsoluteURL( + const std::string& maybeRelative, + const std::string& cwd = "" ); + + /** + * Put a narrow string encoded in UTF-8 into a wide io stream. + * This function allows such wonderful things as + * wcout << "foo" << std::string("some utf8 const") << endl; + * to be written and basically removes the need to ever consider + * using cout in an I18N application. + */ + std::basic_ostream< wchar_t, std::char_traits >& + operator<<(std::basic_ostream< wchar_t, std::char_traits >& oss, const std::string& s ); + + FERRISEXP_API std::istream& getline( std::istream& ss, std::string& ret, const std::string& delim ); + + + namespace Util + { + /** + * Convert a wide string to a UTF-8 encoded string + */ + FERRISEXP_API std::string& wstring_to_utf8( std::string& ret, const std::wstring& s ); + FERRISEXP_API std::string wstring_to_utf8( const std::wstring& s ); + + /** + * Convert a long string from 's' into a wide string. + * The string 's' is assumed to be in UTF-8 format and the 'ret' + * string will contain wide characters. + */ + FERRISEXP_API std::wstring& utf8_to_wstring( std::wstring& ret, const std::string& s ); + FERRISEXP_API std::wstring utf8_to_wstring( const std::string& s ); + + inline std::wstring toStreamChar( wchar_t ch ) + { return std::wstring(&ch,1) ; } + inline char toStreamChar( char ch ) { return ch ; } + + + /** + * Convert an ISO 8859-1 string into UTF8 + */ + FERRISEXP_API std::string iso8859_to_utf8( const std::string& s ); + + /** + * Try to patch away encodings like iso8859 into UTF8 for a given URL + */ + std::string convert_url_to_utf8( const std::string& earl ); + std::string convert_basename_to_utf8( const std::string& v ); + + + /** + * Decode the %20 type strings in a URL encoded string and + * replace with their real characters. + */ + std::string URLDecode( const std::string& s ); + + + /** + * Escape any special regex characters in the string to have no special meaning. + */ + std::string EscapeStringAsRegex( const std::string&s ); + + /** + * replace all occurances of oldc with newc in a copy of s and return the + * copy + */ + FERRISEXP_API std::string replace_all( const std::string& s, char oldc, char newc ); + FERRISEXP_API std::string replace_all( const std::string& s, char oldc, const std::string& news ); + FERRISEXP_API std::string replace_all( const std::string& s, + const std::string& olds, + const std::string& news ); + + + /** + * Convert a string like 10k, 200Mb, 34m, 6g to the integer value + * of that size, eg. 10240 == convertByteString( "10k" ); + */ + FERRISEXP_API guint64 convertByteString( const std::string& s ); + + /** + * Create a human readable string showing the given size + */ + FERRISEXP_API std::string convertByteString( guint64 v ); + + /** + * Convert an "extraData" string to a map. + * Used mainly internally by decorator contexts + * + * Takes input of the form kvs="hi=there&key=value:more=data/" + * where the trailing slash is optional and key/value pairs + * are seperated by any char given in seps + * + * @param kvs The string to break apart + * @param seps The seperators between each kv pair + * + * @returns A map of strings with each key and value from s + * placed into it for lookup by key + */ + FERRISEXP_API StringMap_t& + ParseKeyValueString( StringMap_t& ret, + const std::string& kvs, + const std::string& seps = ":&" ); + FERRISEXP_API StringMap_t + ParseKeyValueString( const std::string& kvs, + const std::string& seps = ":&" ); + FERRISEXP_API StringMap_t + ParseKeyValueString( fh_istream& iss, + const std::string& seps = ":&" ); + /** + * Create a string suitable for parsing using ParseKeyValueString() + * + */ + FERRISEXP_API std::string CreateKeyValueString( const StringMap_t& sm, + const std::string kvsep = "=", + const std::string atomsep = "&" ); + + + + /** + * convert the string 's' which is in the form item1,item2,item3 + * into a collection. This is much like the STL copy() algorithm + * in that the ouput iterator should either point to a collection + * that has been resized to allow all items to be written or to + * a inserter wrapper for a raw iterator. + * + */ + template< class Col, class OutputIterator > + OutputIterator parseSeperatedList( const std::string& s, + Col& c, + OutputIterator out, + const char sepchar = ',' ) + { + std::string tmp; + + std::stringstream ss(s); + while( std::getline( ss, tmp, sepchar )) + if( !tmp.empty() ) + { + typename Col::value_type r; + std::stringstream data; + data << tmp; + data >> std::noskipws >> r; + + *++out = r; + } + + return out; + } + /** + * Because stream << and >> will break up strings into words + * we have this partial specialization here which reads lines. + */ + template<> + std::back_insert_iterator + parseSeperatedList > + ( const std::string& s, + stringlist_t& c, + std::back_insert_iterator out, + const char sepchar ); + + template< class Col > + void parseSeperatedList( const std::string& s, + Col& c, + const char sepchar = ',' ) + { + parseSeperatedList( s, c, inserter( c, c.end() ), sepchar ); + } + /** + * Because stream << and >> will break up strings into words + * we have this partial specialization here which reads lines. + */ + template<> + void + parseSeperatedList( const std::string& s, + stringlist_t& c, + const char sepchar ); + + + /** + * convert the string 's' which is in the form item1,item2,item3 + * into a string list. The version taking ret as an argument will + * be faster on large lists because it avoids having to copy + * the list for the return value + * + * @one can create a null seperated list using a non default sepchar + */ + FERRISEXP_API stringlist_t parseSeperatedList( const std::string& s, + const char sepchar = ',' ); + FERRISEXP_API stringlist_t& parseSeperatedList( const std::string& s, + const char sepchar, + stringlist_t& ret ); + FERRISEXP_API stringset_t& parseSeperatedList( const std::string& s, + const char sepchar, + stringset_t& ret ); + + /** + * convert the list of objects using operator<< in begin, end + * into a comma seperated string list such that the original data can be obtained + * using parseSeperatedList() and the same seperator char + * + * ie. l == parseSeperatedList( createSeperatedList( l )) + * + * @one can create a null seperated list using a non default sepchar + */ + template + std::string createSeperatedList( iterator begin, + iterator end, + const char sepchar = ',' ) + { + std::stringstream ss; + + bool virgin = true; + + for( iterator iter = begin; iter != end; ++iter ) + { + if( virgin ) { virgin = false; } + else { ss << sepchar; } + + ss << *iter; + } + + return ss.str(); + } + template + std::string createSeperatedList( iterator begin, + iterator end, + const std::string& sepchar ) + { + std::stringstream ss; + + bool virgin = true; + + for( iterator iter = begin; iter != end; ++iter ) + { + if( virgin ) { virgin = false; } + else { ss << sepchar; } + + ss << *iter; + } + + return ss.str(); + } + + + /** + * convert the list of strings in l into a comma seperated + * string list such that the original data can be obtained + * using parseSeperatedList() and the same seperator char + * + * ie. l == parseCommaSeperatedList( createCommaSeperatedList( l )) + * + * @one can create a null seperated list using a non default sepchar + */ + FERRISEXP_API std::string createSeperatedList( const stringlist_t& l, + const char sepchar = ',' ); + FERRISEXP_API std::string createSeperatedList( const stringset_t& l, + const char sepchar = ',' ); + FERRISEXP_API std::string createSeperatedList( const stringlist_t& l, + const std::string& sepchar ); + FERRISEXP_API std::string createSeperatedList( const stringset_t& l, + const std::string& sepchar ); + + /** + * convert the string 's' which is in the form item1,item2,item3 + * into a string list. The version returning the stringlist is + * deprecated in favor of the version that takes a reference to + * the collection to insert into. Taking the reference avoids + * a copy operation. + * + * @one can create a null seperated list using a non default sepchar + */ + FERRISEXP_API stringlist_t parseCommaSeperatedList( const std::string& s ); + FERRISEXP_API void parseCommaSeperatedList( const std::string& s, stringlist_t& sl ); + FERRISEXP_API void parseCommaSeperatedList( const std::string& s, stringset_t& sl ); + + /** + * convert the list of strings in l into a comma seperated + * string list such that the original data can be obtained + * using parseCommaSeperatedList() + * + * ie. l == parseCommaSeperatedList( createCommaSeperatedList( l )) + * + * @one can create a null seperated list using a non default sepchar + */ + FERRISEXP_API std::string createCommaSeperatedList( const stringlist_t& l ); + FERRISEXP_API std::string createCommaSeperatedList( const stringset_t& l ); + + FERRISEXP_API stringlist_t parseNullSeperatedList( const std::string& s ); + FERRISEXP_API stringlist_t& parseNullSeperatedList( const std::string& s, stringlist_t& ret ); + FERRISEXP_API std::string createNullSeperatedList( stringlist_t& l ); + + /** + * create a new UUID + */ + FERRISEXP_API std::string makeUUID(); + }; + + namespace Time + { + const struct tm NullTM = { 0,0,0,0,0,0,0,0,0 }; + + struct tm operator+( const struct tm& t1, const struct tm& t2 ); + + // convert tm to time_t, mktime() + FERRISEXP_API time_t toTime( struct tm *tm ); + FERRISEXP_API time_t toTime( struct tm tm ); + + // convert to 1997-07-16T10:30:15+03:00 style + FERRISEXP_API std::string toXMLDateTime( time_t tt ); + + + FERRISEXP_API struct tm + ParseTimeString( const std::string& stddatestr, + const std::string& defaultformat = "", + bool autoFresh = true ); + + FERRISEXP_API guint64 + ParseSimpleIntervalString( const std::string& s ); + + FERRISEXP_API struct tm& + FreshenTime( struct tm& tm, struct tm ref = NullTM ); + + FERRISEXP_API time_t getTime(); + FERRISEXP_API void Sleep( double t ); + + + FERRISEXP_API void setDefaultTimeFormat( const std::string& s ); + FERRISEXP_API std::string getDefaultTimeFormat(); + /** + * produce a user readable string from a time value. + * if desired_format is supplied then that is the format of the string + * to create, otherwise the default format as provided by + * getDefaultTimeFormat() will be used + * + * The format string provided should be compatible with those accepted + * by strftime(3) + */ + FERRISEXP_API std::string toTimeString( time_t, const std::string desired_format = "" ); + + /** + * Convert a number representing hh:mm:ss as a single int count of + * seconds into the above format string. Note that hh:mm will be + * omitted if possible. + */ + FERRISEXP_API std::string toHMSString( int v, bool canOmitMinutes = true ); + + + /** + * Parse a time string like "yesterday" into a time_t value relative to + * relv if it is given or getTime() if relv is not supplied. + * + * Currently month==30 days and week is taken as 7 days. If you wish to + * find the start of the previous calendar month use "begin last calmonth" + * and for the begining of last week "begin last week" or "blast week" + * + * Example values for s: + * "5 minutes ago" or "-5minutes" or "-5min" + * "1 hour ago" or "-1hr" or "-1h" + * "4 days ago" or "-4days" or "-4d" + * "tomorrow" or "+1d" + * "last month" or "-1mon" + * "next month" + * "last quarter" or "-1qu" + * "3 years ago" + * "begining last month" "blast month" + * "blast 6 months" + * "begin last week" + * "blast 3 weeks" + * + * FIXME: the code for this could use a going over + * + * @param s time string to parse + * @param relv time to base relative offset in 's' on or current time + * if no value is given + * @return a time_t giving the value relv + s as an absolute unix time. + */ + FERRISEXP_API time_t ParseRelativeTimeString( const std::string& s, time_t relv = 0 ); + + /** + * Class to handle the conversion of strings to integer or time_t + * values. + */ + class FERRISEXP_DLLLOCAL RelativeTimeOrIntegerStringParser + { + RegexCollection m_convertToIntegerRegexs; + bool m_wasLastConvertTimeValue; + + public: + + RelativeTimeOrIntegerStringParser( + const std::string& defaultIntegerRegex = "^-?[0-9]+$" ); + + void addIntegerRegex( const std::string& v ); + guint64 convert( const std::string& v ); + bool wasLastConvertTimeValue(); + }; + + + /** + * Quick and dirty start/stop timer with a name and a print method. + * should do down to usec time diffs + */ + class FERRISEXP_API Benchmark + : + public Handlable + { + std::string m_name; + bool m_running; + fh_ostream m_oss; + struct timeval m_startTime; + struct timeval m_stopTime; + + void handleError( int eno ); + int timeval_subtract (struct timeval * result, + struct timeval * x, + struct timeval * y); + + public: + Benchmark( const std::string& name, + bool startAutomatically = true ); + ~Benchmark(); + void start(); + void stop(); + void print(); + + float getElapsedTime(); + + void setOutputStream( fh_ostream oss ); +#define FERRIS_LG_BENCHMARK_D( bm, lsb ) \ + { \ + Ferris::Timber::_SBufT::Priority_t neededState = Ferris::Timber::_SBufT::PRI_DEBUG; \ + if( lsb.state() & neededState ) \ + bm.setOutputStream( lsb.getRealStream( neededState ) ); \ + else \ + bm.setOutputStream( Ferris::Factory::fcnull() ); \ + } \ + + }; + FERRIS_SMARTPTR( Benchmark, fh_benchmark ); + + }; + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + /************************************************************/ + /*** Language Binding Functions *****************************/ + /************************************************************/ + /************************************************************/ + /************************************************************/ + /************************************************************/ + + namespace Bindings + { + std::string pread( fh_istream& iss, size_t count, size_t offset ); + std::string preadio( fh_iostream& iss, size_t count, size_t offset ); + std::string readline( fh_iostream& iss ); + size_t pwrite( fh_iostream& oss, const std::string& str, size_t count, size_t offset ); + size_t ferriswrite( fh_iostream& oss, const std::string& str ); + void fsync( fh_iostream& oss ); + size_t tellgi ( fh_istream& iss ); + size_t tellgio( fh_iostream& oss ); + size_t tellp ( fh_iostream& oss ); + void seekgio( fh_iostream& oss, long offset, int whence ); + void seekp ( fh_iostream& oss, long offset, int whence ); + bool goodi ( fh_istream& iss ); + bool goodio( fh_iostream& oss ); + bool eofi ( fh_istream& iss ); + bool eofio ( fh_iostream& oss ); + + ferris_ios::openmode get_ios_in(); + ferris_ios::openmode get_ios_out(); + ferris_ios::openmode get_ios_trunc(); + ferris_ios::openmode get_ios_ate(); + ferris_ios::openmode get_ios_app(); + + int get_ios_beg(); + int get_ios_cur(); + int get_ios_end(); + + void fireCloseSig( fh_iostream& oss ); + + }; + + + +}; +#pragma GCC visibility pop +#endif diff --git a/Ferris/Hashing.hh b/Ferris/Hashing.hh new file mode 100644 index 0000000..e0cacb7 --- /dev/null +++ b/Ferris/Hashing.hh @@ -0,0 +1,184 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Hashing.hh,v 1.5 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_HASHING_H_ +#define _ALREADY_INCLUDED_FERRIS_HASHING_H_ + +#include +#include "Ferris/FerrisStdHashMap.hh" +#include + +#include + +namespace Ferris +{ + template < class T > + struct f_equal_to : public std::binary_function< T, T, bool> + { + inline bool operator()(const T __x, const T __y) const + { return __x == __y; } + }; + template <> + struct f_equal_to< fh_context > : public std::binary_function< fh_context, fh_context, bool> + { + inline bool operator()(const fh_context __x, const fh_context __y) const + { return GetImpl(__x) == GetImpl(__y); } + }; + + + /* + * This may collide somewhat on a 64bit machine. + */ + template< class T > + struct f_hash : public std::unary_function< T, size_t > + { + inline size_t operator()( const T s ) const + { + return GPOINTER_TO_INT( s ); + } + }; + template<> + struct f_hash : public std::unary_function< fh_context, size_t > + { + inline size_t operator()( const fh_context s ) const + { + return (size_t)GetImpl(s); +// return GPOINTER_TO_INT( GetImpl(s) ); + } + }; + + + +// template < class T* > +// struct f_equal_to : public std::binary_function< T*, T*, bool> +// { +// inline bool operator()(const T* __x, const T* __y) const +// { return __x == __y; } +// }; + +// /* +// * This may collide somewhat on a 64bit machine. +// */ +// template< class T* > +// struct f_hash : public std::unary_function< T*, size_t > +// { +// inline size_t operator()( const T* s ) const +// { +// return GPOINTER_TO_INT( s ); +// } +// }; + + + + +//(const STL::hash) (Ferris::Context* const&)' + +// /* +// * This may collide somewhat on a 64bit machine. +// */ +// template< class T* const > +// struct f_hash : public std::unary_function< T* const& , size_t > +// { +// inline size_t operator()( T* const& s ) const +// { +// return GPOINTER_TO_INT( s ); +// } +// }; + +}; + +namespace std +{ +// template +// struct equal_to : public binary_function +// { +// bool operator()(const T& __x, const T& __y) const { return __x == __y; } +// }; + + +// template <> +// struct equal_to +// : +// public std::binary_function< Context*, Context*, bool> +// { +// bool operator()(const Context* __x, const Context* __y) const +// { return __x == __y; +// } +// }; + +// template <> +// struct equal_to : public std::binary_function +// { +// bool operator()(const T* const __x, const T* const __y) const +// { return __x == __y; +// } +// }; + + +// template struct hash { }; + +// /* +// * This may collide somewhat on a 64bit machine. +// */ +// template<> +// struct hash +// { +// size_t operator()( const Context* s ) const +// { +// return GPOINTER_TO_INT( s ); +// } +// }; + + +// /* +// * This may collide somewhat on a 64bit machine. +// */ +// template<> +// struct hash +// { +// size_t operator()( const T* s ) const +// { +// return GPOINTER_TO_INT( s ); +// } +// }; + +// /* +// * This may collide somewhat on a 64bit machine. +// */ +// template<> +// struct hash +// { +// size_t operator()( T* const& s ) const +// { +// return GPOINTER_TO_INT( s ); +// } +// }; + +}; +#endif diff --git a/Ferris/HiddenSymbolSupport.hh b/Ferris/HiddenSymbolSupport.hh new file mode 100644 index 0000000..d644a0b --- /dev/null +++ b/Ferris/HiddenSymbolSupport.hh @@ -0,0 +1,101 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris streams + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: HiddenSymbolSupport.hh,v 1.2 2010/09/24 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_LIBFERRIS_HIDDENSYMBOLS_H_ +#define _ALREADY_INCLUDED_LIBFERRIS_HIDDENSYMBOLS_H_ + +#ifndef FERRIS_SYMBOL_EXPORT_ALREADY_DONE +#define FERRIS_SYMBOL_EXPORT_ALREADY_DONE + +#ifdef FERRISEXP_IMPORT +#undef FERRISEXP_IMPORT +#endif +#ifdef FERRISEXP_EXPORT +#undef FERRISEXP_EXPORT +#endif +#ifdef FERRISEXP_DLLLOCAL +#undef FERRISEXP_DLLLOCAL +#endif +#ifdef FERRISEXP_DLLPUBLIC +#undef FERRISEXP_DLLPUBLIC +#endif +#ifdef FERRISEXP_API +#undef FERRISEXP_API +#endif +#ifdef FERRISEXP_EXCEPTIONAPI +#undef FERRISEXP_EXCEPTIONAPI +#endif +#ifdef FERRISEXP_EXCEPTION +#undef FERRISEXP_EXCEPTION +#endif + + +// Shared library support +#ifdef WIN32 + #define FERRISEXP_IMPORT __declspec(dllimport) + #define FERRISEXP_EXPORT __declspec(dllexport) + #define FERRISEXP_DLLLOCAL + #define FERRISEXP_DLLPUBLIC +#else + #define FERRISEXP_IMPORT + #ifdef GCC_HASCLASSVISIBILITY + #define FERRISEXP_EXPORT __attribute__ ((visibility("default"))) + #define FERRISEXP_DLLLOCAL __attribute__ ((visibility("hidden"))) + #define FERRISEXP_DLLPUBLIC __attribute__ ((visibility("default"))) + #else + #define FERRISEXP_EXPORT + #define FERRISEXP_DLLLOCAL + #define FERRISEXP_DLLPUBLIC + #endif +#endif + +// Define FERRISEXP_API for DLL builds +#ifdef BUILDING_LIBFERRIS +#define FERRISEXP_API FERRISEXP_EXPORT +#define FERRISEXP_GMODAPI FERRISEXP_EXPORT +#else +#define FERRISEXP_API +#define FERRISEXP_GMODAPI +#endif + + +// Throwable classes must always be visible on GCC in all binaries +#ifdef WIN32 + #define FERRISEXP_EXCEPTIONAPI(api) api +#elif defined(GCC_HASCLASSVISIBILITY) + #define FERRISEXP_EXCEPTIONAPI(api) FERRISEXP_EXPORT +#else + #define FERRISEXP_EXCEPTIONAPI(api) +#endif + +#define FERRISEXP_EXCEPTION FERRISEXP_EXPORT + +#endif + +#endif diff --git a/Ferris/Image.cpp b/Ferris/Image.cpp new file mode 100644 index 0000000..08e0f33 --- /dev/null +++ b/Ferris/Image.cpp @@ -0,0 +1,811 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Image.cpp,v 1.13 2010/11/17 21:30:45 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" +#include "Image_private.hh" + +#include "config.h" +#include "MetadataServer_private.hh" + +#include + +namespace Ferris +{ + using namespace std; + + + s_ImageEAGeneratorsExtensionToShortName_t& getImageEAGeneratorsExtensionToShortName() + { + static s_ImageEAGeneratorsExtensionToShortName_t* ret = 0; + if( !ret ) + ret = new s_ImageEAGeneratorsExtensionToShortName_t(); + return *ret; + } + + Context::s_imageEAGenerators_t& + Context::getImageEAGenerators() + { + static s_imageEAGenerators_t ret; + return ret; + } + + bool + Context::imageEAGenerator_haveLoader() + { + string nameExtension = tolowerstr()( getNameExtension() ); + s_imageEAGenerators_t::iterator igeniter = getImageEAGenerators().find( nameExtension ); + return (igeniter != getImageEAGenerators().end()); + } + + void + Context::imageEAGenerator_priv_createAttributes( bool checkForImageLoader ) + { + bool haveImageLoader = true; + bool writable = false; + + if( checkForImageLoader ) + { + haveImageLoader = false; + + string nameExtension = tolowerstr()( getNameExtension() ); + s_imageEAGenerators_t::iterator igeniter = getImageEAGenerators().find( nameExtension ); + +// cerr << "imageEAGenerator_priv_createAttributes() ext:" << nameExtension +// << " have-loader:" << (igeniter != getImageEAGenerators().end()) +// << endl; + + if( igeniter != getImageEAGenerators().end() ) + { + haveImageLoader = true; + writable = igeniter->second.second; + } + } + + if( haveImageLoader ) + { + + addAttribute( "depth-per-color", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getDepthPerColorStream ), + XSD_BASIC_INT ); + addAttribute( "depth", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getDepthStream ), + XSD_BASIC_INT ); + addAttribute( "gamma", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getGammaStream ), + XSD_BASIC_DOUBLE ); + addAttribute( "has-alpha", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getHasAlphaStream ), + XSD_BASIC_BOOL ); + addAttribute( "aspect-ratio", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getAspectRatioStream ), + XSD_BASIC_DOUBLE ); + + if( writable ) + { + addAttribute( "width", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getWidthStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getWidthIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateWidthFromStream ), + FXD_WIDTH_PIXELS, + true ); + addAttribute( "height", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getHeightStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getHeightIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateHeightFromStream ), + FXD_HEIGHT_PIXELS, + true ); + addAttribute( "rgba-32bpp", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getRGBAStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getRGBAIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateFromStream ), + FXD_BINARY_RGBA32, + 0 ); + } + else + { + addAttribute( "width", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getWidthStream ), + FXD_WIDTH_PIXELS, true ); + addAttribute( "height", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getHeightStream ), + FXD_HEIGHT_PIXELS, true ); + addAttribute( "rgba-32bpp", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getRGBAStream ), + FXD_BINARY_RGBA32 ); + } + addAttribute( "megapixels", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getMegapixelsStream ), + XSD_BASIC_DOUBLE, true ); + } + } + + + + struct FERRISEXP_DLLLOCAL imageEAGeneratorGModule + { + const std::string m_ext; + const bool m_writable; + const std::string m_implname; + const std::string m_shortname; + + bool m_failed; + + imageEAGeneratorGModule( + const std::string& ext, + bool writable, + const std::string& implname, + const std::string& shortname ) + : + m_failed( false ), + m_ext( ext ), + m_writable( writable ), + m_implname( implname ), + m_shortname( shortname ) + { + } + + fh_image resolve( const fh_context& c ) + { + if( m_failed ) + { + ostringstream ss; + ss << "Failed loading image plugin." + << " implementation is at:" << m_implname << endl + << "No image available for url:" << c->getURL() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + fh_image (*CreateImageFromContext)( const fh_context& c ); + + GModule* ghandle = g_module_open ( m_implname.c_str(), G_MODULE_BIND_LAZY ); + if( !ghandle ) + { + m_failed = true; + + ostringstream ss; + ss << "Error, unable to open module file: " + << g_module_error () << endl + << " implementation is at:" << m_implname << endl + << "No image available for url:" << c->getURL() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "CreateImageFromContext", + (gpointer*)&CreateImageFromContext)) + { + m_failed = true; + + ostringstream ss; + ss << "Error, unable to resolve CreateRealFactory in module file: " + << g_module_error () << endl + << " implementation is at:" << m_implname << endl + << "No image available for url:" << c->getURL() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + Context::UnrollRegisteredImageEAGeneratorModule( + m_ext, + m_writable, + m_implname, + Context::f_imageEAGenerator( CreateImageFromContext ) ); + + return c->getImage(); + } + }; + +/** + * implname -> imageEAGeneratorGModule* + */ + typedef map< string, imageEAGeneratorGModule* > RegisterImageEAGeneratorModule_gmodules_t; + static + RegisterImageEAGeneratorModule_gmodules_t& + get_RegisterImageEAGeneratorModule_gmodules() + { + static RegisterImageEAGeneratorModule_gmodules_t ret; + return ret; + } + +/** + * implname -> list of extensions + */ + typedef map< string, stringlist_t > RegisterImageEAGeneratorModule_extensions_t; + static + RegisterImageEAGeneratorModule_extensions_t& + get_RegisterImageEAGeneratorModule_extensions() + { + static RegisterImageEAGeneratorModule_extensions_t ret; + return ret; + } + + bool + Context::RegisterImageEAGeneratorModule( + const std::string& ext, + bool writable, + const std::string& implname, + const std::string& shortname ) + { + + // we will leak a little ram here because we need to keep + // the gmodule loaders in scope for entire program run. + // they are fairly small though. + RegisterImageEAGeneratorModule_gmodules_t::iterator gmodloaderiter = + get_RegisterImageEAGeneratorModule_gmodules().find( implname ); + if( gmodloaderiter == get_RegisterImageEAGeneratorModule_gmodules().end() ) + { + imageEAGeneratorGModule* g = new imageEAGeneratorGModule( ext, writable, + implname, shortname ); + gmodloaderiter = get_RegisterImageEAGeneratorModule_gmodules().insert( + make_pair( implname, g ) ).first; + } + get_RegisterImageEAGeneratorModule_extensions()[ implname ].push_back( ext ); + + string k = tolowerstr()( ext ); + f_imageEAGenerator func( gmodloaderiter->second, &imageEAGeneratorGModule::resolve ); + getImageEAGenerators()[ k ] = make_pair( func, writable ); + + + getImageEAGeneratorsExtensionToShortName()[ ext ] = make_pair( shortname, writable ); + } + + bool + Context::UnrollRegisteredImageEAGeneratorModule( + const std::string& ext, + bool writable, + const std::string& implname, + const f_imageEAGenerator& f ) + { + string k = tolowerstr()( ext ); + getImageEAGenerators()[ k ] = make_pair( f, writable ); + + /** + * Replace the functor object for all other extensions that this + * plugin can handle since we have loaded the plugin now. + */ + stringlist_t& sl = get_RegisterImageEAGeneratorModule_extensions()[ implname ]; + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + getImageEAGenerators()[ *si ] = make_pair( f, writable ); + } + } + + class FERRISEXP_API Image_OutOfProcess : public Image + { + fh_context c; + static fh_istream& getNullStream() + { + static fh_stringstream ss; + return ss; + } + + public: + Image_OutOfProcess( fh_context c ) + : + Image( getNullStream() ), + c( c ) + { + } + + void setup() + { + priv_ensureDataLoaded(); + } + + + virtual void priv_ensureDataLoaded( LoadType loadType = LOAD_ONLY_METADATA ) + { + LG_MDSERV_D << "priv_ensureDataLoaded() type:" << loadType << endl; + + if( loadType == LOAD_COMPLETE_IMAGE ) + { + string earl = c->getURL(); + LG_MDSERV_D << "priv_ensureDataLoaded(complete) url:" << earl + << " w:" << w << " h:" << h << " d:" << d + << endl; + + string eaname = "rgba-32bpp"; + string v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "priv_ensureDataLoaded(complete) url:" << earl + << " v.sz:" << v.size() + << endl; + + ensureRGBA_IsAllocated(); + LG_MDSERV_D << "priv_ensureDataLoaded(allocated) url:" << earl + << " v.sz:" << v.size() + << endl; + + memset( rgba, 0, w*h*4 ); +// memcpy( rgba, v.data(), w*h*4 ); + LG_MDSERV_D << "priv_ensureDataLoaded(copied) url:" << earl + << " v.sz:" << v.size() + << endl; + +// stringstream ss; +// ss << "Can not load full images out of process. to be implemented." << endl; +// Throw_FerrisImageLoadFailed( tostr(ss), 0 ); + + return; + } + + string v; + string eaname; + string earl = c->getURL(); + + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " starting to read values...." << endl; + + eaname = "width"; + v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " have resulting value:" << v << endl; + long w = toint( v ); + + eaname = "height"; + v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " have resulting value:" << v << endl; + long h = toint( v ); + + eaname = "has-alpha"; + v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " have resulting value:" << v << endl; + long a = toint( v ); + + eaname = "gamma"; + v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " have resulting value:" << v << endl; + double g = toType( v ); + + eaname = "depth-per-color"; + v = Ferris::syncMetadataServerGet( earl, eaname ); + LG_MDSERV_D << "Image::priv_ensureDataLoaded(oproc) eaname:" << eaname + << " have resulting value:" << v << endl; + long d = toint( v ); + + setWidth( w ); + setDepthPerColor( d ); + setHeight( h ); + setAlpha( a ); + + GotMetaData = true; + setValid( true ); + } + }; + FERRIS_SMARTPTR( Image_OutOfProcess, fh_Image_OutOfProcess ); + + fh_image + Context::priv_getImage() + { + string nameExtension = tolowerstr()( getNameExtension() ); + fh_image im = 0; + + LG_MDSERV_D << "Context::priv_getImage() url:" << getURL() + << " ext:" << nameExtension << endl; + + if( tryToUseOutOfProcessMetadataServer() ) + { + LG_MDSERV_D << "Context::priv_getImage(maybe oproc?) url:" << getURL() + << " ext:" << nameExtension << endl; + + typedef s_ImageEAGeneratorsExtensionToShortName_t Mt; + Mt& genmap = getOutOfProcess_ImageEAGeneratorsExtensionToShortName(); + Mt::iterator giter = genmap.find( nameExtension ); + if( giter != genmap.end() ) + { + LG_MDSERV_D << "Context::priv_getImage()" + << " this is a out-of-process image metadata." << endl; + + string earl = getURL(); + try + { + fh_Image_OutOfProcess im = new Image_OutOfProcess( this ); + im->setup(); + +// string v = Ferris::syncMetadataServerGet( earl, eaname ); + +// LG_MDSERV_D << "Context::ensureAttributesAreCreated(oproc) eaname:" << eaname +// << " have resulting value:" << v +// << endl; + +// addAttribute( eaname, v ); + LG_MDSERV_D << "Context::priv_getImage()" + << " have oproc image...." << endl; + return im; + } + catch( exception& e ) + { + LG_ATTR_D << "Error getting attribute from out of process server!" + << " earl:" << earl + << " e:" << e.what() << endl; + LG_MDSERV_I << "Error getting attribute from out of process server!" + << " earl:" << earl + << " e:" << e.what() << endl; + return 0; + } + + } + } + + s_imageEAGenerators_t::iterator igeniter = getImageEAGenerators().find( nameExtension ); + + LG_CTX_D << "Context::priv_getImage() im:" << toVoid(im) + << " ext:" << getNameExtension() + << " have-loader:" << (igeniter != getImageEAGenerators().end()) + << endl; + + if( igeniter != getImageEAGenerators().end() ) + { + bool writable = igeniter->second.second; + im = igeniter->second.first( getCoveredContext() ); + } + return im; + } + + typedef Cache< Context*, fh_image > s_image_cache_t; + static s_image_cache_t& getImageCache() + { +// static s_image_cache_t ret; +// static bool v = true; +// if( v ) +// { +// v = false; +// ret.setMaxCollectableSize( 10 ); +// ret.setTimerInterval( 3000 ); +// } +// return ret; + + static s_image_cache_t* retp = 0; + if( !retp ) + { + retp = new s_image_cache_t(); + retp->setMaxCollectableSize( 10 ); + retp->setTimerInterval( 3000 ); + } + + return *retp; + } + + fh_image + Context::getImageOrNULL() + { + fh_image im = getImageCache().get( getCoveredContext() ); + + LG_CTX_D << "Context::getImage() im:" << toVoid(im) + << " ext:" << getNameExtension() + << " url:" << getURL() + << " cc:" << toVoid( getCoveredContext() ) + << " this:" << toVoid(this) + << " size:" << distance( getImageCache().begin(), getImageCache().end() ) + << endl; + + if( im ) + { + return im; + } + + im = priv_getImage(); + if( im ) + { + LG_CTX_D << "Context::getImage(put) im:" << toVoid(im) + << " ext:" << getNameExtension() + << " url:" << getURL() + << " cc:" << toVoid( getCoveredContext() ) + << " this:" << toVoid(this) + << endl; + getImageCache().put( getCoveredContext(), im ); + return im; + } + + return 0; + } + + + fh_image + Context::getImage() + { + fh_image ret = getImageOrNULL(); + if( isBound( ret ) ) + return ret; + + stringstream ss; + ss << "No handler for given image format." << endl + << "url:" << getURL(); +// cerr << tostr(ss) << endl; + Throw_FerrisImageLoadFailed( tostr(ss), 0 ); + } + + void + Context::taintImage( fh_image im ) + { + // FIXME + } + + + + fh_istream + Context::imageEAGenerator_getDepthPerColorStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + fh_image im = 0; + if( c->m_isNativeContext ) im = c->getImageOrNULL(); + else im = c->getImage(); + + if( im ) + ss << im->getDepthPerColor(); + + return ss; + } + + int Context::getImageWidth() + { +// cerr << "Context::getImageWidth()" << endl; + int ret = 0; + + fh_image im = 0; + if( m_isNativeContext ) im = getImageOrNULL(); + else im = getImage(); + + if( im ) + ret = im->getWidth(); + + return ret; + } + + int Context::getImageHeight() + { + int ret = 0; + + fh_image im = 0; + if( m_isNativeContext ) im = getImageOrNULL(); + else im = getImage(); + + if( im ) + ret = im->getHeight(); + + return ret; + } + + + fh_istream + Context::imageEAGenerator_getWidthStream( Context* c, const std::string&, EA_Atom* attr ) + { + LG_ATTR_D << "Context::imageEAGenerator_getWidthStream() c:" << c->getURL() << endl; + LG_MDSERV_D << "Context::imageEAGenerator_getWidthStream() c:" << c->getURL() << endl; + fh_stringstream ss; + string t = getStrAttr( c, "width-local", "" ); + if( !t.empty() ) + ss << t; + else + { + if( int v = c->getImageWidth() ) + ss << v; + } + return ss; + } + + fh_istream + Context::imageEAGenerator_getMegapixelsStream( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + if( double v = (c->getImageWidth() * c->getImageHeight()/1000000.0) ) + ss << v; + return ss; + } + + + fh_iostream + Context::imageEAGenerator_getWidthIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + LG_MDSERV_D << "Context::imageEAGenerator_getWidthIOStream() c:" << c->getURL() << endl; + fh_stringstream ss; + if( int v = c->getImageWidth() ) + ss << v; + return ss; + } + + fh_istream + Context::imageEAGenerator_getHeightStream( Context* c, const std::string&, EA_Atom* attr ) + { + LG_MDSERV_D << "Context::imageEAGenerator_getHeightStream()" << endl; + fh_stringstream ss; + string t = getStrAttr( c, "height-local", "" ); + if( !t.empty() ) + ss << t; + else + { + if( int v = c->getImageHeight() ) + ss << v; + } + return ss; + } + + fh_iostream + Context::imageEAGenerator_getHeightIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + if( int v = c->getImageHeight() ) + ss << v; + return ss; + } + + fh_istream + Context::imageEAGenerator_getDepthStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + fh_image im = 0; + if( c->m_isNativeContext ) im = c->getImageOrNULL(); + else im = c->getImage(); + + if( im ) + ss << im->getDepth(); + return ss; + } + + fh_istream + Context::imageEAGenerator_getGammaStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + fh_image im = 0; + if( c->m_isNativeContext ) im = c->getImageOrNULL(); + else im = c->getImage(); + + if( im ) + ss << im->getGamma(); + return ss; + } + + fh_istream + Context::imageEAGenerator_getHasAlphaStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + fh_image im = 0; + if( c->m_isNativeContext ) im = c->getImageOrNULL(); + else im = c->getImage(); + + if( im ) + ss << im->hasAlpha(); + return ss; + } + + fh_istream + Context::imageEAGenerator_getAspectRatioStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_stringstream ss; + fh_image im = 0; + + double lw = toType(getStrAttr( c, "width-local", "0" )); + if( lw ) + { + double lh = toType(getStrAttr( c, "height-local", "0" )); + double v = lw / std::max( 1.0, lh ); + ss << v; + } + else + { + + if( c->m_isNativeContext ) im = c->getImageOrNULL(); + else im = c->getImage(); + + if( im ) + ss << im->getAspectRatio(); + } + + return ss; + } + + fh_istream + Context::imageEAGenerator_getRGBAStream ( Context* c, const std::string&, EA_Atom* attr ) + { + fh_image im = c->getImage(); + + fh_stringstream ss; + int sz = im->getRGBASize(); + if( sz ) + { + guint32* buffer = im->getRGBA(); + if( buffer ) + ss.write( (char*)buffer, sz ); + im->freeRGBA(); + } + ss.clear(); + return ss; + } + + + void + Context::imageEAGenerator_updateWidthFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + fh_image im = c->getImage(); + c->taintImage( im ); + long v; + ss >> v; + im->setNewWidth( v ); + } + + void + Context::imageEAGenerator_updateHeightFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + fh_image im = c->getImage(); + c->taintImage( im ); + long v; + ss >> v; + im->setNewHeight( v ); + } + + + + fh_iostream + Context::imageEAGenerator_getRGBAIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_image im = c->getImage(); + + fh_stringstream ss; + int sz = im->getRGBASize(); + guint32* buffer = im->getRGBA(); + + ss.write( (char*)buffer, sz ); + im->freeRGBA(); + ss.clear(); + return ss; + } + + void + Context::imageEAGenerator_updateFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + fh_image im = c->getImage(); + im->updateFromStream( c, rdn, atom, ss ); + } + + +}; diff --git a/Ferris/Image_private.hh b/Ferris/Image_private.hh new file mode 100644 index 0000000..3e0e2bd --- /dev/null +++ b/Ferris/Image_private.hh @@ -0,0 +1,42 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Image_private.hh,v 1.2 2010/09/24 21:30:53 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_IMAGE_PRIVATE_H +#define _ALREADY_INCLUDED_FERRIS_IMAGE_PRIVATE_H + +namespace Ferris +{ + typedef std::map< std::string, std::pair< std::string, bool > > + s_ImageEAGeneratorsExtensionToShortName_t; + + s_ImageEAGeneratorsExtensionToShortName_t& getImageEAGeneratorsExtensionToShortName(); +}; + +#endif + diff --git a/Ferris/Iterator.hh b/Ferris/Iterator.hh new file mode 100644 index 0000000..c35c1f5 --- /dev/null +++ b/Ferris/Iterator.hh @@ -0,0 +1,581 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Iterator.hh,v 1.2 2010/09/24 21:30:53 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ITERATOR_H_ +#define _ALREADY_INCLUDED_FERRIS_ITERATOR_H_ + +#include +#include +#include +#include + +namespace std +{ + +template +class circular_iterator : + public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> +{ +protected: + _Iterator current; + _Iterator initial; + _Collection& col; + + typedef circular_iterator<_Collection,_Iterator> _Self; +public: + typedef typename iterator_traits<_Iterator>::iterator_category iterator_category; + typedef typename iterator_traits<_Iterator>::value_type value_type; + typedef typename iterator_traits<_Iterator>::difference_type difference_type; + typedef typename iterator_traits<_Iterator>::pointer pointer; + typedef typename iterator_traits<_Iterator>::reference reference; + typedef _Iterator iterator_type; + typedef _Collection collection_type; + +public: + + circular_iterator() {} + explicit circular_iterator(collection_type& __c, iterator_type& __x) + : col(__c), current(__x), initial(__x) {} + explicit circular_iterator(collection_type& __c) + : col(__c), current( __c.end() ), initial( __c.end() ) {} + + template + < + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1 + > + explicit circular_iterator( const Loki::SmartPtr& __c, + iterator_type& __x ) + : col( *GetImpl(__c)), current( __x ), initial( __x ) {} + template + < + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1 + > + explicit circular_iterator( const Loki::SmartPtr& __c ) + : col( *GetImpl(__c)), current( __c->end() ), initial( __c->end() ) {} + + circular_iterator(const _Self& __x) + : col(__x.col), current(__x.current), initial(__x.initial) {} + _Self& operator = (const _Self& __x) + { col = __x.col; current = __x.base(); initial = __x.initial; return *this; } + + iterator_type base() const { return current; } + + void __advance( iterator_type& i ) + { + if( i != col.end() ) + { + ++i; + if( i == col.end() ) + { + i = col.begin(); + } + + if( i == initial ) + { + i = col.end(); + } + } + } + + reference operator*() + { + _Iterator __tmp = current; + +// if( __tmp == initial ) +// __tmp = col.end(); + +// __advance( __tmp ); + return *__tmp; + } + + _Self& operator++() { + __advance( current ); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + __advance( current ); + return __tmp; + } +// _Self& operator--() { +// __advance( current ); +// return *this; +// } +// _Self operator--(int) { +// _Self __tmp = *this; +// ++current; +// return __tmp; +// } + +// _Self operator+(difference_type __n) const { +// return _Self(current - __n); +// } +// _Self& operator+=(difference_type __n) { +// current -= __n; +// return *this; +// } +// _Self operator-(difference_type __n) const { +// return _Self(current + __n); +// } +// _Self& operator-=(difference_type __n) { +// current += __n; +// return *this; +// } +// reference operator[](difference_type __n) const { return *(*this + __n); } +}; + +template +inline bool operator==(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + + return __x.base() == __y.base(); +} + + +template +inline bool operator<(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + return __y.base() < __x.base(); +} + + +template +inline bool operator!=(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const circular_iterator<_Collection,_Iterator>& __x, + const circular_iterator<_Collection,_Iterator>& __y) { + return !(__x < __y); +} + + +template +circular_iterator<_Collection, typename _Collection::iterator> +make_circular_iterator( _Collection& c ) +{ + return circular_iterator<_Collection, typename _Collection::iterator>(c); +} + +template +< + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1 +> +circular_iterator< T1, typename T1::iterator> +make_circular_iterator( const Loki::SmartPtr& c ) +{ + return circular_iterator< T1, typename T1::iterator>( *GetImpl(c) ); +} + +template +< + typename T1, + template class OP1, + class CP1, + template class KP1, + template class SP1, + class _Iterator +> +circular_iterator< T1, _Iterator > +make_circular_iterator( const Loki::SmartPtr& c, + _Iterator& i ) +{ + return circular_iterator< T1, _Iterator >( *GetImpl(c), i ); +} + +template +circular_iterator<_Collection, typename _Collection::iterator > +make_circular_iterator( _Collection& c, + typename _Collection::iterator& i ) +{ + return circular_iterator<_Collection, typename _Collection::iterator>( c, i ); +} + + + +// template +// < +// typename T1, +// template class OP1, +// class CP1, +// template class KP1, +// template class SP1 +// > +// circular_iterator< T1, typename T1::iterator > +// make_circular_iterator( const Loki::SmartPtr& c, +// typename T1::iterator& i ) +// { +// return circular_iterator< T1, typename T1::iterator>( *GetImpl(c), i ); +// } + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + template + T ForceNegative( T x ) + { + if( x >= 0 ) return -1 * x; + return x; + } + +/** + * Iterate over the domain of a map as if it was a vector<> or list<> + */ +template < class DelegateIterClass > +class map_domain_iterator_class +{ + typedef map_domain_iterator_class< DelegateIterClass > _Self; + +public: + + typedef typename std::iterator_traits traits_type; + typedef typename traits_type::iterator_category iterator_category; + typedef typename traits_type::value_type::first_type value_type; + typedef long difference_type; + typedef value_type pointer; + typedef value_type reference; + + + map_domain_iterator_class( DelegateIterClass de ) + : + m_delegate( de ) + { + } + + reference operator*() const + { + return m_delegate->first; + } + + pointer operator->() + { + return m_delegate->first; + } + + _Self& operator++() + { + shiftIterator(1); + return *this; + } + + _Self operator++(int) + { + _Self tmp(*this); + shiftIterator(1); + return tmp; + } + + _Self& operator--() + { + shiftIterator(-1); + return *this; + } + + _Self operator--(int) + { + _Self tmp(*this); + shiftIterator(-1); + return tmp; + } + + _Self + operator+(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator(n); + return tmp; + } + + _Self& + operator+=(difference_type n) + { + shiftIterator(n); + return *this; + } + + _Self + operator-(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator( ForceNegative(n) ); + return tmp; + } + + _Self& + operator-=(difference_type n) + { + shiftIterator( ForceNegative(n) ); + return *this; + } + + +public: // dont use anything from here on + + DelegateIterClass m_delegate; + + void shiftIterator( int n ) + { + advance( m_delegate, n ); + } +}; + +/** + * iterate over the range of a map + */ +template < class DelegateIterClass > +class map_range_iterator_class +{ + typedef map_range_iterator_class< DelegateIterClass > _Self; + +public: + + typedef typename std::iterator_traits traits_type; + typedef typename traits_type::iterator_category iterator_category; + typedef typename traits_type::value_type::second_type value_type; + typedef long difference_type; + typedef value_type pointer; + typedef value_type reference; + + + map_range_iterator_class( DelegateIterClass de ) + : + m_delegate( de ) + { + } + + reference operator*() const + { + return m_delegate->second; + } + + pointer operator->() + { + return m_delegate->second; + } + + _Self& operator++() + { + shiftIterator(1); + return *this; + } + + _Self operator++(int) + { + _Self tmp(*this); + shiftIterator(1); + return tmp; + } + + _Self& operator--() + { + shiftIterator(-1); + return *this; + } + + _Self operator--(int) + { + _Self tmp(*this); + shiftIterator(-1); + return tmp; + } + + _Self + operator+(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator(n); + return tmp; + } + + _Self& + operator+=(difference_type n) + { + shiftIterator(n); + return *this; + } + + _Self + operator-(difference_type n) const + { + _Self tmp(*this); + tmp.shiftIterator( ForceNegative(n) ); + return tmp; + } + + _Self& + operator-=(difference_type n) + { + shiftIterator( ForceNegative(n) ); + return *this; + } + +public: // dont use anything from here on + + DelegateIterClass m_delegate; + + void shiftIterator( int n ) + { + advance( m_delegate, n ); + } +}; + + +template< class DelegateIterClass > +bool operator==(const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) +{ + return x.m_delegate == y.m_delegate; +} + +template< class DelegateIterClass > +bool operator<( const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) +{ + return x.m_delegate < y.m_delegate; +} + +template< class DelegateIterClass > +bool operator>(const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) { + return y < x; +} + +template< class DelegateIterClass > +bool operator!=(const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) { + return !(x == y); +} + +template< class DelegateIterClass > +bool operator<=(const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) { + return !(y < x); +} + +template< class DelegateIterClass > +bool operator>=(const map_domain_iterator_class< DelegateIterClass >& x, + const map_domain_iterator_class< DelegateIterClass >& y) { + return !(x < y); +} + + +template< class DelegateIterClass > +bool operator==(const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) +{ + return x.m_delegate == y.m_delegate; +} + +template< class DelegateIterClass > +bool operator<( const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) +{ + return x.m_delegate < y.m_delegate; +} + +template< class DelegateIterClass > +bool operator>(const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) { + return y < x; +} + +template< class DelegateIterClass > +bool operator!=(const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) { + return !(x == y); +} + +template< class DelegateIterClass > +bool operator<=(const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) { + return !(y < x); +} + +template< class DelegateIterClass > +bool operator>=(const map_range_iterator_class< DelegateIterClass >& x, + const map_range_iterator_class< DelegateIterClass >& y) { + return !(x < y); +} + + +template < class DelegateIterClass > +map_domain_iterator_class< DelegateIterClass > +map_domain_iterator( DelegateIterClass iter ) +{ + return map_domain_iterator_class< DelegateIterClass >( iter ); +} + +template < class DelegateIterClass > +map_range_iterator_class< DelegateIterClass > +map_range_iterator( DelegateIterClass iter ) +{ + return map_range_iterator_class< DelegateIterClass >( iter ); +} + + + +}; + +#endif + diff --git a/Ferris/LinkContextScheme.cpp b/Ferris/LinkContextScheme.cpp new file mode 100644 index 0000000..0ac3d43 --- /dev/null +++ b/Ferris/LinkContextScheme.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: LinkContextScheme.cpp,v 1.2 2010/09/24 21:30:53 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + diff --git a/Ferris/LinkContextScheme.hh b/Ferris/LinkContextScheme.hh new file mode 100644 index 0000000..ee163b4 --- /dev/null +++ b/Ferris/LinkContextScheme.hh @@ -0,0 +1,81 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: LinkContextScheme.hh,v 1.3 2010/09/24 21:30:53 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_LINK_CONTEXT_SCHEME_H_ +#define _ALREADY_INCLUDED_LINK_CONTEXT_SCHEME_H_ + +#include +#include +#include + +namespace Ferris +{ + + template + class LinkContextSchemeVFS_RootContextDropper + : + public RootContextDropper + { + public: + + LinkContextSchemeVFS_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames( name ); + RootContextFactory::Register( name, this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { +// cerr << "LinkContextSchemeVFS_RootContextDropper<1> name:" << name +// << " url:" << earl << endl; +// DEBUG_dumpcl( "LinkContextSchemeVFS_RootContextDropper<1>" ); + + try + { + static fh_context c = Resolve( earl ); + return c; + } + catch( std::exception& e ) + { + fh_stringstream ss; + ss << "ERROR: fundamental access scheme can not resolve." << std::endl + << "looking for earl:" << earl << std::endl + << " nested:" << e.what() << std::endl + << "Your libferris is not installed correctly." << std::endl; + std::cerr << tostr(ss) << std::endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + } + }; + +}; + + +#endif diff --git a/Ferris/LinkContextSchemeClients.cpp b/Ferris/LinkContextSchemeClients.cpp new file mode 100644 index 0000000..a03debd --- /dev/null +++ b/Ferris/LinkContextSchemeClients.cpp @@ -0,0 +1,263 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: LinkContextSchemeClients.cpp,v 1.15 2011/09/12 21:31:32 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include "config.h" + +namespace Ferris +{ + namespace Private + { + const std::string link_ctx_applications_name = "applications"; +// const std::string link_ctx_applications_url = "~/.ferris/apps.db"; + const std::string link_ctx_applications_url = "apps://"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_applications_name, link_ctx_applications_url >, + Loki::CreateUsingNew, Loki::NoDestroy > + link_ctx_applications_singleton; + static RootContextDropper& applicationsd = link_ctx_applications_singleton::Instance(); + + const std::string link_ctx_apps_name = "apps"; + const std::string link_ctx_apps_url = "~/.ferris/apps.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_apps_name, link_ctx_apps_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_apps_singleton; + static RootContextDropper& appsd = link_ctx_apps_singleton::Instance(); + + + const std::string link_ctx_events_name = "events"; + const std::string link_ctx_events_url = "~/.ferris/eventbind.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_events_name, link_ctx_events_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_events_singleton; + static RootContextDropper& eventsd = link_ctx_events_singleton::Instance(); + + + const std::string link_ctx_icons_name = "icons"; + const std::string link_ctx_icons_url = AUTOTOOLS_CONFIG_DATADIR + "/ferris/icons"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_icons_name, link_ctx_icons_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_icons_singleton; + static RootContextDropper& iconsd = link_ctx_icons_singleton::Instance(); + + const std::string link_ctx_gnomeicons_name = "gnomeicons"; + const std::string link_ctx_gnomeicons_url = "/usr/share/pixmaps"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_gnomeicons_name, link_ctx_gnomeicons_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_gnomeicons_singleton; + static RootContextDropper& gnomeiconsd = link_ctx_gnomeicons_singleton::Instance(); + + + const std::string link_ctx_mime_name = "mime"; + const std::string link_ctx_mime_url = "~/.ferris/mimebind.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_mime_name, link_ctx_mime_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_mime_singleton; + static RootContextDropper& mimed = link_ctx_mime_singleton::Instance(); + + const std::string link_ctx_fileclip_name = "file-clipboard"; + const std::string link_ctx_fileclip_url = "~/.ferris/file-clipboard.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_fileclip_name, link_ctx_fileclip_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_fileclip_singleton; + static RootContextDropper& fileclipd = link_ctx_fileclip_singleton::Instance(); + + +// const std::string link_ctx_news_name = "news"; +// const std::string link_ctx_news_url = "~/.fnews/feeds"; +// typedef Loki::SingletonHolder< +// LinkContextSchemeVFS_RootContextDropper< +// link_ctx_news_name, link_ctx_news_url > > link_ctx_news_singleton; +// static RootContextDropper& newsd = link_ctx_news_singleton::Instance(); + + const std::string link_ctx_bookmarks_name = "bookmarks"; + const std::string link_ctx_bookmarks_url = "~/.ferris/bookmarks.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_bookmarks_name, link_ctx_bookmarks_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_bookmarks_singleton; + static RootContextDropper& bookmarksd = link_ctx_bookmarks_singleton::Instance(); + + const std::string link_ctx_eaq_name = "eaq"; + const std::string link_ctx_eaq_url = "eaquery://filter/"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_eaq_name, link_ctx_eaq_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_eaq_singleton; + static RootContextDropper& eaqd = link_ctx_eaq_singleton::Instance(); + + const std::string link_ctx_ftxq_name = "ftxq"; + const std::string link_ctx_ftxq_url = "fulltextquery://"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_ftxq_name, link_ctx_ftxq_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_ftxq_singleton; + static RootContextDropper& ftxqd = link_ctx_ftxq_singleton::Instance(); + + + + const std::string link_ctx_rdf_name = "myrdf"; + const std::string link_ctx_rdf_url = "~/.ferris/rdfdb/myrdf-sp2o.db"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_rdf_name, link_ctx_rdf_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_rdf_singleton; + static RootContextDropper& rdfd = link_ctx_rdf_singleton::Instance(); + static bool ctx_rdf_b = ImplementationDetail::appendToStaticLinkedRootContextNames("myrdf"); + + +// const std::string link_ctx_schema_name = "schema"; +// const std::string link_ctx_schema_url = "~/.ferris/schema.xml"; +// typedef Loki::SingletonHolder< +// LinkContextSchemeVFS_RootContextDropper< +// link_ctx_schema_name, link_ctx_schema_url > > link_ctx_schema_singleton; +// static RootContextDropper& schemad = link_ctx_schema_singleton::Instance(); + + const std::string link_ctx_camera_name = "camera"; + const std::string link_ctx_camera_url = "gphoto:/"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_camera_name, link_ctx_camera_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_camera_singleton; + static RootContextDropper& camerad = link_ctx_camera_singleton::Instance(); + + const std::string link_ctx_pg_name = "pg"; + const std::string link_ctx_pg_url = "postgresql:/"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_pg_name, link_ctx_pg_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_pg_singleton; + static RootContextDropper& pgd = link_ctx_pg_singleton::Instance(); + + const std::string link_ctx_flickr_name = "flickr"; + const std::string link_ctx_flickr_url = "webphotos://flickr"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_flickr_name, link_ctx_flickr_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_flickr_singleton; + static RootContextDropper& flickrd = link_ctx_flickr_singleton::Instance(); + + const std::string link_ctx_23hq_name = "23hq"; + const std::string link_ctx_23hq_url = "webphotos://23hq"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_23hq_name, link_ctx_23hq_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_23hq_singleton; + static RootContextDropper& _23hqd = link_ctx_23hq_singleton::Instance(); + + const std::string link_ctx_pixelpipe_name = "pixelpipe"; + const std::string link_ctx_pixelpipe_url = "webphotos://pixelpipe"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_pixelpipe_name, link_ctx_pixelpipe_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_pixelpipe_singleton; + static RootContextDropper& _pixelpiped = link_ctx_pixelpipe_singleton::Instance(); + + const std::string link_ctx_eaindexes_name = "eaindexes"; + const std::string link_ctx_eaindexes_url = "~/.ferris/ea-indexes"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_eaindexes_name, link_ctx_eaindexes_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_eaindexes_singleton; + static RootContextDropper& _eaindexesd = link_ctx_eaindexes_singleton::Instance(); + + const std::string link_ctx_ftxindexes_name = "ftxindexes"; + const std::string link_ctx_ftxindexes_url = "~/.ferris/full-text-indexes"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_ftxindexes_name, link_ctx_ftxindexes_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_ftxindexes_singleton; + static RootContextDropper& _ftxindexesd = link_ctx_ftxindexes_singleton::Instance(); + + ///////////// + // QtSQL + //////// + + const std::string link_ctx_qtsqlmysql_name = "mysql"; + const std::string link_ctx_qtsqlmysql_url = "qtsql://mysql"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_qtsqlmysql_name, link_ctx_qtsqlmysql_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_qtsqlmysql_singleton; + static RootContextDropper& _qtsqlmysqld = link_ctx_qtsqlmysql_singleton::Instance(); + +#ifndef HAVE_LIBPQXX + + const std::string link_ctx_qtsqlpostgresql_name = "postgresql"; +#else + const std::string link_ctx_qtsqlpostgresql_name = "qt-postgresql"; +#endif + const std::string link_ctx_qtsqlpostgresql_url = "qtsql://postgresql"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_qtsqlpostgresql_name, link_ctx_qtsqlpostgresql_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_qtsqlpostgresql_singleton; + static RootContextDropper& _qtsqlpostgresqld = link_ctx_qtsqlpostgresql_singleton::Instance(); + + /////////////////// + + const std::string link_ctx_youtube_name = "youtube"; + const std::string link_ctx_youtube_url = "google://youtube"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_youtube_name, link_ctx_youtube_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_youtube_singleton; + static RootContextDropper& _youtubed = link_ctx_youtube_singleton::Instance(); + + + const std::string link_ctx_sane_name = "scanner"; + const std::string link_ctx_sane_url = "sane://"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_sane_name, link_ctx_sane_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_sane_singleton; + static RootContextDropper& _saned = link_ctx_sane_singleton::Instance(); + + + const std::string link_ctx_pulseaudio_name = "pa"; + const std::string link_ctx_pulseaudio_url = "pulseaudio://"; + typedef Loki::SingletonHolder< + LinkContextSchemeVFS_RootContextDropper< + link_ctx_pulseaudio_name, link_ctx_pulseaudio_url >, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_pulseaudio_singleton; + static RootContextDropper& _pulseaudiod = link_ctx_pulseaudio_singleton::Instance(); + + + + }; +}; + + diff --git a/Ferris/LinkContextSchemeClients.hh b/Ferris/LinkContextSchemeClients.hh new file mode 100644 index 0000000..85e6a98 --- /dev/null +++ b/Ferris/LinkContextSchemeClients.hh @@ -0,0 +1,119 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: LinkContextSchemeClients.hh,v 1.12 2011/09/12 21:31:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_LINK_CONTEXT_SCHEME_CLIENTS_H_ +#define _ALREADY_INCLUDED_LINK_CONTEXT_SCHEME_CLIENTS_H_ + +#include +#include + +#include + +namespace Ferris +{ + namespace Private + { + extern const std::string link_ctx_applications_name; + extern const std::string link_ctx_applications_url; + extern const std::string link_ctx_apps_name; + extern const std::string link_ctx_apps_url; + + extern const std::string link_ctx_events_name; + extern const std::string link_ctx_events_url; + + extern const std::string link_ctx_icons_name; + extern const std::string link_ctx_icons_url; + extern const std::string link_ctx_gnomeicons_name; + extern const std::string link_ctx_gnomeicons_url; + + extern const std::string link_ctx_mime_name; + extern const std::string link_ctx_mime_url; + + extern const std::string link_ctx_fileclip_name; + extern const std::string link_ctx_fileclip_url; + + extern const std::string link_ctx_news_name; + extern const std::string link_ctx_news_url; + + extern const std::string link_ctx_bookmarks_name; + extern const std::string link_ctx_bookmarks_url; + + extern const std::string link_ctx_eaq_name; + extern const std::string link_ctx_eaq_url; + + extern const std::string link_ctx_ftxq_name; + extern const std::string link_ctx_ftxq_url; + + extern const std::string link_ctx_rdf_name; + extern const std::string link_ctx_rdf_url; + +// extern const std::string link_ctx_schema_name; +// extern const std::string link_ctx_schema_url; + + extern const std::string link_ctx_camera_name; + extern const std::string link_ctx_camera_url; + + extern const std::string link_ctx_pg_name; + extern const std::string link_ctx_pg_url; + + extern const std::string link_ctx_flickr_name; + extern const std::string link_ctx_flickr_url; + + extern const std::string link_ctx_23hq_name; + extern const std::string link_ctx_23hq_url; + + extern const std::string link_ctx_pixelpipe_name; + extern const std::string link_ctx_pixelpipe_url; + + extern const std::string link_ctx_eaindexes_name; + extern const std::string link_ctx_eaindexes_url; + + extern const std::string link_ctx_ftxindexes_name; + extern const std::string link_ctx_ftxindexes_url; + + extern const std::string link_ctx_qtsqlmysql_name; + extern const std::string link_ctx_qtsqlmysql_url; + + extern const std::string link_ctx_qtsqlpostgresql_name; + extern const std::string link_ctx_qtsqlpostgresql_url; + + extern const std::string link_ctx_youtube_name; + extern const std::string link_ctx_youtube_url; + + extern const std::string link_ctx_sane_name; + extern const std::string link_ctx_sane_url; + + extern const std::string link_ctx_pulseaudio_name; + extern const std::string link_ctx_pulseaudio_url; + + }; +}; + + +#endif diff --git a/Ferris/MainPageDocs.hh b/Ferris/MainPageDocs.hh new file mode 100644 index 0000000..1e7c36e --- /dev/null +++ b/Ferris/MainPageDocs.hh @@ -0,0 +1,223 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MainPageDocs.hh,v 1.2 2010/09/24 21:30:53 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +/*! \mainpage Ferris API docs + * + * \section intro Introduction + * + * Documentation is a tad scarce at this point in time. Most of the development + * effort has been directed at making the core of ferris solid and creating a + * set of nice contexts and attribute generators for its users. + * + * The two main abstractions in ferris are Attribute and Context. All data + * is moved via IOStreams which are subclasses of std::iostreams but allow + * streams to be passed by value to functions. Attribute and Context are + * documented quite well at the moment, and if one is familiar with + * std::iostreams then ferris iostreams have the same interface with some + * enhancements. Note that passing a ferris iostream by value only copies + * the handle, the underlying stream is not copied. + * + * A Context is like a directory or file in filesystem speak, and a Attribute + * is like EA. Context objects make up a standard tree where each context + * knows its parent and knows all of its direct children. Any number of + * Attributes can be attached to a Context object and form another dimension + * of information, much like having a bunch of files in a directory except + * that attributes have a different namespace to Context objects attached as + * children to a Context. + * + * \section latestdocs Getting the latest docs + * + * Note that tarballs of this documentation can be downloaded from + * + * sourceforge.net for your offline enjoyment. + * + * Also by running doxygen in the main directory of a cvs checkout the latest + * documentation will be generated in ../libferris.web/user-api/ + * + * \section safeapi Safe API calls + * + * There are some classes and functions exposed in the header files that are + * for internal use only. They are currently exposed though their API may + * change or they may be made redundant in any future versions. The reason + * that these classes are exposed instead of a pure abstract class is + * efficiency; to use implicit compiler casts the abstract interfaces would + * need to virtually inherit from a superclass which would impose undue + * complexity. + * + * In light of this, the safe classes and functions are explicitly listed here. + * This list should be considered the authoritive listing. + * + * Ferris::Attribute, Ferris::Context, Ferris::Versioned, Ferris::CacheManager, + * Ferris::ContextCollection, Ferris::MutableCollectionEvents, + * Ferris::FerrisExceptionBase, Ferris::NamingEvent, + * Ferris::AttributeCollection, Ferris::null_streambuf, + * Ferris::ferris_basic_streambuf_sixteenk, Ferris::ferris_basic_streambuf_fourk, + * Ferris::ferris_basic_streambuf_quartk, Ferris::ferris_basic_streambuf_sixteenbytes, + * Ferris::ferris_basic_streambuf, Ferris::ferris_basic_double_buffered_streambuf, + * Ferris::i_ferris_stream_traits, Ferris::o_ferris_stream_traits, + * Ferris::io_ferris_stream_traits, Ferris::emptystream_methods, + * Ferris::Ferris_commonstream, Ferris::Ferris_istream, + * Ferris::Ferris_ostream, Ferris::Ferris_iostream, + * Ferris::stringstream_methods, Ferris::ferris_stringbuf, + * Ferris::Ferris_istringstream, Ferris::Ferris_ostringstream, + * Ferris::Ferris_stringstream, Ferris::ferris_databuf, + * Ferris::filestream_methods, Ferris::ferris_filebuf, + * Ferris::Ferris_ifstream, Ferris::Ferris_ofstream + * Ferris::Ferris_fstream + * Ferris::fh_istream, Ferris::fh_ostream, Ferris::fh_iostream + * Ferris::fh_istringstream, Ferris::fh_ostringstream, Ferris::fh_stringstream, + * Ferris::fh_ifstream, Ferris::fh_ofstream, Ferris::fh_fstream, Ferris:: + * Ferris::fh_char + * Ferris::Ferris_ififostream, Ferris::fh_ififostream, + * + * + * + * Note that stream inserters and extractors are assumed to be public + * + * Any of the exception types in FerrisException.hh may be used in a catch() + * on their type explicitly. + * + * The following classes, only the methods listed in either the class itself or + * and parent of that class that is listed above. + * + * Ferris::CreateMetaDataContext, + * + * The following functions + * + * Ferris::Resolve()

+ * Ferris::isBound()

+ * Ferris::tostr()

+ * Ferris::toint()

+ * Ferris::todouble()

+ * Ferris::StreamToString()

+ * Ferris::getFirstLine()

+ * Ferris::ends_with()

+ * Ferris::starts_with()

+ * Ferris::cmp_nocase()

+ * Ferris::getStrAttr()

+ * Ferris::getStrAttr()

+ * Ferris::getStrSubCtx()

+ * Ferris::isTrue()

+ * Ferris::getCacheManager()

+ * FERRIS_POPT_OPTIONS

+ * FERRIS_CONTEXTPOPT_OPTIONS

+ *

+ * namespace Ferris::Shell

+ *

+ * Ferris::Shell::getCWDString()

+ * Ferris::Shell::getCWD()

+ * Ferris::Shell::setCWD()

+ * Ferris::Shell::CreateFile()

+ * Ferris::Shell::CreateDir()

+ *

+ * namespace Ferris::Main

+ *

+ * Ferris::Main::EventPending()

+ * Ferris::Main::processEvent()

+ * Ferris::Main::mainLoop()

+ *

+ *

+ * namespace Ferris::Factory

+ *

+ * Ferris::Factory::Resolve()

+ * Ferris::Factory::ResolveMime()

+ * Ferris::Factory::ResolveIcon()

+ * Ferris::Factory::MakeSorter()

+ * Ferris::Factory::MakeFilter()

+ * Ferris::Factory::MakeFilterFromFile()

+ * Ferris::Factory::MakeFilteredContext()

+ * Ferris::Factory::MakeLimitingIStream()

+ * Ferris::Factory::MakeProxyStream()

+ * Ferris::Factory::MakeProxyStream()

+ * Ferris::Factory::MakeFdIStream()

+ * Ferris::Factory::MakeFdOStream()

+ *

+ *

+ * namespace Ferris::Math

+ *

+ * Ferris::Math::log()

+ *

+ *

+ * Use of other classes or functions may result in you having to change your code + * later. If unsure if a function or class should be in the above list, please + * send to the ferris-dev mailing list asking about it. + * + * \section qs Quick start + * + * Most things in ferris revolve around using a SmartPtr to an object. + * Basically this allows the client to get an object and when the handle + * to that object goes out of scope then the object may be freed by Ferris. + * + * The most basic pattern of a ferris client is to get a Context object and + * then use it. Use the Ferris::Resolve method passing in a URL to the object + * of interest and you obtain a Context object for that URL. + * Note that once a Context is obtained then all of that Context's children can + * be traversed recursively and the parent of any Context is available. + * This allows one to use the Resolve method only for initial bootstrapping. + * + * \subsection usectx Using the context + * + * The main flavor of the API can be seen in Ferris.hh and Attribute.hh, + * in particular the Attribute and Context classes. + * + * An Attribute is a chunk of arbitrary size data attached + * to a Context. At the moment there is no hierarchy of attributes in a context, + * each attribute is just attached using a relative domain name (rdn). An rdn + * is kind of like a file name, the two terms are used interchangeably in this + * API reference. + * Use Attribute::getAttribute(), Attribute::getAttributeNames() and + * Attribute::getAttributeCount() to get at the attributes. + * + * + * Contexts may have sub contexts and a bunch of attributes attached to them. + * There are some special attributes like "ea-names" that are always present and + * are presented for completeness. By having these special attributes metadata + * about the attributes can be presented along with the attributes themselves in + * an GUI browser that uses ferris. See the ContextCollection class which is a + * superclass of Context for methods dealing with access to the hierarchy of + * Context objects. + * + * \section popt Popt interaction + * + * Simply include FERRIS_POPT_OPTIONS as a member in your popt arg table and + * new --ferris-x options are added and parsed if persent for you. Note that + * these options will never have short option names and will always begin + * with --ferris to seperate them from your client's options. + * + * + * \section ex Examples + * + * The ls.cpp client provides a nice feel for client usage. + * + * There is also a Gtk+2 client for Ferris called "Ego". The Ego client is guile based and + * presents the Ferris data via a TreeView. + * + * + */ diff --git a/Ferris/Makefile.am b/Ferris/Makefile.am new file mode 100644 index 0000000..e0aa38e --- /dev/null +++ b/Ferris/Makefile.am @@ -0,0 +1,528 @@ +%_moc.cpp: %.hh + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +%_moc_impl.cpp: %.cpp + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +# have to make these! +# FerrisWebServices_private_moc.cpp FerrisQt_moc_impl.cpp +mocimpls.cpp: FerrisWebServices_private_moc.cpp FerrisQt_moc_impl.cpp MetadataServer_moc_impl.cpp + touch mocimpls.cpp + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @LOKI_CFLAGS@ \ + @FSTREAM_CFLAGS@ \ + -I/usr/local/witme-file-3.35/include \ + @FAMPP2_CFLAGS@ \ + @XML4C_CFLAGS@ \ + @XALAN_CFLAGS@ \ + @DB4_CFLAGS@ \ + @GNOMEVFS_CFLAGS@ \ + @LIBFILE_CFLAGS@ \ + @EFSD_CFLAGS@ \ + @KDE_CFLAGS@ \ + @LIBMAGIC_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @LIBZ_CFLAGS@ \ + @BZIP2_CFLAGS@ \ + @STLDB4_CFLAGS@ \ + @LIBRPM_CFLAGS@ \ + @XQILLA_CFLAGS@ \ + @SOPRANO_CFLAGS@ \ + @NEPOMUK_CFLAGS@ \ + @LIBPQXX_CFLAGS@ \ + @LIBTEXTCAT_CFLAGS@ \ + @GPGME_CFLAGS@ \ + @BOOST_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @DBUS_CFLAGS@ \ + @IMLIB_CFLAGS@ \ + @QTDBUS_CFLAGS@ \ + @LIBSELINUX_CFLAGS@ \ + @CURL_CFLAGS@ \ + @XERCES_INTERNAL_HEADERS_CFLAGS@ \ + @QTNETWORK_CFLAGS@ \ + @CFLAGS@ + + +if HAVE_XML4C +XMLHH = FerrisDOM.hh +XMLCPP = FerrisDOM.cpp FerrisDOM_private.hh libferrisxmlshared.cpp libferrisxmlshared.hh +endif + +if HAVE_XALAN +XALANCPP = FerrisXalan_private.hh FerrisXalan.cpp +endif + +if FERRIS_HAVE_LIBRPM +LIBRPM_FILES=RPMContext.cpp RPMContext_private.hh +endif + + +if HAVE_CURL +CURL_FILES=FerrisCurl.cpp FerrisCurl_private.hh +endif + +if HAVE_XQILLA +XQILLA_DEP_SRCS=XQillaContext.cpp XQillaContext_private.hh XQilla_private.hh XQilla.cpp +endif + +if HAVE_SVMLIGHT +SVMLIGHT_DEP_SRCS=AgentSVMLight.cpp +endif + + +if FERRIS_HAVE_GPGME +GPG_DEP_SRCS=FerrisGPGContext.cpp FerrisGPGContext_private.hh +endif + + +if HAVE_XMMS +XMMS_DEP_SOURCES = WrapXMMS.cpp +endif + +if HAVE_LIBPQXX +FCA_PQXX_DEP_SOURCES = FCA.cpp +endif + + + +#COMMON_GCJFLAGS = --encoding=ISO-8859-1 -Wno-deprecated +#BUILT_SOURCES = MyAnalyzer.h +#%.h: %.java +# $(GCJ) -C $(COMMON_GCJFLAGS) $(AM_GCJFLAGS) $(GCJFLAGS) $< +# gcjh --classpath `pwd` `echo $< | sed "s/.java//g"`; + +############################## +############################## +############################## + +if HAVE_SWIG_PERL +SWIG_PERL_LTLIBNAMES = libferrisperl.la +libferrisperl_wrap.cpp libferrisperl.pm: libferrisperl.i + swig -c++ -DLIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER \ + -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags | sed s/-pthread//g ` \ + -perl5 -module libferrisperl -o $(srcdir)/libferrisperl_wrap.cpp $(srcdir)/libferrisperl.i + +#-proxy -shadow + +libferrisperl_la_SOURCES = libferrisperl_wrap.cpp +libferrisperl_la_LIBADD = libferris.la +libferrisperl_la_CXXFLAGS = \ + $(INCLUDES) \ + `perl -MExtUtils::Embed -e ccopts -e ldopts` \ + @SWIG_PERL_CFLAGS@ + +libferrisperl_la_LDFLAGS = \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ \ + `perl -MExtUtils::Embed -e ccopts -e ldopts` + +perlmoduledir = @SWIG_PERL_PMDIR@ +perlmodule_DATA = libferrisperl.pm + +endif + + + +############################## +############################## +############################## + +if HAVE_SWIG_PYTHON +SWIG_PYTHON_LTLIBNAMES = libferrispython.la +libferrispython_wrap.cpp: libferrispython.i + swig -c++ -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags` \ + -python -module libferrispython -o libferrispython_wrap.cpp libferrispython.i +libferrispython.py: libferrispython_wrap.cpp + +libferrispython_la_SOURCES = libferrispython_wrap.cpp +libferrispython_la_LIBADD = libferris.la +libferrispython_la_CXXFLAGS = \ + $(INCLUDES) \ + @SWIG_PYTHON_CFLAGS@ + +install-exec-local: + cd @SWIG_PYTHON_LIBDIR@; \ + cp $(LIBDIR)/libferrispython.so _libferrispython.so; \ + mv $(LIBDIR)/libferrispython.so* /tmp; \ + mv $(LIBDIR)/libferrispython.la /tmp; + +libferrispython_la_LDFLAGS = \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + +pythonmoduledir = @SWIG_PYTHON_MODULEDIR@ +pythonmodule_DATA = libferrispython.py + +endif + +############################## +############################## +############################## + +if HAVE_SWIG_OCAML + +libferrisocaml_wrap.c: libferrisocaml.i libferris.i + swig -c++ -DLIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags` \ + -ocaml -module libferrisocaml -o libferrisocaml_wrap.cpp libferrisocaml.i + echo "#include " >|libferrisocaml_wrap.c + cat libferrisocaml_wrap.cpp >>libferrisocaml_wrap.c + +libferrisocaml.so: libferrisocaml_wrap.c + ocamlc -cc 'g++' -g -c -ccopt "-I." -ccopt "$(SIGC_CFLAGS)" -ccopt "$(LOKI_CFLAGS)" -ccopt "$(GLIB_CFLAGS)" -ccopt "$(STLDB4_CFLAGS)" -ccopt "$(OPENSSL_CFLAGS)" -ccopt "$(SWIG_OCAML_CFLAGS)" -ccopt -g -ccopt "-xc++ " libferrisocaml_wrap.c + g++ -shared -o libferrisocaml.so libferrisocaml_wrap.o \ +$(SIGC_LIBS) $(LOKI_LIBS) $(GLIB_LIBS) $(STLDB4_LIBS) $(OPENSSL_LIBS) + OCAMLRUNPARAM="l=32000000" ocamldlgen \ + libferrisocaml.ml libferrisocaml.so > libferrisocaml_dynamic.ml + mv -f libferrisocaml_dynamic.ml libferrisocaml.ml + OCAMLRUNPARAM="l=32000000" ocamlfind \ + ocamlc -g -c -package dl libferrisocaml.ml + +libferrisocaml.cmi: libferrisocaml.so +libferrisocaml.cmo: libferrisocaml.so + +ocamlsharedlibdir = @LIBDIR@ +ocamlsharedlib_DATA = libferrisocaml.so + +SWIG_OCAML_LTLIBNAMES = +#SWIG_OCAML_LTLIBNAMES = libferrisocaml.la +#libferrisocaml_la_SOURCES = libferrisocaml_wrap.o +#libferrisocaml_la_LIBADD = libferris.la +#libferrisocaml_la_CXXFLAGS = \ +# $(INCLUDES) \ +# @SWIG_OCAML_CFLAGS@ + +#libferrisocaml_la_LDFLAGS = \ +# -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + + +ocamlmoduledir = @SWIG_OCAML_HEADERDIR@ +ocamlmodule_DATA = libferrisocaml.cmi libferrisocaml.cmo + +endif + + + +################################################################### +################################################################### +################################################################### + +if HAVE_DBUS +DBUS_SOURCES = DBus.cpp DBus_private.hh +endif + +lib_LTLIBRARIES = libferris.la \ + $(SWIG_PERL_LTLIBNAMES) $(SWIG_PYTHON_LTLIBNAMES) \ + $(SWIG_OCAML_LTLIBNAMES) +EXTRA_DIST= libferris.i \ + libferrisperl.i \ + perl_std_list.i \ + libferrispython.i \ + libferrisocaml.i \ + libferrisocaml_wrap.c + +BUILT_SOURCES = libferrisperl_wrap.cpp libferrispython_wrap.cpp libferrisocaml_wrap.c + +# libferrispython.py libferrisperl.pm libferrisocaml.cmi libferrisocaml.cmo + + +ferrisincludedir=$(includedir)/Ferris +ferrisinclude_HEADERS = \ + Ferris.hh \ + Versioned.hh \ + Native.hh \ + ContextContext.hh \ + FerrisException.hh \ + SignalStreams.hh \ + FerrisHandle.hh \ + FerrisEvent.hh \ + timber.hh \ + Enamel.hh \ + SM.hh \ + EAGenerators.hh \ + MatchedEAGenerators.hh \ + General.hh \ + FilteredContext.hh \ + Regex.hh \ + Trimming.hh \ + TypeDecl.hh \ + Context.hh \ + ContextPopt.hh \ + FerrisPopt.hh \ + ValueRestorer.hh \ + Runner.hh \ + Ferrisls.hh \ + Attribute.hh \ + Resolver.hh \ + Math.hh \ + ChainedViewContext.hh \ + $(XMLHH) \ + BuildDependentMethods.hh \ + EAN.hh \ + FerrisBackup.hh \ + FerrisCopy.hh \ + FerrisRemove.hh \ + FerrisSmartPointerChecker.hh \ + FerrisMove.hh \ + ClipAPI.hh \ + CursorAPI.hh \ + Configuration.hh \ + FerrisSTL.hh \ + FerrisVersioning.hh \ + ContextIterator.hh \ + ContextSetCompare.hh \ + Shell.hh \ + Mime.hh \ + ChildStreamServer.hh \ + Hashing.hh \ + AsyncIO.hh \ + Runner_FunctorType.hh \ + Chmod.hh \ + Daemon.hh \ + Debug.hh \ + Iterator.hh \ + FullTextIndexer.hh \ + FullTextQuery.hh \ + EAIndexer.hh \ + EAQuery.hh \ + FCA.hh \ + SchemaSupport.hh \ + SchemaManips.hh \ + Medallion.hh \ + Cache.hh \ + Personalities.hh \ + Agent.hh \ + Numeric.hh \ + DublinCore.hh \ + FullTextIndexerMetaInterface.hh \ + All.hh \ + EAIndexerMetaInterface.hh \ + HiddenSymbolSupport.hh \ + FerrisBitMagic.hh \ + FerrisStdHashMap.hh \ + FerrisFileActions.hh \ + SyncDelayer.hh \ + FerrisBoost.hh \ + WrapXMMS.hh \ + ContextPlugin.hh \ + Ferrisls_AggregateData.hh \ + FerrisSlaveProcess.hh \ + TimeDelayedAction.hh + +libferris_la_SOURCES = \ + mocimpls.cpp \ + Ferris.cpp \ + Ferris_private.hh \ + Image.cpp \ + Image_private.hh \ + Versioned.cpp \ + Native.cpp \ + ContextContext.cpp \ + RootContext.cpp \ + RootContext_private.hh \ + FerrisException.cpp \ + SignalStreams.cpp \ + FerrisHandle.cpp \ + FerrisEvent.cpp \ + timber.cpp \ + Enamel.cpp \ + Enamel_priv.hh \ + SM.cpp \ + SM_private.hh \ + MatchedEAGenerators.cpp \ + General.cpp \ + FilteredContext.cpp \ + Regex.cpp \ + FerrisContextPlugin.cpp \ + FerrisOpenSSL.cpp \ + Context.cpp \ + Context_private.hh \ + FerrisPopt.cpp \ + ContextPopt.cpp \ + Runner.cpp \ + Ferrisls.cpp \ + Ferrisls_RDF.cpp \ + Ferrisls_XML.cpp \ + Attribute.cpp \ + Attribute_private.hh \ + FilteredContext_private.hh \ + Resolver.cpp \ + Resolver_private.hh \ + Math.cpp \ + Ferrisls_AggregateData.cpp \ + ChainedViewContext.cpp \ + FerrisOpenSSL.hh \ + MainPageDocs.hh \ + $(XMLCPP) \ + $(XALANCPP) \ + xfsutil.cpp \ + xfsutil.hh \ + EAN.cpp \ + FerrisBackup.cpp \ + StatfsUtilities.cpp \ + StatfsUtilities.hh \ + FerrisCopy.cpp \ + FerrisCopy_private.hh \ + FerrisRemove.cpp \ + FerrisRemove_private.hh \ + LinkContextScheme.cpp \ + LinkContextScheme.hh \ + LinkContextSchemeClients.cpp \ + LinkContextSchemeClients.hh \ + FerrisMove.cpp \ + ClipAPI.cpp \ + CursorAPI.cpp \ + Configuration.cpp \ + Configuration_private.hh \ + FerrisVersioning.cpp \ + ContextIterator.cpp \ + ContextSetCompare.cpp \ + ContextSetCompare_private.hh \ + Shell.cpp \ + Mime.cpp \ + FerrisKDE.cpp FerrisKDE.hh \ + ChildStreamServer.cpp \ + AsyncIO.cpp \ + Chmod.cpp \ + PluginOutOfProcNotificationEngine.hh \ + PluginOutOfProcNotificationEngine.cpp \ + common-ferris-out-of-proc-notification-deamon.hh \ + common-ferris-out-of-proc-notification-deamon.cpp \ + Daemon.cpp \ + Debug.cpp \ + FullTextIndexer.cpp \ + FullTextIndexer_private.hh \ + FullTextIndexerMetaInterface.cpp \ + FullTextQuery.cpp \ + EAIndexer.cpp \ + EAIndexer_private.hh \ + FullTextIndexer_private.hh \ + EAQuery.cpp \ + FerrisAsTextPlugin.hh \ + FerrisAsTextPlugin.cpp \ + FerrisCreationPlugin.hh \ + FerrisCreationPlugin.cpp \ + FerrisEAGeneratorPlugin.hh \ + FerrisEAGeneratorPlugin.cpp \ + FerrisEAGeneratorPlugin_private.hh \ + $(FCA_PQXX_DEP_SOURCES) \ + FullTextContext.cpp \ + FullTextContext.hh \ + EAQueryContext.cpp \ + EAQueryContext.hh \ + RPM.cpp \ + RPM_private.hh \ + $(LIBRPM_FILES) \ + SpiritTime.cpp \ + SchemaSupport.cpp \ + SchemaManips.cpp \ + Medallion.cpp \ + Medallion_private.hh \ + Cache.cpp \ + EtagereContext.cpp \ + EtagereContext_private.hh \ + FerrisDevContext.cpp \ + FerrisDevContext_private.hh \ + $(GPG_DEP_SRCS) \ + FerrisGPG.cpp FerrisGPG_private.hh \ + Personalities.cpp \ + Agent.cpp \ + Agent_private.hh \ + $(XQILLA_DEP_SRCS) \ + $(SVMLIGHT_DEP_SRCS) \ + FerrisRDFCore.cpp FerrisRDFCore.hh \ + FerrisSemantic.cpp FerrisSemantic.hh \ + DublinCore.cpp \ + BranchContext_private.hh BranchContext.cpp BranchContext_Clients.cpp \ + BranchRemembranceHistoryInternalContext.cpp \ + EAIndexerSQLCommon_private.hh \ + EAIndexerSQLCommon.cpp \ + EAIndexerCustomFerris.cpp \ + FullTextIndexerCustomFerris.cpp \ + EAIndexerMetaInterface.cpp \ + FactoriesCreationCommon_private.hh \ + FactoriesCreationCommon_private.cpp \ + CacheManager.cpp \ + CacheManager_private.hh \ + SpiritFFilter.cpp \ + FerrisFileActions.cpp \ + RemembranceContext.cpp \ + FullTextIndexerSyntheticDocID_private.hh \ + FullTextIndexerSyntheticDocID.cpp \ + SyncDelayer.cpp \ + FerrisBoost.cpp \ + FerrisCLucene.hh \ + $(XMMS_DEP_SOURCES) \ + MetadataServer.cpp MetadataServer_private.hh \ + FSParser.cpp FSParser_private.hh \ + $(DBUS_SOURCES) \ + $(CURL_FILES) \ + ForwardEAIndexInterface.hh ForwardEAIndexInterface.cpp \ + FerrisSlaveProcess.cpp FerrisSlaveProcess_private.hh \ + FerrisQt.cpp FerrisQt_private.hh \ + FerrisWebServices.cpp FerrisWebServices_private.hh \ + TimeDelayedAction.cpp + +libferris_la_LIBADD = \ + -lfam -lfampp \ + -lcrypto -lssl \ + @LOKI_LIBS@ \ + @FSTREAM_LIBS@ \ + @XML4C_LIBS@ \ + @XALAN_LIBS@ \ + @STLPORT_LIB@ \ + @DB4_LIBS@ \ + @GNOMEVFS_LIBS@ \ + @LIBFILE_LIBS@ \ + @EFSD_LIBS@ \ + @KDE_LIBS@ \ + @LIBMAGIC_LIBS@ \ + @LIBCAP_LIBS@ \ + @OPENSSL_LIBS@ \ + @LIBZ_LIBS@ \ + @BZIP2_LIBS@ \ + @STLDB4_LIBS@ \ + @UUID_LIBS@ \ + @LIBRPM_LIBS@ \ + @LIBTEXTCAT_LIBS@ \ + @GPGME_LIBS@ \ + @XQILLA_LIBS@ \ + @SOPRANO_LIBS@ \ + @NEPOMUK_LIBS@ \ + @LIBPQXX_LIBS@ \ + @DBUS_LIBS@ \ + @IMLIB_LIBS@ \ + @QTDBUS_LIBS@ \ + @LIBSELINUX_LIBS@ \ + @CURL_LIBS@ \ + -lpopt \ + @BOOST_LIBS@ + + +libferris_la_LDFLAGS = \ + @GLIB_LIBS@ \ + @FAMPP2_LIBS@ \ + @CUSTOMALLOC_LA@ \ + @LIBFERRISMG_LA@ \ + @LIBFERRISINDEXING_LA@ \ + @LIBASTEXT_PLUGIN_FACTORIES_LA@ \ + @LIBCREATION_PLUGIN_FACTORIES_LA@ \ + @LIBEAGEN_PLUGIN_FACTORIES_LA@ \ + @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ @MAGICK_LIBS@ \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + + +########################################################################## +########################################################################## +########################################################################## + diff --git a/Ferris/Makefile.in b/Ferris/Makefile.in new file mode 100644 index 0000000..1b6c83a --- /dev/null +++ b/Ferris/Makefile.in @@ -0,0 +1,1882 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = Ferris +DIST_COMMON = $(am__ferrisinclude_HEADERS_DIST) \ + $(srcdir)/BuildDependentMethods.hh.in \ + $(srcdir)/FerrisSmartPointerChecker.hh.in \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/SchemaSupport.hh.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = BuildDependentMethods.hh \ + FerrisSmartPointerChecker.hh SchemaSupport.hh +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ocamlmoduledir)" \ + "$(DESTDIR)$(ocamlsharedlibdir)" "$(DESTDIR)$(perlmoduledir)" \ + "$(DESTDIR)$(pythonmoduledir)" "$(DESTDIR)$(ferrisincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libferris_la_DEPENDENCIES = +am__libferris_la_SOURCES_DIST = mocimpls.cpp Ferris.cpp \ + Ferris_private.hh Image.cpp Image_private.hh Versioned.cpp \ + Native.cpp ContextContext.cpp RootContext.cpp \ + RootContext_private.hh FerrisException.cpp SignalStreams.cpp \ + FerrisHandle.cpp FerrisEvent.cpp timber.cpp Enamel.cpp \ + Enamel_priv.hh SM.cpp SM_private.hh MatchedEAGenerators.cpp \ + General.cpp FilteredContext.cpp Regex.cpp \ + FerrisContextPlugin.cpp FerrisOpenSSL.cpp Context.cpp \ + Context_private.hh FerrisPopt.cpp ContextPopt.cpp Runner.cpp \ + Ferrisls.cpp Ferrisls_RDF.cpp Ferrisls_XML.cpp Attribute.cpp \ + Attribute_private.hh FilteredContext_private.hh Resolver.cpp \ + Resolver_private.hh Math.cpp Ferrisls_AggregateData.cpp \ + ChainedViewContext.cpp FerrisOpenSSL.hh MainPageDocs.hh \ + FerrisDOM.cpp FerrisDOM_private.hh libferrisxmlshared.cpp \ + libferrisxmlshared.hh FerrisXalan_private.hh FerrisXalan.cpp \ + xfsutil.cpp xfsutil.hh EAN.cpp FerrisBackup.cpp \ + StatfsUtilities.cpp StatfsUtilities.hh FerrisCopy.cpp \ + FerrisCopy_private.hh FerrisRemove.cpp FerrisRemove_private.hh \ + LinkContextScheme.cpp LinkContextScheme.hh \ + LinkContextSchemeClients.cpp LinkContextSchemeClients.hh \ + FerrisMove.cpp ClipAPI.cpp CursorAPI.cpp Configuration.cpp \ + Configuration_private.hh FerrisVersioning.cpp \ + ContextIterator.cpp ContextSetCompare.cpp \ + ContextSetCompare_private.hh Shell.cpp Mime.cpp FerrisKDE.cpp \ + FerrisKDE.hh ChildStreamServer.cpp AsyncIO.cpp Chmod.cpp \ + PluginOutOfProcNotificationEngine.hh \ + PluginOutOfProcNotificationEngine.cpp \ + common-ferris-out-of-proc-notification-deamon.hh \ + common-ferris-out-of-proc-notification-deamon.cpp Daemon.cpp \ + Debug.cpp FullTextIndexer.cpp FullTextIndexer_private.hh \ + FullTextIndexerMetaInterface.cpp FullTextQuery.cpp \ + EAIndexer.cpp EAIndexer_private.hh EAQuery.cpp \ + FerrisAsTextPlugin.hh FerrisAsTextPlugin.cpp \ + FerrisCreationPlugin.hh FerrisCreationPlugin.cpp \ + FerrisEAGeneratorPlugin.hh FerrisEAGeneratorPlugin.cpp \ + FerrisEAGeneratorPlugin_private.hh FCA.cpp FullTextContext.cpp \ + FullTextContext.hh EAQueryContext.cpp EAQueryContext.hh \ + RPM.cpp RPM_private.hh RPMContext.cpp RPMContext_private.hh \ + SpiritTime.cpp SchemaSupport.cpp SchemaManips.cpp \ + Medallion.cpp Medallion_private.hh Cache.cpp \ + EtagereContext.cpp EtagereContext_private.hh \ + FerrisDevContext.cpp FerrisDevContext_private.hh \ + FerrisGPGContext.cpp FerrisGPGContext_private.hh FerrisGPG.cpp \ + FerrisGPG_private.hh Personalities.cpp Agent.cpp \ + Agent_private.hh XQillaContext.cpp XQillaContext_private.hh \ + XQilla_private.hh XQilla.cpp AgentSVMLight.cpp \ + FerrisRDFCore.cpp FerrisRDFCore.hh FerrisSemantic.cpp \ + FerrisSemantic.hh DublinCore.cpp BranchContext_private.hh \ + BranchContext.cpp BranchContext_Clients.cpp \ + BranchRemembranceHistoryInternalContext.cpp \ + EAIndexerSQLCommon_private.hh EAIndexerSQLCommon.cpp \ + EAIndexerCustomFerris.cpp FullTextIndexerCustomFerris.cpp \ + EAIndexerMetaInterface.cpp FactoriesCreationCommon_private.hh \ + FactoriesCreationCommon_private.cpp CacheManager.cpp \ + CacheManager_private.hh SpiritFFilter.cpp \ + FerrisFileActions.cpp RemembranceContext.cpp \ + FullTextIndexerSyntheticDocID_private.hh \ + FullTextIndexerSyntheticDocID.cpp SyncDelayer.cpp \ + FerrisBoost.cpp FerrisCLucene.hh WrapXMMS.cpp \ + MetadataServer.cpp MetadataServer_private.hh FSParser.cpp \ + FSParser_private.hh DBus.cpp DBus_private.hh FerrisCurl.cpp \ + FerrisCurl_private.hh ForwardEAIndexInterface.hh \ + ForwardEAIndexInterface.cpp FerrisSlaveProcess.cpp \ + FerrisSlaveProcess_private.hh FerrisQt.cpp FerrisQt_private.hh \ + FerrisWebServices.cpp FerrisWebServices_private.hh \ + TimeDelayedAction.cpp +@HAVE_XML4C_TRUE@am__objects_1 = FerrisDOM.lo libferrisxmlshared.lo +@HAVE_XALAN_TRUE@am__objects_2 = FerrisXalan.lo +@HAVE_LIBPQXX_TRUE@am__objects_3 = FCA.lo +@FERRIS_HAVE_LIBRPM_TRUE@am__objects_4 = RPMContext.lo +@FERRIS_HAVE_GPGME_TRUE@am__objects_5 = FerrisGPGContext.lo +@HAVE_XQILLA_TRUE@am__objects_6 = XQillaContext.lo XQilla.lo +@HAVE_SVMLIGHT_TRUE@am__objects_7 = AgentSVMLight.lo +@HAVE_XMMS_TRUE@am__objects_8 = WrapXMMS.lo +@HAVE_DBUS_TRUE@am__objects_9 = DBus.lo +@HAVE_CURL_TRUE@am__objects_10 = FerrisCurl.lo +am_libferris_la_OBJECTS = mocimpls.lo Ferris.lo Image.lo Versioned.lo \ + Native.lo ContextContext.lo RootContext.lo FerrisException.lo \ + SignalStreams.lo FerrisHandle.lo FerrisEvent.lo timber.lo \ + Enamel.lo SM.lo MatchedEAGenerators.lo General.lo \ + FilteredContext.lo Regex.lo FerrisContextPlugin.lo \ + FerrisOpenSSL.lo Context.lo FerrisPopt.lo ContextPopt.lo \ + Runner.lo Ferrisls.lo Ferrisls_RDF.lo Ferrisls_XML.lo \ + Attribute.lo Resolver.lo Math.lo Ferrisls_AggregateData.lo \ + ChainedViewContext.lo $(am__objects_1) $(am__objects_2) \ + xfsutil.lo EAN.lo FerrisBackup.lo StatfsUtilities.lo \ + FerrisCopy.lo FerrisRemove.lo LinkContextScheme.lo \ + LinkContextSchemeClients.lo FerrisMove.lo ClipAPI.lo \ + CursorAPI.lo Configuration.lo FerrisVersioning.lo \ + ContextIterator.lo ContextSetCompare.lo Shell.lo Mime.lo \ + FerrisKDE.lo ChildStreamServer.lo AsyncIO.lo Chmod.lo \ + PluginOutOfProcNotificationEngine.lo \ + common-ferris-out-of-proc-notification-deamon.lo Daemon.lo \ + Debug.lo FullTextIndexer.lo FullTextIndexerMetaInterface.lo \ + FullTextQuery.lo EAIndexer.lo EAQuery.lo FerrisAsTextPlugin.lo \ + FerrisCreationPlugin.lo FerrisEAGeneratorPlugin.lo \ + $(am__objects_3) FullTextContext.lo EAQueryContext.lo RPM.lo \ + $(am__objects_4) SpiritTime.lo SchemaSupport.lo \ + SchemaManips.lo Medallion.lo Cache.lo EtagereContext.lo \ + FerrisDevContext.lo $(am__objects_5) FerrisGPG.lo \ + Personalities.lo Agent.lo $(am__objects_6) $(am__objects_7) \ + FerrisRDFCore.lo FerrisSemantic.lo DublinCore.lo \ + BranchContext.lo BranchContext_Clients.lo \ + BranchRemembranceHistoryInternalContext.lo \ + EAIndexerSQLCommon.lo EAIndexerCustomFerris.lo \ + FullTextIndexerCustomFerris.lo EAIndexerMetaInterface.lo \ + FactoriesCreationCommon_private.lo CacheManager.lo \ + SpiritFFilter.lo FerrisFileActions.lo RemembranceContext.lo \ + FullTextIndexerSyntheticDocID.lo SyncDelayer.lo FerrisBoost.lo \ + $(am__objects_8) MetadataServer.lo FSParser.lo \ + $(am__objects_9) $(am__objects_10) ForwardEAIndexInterface.lo \ + FerrisSlaveProcess.lo FerrisQt.lo FerrisWebServices.lo \ + TimeDelayedAction.lo +libferris_la_OBJECTS = $(am_libferris_la_OBJECTS) +libferris_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libferris_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_SWIG_PERL_TRUE@libferrisperl_la_DEPENDENCIES = libferris.la +am__libferrisperl_la_SOURCES_DIST = libferrisperl_wrap.cpp +@HAVE_SWIG_PERL_TRUE@am_libferrisperl_la_OBJECTS = \ +@HAVE_SWIG_PERL_TRUE@ libferrisperl_la-libferrisperl_wrap.lo +libferrisperl_la_OBJECTS = $(am_libferrisperl_la_OBJECTS) +libferrisperl_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libferrisperl_la_CXXFLAGS) $(CXXFLAGS) \ + $(libferrisperl_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_SWIG_PERL_TRUE@am_libferrisperl_la_rpath = -rpath $(libdir) +@HAVE_SWIG_PYTHON_TRUE@libferrispython_la_DEPENDENCIES = libferris.la +am__libferrispython_la_SOURCES_DIST = libferrispython_wrap.cpp +@HAVE_SWIG_PYTHON_TRUE@am_libferrispython_la_OBJECTS = libferrispython_la-libferrispython_wrap.lo +libferrispython_la_OBJECTS = $(am_libferrispython_la_OBJECTS) +libferrispython_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libferrispython_la_CXXFLAGS) $(CXXFLAGS) \ + $(libferrispython_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_SWIG_PYTHON_TRUE@am_libferrispython_la_rpath = -rpath $(libdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferris_la_SOURCES) $(libferrisperl_la_SOURCES) \ + $(libferrispython_la_SOURCES) +DIST_SOURCES = $(am__libferris_la_SOURCES_DIST) \ + $(am__libferrisperl_la_SOURCES_DIST) \ + $(am__libferrispython_la_SOURCES_DIST) +DATA = $(ocamlmodule_DATA) $(ocamlsharedlib_DATA) $(perlmodule_DATA) \ + $(pythonmodule_DATA) +am__ferrisinclude_HEADERS_DIST = Ferris.hh Versioned.hh Native.hh \ + ContextContext.hh FerrisException.hh SignalStreams.hh \ + FerrisHandle.hh FerrisEvent.hh timber.hh Enamel.hh SM.hh \ + EAGenerators.hh MatchedEAGenerators.hh General.hh \ + FilteredContext.hh Regex.hh Trimming.hh TypeDecl.hh Context.hh \ + ContextPopt.hh FerrisPopt.hh ValueRestorer.hh Runner.hh \ + Ferrisls.hh Attribute.hh Resolver.hh Math.hh \ + ChainedViewContext.hh FerrisDOM.hh BuildDependentMethods.hh \ + EAN.hh FerrisBackup.hh FerrisCopy.hh FerrisRemove.hh \ + FerrisSmartPointerChecker.hh FerrisMove.hh ClipAPI.hh \ + CursorAPI.hh Configuration.hh FerrisSTL.hh FerrisVersioning.hh \ + ContextIterator.hh ContextSetCompare.hh Shell.hh Mime.hh \ + ChildStreamServer.hh Hashing.hh AsyncIO.hh \ + Runner_FunctorType.hh Chmod.hh Daemon.hh Debug.hh Iterator.hh \ + FullTextIndexer.hh FullTextQuery.hh EAIndexer.hh EAQuery.hh \ + FCA.hh SchemaSupport.hh SchemaManips.hh Medallion.hh Cache.hh \ + Personalities.hh Agent.hh Numeric.hh DublinCore.hh \ + FullTextIndexerMetaInterface.hh All.hh \ + EAIndexerMetaInterface.hh HiddenSymbolSupport.hh \ + FerrisBitMagic.hh FerrisStdHashMap.hh FerrisFileActions.hh \ + SyncDelayer.hh FerrisBoost.hh WrapXMMS.hh ContextPlugin.hh \ + Ferrisls_AggregateData.hh FerrisSlaveProcess.hh \ + TimeDelayedAction.hh +HEADERS = $(ferrisinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @LOKI_CFLAGS@ \ + @FSTREAM_CFLAGS@ \ + -I/usr/local/witme-file-3.35/include \ + @FAMPP2_CFLAGS@ \ + @XML4C_CFLAGS@ \ + @XALAN_CFLAGS@ \ + @DB4_CFLAGS@ \ + @GNOMEVFS_CFLAGS@ \ + @LIBFILE_CFLAGS@ \ + @EFSD_CFLAGS@ \ + @KDE_CFLAGS@ \ + @LIBMAGIC_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @LIBZ_CFLAGS@ \ + @BZIP2_CFLAGS@ \ + @STLDB4_CFLAGS@ \ + @LIBRPM_CFLAGS@ \ + @XQILLA_CFLAGS@ \ + @SOPRANO_CFLAGS@ \ + @NEPOMUK_CFLAGS@ \ + @LIBPQXX_CFLAGS@ \ + @LIBTEXTCAT_CFLAGS@ \ + @GPGME_CFLAGS@ \ + @BOOST_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @DBUS_CFLAGS@ \ + @IMLIB_CFLAGS@ \ + @QTDBUS_CFLAGS@ \ + @LIBSELINUX_CFLAGS@ \ + @CURL_CFLAGS@ \ + @XERCES_INTERNAL_HEADERS_CFLAGS@ \ + @QTNETWORK_CFLAGS@ \ + @CFLAGS@ + +@HAVE_XML4C_TRUE@XMLHH = FerrisDOM.hh +@HAVE_XML4C_TRUE@XMLCPP = FerrisDOM.cpp FerrisDOM_private.hh libferrisxmlshared.cpp libferrisxmlshared.hh +@HAVE_XALAN_TRUE@XALANCPP = FerrisXalan_private.hh FerrisXalan.cpp +@FERRIS_HAVE_LIBRPM_TRUE@LIBRPM_FILES = RPMContext.cpp RPMContext_private.hh +@HAVE_CURL_TRUE@CURL_FILES = FerrisCurl.cpp FerrisCurl_private.hh +@HAVE_XQILLA_TRUE@XQILLA_DEP_SRCS = XQillaContext.cpp XQillaContext_private.hh XQilla_private.hh XQilla.cpp +@HAVE_SVMLIGHT_TRUE@SVMLIGHT_DEP_SRCS = AgentSVMLight.cpp +@FERRIS_HAVE_GPGME_TRUE@GPG_DEP_SRCS = FerrisGPGContext.cpp FerrisGPGContext_private.hh +@HAVE_XMMS_TRUE@XMMS_DEP_SOURCES = WrapXMMS.cpp +@HAVE_LIBPQXX_TRUE@FCA_PQXX_DEP_SOURCES = FCA.cpp + +#COMMON_GCJFLAGS = --encoding=ISO-8859-1 -Wno-deprecated +#BUILT_SOURCES = MyAnalyzer.h +#%.h: %.java +# $(GCJ) -C $(COMMON_GCJFLAGS) $(AM_GCJFLAGS) $(GCJFLAGS) $< +# gcjh --classpath `pwd` `echo $< | sed "s/.java//g"`; + +############################## +############################## +############################## +@HAVE_SWIG_PERL_TRUE@SWIG_PERL_LTLIBNAMES = libferrisperl.la + +#-proxy -shadow +@HAVE_SWIG_PERL_TRUE@libferrisperl_la_SOURCES = libferrisperl_wrap.cpp +@HAVE_SWIG_PERL_TRUE@libferrisperl_la_LIBADD = libferris.la +@HAVE_SWIG_PERL_TRUE@libferrisperl_la_CXXFLAGS = \ +@HAVE_SWIG_PERL_TRUE@ $(INCLUDES) \ +@HAVE_SWIG_PERL_TRUE@ `perl -MExtUtils::Embed -e ccopts -e ldopts` \ +@HAVE_SWIG_PERL_TRUE@ @SWIG_PERL_CFLAGS@ + +@HAVE_SWIG_PERL_TRUE@libferrisperl_la_LDFLAGS = \ +@HAVE_SWIG_PERL_TRUE@ -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ \ +@HAVE_SWIG_PERL_TRUE@ `perl -MExtUtils::Embed -e ccopts -e ldopts` + +@HAVE_SWIG_PERL_TRUE@perlmoduledir = @SWIG_PERL_PMDIR@ +@HAVE_SWIG_PERL_TRUE@perlmodule_DATA = libferrisperl.pm + +############################## +############################## +############################## +@HAVE_SWIG_PYTHON_TRUE@SWIG_PYTHON_LTLIBNAMES = libferrispython.la +@HAVE_SWIG_PYTHON_TRUE@libferrispython_la_SOURCES = libferrispython_wrap.cpp +@HAVE_SWIG_PYTHON_TRUE@libferrispython_la_LIBADD = libferris.la +@HAVE_SWIG_PYTHON_TRUE@libferrispython_la_CXXFLAGS = \ +@HAVE_SWIG_PYTHON_TRUE@ $(INCLUDES) \ +@HAVE_SWIG_PYTHON_TRUE@ @SWIG_PYTHON_CFLAGS@ + +@HAVE_SWIG_PYTHON_TRUE@libferrispython_la_LDFLAGS = \ +@HAVE_SWIG_PYTHON_TRUE@ -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + +@HAVE_SWIG_PYTHON_TRUE@pythonmoduledir = @SWIG_PYTHON_MODULEDIR@ +@HAVE_SWIG_PYTHON_TRUE@pythonmodule_DATA = libferrispython.py +@HAVE_SWIG_OCAML_TRUE@ocamlsharedlibdir = @LIBDIR@ +@HAVE_SWIG_OCAML_TRUE@ocamlsharedlib_DATA = libferrisocaml.so +@HAVE_SWIG_OCAML_TRUE@SWIG_OCAML_LTLIBNAMES = +#SWIG_OCAML_LTLIBNAMES = libferrisocaml.la +#libferrisocaml_la_SOURCES = libferrisocaml_wrap.o +#libferrisocaml_la_LIBADD = libferris.la +#libferrisocaml_la_CXXFLAGS = \ +# $(INCLUDES) \ +# @SWIG_OCAML_CFLAGS@ + +#libferrisocaml_la_LDFLAGS = \ +# -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ +@HAVE_SWIG_OCAML_TRUE@ocamlmoduledir = @SWIG_OCAML_HEADERDIR@ +@HAVE_SWIG_OCAML_TRUE@ocamlmodule_DATA = libferrisocaml.cmi libferrisocaml.cmo + +################################################################### +################################################################### +################################################################### +@HAVE_DBUS_TRUE@DBUS_SOURCES = DBus.cpp DBus_private.hh +lib_LTLIBRARIES = libferris.la \ + $(SWIG_PERL_LTLIBNAMES) $(SWIG_PYTHON_LTLIBNAMES) \ + $(SWIG_OCAML_LTLIBNAMES) + +EXTRA_DIST = libferris.i \ + libferrisperl.i \ + perl_std_list.i \ + libferrispython.i \ + libferrisocaml.i \ + libferrisocaml_wrap.c + +BUILT_SOURCES = libferrisperl_wrap.cpp libferrispython_wrap.cpp libferrisocaml_wrap.c + +# libferrispython.py libferrisperl.pm libferrisocaml.cmi libferrisocaml.cmo +ferrisincludedir = $(includedir)/Ferris +ferrisinclude_HEADERS = \ + Ferris.hh \ + Versioned.hh \ + Native.hh \ + ContextContext.hh \ + FerrisException.hh \ + SignalStreams.hh \ + FerrisHandle.hh \ + FerrisEvent.hh \ + timber.hh \ + Enamel.hh \ + SM.hh \ + EAGenerators.hh \ + MatchedEAGenerators.hh \ + General.hh \ + FilteredContext.hh \ + Regex.hh \ + Trimming.hh \ + TypeDecl.hh \ + Context.hh \ + ContextPopt.hh \ + FerrisPopt.hh \ + ValueRestorer.hh \ + Runner.hh \ + Ferrisls.hh \ + Attribute.hh \ + Resolver.hh \ + Math.hh \ + ChainedViewContext.hh \ + $(XMLHH) \ + BuildDependentMethods.hh \ + EAN.hh \ + FerrisBackup.hh \ + FerrisCopy.hh \ + FerrisRemove.hh \ + FerrisSmartPointerChecker.hh \ + FerrisMove.hh \ + ClipAPI.hh \ + CursorAPI.hh \ + Configuration.hh \ + FerrisSTL.hh \ + FerrisVersioning.hh \ + ContextIterator.hh \ + ContextSetCompare.hh \ + Shell.hh \ + Mime.hh \ + ChildStreamServer.hh \ + Hashing.hh \ + AsyncIO.hh \ + Runner_FunctorType.hh \ + Chmod.hh \ + Daemon.hh \ + Debug.hh \ + Iterator.hh \ + FullTextIndexer.hh \ + FullTextQuery.hh \ + EAIndexer.hh \ + EAQuery.hh \ + FCA.hh \ + SchemaSupport.hh \ + SchemaManips.hh \ + Medallion.hh \ + Cache.hh \ + Personalities.hh \ + Agent.hh \ + Numeric.hh \ + DublinCore.hh \ + FullTextIndexerMetaInterface.hh \ + All.hh \ + EAIndexerMetaInterface.hh \ + HiddenSymbolSupport.hh \ + FerrisBitMagic.hh \ + FerrisStdHashMap.hh \ + FerrisFileActions.hh \ + SyncDelayer.hh \ + FerrisBoost.hh \ + WrapXMMS.hh \ + ContextPlugin.hh \ + Ferrisls_AggregateData.hh \ + FerrisSlaveProcess.hh \ + TimeDelayedAction.hh + +libferris_la_SOURCES = \ + mocimpls.cpp \ + Ferris.cpp \ + Ferris_private.hh \ + Image.cpp \ + Image_private.hh \ + Versioned.cpp \ + Native.cpp \ + ContextContext.cpp \ + RootContext.cpp \ + RootContext_private.hh \ + FerrisException.cpp \ + SignalStreams.cpp \ + FerrisHandle.cpp \ + FerrisEvent.cpp \ + timber.cpp \ + Enamel.cpp \ + Enamel_priv.hh \ + SM.cpp \ + SM_private.hh \ + MatchedEAGenerators.cpp \ + General.cpp \ + FilteredContext.cpp \ + Regex.cpp \ + FerrisContextPlugin.cpp \ + FerrisOpenSSL.cpp \ + Context.cpp \ + Context_private.hh \ + FerrisPopt.cpp \ + ContextPopt.cpp \ + Runner.cpp \ + Ferrisls.cpp \ + Ferrisls_RDF.cpp \ + Ferrisls_XML.cpp \ + Attribute.cpp \ + Attribute_private.hh \ + FilteredContext_private.hh \ + Resolver.cpp \ + Resolver_private.hh \ + Math.cpp \ + Ferrisls_AggregateData.cpp \ + ChainedViewContext.cpp \ + FerrisOpenSSL.hh \ + MainPageDocs.hh \ + $(XMLCPP) \ + $(XALANCPP) \ + xfsutil.cpp \ + xfsutil.hh \ + EAN.cpp \ + FerrisBackup.cpp \ + StatfsUtilities.cpp \ + StatfsUtilities.hh \ + FerrisCopy.cpp \ + FerrisCopy_private.hh \ + FerrisRemove.cpp \ + FerrisRemove_private.hh \ + LinkContextScheme.cpp \ + LinkContextScheme.hh \ + LinkContextSchemeClients.cpp \ + LinkContextSchemeClients.hh \ + FerrisMove.cpp \ + ClipAPI.cpp \ + CursorAPI.cpp \ + Configuration.cpp \ + Configuration_private.hh \ + FerrisVersioning.cpp \ + ContextIterator.cpp \ + ContextSetCompare.cpp \ + ContextSetCompare_private.hh \ + Shell.cpp \ + Mime.cpp \ + FerrisKDE.cpp FerrisKDE.hh \ + ChildStreamServer.cpp \ + AsyncIO.cpp \ + Chmod.cpp \ + PluginOutOfProcNotificationEngine.hh \ + PluginOutOfProcNotificationEngine.cpp \ + common-ferris-out-of-proc-notification-deamon.hh \ + common-ferris-out-of-proc-notification-deamon.cpp \ + Daemon.cpp \ + Debug.cpp \ + FullTextIndexer.cpp \ + FullTextIndexer_private.hh \ + FullTextIndexerMetaInterface.cpp \ + FullTextQuery.cpp \ + EAIndexer.cpp \ + EAIndexer_private.hh \ + FullTextIndexer_private.hh \ + EAQuery.cpp \ + FerrisAsTextPlugin.hh \ + FerrisAsTextPlugin.cpp \ + FerrisCreationPlugin.hh \ + FerrisCreationPlugin.cpp \ + FerrisEAGeneratorPlugin.hh \ + FerrisEAGeneratorPlugin.cpp \ + FerrisEAGeneratorPlugin_private.hh \ + $(FCA_PQXX_DEP_SOURCES) \ + FullTextContext.cpp \ + FullTextContext.hh \ + EAQueryContext.cpp \ + EAQueryContext.hh \ + RPM.cpp \ + RPM_private.hh \ + $(LIBRPM_FILES) \ + SpiritTime.cpp \ + SchemaSupport.cpp \ + SchemaManips.cpp \ + Medallion.cpp \ + Medallion_private.hh \ + Cache.cpp \ + EtagereContext.cpp \ + EtagereContext_private.hh \ + FerrisDevContext.cpp \ + FerrisDevContext_private.hh \ + $(GPG_DEP_SRCS) \ + FerrisGPG.cpp FerrisGPG_private.hh \ + Personalities.cpp \ + Agent.cpp \ + Agent_private.hh \ + $(XQILLA_DEP_SRCS) \ + $(SVMLIGHT_DEP_SRCS) \ + FerrisRDFCore.cpp FerrisRDFCore.hh \ + FerrisSemantic.cpp FerrisSemantic.hh \ + DublinCore.cpp \ + BranchContext_private.hh BranchContext.cpp BranchContext_Clients.cpp \ + BranchRemembranceHistoryInternalContext.cpp \ + EAIndexerSQLCommon_private.hh \ + EAIndexerSQLCommon.cpp \ + EAIndexerCustomFerris.cpp \ + FullTextIndexerCustomFerris.cpp \ + EAIndexerMetaInterface.cpp \ + FactoriesCreationCommon_private.hh \ + FactoriesCreationCommon_private.cpp \ + CacheManager.cpp \ + CacheManager_private.hh \ + SpiritFFilter.cpp \ + FerrisFileActions.cpp \ + RemembranceContext.cpp \ + FullTextIndexerSyntheticDocID_private.hh \ + FullTextIndexerSyntheticDocID.cpp \ + SyncDelayer.cpp \ + FerrisBoost.cpp \ + FerrisCLucene.hh \ + $(XMMS_DEP_SOURCES) \ + MetadataServer.cpp MetadataServer_private.hh \ + FSParser.cpp FSParser_private.hh \ + $(DBUS_SOURCES) \ + $(CURL_FILES) \ + ForwardEAIndexInterface.hh ForwardEAIndexInterface.cpp \ + FerrisSlaveProcess.cpp FerrisSlaveProcess_private.hh \ + FerrisQt.cpp FerrisQt_private.hh \ + FerrisWebServices.cpp FerrisWebServices_private.hh \ + TimeDelayedAction.cpp + +libferris_la_LIBADD = \ + -lfam -lfampp \ + -lcrypto -lssl \ + @LOKI_LIBS@ \ + @FSTREAM_LIBS@ \ + @XML4C_LIBS@ \ + @XALAN_LIBS@ \ + @STLPORT_LIB@ \ + @DB4_LIBS@ \ + @GNOMEVFS_LIBS@ \ + @LIBFILE_LIBS@ \ + @EFSD_LIBS@ \ + @KDE_LIBS@ \ + @LIBMAGIC_LIBS@ \ + @LIBCAP_LIBS@ \ + @OPENSSL_LIBS@ \ + @LIBZ_LIBS@ \ + @BZIP2_LIBS@ \ + @STLDB4_LIBS@ \ + @UUID_LIBS@ \ + @LIBRPM_LIBS@ \ + @LIBTEXTCAT_LIBS@ \ + @GPGME_LIBS@ \ + @XQILLA_LIBS@ \ + @SOPRANO_LIBS@ \ + @NEPOMUK_LIBS@ \ + @LIBPQXX_LIBS@ \ + @DBUS_LIBS@ \ + @IMLIB_LIBS@ \ + @QTDBUS_LIBS@ \ + @LIBSELINUX_LIBS@ \ + @CURL_LIBS@ \ + -lpopt \ + @BOOST_LIBS@ + +libferris_la_LDFLAGS = \ + @GLIB_LIBS@ \ + @FAMPP2_LIBS@ \ + @CUSTOMALLOC_LA@ \ + @LIBFERRISMG_LA@ \ + @LIBFERRISINDEXING_LA@ \ + @LIBASTEXT_PLUGIN_FACTORIES_LA@ \ + @LIBCREATION_PLUGIN_FACTORIES_LA@ \ + @LIBEAGEN_PLUGIN_FACTORIES_LA@ \ + @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ @MAGICK_LIBS@ \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Ferris/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Ferris/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +BuildDependentMethods.hh: $(top_builddir)/config.status $(srcdir)/BuildDependentMethods.hh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +FerrisSmartPointerChecker.hh: $(top_builddir)/config.status $(srcdir)/FerrisSmartPointerChecker.hh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +SchemaSupport.hh: $(top_builddir)/config.status $(srcdir)/SchemaSupport.hh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferris.la: $(libferris_la_OBJECTS) $(libferris_la_DEPENDENCIES) + $(libferris_la_LINK) -rpath $(libdir) $(libferris_la_OBJECTS) $(libferris_la_LIBADD) $(LIBS) +libferrisperl.la: $(libferrisperl_la_OBJECTS) $(libferrisperl_la_DEPENDENCIES) + $(libferrisperl_la_LINK) $(am_libferrisperl_la_rpath) $(libferrisperl_la_OBJECTS) $(libferrisperl_la_LIBADD) $(LIBS) +libferrispython.la: $(libferrispython_la_OBJECTS) $(libferrispython_la_DEPENDENCIES) + $(libferrispython_la_LINK) $(am_libferrispython_la_rpath) $(libferrispython_la_OBJECTS) $(libferrispython_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Agent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AgentSVMLight.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AsyncIO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Attribute.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BranchContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BranchContext_Clients.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BranchRemembranceHistoryInternalContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CacheManager.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChainedViewContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChildStreamServer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Chmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClipAPI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Configuration.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ContextContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ContextIterator.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ContextPopt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ContextSetCompare.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CursorAPI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DBus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Daemon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Debug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DublinCore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAIndexer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAIndexerCustomFerris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAIndexerMetaInterface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAIndexerSQLCommon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAN.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAQuery.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EAQueryContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Enamel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EtagereContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FCA.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FSParser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FactoriesCreationCommon_private.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ferris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisAsTextPlugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisBackup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisBoost.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisContextPlugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisCopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisCreationPlugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisCurl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisDOM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisDevContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisEAGeneratorPlugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisEvent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisException.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisFileActions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisGPG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisGPGContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisHandle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisKDE.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisMove.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisOpenSSL.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisPopt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisQt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisRDFCore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisRemove.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisSemantic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisSlaveProcess.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisVersioning.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisWebServices.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisXalan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ferrisls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ferrisls_AggregateData.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ferrisls_RDF.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ferrisls_XML.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FilteredContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ForwardEAIndexInterface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextIndexer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextIndexerCustomFerris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextIndexerMetaInterface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextIndexerSyntheticDocID.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FullTextQuery.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/General.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LinkContextScheme.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LinkContextSchemeClients.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MatchedEAGenerators.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Math.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Medallion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MetadataServer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mime.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Native.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Personalities.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PluginOutOfProcNotificationEngine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RPM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RPMContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Regex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RemembranceContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Resolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RootContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Runner.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SchemaManips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SchemaSupport.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SignalStreams.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpiritFFilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpiritTime.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StatfsUtilities.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SyncDelayer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TimeDelayedAction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Versioned.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WrapXMMS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XQilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XQillaContext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common-ferris-out-of-proc-notification-deamon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libferrisperl_la-libferrisperl_wrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libferrispython_la-libferrispython_wrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libferrisxmlshared.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mocimpls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timber.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfsutil.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +libferrisperl_la-libferrisperl_wrap.lo: libferrisperl_wrap.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libferrisperl_la_CXXFLAGS) $(CXXFLAGS) -MT libferrisperl_la-libferrisperl_wrap.lo -MD -MP -MF $(DEPDIR)/libferrisperl_la-libferrisperl_wrap.Tpo -c -o libferrisperl_la-libferrisperl_wrap.lo `test -f 'libferrisperl_wrap.cpp' || echo '$(srcdir)/'`libferrisperl_wrap.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libferrisperl_la-libferrisperl_wrap.Tpo $(DEPDIR)/libferrisperl_la-libferrisperl_wrap.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='libferrisperl_wrap.cpp' object='libferrisperl_la-libferrisperl_wrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libferrisperl_la_CXXFLAGS) $(CXXFLAGS) -c -o libferrisperl_la-libferrisperl_wrap.lo `test -f 'libferrisperl_wrap.cpp' || echo '$(srcdir)/'`libferrisperl_wrap.cpp + +libferrispython_la-libferrispython_wrap.lo: libferrispython_wrap.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libferrispython_la_CXXFLAGS) $(CXXFLAGS) -MT libferrispython_la-libferrispython_wrap.lo -MD -MP -MF $(DEPDIR)/libferrispython_la-libferrispython_wrap.Tpo -c -o libferrispython_la-libferrispython_wrap.lo `test -f 'libferrispython_wrap.cpp' || echo '$(srcdir)/'`libferrispython_wrap.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libferrispython_la-libferrispython_wrap.Tpo $(DEPDIR)/libferrispython_la-libferrispython_wrap.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='libferrispython_wrap.cpp' object='libferrispython_la-libferrispython_wrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libferrispython_la_CXXFLAGS) $(CXXFLAGS) -c -o libferrispython_la-libferrispython_wrap.lo `test -f 'libferrispython_wrap.cpp' || echo '$(srcdir)/'`libferrispython_wrap.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ocamlmoduleDATA: $(ocamlmodule_DATA) + @$(NORMAL_INSTALL) + test -z "$(ocamlmoduledir)" || $(MKDIR_P) "$(DESTDIR)$(ocamlmoduledir)" + @list='$(ocamlmodule_DATA)'; test -n "$(ocamlmoduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ocamlmoduledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(ocamlmoduledir)" || exit $$?; \ + done + +uninstall-ocamlmoduleDATA: + @$(NORMAL_UNINSTALL) + @list='$(ocamlmodule_DATA)'; test -n "$(ocamlmoduledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ocamlmoduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ocamlmoduledir)" && rm -f $$files +install-ocamlsharedlibDATA: $(ocamlsharedlib_DATA) + @$(NORMAL_INSTALL) + test -z "$(ocamlsharedlibdir)" || $(MKDIR_P) "$(DESTDIR)$(ocamlsharedlibdir)" + @list='$(ocamlsharedlib_DATA)'; test -n "$(ocamlsharedlibdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ocamlsharedlibdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(ocamlsharedlibdir)" || exit $$?; \ + done + +uninstall-ocamlsharedlibDATA: + @$(NORMAL_UNINSTALL) + @list='$(ocamlsharedlib_DATA)'; test -n "$(ocamlsharedlibdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ocamlsharedlibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ocamlsharedlibdir)" && rm -f $$files +install-perlmoduleDATA: $(perlmodule_DATA) + @$(NORMAL_INSTALL) + test -z "$(perlmoduledir)" || $(MKDIR_P) "$(DESTDIR)$(perlmoduledir)" + @list='$(perlmodule_DATA)'; test -n "$(perlmoduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(perlmoduledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(perlmoduledir)" || exit $$?; \ + done + +uninstall-perlmoduleDATA: + @$(NORMAL_UNINSTALL) + @list='$(perlmodule_DATA)'; test -n "$(perlmoduledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(perlmoduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(perlmoduledir)" && rm -f $$files +install-pythonmoduleDATA: $(pythonmodule_DATA) + @$(NORMAL_INSTALL) + test -z "$(pythonmoduledir)" || $(MKDIR_P) "$(DESTDIR)$(pythonmoduledir)" + @list='$(pythonmodule_DATA)'; test -n "$(pythonmoduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonmoduledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonmoduledir)" || exit $$?; \ + done + +uninstall-pythonmoduleDATA: + @$(NORMAL_UNINSTALL) + @list='$(pythonmodule_DATA)'; test -n "$(pythonmoduledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pythonmoduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pythonmoduledir)" && rm -f $$files +install-ferrisincludeHEADERS: $(ferrisinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(ferrisincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ferrisincludedir)" + @list='$(ferrisinclude_HEADERS)'; test -n "$(ferrisincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ferrisincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(ferrisincludedir)" || exit $$?; \ + done + +uninstall-ferrisincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(ferrisinclude_HEADERS)'; test -n "$(ferrisincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ferrisincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ferrisincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ocamlmoduledir)" "$(DESTDIR)$(ocamlsharedlibdir)" "$(DESTDIR)$(perlmoduledir)" "$(DESTDIR)$(pythonmoduledir)" "$(DESTDIR)$(ferrisincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@HAVE_SWIG_PYTHON_FALSE@install-exec-local: +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-ferrisincludeHEADERS install-ocamlmoduleDATA \ + install-ocamlsharedlibDATA install-perlmoduleDATA \ + install-pythonmoduleDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-exec-local install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-ferrisincludeHEADERS uninstall-libLTLIBRARIES \ + uninstall-ocamlmoduleDATA uninstall-ocamlsharedlibDATA \ + uninstall-perlmoduleDATA uninstall-pythonmoduleDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-ferrisincludeHEADERS install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-ocamlmoduleDATA install-ocamlsharedlibDATA \ + install-pdf install-pdf-am install-perlmoduleDATA install-ps \ + install-ps-am install-pythonmoduleDATA install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-ferrisincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-ocamlmoduleDATA \ + uninstall-ocamlsharedlibDATA uninstall-perlmoduleDATA \ + uninstall-pythonmoduleDATA + +%_moc.cpp: %.hh + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +%_moc_impl.cpp: %.cpp + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +# have to make these! +# FerrisWebServices_private_moc.cpp FerrisQt_moc_impl.cpp +mocimpls.cpp: FerrisWebServices_private_moc.cpp FerrisQt_moc_impl.cpp MetadataServer_moc_impl.cpp + touch mocimpls.cpp +@HAVE_SWIG_PERL_TRUE@libferrisperl_wrap.cpp libferrisperl.pm: libferrisperl.i +@HAVE_SWIG_PERL_TRUE@ swig -c++ -DLIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER \ +@HAVE_SWIG_PERL_TRUE@ -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags | sed s/-pthread//g ` \ +@HAVE_SWIG_PERL_TRUE@ -perl5 -module libferrisperl -o $(srcdir)/libferrisperl_wrap.cpp $(srcdir)/libferrisperl.i +@HAVE_SWIG_PYTHON_TRUE@libferrispython_wrap.cpp: libferrispython.i +@HAVE_SWIG_PYTHON_TRUE@ swig -c++ -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags` \ +@HAVE_SWIG_PYTHON_TRUE@ -python -module libferrispython -o libferrispython_wrap.cpp libferrispython.i +@HAVE_SWIG_PYTHON_TRUE@libferrispython.py: libferrispython_wrap.cpp + +@HAVE_SWIG_PYTHON_TRUE@install-exec-local: +@HAVE_SWIG_PYTHON_TRUE@ cd @SWIG_PYTHON_LIBDIR@; \ +@HAVE_SWIG_PYTHON_TRUE@ cp $(LIBDIR)/libferrispython.so _libferrispython.so; \ +@HAVE_SWIG_PYTHON_TRUE@ mv $(LIBDIR)/libferrispython.so* /tmp; \ +@HAVE_SWIG_PYTHON_TRUE@ mv $(LIBDIR)/libferrispython.la /tmp; + +############################## +############################## +############################## + +@HAVE_SWIG_OCAML_TRUE@libferrisocaml_wrap.c: libferrisocaml.i libferris.i +@HAVE_SWIG_OCAML_TRUE@ swig -c++ -DLIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER -I/usr/local/include -I/usr/include `pkg-config gtk+-2.0 ferrisstreams --cflags` \ +@HAVE_SWIG_OCAML_TRUE@ -ocaml -module libferrisocaml -o libferrisocaml_wrap.cpp libferrisocaml.i +@HAVE_SWIG_OCAML_TRUE@ echo "#include " >|libferrisocaml_wrap.c +@HAVE_SWIG_OCAML_TRUE@ cat libferrisocaml_wrap.cpp >>libferrisocaml_wrap.c + +@HAVE_SWIG_OCAML_TRUE@libferrisocaml.so: libferrisocaml_wrap.c +@HAVE_SWIG_OCAML_TRUE@ ocamlc -cc 'g++' -g -c -ccopt "-I." -ccopt "$(SIGC_CFLAGS)" -ccopt "$(LOKI_CFLAGS)" -ccopt "$(GLIB_CFLAGS)" -ccopt "$(STLDB4_CFLAGS)" -ccopt "$(OPENSSL_CFLAGS)" -ccopt "$(SWIG_OCAML_CFLAGS)" -ccopt -g -ccopt "-xc++ " libferrisocaml_wrap.c +@HAVE_SWIG_OCAML_TRUE@ g++ -shared -o libferrisocaml.so libferrisocaml_wrap.o \ +@HAVE_SWIG_OCAML_TRUE@$(SIGC_LIBS) $(LOKI_LIBS) $(GLIB_LIBS) $(STLDB4_LIBS) $(OPENSSL_LIBS) +@HAVE_SWIG_OCAML_TRUE@ OCAMLRUNPARAM="l=32000000" ocamldlgen \ +@HAVE_SWIG_OCAML_TRUE@ libferrisocaml.ml libferrisocaml.so > libferrisocaml_dynamic.ml +@HAVE_SWIG_OCAML_TRUE@ mv -f libferrisocaml_dynamic.ml libferrisocaml.ml +@HAVE_SWIG_OCAML_TRUE@ OCAMLRUNPARAM="l=32000000" ocamlfind \ +@HAVE_SWIG_OCAML_TRUE@ ocamlc -g -c -package dl libferrisocaml.ml + +@HAVE_SWIG_OCAML_TRUE@libferrisocaml.cmi: libferrisocaml.so +@HAVE_SWIG_OCAML_TRUE@libferrisocaml.cmo: libferrisocaml.so + +########################################################################## +########################################################################## +########################################################################## + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Ferris/MatchedEAGenerators.cpp b/Ferris/MatchedEAGenerators.cpp new file mode 100644 index 0000000..4f053dd --- /dev/null +++ b/Ferris/MatchedEAGenerators.cpp @@ -0,0 +1,874 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MatchedEAGenerators.cpp,v 1.5 2010/09/24 21:30:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +// #ifdef HAVE_MAGICK +// #include +// #endif + +using namespace std; + +namespace Ferris +{ + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + bool + AttributeCreator::supportsCreateForContext( fh_context c ) + { + return false; + } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +MatchedEAGeneratorFactory::MatchedEAGeneratorFactory( const fh_matcher& ma ) + : + theMatcher(ma) +{ +} + +MatchedEAGeneratorFactory::MatchedEAGeneratorFactory() +{ +} + +bool +MatchedEAGeneratorFactory::hasInterest( const fh_context& ctx ) +{ + return theMatcher( ctx ); +} + + +void +MatchedEAGeneratorFactory::tryBrew( const fh_context& ctx ) +{ +// cerr << "tryBrew " +// << " ctx name:" << ctx->getDirName() +// << " ctx path:" << ctx->getDirPath() +// << endl; + + if( hasInterest( ctx ) ) + { +// cerr << "matcher is GOOD for ctx:" << ctx->getURL() << endl; + Brew( ctx ); + } +} + +bool +MatchedEAGeneratorFactory::isDynamic() +{ + return false; +} + +bool +MatchedEAGeneratorFactory::hasState() +{ + return false; +} + + + +bool +MatchedEAGeneratorFactory::tryBrew( const fh_context& ctx, const std::string& eaname ) +{ + return false; +} + +AttributeCreator::CreatePri_t +MatchedEAGeneratorFactory::getCreatePriority() +{ + return CREATE_PRI_NOT_SUPPORTED; +} + +fh_attribute +MatchedEAGeneratorFactory::CreateAttr( + const fh_context& a, + const string& rdn, + fh_context md ) + throw( + FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported + ) +{ + ostringstream ss; + ss << "MatchedEAGeneratorFactory::CreateAttr() operation not supported rdn:" << rdn; + Throw_FerrisCreateAttributeNotSupported( tostr(ss), 0 ); +} + +void +MatchedEAGeneratorFactory::augmentRecommendedEA( const fh_context& a, fh_stringstream& ss ) +{ +} + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +#include + +void +GModuleMatchedEAGeneratorFactory::ensureGModuleIsLoaded() +{ + if( !ghandle ) + { + LG_PLUGIN_I << "Linking in implementaion of:" << ImplName << endl; + + ghandle = g_module_open ( ImplName.c_str(), G_MODULE_BIND_LAZY); + if (!ghandle) + { + ostringstream ss; + ss << "Error, unable to open module file: " + << g_module_error () + << endl; +// cerr << tostr(ss) << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "CreateRealFactory", + (gpointer*)&CreateRealFactory)) + { + ostringstream ss; + ss << "Error, unable to resolve CreateRealFactory in module file: " + << g_module_error() + << " ImplName:" << ImplName + << endl; +// cerr << tostr(ss) << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + RealFactory = CreateRealFactory(); + } +} + + +void +GModuleMatchedEAGeneratorFactory::Brew( const fh_context& ctx ) +{ + ensureGModuleIsLoaded(); + RealFactory->Brew( ctx ); +} + +GModuleMatchedEAGeneratorFactory::GModuleMatchedEAGeneratorFactory( + const fh_matcher& ma, + const string& implname ) + : + MatchedEAGeneratorFactory( ma ), + ImplName( implname ), + ghandle( 0 ), + ghandle_factory( 0 ), + RealFactory( 0 ), + CreatePriCache( CREATE_PRI_NOT_SUPPORTED ), + module_isDynamic( 0 ), + module_hasState( 0 ), + getCreatePri( 0 ) +{ +// cerr << "GModuleMatchedEAGeneratorFactory() impl:" << implname << endl; +} + +static string getFactoryName( const string& s ) +{ + string ret = s; + ret.replace( ret.find(".so"), 3, "_factory.so" ); + return ret; +} + +void +GModuleMatchedEAGeneratorFactory::ensureFactoryModuleVTable() +{ + if( !ghandle_factory ) + { + string symbolName; + string FactoryName = getFactoryName( ImplName ); + LG_PLUGIN_D << "Linking in implementaion of:" << FactoryName << endl; + + ghandle_factory = g_module_open ( FactoryName.c_str(), G_MODULE_BIND_LAZY); + if (!ghandle_factory) + { + ostringstream ss; + ss << "Error, unable to open module file, " + << g_module_error () + << endl; + LG_PLUGIN_ER << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + + symbolName = "isDynamic"; + if(!g_module_symbol (ghandle_factory, symbolName.c_str(), (gpointer*)&module_isDynamic)) + { + LG_PLUGIN_ER << "Cant find symbol:" << symbolName + << " in module:" << FactoryName + << endl; + } + + symbolName = "hasState"; + if(!g_module_symbol (ghandle_factory, symbolName.c_str(), (gpointer*)&module_hasState)) + { + LG_PLUGIN_ER << "Cant find symbol:" << symbolName + << " in module:" << FactoryName + << endl; + } + + symbolName = "getCreatePri"; + if(!g_module_symbol (ghandle_factory, symbolName.c_str(), (gpointer*)&getCreatePri)) + { + LG_PLUGIN_ER << "Cant find symbol:" << symbolName + << " in module:" << FactoryName + << endl; + } + + } +} + + +bool +GModuleMatchedEAGeneratorFactory::tryBrew( + const fh_context& ctx, + const std::string& eaname ) +{ + ensureGModuleIsLoaded(); + return RealFactory->tryBrew( ctx, eaname ); +} + +bool +GModuleMatchedEAGeneratorFactory::isDynamic() +{ + bool ret = _Base::isDynamic(); + + ensureFactoryModuleVTable(); + if( module_isDynamic ) + { + ret = module_isDynamic(); + } + + return ret; +} + + +bool +GModuleMatchedEAGeneratorFactory::hasState() +{ + bool ret = _Base::hasState(); + + ensureFactoryModuleVTable(); + if( module_hasState ) + { + ret = module_hasState(); + } + + return ret; +} + + + + + +AttributeCreator::CreatePri_t +GModuleMatchedEAGeneratorFactory::getCreatePriority() +{ + CreatePri_t ret = _Base::getCreatePriority(); + + ensureFactoryModuleVTable(); + if( getCreatePri ) + { + ret = getCreatePri(); + } + + return ret; +} + + +fh_attribute +GModuleMatchedEAGeneratorFactory::CreateAttr( + const fh_context& a, + const string& rdn, + fh_context md ) + throw( + FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported + ) +{ + ensureGModuleIsLoaded(); + return RealFactory->CreateAttr( a, rdn, md ); +} + +bool +GModuleMatchedEAGeneratorFactory::supportsCreateForContext( fh_context c ) +{ + ensureGModuleIsLoaded(); + return RealFactory->supportsCreateForContext( c ); +} + +void +GModuleMatchedEAGeneratorFactory::augmentRecommendedEA( const fh_context& a, fh_stringstream& ss ) +{ + ensureGModuleIsLoaded(); + return RealFactory->augmentRecommendedEA( a, ss ); +} + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + + +StaticGModuleMatchedEAGeneratorFactory::StaticGModuleMatchedEAGeneratorFactory( + const fh_matcher& ma, + const std::string& implname, + const std::string& shortname, + bool isDynamic, + bool hasState, + AttributeCreator::CreatePri_t CreatePri ) + : + GModuleMatchedEAGeneratorFactory( ma, implname ), + m_shortName( shortname ), + m_isDynamic( isDynamic ), + m_hasState( hasState ) +{ + CreatePriCache = CreatePri; +} + +StaticGModuleMatchedEAGeneratorFactory* +StaticGModuleMatchedEAGeneratorFactory::clone() +{ + return new StaticGModuleMatchedEAGeneratorFactory( theMatcher, + ImplName, + m_shortName, + m_isDynamic, + m_hasState, + CreatePriCache ); +} + + +bool +StaticGModuleMatchedEAGeneratorFactory::isDynamic() +{ + return m_isDynamic; +} + +bool +StaticGModuleMatchedEAGeneratorFactory::hasState() +{ + return m_hasState; +} + +AttributeCreator::CreatePri_t +StaticGModuleMatchedEAGeneratorFactory::getCreatePriority() +{ + return CreatePriCache; +} + + const std::string& + StaticGModuleMatchedEAGeneratorFactory::getShortName() + { + return m_shortName; + } + + + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +Image::Image( fh_istream _ss ) + : + ss(_ss), + GotMetaData( false ), + rgba( 0 ), + aspect_ratio( 0 ), + is_valid( false ), + gamma(0.45455), + w(0), + h(0), + d(0), + a(0), + failed_to_load( false ) +{ +// if( !ss.get_rep() ) +// { +// stringstream ss; +// ss << "IStream is invalid!"; +// Throw_FerrisImageLoadFailed( tostr(ss), 0 ); +// } +} + +Image::~Image() +{ + freeRGBA(); +} + +void +Image::setNewWidth( guint32 v ) +{ + newWidth = v; +} + +void +Image::setNewHeight( guint32 v ) +{ + newHeight = v; +} + + + +// fh_istream +// Image::getWidthStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getWidth(); +// return ss; +// } + +// fh_iostream +// Image::getWidthIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// fh_stringstream ss; +// ss << getWidth(); +// return ss; +// } + + +// void +// Image::updateWidthFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +// { +// ss >> newWidth; +// } + +// fh_istream +// Image::getHeightStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getHeight(); +// return ss; +// } + +// fh_iostream +// Image::getHeightIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// fh_stringstream ss; +// ss << getHeight(); +// return ss; +// } + +// void +// Image::updateHeightFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +// { +// ss >> newHeight; +// } + +guint32 Image::getNewWidth() +{ + return newWidth ? newWidth : getWidth(); +} + +guint32 Image::getNewHeight() +{ + return newHeight ? newHeight : getHeight(); +} + + +// fh_istream +// Image::getDepthPerColorStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getDepthPerColor(); +// return ss; +// } + +// fh_istream +// Image::getDepthStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getDepth(); +// return ss; +// } + +// fh_istream +// Image::getGammaStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getGamma(); +// return ss; +// } + +// fh_istream +// Image::getHasAlphaStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << hasAlpha(); +// return ss; +// } + +// fh_istream +// Image::getAspectRatioStream( Context*, const std::string&, EA_Atom* attr ) +// { +// fh_stringstream ss; +// ss << getAspectRatio(); +// return ss; +// } + + +void +Image::freeRGBA() +{ + if( rgba ) + { + delete [] rgba; + rgba = 0; + } +} + +// fh_istream +// Image::getRGBAStream( Context* c, const std::string&, EA_Atom* attr ) +// { +// cerr << "Image::getRGBAStream() c:" << c->getURL() +// << " image:" << toVoid(this) +// << endl; +// fh_stringstream ss; +// int sz = getRGBASize(); +// guint32* buffer = getRGBA(); + +// cerr << "Image::getRGBAStream(2) c:" << c->getURL() +// << " image:" << toVoid(this) +// << " sz:" << sz +// << " buffer:" << toVoid(buffer) +// << endl; +// BackTrace(); + +// ss.write( (char*)buffer, sz ); +// freeRGBA(); +// ss.clear(); +// return ss; +// } + +// fh_iostream +// Image::getRGBAIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// // cerr << "Image::getRGBAIOStream() c:" << c->getURL() +// // << " image:" << toVoid(this) << endl; +// fh_stringstream ss; +// int sz = getRGBASize(); +// guint32* buffer = getRGBA(); + +// ss.write( (char*)buffer, sz ); +// freeRGBA(); +// ss.clear(); +// return ss; +// } + +// //fh_context c, fh_istream imageStream ) +// void test_saveImageData( fh_context c, fh_istream imageStream ) +// { +// // cerr << "test_saveImageData()" << endl; +// } + + +void +Image::updateFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ +// cerr << "Image::updateFromStream() c:" << c->getURL() +// << " image:" << toVoid(this) << endl; + +// cerr << "Image::updateFromStream(1) c:" << c->getDirPath() << " rdn:" << rdn << endl; + fh_context ctx = c; + fh_istream tmpxx = ss; +// test_saveImageData( c, ss ); + + priv_ensureDataLoaded(); + priv_saveImageData( ctx, ss ); +} + + + +guint32 +Image::getWidth() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return (guint32)w; +} + +guint32 +Image::getHeight() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return (guint32)h; +} + +int +Image::getDepth() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return d*3+a; +} + +int +Image::getDepthPerColor() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return d; +} + + + +bool +Image::hasAlpha() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return a; +} + +double +Image::getGamma() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return gamma; +} + + +guint32* +Image::getRGBA() +{ + ensureDataLoaded( LOAD_COMPLETE_IMAGE ); + return rgba; +} + + +guint32 +Image::getRGBASize() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return w * h * sizeof(gint32); +} + +void +Image::ensureRGBA_IsAllocated() +{ + if( !rgba ) + { + rgba = new guint32 [w * h]; +// cerr << "ensureRGBA_IsAllocated() allocating rgba, got:" << toVoid( rgba ) << endl; + } +} + + +void +Image::ensureDataLoaded( LoadType loadType ) +{ + if( failed_to_load ) + { +// cerr << "Image::ensureDataLoaded(failed already) t:" << loadType << endl; + return; + } + + + if( loadType==LOAD_ONLY_METADATA && GotMetaData ) + { +// cerr << "Image::ensureDataLoaded(gotMD) t:" << loadType << endl; + return; + } + +// cerr << "Image::ensureDataLoaded(gotMD) need to do work. t:" << loadType << endl; + if( loadType==LOAD_COMPLETE_IMAGE ) + { +// cerr << "Image::ensureDataLoaded(loading IMG data) t:" << loadType << endl; + ensureRGBA_IsAllocated(); + } + +// cerr << "Image::ensureDataLoaded() t:" << loadType << endl; +// BackTrace(); + try + { + priv_ensureDataLoaded( loadType ); + } + catch( exception& e ) + { + failed_to_load = true; + throw; + } +} + +void +Image::priv_saveImageData( fh_context c, fh_istream imageStream ) +{ + fh_stringstream ss; + ss << "Plugin has no support for saving image data to context:" << c->getURL() << endl; + cerr << tostr(ss) << endl; + Throw_FerrisImageSaveFailed( tostr(ss), 0 ); +} + + + + + +double +Image::getAspectRatio() +{ + if( !aspect_ratio ) + { + ensureDataLoaded( LOAD_ONLY_METADATA ); + aspect_ratio = 1.0 * getWidth() / MAX( getHeight(), 1 ); + } + return aspect_ratio; +} + +bool +Image::isValid() +{ + ensureDataLoaded( LOAD_ONLY_METADATA ); + return is_valid; +} + + +/** + * converts + * w=3 + * RGBRGBRGB + * RGBARGBARGBA + * + * BRRG + * BARG + */ +void +Image::convert_scanline_RGB_to_RGBA( guint32* scanline32, guint8 alpha ) +{ + guint8* scanline = (guint8*)scanline32; + guint8* input = scanline; + + gint32 i = 0; + + for( i=w; i > 0; ) + { + --i; + +// guint32* target = &scanline[ 4*i ]; +// guint32* source = &scanline[ 3*i ]; + +// *target = *source & 0xFFFFFF00; +// *target = *target | alpha; + +// cerr << "Image::convert_scanline_RGB_to_RGBA() i:" << i << " h:" << h << " w:" << w << endl; + input = &scanline[ i*3 ]; + + scanline32[ i ] = + // A | R | G | B + (alpha << 24) | (input[0] << 16) | (input[1] << 8) | (input[2]); +// (alpha << 24) | ((input[0]) << 16) | ((input[1]) << 8) | (input[2]); + +// scanline[ (4*i) + 0 ] = scanline[ (3*i) + 0 ]; +// scanline[ (4*i) + 1 ] = alpha; +// scanline[ (4*i) + 2 ] = scanline[ (3*i) + 2 ]; +// scanline[ (4*i) + 3 ] = scanline[ (3*i) + 3 ]; + +// // scanline[ (4*i) + 3 ] = alpha; +// // scanline[ (4*i) + 2 ] = scanline[ (3*i) + 2 ]; +// // scanline[ (4*i) + 1 ] = scanline[ (3*i) + 1 ]; +// // scanline[ (4*i) + 0 ] = scanline[ (3*i) + 0 ]; + + +// // // scanline[ (4*i) + 4 ] = alpha; +// // // scanline[ (4*i) + 4 ] = scanline[ (3*i) + 3 ]; +// // // scanline[ (4*i) + 4 ] = scanline[ (3*i) + 3 ]; +// // // scanline[ (4*i) + 4 ] = scanline[ (3*i) + 3 ]; + } +// scanline[ 4 ] = alpha; +} + + + +void +Image::convertRGB_to_RGBA() +{ + guint32 line=0; + +// cerr << "Image::convertRGB_to_RGBA() line:" << line << " h:" << h << " w:" << w << endl; + + for( ; line < h; ++line ) + { +// cerr << "Image::convertRGB_to_RGBA() line:" << line << " h:" << h << endl; + guint32* scanline = &rgba[ w * line ]; + convert_scanline_RGB_to_RGBA( scanline ); + } + +} + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +}; diff --git a/Ferris/MatchedEAGenerators.hh b/Ferris/MatchedEAGenerators.hh new file mode 100644 index 0000000..249618d --- /dev/null +++ b/Ferris/MatchedEAGenerators.hh @@ -0,0 +1,425 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MatchedEAGenerators.hh,v 1.6 2010/09/24 21:30:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#ifndef _ALREADY_INCLUDED_MATCHED_EA_GENERATORS_H_ +#define _ALREADY_INCLUDED_MATCHED_EA_GENERATORS_H_ 1 + +namespace Ferris +{ + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +class FERRISEXP_API AttributeCreator +{ +public: + + enum CreatePri_t { + CREATE_PRI_MAX_INTERNAL_USE_ONLY=13, + CREATE_PRI_NATURALP2=12, + CREATE_PRI_NATURALP1=11, + CREATE_PRI_NATURAL=10, + CREATE_PRI_HIGH=7, + CREATE_PRI_MED=5, + CREATE_PRI_LOW=2, + CREATE_PRI_NOT_SUPPORTED=0, + }; + + virtual CreatePri_t getCreatePriority() = 0; + virtual fh_attribute CreateAttr( + const fh_context& a, + const std::string& rdn, + fh_context md = 0 ) + throw( + FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported + ) = 0; + + virtual bool supportsCreateForContext( fh_context c ); +}; + + + +class FERRISEXP_API MatchedEAGeneratorFactory + : + public AttributeCreator, + public Handlable +{ +public: + + typedef std::list BrewColl_t; + friend class GModuleMatchedEAGeneratorFactory; + +protected: + fh_matcher theMatcher; + + virtual void Brew( const fh_context& ctx ) = 0; + + MatchedEAGeneratorFactory( const fh_matcher& ma ); + MatchedEAGeneratorFactory(); + + +public: + + /** + * Used for statefull EA. if they don't match then the Context class need not + * copy the EAGen object + */ + bool hasInterest( const fh_context& ctx ); + + + virtual void tryBrew( const fh_context& ctx ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Can attributes be created dynamically + */ + virtual bool isDynamic(); + + /** + * If there should be one factory created per context + * (ie. state is kept for the context by the factory) + * then override this method and return true; + * Defaults to stateless. + */ + virtual bool hasState(); + + + /** + * if isDynamic() == true then override this method + * and test for single attributes by name when they are requested + * + * returns 1 if the attribute was added (same as addAttribute()) + */ + virtual bool tryBrew( const fh_context& ctx, const std::string& eaname ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /* + * Override these two if the EA generator wants to support + * creating new EA aswell. These should really be a different + * abstraction, but... + */ + virtual CreatePri_t getCreatePriority(); + + virtual fh_attribute CreateAttr( + const fh_context& a, + const std::string& rdn, + fh_context md = 0 ) + throw( + FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported + ); + + + /** + * Possibility for a module to add attributes to recommended-ea + * for any context. Called in Context::getRecommendedEA(). + */ + virtual void augmentRecommendedEA( const fh_context& a, fh_stringstream& ss ); + +}; +FERRIS_SMARTPTR( MatchedEAGeneratorFactory, fh_matched_eafactory ); + +typedef MatchedEAGeneratorFactory* fp_matched_eafactory; +typedef MatchedEAGeneratorFactory f_matched_eafactory; + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +#include +class FERRISEXP_DLLLOCAL GModuleMatchedEAGeneratorFactory + : + public MatchedEAGeneratorFactory +{ + typedef MatchedEAGeneratorFactory _Base; + +protected: + + std::string ImplName; + GModule* ghandle; + GModule* ghandle_factory; + void (*module_Brew)( AttributeCollection* ctx ); + + MatchedEAGeneratorFactory* RealFactory; + MatchedEAGeneratorFactory* (*CreateRealFactory)(); + + bool (*module_isDynamic)(); + bool (*module_hasState)(); + bool (*module_tryBrew)( const fh_context& ctx, const std::string& eaname ); + + AttributeCreator::CreatePri_t (*getCreatePri)(); + CreatePri_t CreatePriCache; + + /** + * Load the _factory.so and attach function pointers + */ + void ensureFactoryModuleVTable(); + + + virtual void Brew( const fh_context& ctx ); + + void ensureGModuleIsLoaded(); + +public: + + GModuleMatchedEAGeneratorFactory( const fh_matcher& ma, const std::string& implname ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Can attributes be created dynamically + */ + virtual bool isDynamic(); + + /** + * If there should be one factory created per context + * (ie. state is kept for the context by the factory) + * then override this method and return true; + * Defaults to stateless. + */ + virtual bool hasState(); + + /** + * if isDynamic() == true then override this method + * and test for single attributes by name when they are requested + * + * returns 1 if the attribute was added (same as addAttribute()) + */ + virtual bool tryBrew( const fh_context& ctx, const std::string& eaname ); + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + virtual CreatePri_t getCreatePriority(); + virtual fh_attribute CreateAttr( + const fh_context& a, + const std::string& rdn, + fh_context md = 0 ) + throw( + FerrisCreateAttributeFailed, + FerrisCreateAttributeNotSupported + ); + virtual bool supportsCreateForContext( fh_context c ); + virtual void augmentRecommendedEA( const fh_context& a, fh_stringstream& ss ); + +}; + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +/** + * EA Generators can now have their _factory.so linked directly to libferris + * this is a bridge to allow the factory to be static but the mainlib.so for + * the plugin to be dynamically loaded. + */ +class FERRISEXP_API StaticGModuleMatchedEAGeneratorFactory + : + public GModuleMatchedEAGeneratorFactory +{ + typedef GModuleMatchedEAGeneratorFactory _Base; + + std::string m_shortName; + bool m_isDynamic; + bool m_hasState; + +protected: + + +public: + + StaticGModuleMatchedEAGeneratorFactory( + const fh_matcher& ma, + const std::string& implname, + const std::string& shortname, + bool isDynamic, + bool hasState, + AttributeCreator::CreatePri_t CreatePri ); + + StaticGModuleMatchedEAGeneratorFactory* clone(); + + /********************/ + /********************/ + + virtual bool isDynamic(); + virtual bool hasState(); + virtual CreatePri_t getCreatePriority(); + virtual const std::string& getShortName(); + + /********************/ + /********************/ +}; + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +class FERRISEXP_API Image : public CacheHandlable +{ +public: + enum LoadType { + LOAD_ONLY_METADATA = 1<<1, + LOAD_COMPLETE_IMAGE = 1<<2 + }; + + virtual ~Image(); + + virtual guint32 getWidth(); + virtual guint32 getHeight(); + virtual int getDepth(); + virtual int getDepthPerColor(); + virtual double getGamma(); + virtual bool hasAlpha(); + /** + * Get the 32 bit per pixel raw image data. + * note that the returned data is owned by this object, + * to explicitly reclaim it when you are not using it call freeRGBA(); + */ + virtual guint32* getRGBA(); + virtual guint32 getRGBASize(); + virtual double getAspectRatio(); + virtual bool isValid(); + + + + /** + * Called to free the rgba member. + */ + virtual void freeRGBA(); + + void setNewWidth( guint32 v ); + void setNewHeight( guint32 v ); + + virtual void updateFromStream( Context* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + +protected: + + Image( fh_istream _ss ); + + guint32 getNewWidth(); + guint32 getNewHeight(); + + fh_istream ss; + + guint32 w; + guint32 h; + int d; + int a; + double gamma; + float aspect_ratio; + bool is_valid; + bool failed_to_load; + + guint32* rgba; + + bool GotMetaData; + virtual void priv_ensureDataLoaded( LoadType loadType = LOAD_ONLY_METADATA ) = 0; + /** + * Override this to provide write support for the module. The default simply throws + * an exception. + */ + virtual void priv_saveImageData( fh_context c, fh_istream imageStream ); + + /** + * This does a little handywork for you and then calls priv_ensureDataLoaded() + * which is the method you should implement + */ + void ensureDataLoaded( LoadType loadType = LOAD_ONLY_METADATA ); + + inline void setWidth ( guint32 v ) { w = v; } + inline void setHeight( guint32 v ) { h = v; } + inline void setAlpha ( int v ) { a = v; } + inline void setGamma ( double v ) { gamma = v; } + inline void setAspectRatio( float v ) { aspect_ratio = v; } + inline void setDepthPerColor( int v ) { d = v; } + inline void setValid( bool v ) { is_valid = v; } + + void ensureRGBA_IsAllocated(); + + + + void convert_scanline_RGB_to_RGBA( guint32* scanline, guint8 alpha = 255 ); + void convertRGB_to_RGBA(); + +private: + guint32 newWidth; + guint32 newHeight; + +}; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +}; + +#endif // #ifndef _ALREADY_INCLUDED_MATCHED_EA_GENERATORS_H_ + diff --git a/Ferris/Math.cpp b/Ferris/Math.cpp new file mode 100644 index 0000000..cf4ae7e --- /dev/null +++ b/Ferris/Math.cpp @@ -0,0 +1,30 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Math.cpp,v 1.2 2010/09/24 21:30:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include diff --git a/Ferris/Math.hh b/Ferris/Math.hh new file mode 100644 index 0000000..aed9e6f --- /dev/null +++ b/Ferris/Math.hh @@ -0,0 +1,52 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Math.hh,v 1.2 2010/09/24 21:30:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +namespace Ferris +{ + namespace Math + { + + /** + * Perform a log base x. + * + * @param v value to get log of + * @param b base of the log + * @return logb(v) + */ + template < class V, class BaseT > + V log( V v, BaseT b = 2 ) + { + return static_cast(::log( static_cast(v) ) / ::log( static_cast(b) )); + } + + }; +}; diff --git a/Ferris/Medallion.cpp b/Ferris/Medallion.cpp new file mode 100644 index 0000000..fafe9f2 --- /dev/null +++ b/Ferris/Medallion.cpp @@ -0,0 +1,3248 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Medallion.cpp,v 1.31 2011/05/06 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Medallion.hh" +#include "Medallion_private.hh" +#include +#include +#include +#include + +// medallion notification +#include + +#include "config.h" +#ifdef HAVE_DBUS +#include "DBus_private.hh" +#endif + +#include +#include +#include + +using namespace std; +using namespace STLdb4; + +namespace boost { + namespace serialization { + + template + void serialize(Archive & ar, ::Ferris::fh_cemblem& e, const unsigned int version) + { + ar & *(GetImpl(e)); + } + + } // namespace serialization + +} // namespace boost + +BOOST_CLASS_VERSION(::Ferris::Emblem, 3) + + + +namespace Ferris +{ + /** + * Having atexit() here makes doing things that use LG_XXX_D stuff + * not work correctly. + */ + class LazyOrAtExitFunction + { + public: + typedef Loki::Functor< void, LOKI_TYPELIST_1( bool ) > f_functor; + static void add( const f_functor& f ); + + // Dont use these... + static LazyOrAtExitFunction& getSingleton(); + void atExit(); + void atTimer(); + + private: + typedef list< f_functor > m_flist_t; + m_flist_t m_flist; + guint m_timer; + int m_timer_interval; + + void reconnectTimer(); + void setupAtExit(); + LazyOrAtExitFunction(); + void priv_add( const f_functor& f ); + + }; + + LazyOrAtExitFunction::LazyOrAtExitFunction() + : + m_timer( 0 ), + m_timer_interval( 2000 ) + { + setupAtExit(); + } + + void + LazyOrAtExitFunction::add( const f_functor& f ) + { + LazyOrAtExitFunction::getSingleton().priv_add( f ); + } + + void + LazyOrAtExitFunction::priv_add( const f_functor& f ) + { + m_flist.push_back( f ); + reconnectTimer(); + } + + LazyOrAtExitFunction& + LazyOrAtExitFunction::getSingleton() + { + static LazyOrAtExitFunction ret; + return ret; + } + + static void LazyOrAtExitFunction_AtExit() + { + LazyOrAtExitFunction::getSingleton().atExit(); + } + + void + LazyOrAtExitFunction::atExit() + { + for( m_flist_t::iterator iter = m_flist.begin(); iter != m_flist.end(); ++iter ) + { + (*iter)( true ); + } + m_flist.clear(); + } + + static gint s_timer_f(gpointer data) + { + LazyOrAtExitFunction* sp = (LazyOrAtExitFunction*)data; + sp->atTimer(); + return 0; + } + + void + LazyOrAtExitFunction::atTimer() + { + for( m_flist_t::iterator iter = m_flist.begin(); iter != m_flist.end(); ++iter ) + { + (*iter)( false ); + } + m_flist.clear(); + } + + void + LazyOrAtExitFunction::reconnectTimer() + { + if( m_timer ) + { + g_source_remove( m_timer ); + m_timer = 0; + } + if( m_timer_interval ) + m_timer = g_timeout_add( m_timer_interval, + GSourceFunc(s_timer_f), this ); + } + + void + LazyOrAtExitFunction::setupAtExit() + { + static bool alreadySetup = false; + + if( !alreadySetup ) + { + alreadySetup = true; + + int rc = atexit( LazyOrAtExitFunction_AtExit ); + if( rc != 0 ) + { + // error + cerr << "ERROR: can not register atexit() function." << endl; + cerr << "In some cases implicit sync() calls will not be effective" << endl; + } + } + } +}; + + +namespace Ferris +{ + const string EMBLEM_TOPLEVEL_SYSTEM_NAME = "libferris"; + + const string ETAGERE_ROOT = "~/.ferris/etagere"; + const string DB_COLDEM = "/cold-emblems.db"; + + + const string EM_NEXTID_KEY = "nextid"; + const string EM_NEXTID_DEFAULT = "1"; + + const string EM_NEXTID_EAORDERING_KEY = "nextid-eaordering"; + const string EM_NEXTID_EAORDERING_DEFAULT = "1073741824"; + const int EM_NEXTID_EAORDERING_DEFAULT_INT = 1073741824; + + const string COLDEM_PAYLOAD_PREKEY = "payload-"; + + + const string DB_ETAGERE = "/etagere.db"; + const string DB_EMBLEMS_AND_ETAGERE_BOOST = "/emblems-and-etagere.boost"; + const string DB_EMBLEMS_AND_ETAGERE_BOOST_TXT = "/emblems-and-etagere.boost.txt"; + const string ETAGERE_ONTOLOGY_ID_EXISTS_KEY = "ontology-id-exists"; + const string ETAGERE_ONTOLOGY_ID_KEY = "ontology-id"; + const string ETAGERE_IDLIST_KEY = "et-idlist"; + + + bool contains( emblems_t& el, fh_emblem em ) + { + return el.end() != find( el.begin(), el.end(), em ); + } + + bool fh_emblem_less::operator()( fh_emblem k1, fh_emblem k2 ) + { + return k1->getID() < k2->getID(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + stringlist_t tostrlist( const std::set< emblemID_t >& el ) + { + stringlist_t ret; + for( std::set< emblemID_t >::const_iterator ei = el.begin(); + ei != el.end(); ++ei ) + { + ret.push_back( tostr(*ei) ); + } + return ret; + } + + std::set< emblemID_t > toidset( const stringlist_t& sl ) + { + std::set< emblemID_t > ret; + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + ret.insert( toType(*si) ); + } + return ret; + } + + static void addAllParentsTransitive( emblems_t& ret, fh_emblem em, + Emblem::limitedViewPri_t cutoff = Emblem::LIMITEDVIEW_PRI_LOW ) + { + if( em->getLimitedViewPriority() >= cutoff ) + ret.push_back( em ); + emblems_t p = em->getParents(); + for( emblems_t::iterator ci = p.begin(); ci != p.end(); ++ci ) + { + addAllParentsTransitive( ret, *ci, cutoff ); + } + } + + static void addAllChildrenTransitive( emblems_t& ret, fh_emblem em, + Emblem::limitedViewPri_t cutoff = Emblem::LIMITEDVIEW_PRI_LOW ) + { + if( em->getLimitedViewPriority() >= cutoff ) + ret.push_back( em ); + emblems_t p = em->getChildren(); + for( emblems_t::iterator ci = p.begin(); ci != p.end(); ++ci ) + { + if( (*ci)->getLimitedViewPriority() >= cutoff ) + ret.push_back( *ci ); + addAllChildrenTransitive( ret, *ci, cutoff ); + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + link( fh_emblem parent, fh_emblem child ) + { + parent->addChild( child ); + child->addParent( parent ); + } + + void + unlink( fh_emblem parent, fh_emblem child ) + { + parent->removeChild( child ); + child->removeParent( parent ); + } + + + Emblem::Emblem( fh_etagere et, emblemID_t eid ) + : + m_et( et ), + m_id( eid ), + m_name( "new emblem" ), + m_iconname( "icons://unknown.png" ), + m_menuSizedIconName( "icons://unknown-mu.png" ), + m_description( "" ), + m_digitalLatitude( 0 ), + m_digitalLongitude( 0 ), + m_zoomRange( 0 ), + m_limitedViewPriority( LIMITEDVIEW_PRI_DEFAULT ), + m_upset_cache_only_isDirty( true ), + m_isTransitiveChildOfEAOrderingRootEmblem_isValid( false ), + m_isTransitiveChildOfEAOrderingRootEmblem( false ) + { + } + + emblemID_t UseGetNextID( Emblem* e ) + { + return e->getNextID(); + } + emblemID_t UseGetNextID_EAOrdering( Emblem* e ) + { + return e->getNextID_EAOrdering(); + } + + + + void + Emblem::setup( getNextIDFunctor_t f ) + { + if( m_id ) load(); + else m_id = f( this ); + } + + void + Emblem::setDirty() + { + m_upset_cache_only_isDirty = true; + m_et->setDirty(); + } + + bool + Emblem::isDirty() + { + return m_et->isDirty(); + } + + emblemID_t + Emblem::getNextID() + { + setDirty(); + +// string s = get_db4_string( m_et->getDBPath(), +// EM_NEXTID_KEY, +// EM_NEXTID_DEFAULT, false ); + + string s; + fh_database db = m_et->getDB(); + s = db->getWithDefault( EM_NEXTID_KEY, s, EM_NEXTID_DEFAULT ); + + LG_EMBLEM_D << "Emblem::getNextID() s:" << s + << " def:" << EM_NEXTID_DEFAULT + << endl; + + emblemID_t ret = toType( s ); +// set_db4_string( m_et->getDBPath(), EM_NEXTID_KEY, tostr(ret+1) ); + db->set( EM_NEXTID_KEY, tostr(ret+1) ); + db->sync(); + return ret; + } + + emblemID_t + Emblem::getNextID_EAOrdering() + { + setDirty(); + + string s; + fh_database db = m_et->getDB(); + s = db->getWithDefault( EM_NEXTID_EAORDERING_KEY, s, EM_NEXTID_EAORDERING_DEFAULT ); + + LG_EMBLEM_D << "Emblem::getNextID() s:" << s + << " def:" << EM_NEXTID_EAORDERING_DEFAULT + << endl; + + emblemID_t ret = toType( s ); + db->set( EM_NEXTID_EAORDERING_KEY, tostr(ret+1) ); + db->sync(); + return ret; + } + + + void + Emblem::load_common( fh_stringstream& iss ) + { + stringmap_t m; + XML::readMessage( iss, m ); + +// cerr << "Emblem::load_common() dump" << endl; +// for(stringmap_t::const_iterator mi = m.begin(); mi!=m.end(); ++mi ) +// cerr << " k:" << mi->first << " v:" << mi->second; + + + m_name = m["name"]; + m_iconname = m["iconname"]; + m_menuSizedIconName = m[ "menusizediconname" ]; + m_description = m["description"]; + if( m.end() != m.find("viewpri")) + m_limitedViewPriority = (limitedViewPri_t)(toint(m["viewpri"])); + + m_parents = toidset( Util::parseCommaSeperatedList( m["parents"] ) ); + m_children = toidset( Util::parseCommaSeperatedList( m["children"] ) ); + + LG_EMBLEM_D << "Emblem::load_common() id:" << m_id + << " pri:" << m_limitedViewPriority + << " children:" << m["children"] + << endl; + } + + void + Emblem::save_common( fh_ostream oss ) + { + stringlist_t sl; + stringmap_t m; + m["name"] = m_name; + m["iconname"] = m_iconname; + m[ "menusizediconname" ] = m_menuSizedIconName; + m["description"] = m_description; + m["viewpri"] = tostr(m_limitedViewPriority); + sl = tostrlist( m_parents ); + m["parents"] = Util::createCommaSeperatedList( sl ); + sl = tostrlist( m_children ); + m["children"] = Util::createCommaSeperatedList( sl ); + XML::writeMessage( oss, m ); + + LG_EMBLEM_D << "Emblem::save_common() id:" << m_id + << " pri:" << m_limitedViewPriority + << " parents.sz:" << m_parents.size() + << " children.sz:" << m_children.size() + << " children:" << Util::createCommaSeperatedList( sl ) + << endl; + } + + void + Emblem::save( bool force ) + { + if( force || isDirty() ) + priv_save(); + } + + void + Emblem::load() + { + priv_load(); + } + + + std::string + Emblem::getName() + { + return m_name; + } + + std::string + Emblem::getUniqueName() + { + if( !m_uniqName.empty() ) + return m_uniqName; + + + string name = getName(); + LG_EMBLEM_D << "getUniqueName() determining name... n:" << name << endl; + +// int count = 0; +// emblems_t el = m_et->getAllEmblems(); +// for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) +// { +// if( (*ei)->getName() == name ) +// ++count; +// } + + emblemset_t matches; + m_et->getAllEmblemsWithName( matches, name ); + int count = matches.size(); + + + if( count > 1 || name.find("-") != string::npos ) + { + name += "-"; + name += tostr(getID()); + } + + m_uniqName = name; + setDirty(); + return name; + } + + std::string + Emblem::getIconName() + { + return m_iconname; + } + + std::string + Emblem::getMenuSizedIconName() + { + return m_menuSizedIconName; + } + + + std::string + Emblem::getDescription() + { + return m_description; + } + + void + Emblem::setName( const std::string& v ) + { + setDirty(); + m_et->priv_emblemBeingRenamed( (ColdEmblem*)this, m_name, v ); + m_name = v; + + // force an update of the uniqueName because we have changed our primary name. + m_uniqName = ""; + getUniqueName(); + } + + void + Emblem::setIconName( const std::string& v ) + { + setDirty(); + getIconName_Changed_Sig().emit( this, m_iconname, v ); + m_iconname = v; + } + + void + Emblem::setMenuSizedIconName( const std::string& v ) + { + setDirty(); + getMenuSizedIconName_Changed_Sig().emit( this, m_menuSizedIconName, v ); + m_menuSizedIconName = v; + } + + Emblem::IconName_Changed_Sig_t& + Emblem::getIconName_Changed_Sig() + { + return IconName_Changed_Sig; + } + + Emblem::IconName_Changed_Sig_t& + Emblem::getMenuSizedIconName_Changed_Sig() + { + return MenuSizedIconName_Changed_Sig; + } + + Emblem::AddedParent_Sig_t& + Emblem::getAddedParent_Sig() + { + return AddedParent_Sig; + } + + Emblem::AddedChild_Sig_t& + Emblem::getAddedChild_Sig() + { + return AddedChild_Sig; + } + + Emblem::RemovedParent_Sig_t& + Emblem::getRemovedParent_Sig() + { + return RemovedParent_Sig; + } + + Emblem::RemovedChild_Sig_t& + Emblem::getRemovedChild_Sig() + { + return RemovedChild_Sig; + } + + void + Emblem::setDescription( const std::string& v ) + { + setDirty(); + m_description = v; + } + + Emblem::limitedViewPri_t + Emblem::getLimitedViewPriority() + { + return m_limitedViewPriority; + } + + void + Emblem::setLimitedViewPriority( limitedViewPri_t v ) + { + setDirty(); + m_limitedViewPriority = v; + } + + double + Emblem::getDigitalLatitude() + { +// cerr << "Emblem::getDigitalLatitude():" << m_digitalLatitude << endl; + return m_digitalLatitude; + } + + double + Emblem::getDigitalLongitude() + { + return m_digitalLongitude; + } + + void + Emblem::setDigitalLatitude( double v ) + { +// cerr << "Emblem::setDigitalLatitude():" << v << endl; + + setDirty(); + m_digitalLatitude = v; + } + void + Emblem::setDigitalLongitude( double v ) + { + setDirty(); + m_digitalLongitude = v; + } + + double + Emblem::getZoomRange() + { + return m_zoomRange; + } + + void + Emblem::setZoomRange( double v ) + { + setDirty(); + m_zoomRange = v; + } + + + + + emblems_t + Emblem::getParents() + { + emblems_t ret; + for( m_parents_t::const_iterator ci = m_parents.begin(); ci != m_parents.end(); ++ci ) + { + ret.push_back( m_et->getEmblemByID( *ci ) ); + } + return ret; + } + + emblems_t + Emblem::getChildren() + { + emblems_t ret; + for( m_parents_t::const_iterator ci = m_children.begin(); ci != m_children.end(); ++ci ) + { + if( !m_et->getEmblemByID( *ci ) ) + cerr << "getChildren() this:" << getID() << " CAN NOT FIND CHILD:" << *ci << endl; + + ret.push_back( m_et->getEmblemByID( *ci ) ); + } + return ret; + } + bool + Emblem::hasChildren() + { + return !m_children.empty(); + } + + + + void + Emblem::forceUpdateParentsAndChildrenIDs() + { + for( m_parents_t::const_iterator ci = m_parents.begin(); ci != m_parents.end(); ) + { + m_parents_t::const_iterator t = ci; + ++ci; + if( !m_et->getEmblemByID( *t ) ) + { + setDirty(); + m_parents.erase( *t ); + } + } + for( m_parents_t::const_iterator ci = m_children.begin(); ci != m_children.end(); ) + { + m_parents_t::const_iterator t = ci; + ++ci; + if( !m_et->getEmblemByID( *t ) ) + { + setDirty(); + m_children.erase( *t ); + } + } + } + + + typedef map< emblemID_t, fh_emblem > col_t; + static void x_addAllParentsTransitive( col_t& ret, fh_emblem em, + Emblem::limitedViewPri_t cutoff = Emblem::LIMITEDVIEW_PRI_LOW ) + { + if( !em ) + return; + + if( em->getLimitedViewPriority() >= cutoff ) + ret[ em->getID() ] = em; + + emblems_t p = em->getParents(); + for( emblems_t::iterator ci = p.begin(); ci != p.end(); ++ci ) + { + x_addAllParentsTransitive( ret, *ci, cutoff ); + } + } + + const emblems_t& + Emblem::getUpset() + { + if( !m_upset_cache_only_isDirty ) + { + return m_upset_cache_only; + } + + m_upset_cache_only.clear(); + + col_t col; + x_addAllParentsTransitive( col, this ); + col_t::const_iterator end = col.end(); + for( col_t::const_iterator iter = col.begin(); iter != end; ++iter ) + { + m_upset_cache_only.push_back( iter->second ); + } + + +// addAllParentsTransitive( ret, this ); +// ret.sort(); +// emblems_t::iterator e = unique( ret.begin(), ret.end() ); +// ret.erase( e, ret.end() ); + + m_upset_cache_only_isDirty = false; + return m_upset_cache_only; + } + + emblems_t + Emblem::getDownset() + { + emblems_t ret; + addAllChildrenTransitive( ret, this ); + ret.sort(); + emblems_t::iterator e = unique( ret.begin(), ret.end() ); + ret.erase( e, ret.end() ); + return ret; + } + + static void dump( string msg, emblems_t el ) + { + LG_EMBLEM_D << "dump(start) --- " << msg << endl; + for( emblems_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + LG_EMBLEM_D << " em:" << em->getName() << " id:" << em->getID() << endl; + } + LG_EMBLEM_D << "dump(end) --- " << msg << endl; + } + + + emblems_t + Emblem::getPossibleParents() + { + emblems_t tmp; + emblems_t ret = m_et->getAllEmblems(); + emblems_t upset = getUpset(); + emblems_t downset = getDownset(); + emblems_t parents = getParents(); + + ret.sort(); + upset.sort(); + downset.sort(); + parents.sort(); + +// dump( "ret", ret ); +// dump( "upset", upset ); +// dump( "downset", downset ); +// dump( "parents", parents ); + + set_difference( ret.begin(), ret.end(), + upset.begin(), upset.end(), + back_inserter( tmp )); + ret = tmp; tmp.clear(); + + set_difference( ret.begin(), ret.end(), + downset.begin(), downset.end(), + back_inserter( tmp )); + ret = tmp; tmp.clear(); + + set_union( ret.begin(), ret.end(), + parents.begin(), parents.end(), + back_inserter( tmp )); + ret = tmp; tmp.clear(); + + emblems_t::iterator self = find( ret.begin(), ret.end(), this ); + if( self != ret.end() ) + ret.erase( self ); + + return ret; + } + + emblems_t + Emblem::getPossibleChildren() + { + emblems_t tmp; + emblems_t ret = m_et->getAllEmblems(); + emblems_t upset = getUpset(); + emblems_t children = getChildren(); + + ret.sort(); + upset.sort(); + children.sort(); + + set_difference( ret.begin(), ret.end(), + upset.begin(), upset.end(), + back_inserter( tmp )); + ret = tmp; tmp.clear(); + + set_union( ret.begin(), ret.end(), + children.begin(), children.end(), + back_inserter( tmp )); + ret = tmp; tmp.clear(); + + emblems_t::iterator self = find( ret.begin(), ret.end(), this ); + if( self != ret.end() ) + ret.erase( self ); + + return ret; + } + + void + Emblem::addParent( fh_emblem em ) + { + // transitive sanity check + emblems_t upset = getUpset(); + if( upset.end() != find( upset.begin(), upset.end(), em ) ) + { + fh_stringstream ss; + ss << "Can not add parent emblem:" << em->getName() + << " because it is already included in the upset of:" << getName(); + Throw_CanNotAddEmblemException( tostr(ss), 0 ); + } + + setDirty(); + m_parents.insert( em->getID() ); + getAddedParent_Sig().emit( this, em ); + getAddedChild_Sig().emit( em, this ); + if( em == private_getAttributeRootEmblem( m_et ) || + em->isTransitiveChildOfEAOrderingRootEmblem() ) + { + updateTransitiveChildrenProperty_ChildOfEAOrderingRootEmblem( true ); + } + } + + void + Emblem::addChild( fh_emblem em ) + { + // transitive sanity check + emblems_t downset = getDownset(); + if( downset.end() != find( downset.begin(), downset.end(), em ) ) + { + fh_stringstream ss; + ss << "Can not add child emblem:" << em->getName() + << " because it is already included in the downset of:" << getName(); + Throw_CanNotAddEmblemException( tostr(ss), 0 ); + } + + setDirty(); + m_children.insert( em->getID() ); + getAddedChild_Sig().emit( this, em ); + getAddedParent_Sig().emit( em, this ); + } + + void + Emblem::updateTransitiveChildrenProperty_ChildOfEAOrderingRootEmblem( bool v ) + { + m_isTransitiveChildOfEAOrderingRootEmblem_isValid = true; + m_isTransitiveChildOfEAOrderingRootEmblem = v; + + fh_emblem eaOrderingRootEM = private_getAttributeRootEmblem( m_et ); + + emblems_t el = getDownset(); + emblems_t::iterator e = el.end(); + for( emblems_t::iterator ei = el.begin(); ei != e; ++ei ) + { + if( !v ) + { + // Make sure a transitive child can not still reach eaOrderingRootEM + // by another path before removing this property + const emblems_t& upset = (*ei)->getUpset(); + if( find( upset.begin(), upset.end(), eaOrderingRootEM ) != upset.end() ) + { + (*ei)->m_isTransitiveChildOfEAOrderingRootEmblem_isValid = true; + (*ei)->m_isTransitiveChildOfEAOrderingRootEmblem = true; + continue; + } + } + + (*ei)->m_isTransitiveChildOfEAOrderingRootEmblem_isValid = true; + (*ei)->m_isTransitiveChildOfEAOrderingRootEmblem = v; + } + } + + + void + Emblem::removeParent( fh_emblem em ) + { + setDirty(); + m_parents.erase( em->getID() ); + + if( em == private_getAttributeRootEmblem( m_et ) ) + { + updateTransitiveChildrenProperty_ChildOfEAOrderingRootEmblem( false ); + } + } + void + Emblem::removeChild( fh_emblem em ) + { + setDirty(); + m_children.erase( em->getID() ); + } + + + bool + Emblem::hasParent( fh_emblem em ) + { + return m_parents.find( em->getID() ) != m_parents.end(); + } + + bool + Emblem::hasChild( fh_emblem em ) + { + return m_children.find( em->getID() ) != m_children.end(); + } + + struct FERRISEXP_DLLLOCAL EmblemByName + { + string name; + EmblemByName( string n ) + : + name(n) + { + } + bool operator()( fh_emblem em ) + { + return em->getName() == name; + } + }; + + fh_emblem + Emblem::findChild( const std::string& name ) + { + emblems_t ch = getChildren(); + emblems_t::iterator ei = find_if( ch.begin(), ch.end(), + EmblemByName( name ) ); + if( ei != ch.end() ) + { + return *ei; + } + + fh_stringstream ss; + ss << "no emblem found with given name:" << name; + Throw_EmblemNotFoundException( tostr(ss), 0 ); + } + + fh_emblem + Emblem::obtainChild( const std::string& name ) + { + emblems_t ch = getChildren(); + emblems_t::iterator ei = find_if( ch.begin(), ch.end(), + EmblemByName( name )); + if( ei != ch.end() ) + { + return *ei; + } + + fh_emblem ret = m_et->createColdEmblem( name ); + link( this, ret ); + return ret; + } + + fh_emblem + Emblem::obtainChild_EAOrdering( const std::string& name ) + { + emblems_t ch = getChildren(); + emblems_t::iterator ei = find_if( ch.begin(), ch.end(), + EmblemByName( name )); + if( ei != ch.end() ) + { + return *ei; + } + + fh_emblem ret = m_et->createColdEmblem_EAOrdering( name ); + link( this, ret ); + return ret; + } + + emblemID_t + Emblem::getID() const + { + return m_id; + } + + void + Emblem::dumpTo( fh_ostream oss ) + { + oss << " " << endl; + oss << " " << endl; + for( m_parents_t::const_iterator ci = m_parents.begin(); ci != m_parents.end(); ++ci ) + oss << " " << endl; + oss << " " << endl; + oss << " " << endl; + for( m_parents_t::const_iterator ci = m_children.begin(); ci != m_children.end(); ++ci ) + oss << " " << endl; + oss << " " << endl; + oss << " " << endl; + } + + void + Emblem::forceUpdateTransitiveChildOfEAOrderingRootEmblem() + { + setDirty(); + m_isTransitiveChildOfEAOrderingRootEmblem_isValid = true; + m_isTransitiveChildOfEAOrderingRootEmblem = false; + + if( !m_parents.empty() ) + { + fh_emblem eaOrderingRootEM = private_getAttributeRootEmblem( m_et ); + const emblems_t& upset = getUpset(); + if( find( upset.begin(), upset.end(), eaOrderingRootEM ) != upset.end() ) + { + m_isTransitiveChildOfEAOrderingRootEmblem = true; + } + } + } + + bool + Emblem::isTransitiveChildOfEAOrderingRootEmblem() + { +// cerr << "Emblem::isTransitiveChildOfEAOrderingRootEmblem() n:" << getName() +// << " v:" << m_isTransitiveChildOfEAOrderingRootEmblem_isValid +// << " ret:" << m_isTransitiveChildOfEAOrderingRootEmblem +// << endl; + if( m_isTransitiveChildOfEAOrderingRootEmblem_isValid ) + { + return m_isTransitiveChildOfEAOrderingRootEmblem; + } + + forceUpdateTransitiveChildOfEAOrderingRootEmblem(); + return m_isTransitiveChildOfEAOrderingRootEmblem; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + std::string + ColdEmblem::getDBPath() + { + string dbpath = m_et->getBasePath() + DB_COLDEM; + return dbpath; + } + + ColdEmblem::ColdEmblem( fh_etagere et, emblemID_t eid ) + : + Emblem( et, eid ) + { + } + + void ColdEmblem::setEtagere( fh_etagere et ) + { + m_et = et; + } + + // STLdb4::fh_database + // ColdEmblem::getDBCache( const std::string& dbpath ) + // { + // static ColdEmblem::m_dbcache_t* m_dbcache = 0; + // if( !m_dbcache ) + // m_dbcache = new ColdEmblem::m_dbcache_t; + + // m_dbcache_t::iterator di = m_dbcache->find( dbpath ); + // if( di == m_dbcache->end() ) + // { + // fh_database db = new Database( dbpath ); + // di = m_dbcache->insert( make_pair( dbpath, db ) ).first; + // } + // return di->second; + // } + + STLdb4::fh_database + ColdEmblem::getDB() + { + string dbpath = getDBPath(); + if( !m_db ) + m_db = new Database( dbpath ); + return m_db; + +// LG_EMBLEM_D << "ColdEmblem::getDB() path:" << dbpath << endl; +// return getDBCache( dbpath ); + } + + fh_cemblem + ColdEmblem::Load( fh_etagere et, emblemID_t eid, getNextIDFunctor_t f ) + { + fh_cemblem ret = new ColdEmblem( et, eid ); + ret->setup( f ); + return ret; + } + +// fh_cemblem +// ColdEmblem::Load_EAOrdering( fh_etagere et, emblemID_t eid ) +// { +// fh_cemblem ret = new ColdEmblem( et, eid ); +// ret->setup_EAOrdering(); +// return ret; +// } + + + void + ColdEmblem::priv_load() + { + g_return_if_fail( m_id != 0 ); + + string payloadkey = COLDEM_PAYLOAD_PREKEY + tostr(m_id); + string s; +// LG_EMBLEM_D << "ColdEmblem::priv_load() payloadkey:" << payloadkey +// << " m_id:" << m_id +// << " tostr(m_id):" << tostr(m_id) +// << " tostrX(m_id):" << tostrX(m_id) +// << endl; + + getDB()->get( payloadkey, s ); +// string s = get_db4_string( getDBPath(), +// payloadkey, "", true ); + + LG_EMBLEM_D << "ColdEmblem::priv_load() db:" << getDBPath() + << " key:" << payloadkey + << " data:" << s + << endl; + + fh_stringstream ss; + ss << s; + load_common( ss ); + } + + void + ColdEmblem::priv_save() + { + g_return_if_fail( m_id != 0 ); + + string payloadkey = COLDEM_PAYLOAD_PREKEY + tostr(m_id); + fh_stringstream ss; + save_common( ss ); +// set_db4_string( getDBPath(), payloadkey, tostr(ss) ); + getDB()->set( payloadkey, tostr(ss) ); + + // FIXME: we should only sync after saving all instead of after saving each + getDB()->sync(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Etagere::Etagere( const std::string& path ) + : + m_basepath( path ), + m_isDirty( false ), + m_haveLoadedAll( false ), + m_db( 0 ) + { + if( path.empty() ) + { + m_basepath = ETAGERE_ROOT; + } + LG_EMBLEM_D << "Etagere::Etagere() path:" << m_basepath << endl; + loadAllEmblems(); + } + + + Etagere::~Etagere() + { + sync(); + } + + void + Etagere::dump() + { + LG_EMBLEM_D << "Etagere::dump(start)" << endl; + for( m_cemblems_t::iterator ci = m_cemblems.begin(); + ci != m_cemblems.end(); ++ci ) + { + LG_EMBLEM_D << " id:" << ci->first << " name:" << ci->second->getName() << endl; + m_cemblemsByName_t::const_iterator byName = m_cemblemsByName.find( ci->second->getName() ); + if( byName == m_cemblemsByName.end() ) + { + LG_EMBLEM_ER << " id:" << ci->first << " NOT FOUND in byName mapping too." << endl; + } + } + LG_EMBLEM_D << "Etagere::dump(end)" << endl; + } + + void EtagereSync( Etagere* et, SyncDelayer* ) + { + LG_EMBLEM_D << "EtagereSync()" << endl; + et->sync(); + } + + void + Etagere::sync() + { + LG_EMBLEM_D << "Etagere::sync() sync delayer exists:" << SyncDelayer::exists() << endl; + if( !SyncDelayer::exists() ) + { + saveAllEmblems(); + } + else + { + LG_EMBLEM_D << "Etagere::sync() SyncDelayer exists, delaying sync()" << endl; + cerr << "Etagere::sync() SyncDelayer exists, delaying sync()" << endl; + typedef Loki::Functor< void, LOKI_TYPELIST_2( Etagere*, SyncDelayer* ) > F; + F f( EtagereSync ); + SyncDelayer::add( this, Loki::BindFirst( f, this ) ); + } + } + + void + Etagere::OnOutOfProcNewEmblemNotification( std::set< emblemID_t >& eset ) + { + LG_EMBLEM_D << "Etagere::OnOutOfProcNewEmblemNotification() eset.sz:" << eset.size() << endl; + std::ifstream ifs( getBoostSerializePath().c_str() ); + boost::archive::binary_iarchive archive( ifs ); + + if( m_isDirty ) + { + LG_EMBLEM_D << "Etagere::OnOutOfProcNewEmblemNotification(we are dirty, ignoring signal)" + << " eset.sz:" << eset.size() << endl; + return; + } + + guint32 m_cemblems_sz = 0; + archive >> m_cemblems_sz; + LG_EMBLEM_D << "boost cache loading m_cemblems_sz:" << m_cemblems_sz << endl; + emblemID_t lastEID = 0; + for( int i = 0; i < m_cemblems_sz; ++i ) + { + fh_cemblem em = new ColdEmblem( 0, i ); + Emblem& e = *(GetImpl(em)); + archive >> e; + em->setEtagere( this ); + + if( eset.count( em->getID() ) ) + { + LG_EMBLEM_D << "Found new emblem from out-of-proc signal eid:" << em->getID() << endl; + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); + LG_EMBLEM_D << "loaded eid:" << em->getID() << " name:" << em->getName() << endl; + if( em->getID() > lastEID ) + lastEID = em->getID(); + + // the parents are still unaware of the new child. + emblems_t pl = em->getParents(); + for( emblems_t::iterator pi=pl.begin(); pi!=pl.end(); ++pi ) + { + (*pi)->m_children.insert( em->getID() ); + } + + + + eset.erase( em->getID() ); + getEmblemCreated_Sig().emit( this, em ); + getAddedChild_Sig().emit( this, em ); + + return; + } + } + + if( !eset.empty() ) + { + for( std::set< emblemID_t >::iterator ei = eset.begin(); ei != eset.end(); ++ei ) + { + LG_EMBLEM_W << "Can not find new emblem from out-of-proc signal eid:" << *ei << endl; + } + } + } + + template< class ArchiveClassT > + void + Etagere::loadAllEmblems( ArchiveClassT& archive ) + { + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...1" << endl; + guint32 m_cemblems_sz = 0; + archive >> m_cemblems_sz; + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...2" << endl; + LG_EMBLEM_D << "boost cache loading m_cemblems_sz:" << m_cemblems_sz << endl; + emblemID_t lastEID = 0; + for( int i = 0; i < m_cemblems_sz; ++i ) + { + fh_cemblem em = new ColdEmblem( 0, i ); + Emblem& e = *(GetImpl(em)); + archive >> e; + em->setEtagere( this ); + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); + LG_EMBLEM_D << "loaded eid:" << em->getID() << " name:" << em->getName() << endl; + if( em->getID() > lastEID && em->getID() < EM_NEXTID_EAORDERING_DEFAULT_INT ) + lastEID = em->getID(); + } + + { + fh_database db = getDB(); + string s; + s = db->getWithDefault( EM_NEXTID_KEY, s, EM_NEXTID_DEFAULT ); + emblemID_t WhatNextIDShouldBe = toType( s ); + + if( lastEID > WhatNextIDShouldBe ) + { + LG_EMBLEM_W << "Somehow the last emblem ID loaded was larger than what the nextID is.." + << " adjusting the nextID so no trouble will be caused." + << endl; + db->set( EM_NEXTID_KEY, tostr(lastEID+1) ); + db->sync(); + } + } + } + + static bool& getSkipLoadingEmblems() + { + static bool v = false; + return v; + } + + bool setSkipLoadingEmblems( bool v ) + { + bool ret = getSkipLoadingEmblems(); + getSkipLoadingEmblems() = v; + return ret; + } + + + + void + Etagere::loadAllEmblems() + { +// cerr << "Etagere::loadAllEmblems() skip:" << getSkipLoadingEmblems() << endl; + + if( getSkipLoadingEmblems() ) + { + m_haveLoadedAll = true; + return; + } + + if( m_haveLoadedAll ) + return; + + LG_EMBLEM_D << "Etagere::loadAllEmblems() top" << endl; + + bool useBoost = 0; + + { + if( 0==access( getBoostSerializePathTxt().c_str(), R_OK) + || 0==access( getBoostSerializePath().c_str(), R_OK) ) + { + useBoost = 1; + } + } + + + if( useBoost ) + { + string txtConfig = getBoostSerializePathTxt(); + // if( 0==access( txtConfig.c_str(), R_OK)) + // { + // LG_EMBLEM_D << "Etagere::loadAllEmblems(txt) loading boost file at:" + // << txtConfig << endl; + // std::ifstream ifs( txtConfig.c_str() ); + // boost::archive::text_iarchive archive( ifs ); + // loadAllEmblems( archive ); + // } + // else + { + LG_EMBLEM_D << "Etagere::loadAllEmblems(B) loading boost file at:" + << getBoostSerializePath() << endl; + try + { + std::ifstream ifs( getBoostSerializePath().c_str() ); + boost::archive::binary_iarchive archive( ifs ); + loadAllEmblems( archive ); + } + catch( exception& e ) + { + if( 0==access( txtConfig.c_str(), R_OK)) + { + LG_EMBLEM_W << "Etagere::loadAllEmblems(binary failed) e:" << e.what() << endl; + LG_EMBLEM_W << "Etagere::loadAllEmblems(binary failed, trying text) loading boost file at:" + << txtConfig << endl; + std::ifstream ifs( txtConfig.c_str() ); + boost::archive::text_iarchive archive( ifs ); + loadAllEmblems( archive ); + } + else + { + throw; + } + } + + } + +#if 0 + + LG_EMBLEM_D << "Etagere::loadAllEmblems(B) loading boost file at:" + << getBoostSerializePath() << endl; + std::ifstream ifs( getBoostSerializePath().c_str() ); + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...0" << endl; + boost::archive::binary_iarchive archive( ifs ); + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...01" << endl; + + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...1" << endl; + guint32 m_cemblems_sz = 0; + archive >> m_cemblems_sz; + LG_EMBLEM_D << "Etagere::loadAllEmblems() loading boost...2" << endl; + LG_EMBLEM_D << "boost cache loading m_cemblems_sz:" << m_cemblems_sz << endl; + emblemID_t lastEID = 0; + for( int i = 0; i < m_cemblems_sz; ++i ) + { + fh_cemblem em = new ColdEmblem( 0, i ); + Emblem& e = *(GetImpl(em)); + archive >> e; + em->setEtagere( this ); + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); + LG_EMBLEM_D << "loaded eid:" << em->getID() << " name:" << em->getName() << endl; + if( em->getID() > lastEID && em->getID() < EM_NEXTID_EAORDERING_DEFAULT_INT ) + lastEID = em->getID(); + } + + { + fh_database db = getDB(); + string s; + s = db->getWithDefault( EM_NEXTID_KEY, s, EM_NEXTID_DEFAULT ); + emblemID_t WhatNextIDShouldBe = toType( s ); + + if( lastEID > WhatNextIDShouldBe ) + { + LG_EMBLEM_W << "Somehow the last emblem ID loaded was larger than what the nextID is.." + << " adjusting the nextID so no trouble will be caused." + << endl; + db->set( EM_NEXTID_KEY, tostr(lastEID+1) ); + db->sync(); + } + } + + + LG_EMBLEM_D << "boost streaming is OK!" << endl; +// cerr << "completed loading etagere from boost file..." << endl; + +#endif + } + else + { + fh_database db = getDB(); + try + { + string idstr; + db->get( ETAGERE_IDLIST_KEY, idstr ); + LG_EMBLEM_D << "Etagere::loadAllEmblems() idlist:" << idstr << endl; +// LG_EMBLEM_D << "Etagere::loadAllEmblems() idlist:" << idstr << endl; + + stringlist_t idlist = Util::parseCommaSeperatedList( idstr ); + + for( stringlist_t::iterator si = idlist.begin(); si != idlist.end(); ++si ) + { +// cerr << "Etagere::loadAllEmblems(si):" << *si << endl; + LG_EMBLEM_D << "Etagere::loadAllEmblems(si):" << *si << endl; + emblemID_t id = toType( *si ); + try + { + fh_cemblem em = ColdEmblem::Load( this, id ); + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); + } + catch( exception& e ) + { + LG_EMBLEM_ER << "Etagere::loadAllEmblems E:" << e.what() << endl; +// cerr << "Etagere::loadAllEmblems E:" << e.what() << endl; + BackTrace(); + throw; + } + } + } + catch( exception& e ) + { + LG_EMBLEM_ER << "Etagere::loadAllEmblems() e:" << e.what() << endl; + + } + + } + + // ensure there is a ontology ID + // the first time setup there will be none and this + // will automatically create one for the user. + getOntologyID(); + + m_haveLoadedAll = true; + } + + template< class ArchiveClassT > + void + Etagere::saveAllEmblems( ArchiveClassT& archive ) + { + guint32 m_cemblems_sz = m_cemblems.size(); + archive << m_cemblems_sz; + for( m_cemblems_t::iterator ci = m_cemblems.begin(); + ci != m_cemblems.end(); ++ci ) + { + fh_cemblem em = ci->second; + LG_EMBLEM_D << "saving em:" << em->getName() << " id:" << em->getID() << endl; + const Emblem& e = *(GetImpl(em)); + archive << e; + } + } + + void + Etagere::saveAllEmblems( bool force ) + { + if( getSkipLoadingEmblems() ) + { + return; + } + + if( !force && !m_isDirty ) + { +// LG_EMBLEM_D << "Etagere::saveAllEmblems(exit early) force:" << force +// << " dirty:" << m_isDirty +// << endl; + return; + } + + + LG_EMBLEM_D << "Etagere::saveAllEmblems(top)" << endl; +// BackTrace(); + + stringlist_t idlist; + + { + { + string txtConfig = getBoostSerializePathTxt(); + LG_EMBLEM_D << "saving boost file:" << txtConfig << endl; + std::ofstream ofs( txtConfig.c_str() ); + boost::archive::text_oarchive archive( ofs ); + saveAllEmblems( archive ); + } + + { + LG_EMBLEM_D << "saving boost file:" << getBoostSerializePath() << endl; + std::ofstream ofs( getBoostSerializePath().c_str() ); + boost::archive::binary_oarchive archive( ofs ); + saveAllEmblems( archive ); + } + LG_EMBLEM_D << "saved boost file:" << getBoostSerializePath() << endl; + } + + ///////////////////////////////////////// + ///////////////////////////////////////// + ///////////////////////////////////////// + + + + + if( const gchar* p = g_getenv ("LIBFERRIS_SAVE_DB4_ETAGERE") ) + { + + for( m_cemblems_t::iterator ci = m_cemblems.begin(); + ci != m_cemblems.end(); ++ci ) + { + idlist.push_back( tostr(ci->first) ); + ci->second->save(); + } + LG_EMBLEM_D << "Etagere::saveAllEmblems()" + << " Setting idlistkey:" << Util::createCommaSeperatedList( idlist ) + << " in db file:" << getDBPath() + << endl; + + fh_database db = getDB(); + db->set( ETAGERE_IDLIST_KEY, Util::createCommaSeperatedList( idlist ) ); + db->sync(); + } + +// set_db4_string( getDBPath(), ETAGERE_IDLIST_KEY, +// Util::createCommaSeperatedList( idlist ) ); + + m_isDirty = false; + + // Tell other apps that there are some new emblems for them to load. + Factory::getPluginOutOfProcNotificationEngine().signalEtagereNewEmblems( this, m_newEmblemIDs ); + } + +// void EtagereSync( Etagere* et, bool v ) +// { +// et->sync(); +// } + + void + Etagere::setDirty() + { + m_isDirty = true; +// typedef Loki::Functor< void, LOKI_TYPELIST_2( Etagere*, bool ) > F; +// F f( EtagereSync ); +// LazyOrAtExitFunction::add( Loki::BindFirst( f, this ) ); + } + + bool + Etagere::isDirty() + { + return m_isDirty; + } + + std::string + Etagere::getDBPath() + { + return getBasePath() + DB_ETAGERE; + } + + std::string + Etagere::getBoostSerializePath() + { + return CleanupURL( getBasePath() + DB_EMBLEMS_AND_ETAGERE_BOOST ); + } + + std::string + Etagere::getBoostSerializePathTxt() + { + return CleanupURL( getBasePath() + DB_EMBLEMS_AND_ETAGERE_BOOST_TXT ); + } + + + + fh_database + Etagere::getDB() + { + if( m_db ) + return m_db; + + LG_EMBLEM_D << "Etagere::getDB(1) path:" << getDBPath() << endl; + m_db = new Database( getDBPath() ); + LG_EMBLEM_D << "Etagere::getDB(2) path:" << getDBPath() << endl; + return m_db; + } + + + +// fh_emblem +// Etagere::getHotEmblem( hotEmblemID_t eid ) +// { +// fh_stringstream ss; +// ss << "hot emblems are currently not supported"; +// Throw_EmblemNotFoundException( tostr(ss), 0 ); +// } + + + fh_cemblem + Etagere::getColdEmblem( emblemID_t eid ) + { +// LG_EMBLEM_D << "Etagere::getColdEmblem(top)" << endl; + if( eid ) + { + loadAllEmblems(); + + m_cemblems_t::iterator ci = m_cemblems.find( eid ); + if( ci != m_cemblems.end() ) + return ci->second; + + if( m_haveLoadedAll ) + { + // we have loaded all emblems and not found it + // also they wanted it from disk because eid!=0 + // so its either never existed or they have deleted it + return 0; + } + + } + + cerr << "WARNING Etagere::getColdEmblem() id==0" << endl; + BackTrace(); +// LG_EMBLEM_D << "Etagere::getColdEmblem() loading eid:" << eid +// << " m_cemblems.sz:" << m_cemblems.size() +// << endl; + fh_cemblem em = ColdEmblem::Load( this, eid ); + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); + return em; + } + + emblems_t& + Etagere::getAllEmblemsWithName( emblems_t& ret, const std::string& name ) + { + loadAllEmblems(); + + pair eq = m_cemblemsByName.equal_range( name ); + + m_cemblemsByName_t::const_iterator iter = eq.first; + for( ; iter != eq.second; ++iter ) + { + ret.push_back( iter->second ); + } + + return ret; + } + + emblemset_t& + Etagere::getAllEmblemsWithName( emblemset_t& ret, const std::string& name ) + { + loadAllEmblems(); + + pair eq = m_cemblemsByName.equal_range( name ); + + m_cemblemsByName_t::const_iterator iter = eq.first; + for( ; iter != eq.second; ++iter ) + { + ret.insert( iter->second ); + } + + return ret; + } + + /** + * Get or Create the emblem + */ + fh_emblem + Etagere::obtainEmblemByName( const std::string& name ) + { + try + { + return getEmblemByName( name ); + } + catch( EmblemNotFoundException& e ) + { + fh_emblem ret = createColdEmblem( name ); + sync(); + return ret; + } + catch( ... ) + { + throw; + } + } + + + + fh_emblem + Etagere::getEmblemByName( const std::string& name ) + { + loadAllEmblems(); + + m_cemblemsByName_t::const_iterator byNameIter = m_cemblemsByName.find( name ); + if( byNameIter != m_cemblemsByName.end() ) + { + return byNameIter->second; + } + +// for( m_cemblems_t::iterator ci = m_cemblems.begin(); +// ci != m_cemblems.end(); ++ci ) +// { +// if( ci->second->getName() == name ) +// return ci->second; +// } + + fh_stringstream ss; + ss << "no emblem found with given name:" << name; + Throw_EmblemNotFoundException( tostr(ss), 0 ); + } + +// bool +// Etagere::isEmblemNameUnique( const std::string& name ) +// { +// int count = 0; +// loadAllEmblems(); + +// m_cemblemsByName_t::const_iterator byNameIter = m_cemblemsByName.find( name ); +// if( byNameIter != m_cemblemsByName.end() ) +// { +// fh_emblem em = byNameIter->second; +// return em->getName() == em->getUniqueName(); +// } +// return true; +// } + + fh_emblem + Etagere::getEmblemByUniqueName( const std::string& name ) + { + if( !contains( name, "-" ) ) + return getEmblemByName( name ); + + string seid = name.substr( name.rfind('-')+1 ); + if( seid.empty() ) + { + fh_stringstream ss; + ss << "no emblem found with given name:" << name; + Throw_EmblemNotFoundException( tostr(ss), 0 ); + } + return getEmblemByID( toType( seid )); + } + + + fh_emblem + Etagere::getEmblemByID( emblemID_t id ) + { + return getColdEmblem( id ); + } + + emblems_t + Etagere::getAllEmblems() + { + emblems_t ret; + + loadAllEmblems(); + for( m_cemblems_t::iterator ci = m_cemblems.begin(); ci != m_cemblems.end(); ++ci ) + { + ret.push_back( ci->second ); + } + + return ret; + } + + emblems_t + Etagere::getAllEmblemsUniqueName() + { + stringset_t sset; + emblems_t ret; + + loadAllEmblems(); + + for( m_cemblems_t::iterator ci = m_cemblems.begin(); ci != m_cemblems.end(); ++ci ) + { + string n = ci->second->getName(); + + if( !sset.count( n ) ) + { + ret.push_back( ci->second ); + sset.insert( n ); + } + } + + + // PURE DEBUG +// { +// emblems_t& emlist = ret; +// LG_EMBLEM_D << "Uret Emblem list begin------------------" << endl; +// for( emblems_t::iterator ei = emlist.begin(); ei != emlist.end(); ++ei ) +// { +// fh_emblem em = *ei; +// LG_EMBLEM_D << "em.list:" << em->getName() << endl; +// } +// LG_EMBLEM_D << "Uret Emblem list end--------------------" << endl; +// } + + return ret; + } + + void + Etagere::visitAllEmblems( const f_emblemVisitor& constf ) + { + f_emblemVisitor f = constf; + for( m_cemblems_t::iterator ci = m_cemblems.begin(); ci != m_cemblems.end(); ++ci ) + { + f( ci->second ); + } + } + + string + Etagere::getOntologyID() + { + fh_database db = getDB(); + try + { + string payload; + db->get( ETAGERE_ONTOLOGY_ID_EXISTS_KEY, payload ); + } + catch( exception& e ) + { + // generate and save. + string s = Util::makeUUID(); + db->set( ETAGERE_ONTOLOGY_ID_EXISTS_KEY, "1" ); + db->set( ETAGERE_ONTOLOGY_ID_KEY, s ); + db->sync(); + } + + try + { + string payload; + db->get( ETAGERE_ONTOLOGY_ID_KEY, payload ); + return payload; + } + catch( exception& e ) + { + // problem reading the onto-id + fh_stringstream ss; + ss << "Failed to load the ontology uuid from file:" << getDBPath() + << " e:" << e.what(); + Throw_EtagereException( tostr(ss), 0 ); + } + + + +// bool shouldHaveUUID = toint(get_db4_string( getDBPath(), +// ETAGERE_ONTOLOGY_ID_EXISTS_KEY, +// "0", false )); +// string s = get_db4_string( getDBPath(), ETAGERE_ONTOLOGY_ID_KEY, "", false ); + +// if( shouldHaveUUID && s.empty() ) +// { +// // problem reading the onto-id +// fh_stringstream ss; +// ss << "Failed to load the ontology uuid from file:" << getDBPath(); +// Throw_EtagereException( tostr(ss), 0 ); +// } + +// if( s.empty() ) +// { +// // generate and save. +// s = Util::makeUUID(); +// set_db4_string( getDBPath(), ETAGERE_ONTOLOGY_ID_EXISTS_KEY, "1" ); +// set_db4_string( getDBPath(), ETAGERE_ONTOLOGY_ID_KEY, s ); +// } +// return s; + } + + Emblem::limitedViewPri_t + Etagere::getLowestEmblemPriorityToShow() + { + fh_database db = getDB(); + try + { + string payload; + db->get( CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K, payload ); + Emblem::limitedViewPri_t ret = Emblem::limitedViewPri_t(toint(( payload ))); + return ret; + } + catch( exception& e ) + { + return Emblem::limitedViewPri_t( + toint(( CFG_LOWEST_EMBLEM_PRI_TO_SHOW_DEFAULT ))); + } + +// string raw = get_db4_string( getDBPath(), +// CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K, +// CFG_LOWEST_EMBLEM_PRI_TO_SHOW_DEFAULT, +// false ); +// Emblem::limitedViewPri_t ret = Emblem::limitedViewPri_t(toint(( raw ))); +// return ret; + } + + void + Etagere::setLowestEmblemPriorityToShow( Emblem::limitedViewPri_t v ) + { + fh_database db = getDB(); + db->set( CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K, tostr( v ) ); +// set_db4_string( getDBPath(), CFG_LOWEST_EMBLEM_PRI_TO_SHOW_K, tostr( v )); + } + + void + Etagere::erase( fh_emblem em ) + { + loadAllEmblems(); + setDirty(); + + m_newEmblemIDs.erase( em->getID() ); + + m_cemblems.erase( m_cemblems.find( em->getID() )); + { + m_cemblemsByName_t::iterator iter = m_cemblemsByName.find( em->getName() ); + if( iter != m_cemblemsByName.end() ) + m_cemblemsByName.erase( iter ); + } + + + emblems_t pl = em->getParents(); + for( emblems_t::iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { + unlink( *pi, em ); + } + + emblems_t cl = em->getChildren(); + for( emblems_t::iterator ci = cl.begin(); ci!=cl.end(); ++ci ) + { + unlink( em, *ci ); + } + + if( em->getParents().size() == 0 ) + { + getRemovedChild_Sig().emit( this, em ); + } + } + + fh_cemblem + Etagere::createColdEmblem_common( fh_cemblem em ) + { + string name = em->getName(); + + m_cemblems.insert( make_pair( em->getID(), em ) ); + m_cemblemsByName.insert( make_pair( em->getName(), em ) ); +// sync(); + LG_EMBLEM_D << "Etagere::createColdEmblem(about to fire) name:" << name << endl; + getEmblemCreated_Sig().emit( this, em ); + LG_EMBLEM_D << "Etagere::createColdEmblem(fired) name:" << name << endl; + getAddedChild_Sig().emit( this, em ); + + // make sure the emblem caches this info + em->getUniqueName(); + + // there are no parents, this will just quickly setup the cache. + em->isTransitiveChildOfEAOrderingRootEmblem(); + + // cache the new emblemID for notification after a sync() + m_newEmblemIDs.insert( em->getID() ); + + return em; + } + + fh_cemblem + Etagere::createColdEmblem( const std::string& name ) + { + setDirty(); + fh_cemblem em = ColdEmblem::Load( this ); + em->m_name = name; + return createColdEmblem_common( em ); + } + + fh_cemblem + Etagere::createColdEmblem_EAOrdering( const std::string& name ) + { + setDirty(); + fh_cemblem em = ColdEmblem::Load( this, 0, &UseGetNextID_EAOrdering ); + em->m_name = name; + return createColdEmblem_common( em ); + } + + + std::string + Etagere::getBasePath() + { + return m_basepath; + } + + void + Etagere::dumpTo( fh_ostream oss ) + { + emblems_t el = getAllEmblems(); + oss << "" << endl; + for( emblems_t::const_iterator ei = el.begin(); ei != el.end(); ++ei ) + { + (*ei)->dumpTo( oss ); + } + oss << "" << endl; + } + + Etagere::EmblemCreated_Sig_t& + Etagere::getEmblemCreated_Sig() + { + return EmblemCreated_Sig; + } + + Etagere::AddedChild_Sig_t& + Etagere::getAddedChild_Sig() + { + return AddedChild_Sig; + } + + Etagere::RemovedChild_Sig_t& + Etagere::getRemovedChild_Sig() + { + return RemovedChild_Sig; + } + + + + + void + Etagere::priv_emblemBeingRenamed( fh_cemblem e, + const std::string& oldn, + const std::string& newn ) + { + m_cemblemsByName.erase( oldn ); + m_cemblemsByName.insert( make_pair( newn, e ) ); + } + + + + + + namespace Factory + { + static fh_etagere& get_etagereOverride() + { + static fh_etagere etagereOverride = 0; + return etagereOverride; + } + static void sync_etagereOverride() + { + if( get_etagereOverride() ) + get_etagereOverride()->sync(); + } + + void setDefaultEtagere( fh_etagere et ) + { + static bool registered = false; + if( !registered ) + { + registered = 1; + atexit( sync_etagereOverride ); + } + + get_etagereOverride() = et; + } + + static fh_etagere ensureRequiredEmblems( fh_etagere et ) + { + fh_emblem eaordering = private_getAttributeRootEmblem( et ); + fh_emblem libferris = getFerrisSystemEmblem( et ); + fh_emblem geospatial = libferris->obtainChild( "libferris-geospatial" ); + et->sync(); + + return et; + } + + fh_etagere getEtagere() + { + try + { + if( get_etagereOverride() ) + return get_etagereOverride(); + + static fh_etagere e = 0; + if( !e ) + { + e = new Etagere(); + ensureRequiredEmblems( e ); + } + return e; + } + catch( exception& e ) + { + LG_EMBLEM_ER << "ERROR: getEtagere() e:" << e.what() << endl; + LG_EMBLEM_ER << endl; + LG_EMBLEM_ER << "===> Make sure you have run: ferris-first-time-user --setup-defaults" + << endl; + LG_EMBLEM_ER << endl; + throw; + } + } + + fh_etagere makeEtagere( const std::string& path ) + { + Shell::acquireContext( path ); + fh_etagere e = new Etagere( path ); + ensureRequiredEmblems( e ); + return e; + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Times::Times() + : + m_mtime( Time::getTime() ), + m_atime( Time::getTime() ) + { + } + + + void + Times::setATime( time_t t ) + { + m_atime = t; + } + + void + Times::setMTime( time_t t ) + { + m_mtime = t; + } + + time_t + Times::getATime() + { + return m_atime; + } + + void + Times::touchATime() + { + m_atime = Time::getTime(); + } + + void + Times::touchMTime() + { + m_mtime = Time::getTime(); + } + + time_t + Times::getMTime() + { + return m_mtime; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + MedallionBelief::MedallionBelief( Medallion* m, fh_emblem em, fh_personality p, + double sureness, fh_times t ) + : + m_medallion( m ), + m_emblem( em ), + m_personality( p ), + m_sureness( sureness ), + m_times( t ? t : new Times() ) + { + } + + MedallionBelief::MedallionBelief() + : + m_medallion( 0 ), + m_emblem( 0 ), + m_personality( Factory::getCurrentUserPersonality() ), + m_sureness( SURENESS_NULL ), + m_times( new Times() ) + { + } + + MedallionBelief::~MedallionBelief() + { + } + + fh_medallion + MedallionBelief::getMedallion() const + { + return m_medallion; + } + + fh_emblem + MedallionBelief::getEmblem() const + { + return m_emblem; + } + + fh_personality + MedallionBelief::getPersonality() const + { + return m_personality; + } + + fh_times + MedallionBelief::getTimes() const + { + if( !m_times ) + m_times = new Times(); + + return m_times; + } + + double + MedallionBelief::getSureness() const + { + return m_sureness; + } + + void + MedallionBelief::setSureness( double v ) + { + m_sureness = v; + } + + + double + MedallionBelief::clampJudgementSureness( double ret ) + { + if( ret > MedallionBelief::SURENESS_MAX ) ret = MedallionBelief::SURENESS_MAX; + if( ret < MedallionBelief::SURENESS_MIN ) ret = MedallionBelief::SURENESS_MIN; + return ret; + } + +// MedallionBelief::ref_count_t +// MedallionBelief::AddRef() +// { +// if( getReferenceCount() >= 1 ) +// m_medallion->AddRef(); +// return _Base::AddRef(); +// } + +// MedallionBelief:: ref_count_t +// MedallionBelief::Release() +// { +// if( getReferenceCount() > 1 ) +// m_medallion->Release(); +// return _Base::Release(); +// } + + /********************************************************************************/ + /********************************************************************************/ + +// void +// Medallion::JudgementList::add( fh_personality p, +// double judgementSureness, +// fh_times t ) +// { +// MedallionBelief a( p, judgementSureness, t ); +// m_assertions[ p ] = a; +// } + +// fh_times +// Medallion::JudgementList::getTimes( fh_personality p ) +// { +// m_assertions_t::iterator ai = m_assertions.find( p ); +// if( ai != m_assertions.end() ) +// { +// return ai->second.times; +// } +// return 0; +// } + +// double +// Medallion::JudgementList::getSureness( fh_personality p ) +// { +// m_assertions_t::iterator ai = m_assertions.find( p ); +// if( ai != m_assertions.end() ) +// { +// return ai->second.judgementSureness; +// } +// return MedallionBelief::SURENESS_NULL; +// } + + fh_medallionBelief + Medallion::createBelief( fh_emblem em, fh_personality p, double sureness, fh_times t ) + { + if( !t ) + t = new Times(); + + fh_medallionBelief ret = new MedallionBelief( this, em, p, sureness, t ); + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + m_assertions.insert( make_pair( p, ret ) ); + return ret; + } + + fh_medallionBelief + Medallion::obtainBelief( fh_emblem em, fh_personality p, + double sureness, fh_times t ) + { + if( hasBelief( em, p ) ) + return getBelief( em, p ); + return createBelief( em, p, sureness, t ); + } + + void + Medallion::eraseBelief( fh_emblem em, fh_personality p ) + { + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + m_assertions.erase( p ); + } + + +// fh_medallionBelief +// Medallion::JudgementList::getBelief( Medallion* m, fh_emblem em, fh_personality p, +// double sureness, fh_times t ) +// { +// m_assertions_t::iterator ai = m_assertions.find( p ); +// if( ai == m_assertions.end() ) +// { +// ai = m_assertions.insert( +// make_pair( p, m->createBelief( em, p, sureness, t ) ) ).first; +// } +// return ai->second; +// } + +// void +// Medallion::JudgementList::eraseBelief( fh_personality p ) +// { +// m_assertions.erase( p ); +// } + +// bool +// Medallion::JudgementList::hasBelief( fh_personality p ) +// { +// return m_assertions.find( p ) != m_assertions.end(); +// } + +// std::list< fh_personality > +// Medallion::JudgementList::getListOfPersonalitiesWhoHaveOpinion() +// { +// std::list< fh_personality > ret; + +// for( m_assertions_t::iterator ai = m_assertions.begin(); ai != m_assertions.end(); ++ai ) +// ret.push_back( ai->first ); + +// return ret; +// } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Medallion::Medallion( fh_context c ) + : + m_context( c ), + m_isDirty( false ), + m_dontSave( false ) + { + load( m_context ); + } + + Medallion::~Medallion() + { +// cerr << "~Medallion() m_context:" << m_context->getURL() << endl; +// BackTrace(); + sync(); + } + + void + Medallion::setDirty() + { + m_isDirty = true; + } + + void + Medallion::sync() + { + if( m_isDirty ) + { + save( m_context ); + LG_EMBLEM_D << "Medallion::sync() sending message to other procs." << endl; + m_context->Emit_MedallionUpdated(); + Factory::getPluginOutOfProcNotificationEngine().signalMedallionUpdated( m_context ); + +#ifdef HAVE_DBUS + if( m_context ) + { + string earl = m_context->getURL(); + LG_DBUS_D << "Emitting MedallionSaved for earl:" << earl << endl; + DBusConnection* conn = DBus::getSessionBus(); + DBus::Signal sig( "/", "org.libferris.desktop", "MedallionSaved"); + sig.push_back( earl ); + sig.push_back( m_context->getDirPath() ); + sig.send( conn ); + LG_DBUS_D << "Done Emitting MedallionSaved for earl:" << earl << endl; + } +#endif + + } + } + + void + Medallion::reload() + { + if( m_isDirty ) + { + LG_EMBLEM_ER << "ERROR: Medallion::reload() called on dirty medallion" + << " c:" << m_context->getURL() << endl; + return; + } + + m_cemblems.clear(); + m_cemblems_attach.clear(); + LG_EMBLEM_D << "Medallion::reload() c:" << m_context->getURL() << endl; + load( m_context ); + } + + + + string + Medallion::getEAName() + { + string ret = ""; + uid_t uid = Shell::getUserID(); + ret = string("medallion.") + tostr(uid); + return ret; + } + + static const string VERSION_KEY = "medallion-version"; + static const string VERSION_VALUE_V1 = "1"; + static const string VERSION_VALUE_V2 = "2"; + static const string V1_ONTOLOGY_ID = "ontology-id"; + static const string V1_COLD_EMBLEM_IDLIST_KEY = "cold-emblem-id-list"; + static const string V1_MTIME_KEY = "mtime"; + static const string V1_EMBLEM_LIST_EID_KEY = "eid"; + static const string V1_EMBLEM_LIST_MTIME_KEY = "mtime"; + + + static const string V2_EMBLEM_LIST_ATIME_KEY = "atime"; + static const string V2_EMBLEM_LIST_SURENESS_KEY = "sureness"; + static const string V2_EMBLEM_LIST_PERSONALITY_ID_KEY = "personality-id"; + + + void + Medallion::load( fh_context c ) + { + Factory::ensureXMLPlatformInitialized(); + fh_etagere et = Factory::getEtagere(); + + string xml = ""; + + try + { +// cerr << "medallion::load() c:" << c->getURL() +// << " getEAName():" << getEAName() +// << endl; + xml = getStrAttr( c, getEAName(), "", true, true ); + LG_EMBLEM_D << "Medallion::load() medallion:" << xml << endl; + } + catch( NoSuchAttribute& e ) + { + m_isDirty = false; + return; + } + + fh_stringstream xmlss; + xmlss << xml; + +// stringmap_t m; +// XML::readMessage( xmlss, m ); + + +// string version = m[ VERSION_KEY ]; +// if( version != VERSION_VALUE_V1 ) +// { +// fh_stringstream ss; +// ss << "Medallion exists but has incorrect version:" << version; +// Throw_MedallionException( tostr(ss), GetImpl(c) ); +// } + +// if( m[ V1_ONTOLOGY_ID ] != et->getOntologyID() ) +// { +// LG_EMBLEM_D << "Warning: found a medallion at:" << c->getURL() << endl +// << " but it is not in the native ontology, ignoring and preserving it." << endl; +// m_isDirty = false; +// m_dontSave = true; +// return; +// } + +// string idstr = m[ V1_COLD_EMBLEM_IDLIST_KEY ]; +// if( idstr.empty() ) +// { +// LG_EMBLEM_D << "no medallion found for c:" << c->getURL() << endl; +// } +// else +// { +// LG_EMBLEM_D << "Medallion::load() found:" << idstr << endl; +// stringlist_t idlist = Util::parseCommaSeperatedList( idstr ); +// m_cemblems.clear(); +// for( stringlist_t::iterator si = idlist.begin(); si != idlist.end(); ++si ) +// { +// LG_EMBLEM_D << "Medallion::load() found em:" << *si << endl; +// fh_cemblem em = et->getColdEmblem( toType( *si ) ); +// m_cemblems.insert( em ); +// } +// } + + + fh_domdoc doc = Factory::StreamToDOM( xmlss ); + DOMElement* root = doc->getDocumentElement(); + + if( getAttribute( root, V1_ONTOLOGY_ID ) != et->getOntologyID() ) + { + LG_EMBLEM_W << "Warning: found a medallion at:" << c->getURL() << endl + << " but it is not in the native ontology, ignoring and preserving it." << endl; + m_isDirty = false; + m_dontSave = true; + return; + } + + // + // All previous on disk formats should be supported for reading. + // medallions should be saved in the most recent on disk format. + // + string version = getAttribute( root, VERSION_KEY ); + fh_personality userper = Factory::getCurrentUserPersonality( et ); + + if( version == VERSION_VALUE_V1 ) + { + if( DOMElement* emblemlist = XML::getChildElement( root, "emblemlist" )) + { + typedef std::list< DOMElement* > el_t; + el_t el = XML::getAllChildrenElements( emblemlist, "emblem", false ); + for( el_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + { + string seid = getAttribute( *ei, V1_EMBLEM_LIST_EID_KEY ); + string mtime = getAttribute( *ei, V1_EMBLEM_LIST_MTIME_KEY ); + + fh_cemblem em = et->getColdEmblem( toType( seid ) ); + m_cemblems.insert( em ); + fh_times ti = new Times(); + ti->setMTime( toType(mtime) ); +// m_cemblems_times[ em ] = ti; +// m_cemblems_attach[ em ].add( userper, +// MedallionBelief::SURENESS_MAX, +// ti ); + createBelief( em, userper, MedallionBelief::SURENESS_MAX, ti ); + } + } + } + else if( version == VERSION_VALUE_V2 ) + { + if( DOMElement* emblemlist = XML::getChildElement( root, "emblemlist" )) + { + typedef std::list< DOMElement* > el_t; + el_t el = XML::getAllChildrenElements( emblemlist, "emblem", false ); + for( el_t::iterator emblemiter = el.begin(); emblemiter != el.end(); ++emblemiter ) + { + string seid = getAttribute( *emblemiter, V1_EMBLEM_LIST_EID_KEY ); + fh_cemblem em = et->getColdEmblem( toType( seid ) ); + m_cemblems.insert( em ); + + el_t xbelieflist = XML::getAllChildrenElements( *emblemiter, "belief", false ); + for( el_t::iterator pi = xbelieflist.begin(); pi != xbelieflist.end(); ++pi ) + { + string mtime = getAttribute( *pi, V1_EMBLEM_LIST_MTIME_KEY ); + string atime = getAttribute( *pi, V2_EMBLEM_LIST_ATIME_KEY ); + string sureness = getAttribute( *pi, V2_EMBLEM_LIST_SURENESS_KEY ); + string perid = getAttribute( *pi, V2_EMBLEM_LIST_PERSONALITY_ID_KEY ); + + fh_times ti = new Times(); + ti->setMTime( toType(mtime) ); + ti->setATime( toType(atime) ); + fh_personality per = obtainPersonality( toType( perid ) ); +// m_cemblems_attach[ em ].add( per, toType(sureness), ti ); +// m_cemblems_attach[ em ].getBelief( this, em, per, +// toType(sureness), ti ); + createBelief( em, per, toType(sureness), ti ); + + } + } + } + } + else + { + fh_stringstream ss; + ss << "Medallion exists but has incorrect version:" << version; + Throw_MedallionException( tostr(ss), GetImpl(c) ); + } + + m_isDirty = false; + } + + void + Medallion::save( fh_context c ) + { + if( m_dontSave ) + return; + + Factory::ensureXMLPlatformInitialized(); + fh_etagere et = Factory::getEtagere(); + + /********************************************************************************/ + // VERSION_VALUE_V1 + /********************************************************************************/ +// DOMDocument* doc = Factory::makeDOM( "medallion" ); +// DOMElement* root = doc->getDocumentElement(); +// setAttribute( root, VERSION_KEY, VERSION_VALUE_V1 ); +// setAttribute( root, V1_ONTOLOGY_ID, et->getOntologyID() ); +// setAttribute( root, V1_MTIME_KEY, tostr(Time::getTime()) ); +// DOMElement* emblemlist = XML::createElement( doc, root, "emblemlist" ); +// for( m_cemblems_t::iterator ci = m_cemblems.begin(); +// ci != m_cemblems.end(); ++ci ) +// { +// fh_emblem em = *ci; +// DOMElement* e = XML::createElement( doc, emblemlist, "emblem" ); +// string mtime = tostr(getEmblemTimes( em )->getMTime()); + +// setAttribute( e, V1_EMBLEM_LIST_EID_KEY, tostr(em->getID()) ); +// setAttribute( e, V1_EMBLEM_LIST_MTIME_KEY, mtime ); +// } +// fh_stringstream ss = tostream( doc ); +// setStrAttr( c, getEAName(), tostr(ss), true ); +// m_isDirty = false; + + + fh_domdoc doc = Factory::makeDOM( "medallion" ); + DOMElement* root = doc->getDocumentElement(); + setAttribute( root, VERSION_KEY, VERSION_VALUE_V2 ); + setAttribute( root, V1_ONTOLOGY_ID, et->getOntologyID() ); + setAttribute( root, V1_MTIME_KEY, tostr(Time::getTime()) ); + DOMElement* emblemlist = XML::createElement( doc, root, "emblemlist" ); + for( m_cemblems_t::iterator ci = m_cemblems.begin(); + ci != m_cemblems.end(); ++ci ) + { + fh_emblem em = *ci; + DOMElement* e = XML::createElement( doc, emblemlist, "emblem" ); + setAttribute( e, V1_EMBLEM_LIST_EID_KEY, tostr(em->getID()) ); + + typedef std::list< fh_personality > plist_t; + plist_t plist = getListOfPersonalitiesWhoHaveOpinion( em ); + for( plist_t::iterator pi = plist.begin(); pi!=plist.end(); ++pi ) + { + fh_personality per = *pi; + fh_medallionBelief bel = getBelief( em, per ); + + DOMElement* pe = XML::createElement( doc, e, "belief" ); + string mtime = tostr( bel->getTimes()->getMTime()); + string atime = tostr( bel->getTimes()->getATime()); + fh_stringstream ss; + ss << bel->getSureness(); + string sureness = tostr(ss); + string perid = tostr(per->getID()); + + setAttribute( pe, V2_EMBLEM_LIST_PERSONALITY_ID_KEY, perid ); + setAttribute( pe, V2_EMBLEM_LIST_SURENESS_KEY, sureness ); + setAttribute( pe, V1_EMBLEM_LIST_MTIME_KEY, mtime ); + setAttribute( pe, V2_EMBLEM_LIST_ATIME_KEY, atime ); + } + } + fh_stringstream ss = tostream( doc ); + setStrAttr( c, getEAName(), tostr(ss), true, true, true ); + m_isDirty = false; + } + + /********************************************************************************/ + /*** USER INTERFACE *************************************************************/ + /********************************************************************************/ + + /** + * Force the assertion that this medallion should contain the given emblem + */ + void + Medallion::addEmblem( fh_emblem em ) + { + addEmblem( em, + Factory::getCurrentUserPersonality(), + MedallionBelief::SURENESS_MAX ); + } + + /** + * Force the assertion that this medallion should not contain the given emblem + */ + void + Medallion::retractEmblem( fh_emblem em ) + { + retractEmblem( em, + Factory::getCurrentUserPersonality(), + MedallionBelief::SURENESS_MIN ); + } + + /** + * Remove previous assertions and retractions, allow lower level items to offer + * hints on if this emblem shoudl be attached to the medallion but do not + * override the choice one way or the other. + */ + void + Medallion::removeEmblem( fh_emblem em ) + { + removeEmblem( em, Factory::getCurrentUserPersonality() ); + } + + bool + Medallion::hasEmblem( fh_emblem em ) + { + return hasEmblem( em, Factory::getCurrentUserPersonality() ); + } + + bool + Medallion::hasRetractedEmblem( fh_emblem em ) + { + LG_EMBLEM_D << "Medallion::hasRetractedEmblem() em:" << em->getName() << endl; + + if( hasBelief( em ) ) + { + fh_medallionBelief b = getBelief( em ); + LG_EMBLEM_D << "Medallion::hasRetractedEmblem() em:" << em->getName() + << " sureness:" << b->getSureness() + << endl; + return b->getSureness() < 0; + } + return false; + } + + + + /** + * if 'has' is true then make sure this medallion has em + * is 'has' is false then make sure the med hasn't got the emblem + */ + void + Medallion::ensureEmblem( fh_emblem em, bool has ) + { + if( has ) + { + if( !hasEmblem( em ) ) + addEmblem( em ); + } + else + { + if( hasEmblem( em ) ) + retractEmblem( em ); + } + } + + /********************************************************************************/ + /*** AGENT INTERFACE ************************************************************/ + /********************************************************************************/ + + /** + * Agents can use a personality to assign emblems to files and give + * a level of "sureness" that they feel this attachment should be done. + */ + void + Medallion::addEmblem( fh_emblem em, fh_personality pers, double judgementSureness ) + { + setDirty(); + + if( ColdEmblem* ce = dynamic_cast(GetImpl(em))) + m_cemblems.insert( ce ); + + if( judgementSureness < 0 ) + judgementSureness = -1 * judgementSureness; + + fh_medallionBelief a = obtainBelief( em, pers ); + a->setSureness( judgementSureness ); + a->getTimes()->touchATime(); + a->getTimes()->touchMTime(); + } + + void + Medallion::retractEmblem( fh_emblem em, fh_personality pers, double judgementSureness ) + { + setDirty(); + + if( ColdEmblem* ce = dynamic_cast(GetImpl(em))) + m_cemblems.insert( ce ); +// if( ColdEmblem* ce = dynamic_cast(GetImpl(em))) +// m_cemblems.erase( m_cemblems.find( ce ) ); + + if( judgementSureness > 0 ) + judgementSureness = -1 * judgementSureness; + + fh_medallionBelief a = obtainBelief( em, pers ); + a->setSureness( judgementSureness ); + a->getTimes()->touchATime(); + a->getTimes()->touchMTime(); + } + + void + Medallion::removeEmblem( fh_emblem em, fh_personality pers ) + { + setDirty(); + + bool removeEmblemAttachment = false; + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + if( m_assertions.size() <= 1 ) + removeEmblemAttachment = true; + + eraseBelief( em, pers ); + + if( removeEmblemAttachment ) + { + fh_cemblem cem = dynamic_cast(GetImpl(em)); + m_cemblems.erase(cem); + } + } + + + bool + Medallion::hasEmblem( fh_emblem em, fh_personality pers ) + { + fh_cemblem cem = dynamic_cast(GetImpl(em)); + + bool ret = m_cemblems.find( cem ) != m_cemblems.end(); + + if( ret ) + { + fh_medallionBelief b = obtainBelief( em, pers ); + b->getTimes()->touchATime(); + + return b->getSureness() > 0; + } + + return ret; + } + void + Medallion::ensureEmblem( fh_emblem em, fh_personality pers, + double judgementSureness, bool has ) + { + if( has ) + { + if( !hasEmblem( em, pers ) ) + addEmblem( em, pers, judgementSureness ); + } + else + { + if( hasEmblem( em, pers ) ) + retractEmblem( em, pers, judgementSureness ); + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + double + Medallion::getFuzzyBelief( fh_emblem em ) + { + try + { + fh_medallionBelief ub = getBelief( em ); + double s = ub->getSureness(); + if( s != MedallionBelief::SURENESS_NULL ) + return s; + } + catch( exception& e ) + {} + + double ret = MedallionBelief::SURENESS_NULL; + int count = 0; + + typedef std::list< fh_personality > plist_t; + plist_t plist = getListOfPersonalitiesWhoHaveOpinion( em ); + + for( plist_t::iterator pi = plist.begin(); pi!=plist.end(); ++pi ) + { + fh_medallionBelief bel = getBelief( em, *pi ); + ret += bel->getSureness(); + ++count; + } + + if( count ) + ret /= count; + + return MedallionBelief::clampJudgementSureness( ret ); + } + + +// fh_times +// Medallion::getEmblemTimes( fh_emblem em, fh_personality pers ) +// { +// if( !pers ) +// pers = Factory::getCurrentUserPersonality(); + +// m_cemblems_attach_t::iterator iter = m_cemblems_attach.find( em ); + +// if( iter != m_cemblems_attach.end() +// && iter->second.hasBelief( pers ) ) +// { +// return iter->second.getBelief( this, em, pers ).getTimes(); +// } + +// fh_times ti = new Times(); +// // m_cemblems_attach[ em ].add( pers, +// // MedallionBelief::SURENESS_MAX, +// // ti ); +// return ti; +// } + +// double +// Medallion::getEmblemJudgementSureness( fh_emblem em, fh_personality pers ) +// { +// if( !pers ) +// pers = Factory::getCurrentUserPersonality(); + +// m_cemblems_attach_t::iterator iter = m_cemblems_attach.find( em ); + +// if( iter != m_cemblems_attach.end() +// && iter->second.hasBelief( pers ) ) +// { +// return iter->second.getBelief( this, em, pers ).getSureness(); +// } + +// return MedallionBelief::SURENESS_NULL; +// } + + + std::list< fh_personality > + Medallion::getListOfPersonalitiesWhoHaveOpinion( fh_emblem em ) + { + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + std::list< fh_personality > ret; + + for( m_assertions_t::iterator ai = m_assertions.begin(); ai != m_assertions.end(); ++ai ) + ret.push_back( ai->first ); + + return ret; + } + + fh_medallionBelief + Medallion::getBelief( fh_emblem em, fh_personality pers ) + { + if( !pers ) + pers = Factory::getCurrentUserPersonality(); + + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + + m_assertions_t::iterator ai = m_assertions.find( pers ); + if( ai == m_assertions.end() ) + { + fh_stringstream ss; + ss << "No belief has been expressed by personality:" << pers->getName() + << " for the emblem:" << em->getName() << endl; + Throw_NoSuchBeliefException( tostr(ss), 0 ); + } + return ai->second; + + } + + bool + Medallion::hasBelief( fh_emblem em, fh_personality p ) + { + if( !p ) + p = Factory::getCurrentUserPersonality(); + + m_assertions_t& m_assertions = m_cemblems_attach[ em ]; + m_assertions_t::iterator ai = m_assertions.find( p ); + return ai != m_assertions.end(); + } + + + emblems_t + Medallion::getMostSpecificEmblems( Emblem::limitedViewPri_t cutoff ) + { + if( cutoff == Emblem::LIMITEDVIEW_PRI_USER_CONFIG ) + cutoff = Factory::getEtagere()->getLowestEmblemPriorityToShow(); + + emblems_t ret; + for( m_cemblems_t::iterator ci = m_cemblems.begin(); + ci != m_cemblems.end(); ++ci ) + { + if( (*ci)->getLimitedViewPriority() >= cutoff ) + ret.push_back( *ci ); + } + return ret; + } + + emblems_t + Medallion::getAllEmblems( Emblem::limitedViewPri_t cutoff ) + { + if( cutoff == Emblem::LIMITEDVIEW_PRI_USER_CONFIG ) + cutoff = Factory::getEtagere()->getLowestEmblemPriorityToShow(); + + emblems_t input = getMostSpecificEmblems(); + emblems_t tmp; + + for( emblems_t::iterator ci = input.begin(); ci != input.end(); ++ci ) + { + addAllParentsTransitive( tmp, *ci, cutoff ); + } + + tmp.sort(); + emblems_t::iterator end = unique( tmp.begin(), tmp.end() ); + emblems_t ret; + copy( tmp.begin(), end, back_inserter( ret ) ); + return ret; + } + +string emblemListToEAQuery( emblemset_t& el, char combineOpcode ) + { + stringstream qss; + + if( el.size() > 1 ) + { + qss << "(" << combineOpcode; + } + + bool v = true; + for( emblemset_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + if( v ) v = false; + else qss << ""; + + qss << "(emblem:id-" << em->getID() << "==1)"; + } + + if( el.size() > 1 ) + qss << ")"; + + return tostr(qss); + } + + + double DRangeToKiloMeters( double d ) + { + double kmPerDigitalDigit = 111.10527282045992; + d *= kmPerDigitalDigit; + return d; + } + + double KiloMetersToDRange( double d ) + { + double kmPerDigitalDigit = 111.10527282045992; + d /= kmPerDigitalDigit; + return d; + } + + emblemset_t& getEmblemsNear( emblemset_t& result, + fh_emblem em, + double kmrange, + fh_etagere et, + bool ShowDownSet ) + { + if( !et ) + et = ::Ferris::Factory::getEtagere(); + + double elat = em->getDigitalLatitude(); + double elong = em->getDigitalLongitude(); + + double range = KiloMetersToDRange( kmrange ); + fh_emblem geospatialem = et->getEmblemByName( "libferris-geospatial" ); + emblems_t all = geospatialem->getDownset(); + for( emblems_t::iterator ai = all.begin(); ai != all.end(); ++ai ) + { + double alat = (*ai)->getDigitalLatitude(); + double along = (*ai)->getDigitalLongitude(); + if( !alat || !along ) + continue; + if( fabs( alat - elat ) < range ) + { + if( fabs( along - elong ) < range ) + { + if( ShowDownSet ) + { + emblems_t ds = (*ai)->getDownset(); + copy( ds.begin(), ds.end(), inserter( result, result.end() ) ); + } + else + { + result.insert( *ai ); + } + } + } + } + + return result; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_emblem getFerrisSystemEmblem( fh_etagere et ) + { + if( !et ) + et = Factory::getEtagere(); + + try + { + fh_emblem ret = et->getEmblemByName( EMBLEM_TOPLEVEL_SYSTEM_NAME ); + return ret; + } + catch( EmblemNotFoundException& e ) + { + fh_cemblem ret = et->createColdEmblem( EMBLEM_TOPLEVEL_SYSTEM_NAME ); + return ret; + } + } + + + fh_emblem getShouldSkipIndexingEmblem() + { + string EMBLEM_SHOULD_SKIP_INDEXING = "should-skip-indexing"; + + static fh_emblem ret = 0; + + if( !ret ) + { + fh_etagere et = ::Ferris::Factory::getEtagere(); + fh_emblem em = getFerrisSystemEmblem( et ); + fh_emblem e = em->obtainChild( EMBLEM_SHOULD_SKIP_INDEXING ); + ret = e; + } + return ret; + } + + + fh_emblem getDummyTreeModelEmblem() + { + string EMBLEM_CHILD_SYSTEM_NAME = "system"; + string EMBLEM_CHILD_DUMMYTREEMODELEMBLEM = "dummy-gtk-tree-model-emblem"; + + static fh_emblem ret = 0; + + if( !ret ) + { + + fh_etagere et = Factory::getEtagere(); + fh_emblem em = getFerrisSystemEmblem( et ); + fh_emblem syse = em->obtainChild( EMBLEM_CHILD_SYSTEM_NAME ); + fh_emblem e = syse->obtainChild( EMBLEM_CHILD_DUMMYTREEMODELEMBLEM ); + ret = e; + } + return ret; + } + + + fh_emblem private_getAttributeRootEmblem( fh_etagere et ) + { + static fh_emblem default_etagere_ret_cache = 0; + + bool use_cache = false; + if( !et ) + use_cache = true; + else if( et == Factory::getEtagere() ) + use_cache = true; + if( use_cache && default_etagere_ret_cache ) + return default_etagere_ret_cache; + + + static const string EMBLEM_EANAMES_ORDERING_NAME = "ea-ordering"; + + if( !et ) + et = Factory::getEtagere(); + fh_emblem em = getFerrisSystemEmblem( et ); + fh_emblem ret = em->obtainChild( EMBLEM_EANAMES_ORDERING_NAME ); + + if( et == Factory::getEtagere() ) + default_etagere_ret_cache = ret; + + return ret; + } + +}; diff --git a/Ferris/Medallion.hh b/Ferris/Medallion.hh new file mode 100644 index 0000000..84a43c7 --- /dev/null +++ b/Ferris/Medallion.hh @@ -0,0 +1,1003 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Medallion.hh,v 1.21 2011/05/06 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_MEDALLIONS_H_ +#define _ALREADY_INCLUDED_FERRIS_MEDALLIONS_H_ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include "Ferris/FerrisStdHashMap.hh" + +namespace boost { + namespace serialization { + class access; + } +} + +namespace Ferris +{ + struct FERRISEXP_API fh_emblem_less + { + bool operator()( fh_emblem k1, fh_emblem k2 ); + }; + + typedef std::list< fh_emblem > emblems_t; + typedef std::set< fh_emblem, fh_emblem_less > emblemset_t; +// typedef std::set< fh_emblem > emblemset_t; + +// /** +// * Fixed hot emblems are saved into one 64bit bitmap for +// * easy indexing. +// */ +// typedef guint64 hotEmblemID_t; + + + /** + * Is the emblem 'em' in the list 'el' + */ + FERRISEXP_API bool contains( emblems_t& el, fh_emblem em ); + + bool setSkipLoadingEmblems( bool v ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Single function to associate two emblems in a parent/child + * relation. + */ + FERRISEXP_API void link( fh_emblem parent, fh_emblem child ); + FERRISEXP_API void unlink( fh_emblem parent, fh_emblem child ); + + FERRISEXP_API emblemID_t UseGetNextID( Emblem* e ); + FERRISEXP_API emblemID_t UseGetNextID_EAOrdering( Emblem* e ); + + + /** + // + // FIXME: update this crappy old comment + // +// * An emblem is a single atomic attribute that can be contained in a +// * medallion. Emblems can be either part of the fixed "hot" set which +// * are saved as a bitmap for faster searching operations or can be +// * saved in a format that favours sparse and slower usage (a cold medallion). +// * For example mastering a DVD-R one might create a new cold medallion +// * and tag all the files and directories that are part of the image of that +// * ROM. One expects far less files to be tagged than 50% of fixed storage +// * and also one would be willing to accept slower searches on this emblem. +// * +// * hot emblems are things like; favourates, anime, mydevelopment or webreadable. +// * ie. things that one might consider to be emblems in nautilus are hot +// * emblems in libferris. You want faster access to searching on hot emblems. +// * There is currently a restriction of 64bit less some control bits on hot +// * emblems. The restriction could be removed in a future release. +// * +// * First emblems being added are cold only. + */ + class FERRISEXP_API Emblem + : + public Handlable + { + typedef Emblem _Self; + friend class Etagere; + + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) + { +// // serialize base class information +// ar & boost::serialization::base_object(*this); + + ar & m_id; + ar & m_name; + ar & m_iconname; + ar & m_description; + ar & m_limitedViewPriority; + ar & m_parents; + ar & m_children; + if( version > 0 ) + { + ar & m_uniqName; + } + if( version > 1 ) + { + ar & m_isTransitiveChildOfEAOrderingRootEmblem_isValid; + ar & m_isTransitiveChildOfEAOrderingRootEmblem; + } + if( version > 2 ) + { + ar & m_digitalLatitude; + ar & m_digitalLongitude; + ar & m_zoomRange; + } + + + +// std::cerr << "version:" << version << " name:" << m_name << " UN:" << m_uniqName << std::endl; + } + + protected: + + fh_etagere m_et; + emblemID_t m_id; + std::string m_name; + std::string m_uniqName; + std::string m_iconname; + std::string m_menuSizedIconName; + std::string m_description; + double m_digitalLatitude; + double m_digitalLongitude; + double m_zoomRange; + + typedef std::set< emblemID_t > m_parents_t; + typedef std::set< emblemID_t > m_children_t; + m_parents_t m_parents; + m_children_t m_children; + + bool m_upset_cache_only_isDirty; + emblems_t m_upset_cache_only; + + bool m_isTransitiveChildOfEAOrderingRootEmblem_isValid; + bool m_isTransitiveChildOfEAOrderingRootEmblem; + + /** + * NOTE: you *must* call setup() after object creation + * If eid is zero then create a new cold emblem otherwise + * load the information for the cold emblem identified by + * eid. + */ + Emblem( fh_etagere et, emblemID_t eid = 0 ); + + typedef Loki::Functor< emblemID_t, LOKI_TYPELIST_1( Emblem* ) > getNextIDFunctor_t; + friend emblemID_t UseGetNextID( Emblem* e ); + friend emblemID_t UseGetNextID_EAOrdering( Emblem* e ); + + /** + * load or create a new ID for this Emblem + */ + void setup( getNextIDFunctor_t f = &UseGetNextID ); + + /** + * call here to mark this emblem as changed and needing to + * be save()ed to disk. Non changed emblems do nothing when + * save( false ) is called. + */ + void setDirty(); + + /** + * Have we changed. + */ + bool isDirty(); + + /** + * Get the next emblem ID that is usable and increment + * the counter so that the next call to getNextID() will + * return a different number. + */ + emblemID_t getNextID(); + emblemID_t getNextID_EAOrdering(); + + /** + * Loads all the common settings for an emblem such + * as its name, icon, description + */ + void load_common( fh_stringstream& iss ); + + /** + * Save all data loaded by load_common() + */ + void save_common( fh_ostream oss ); + + /** + * Subclasses of Emblem will usually have different key matter + * and thus will obtain their data from many places. The load + * is performed via priv_load() which should pass an istream to + * load_common() to load the common emblem data. Common emblem + * data may be versioned to allow forward migration. + */ + virtual void priv_load() = 0; + + /** + * @see priv_load() + */ + virtual void priv_save() = 0; + + void save( bool force = false ); + void load(); + + /** + * associate two emblems in a parent - child relation + */ + friend void link( fh_emblem parent, fh_emblem child ); + friend void unlink( fh_emblem parent, fh_emblem child ); + /** + * use the link() function to obtain access to addParent() and addChild() + * in a single function call. + */ + void addParent( fh_emblem em ); + void addChild( fh_emblem em ); + void removeParent( fh_emblem em ); + void removeChild( fh_emblem em ); + + + public: + + emblemID_t getID() const; + + emblems_t getParents(); + emblems_t getChildren(); + bool hasChildren(); + + /** + * Mainly for migration method, update m_children and m_parents taking into + * account for emblem IDs which do not exist anymore. This method shouldn't + * be needed normally. + */ + void forceUpdateParentsAndChildrenIDs(); + + + const emblems_t& getUpset(); + emblems_t getDownset(); + + /** + * Possible parents are non transtive parents and other emblems + * which are not transitive children + */ + emblems_t getPossibleParents(); + + /** + * Get a list of emblems which could be added as children of this + * emblem + */ + emblems_t getPossibleChildren(); + + /** + * Is the passed emblem a parent of this emblem + */ + bool hasParent( fh_emblem em ); + bool hasChild( fh_emblem em ); + + /** + * If there is a child which has the name given then return it + * otherwise create a new emblem which is a child of this one + * and return it. + * + * Useful in apps which are wanting to quickly find or setup + * an emblem ordering + */ + fh_emblem obtainChild( const std::string& name ); + fh_emblem obtainChild_EAOrdering( const std::string& name ); + + /** + * Get the child emblem by name. An exception is thrown if + * there is no such child + * + * @throws EmblemNotFoundException + * @see hasChild() + * @see obtainChild() + */ + fh_emblem findChild( const std::string& name ); + + std::string getName(); + std::string getUniqueName(); + std::string getIconName(); + std::string getMenuSizedIconName(); + std::string getDescription(); + + void setName( const std::string& v ); + void setIconName( const std::string& v ); + void setMenuSizedIconName( const std::string& v ); + void setDescription( const std::string& v ); + + double getDigitalLatitude(); + double getDigitalLongitude(); + double getZoomRange(); + void setDigitalLatitude( double v ); + void setDigitalLongitude( double v ); + void setZoomRange( double v ); + + + /** + * Some views like inline icons in a treelist have very limited + * space. One can set ShowInLimitedViews to false to avoid cluttering + * such limited views with too many emblems. + */ + enum limitedViewPri_t { + LIMITEDVIEW_PRI_USER_CONFIG = -101, //< Use the cutoff that the user has set + LIMITEDVIEW_PRI_LOW = -100, + LIMITEDVIEW_PRI_DEFAULT = 0, + LIMITEDVIEW_PRI_HI = 100 + }; + limitedViewPri_t getLimitedViewPriority(); + void setLimitedViewPriority( limitedViewPri_t v ); + + /** + * emblem is the emblem that is changing, the first string is the old icon + * name and the second string is the new iconname + */ + typedef sigc::signal3< void, fh_emblem, std::string, std::string > IconName_Changed_Sig_t; + IconName_Changed_Sig_t& getIconName_Changed_Sig(); + IconName_Changed_Sig_t& getMenuSizedIconName_Changed_Sig(); + + /** + * When a new parent has been added this is fired. + * the first parameter is the emblem itself, the second is the new parent + */ + typedef sigc::signal2< void, fh_emblem, fh_emblem > AddedParent_Sig_t; + AddedParent_Sig_t& getAddedParent_Sig(); + + /** + * When a new child has been added this is fired. + * the first parameter is the emblem itself, the second is the new child + */ + typedef sigc::signal2< void, fh_emblem, fh_emblem > AddedChild_Sig_t; + AddedChild_Sig_t& getAddedChild_Sig(); + + /** + * When a parent has been removed this is fired. + * the first parameter is the emblem itself, the second is the old parent + */ + typedef sigc::signal2< void, fh_emblem, fh_emblem > RemovedParent_Sig_t; + RemovedParent_Sig_t& getRemovedParent_Sig(); + + /** + * When a child has been removed this is fired. + * the first parameter is the emblem itself, the second is the old child + */ + typedef sigc::signal2< void, fh_emblem, fh_emblem > RemovedChild_Sig_t; + RemovedChild_Sig_t& getRemovedChild_Sig(); + + /** + * Dump the emblem info as XML to the given stream + */ + virtual void dumpTo( fh_ostream oss ); + + /** + * Returns true if this emblem is a (transitive) child of the EA Ordering emblem. + */ + bool isTransitiveChildOfEAOrderingRootEmblem(); + + /** + * Update the cache used by isTransitiveChildOfEAOrderingRootEmblem() + * this should only be needed in rare cases for migration etc. + */ + void forceUpdateTransitiveChildOfEAOrderingRootEmblem(); + private: + + void updateTransitiveChildrenProperty_ChildOfEAOrderingRootEmblem( bool v ); + + IconName_Changed_Sig_t IconName_Changed_Sig; + IconName_Changed_Sig_t MenuSizedIconName_Changed_Sig; + AddedParent_Sig_t AddedParent_Sig; + AddedChild_Sig_t AddedChild_Sig; + RemovedParent_Sig_t RemovedParent_Sig; + RemovedChild_Sig_t RemovedChild_Sig; + + limitedViewPri_t m_limitedViewPriority; + }; + + /** + * Cold emblems store a unique integer as their primary + * identifier in a medallion. A zero value for the integer + * is undefined. + */ + class FERRISEXP_API ColdEmblem + : + public Emblem + { + typedef ColdEmblem _Self; + typedef Emblem _Base; + friend class Etagere; + + void setEtagere( fh_etagere et ); + +// friend class boost::serialization::access; +// template +// void serialize(Archive & ar, const unsigned int version) +// { +// // serialize base class information +// ar & boost::serialization::base_object(*this); +// } + + + /** + * db file where cold emblems being saved + */ + std::string getDBPath(); + + /** + * cache the open database + */ +// typedef FERRIS_STD_HASH_MAP< std::string, STLdb4::fh_database > m_dbcache_t; + STLdb4::fh_database getDB(); + + /** + * Only create cold emblems using Load() + */ + ColdEmblem( fh_etagere et, emblemID_t eid ); + + /** + * If eid is zero then create a new cold emblem otherwise + * load the information for the cold emblem identified by + * eid. + */ + static fh_cemblem Load( fh_etagere et, emblemID_t eid = 0, getNextIDFunctor_t f = &UseGetNextID ); +// static fh_cemblem Load_EAOrdering( fh_etagere et, emblemID_t eid = 0 ); + + protected: + virtual void priv_load(); + virtual void priv_save(); +// STLdb4::fh_database getDBCache( const std::string& k ); + STLdb4::fh_database m_db; + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + /** + * For testing its nice to be able to set the default etagere + * to someplace in /tmp that has been setup for it. Set it to + * zero to revert to the default etagere that getEtagere() gives + * initially. + * + * Mainly useful for testing but also handy if any app wants to + * have its own private medallion tree. + */ + FERRISEXP_API void setDefaultEtagere( fh_etagere et = 0 ); + + /** + * get the default etagere + */ + FERRISEXP_API fh_etagere getEtagere(); + + /** + * Create a new etagere at the path given + */ + FERRISEXP_API fh_etagere makeEtagere( const std::string& path ); + } + + /** + * Emblems are ordered in a partial order instead of a tree. The main + * impact of this on a tree based design being that a single emblem + * can have more than one parent. This anime can be both a subemblem of + * video and faviourates. + * + * For medallions owned by the same person, ie. user on a machine, + * there should only be one Etagere which arranges the emblems. + * Note that changing the ordering of the Etagere by adding a new + * parent to an emblem should automatically effect all the emblems + * for that user. + * + * From wordnet: + * 1. etagere -- (a piece of furniture with open shelves for displaying small ornaments) + */ + class FERRISEXP_API Etagere + : + public Handlable + { + friend class Medallion; + friend class Emblem; + friend fh_etagere Factory::getEtagere(); + friend fh_etagere Factory::makeEtagere( const std::string& path ); + + typedef std::map< emblemID_t, fh_cemblem > m_cemblems_t; + m_cemblems_t m_cemblems; + typedef std::multimap< std::string, fh_cemblem > m_cemblemsByName_t; + m_cemblemsByName_t m_cemblemsByName; + + typedef std::set< emblemID_t > eset_t; + eset_t m_newEmblemIDs; + + std::string m_basepath; + + bool m_isDirty; + bool m_haveLoadedAll; + + void loadAllEmblems(); + void saveAllEmblems( bool force = false ); + + template< class ArchiveClassT > + void loadAllEmblems( ArchiveClassT& archive ); + template< class ArchiveClassT > + void saveAllEmblems( ArchiveClassT& archive ); + + +// fh_emblem getHotEmblem( hotEmblemID_t eid ); + fh_cemblem getColdEmblem( emblemID_t eid ); + + Etagere( const std::string& basepath = "" ); + + void dump(); + + /** + * call here to mark this etagere as changed and needing to + * be save()ed to disk. Non changed etageres do nothing when + * saveAllEmblems( false ) is called. + */ + void setDirty(); + + /** + * Have we changed. + */ + bool isDirty(); + + /** + * get the db4 file that the etagere is saved in + */ + STLdb4::fh_database m_db; + STLdb4::fh_database getDB(); + + fh_cemblem createColdEmblem_common( fh_cemblem em ); + + public: + virtual ~Etagere(); + void sync(); + + emblems_t& getAllEmblemsWithName( emblems_t& ret, const std::string& name ); + emblemset_t& getAllEmblemsWithName( emblemset_t& ret, const std::string& name ); + fh_emblem obtainEmblemByName( const std::string& name ); + fh_emblem getEmblemByName( const std::string& name ); + fh_emblem getEmblemByUniqueName( const std::string& name ); +// bool isEmblemNameUnique( const std::string& name ); + fh_emblem getEmblemByID( emblemID_t id ); + emblems_t getAllEmblems(); + emblems_t getAllEmblemsUniqueName(); + + typedef Loki::Functor< void, LOKI_TYPELIST_1( const fh_emblem& ) > f_emblemVisitor; + void visitAllEmblems( const f_emblemVisitor& f ); + + /** + * Each medallion should know what etagere it belongs to by + * checking this value. + */ + std::string getOntologyID(); + + Emblem::limitedViewPri_t getLowestEmblemPriorityToShow(); + void setLowestEmblemPriorityToShow( Emblem::limitedViewPri_t v ); + + void erase( fh_emblem em ); + + /** + * Dump the structure of the etagere as XML to the given stream + */ + void dumpTo( fh_ostream oss ); + + + /********************/ + /*** factory ********/ + /********************/ + + fh_cemblem createColdEmblem( const std::string& name = "new emblem" ); + fh_cemblem createColdEmblem_EAOrdering( const std::string& name = "new emblem" ); + + + /********************/ + /*** paths **********/ + /********************/ + + /** + * base path where this Etagere is being saved + */ + std::string getBasePath(); + + /** + * db file where etagere metadata is being saved + */ + std::string getDBPath(); + + + /** + * path for new boost serialization file + */ + std::string getBoostSerializePath(); + std::string getBoostSerializePathTxt(); + + /********************/ + /*** signals ********/ + /********************/ + + /** + * When a new emblem has been created this is fired. + * the first parameter is the etagere, the second is the new child + */ + typedef sigc::signal2< void, fh_etagere, fh_emblem > EmblemCreated_Sig_t; + EmblemCreated_Sig_t& getEmblemCreated_Sig(); + + /** + * When a new child has been added this is fired. + * the first parameter is the etagere, the second is the new child + */ + typedef sigc::signal2< void, fh_etagere, fh_emblem > AddedChild_Sig_t; + AddedChild_Sig_t& getAddedChild_Sig(); + + /** + * When a child has been removed this is fired. + * the first parameter is the etagere, the second is the old child + */ + typedef sigc::signal2< void, fh_etagere, fh_emblem > RemovedChild_Sig_t; + RemovedChild_Sig_t& getRemovedChild_Sig(); + + /** + * Out of process signal updates. + */ + void OnOutOfProcNewEmblemNotification( std::set< emblemID_t >& eset ); + + protected: + + void priv_emblemBeingRenamed( fh_cemblem e, + const std::string& oldn, + const std::string& newn ); + + + + private: + + EmblemCreated_Sig_t EmblemCreated_Sig; + AddedChild_Sig_t AddedChild_Sig; + RemovedChild_Sig_t RemovedChild_Sig; + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_API Times + : + public Handlable + { + time_t m_mtime; + time_t m_atime; + public: + Times(); + + void setATime( time_t t = 0 ); + void setMTime( time_t t = 0 ); + + void touchATime(); + void touchMTime(); + + time_t getATime(); + time_t getMTime(); + }; + FERRIS_SMARTPTR( Times, fh_times ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * a belief that is held for a medallion, about an emblem by a given + * personality at a point in time. + * + * retraction is supported by a negative sureness and positive sureness + * represents assertion. + * + * Various interesting metadata about the belief is available from this object. + */ + class FERRISEXP_API MedallionBelief + : + public Handlable + { + typedef Handlable _Base; + NOT_COPYABLE( MedallionBelief ); + friend class Medallion; + + Medallion* m_medallion; + fh_emblem m_emblem; + fh_personality m_personality; + double m_sureness; + mutable fh_times m_times; + + MedallionBelief( Medallion* m, fh_emblem em, fh_personality p, + double sureness = 0, fh_times t = 0 ); + MedallionBelief(); + + protected: + + void setSureness( double v ); + + public: + virtual ~MedallionBelief(); + + enum { + SURENESS_MAX = 100, + SURENESS_NULL = 0, + SURENESS_MIN = -100 + }; + + fh_medallion getMedallion() const; + fh_emblem getEmblem() const; + fh_personality getPersonality() const; + fh_times getTimes() const; + double getSureness() const; + + static double clampJudgementSureness( double ); + + /********************************************************************************/ + /*** This is a little tricky. We expect to be in a collection that medallion ****/ + /*** holds and thus to exist with an rc of 1 while the medallion lives. ****/ + /*** However, since handles to the belief can be obtained by the developer ****/ + /*** we have to bump/drop the medallion reference count with ours so that ****/ + /*** the medallion is still existing if there are external handles to a ****/ + /*** belief that references a medallion *****************************************/ + /********************************************************************************/ +// virtual ref_count_t AddRef(); +// virtual ref_count_t Release(); + }; + + + + /** + * A medallion is the collection of emblems that a particular fh_context + * object holds. There are convenience methods to allow one to interact + * with the emblem partial order and get at the emblems that are contained + * in this medallion easily. + * + * Note that a flyweight pattern is used on the emblems, ie. The emblem + * for anime is shared between both the main partial ordering and each + * medallion containing that emblem. + */ + class FERRISEXP_API Medallion + : + public CacheHandlable + { + fh_context m_context; + bool m_isDirty; //< Has the medallion changed + bool m_dontSave; //< If there is a medallion on disk that we want to not change (eg from other onto) + + /********************************************************************************/ + // internal data structures as at VERSION_VALUE_V1 + /********************************************************************************/ +// typedef std::set< fh_cemblem > m_cemblems_t; +// m_cemblems_t m_cemblems; +// typedef std::map< fh_emblem, fh_times > m_cemblems_times_t; +// m_cemblems_times_t m_cemblems_times; + + /********************************************************************************/ + // internal data structures as at VERSION_VALUE_V2 + /********************************************************************************/ + + fh_medallionBelief createBelief( fh_emblem em, fh_personality p, + double sureness = MedallionBelief::SURENESS_NULL, + fh_times t = 0 ); + fh_medallionBelief obtainBelief( fh_emblem em, fh_personality p, + double sureness = MedallionBelief::SURENESS_NULL, + fh_times t = 0 ); + + void eraseBelief( fh_emblem em, fh_personality p ); + +// struct JudgementList +// { +// typedef std::map< fh_personality, fh_medallionBelief > m_assertions_t; +// m_assertions_t m_assertions; + +// /** +// * Get the belief for the given personality. Create it if its not +// * already there. +// */ +// fh_medallionBelief getBelief( Medallion* m, fh_emblem em, fh_personality p, +// double sureness = MedallionBelief::SURENESS_NULL, +// fh_times t = new Times() ); + +// /** +// * make the attachment as though it never happened, different to a +// * retraction in that with this method the original assertion is forgoten +// * and it is like nothing was done to start with +// */ +// void eraseBelief( fh_personality p ); + +// /** +// * Check if the given personality has a belief about this emblem/medallion combo +// */ +// bool hasBelief( fh_personality p ); + +// std::list< fh_personality > getListOfPersonalitiesWhoHaveOpinion(); +// }; + typedef std::set< fh_cemblem > m_cemblems_t; + m_cemblems_t m_cemblems; +// typedef std::map< fh_emblem, JudgementList > m_cemblems_attach_t; + typedef std::map< fh_personality, fh_medallionBelief > m_assertions_t; + typedef std::map< fh_emblem, m_assertions_t > m_cemblems_attach_t; + m_cemblems_attach_t m_cemblems_attach; + + + friend class Context; + Medallion( fh_context c ); + + std::string getEAName(); + void load( fh_context c ); + void save( fh_context c ); + + void setDirty(); + + public: + virtual ~Medallion(); + + /********************************************************************************/ + /*** USER INTERFACE *************************************************************/ + /********************************************************************************/ + + void addEmblem( fh_emblem em ); + void retractEmblem( fh_emblem em ); + void removeEmblem( fh_emblem em ); + bool hasEmblem( fh_emblem em ); + bool hasRetractedEmblem( fh_emblem em ); + void ensureEmblem( fh_emblem em, bool has ); + + /********************************************************************************/ + /*** AGENT INTERFACE ************************************************************/ + /********************************************************************************/ + + void addEmblem( fh_emblem em, fh_personality pers, double judgementSureness ); + void retractEmblem( fh_emblem em, fh_personality pers, double judgementSureness ); + void removeEmblem( fh_emblem em, fh_personality pers ); + bool hasEmblem( fh_emblem em, fh_personality pers ); + void ensureEmblem( fh_emblem em, fh_personality pers, double judgementSureness, bool has ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Get a resolution of all the assertion/retraction statements offered by all + * personalities for the emblem as a rating from -100 to 100 as to what the + * current guess is on if the emblem should be attached. + */ + double getFuzzyBelief( fh_emblem em ); + + /** + * A list of personalities who have asserted or retracted for this medallion + * about a given emblem + */ + std::list< fh_personality > getListOfPersonalitiesWhoHaveOpinion( fh_emblem em ); + + /** + * If a personality has expressed a belief on this medallion relating to + * the given emblem then return that belief. Otherwise throw an exception. + * + * @param em Emblem to find change times for + * @param pers Personality that made the assertion or retraction. Default is + * the primary user personality + * @throws NoSuchBeliefException + */ + fh_medallionBelief getBelief( fh_emblem em, fh_personality pers = 0 ); + + /** + * Check if a personality has expressed a belief on this medallion relating to + * the given emblem + * + * @param em Emblem to find change times for + * @param pers Personality that made the assertion or retraction. Default is + * the primary user personality + */ + bool hasBelief( fh_emblem em, fh_personality p = 0 ); + +// /** +// * Get the times that an operation was performed on this medallion +// * with the given emblem and personality +// * +// * @param em Emblem to find change times for +// * @param pers Personality that made the assertion or retraction. Default is +// * the primary user personality +// * @return the times information for the last assertion/retraction made by pers. +// */ +// fh_times getEmblemTimes( fh_emblem em, fh_personality pers = 0 ); + +// /** +// * Get the sureness about an assertoin/retraction on this medallion +// * with the given emblem and personality +// * +// * @param em Emblem to find change times for +// * @param pers Personality that made the assertion or retraction. Default is +// * the primary user personality +// * @return the sureness of the judgement made by the given personality for this emblem. +// */ +// double getEmblemJudgementSureness( fh_emblem em, fh_personality pers = 0 ); + + virtual void sync(); + + /** + * This gets only the most derived emblems that this medallion + * contains using the current Etagere as a mapping. + * + * @param cutoff for GUI display one can set the lowest priority emblem + * that they are interested in. Matching emblems with a lower + * priority are ignored. default is set by user in a capplet + */ + emblems_t getMostSpecificEmblems( Emblem::limitedViewPri_t cutoff = Emblem::LIMITEDVIEW_PRI_USER_CONFIG ); + + /** + * This gets all the emblems that this medallion contains using + * the current Etagere as a mapping. ie. the return value is + * x = getMostSpecificEmblems() plus all the transitive parents + * of x included only once. + * + * @param cutoff for GUI display one can set the lowest priority emblem + * that they are interested in. Matching emblems with a lower + * priority are ignored. default is set by user in a capplet + */ + emblems_t getAllEmblems( Emblem::limitedViewPri_t cutoff = Emblem::LIMITEDVIEW_PRI_USER_CONFIG ); + + /** + * load the medallion again. used by the out-of-proc engine to + * update all medallions in each process when sync() is called. + * + * To prevent strange data loss it is an error to call this + * method on a dirty medallion + */ + void reload(); + }; + + /** + * make an EA Query string like + * (emblem:has-foo)(emblem:has-bar) + * but using them emblem IDs and if logicalOr==false then combine with + * logical and + */ + std::string emblemListToEAQuery( emblemset_t& el, char combineOpcode = '|' ); + double DRangeToKiloMeters( double d ); + double KiloMetersToDRange( double d ); + emblemset_t& getEmblemsNear( emblemset_t& result, + fh_emblem em, + double kmrange, + fh_etagere et = 0, + bool ShowDownSet = false ); + +}; + +namespace Loki +{ + template + < + typename T, + template class OP, + class CP, + template class KP, + template class SP + > + inline bool operator<(const SmartPtr& lhs, const ::Ferris::Emblem* rhs) + { + return lhs->getID() < rhs->getID(); + } +}; + +#endif diff --git a/Ferris/Medallion_private.hh b/Ferris/Medallion_private.hh new file mode 100644 index 0000000..ed0d22d --- /dev/null +++ b/Ferris/Medallion_private.hh @@ -0,0 +1,67 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Medallion_private.hh,v 1.5 2010/09/24 21:30:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_MEDALLION_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_MEDALLION_PRIV_H_ + +#include +#include + +namespace Ferris +{ + /** + * As some relations can be captured using emblems nicely + * such as agent personalities, xlinks, annotation, we reserve + * a single top level emblem "libferris" for a system emblem + * partial ordering. + * + * This function will get the top level "libferris" emblem and + * make it if its not already there. + * + * @param et The Etagere to use, the default is to use the default + * for this user. + */ + FERRISEXP_API fh_emblem getFerrisSystemEmblem( fh_etagere et = 0 ); + + FERRISEXP_API fh_emblem getDummyTreeModelEmblem(); + + /** + * This gets called quite often just to get the EMBLEM_EANAMES_ORDERING_NAME + * emblem which is the child of getFerrisSystemEmblem() + * Thus we cache the result for the default etagere. + */ + FERRISEXP_API fh_emblem private_getAttributeRootEmblem( fh_etagere et = 0 ); + + /** + * If a file has this emblem, then don't try to index it. + */ + FERRISEXP_API fh_emblem getShouldSkipIndexingEmblem(); + +}; +#endif diff --git a/Ferris/MetadataServer.cpp b/Ferris/MetadataServer.cpp new file mode 100644 index 0000000..984fbf1 --- /dev/null +++ b/Ferris/MetadataServer.cpp @@ -0,0 +1,346 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MetadataServer.cpp,v 1.5 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +#include "MetadataServer_private.hh" +#include + +//#include "DBusGlue/ferris-internal-metadata-broker-client-glue.h" +#include "DBusGlue/broker_interface.h" +#include "DBusGlue/broker_interface.cpp" +#include "DBusGlue/worker_interface.h" +#include "DBusGlue/worker_interface.cpp" + + +#include + + + +using namespace std; + +namespace Ferris +{ + static const char* DBUS_SERVER_NAME = "com.libferris.Metadata.Broker"; + static const char* DBUS_SERVER_PATH = "/com/libferris/Metadata"; + + + namespace + { + class MetadataBrokerHandler : public QObject + { + Q_OBJECT; + public: + int m_getCount; + int m_putCount; + bool is_error; + string errormsg; + bool running; + QByteArray value; + + + MetadataBrokerHandler( QObject* parent = 0 ) + : + QObject( parent ), + m_getCount(0) + { + } + + void run() + { + LG_MDSERV_D << "run() running:" << running << endl; +// dispatcher->enter(); +// while( running ) +// g_main_iteration( true ); + + while( running ) + { + QCoreApplication::processEvents( QEventLoop::AllEvents, 20 ); + } + LG_MDSERV_D << "run() completed running:" << running << endl; + + } + + public slots: + + + void onAsyncGetFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc) + { + LG_MDSERV_D << "onAsyncGetFailed() " + << " earl:" << tostr(earl) + << " ename:" << tostr(ename) + << " edesc:" << tostr(edesc) + << endl; + // cerr << "onAsyncGetFailed() " + // << " earl:" << tostr(earl) + // << " ename:" << tostr(ename) + // << " edesc:" << tostr(edesc) + // << endl; + + this->is_error = 1; + this->value.clear(); + this->errormsg = tostr(edesc); + running = false; + } + + void onAsyncGetResult(int reqid, const QString &earl, const QString &name, const QByteArray &value) + { + LG_MDSERV_D << "onAsyncGetResult() req:" << reqid + << " earl:" << tostr(earl) + << " rdn:" << tostr(name) + << " value:" << tostr(value) + << endl; + // cerr << "onAsyncGetResult() req:" << reqid + // << " earl:" << tostr(earl) + // << " rdn:" << tostr(name) + // << " value:" << tostr(value) + // << endl; + + this->is_error = 0; + this->value = value; + this->errormsg = ""; + running = false; + } + + void onAsyncPutCommitted(int reqid, const QString &earl, const QString &name) + { + cerr << "onAsyncPutCommitted() req:" << reqid + << " earl:" << tostr(earl) + << " rdn:" << tostr(name) + << endl; + running = false; + } + + void onAsyncPutFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc ) + { + cerr << "onAsyncPutFailed() " + << " earl:" << tostr(earl) + << " ename:" << tostr(ename) + << " edesc:" << tostr(edesc) + << endl; + running = false; + } + + + + }; + + }; + + + + std::string syncMetadataServerGet( const std::string& earl, + const std::string& rdn ) + { + LG_MDSERV_D << "syncMetadataServerGet()" << endl; + + ensureQApplication(); + + LG_MDSERV_D << "done setting a dispatcher..." << endl; + MetadataBrokerHandler handler( 0 ); + broker* client = new broker( + DBUS_SERVER_NAME, DBUS_SERVER_PATH, + QDBusConnection::sessionBus(), &handler ); + + QObject::connect( + client, SIGNAL(asyncGetFailed(int, const QString &, int , const QString &, const QString &)), + &handler, SLOT(onAsyncGetFailed(int, const QString &, int , const QString &, const QString &))); + QObject::connect( + client, SIGNAL(asyncGetResult(int, const QString&, const QString&, const QByteArray& )), + &handler, SLOT(onAsyncGetResult(int, const QString&, const QString&, const QByteArray& ))); + QObject::connect( + client, SIGNAL(asyncPutFailed(int, const QString &, int , const QString &, const QString &)), + &handler, SLOT(onAsyncPutFailed(int, const QString &, int , const QString &, const QString &))); + QObject::connect( + client, SIGNAL(asyncPutCommitted(int, const QString&, const QString& )), + &handler, SLOT(onAsyncPutCommitted(int, const QString&, const QString& ))); + + LG_MDSERV_D << "Calling asyncGet() earl:" << earl << " rdn:" << rdn << endl; + handler.running = true; + + int rc = client->asyncGet( earl.c_str(), rdn.c_str() ); + LG_MDSERV_D << "Calling asyncGet() rc:" << rc << endl; + + LG_MDSERV_D << "Calling run()" << endl; + handler.run(); + + LG_MDSERV_D << "Have a reply is_error:" << handler.is_error << endl; + if( handler.is_error ) + { + stringstream ss; + ss << "error:" << handler.errormsg; + Throw_DBusException( ss.str(), 0 ); + } + + string ret( handler.value.begin(), handler.value.end() ); + return ret; + } + + void syncMetadataServerPut( const std::string& earl, + const std::string& rdn, + const std::string& value ) + { + LG_MDSERV_D << "FIXME!" << endl; + Throw_DBusException( "not implemented", 0 ); + } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + // static guint glib_idle_timeout_ID = 0; + // static gint glib_idle_timeout_func(gpointer data) + // { + // bool* running = (bool*)data; + // (*running) = false; + // } + + // void resetup_glib_idle_to_close_callback_function( int interval, bool* running ) + // { + // if( glib_idle_timeout_ID ) + // g_source_remove( glib_idle_timeout_ID ); + // glib_idle_timeout_ID = g_timeout_add_seconds( + // interval, GSourceFunc(glib_idle_timeout_func), 0 ); + // } + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + stringset_t& getImageMetadataAttributes() + { + static stringset_t* ret = 0; + if( !ret ) + { + ret = new stringset_t; + string alist = "depth-per-color,depth,gamma,has-alpha,aspect-ratio,width,height,rgba-32bpp,megapixels"; + Util::parseCommaSeperatedList( alist, *ret ); + } + return *ret; + } + + bool isImageMetadataAttribute( const std::string& rdn ) + { + return( getImageMetadataAttributes().end() == getImageMetadataAttributes().find( rdn ) ); + } + + s_ImageEAGeneratorsExtensionToShortName_t& getOutOfProcess_ImageEAGeneratorsExtensionToShortName() + { + static s_ImageEAGeneratorsExtensionToShortName_t* ret = 0; + if( !ret ) + { +// string shortNamesToUseString = "xine,imlib2,jpeg,magick,png"; + string shortNamesToUseString = getStrSubCtx( "~/.ferris/use-out-of-process-metadata-plugins", + "xine,imlib2,jpeg,magick,png" ); + + ret = new s_ImageEAGeneratorsExtensionToShortName_t(); + s_ImageEAGeneratorsExtensionToShortName_t& all = getImageEAGeneratorsExtensionToShortName(); + stringset_t shortNamesToUse; + Util::parseCommaSeperatedList( shortNamesToUseString, shortNamesToUse ); + + s_ImageEAGeneratorsExtensionToShortName_t::iterator iter = all.begin(); + s_ImageEAGeneratorsExtensionToShortName_t::iterator e = all.end(); + + for( ; iter != e; ++iter ) + { + string shortname = iter->second.first; + if( shortNamesToUse.end() != shortNamesToUse.find( shortname ) ) + { + ret->insert( *iter ); + } + } + + } + return *ret; + } + + const stringset_t& + getOutOfProcess_EAGeneratorsStaticFactoriesShortNamesToUse() + { + string shortNamesToUseString = "xine,kde3_metadata"; + static stringset_t shortNamesToUse; + Util::parseCommaSeperatedList( shortNamesToUseString, shortNamesToUse ); + cerr << "shortNamesToUse.sz:" << shortNamesToUse.size() << endl; + return shortNamesToUse; + } + + + StaticEAGenFactorys_t& + getOutOfProcess_EAGeneratorsStaticFactories( StaticEAGenFactorys_t& ret ) + { + const stringset_t& shortNamesToUse = getOutOfProcess_EAGeneratorsStaticFactoriesShortNamesToUse(); + + StaticEAGenFactorys_t& fac = getStaticLinkedEAGenFactorys(); + StaticEAGenFactorys_t::iterator end = fac.end(); + for( StaticEAGenFactorys_t::iterator fi = fac.begin(); fi != end; ++fi ) + { + fh_StaticMatchedEAGeneratorFactory f = *fi; + string sn = f->getShortName(); + cerr << "sn:" << sn << endl; + if( shortNamesToUse.end() != shortNamesToUse.find( sn ) ) + { + ret.push_back( f ); + } + } + + cerr << "MetadataBrokerDispatchInformation() selected factories sz:" + << ret.size() << endl; + + return ret; + } + + bool isOutOfProcessMetadataAttribute( const std::string& rdn ) + { + static stringset_t col; + if( col.empty() ) + { + string alist = ""; + + // Xine EA + alist += "width,height,bitrate,can-seek,video-channel-count,video-stream-count,video-bitrate,"; + alist += "video-bitrate-fourcc,xine-can-play-video,audio-channel-count,audio-bitrate,"; + alist += "audio-bitrate-fourcc,xine-can-play-audio,has-video,has-audio,title,comment,artist,"; + alist += "genre,album,year,"; + + Util::parseCommaSeperatedList( alist, col ); + } + + return col.end() != col.find( rdn ); + } + + +} + +#include "MetadataServer_moc_impl.cpp" diff --git a/Ferris/MetadataServer_private.hh b/Ferris/MetadataServer_private.hh new file mode 100644 index 0000000..c625bff --- /dev/null +++ b/Ferris/MetadataServer_private.hh @@ -0,0 +1,74 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MetadataServer_private.hh,v 1.5 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_METADATA_SERVER_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_METADATA_SERVER_PRIV_H_ + +#include +#include +#include + +#include + +#include +#include + + + +namespace Ferris +{ +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility push(default) +#endif + + std::string syncMetadataServerGet( const std::string& earl, + const std::string& rdn ); + void syncMetadataServerPut( const std::string& earl, + const std::string& rdn, + const std::string& value ); + +// void resetup_glib_idle_to_close_callback_function( int interval, bool* running ); + + + stringset_t& getImageMetadataAttributes(); + bool isImageMetadataAttribute( const std::string& rdn ); + s_ImageEAGeneratorsExtensionToShortName_t& getOutOfProcess_ImageEAGeneratorsExtensionToShortName(); + + + StaticEAGenFactorys_t& getOutOfProcess_EAGeneratorsStaticFactories( StaticEAGenFactorys_t& ret ); + const stringset_t& getOutOfProcess_EAGeneratorsStaticFactoriesShortNamesToUse(); + + bool isOutOfProcessMetadataAttribute( const std::string& rdn ); + + +#ifdef GCC_HASCLASSVISIBILITY +#pragma GCC visibility pop +#endif +}; +#endif diff --git a/Ferris/Mime.cpp b/Ferris/Mime.cpp new file mode 100644 index 0000000..39e0783 --- /dev/null +++ b/Ferris/Mime.cpp @@ -0,0 +1,238 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Mime.cpp,v 1.3 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" +#include "Mime.hh" +#include "Trimming.hh" + +using namespace std; + +namespace Ferris +{ + + static string getDesktopFileValue( fh_context c, + const std::string& k, + const std::string& def = "", + bool throwEx = true ) + { + fh_istream ss = c->getIStream(); + string s; + + while( getline(ss,s) ) + { + if( string::npos == s.find("=") ) + continue; + + if( s.substr( 0, s.find("=") ) == k ) + return s.substr( s.find("=")+1 ); + } + + if( !throwEx ) + return def; + + fh_stringstream ess; + ess << "Desktop file:" << c->getURL() << "\ncontains no data for key:" << k; + Throw_DesktopFileKeyNotFound( tostr(ess), 0 ); + } + + + /** + * Import a .desktop file (desktopc) into the location (destc) + * + * @param destc The db4 directory where the desktopc file should be imported into + * note that this is the parent of where the new context should be created + * @param desktopc The .desktop file to import + */ + void importDesktopFileTo( fh_context parentc, fh_context desktopc ) + { + fh_context dbc = Shell::CreateDir( parentc, + getDesktopFileValue( desktopc, "Name" ) ); + +// cerr << "importDesktopFile(p,d) dbc:" << dbc->getURL() << endl; + + if( getDesktopFileValue(desktopc,"Type", "", false ) == "Scheme" ) + { + setStrAttr( dbc, "ferris-scheme", + getDesktopFileValue(desktopc,"Exec"), true, true ); + } + else + { + setStrAttr( dbc, "ferris-exe", + getDesktopFileValue(desktopc,"Exec"), true, true ); + } + + setStrAttr( dbc, "ferris-handles-urls", + tostr(isTrue(getDesktopFileValue(desktopc,"Handles_Urls", "0",false))), + true, true ); + + setStrAttr( dbc, "ferris-open-dir-when-no-files-selected", + tostr(isTrue(getDesktopFileValue( + desktopc,"Open_Directory_When_No_Files_Selected", "0",false))), + true, true ); + + setStrAttr( dbc, "ferris-opens-many", + tostr(isTrue( getDesktopFileValue(desktopc,"MultipleArgs","false",false))), + true, true ); + + string iconpath = getDesktopFileValue(desktopc,"Icon"); + if( !starts_with( iconpath, "/" ) + && !starts_with( iconpath, "icons://" ) + && !starts_with( iconpath, "file://" ) + && !starts_with( iconpath, "root://" ) + && !starts_with( iconpath, "~" )) + { + iconpath = "gnomeicons://" + iconpath; + } + setStrAttr( dbc, "ferris-iconname", iconpath, true, true ); + } + + + /** + * Import the data from desktopc into the local db4 applications:// + * config section. This is the private version, use the public one! + */ + static void private_importDesktopFile( fh_context basec, fh_context desktopc ) + { + string basep = basec->getDirPath(); + string desktopp = desktopc->getDirPath(); + + string subdirname = ""; + + if( desktopc->getParent() != basec ) + { + subdirname = desktopc->getParent()->getDirPath().substr( basep.length()+1 ); + } + +// cerr << "importDesktopFile() base:" << basep +// << " desktop:" << desktopp +// << " subdirname:" << subdirname +// << " ImportedContext:" << "applications://" << subdirname +// << endl; + + importDesktopFileTo( Shell::acquireContext( "applications://" + subdirname ), + desktopc ); + } + + /* + * Grab the icon path and other interesting stuff from a .directory file for nice menus. + * + * @param basec is the root of the .desktop tree + * @param c is the .desktop file itself. + */ + static void importDotDirectoryFile( fh_context basec, fh_context c ) + { + string basep = basec->getDirPath(); + string path = c->getDirPath(); + + string subdirname = path.substr( basep.length()+1 ); + PostfixTrimmer trimmer; + trimmer.push_back( "/.directory" ); + subdirname = trimmer( subdirname ); + + +// cerr << "importDotDirectoryFile()" +// << " basep:" << basep +// << " path:" << path +// << " subdirname:" << subdirname +// << endl; + + fh_context dbc = Shell::acquireContext( "applications://" + subdirname ); +// cerr << "importDesktopFile() dbc:" << dbc->getURL() << endl; + + setStrAttr( dbc, "ferris-iconname", getDesktopFileValue(c,"Icon"), true, true ); + setStrAttr( dbc, "ferris-comment", getDesktopFileValue(c,"Comment"), true, true ); + } + + + /** + * Import the .desktop file found at the specified location + * + * This function tries to find an implied subdir name from the parent directories + * of the given .desktop file. If no tree structure can be implied from the given + * context then the .desktop file is imported into the root of applications:// + * + * For finer control use importDesktopFileTo() to explicitly say where the new + * application entry is created + */ + void importDesktopFile( fh_context c ) + { + fh_context p = c->getParent(); + + while( p->isParentBound() ) + { + bool shouldStop = false; + + if( p->getDirName() == "apps" || + p->getDirName() == "applnk" || + p->getDirName() == "dot-desktop-files" || + p->getDirName() == "Programs" ) + shouldStop = true; + + +// if( p->end() == p->find(".directory") ) +// shouldStop = true; +// else +// { +// fh_context dotdc = p->getSubContext(".directory"); + +// if( p->getDirName() == "apps" && +// getDesktopFileValue( dotdc, "Name", "", false ) == "Programs" ) +// { +// shouldStop = true; +// } +// } + + if( shouldStop ) + { +// cerr << "importDesktopFile(c) going to make the call!" +// << " c:" << c->getURL() +// << " p:" << p->getURL() +// << endl; + private_importDesktopFile( p, c ); + + /* Get all the .directory files too */ + c = c->getParent(); + while( c != p ) + { + if( c->isSubContextBound( ".directory" )) + importDotDirectoryFile( p, c->getSubContext( ".directory" ) ); + c = c->getParent(); + } + return; + } + p = p->getParent(); + } + + /* + * The desktop file was not in a directory hive, its just a solo desktop file + */ + private_importDesktopFile( c->getParent(), c ); + } + +}; diff --git a/Ferris/Mime.hh b/Ferris/Mime.hh new file mode 100644 index 0000000..a9221fd --- /dev/null +++ b/Ferris/Mime.hh @@ -0,0 +1,70 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Mime.hh,v 1.2 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_MIME_H_ +#define _ALREADY_INCLUDED_FERRIS_MIME_H_ + +#include +#include +#include + +namespace Ferris +{ + + class FERRISEXP_EXCEPTION DesktopFileKeyNotFound : public FerrisVFSExceptionBase + { + public: + + inline DesktopFileKeyNotFound( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& e, + Attribute* a=0) + : + FerrisVFSExceptionBase( state, log, e.c_str(), a ) + { + setExceptionName("DesktopFileKeyNotFound"); + } + }; + +#define Throw_DesktopFileKeyNotFound(e,a) \ +throw DesktopFileKeyNotFound( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (e), (a)) + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + FERRISEXP_API void importDesktopFileTo( fh_context parentc, fh_context desktopc ); + FERRISEXP_API void importDesktopFile( fh_context c ); + +}; +#endif diff --git a/Ferris/Native.cpp b/Ferris/Native.cpp new file mode 100644 index 0000000..c8ea89c --- /dev/null +++ b/Ferris/Native.cpp @@ -0,0 +1,5632 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Native.cpp,v 1.42 2010/11/17 21:30:46 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "Ferris/FerrisCreationPlugin.hh" +#include "Ferris/FerrisBoost.hh" + +#ifdef FERRIS_HAVE_LIBCAP +#include +#endif + +#include +#include + + +#ifdef FERRIS_HAVE_XFS +#include +#include +#include +#include +#include +#endif + +#ifdef HAVE_LIBSELINUX +extern "C" { +#include +#include +}; +#endif + +#include +#include + +// required for NativeVFS_RootContextDropper +#include + +#include "FerrisKDE.hh" + +#include "FSParser_private.hh" + +#include + +// #undef LG_NATIVE_D +// #define LG_NATIVE_D cerr + +#define CERR cerr + +using namespace std; + +#include +#include "DBusGlue/com_libferris_Volume_Manager.h" +#include "DBusGlue/com_libferris_Volume_Manager.cpp" + + +#define PERMIT_FAM + +namespace Ferris +{ + template + basic_ostream& + operator<< (basic_ostream& os, const fsid_t& s ) + { + guint64 p = s.__val[0]; + guint64 sec = s.__val[1]; + sec <<= 32; + p |= sec; + + os << p; +// os << s.__val[0] << " " << s.__val[1]; + return os; + } + + + + struct FERRISEXP_DLLLOCAL FollowLinks + { + static const struct stat& getStat( NativeContext* c ) + { + const struct stat& ret = c->getStat_Follow(); + if( c->IsDanglingLink ) + { + stringstream ss; + ss << "Attempt tp read dangling link at path:" << c->getURL(); + Throw_CanNotDereferenceDanglingSoftLink( tostr(ss), c ); + } + return ret; + } + static int chown( const char * p, uid_t u, gid_t g ) + { + return ::chown( p, u, g ); + } +#ifdef HAVE_LIBSELINUX + static int Xgetfilecon( const std::string& path, security_context_t& con ) + { + return getfilecon( path.c_str(), &con ); + } + static int Xsetfilecon( const std::string& path, security_context_t& con ) + { + return setfilecon( path.c_str(), con ); + } +#endif + }; + + struct FERRISEXP_DLLLOCAL DontFollowLinks + { + static const struct stat& getStat( NativeContext* c ) + { + return c->getStat_DontFollow(); + } + static int chown( const char * p, uid_t u, gid_t g ) + { + return ::lchown( p, u, g ); + } +#ifdef HAVE_LIBSELINUX + static int Xgetfilecon( const std::string& path, security_context_t& con ) + { + return lgetfilecon( path.c_str(), &con ); + } + static int Xsetfilecon( const std::string& path, security_context_t& con ) + { + return lsetfilecon( path.c_str(), con ); + } +#endif + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +#ifdef HAVE_LIBSELINUX + + template< class FileConFactory > + class SELinuxFileContext + { + security_context_t con; + string identity; + string role; + string ftype; + + public: + SELinuxFileContext( Context* c ) + : + con( 0 ), + identity( "" ), + ftype( "" ) + { + string path = c->getDirPath(); + + int sz = FileConFactory::Xgetfilecon( path, con ); + if( sz <= 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Can't get SELinux context. " << " file: " << path; +// cerr << "error:" << tostr(ss) << endl; + ThrowFromErrno( ec, tostr(ss), c ); + } + +// cerr << "con:" << con << endl; + stringstream ss; + ss << con; + getline( ss, identity, ':' ); + getline( ss, role, ':' ); + getline( ss, ftype ); + } + ~SELinuxFileContext() + { + if( con ) + freecon( con ); + } + + const string& getIdentity() + { + return identity; + } + const string& getType() + { + return ftype; + } + const string& getRole() + { + return role; + } + const char* getContextString() + { + return con; + } + }; + + template < class DataFactory > + fh_stringstream + SL_getSELinuxIdentity( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + SELinuxFileContext< DataFactory > sec( c ); + fh_stringstream ss; + ss << sec.getIdentity(); + return ss; + } + + template < class DataFactory > + fh_stringstream + SL_getSELinuxType( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + SELinuxFileContext< DataFactory > sec( c ); + fh_stringstream ss; + ss << sec.getType(); + return ss; + } + + template + void + SL_setSELinuxType( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { + string v; + + if( ss >> v ) + { + SELinuxFileContext< DataFactory > sec( c ); + stringstream conss; + conss << sec.getIdentity() << ":" << sec.getRole() << ":" << v; + string tmp = conss.str(); + LG_NATIVE_D << "con:" << conss.str() + << " file: " << c->getDirPath() + << endl; + security_context_t con = (char*)tmp.c_str(); + int rc = DataFactory::Xsetfilecon( c->getDirPath(), con ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the SELinux security context:" << con + << " file: " << c->getDirPath(); + LG_NATIVE_D << tostr(ss) + << " reason:" << errnum_to_string( "", ec ) + << endl; + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the SELinux security context:" << v + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + } + + template < class DataFactory > + fh_stringstream + SL_getSELinuxContext( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + SELinuxFileContext< DataFactory > sec( c ); + fh_stringstream ss; + ss << sec.getContextString(); + return ss; + } + + template + void + SL_setSELinuxContext( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) + { +// SELinuxFileContext< DataFactory > sec( c ); + string v; + + if( ss >> v ) + { + security_context_t con = (char*)v.c_str(); + int rc = DataFactory::Xsetfilecon( c->getDirPath(), con ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the SELinux security context:" << v + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the SELinux security context:" << v + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + } + +#endif + + template < class DataFactory > + fh_stringstream + SL_getEpisode( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + + FSParser p; + bool rc = p.parse( c->getDirName() ); + if( rc ) + { + ss << p.getE(); + } + else + { + ss << ""; + } + return ss; + } + + template < class DataFactory > + fh_stringstream + SL_getSeries( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + FSParser p; + bool rc = p.parse( c->getDirName() ); +// cerr << "SL_getSeries() ret:" << p.getName() << " rc:" << rc << " file:" << c->getDirName() << endl; + if( rc ) + { + ss << p.getName(); + } + else + { + ss << ""; + } + return ss; + } + + + template < class DataFactory > + fh_stringstream + SL_getExpectedCRC32( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + string n = c->getDirName(); + boost::regex rex("(.*\\[)([A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9])(\\].*)"); + boost::smatch matches; + if(boost::regex_match( n, matches, rex )) + { + if( matches.size() == 4 ) + { + ss << tolowerstr()( matches[2] ); + } + } + +// FSParser p; +// bool rc = p.parse( c->getDirName() ); +// if( rc ) +// { +// ss << p.getChecksum(); +// } +// else +// { +// ss << ""; +// } + return ss; + } + + template < class DataFactory > + fh_stringstream + SL_getCRC32IsValid( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + + string expected = getStrAttr( c, "crc32-expected", "" ); + if( expected.empty() ) + ss << "1"; + else + ss << ( getStrAttr( c, "crc32", "1" ) == expected ); + return ss; + } + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + namespace System + { + + +/** + * Check of the process has one specific capability + */ +#ifdef FERRIS_HAVE_LIBCAP + bool + HaveCap( cap_value_t v ) + { + { + cap_t caps = cap_get_proc(); + cap_flag_t flag = CAP_PERMITTED; + cap_flag_value_t value; + int rc = cap_get_flag( caps, v, flag, &value ); + if( rc == 0 ) + { + return( value == CAP_SET ); + } + } + return getuid() == 0; + } +#endif + + bool gotRoot() + { + return getuid() == 0; + } + }; + + namespace Shell + { + + /* + * like canChangeFileToGroup() but operates on uid. + */ + bool canChangeFileToUser( uid_t u ) + { + if( getuid() == 0 ) + { + return true; + } + + if( struct passwd* pass = getpwuid( getuid() ) ) + { + if( u == pass->pw_uid ) + { + return true; + } + } + +#ifdef FERRIS_HAVE_LIBCAP + return ::Ferris::System::HaveCap( CAP_CHOWN ); +#else + return ::Ferris::System::gotRoot(); +#endif + } + + + +/* + * Check if the running process can chance a file to have group id "g". + * Checks are done on the uid, the groups the user is in, and if the + * user has that capability + */ + bool canChangeFileToGroup( gid_t g ) + { + LG_NATIVE_D << "canChangeFileToGroup() g:" << g << endl; + + if( getuid() == 0 ) + { + return true; + } + + const int grsz = NGROUPS_MAX; + gid_t grlist[ NGROUPS_MAX ]; + + if( struct passwd* pass = getpwuid( getuid() ) ) + { + LG_NATIVE_D << "canChangeFileToGroup() g:" << g + << " pass->pw_gid:" << pass->pw_gid + << endl; + if( g == pass->pw_gid ) + { + return true; + } + } + + int grmax = getgroups( grsz, grlist ); + if( -1 != grmax ) + { + for( int i=0; i < grmax; ++i ) + { + LG_NATIVE_D << "canChangeFileToGroup() g:" << g + << " grlist[i]:" << grlist[i] + << endl; + if( grlist[i] == g ) + { + return true; + } + } + } + +#ifdef FERRIS_HAVE_LIBCAP + return ::Ferris::System::HaveCap( CAP_CHOWN ); +#else + return ::Ferris::System::gotRoot(); +#endif + } + }; + + + + + const string NativeContext::CreateObjectType_k = "CreateObjectType"; + const string NativeContext::CreateObjectType_v_Dir = "Dir"; + const string NativeContext::CreateObjectType_v_File = "File"; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + Context* + NativeContext::priv_CreateContext( Context* parent, string rdn ) + { + LG_NATIVE_D << "NativeContext::CreateContext() rdn: " << rdn << endl; + NativeContext* ret = new NativeContext(); + ret->setContext( parent, rdn ); + return ret; + } + + // + // Short cut loading each dir unless absolutely needed. + // + fh_context + NativeContext::priv_getSubContext( const string& rdn ) + throw( NoSuchSubContext ) + { + try + { + LG_NATIVE_D << "NativeContext::priv_getSubContext() p:" << getDirPath() + << " rdn:" << rdn + << endl; + + Items_t::iterator isSubContextBoundCache; + if( priv_isSubContextBound( rdn, isSubContextBoundCache ) ) + { + LG_NATIVE_D << "NativeContext::priv_getSubContext(bound already) p:" << getDirPath() + << " rdn:" << rdn + << endl; +// return _Base::priv_getSubContext( rdn ); + return *isSubContextBoundCache; + } + + if( rdn.empty() ) + { + fh_stringstream ss; + ss << "NoSuchSubContext no rdn given"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + else if( rdn[0] == '/' ) + { + fh_stringstream ss; + ss << "NoSuchSubContext no files start with unescaped '/' as filename"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + + + struct stat tsb; + string fqfn = appendToPath( getDirPath(), rdn ); + int rv = lstat( fqfn.c_str(), &tsb); + + LG_NATIVE_D << "NativeContext::priv_getSubContext() p:" << getDirPath() + << " fqfn:" << fqfn + << " rv:" << rv + << endl; + + if( rv != 0 ) + { + // stat failed + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + + + bool created = false; +// cerr << "NativeContext::priv_getSubContext() path:" << getDirPath() +// << " rdn:" << rdn +// << " using priv_readSubContext()" << endl; + + { + fh_context ret = native_readSubContext( rdn, created, false ); + +// cerr << "NativeContext::priv_getSubContext url:" << getURL() +// << " child.sz:" << getItems().size() << endl; +// DEBUG_dumpcl( "priv_getSubContext shortcut reading" ); + +// cerr << "NativeContext::priv_getSubContext(2) this:" << toVoid(this) << endl; +// cerr << "NativeContext::priv_getSubContext(3) path:" << getDirPath() +// << " rdn:" << rdn +// << endl; + return ret; + } + +// LG_NATIVE_D << "NativeContext::priv_getSubContext(2) p:" << getDirPath() << endl; +// Context* c = priv_CreateContext( this, rdn ); +// LG_NATIVE_D << "NativeContext::priv_getSubContext(3) p:" << getDirPath() << endl; +// const fh_context ret = Insert( c, created ); + +// LG_NATIVE_D << "NativeContext::priv_getSubContext(4) p:" << getDirPath() << endl; +// bumpVersion(); +// LG_NATIVE_D << "NativeContext::priv_getSubContext(5) p:" << getDirPath() +// << " ret:" << ret->getURL() +// << endl; +// return ret; + } + catch( NoSuchSubContext& e ) + { + throw e; + } + catch( exception& e ) + { + string s = e.what(); +// cerr << "NativeContext::priv_getSubContext() e:" << e.what() << endl; + Throw_NoSuchSubContext( s, this ); + } + catch(...) + {} + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + + fh_context + NativeContext::native_readSubContext( const string& rdn, bool created, bool checkIfExistsAlready ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ) + { + LG_NATIVE_D << "native_readSubContext() rdn:" << rdn + << " created:" << created + << " checkIfExists:" << checkIfExistsAlready + << " this:" << toVoid(dynamic_cast(this)) + << " isnative:" << toVoid(dynamic_cast(this)) + << " cc:" << toVoid(dynamic_cast(GetImpl(CoveredContext))) + << " omc:" << toVoid(dynamic_cast(getOverMountContext())) + << endl; + + Version_t v = getVersion(); + fh_context ret = priv_readSubContext( rdn, created, checkIfExistsAlready ); + + if( v != getVersion() ) + { + // This will gradually build up outgoing requests for new monitors + // when this method itself is called in response to an incoming event. + // As such you can get a situation where the server's write queue is full + // and the server blocks waiting for us. + // in 1.1.81 moved this to a post read() block +// try +// { +// #ifdef PERMIT_FAM +// if( !FamppChangedEventConnected ) +// { +// if( !FamReq ) +// { +// FamReq = Fampp::MonitorDirectory( getDirPath() ); +// } + +// typedef NativeContext NC; +// const FamReq_t& R = FamReq; +// R->getSig().connect(slot( *this, &NC::OnFamppChangedEvent)); +// FamppChangedEventConnected = true; +// } +// #endif +// } +// catch( Fampp::FamppDirMonitorInitFailedException& e) +// { +// ostringstream ss; +// ss << "FamppDirMonitorInitFailedException for path:" << getDirPath(); +// cerr << tostr(ss) << endl; +// Throw_CanNotMonitorDirWithFAM( tostr(ss), this, e ); +// } + } + + { + string dotferrisPath = Shell::getHomeDirPath_nochecks() + "/.ferris"; +// CERR << "isDir():" << ret->isDir() +// << " is-native:" << ret->getIsNativeContext() +// << " rdn:" << rdn +// << " path:" << ret->getDirPath() << endl; + string path = ret->getDirPath(); + + if( !ret->isDir() && + path != "static" && !path.empty() + && !starts_with( path, dotferrisPath ) ) + { + ret->RDFCacheAttributes_priv_createAttributes(); + } + } + + return ret; + } + + + + class FERRISEXP_DLLLOCAL NativeVFS_RootContextDropper + : + public RootContextDropper + { + public: + NativeVFS_RootContextDropper() + { + RootContextFactory::Register("file", this); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + LG_NATIVE_D << "RootContextDropper::Brew() top" << endl; + static NativeContext* nc = 0; + string rootName; + + try + { + if( !nc ) + { + nc = new NativeContext(); + LG_NATIVE_D << "RootContextDropper::Brew() 2" << endl; + nc->setContext( 0, "static" ); + LG_NATIVE_D << "RootContextDropper::Brew() 3" << endl; + nc->AddRef(); +// cerr << "base non-freeable nativecontext:" << (void*)dynamic_cast(nc) << endl; + } + LG_NATIVE_D << "RootContextDropper::Brew() 1" << endl; + +// static NativeContext nc; +// nc.setContext( 0, "static" ); +// nc.AddRef(); +// nc.AddRef(); + rootName = rf->getInfo( "Root" ); + } + catch( exception& e ) + { + LG_NATIVE_D << "RootContextDropper::Brew() e0:" << e.what() << endl; + stringstream ss; + ss << "Failed to make file:// handler:" << e.what(); + cerr << tostr(ss) << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + + LG_NATIVE_D << "RootContextDropper::Brew() 2" << endl; + + try + { + LG_NATIVE_D << "RootContextDropper::Brew() 3" << endl; +#ifdef PERMIT_FAM + Fampp::RegisterFamppWithGLib(); +#endif + LG_NATIVE_D << "RootContextDropper::Brew() 4" << endl; + } + catch( Fampp::FamppOpenFailedException& e ) + { + LG_NATIVE_D << "RootContextDropper::Brew() e1:" << e.what() << endl; + stringstream ss; + ss << "Can not open connection to FAM. e:" << e.what(); + cerr << tostr(ss) << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + catch( exception& e ) + { + LG_NATIVE_D << "RootContextDropper::Brew() e2:" << e.what() << endl; + stringstream ss; + ss << "Cought an unknown exception setting up FAM. " << e.what(); + cerr << tostr(ss) << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + try + { + LG_NATIVE_D << "RootContextDropper::Brew() 6" << endl; + return nc->CreateContext( 0, rootName ); +// return nc.CreateContext( 0, rootName ); + } + catch( exception& e ) + { + LG_NATIVE_D << "RootContextDropper::Brew() e3:" << e.what() << endl; + Throw_RootContextCreationFailed( e.what(), 0 ); + } + } + + virtual bool isTopLevel() + { + return true; + } + }; + + static NativeVFS_RootContextDropper ___NativeVFS_static_init; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + + + +NativeContext::NativeContext() + : +#ifdef HAVE_LIBFILE + libfile_mime_Version(0), + libfile_type_Version(0), +// libfile_mime_client(0), +// libfile_type_client(0), +#endif +#ifdef HAVE_EFSD +// m_efsdConnection( 0 ), +// m_efsdGML( 0 ), +// m_efsdChannel( 0 ), +#endif + FamReq(0), + sb_follow_version(0), + sb_dont_follow_version(0), + DontHaveRPMEntry( false ), + IsDanglingLink( false ), + FamppChangedEventConnected( false ) +{ + setIsNativeContext(); + createStateLessAttributes(); +} + + +NativeContext::~NativeContext() +{ +// cerr << "~NativeContext() path:" << getDirPath() << endl; +// cerr << "~NativeContext() name:" << getDirName() << endl; + +#ifdef HAVE_EFSD + if( m_efsdChannel ) + g_io_channel_unref( m_efsdChannel ); +#endif + + try + { +// cerr << "~NativeContext() " << endl; +// LG_NATIVE_D << "~NativeContext() path:" << getDirPath() << endl; +// LG_NATIVE_D << "~NativeContext() name:" << getDirName() << endl; +// libfile_free( libfile_mime_client ); +// libfile_free( libfile_type_client ); + } + catch( exception& e ) + { + LG_NATIVE_ER << "~NativeContext() e:" << e.what() << endl; + } + catch( ... ) + { + LG_NATIVE_ER << "~NativeContext() e: ..." << endl; + } +} + +fh_context +NativeContext::SubCreate_fifo( fh_context c, fh_context md ) +{ + string rdn = getStrSubCtx( md, "name", "" ); + + LG_NATIVE_D << "SubCreate_fifo rdn:" << rdn + << " url:" << getURL() + << endl; + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_fifo() can not find the new rdn for creation operation." + << "c:" << c->getURL() + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + const string filename = rdn; + const string fqfn = appendToPath(getDirPath(),filename); + mode_t mode = getModeFromMetaData( md ); + mode_t oldumask = 0; + bool ignoreUMask = toint(getStrSubCtx( md, "ignore-umask", "0" )); + + if( ignoreUMask ) oldumask = umask( 0 ); + int rc = mkfifo( fqfn.c_str(), mode ); + if( ignoreUMask ) umask( oldumask ); + + if( rc != 0 ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_fifo() can not make new dir" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + return native_readSubContext( filename, true ); +} + +fh_context +NativeContext::SubCreate_special( fh_context c, fh_context md ) +{ + string rdn = getStrSubCtx( md, "name", "" ); + dev_t devtype = toType(getStrSubCtx( md, "device", "" )); + LG_NATIVE_D << "SubCreate_special rdn:" << rdn + << " url:" << getURL() + << endl; + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_special() can not find the new rdn for creation operation." + << "c:" << c->getURL() + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + const string filename = rdn; + const string fqfn = appendToPath(getDirPath(),filename); + mode_t mode = getModeFromMetaData( md ); + mode_t oldumask = 0; + bool ignoreUMask = toint(getStrSubCtx( md, "ignore-umask", "0" )); + + if( ignoreUMask ) oldumask = umask( 0 ); + int rc = mknod( fqfn.c_str(), mode, devtype ); + if( ignoreUMask ) umask( oldumask ); + + if( rc != 0 ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_special() can not make new dir" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + return native_readSubContext( filename, true ); +} + +void +NativeContext::ProcessAllFamppEvents() +{ + Main::processAllPending_VFSFD_Events(); +} + +fh_context +NativeContext::SubCreate_softlink( fh_context c, fh_context md ) +{ + string rdn = getStrSubCtx( md, "name", "" ); + string target = getStrSubCtx( md, "link-target", "" ); + + LG_NATIVE_D << "SubCreate_softlink rdn:" << rdn + << " target:" << target + << " url:" << getURL() + << endl; + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_softlink() can not find the new rdn for creation operation." + << " c:" << c->getURL() + << " rdn:" << rdn + << " target:" << target + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + if( !target.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_softlink() can not find the target for creation operation." + << " c:" << c->getURL() + << " rdn:" << rdn + << " target:" << target + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + const string filename = rdn; + const string fqfn = appendToPath(getDirPath(),filename); + + int rc = symlink( target.c_str(), fqfn.c_str() ); + if( rc != 0 ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_softlink() can not make new dir" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + return native_readSubContext( filename, true ); +} + +fh_context +NativeContext::SubCreate_hardlink( fh_context c, fh_context md ) +{ + string rdn = getStrSubCtx( md, "name", "" ); + string target = getStrSubCtx( md, "link-target", "" ); + + LG_NATIVE_D << "SubCreate_hardlink rdn:" << rdn + << " target:" << target + << " url:" << getURL() + << endl; + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_hardlink() can not find the new rdn for creation operation." + << "c:" << c->getURL() + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + if( !target.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_hardlink() can not find the target for creation operation." + << "c:" << c->getURL() + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + const string filename = rdn; + const string fqfn = appendToPath(getDirPath(),filename); + + int rc = link( target.c_str(), fqfn.c_str() ); + if( rc != 0 ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_hardlink() can not make new dir" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + return native_readSubContext( filename, true ); +} + + +fh_context +NativeContext::SubCreate_dir ( fh_context c, fh_context md ) +{ + string rdn = getStrSubCtx( md, "name", "" ); + + LG_NATIVE_D << "SubCreate_dir rdn:" << rdn + << " url:" << getURL() + << endl; + + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "SL_SubCreate_dir() no rdn supplied for creation operation." + << " c:" << c->getURL() + << endl; + + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + const string filename = rdn; + const string fqfn = appendToPath( getDirPath(), filename ); + mode_t mode = getModeFromMetaData( md ); + mode_t oldumask = 0; + bool ignoreUMask = toint(getStrSubCtx( md, "ignore-umask", "0" )); + + LG_NATIVE_D << "SubCreate_dir rdn:" << rdn + << " url:" << getURL() + << " ignoreUMask:" << ignoreUMask + << " mode:" << mode + << " 0x1FF:" << ((int)0x1FF) + << endl; + +// cerr << "SubCreate_dir rdn:" << rdn +// << " url:" << getURL() +// << " ignoreUMask:" << ignoreUMask +// << " mode:" << mode +// << " 0x1FF:" << ((int)0x1FF) +// << endl; + + + if( ignoreUMask ) oldumask = umask( 0 ); + int rc = mkdir( fqfn.c_str(), mode ); //0x1FF ); + if( ignoreUMask ) umask( oldumask ); + + if( rc != 0 ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_dir() can not make new dir" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + return native_readSubContext( filename, true ); +} + +fh_context SL_SubCreate_fifo( fh_context c, fh_context md ) +{ + if( NativeContext* nc = dynamic_cast(GetImpl(c))) + { + return nc->SubCreate_fifo( c, md ); + } + fh_stringstream ss; + ss << "SL_SubCreate_fifo() wrong type of context passed in!" + << " URL:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); +} + +fh_context SL_SubCreate_special( fh_context c, fh_context md ) +{ + if( NativeContext* nc = dynamic_cast(GetImpl(c))) + { + return nc->SubCreate_special( c, md ); + } + fh_stringstream ss; + ss << "SL_SubCreate_special() wrong type of context passed in!" + << " URL:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); +} + +fh_context SL_SubCreate_softlink( fh_context c, fh_context md ) +{ + if( NativeContext* nc = dynamic_cast(GetImpl(c))) + { + return nc->SubCreate_softlink( c, md ); + } + fh_stringstream ss; + ss << "SL_SubCreate_softlink() wrong type of context passed in!" + << " URL:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); +} + +fh_context SL_SubCreate_hardlink( fh_context c, fh_context md ) +{ + if( NativeContext* nc = dynamic_cast(GetImpl(c))) + { + return nc->SubCreate_hardlink( c, md ); + } + fh_stringstream ss; + ss << "SL_SubCreate_hardlink() wrong type of context passed in!" + << " URL:" << c->getURL() + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); +} + +// fh_context SL_SubCreate_dir( fh_context c, fh_context md ) +// { +// if( NativeContext* nc = dynamic_cast(GetImpl(c))) +// { +// return nc->SubCreate_dir( c, md ); +// } +// fh_stringstream ss; +// ss << "SL_SubCreate_dir() wrong type of context passed in!" +// << " URL:" << c->getURL() +// << endl; +// Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); +// } + + + +fh_context +NativeContext::SubCreate_file( fh_context c, fh_context md ) +{ + LG_NATIVE_D << "NativeContext::SubCreate_file() c:" << c->getURL() << endl; + string rdn = getStrSubCtx( md, "name", "" ); +// guint64 preallocate = toType( getStrSubCtx( md, "preallocate", "0" ) ); + guint64 preallocate = Util::convertByteString( getStrSubCtx( md, "preallocate", "0" ) ); + + if( !rdn.length() ) + { + fh_stringstream ss; + ss << "Attempt to create file with no name" << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), this ); + } + + const string filename = rdn; + const string fqfn = appendToPath(getDirPath(),filename); + + LG_NATIVE_D << "NativeContext::createSubContext() rdn:" << rdn << endl; + LG_NATIVE_D << "NativeContext::createSubContext() filename:" << filename << endl; + LG_NATIVE_D << "NativeContext::createSubContext() fqfn:" << fqfn << endl; + + int oflags = O_CREAT|O_EXCL|O_WRONLY; +// mode_t mode = S_IRUSR | S_IWUSR; + LG_NATIVE_D << "NativeContext::createSubContext(2)" << endl; + mode_t mode = getModeFromMetaData( md ); + mode_t oldumask = 0; + LG_NATIVE_D << "NativeContext::createSubContext(3)" << endl; + bool ignoreUMask = toint(getStrSubCtx( md, "ignore-umask", "0" )); + + LG_NATIVE_D << "Native::create file() fqfn:" << fqfn << " mode:" << mode << endl; + + + if( ignoreUMask ) oldumask = umask( 0 ); + int fd = open( fqfn.c_str(), oflags, mode ); + if( ignoreUMask ) umask( oldumask ); + + + if( -1 == fd ) + { + string es = errnum_to_string("", errno); + fh_stringstream ss; + ss << "SL_SubCreate_file() can not make new file" + << " fully qualified name:" << fqfn + << " reason:" << es + << endl; + LG_NATIVE_D << tostr(ss) << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + + +#ifdef FERRIS_HAVE_XFS + if( preallocate ) + { + xfs_flock64_t flck; + + flck.l_whence = SEEK_SET; + flck.l_start = 0LL; + flck.l_len = preallocate; + + ioctl(fd, XFS_IOC_RESVSP64, &flck); + LG_NATIVE_D << "path:" << getDirPath() << " preallocate:" << preallocate << endl; + } +#endif + + close(fd); + return native_readSubContext( filename, true ); +} + +void +NativeContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) +{ + addStandardFileSubContextSchema(m); + addEAGeneratorCreateSubContextSchema(m); + + /* + * We support some more funky stuff for XFS partitions. + */ + string XFSFileArgs = ""; + + if( isXFS( this ) ) + { + XFSFileArgs = "" + " \n" + " \n" + " \n"; + } + + string FileArgs = "" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; + FileArgs += XFSFileArgs + " \n"; + + m["file"] = SubContextCreator( SL_SubCreate_file, FileArgs ); + + m["dir"] = SubContextCreator( + SL_SubCreate_dir, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + + m["softlink"] = SubContextCreator( + SL_SubCreate_softlink, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + m["hardlink"] = SubContextCreator( + SL_SubCreate_hardlink, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + m["fifo"] = SubContextCreator( + SL_SubCreate_fifo, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + m["special"] = SubContextCreator( + SL_SubCreate_special, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + insertAllCreatorModules( m ); +} + + +ferris_ios::openmode +NativeContext::getSupportedOpenModes() +{ + LG_NATIVE_D << "getSupportedOpenModes() url:" << getURL() << endl; + return ios::in | ios::out | ios::ate | ios::app | ios::trunc | ios::binary; +} + + +fh_context +NativeContext::getNonKernelLinkTarget() +{ + const struct stat& sb = getStat_DontFollow(); + if(S_ISLNK(sb.st_mode)) + { + LG_NATIVE_D << "isNonKernelLink(is-link) URL:" << getURL() << endl; + + string linkTarget = getStrAttr( this, "link-target", "" ); + if( !linkTarget.empty() ) + { + LG_NATIVE_D << "isNonKernelLink(is-link) linkTarget:" << linkTarget << endl; + struct stat tsb; + int rv = lstat( linkTarget.c_str(), &tsb); + if( rv != 0 ) + { + // The link doesn't really exist as far as the kernel is concerned. + LG_NATIVE_D << "priv_getIStream(is-ferris-link) URL:" << getURL() + << " linkTarget:" << linkTarget + << endl; + fh_context lc = Resolve( linkTarget ); + return lc; + } + } + } + return 0; +} + + +fh_istream +NativeContext::priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + exception) +{ + LG_NATIVE_D << "+++ NativeContext::priv_getIStream URL:" << getURL() << endl; + + if( fh_context lc = getNonKernelLinkTarget() ) + { + return lc->getIStream(); + } + +// if( isCompressedContext( this )) +// { +// return Factory::getCompressedChunkIOStream( this ); +// } + + fh_ifstream fs( getDirPath().c_str(), ferris_ios::maskOffFerrisOptions(m) ); + + LG_NATIVE_D << "NativeContext::priv_getIStream() " + << " path:" << getDirPath() + << " m:" << m + << " m.masked:" << ferris_ios::maskOffFerrisOptions( m ) + << " fs:" << fs + << endl; + + if( m & ferris_ios::o_mmap ) + { + LG_NATIVE_D << "About to create a memory mapped file for:" << getURL() + << " fd:" << fs->rdbuf()->fd() + << " m:" << m + << endl; + fh_istream ret = Factory::MakeMMapIStream( fs->rdbuf()->fd(), m, getURL() ); + LG_NATIVE_D << "made memory mapped stream for fd:" << fs->rdbuf()->fd() << endl; + return ret; + } + + return fs; +} + + +fh_iostream +NativeContext::priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + exception) +{ + if( fh_context lc = getNonKernelLinkTarget() ) + { + return lc->getIOStream(); + } + +// if( isCompressedContext( this )) +// { +// return Factory::getCompressedChunkIOStream( this ); +// } + +// if( m & ferris_ios::o_direct ) +// { +// fh_fstream fs( getDirPath().c_str(), ferris_ios::maskOffFerrisOptions( m ) ); +// int fd = dup( fs->rdbuf()->fd() ); + +// cerr << "NativeContext::priv_getIOStream() " +// <<" setting O_DIRECT on fd:" << fd << endl; + +// int rc = fcntl( fd, F_SETFL, O_DIRECT ); +// if( rc ) +// { +// int e = errno; +// cerr << "Can not set O_DIRECT for fd:" << fd +// << " reason:" << errnum_to_string( "", e ) << endl; +// } + +// cerr << "NativeContext::priv_getIOStream() " +// << " returning a fd iostream on a fixed dup fd from a normal stream" +// << endl; +// fh_iostream ret = Factory::MakeFdIOStream( fd ); +// return ret; +// } + + fh_fstream fs( getDirPath().c_str(), m ); + LG_NATIVE_D << "NativeContext::priv_getIOStream() " + << " path:" << getDirPath() + << " m:" << m + << " m.masked:" << ferris_ios::maskOffFerrisOptions( m ) + << " fs:" << fs + << endl; + if( !fs->good() ) + { +// const struct stat& sb = getStat_Follow(); + if( m & ios::out ) + { + int rc = access( getDirPath().c_str(), W_OK ); + if( rc ) + { + fh_stringstream ss; + ss << "Request for output support on an object that is not writable" << endl; + Throw_CanNotGetStream( tostr(ss), this ); + } + } + } + + return fs; +} + +void +NativeContext::tryToFindAttributeByOverMounting( const std::string& eaname ) +{ + LG_CTXREC_D << "NativeContext::tryToFindAttributeByOverMounting()" + << " eaname:" << eaname + << endl; + + if( isDir() ) + return; + if( IsDanglingLink ) + return; + + _Base::tryToFindAttributeByOverMounting( eaname ); +} + + void + NativeContext::read( bool force ) + { + LG_NATIVE_I << "NativeContext::read() force:" << force + << " HaveReadDir:" << HaveReadDir + << " ReadingDir:" << ReadingDir + << " getOverMountContext():" << getOverMountContext() + << " this:" << this + << " url:" << getDirPath() + << endl; + + // + // If the inode of an already read directory + // has changed then we can assume a new kernel filesystem might + // be mounted here. + // + if( HaveReadDir && !ReadingDir && getOverMountContext() == this ) + { + ino_t oldINode = sb_follow.st_ino; + struct stat sb; + stat( getDirPath().c_str(), &sb ); + force = (oldINode != sb.st_ino); + + LG_NATIVE_I << "NativeContext::read() force:" << force + << " old:" << oldINode + << " new:" << sb.st_ino + << endl; + + } + LG_NATIVE_I << "NativeContext::read() force:" << force + << " path:" << getDirPath() + << endl; + return _Base::read( force ); + } + + + +void +NativeContext::priv_read() +{ + LG_NATIVE_I << "NativeContext::priv_read() " + << " this:" << (void*)this + << " path:" << getDirPath() + << " isActiveView():" << isActiveView() + << endl; + LG_CTXREC_D << "NativeContext::priv_read() " + << " this:" << (void*)this + << " path:" << getDirPath() << endl; + updateMetaData(); + + ino_t oldINode = sb_follow.st_ino; + // This is where to insert the mapping // + const struct stat& sb = getStat_Follow(); + + if( IsDanglingLink ) + { + LG_NATIVE_D << "NativeContext::priv_read( dangling link ) p:" << getDirPath() << endl; + LG_CTXREC_D << "NativeContext::priv_read( dangling link ) p:" << getDirPath() << endl; + + stringstream ss; + ss << "Attempt tp read dangling link at path:" << getDirPath(); + Throw_FerrisNotReadableAsContext( tostr(ss), this ); + } + + LG_NATIVE_D << "NativeContext::priv_read() " + << " this:" << (void*)this + << " path:" << getDirPath() + << " S_ISDIR(sb.st_mode):" << S_ISDIR(sb.st_mode) + << endl; + + if(S_ISDIR(sb.st_mode)) + { + LG_NATIVE_D << "NativeContext::read(isDir=yes) p:" << getDirPath() << endl; + LG_CTXREC_D << "NativeContext::read(isDir=yes) p:" << getDirPath() << endl; + + // don't try to overmount a directory NativeContext. + m_overMountAttemptHasAlreadyFailed=1; + clearContext(); + +#ifdef PERMIT_FAM + if( isActiveView() ) + { + EnsureStartReadingIsFired(); + LG_NATIVE_D << "starting active view using fam on url:" << getURL() << endl; + LG_CTXREC_D << "starting active view using fam on url:" << getURL() << endl; + setupFAM(); + } + else +#endif + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + // the user doesn't want FAM overhead for this view, just read it + // as it stands right now. + + LG_NATIVE_D << "+++warning: passive view for url:" << getURL() + << " areReadingDir():" << areReadingDir() + << endl; + + DIR *d; + struct dirent *e; + if ((d = opendir (getDirPath().c_str())) == NULL) + { + stringstream ss; + ss << "can not open path:" << getDirPath(); + Throw_FerrisNotReadableAsContext( tostr(ss), this ); + } + while( e = readdir(d) ) + { + string fn = e->d_name; + if( fn == "." || fn == ".." ) + continue; + + LG_NATIVE_D << "passive fn:" << fn << endl; + native_readSubContext( fn, false, true ); + } + closedir (d); + NumberOfSubContexts = getItems().size(); + } + } + else + { + LG_NATIVE_D << "NativeContext::priv_read( else ) p:" << getDirPath() << endl; + LG_CTXREC_D << "NativeContext::priv_read(!dir) " + << " this:" << (void*)this + << " path:" << getDirPath() << endl; + + stringstream ss; + ss << "Native/FerrisNotReadableAsContext for path:" << getDirPath(); + + +// throw FerrisNotReadableAsContext( +// FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), +// (::Ferris::Factory::fcnull()), (tostr(ss)), (this)); + + + +// cerr << tostr(ss) << endl; +// BackTrace(); + Throw_FerrisNotReadableAsContext( tostr(ss), this ); + } +} + +template +fh_stringstream& +SL_getUserOwnerNumberStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_uid; + return ss; +} + +template +void +SL_setUserOwnerNumberStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setUserOwnerNumberStream() c:" << c->getURL() + << endl; + + const struct stat& sb = StatDataFactory::getStat(c); + + uid_t owner = -1; + gid_t group = -1; + if(ss >> owner) + { + LG_NATIVE_D << "Setting user to:" << owner << " for url:" << c->getURL() << endl; + + if( !Shell::canChangeFileToUser( owner )) + { + fh_stringstream ss; + ss << "Native context can not set the user number to:" << owner + << " permission denied" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + + int rc = StatDataFactory::chown( c->getDirPath().c_str(), owner, group ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the owner to:" << owner + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the owner number to:" << owner + << " failed reading new file owner number" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } +} + +template +fh_stringstream& +SL_getUserOwnerNameStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + struct passwd* p = getpwuid(sb.st_uid); + ss << ( p ? p->pw_name : "N/A" ); + return ss; +} + + +template +void +SL_setUserOwnerNameStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setUserOwnerNameStream() c:" << c->getURL() << endl; + const struct stat& sb = StatDataFactory::getStat(c); + + uid_t owner = -1; + gid_t group = -1; + string userstr = ""; + + if(ss >> userstr && userstr.length() ) + { + struct passwd* p = getpwnam( userstr.c_str() ); + if( !p ) + { + fh_stringstream ss; + ss << "Native context can not set the owner to:" << userstr + << " because there is no matching owner number for that name" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + owner = p->pw_uid; + + LG_NATIVE_D << "Setting owner to:" << userstr + << " owner number:" << owner + << " for url:" << c->getURL() << endl; + + if( !Shell::canChangeFileToUser( owner )) + { + fh_stringstream ss; + ss << "Native context can not set the user number to:" << owner + << " permission denied" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + + int rc = StatDataFactory::chown( c->getDirPath().c_str(), owner, group ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the owner to:" << owner + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the owner number to:" << owner + << " failed reading new file owner number" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } +} + + + +// template +// fh_stringstream +// SL_getSizeStream_OLD( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +// { +// const struct stat& sb = StatDataFactory::getStat(c); +// fh_stringstream ss; +// ss << sb.st_size; +// return ss; +// } + +template +fh_stringstream& +SL_getSizeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_size; + return ss; +} + +template +fh_stringstream& +SL_getIsEjectableStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + bool v = false; + + static boost::regex rex = toregex("file:[/]+media/"); + boost::smatch matches; + string earl = c->getURL(); + LG_HAL_D << "SL_getIsEjectableStream() url:" << earl << endl; + if(boost::regex_search( earl, rex )) + { + LG_HAL_D << "SL_getIsEjectableStream() regex has passed for:" << earl << endl; + try + { + const struct stat& sb = StatDataFactory::getStat(c); + dev_t dt = sb.st_dev; + + fVolumeManager* fvolmgr = new fVolumeManager( + "com.libferris.Volume.Manager", + "/com/libferris/Volume/Manager", + QDBusConnection::sessionBus() ); + + v = fvolmgr->isEjectable( dt ); + LG_HAL_D << "SL_getIsEjectableStream() v:" << v << " url:" << earl << endl; + } + catch( exception& e ) + { +// cerr << "SL_getIsEjectableStream() e:" << e.what() << endl; + throw; + } + } + ss << v; + return ss; +} + + static void eject( NativeContext* c ) + { + try + { + const struct stat& sb = DontFollowLinks::getStat(c); + dev_t dt = sb.st_dev; + + fh_stringstream zz; + SL_getIsEjectableStream( c, "is-ejectable", 0, zz ); + if( isTrue( tostr(zz) )) + { +// cerr << "Ejecting disk at c:" << c->getURL() << endl; + + fVolumeManager* fvolmgr = new fVolumeManager( + "com.libferris.Volume.Manager", + "/com/libferris/Volume/Manager", + QDBusConnection::sessionBus() ); + + fh_stringstream ss; + ss << tostr(fvolmgr->Eject( dt )); + LG_HAL_D << "native.eject ss:" << ss.str() << endl; + if( !tostr(ss).empty() ) + { + Throw_FerrisHALException( ss.str(), c ); + } + + } + } + catch( exception& e ) + { +// cerr << "SL_getIsEjectableStream() e:" << e.what() << endl; + throw; + } + } + + +void +SL_updateEjectStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + eject( c ); +} + +template +fh_stringstream& +SL_getEjectStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + eject( c ); + return ss; +} + + + +void +SL_updateNullStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ +} + + static void unmount( NativeContext* c ) + { + try + { + const struct stat& sb = DontFollowLinks::getStat(c); + dev_t dt = sb.st_dev; + + fh_stringstream zz; + SL_getIsEjectableStream( c, "is-ejectable", 0, zz ); + if( isTrue( tostr(zz) )) + { + LG_HAL_D << "unmount disk at c:" << c->getURL() << endl; + + fVolumeManager* fvolmgr = new fVolumeManager( + "com.libferris.Volume.Manager", + "/com/libferris/Volume/Manager", + QDBusConnection::sessionBus() ); + + fh_stringstream ss; + ss << tostr(fvolmgr->Unmount( dt )); + if( !tostr(ss).empty() ) + { + Throw_FerrisHALException( ss.str(), c ); + } + } + } + catch( exception& e ) + { +// cerr << "SL_getIsEjectableStream() e:" << e.what() << endl; + throw; + } + } + +void +SL_updateUnmountStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + unmount(c); +} + + +template +fh_stringstream& +SL_getUnmountStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + unmount(c); + return ss; +} + + +fh_stringstream& +SL_getIsNative( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + ss << "1"; + return ss; +} + +template +fh_stringstream& +n_SL_getIsDir( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << (S_ISDIR(sb.st_mode) ? 1 : 0); + return ss; +} + +bool +NativeContext::isDir() +{ + try + { + const struct stat& sb = FollowLinks::getStat( this ); + return S_ISDIR(sb.st_mode); + } + catch( CanNotDereferenceDanglingSoftLink& e ) + { + return false; + } +} + + + +template +fh_stringstream& +SL_getIsFile( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << (S_ISREG(sb.st_mode) ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getIsSpecial( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + int v = 0; + if( !S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode) ) + v = 1; + + ss << v; + return ss; +} + +template +fh_stringstream& +SL_getIsLink( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + int v = 0; + if( S_ISLNK(sb.st_mode) ) + v = 1; + + ss << v; + return ss; +} + + +template +fh_stringstream& +SL_getHasHoles( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + int v = 0; + + if( S_ISREG(sb.st_mode) ) + { + int blksize = sb.st_blksize ? sb.st_blksize : 1; + + if( sb.st_size / blksize > sb.st_blocks ) + { + v = 1; + } + } + + ss << v; + return ss; +} + + template + fh_stringstream& + SL_getIsSetUID( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) + { + const struct stat& sb = StatDataFactory::getStat(c); + int v = sb.st_mode & S_ISUID; + ss << v; + return ss; + } + + template + fh_stringstream& + SL_getIsSetGID( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) + { + const struct stat& sb = StatDataFactory::getStat(c); + int v = sb.st_mode & S_ISGID; + ss << v; + return ss; + } + + template + fh_stringstream& + SL_getIsSticky( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) + { + const struct stat& sb = StatDataFactory::getStat(c); + int v = sb.st_mode & S_ISVTX; + ss << v; + return ss; + } + + + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +fh_stringstream& +SL_getRealPath( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + int path_max; + +#ifdef PATH_MAX + path_max = PATH_MAX; +#else + path_max = pathconf (path, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 4096; +#endif + + char *resolved_path = (char*)malloc( path_max + 1 ); + if( !resolved_path ) + { + throw bad_alloc(); + } + + if( !realpath( c->getDirPath().c_str(), resolved_path )) + { + int eno = errno; + free( resolved_path ); + fh_stringstream ss; + ss << "Can not get realpath(3) path:" << c->getDirPath() << endl; + Throw_CanNotGetStream( errnum_to_string( tostr(ss), eno ), c ); + } + + ss << resolved_path; + free( resolved_path ); + return ss; +} + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +template +fh_stringstream& +SL_getFileMode( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + LG_NATIVE_D << "getting mode:" << sb.st_mode << " for url:" << c->getURL() << endl; + LG_NATIVE_D << "SL_getFileMode() getting mode:" << sb.st_mode << " oct:" + << oct << (sb.st_mode & ~S_IFMT) << endl; + ss << oct << (sb.st_mode & ~S_IFMT); + LG_NATIVE_D << "SL_getFileMode c:" << c->getURL() + << " modestr:" << tostr(ss) + << " mode:" << (sb.st_mode & ~S_IFMT) + << endl; +// BackTrace(); + return ss; +} + +template +void +SL_setFileMode( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setFileMode 1 " << endl; + const struct stat& sb = StatDataFactory::getStat(c); +// ::mode_t m = 0; +// if( ss >> m ); + string modestr = ""; + modestr = StreamToString(ss); + ::mode_t m = Factory::MakeInitializationMode( modestr ); + LG_NATIVE_D << "SL_setFileMode c:" << c->getURL() + << " modestr:" << modestr + << " mode:" << m + << endl; + if( m ) + { + LG_NATIVE_D << "Setting mode to:" << m << " for url:" << c->getURL() << endl; + int rc = chmod( c->getDirPath().c_str(), m ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the file mode to m:" << m + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + c->public_updateMetaData(); + return; + } + + LG_NATIVE_D << "SL_setFileMode 2 " << endl; + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the file mode to m:" << m + << " failed reading new file mode" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } +} + + + + +template +fh_stringstream& +SL_getUserReadable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IRUSR ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getUserWritable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IWUSR ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getUserExecutable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IXUSR ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getGroupReadable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IRGRP ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getGroupWritable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IWGRP ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getGroupExecutable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IXGRP ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getOtherReadable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IROTH ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getOtherWritable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IWOTH ? 1 : 0); + return ss; +} + +template +fh_stringstream& +SL_getOtherExecutable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << ( sb.st_mode & S_IXOTH ? 1 : 0); + return ss; +} + +/******************************************************************************/ +/******************************************************************************/ + +template +fh_stringstream& +SL_getDeviceStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_dev; + return ss; +} + +template +fh_stringstream& +SL_getDeviceHexStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << hex << sb.st_dev; + return ss; +} + +template +fh_stringstream& +SL_getDeviceMajorStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << MAJOR(sb.st_dev); + return ss; +} + +template +fh_stringstream& +SL_getDeviceMinorStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << MINOR(sb.st_dev); + return ss; +} + + +template +fh_stringstream& +SL_getDeviceMajorHexStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << hex << MAJOR(sb.st_dev); + return ss; +} + +template +fh_stringstream& +SL_getDeviceMinorHexStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << hex << MINOR(sb.st_dev); + return ss; +} + + +template +fh_stringstream& +SL_getINodeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_ino; + return ss; +} + +template +fh_stringstream& +SL_getProtectionRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_mode; + return ss; +} + +template +fh_stringstream& +SL_getReadable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + int rc = access( c->getDirPath().c_str(), R_OK ); + ss << (rc==0); + return ss; +} + +template +fh_stringstream& +SL_getWritable( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + int rc = access( c->getDirPath().c_str(), W_OK ); + ss << (rc==0); + return ss; +} + +template +fh_stringstream& +SL_getRunableStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + int rc = access( c->getDirPath().c_str(), X_OK ); + ss << (rc==0); + return ss; +} + + +template +fh_stringstream& +SL_getDeletableStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + string earl = c->getURL(); + fh_context cc = c; + + const struct stat& sb = StatDataFactory::getStat(c); + if( S_ISLNK(sb.st_mode) ) + { + earl = getStrAttr( c, "link-target", earl ); + cc = Resolve( earl ); + } + if( !cc->isParentBound() ) + { + ss << 0; + } + else + { + fh_context p = cc->getParent(); + int rc = access( p->getDirPath().c_str(), W_OK | X_OK ); + ss << (rc==0); + } + return ss; +} + + + +template +fh_stringstream& +SL_getProtectionLsStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& oss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + if ( sb.st_mode == S_IFLNK ) oss << "l"; + else if( sb.st_mode == S_IFSOCK ) oss << "s"; + else if( sb.st_mode == S_IFBLK ) oss << "b"; + else if( sb.st_mode == S_IFDIR ) oss << "d"; + else if( sb.st_mode == S_IFCHR ) oss << "c"; + else if( sb.st_mode == S_IFIFO ) oss << "p"; + else oss << "-"; + + if( sb.st_mode & S_IRUSR ) oss << "r"; + else oss << "-"; + if( sb.st_mode & S_IWUSR ) oss << "w"; + else oss << "-"; + if( sb.st_mode & S_ISUID ) oss << "s"; + else if( sb.st_mode & S_IXUSR ) oss << "x"; + else oss << "-"; + + if( sb.st_mode & S_IRGRP ) oss << "r"; + else oss << "-"; + if( sb.st_mode & S_IWGRP ) oss << "w"; + else oss << "-"; + if( sb.st_mode & S_ISGID ) oss << "s"; + else if( sb.st_mode & S_IXGRP ) oss << "x"; + else oss << "-"; + + if( sb.st_mode & S_IROTH ) oss << "r"; + else oss << "-"; + if( sb.st_mode & S_IWOTH ) oss << "w"; + else oss << "-"; + if( sb.st_mode & S_ISVTX ) oss << "T"; + else if( sb.st_mode & S_IXOTH ) oss << "x"; + else oss << "-"; + + return oss; +} + + + +template +fh_stringstream& +SL_getHardLinkCountStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_nlink; + return ss; +} + + + + +template +fh_stringstream& +SL_getGroupOwnerNumberStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_gid; + return ss; +} + +template +void +SL_setGroupOwnerNumberStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setGroupOwnerNumberStream() c:" << c->getURL() + << endl; + + const struct stat& sb = StatDataFactory::getStat(c); + + uid_t owner = -1; + gid_t group = -1; + if(ss >> group) + { + LG_NATIVE_D << "Setting group to:" << group << " for url:" << c->getURL() << endl; + + if( !Shell::canChangeFileToGroup( group )) + { + fh_stringstream ss; + ss << "Native context can not set the group number to:" << group + << " permission denied" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + + int rc = StatDataFactory::chown( c->getDirPath().c_str(), owner, group ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the group to:" << group + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the group number to:" << group + << " failed reading new file group number" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } +} + +template +fh_stringstream& +SL_getGroupOwnerNameStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + struct group *g = getgrgid(sb.st_gid); + ss << ( g ? g->gr_name : "N/A" ); + return ss; +} + +template +void +SL_setGroupOwnerNameStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setGroupOwnerNameStream() c:" << c->getURL() << endl; + const struct stat& sb = StatDataFactory::getStat(c); + + uid_t owner = -1; + gid_t group = -1; + string groupstr = ""; + + if(ss >> groupstr && groupstr.length() ) + { + struct group* gre = getgrnam( groupstr.c_str() ); + if( !gre ) + { + fh_stringstream ss; + ss << "Native context can not set the group to:" << groupstr + << " because there is no matching group number for that name" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + + group = gre->gr_gid; + + LG_NATIVE_D << "Setting group to:" << groupstr + << " groupnum:" << group + << " for url:" << c->getURL() << endl; + + if( !Shell::canChangeFileToGroup( group )) + { + fh_stringstream ss; + ss << "Native context can not set the group number to:" << group + << " permission denied" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } + + int rc = StatDataFactory::chown( c->getDirPath().c_str(), owner, group ); + if( rc != 0 ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set the group to:" << group + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); + return; + } + + /* fail */ + { + fh_stringstream ss; + ss << "Native context can not set the group number to:" << group + << " failed reading new file group number" + << " file: " << c->getDirPath(); + Throw_getIOStreamCloseUpdateFailed( tostr(ss), c ); + } +} + + + + +template +fh_stringstream& +SL_getDeviceTypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_rdev; + return ss; +} + +template +fh_stringstream& +SL_getDeviceMajorTypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << MAJOR(sb.st_rdev); + return ss; +} + +template +fh_stringstream& +SL_getDeviceMinorTypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << MINOR(sb.st_rdev); + return ss; +} + +template +fh_stringstream& +SL_getBlockSizeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_blksize; + return ss; +} + +template +fh_stringstream& +SL_getBlockCountStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_blocks; + return ss; +} + + + +template +fh_stringstream& +SL_getCTimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_ctime; +// LG_EAIDX_D << "SL_getCTimeRawStream() ctime:" << sb.st_ctime << endl; +// LG_EAIDX_D << "SL_getCTimeRawStream() ss.str :" << ss.str() << endl; + return ss; +} + +template +fh_stringstream& +SL_getATimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + /* the file can be accessed at any time, so the safest method is to + * clear away the cache for this context + */ + c->bumpVersion(); + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_atime; + return ss; +} + +template +fh_stringstream& +SL_getMTimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + ss << sb.st_mtime; + return ss; +} + + +void +SL_setXTimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss, struct utimbuf utb ) +{ + LG_NATIVE_D << "SL_setXTimeRawStream() setatime url:" << c->getURL() + << " atime:" << utb.actime + << " mtime:" << utb.modtime + << endl; + + if( utb.actime == -1 || utb.modtime == -1 ) + { + fh_stringstream ss; + ss << "invalid time_t given" + << " for updating time attribute:" << rdn + << " on url:" << c->getURL(); + Throw_BadlyFormedTime( tostr(ss), c ); + } + + + if( 0 != utime( c->getDirPath().c_str(), &utb ) ) + { + int ec = errno; + fh_stringstream ss; + ss << "Native context can not set access and modification time." + << " file: " << c->getDirPath(); + ThrowFromErrno( ec, tostr(ss), c ); + } + c->bumpVersion(); +} + +template +void +SL_setATimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + time_t t = -1; + ss >> t; + + struct utimbuf utb; + utb.actime = t; + utb.modtime = sb.st_mtime; + + SL_setXTimeRawStream( c, rdn, atom, ss, utb ); +} + +template +void +SL_setMTimeRawStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ) +{ + LG_NATIVE_D << "SL_setMTimeRawStream()" << endl; + const struct stat& sb = StatDataFactory::getStat(c); + + time_t t = -1; + ss >> t; + + struct utimbuf utb; + utb.actime = sb.st_atime; + utb.modtime = t; + + SL_setXTimeRawStream( c, rdn, atom, ss, utb ); +} + +template +fh_stringstream& +SL_getFilesystemFiletypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_stringstream& ss ) +{ + const struct stat& sb = StatDataFactory::getStat(c); + + if(S_ISREG(sb.st_mode)) ss << "regular file"; + else if(S_ISDIR(sb.st_mode)) ss << "directory"; + else if(S_ISCHR(sb.st_mode)) ss << "character device"; + else if(S_ISBLK(sb.st_mode)) ss << "block device"; + else if(S_ISFIFO(sb.st_mode)) ss << "fifo"; + else if(S_ISLNK(sb.st_mode)) ss << "symbolic link"; + else if(S_ISSOCK(sb.st_mode)) ss << "socket"; + else ss << "unknown"; + + return ss; +} + + +// template +// fh_stringstream +// SL_getMimetypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +// { +// const struct stat& sb = StatDataFactory::getStat(c); +// fh_stringstream ss; +// c->ensureMimeAndFileTypeUpToDate(NativeContext::NATIVE_LIBFILE_MIME); +// ss << c->Mimetype; +// return ss; +// } + +// template +// fh_stringstream +// SL_getFiletypeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +// { +// const struct stat& sb = StatDataFactory::getStat(c); +// fh_stringstream ss; +// c->ensureMimeAndFileTypeUpToDate(NativeContext::NATIVE_LIBFILE_TYPE); +// ss << c->Filetype; +// return ss; +// } + + + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + + +fh_istream +SL_getFSName( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + fh_stringstream ss; + ss << Util::getFileSystemTypeString( c->getStatFS() ); + return ss; +} + +fh_istream +SL_getFSMaxNameLength( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_namelen; + return ss; +} + +fh_istream +SL_getFSID( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + +// cerr << "SL_getFSID() ID1:" << s.f_fsid << endl; +// cerr << "SL_getFSID() ID.sz:" << sizeof(s.f_fsid) << endl; +// cerr << "s.f_fsid.__val[0] SIZE:" << sizeof( s.f_fsid.__val[0] ) << endl; + +// { +// guint64 p = s.f_fsid.__val[0]; +// guint64 sec = s.f_fsid.__val[1]; +// sec <<= 32; +// p |= sec; +// // guint64* p = static_cast(&s.f_fsid.__val[0]); +// cerr << "SL_getFSID() ID2 p:" << p << " sec:" << sec << endl; +// } + + + + fh_stringstream ss; + ss << s.f_fsid; + return ss; +} + +fh_istream +SL_getFSFileNodesFree( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_ffree; + return ss; +} + +fh_istream +SL_getFSFileNodesTotal( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_files; + return ss; +} + +fh_istream +SL_getFSAvailableBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_bavail; + return ss; +} + +fh_istream +SL_getFSFreeBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_bfree; + return ss; +} + + fh_istream + SL_getFSFreeSize( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + if( s.f_bfree ) + ss << s.f_bsize / s.f_bfree; + else + ss << 0; + return ss; + } + + + + +fh_istream +SL_getFSBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_blocks; + return ss; +} + +fh_istream +SL_getFSBlockSize( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_bsize; + return ss; +} + +fh_istream +SL_getFSType( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + struct statfs s = c->getStatFS(); + + fh_stringstream ss; + ss << s.f_type; + return ss; +} + +//struct ::statfs +struct statfs +NativeContext::getStatFS() +{ + struct statfs buf; + int rc = statfs( getDirPath().c_str(), &buf ); + if( rc != 0 ) + { + int eno = errno; + fh_stringstream ss; + ss << "Can not statfs() path:" << getDirPath() << endl; + cerr << tostr(ss) << endl; + ThrowFromErrno( eno, tostr(ss), this ); + } + return buf; +} + + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + + +string +NativeContext::priv_getRecommendedEA() +{ + const static string rea = "size-human-readable,protection-ls,mtime-display,name"; + return adjustRecommendedEAForDotFiles( this, rea ); +} + +bool +NativeContext::getHasSubContextsGuess() +{ + bool ret = false; + + ensureUpdateMetaDataCalled(); + const struct stat& sb = getStat_Follow(); + + if( IsDanglingLink ) + { + return false; + } + + if( sb.st_mode & S_IFDIR ) + { + DIR *d; struct dirent *e; + if (d = opendir( getDirPath().c_str() )) + { + while( true ) + { + e = readdir (d); + if( e && (!strcmp( e->d_name, "." ) || !strcmp( e->d_name, "..") )) + continue; + ret = e; + break; + } + closedir (d); + } + } +// LG_NATIVE_D << "NativeContext::getHasSubContextsGuess() url:" << getURL() +// << " ret:" << ret +// << " hasOverMounter:" << hasOverMounter() +// << endl; + return ret ? ret : hasOverMounter(); +} + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +static void setExistsSubDir_Cache( Context*c, time_t c_ctime, bool hasSubContext ) +{ + fh_stringstream keyss; + keyss << "exists-subdir-" << Util::replace_all( c->getURL(), '/', '-' ); + + setEDBString( FDB_CACHE, tostr(keyss), tostr( hasSubContext )); + keyss << "-ctime"; + setEDBString( FDB_CACHE, tostr(keyss), tostr( c_ctime )); +} + +static int getExistsSubDir_Cache( Context*c, time_t c_ctime ) +{ + fh_stringstream keyss; + keyss << "exists-subdir-" << Util::replace_all( c->getURL(), '/', '-' ); + + try + { + int ret = toint(getEDBString( FDB_CACHE, tostr(keyss), "0", true, true )); + keyss << "-ctime"; + time_t ct = toType(getEDBString( FDB_CACHE, tostr(keyss), "0", true, true )); + + /* If the time the cache was created is still fresh then return cache */ + if( ct >= c_ctime ) + { + return ret; + } + } + catch(...) + {} + + return -1; +} + + + +/** + * Return 1 if there is atleast one subdirectory of this node. + */ +fh_stringstream +SL_getExistsSubDir( NativeContext* c, const std::string& rdn, EA_Atom* atom, int m = 0 ) +{ + bool hasSubContext = false; + + const struct stat& cstat = c->getStat_DontFollow(); + time_t c_ctime = cstat.st_ctime; + + int rc = -1; // getExistsSubDir_Cache( c, c_ctime ); + + if( rc != -1 ) + { + hasSubContext = rc; + } + else + { + if( DIR *d = opendir( c->getDirPath().c_str() ) ) + { + while( struct dirent *de = readdir(d) ) + { + const char* rdn = de->d_name; + + if( !strcmp( rdn, "." ) || !strcmp( rdn, "..") ) + continue; + + fh_stringstream pathss; + pathss << c->getDirPath() << "/" << rdn; + + struct stat sbuf; + if( 0 != lstat( tostr(pathss).c_str(), &sbuf )) + { + /* error */ + hasSubContext = false; + break; + } + + if(S_ISDIR(sbuf.st_mode)) + { + hasSubContext = true; + break; + } + } + + closedir(d); + + /* This could blow up if there are no subcontexts made by the overmounter */ + if( !hasSubContext ) + { + hasSubContext = c->public_hasOverMounter() > 0; + } + + } + } + + +// setExistsSubDir_Cache( c, c_ctime, hasSubContext ); + + fh_stringstream ss; + ss << hasSubContext; + return ss; +} + +fh_stringstream +SL_getExistsSubDir_gcc43_bug( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getExistsSubDir( c, rdn, atom ); +} + + + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +fh_stringstream +SL_getXSubcontextHardLinkCountIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).hardlinkcount; + return ss; +} + +fh_stringstream +SL_getXSubcontextSizeIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).size; + return ss; +} + +fh_stringstream +SL_getXSubcontextSizeInBlocksIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).sizeinblocks; + return ss; +} + +fh_stringstream +SL_getXSubcontextFileCountIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).filecount; + return ss; +} + +fh_stringstream +SL_getXSubcontextDirCountIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).dircount; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestMTimeRawIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestmtime; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestCTimeRawIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestctime; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestATimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestatime; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestMTimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestmtime_url; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestCTimeURLIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestctime_url; + return ss; +} + +fh_stringstream +SL_getXSubcontextOldestATimeURLIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + fh_display_aggdata d = getCachedContextAggregateData( c, m ); + + fh_stringstream ss; + ss << d->getData( m ).oldestatime_url; + return ss; +} + +fh_stringstream +SL_getPreallocationAtTailStream( NativeContext* c, const std::string& rdn, + EA_Atom* atom, int m ) +{ + guint64 prealloc = 0; + +#ifdef FERRIS_HAVE_XFS +#endif + + fh_stringstream ss; + ss << prealloc; + return ss; +} +fh_stringstream +SL_getPreallocationAtTailStream_gcc43_bug( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getPreallocationAtTailStream( c, rdn, atom, 0 ); +} + +void +SL_updatePreallocationAtTail( NativeContext* c, const std::string& rdn, EA_Atom* atom, + + fh_istream ss ) +{ + guint64 newprealloc = toType( getFirstLine(ss) ); +#ifdef FERRIS_HAVE_XFS +#endif +} + + + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +fh_stringstream +SL_getSubcontextHardLinkCountIOStream( Context* c, const std::string& rdn, + EA_Atom* atom, int m = 0 ) +{ + return SL_getXSubcontextHardLinkCountIOStream( c, rdn, atom, 0 ); +} +fh_stringstream +SL_getSubcontextHardLinkCountIOStream_gcc43_bug( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextHardLinkCountIOStream( c, rdn, atom, 0 ); +} + + + +fh_stringstream +SL_getRecursiveSubcontextHardLinkCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextHardLinkCountIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextSizeIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextSizeIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextSizeIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextSizeIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextSizeInBlocksIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextSizeInBlocksIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextSizeInBlocksIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextSizeInBlocksIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextFileCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextFileCountIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextFileCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextFileCountIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextDirCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextDirCountIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextDirCountIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextDirCountIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestMTimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestMTimeRawIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestMTimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestMTimeRawIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestCTimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestCTimeRawIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestCTimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestCTimeRawIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestATimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestATimeRawIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestATimeRawIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestATimeRawIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestMTimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestMTimeURLIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestMTimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestMTimeURLIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestCTimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestCTimeURLIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestCTimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestCTimeURLIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +fh_stringstream +SL_getSubcontextOldestATimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestATimeURLIOStream( c, rdn, atom, 0 ); +} + +fh_stringstream +SL_getRecursiveSubcontextOldestATimeURLIOStream( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getXSubcontextOldestATimeURLIOStream( c, rdn, atom, AGGDATA_RECURSIVE ); +} + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +#ifdef HAVE_LIBRPM + +// +// Note that use of get_rpm_header() and get_rpmfi() both rely on a +// open rpmdb handle. Such a handle can be created using +// +// rpmdb db = get_rpmdb(); +// rpmdb_releaser dum1( db ); +// and the releaser will release the handle for you +// +struct rpmState : public CacheHandlable +{ + rpmfi fi; + rpmdbMatchIterator mi; + Header hdr; + + rpmState(); + ~rpmState(); + +}; + +rpmState::rpmState() + : + mi( 0 ), + fi( 0 ), + hdr( 0 ) +{ +} + +rpmState::~rpmState() +{ +// cerr << "~rpmState() " << endl; + + if( fi ) + rpmfiFree( fi ); + if( hdr ) + { + } + if( mi ) + rpmdbFreeIterator( mi ); +} + + +// template< class Key, class Value > +// class FERRISEXP_API Cache + +static Cache< NativeContext*, fh_rpmState >& getRpmStateCache() +{ + typedef Cache< NativeContext*, fh_rpmState > cache_t; + static cache_t cache; + static bool v = true; + if( v ) + { + v = false; + cache.setMaxCollectableSize( 20 ); + cache.setTimerInterval( 3000 ); + } + return cache; +} + + +fh_rpmState +NativeContext::get_rpm_header( rpmdb db ) +{ + if( DontHaveRPMEntry ) + return 0; + + { + fh_rpmState st = getRpmStateCache().get( this ); + if( st && st->mi && st->hdr ) + { +// cerr << "Cache hit!" << endl; + return st; + } + } + + fh_rpmState st = new rpmState(); + rpmTag match_type = RPMTAG_BASENAMES; + st->mi = rpmdbInitIterator( db, + match_type, + getDirPath().c_str(), + 0 ); + if( st->mi ) + { + st->hdr = rpmdbNextIterator( st->mi ); + getRpmStateCache().put( this, st ); + return st; + } + + DontHaveRPMEntry = true; + return 0; +} + +fh_rpmState +NativeContext::get_rpmfi( rpmdb db ) +{ + fh_rpmState st = get_rpm_header( db ); + if( !st || !st->hdr ) + return 0; + + if( st->fi ) + { + rpmfiFree( st->fi ); + } + + Header h = st->hdr; + rpmts ts = NULL; + st->fi = rpmfiNew( ts, h, RPMTAG_BASENAMES, 1 ); + + string path = getDirPath(); + for( rpmfiInit( st->fi, 0 ); rpmfiNext( st->fi ) >= 0; ) + { + const char* fileName = rpmfiFN( st->fi ); +// cerr << "get_rpmfi() filename:" << fileName +// << " getDirPath():" << path +// << endl; + + if( path == fileName ) + { + return st; + } + } + + LG_NATIVE_D << "get_rpmfi() cant find rpmfi for path:" << path << endl; + return st; +} + + +fh_stringstream +NativeContext::SL_getRPMVerifyFlag( NativeContext* c, int flag ) +{ + fh_stringstream ss; + if( c->DontHaveRPMEntry ) + return ss; + + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + + bool verifyOK = true; + rpmVerifyAttrs res; + rpmVerifyAttrs omitMask = (rpmVerifyAttrs)~(flag); + rpmts ts = NULL; + fh_rpmState st = c->get_rpmfi( db ); + if( st && st->fi ) + { + rpmfi fi = st->fi; + int e = rpmVerifyFile( ts, fi, &res, omitMask ); + if( e ) + { +// cerr << "verify e:" << e << endl; + verifyOK = false; + } + else + { + if( res & flag ) + verifyOK = false; + } + } + else + c->DontHaveRPMEntry = 1; + + ss << verifyOK; + return ss; +} + + +fh_stringstream +NativeContext::SL_getRPMVerifySize( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_FILESIZE ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyMode( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_MODE ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyMD5( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_MD5 ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyDevice( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_RDEV ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyOwner( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_USER ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyGroup( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_GROUP ); +} + +fh_stringstream +NativeContext::SL_getRPMVerifyMTime( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMVerifyFlag( c, RPMVERIFY_MTIME ); +} + +fh_stringstream +NativeContext::SL_getRPMFileFlag( NativeContext* c, rpmfileAttrs a ) +{ + fh_stringstream ss; + if( c->DontHaveRPMEntry ) + return ss; + + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + + fh_rpmState st = c->get_rpmfi( db ); + if( st && st->fi ) + { + rpmfi fi = st->fi; + rpmfileAttrs fileAttrs = (rpmfileAttrs)rpmfiFFlags(fi); + bool v = fileAttrs & a; + ss << v; + } + else + c->DontHaveRPMEntry = 1; + + return ss; +} + + +fh_stringstream +NativeContext::SL_getRPMIsConfig( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMFileFlag( c, RPMFILE_CONFIG ); +} + +fh_stringstream +NativeContext::SL_getRPMIsDoc( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMFileFlag( c, RPMFILE_DOC ); +} + +fh_stringstream +NativeContext::SL_getRPMIsGhost( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMFileFlag( c, RPMFILE_GHOST ); +} + +fh_stringstream +NativeContext::SL_getRPMIsLicense( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMFileFlag( c, RPMFILE_LICENSE ); +} + +fh_stringstream +NativeContext::SL_getRPMIsPubkey( NativeContext* c,const std::string&,EA_Atom*) +{ + return SL_getRPMFileFlag( c, RPMFILE_PUBKEY ); +} + +fh_stringstream +NativeContext::SL_getRPMIsReadme( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMFileFlag( c, RPMFILE_README ); +} + +fh_stringstream +NativeContext::SL_getRPMHeaderString( NativeContext* c, int_32 tag ) +{ + fh_stringstream ss; + if( c->DontHaveRPMEntry ) + { + LG_NATIVE_D << "getRPMHeaderString, no entry url:" << c->getURL() << " tag:" << tag << endl; + return ss; + } + + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + + const char *cstr; + fh_rpmState st = c->get_rpm_header( db ); + if( st && st->hdr ) + { + Header h = st->hdr; + rpmHeaderGetEntry( h, tag, NULL, (void **)&cstr, NULL); + LG_NATIVE_D << "getRPMHeaderString, cstr:" << (cstr!=0) + << " url:" << c->getURL() << " tag:" << tag << endl; + if( cstr ) + ss << cstr; + } + else + { + LG_NATIVE_D << "getRPMHeaderString, setting no entry url:" << c->getURL() << " tag:" << tag << endl; + c->DontHaveRPMEntry = 1; + } + + return ss; +} + +fh_stringstream +NativeContext::SL_getRPMPackage( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMHeaderString( c, RPMTAG_NAME ); +} + +fh_stringstream +NativeContext::SL_getRPMVersion( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMHeaderString( c, RPMTAG_VERSION ); +} + +fh_stringstream +NativeContext::SL_getRPMRelease( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMHeaderString( c, RPMTAG_RELEASE ); +} + +fh_stringstream +NativeContext::SL_getRPMInfoURL( NativeContext* c, const std::string& rdn, EA_Atom* atom ) +{ + return SL_getRPMHeaderString( c, RPMTAG_URL ); +} + + fh_stringstream + NativeContext::SL_getRPMVendor( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRPMHeaderString( c, RPMTAG_VENDOR ); + } + + fh_stringstream + NativeContext::SL_getRPMDistribution( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRPMHeaderString( c, RPMTAG_DISTRIBUTION ); + } + + fh_stringstream + NativeContext::SL_getRPMLicense( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRPMHeaderString( c, RPMTAG_LICENSE ); + } + + fh_stringstream + NativeContext::SL_getRPMPackager( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRPMHeaderString( c, RPMTAG_PACKAGER ); + } + + fh_stringstream + NativeContext::SL_getRPMGroup( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream tmp = SL_getRPMHeaderString( c, RPMTAG_GROUP ); + fh_stringstream ret; + string s; + getline( tmp, s ); + ret << s; + return ret; + } + + fh_stringstream + NativeContext::SL_getRPMBuildtime( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ret; + fh_stringstream tmpss = SL_getRPMHeaderString( c, RPMTAG_BUILDTIME ); + string s = tostr(tmpss); + if( s.length() ) + { + time_t* tv = (time_t*)s.data(); + ret << (*tv); + } + return ret; + } + + fh_stringstream + NativeContext::SL_getRPMSummary( NativeContext* c, const std::string& rdn, EA_Atom* atom ) + { + return SL_getRPMHeaderString( c, RPMTAG_SUMMARY ); + } + + + + +#endif +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +stringset_t& +getNativeStatelessEANames() +{ + static stringset_t ret; + return ret; +} + +void +NativeContext::createStateLessAttributes( bool force ) +{ + static Util::SingleShot virgin; + if( virgin() ) + { + LG_NATIVE_D << "NativeContext::createStateLessAttributes()" << endl; + + + SLEAPI( "is-native", SL_getIsNative, XSD_BASIC_BOOL ); + SLEAPI( "is-file", SL_getIsFile, XSD_BASIC_BOOL ); + SLEAPI( "is-special", SL_getIsSpecial, XSD_BASIC_BOOL ); + SLEAPI( "is-link", SL_getIsLink, XSD_BASIC_BOOL ); + SLEAPI( "has-holes", SL_getHasHoles, XSD_BASIC_BOOL ); + SLEAPI( "is-setuid", SL_getIsSetUID, XSD_BASIC_BOOL ); + SLEAPI( "is-setgid", SL_getIsSetGID, XSD_BASIC_BOOL ); + SLEAPI( "is-sticky", SL_getIsSticky, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-dir", n_SL_getIsDir, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-file", SL_getIsFile, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-special", SL_getIsSpecial, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-link", SL_getIsLink, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-has-holes", SL_getHasHoles, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-setuid", SL_getIsSetUID, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-setgid", SL_getIsSetGID, XSD_BASIC_BOOL ); + SLEAPI( "dontfollow-is-sticky", SL_getIsSticky, XSD_BASIC_BOOL ); + + SLEAPI( "realpath", SL_getRealPath, XSD_BASIC_STRING ); + + SLEAPI( "mode", + SL_getFileMode, + SL_setFileMode, + FXD_MODE_T ); + SLEAPI( "user-readable", SL_getUserReadable, XSD_BASIC_BOOL ); + SLEAPI( "user-writable", SL_getUserWritable, XSD_BASIC_BOOL ); + SLEAPI( "user-executable", SL_getUserExecutable, XSD_BASIC_BOOL ); + SLEAPI( "group-readable", SL_getGroupReadable, XSD_BASIC_BOOL ); + SLEAPI( "group-writable", SL_getGroupWritable, XSD_BASIC_BOOL ); + SLEAPI( "group-executable",SL_getGroupExecutable, XSD_BASIC_BOOL ); + SLEAPI( "other-readable", SL_getOtherReadable, XSD_BASIC_BOOL ); + SLEAPI( "other-writable", SL_getOtherWritable, XSD_BASIC_BOOL ); + SLEAPI( "other-executable",SL_getOtherExecutable, XSD_BASIC_BOOL ); + + SLEAPI( "readable", SL_getReadable, XSD_BASIC_BOOL ); + SLEAPI( "writable", SL_getWritable, XSD_BASIC_BOOL ); + SLEAPI( "runable", SL_getRunableStream, XSD_BASIC_BOOL ); + SLEAPI( "deletable", SL_getDeletableStream, XSD_BASIC_BOOL ); + SLEAPI( "protection-raw", SL_getProtectionRawStream, FXD_MODE_T ); + SLEAPI( "protection-ls", SL_getProtectionLsStream, FXD_MODE_STRING_T ); + SLEAPI( "dontfollow-protection-raw", SL_getProtectionRawStream, FXD_MODE_T ); + SLEAPI( "dontfollow-protection-ls", SL_getProtectionLsStream, FXD_MODE_STRING_T ); + +// SLEA( "mtime-old", +// SL_getMTimeRawStream, +// SL_getMTimeRawStream, +// SL_setMTimeRawStream, +// FXD_UNIXEPOCH_T ); + SLEAPI( "mtime", + SL_getMTimeRawStream, + SL_setMTimeRawStream, + FXD_UNIXEPOCH_T ); + SLEAPI( "dontfollow-mtime", SL_getMTimeRawStream, FXD_UNIXEPOCH_T ); + SLEAPI( "atime", + SL_getATimeRawStream, + SL_setATimeRawStream, + FXD_UNIXEPOCH_T ); + SLEAPI( "dontfollow-atime", SL_getATimeRawStream, FXD_UNIXEPOCH_T ); + SLEAPI( "ctime", SL_getCTimeRawStream, FXD_UNIXEPOCH_T ); + SLEAPI( "dontfollow-ctime", SL_getCTimeRawStream, FXD_UNIXEPOCH_T ); + SLEAPI( "inode", SL_getINodeStream, FXD_INODE_T ); + SLEAPI( "dontfollow-inode", SL_getINodeStream, FXD_INODE_T ); + SLEAPI( "hard-link-count", SL_getHardLinkCountStream,XSD_BASIC_INT ); + SLEAPI( "dontfollow-hard-link-count", + SL_getHardLinkCountStream, XSD_BASIC_INT ); + SLEAPI( "filesystem-filetype", + SL_getFilesystemFiletypeStream, XSD_BASIC_STRING ); + SLEAPI( "dontfollow-filesystem-filetype", + SL_getFilesystemFiletypeStream, XSD_BASIC_STRING ); + SLEAPI( "group-owner-number", + SL_getGroupOwnerNumberStream, + SL_setGroupOwnerNumberStream, + FXD_GID_T ); + SLEAPI( "dontfollow-group-owner-number", + SL_getGroupOwnerNumberStream, FXD_GID_T ); + SLEAPI( "group-owner-name", + SL_getGroupOwnerNameStream, + SL_setGroupOwnerNameStream, FXD_GROUPNAME ); + SLEAPI( "dontfollow-group-owner-name", + SL_getGroupOwnerNameStream, FXD_GROUPNAME ); + SLEAPI( "user-owner-number", + SL_getUserOwnerNumberStream, + SL_setUserOwnerNumberStream, FXD_UID_T ); + SLEAPI( "dontfollow-user-owner-number", + SL_getUserOwnerNumberStream, FXD_UID_T ); + SLEAPI( "user-owner-name", + SL_getUserOwnerNameStream, + SL_setUserOwnerNameStream, FXD_USERNAME ); + SLEAPI( "dontfollow-user-owner-name", + SL_getUserOwnerNameStream, + SL_setUserOwnerNameStream, FXD_USERNAME ); + SLEAPI( "device-type", SL_getDeviceTypeStream, XSD_BASIC_INT ); + SLEAPI( "device-type-major", SL_getDeviceMajorTypeStream, XSD_BASIC_INT ); + SLEAPI( "device-type-minor", SL_getDeviceMinorTypeStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-type", SL_getDeviceTypeStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-type-major", SL_getDeviceMajorTypeStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-type-minor", SL_getDeviceMinorTypeStream, XSD_BASIC_INT ); + SLEAPI( "device", SL_getDeviceStream, XSD_BASIC_INT ); + SLEAPI( "device-hex", SL_getDeviceHexStream, XSD_BASIC_STRING ); + SLEAPI( "device-major", SL_getDeviceMajorStream, XSD_BASIC_INT ); + SLEAPI( "device-minor", SL_getDeviceMinorStream, XSD_BASIC_INT ); + SLEAPI( "device-major-hex", SL_getDeviceMajorHexStream, XSD_BASIC_STRING ); + SLEAPI( "device-minor-hex", SL_getDeviceMinorHexStream, XSD_BASIC_STRING ); + SLEAPI( "dontfollow-device", SL_getDeviceStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-hex", SL_getDeviceHexStream, XSD_BASIC_STRING ); + SLEAPI( "dontfollow-device-major", SL_getDeviceMajorStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-minor", SL_getDeviceMinorStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-device-major-hex", SL_getDeviceMajorHexStream, XSD_BASIC_STRING ); + SLEAPI( "dontfollow-device-minor-hex", SL_getDeviceMinorHexStream, XSD_BASIC_STRING ); + SLEAPI( "block-size", SL_getBlockSizeStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-block-size", SL_getBlockSizeStream, XSD_BASIC_INT ); + SLEAPI( "block-count", SL_getBlockCountStream, XSD_BASIC_INT ); + SLEAPI( "dontfollow-block-count", SL_getBlockCountStream, XSD_BASIC_INT ); +// SLEA( "size-old", SL_getSizeStream_OLD, FXD_FILESIZE ); + SLEAPI( "size", SL_getSizeStream, FXD_FILESIZE ); + SLEAPI( "dontfollow-size", SL_getSizeStream, FXD_FILESIZE ); + +// SLEA( "mimetype", SL_getMimetypeStream ); +// SLEA( "filetype", SL_getFiletypeStream ); + + SLEAPI( "is-ejectable", SL_getIsEjectableStream, XSD_BASIC_BOOL ); + SLEAPI( "eject", + SL_getEjectStream, + SL_updateEjectStream, + XSD_BASIC_BOOL ); + SLEAPI( "unmount", + SL_getUnmountStream, + SL_updateUnmountStream, + XSD_BASIC_BOOL ); + + +#ifdef FERRIS_HAVE_XFS + SLEA( "preallocation-at-tail", + SL_getPreallocationAtTailStream_gcc43_bug, + SL_getPreallocationAtTailStream_gcc43_bug, + SL_updatePreallocationAtTail, + FXD_FILESIZE ); +#endif + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + SLEA( "exists-subdir", SL_getExistsSubDir_gcc43_bug, XSD_BASIC_BOOL ); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + SLEA( "subcontext-hardlink-count", + SL_getSubcontextHardLinkCountIOStream_gcc43_bug, + SL_getSubcontextHardLinkCountIOStream_gcc43_bug, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + SLEA( "subcontext-size", + SL_getSubcontextSizeIOStream, + SL_getSubcontextSizeIOStream, + SL_FlushAggregateData, + FXD_FILESIZE ); + + SLEA( "subcontext-size-in-blocks", + SL_getSubcontextSizeInBlocksIOStream, + SL_getSubcontextSizeInBlocksIOStream, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + SLEA( "subcontext-file-count", + SL_getSubcontextFileCountIOStream, + SL_getSubcontextFileCountIOStream, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + SLEA( "subcontext-dir-count", + SL_getSubcontextDirCountIOStream, + SL_getSubcontextDirCountIOStream, + SL_FlushAggregateData, + XSD_BASIC_INT ); + + SLEA( "subcontext-oldest-mtime", + SL_getSubcontextOldestMTimeRawIOStream, + SL_getSubcontextOldestMTimeRawIOStream, + SL_FlushAggregateData, + FXD_UNIXEPOCH_T ); + + SLEA( "subcontext-oldest-ctime", + SL_getSubcontextOldestCTimeRawIOStream, + SL_getSubcontextOldestCTimeRawIOStream, + SL_FlushAggregateData, + FXD_UNIXEPOCH_T ); + + SLEA( "subcontext-oldest-atime", + SL_getSubcontextOldestATimeRawIOStream, + SL_getSubcontextOldestATimeRawIOStream, + SL_FlushAggregateData, + FXD_UNIXEPOCH_T ); + + SLEA( "subcontext-oldest-mtime-url", + SL_getSubcontextOldestMTimeURLIOStream, + SL_getSubcontextOldestMTimeURLIOStream, + SL_FlushAggregateData, + FXD_URL ); + + SLEA( "subcontext-oldest-ctime-url", + SL_getSubcontextOldestCTimeURLIOStream, + SL_getSubcontextOldestCTimeURLIOStream, + SL_FlushAggregateData, + FXD_URL ); + + SLEA( "subcontext-oldest-atime-url", + SL_getSubcontextOldestATimeURLIOStream, + SL_getSubcontextOldestATimeURLIOStream, + SL_FlushAggregateData, + FXD_URL ); + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + + SLEA( "recursive-subcontext-hardlink-count", + SL_getRecursiveSubcontextHardLinkCountIOStream, + SL_getRecursiveSubcontextHardLinkCountIOStream, + SL_FlushAggregateData, XSD_BASIC_INT ); + + SLEA( "recursive-subcontext-size", + SL_getRecursiveSubcontextSizeIOStream, + SL_getRecursiveSubcontextSizeIOStream, + SL_FlushAggregateData, FXD_FILESIZE ); + + SLEA( "recursive-subcontext-size-in-blocks", + SL_getRecursiveSubcontextSizeInBlocksIOStream, + SL_getRecursiveSubcontextSizeInBlocksIOStream, + SL_FlushAggregateData, XSD_BASIC_INT ); + + SLEA( "recursive-subcontext-file-count", + SL_getRecursiveSubcontextFileCountIOStream, + SL_getRecursiveSubcontextFileCountIOStream, + SL_FlushAggregateData, XSD_BASIC_INT ); + + SLEA( "recursive-subcontext-dir-count", + SL_getRecursiveSubcontextDirCountIOStream, + SL_getRecursiveSubcontextDirCountIOStream, + SL_FlushAggregateData, XSD_BASIC_INT ); + + SLEA( "recursive-subcontext-oldest-mtime", + SL_getRecursiveSubcontextOldestMTimeRawIOStream, + SL_getRecursiveSubcontextOldestMTimeRawIOStream, + SL_FlushAggregateData, FXD_UNIXEPOCH_T ); + + SLEA( "recursive-subcontext-oldest-ctime", + SL_getRecursiveSubcontextOldestCTimeRawIOStream, + SL_getRecursiveSubcontextOldestCTimeRawIOStream, + SL_FlushAggregateData, FXD_UNIXEPOCH_T ); + + SLEA( "recursive-subcontext-oldest-atime", + SL_getRecursiveSubcontextOldestATimeRawIOStream, + SL_getRecursiveSubcontextOldestATimeRawIOStream, + SL_FlushAggregateData, FXD_UNIXEPOCH_T ); + + SLEA( "recursive-subcontext-oldest-mtime-url", + SL_getRecursiveSubcontextOldestMTimeURLIOStream, + SL_getRecursiveSubcontextOldestMTimeURLIOStream, + SL_FlushAggregateData, FXD_URL ); + + SLEA( "recursive-subcontext-oldest-ctime-url", + SL_getRecursiveSubcontextOldestCTimeURLIOStream, + SL_getRecursiveSubcontextOldestCTimeURLIOStream, + SL_FlushAggregateData, FXD_URL ); + + SLEA( "recursive-subcontext-oldest-atime-url", + SL_getRecursiveSubcontextOldestATimeURLIOStream, + SL_getRecursiveSubcontextOldestATimeURLIOStream, + SL_FlushAggregateData, FXD_URL ); + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + SLEA( "fs-type", SL_getFSType, FXD_FSID_T ); + SLEA( "fs-block-size", SL_getFSBlockSize, FXD_LONG ); + SLEA( "fs-block-count", SL_getFSBlockCount, FXD_LONG ); + SLEA( "fs-free-block-count", SL_getFSFreeBlockCount, FXD_LONG ); + SLEA( "fs-free-size", SL_getFSFreeSize, FXD_LONG ); + SLEA( "fs-available-block-count", SL_getFSAvailableBlockCount, FXD_LONG ); + SLEA( "fs-file-nodes-total", SL_getFSFileNodesTotal, FXD_LONG ); + SLEA( "fs-file-nodes-free", SL_getFSFileNodesFree, FXD_LONG ); + SLEA( "fs-id", SL_getFSID, FXD_FSID_T ); + SLEA( "fs-file-name-length-maximum", SL_getFSMaxNameLength, FXD_LONG ); + SLEA( "fs-name", SL_getFSName, XSD_BASIC_STRING ); + + /************************************************************/ + /************************************************************/ + /************************************************************/ + +#ifdef HAVE_LIBRPM + SLEA( "rpm-verify-size", &_Self::SL_getRPMVerifySize, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-mode", &_Self::SL_getRPMVerifyMode, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-md5", &_Self::SL_getRPMVerifyMD5, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-device", &_Self::SL_getRPMVerifyDevice, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-owner", &_Self::SL_getRPMVerifyOwner, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-group", &_Self::SL_getRPMVerifyGroup, XSD_BASIC_BOOL ); + SLEA( "rpm-verify-mtime", &_Self::SL_getRPMVerifyMTime, XSD_BASIC_BOOL ); + + SLEA( "rpm-is-config", &_Self::SL_getRPMIsConfig, XSD_BASIC_BOOL ); + SLEA( "rpm-is-doc", &_Self::SL_getRPMIsDoc, XSD_BASIC_BOOL ); + SLEA( "rpm-is-ghost", &_Self::SL_getRPMIsGhost, XSD_BASIC_BOOL ); + SLEA( "rpm-is-license", &_Self::SL_getRPMIsLicense, XSD_BASIC_BOOL ); + SLEA( "rpm-is-pubkey", &_Self::SL_getRPMIsPubkey, XSD_BASIC_BOOL ); + SLEA( "rpm-is-readme", &_Self::SL_getRPMIsReadme, XSD_BASIC_BOOL ); + + SLEA( "rpm-package", &_Self::SL_getRPMPackage, XSD_BASIC_STRING ); + SLEA( "rpm-version", &_Self::SL_getRPMVersion, XSD_BASIC_STRING ); + SLEA( "rpm-release", &_Self::SL_getRPMRelease, XSD_BASIC_STRING ); + SLEA( "rpm-info-url", &_Self::SL_getRPMInfoURL, FXD_URL_IMPLICIT_RESOLVE ); + + SLEA( "rpm-vendor", &_Self::SL_getRPMVendor, XSD_BASIC_STRING ); + SLEA( "rpm-distribution", &_Self::SL_getRPMDistribution, XSD_BASIC_STRING ); + SLEA( "rpm-license", &_Self::SL_getRPMLicense, XSD_BASIC_STRING ); + SLEA( "rpm-packager", &_Self::SL_getRPMPackager, XSD_BASIC_STRING ); + SLEA( "rpm-group", &_Self::SL_getRPMGroup, XSD_BASIC_STRING ); + SLEA( "rpm-buildtime", &_Self::SL_getRPMBuildtime, FXD_UNIXEPOCH_T ); + SLEA( "rpm-summary", &_Self::SL_getRPMSummary, XSD_BASIC_STRING ); + +#endif // HAVE_LIBRPM + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + SLEA( "depth-per-color", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getDepthPerColorStream ), + XSD_BASIC_INT ); + SLEA( "depth", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getDepthStream ), + XSD_BASIC_INT ); + SLEA( "gamma", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getGammaStream ), + XSD_BASIC_DOUBLE ); + SLEA( "has-alpha", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getHasAlphaStream ), + XSD_BASIC_BOOL ); + SLEA( "aspect-ratio", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getAspectRatioStream ), + XSD_BASIC_DOUBLE ); + + SLEA( "width", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getWidthStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getWidthIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateWidthFromStream ), + FXD_WIDTH_PIXELS ); + + SLEA( "height", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getHeightStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getHeightIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateHeightFromStream ), + FXD_HEIGHT_PIXELS ); + SLEA( "rgba-32bpp", + EA_Atom_ReadOnly::GetIStream_Func_t( + &Context::imageEAGenerator_getRGBAStream ), + EA_Atom_ReadWrite::GetIOStream_Func_t( + &Context::imageEAGenerator_getRGBAIOStream ), + EA_Atom_ReadWrite::IOStreamClosed_Func_t( + &Context::imageEAGenerator_updateFromStream ), + FXD_BINARY_RGBA32 ); + + +#ifdef HAVE_LIBSELINUX + + SLEA( "selinux-identity", SL_getSELinuxIdentity, XSD_BASIC_STRING ); + SLEA( "selinux-type", + SL_getSELinuxType, + SL_getSELinuxType, + SL_setSELinuxType, + XSD_BASIC_STRING ); + SLEA( "dontfollow-selinux-type", + SL_getSELinuxType, + SL_getSELinuxType, + SL_setSELinuxType, + XSD_BASIC_STRING ); + SLEA( "selinux-context", + SL_getSELinuxContext, + SL_getSELinuxContext, + SL_setSELinuxContext, + XSD_BASIC_STRING ); + SLEA( "dontfollow-selinux-context", + SL_getSELinuxContext, + SL_getSELinuxContext, + SL_setSELinuxContext, + XSD_BASIC_STRING ); + +#endif + + SLEA( "episode", SL_getEpisode, XSD_BASIC_INT ); + SLEA( "series", SL_getSeries , XSD_BASIC_STRING ); + SLEA( "crc32-expected", SL_getExpectedCRC32 , XSD_BASIC_STRING ); + SLEA( "crc32-is-valid", SL_getCRC32IsValid , XSD_BASIC_STRING ); + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } +} + + static string ferris_readlinkat( int dirfd, const std::string& path ) + { + stringstream ret; + + size_t bufsiz = PATH_MAX; + char* buf = (char*)malloc( bufsiz+1 ); + +// cerr << "ferris_readlinkat() path:" << path << endl; + + while( true ) + { + errno = 0; + + int rc = readlinkat( dirfd, path.c_str(), buf, bufsiz ); + int eno = errno; + + if( errno == ENAMETOOLONG ) + { + bufsiz *= 2; + buf = (char*)realloc( buf, bufsiz+1 ); + continue; + } + + if( rc == -1 ) + { + fh_stringstream ss; + ss << "Error calling readlink() for:" << path; + free( buf ); + + if( dirfd != AT_FDCWD ) + close( dirfd ); + + ThrowFromErrno( eno, tostr(ss), 0 ); + } + + buf[ rc ] = '\0'; + break; + } + + ret << buf; + free( buf ); + if( dirfd != AT_FDCWD ) + close( dirfd ); + +// cerr << "ferris_readlinkat() ret:" << ret.str() << endl; + + return ret.str(); + } + + + static string ferris_readlink( const std::string& path ) + { + stringstream ret; + + size_t bufsiz = PATH_MAX; + char* buf = (char*)malloc( bufsiz+1 ); + + while( true ) + { + errno = 0; + + int rc = readlink( path.c_str(), buf, bufsiz ); + int eno = errno; + + if( errno == ENAMETOOLONG ) + { + bufsiz *= 2; + buf = (char*)realloc( buf, bufsiz+1 ); + continue; + } + + if( rc == -1 ) + { + fh_stringstream ss; + ss << "Error calling readlink() for:" << path; + free( buf ); + + + ThrowFromErrno( eno, tostr(ss), 0 ); + } + + buf[ rc ] = '\0'; + break; + } + + ret << buf; + free( buf ); + + return ret.str(); + } + + +fh_istream +NativeContext::getLinkTargetRelative( Context* c, const std::string& rdn, EA_Atom* atom ) +{ + string path = c->getDirPath(); + fh_stringstream ss; +#ifdef FERRIS_HAVE_READLINKAT + ss << ferris_readlinkat( AT_FDCWD, path ); +#else + ss << ferris_readlink( path ); +#endif + return ss; +} + + + +// fh_istream +// NativeContext::getLinkTargetRelative( Context* c, const std::string& rdn, EA_Atom* atom ) +// { +// string path = c->getDirPath(); + +// string parentpath = "/"; +// if( c->isParentBound() ) +// { +// parentpath = c->getParent()->getDirPath(); +// } + +// LG_NATIVE_D << "getLinkTarget() parent_path:" << parentpath << endl; + +// int parentfd = open( parentpath.c_str(), O_RDONLY ); +// if( parentfd == -1 ) +// { +// int eno = errno; +// fh_stringstream ss; +// ss << "Error opening directory:" << parentpath << endl; +// ThrowFromErrno( eno, tostr(ss), this ); +// } + +// fh_stringstream ss; +// ss << ferris_readlinkat( parentfd, path ); +// return ss; +// } + + + +void +NativeContext::priv_createAttributes() +{ + + LG_NATIVE_D << "NativeContext::priv_createAttributes() path:" << getDirPath() << endl; + +// ensureUpdateMetaDataCalled(); + + + const struct stat& sb = getStat_DontFollow(); + if(S_ISLNK(sb.st_mode)) + { + LG_NATIVE_D << "NativeContext::priv_createAttributes() path:" << getDirPath() + << " is a softlink" + << endl; + addAttribute("link-target-relative", this, + &NativeContext::getLinkTargetRelative, + FXD_URL, true ); + supplementFerrisLinkTargetFromAbsolute(); + } + + Context::priv_createAttributes(); + +// cerr << "\n\n-------------- NativeContext::createAttributes() --------------\n\n"; +// dumpAttrRefCounts(); +} + + +long +NativeContext::priv_guessSize() throw() +{ + long ret = 0; + + if( DIR *d = opendir( getDirPath().c_str() ) ) + { + while( struct dirent *de = readdir(d) ) + { + ret++; + } + + closedir(d); + } + return ret; +} + + + + +void +NativeContext::setupFAM() +{ + LG_NATIVE_I << "About to get FAM to Monitor dir name:" << getDirName() << endl; + LG_NATIVE_I << "About to get FAM to Monitor dir path:" << getDirPath() << endl; + + try + { + LG_NATIVE_D << "setupFAM() dir:" << getDirPath() << " FamReq:" << FamReq +// << " reqnum:" << FAMREQUEST_GETREQNUM( &FamReq->getRequest() ) + << endl; + if( FamReq ) + { + LG_NATIVE_D << "have existing famreq... rc:" << FamReq->getReferenceCount() << endl; + FamReq = 0; + } + + FamReq = Fampp::MonitorDirectory( getDirPath() ); + + LG_NATIVE_I << "fam request setup for dir path:" << getDirPath() << endl; + + typedef NativeContext NC; + const FamReq_t& R = FamReq; + + +// LG_NATIVE_D << "Registering change event for:" << getDirPath() << endl; + R->getSig().connect(mem_fun( *this, &NC::OnFamppChangedEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppDeletedEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppStartExecutingEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppStopExecutingEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppCreatedEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppMovedEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppAcknowledgeEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppExistsEvent)); + R->getSig().connect(mem_fun( *this, &NC::OnFamppEndExistEvent)); + + + LG_NATIVE_D << "end famreq... rc:" << FamReq->getReferenceCount() << endl; + LG_NATIVE_D << "Setup fam...done." << endl; + LG_NATIVE_I << "Setup fam...done." << endl; + } + catch( Fampp::FamppDirMonitorInitFailedException& e) + { + ostringstream ss; + ss << "FamppDirMonitorInitFailedException for path:" << getDirPath(); + Throw_CanNotMonitorDirWithFAM( tostr(ss), this, e ); + } +} + +string +NativeContext::OnFamppEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + LG_NATIVE_D << "NativeContext::famEv() DirName:" << getDirName() << endl; + LG_NATIVE_D << "NativeContext::famEv() DirPath:" << getDirPath() << endl; + LG_NATIVE_D <<" fqfilename : " << fqfilename << endl; + LG_NATIVE_D << " code : " << ev->getFAMCode() << endl; + + pair split = splitPathAtEnd( fqfilename ); + + string filename = split.second; + if( !filename.length() ) + filename = split.first; + + return filename; +} + + +void +NativeContext::OnFamppChangedEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + LG_NATIVE_D << "NativeContext::OnFamppChangedEvent() fqfn:" << fqfilename << endl; + + // This is interesting. We can assume that subcontexts are + // homogenous because with overmount we create a new root context + // for the overmounted read. + fh_context ctx = getSubContext( filename ); + + LG_NATIVE_D << "NativeContext::OnFamppChangedEvent() fn:" << filename + << " isbound:" << isBound(ctx) + << endl; + + bumpVersion(); + if(NativeContext* nc = (NativeContext*)GetImpl(ctx)) + { + LG_NATIVE_D << "NativeContext::OnFamppChangedEvent(nc) url:" << nc->getURL() << endl; + nc->bumpVersion(); + nc->updateMetaData(); + } + updateMetaData(); +} + +void +NativeContext::OnFamppDeletedEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + + Remove( filename ); +} + +void +NativeContext::OnFamppStartExecutingEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent(fqfilename, req, ev ); + + Emit_Start_Execute( 0, filename, filename, 0 ); +} + +void +NativeContext::OnFamppStopExecutingEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + + Emit_Stop_Execute( 0, filename, filename, 0 ); +} + +void +NativeContext::OnFamppCreatedEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + LG_NATIVE_D << "NativeContext::OnFamppCreatedEvent() fn:" << filename << endl; + native_readSubContext( filename, true ); +} + +void +NativeContext::OnFamppMovedEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + LG_NATIVE_D << "NativeContext::OnFamppMovedEvent() fqfilename:" << fqfilename << endl; + Emit_Moved( 0, "", filename, 0 ); +} + +void +NativeContext::OnFamppAcknowledgeEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + + +} + +void +NativeContext::OnFamppExistsEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + string filename = OnFamppEvent( fqfilename, req, ev ); + + LG_NATIVE_I << "FAMExists fqfilename:" << fqfilename << endl; + LG_NATIVE_D << "FAMExists filename:" << filename << endl; + LG_NATIVE_D << "FAMExists getDirName():" << getDirName() << endl; + LG_NATIVE_D << "FAMExists getDirPath():" << getDirPath() << endl; + + if( fqfilename == getDirPath() ) + return; + +// LG_NATIVE_D << "is-bound:" << priv_isSubContextBound( filename ) << endl; +// LG_NATIVE_D << "items-size:" << getItems().size() << endl; +// for( Items_t::iterator iter = getItems().begin(); iter != getItems().end(); ++iter ) +// { +// fh_context c = *iter; +// LG_NATIVE_D << "listing...c:" << c->getURL() << endl; +// } +// LG_NATIVE_D << "EOL" << endl; + + LG_NATIVE_I << "FAMExists filename:" << filename << endl; + fh_context childc = native_readSubContext( filename, false ); + if( NativeContext* nc = dynamic_cast( GetImpl( childc ) ) ) + { + nc->IsDanglingLink = false; + } +} + +void +NativeContext::OnFamppEndExistEvent( string fqfilename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ) +{ + LG_NATIVE_I << "OnFamppEndExistEvent fqfilename:" << fqfilename << endl; + + string filename = OnFamppEvent( fqfilename, req, ev ); + + LG_NATIVE_I << "__________________FAMEndExist________________________" << endl; +// dumpOutItems(); + + EnsureStopReadingIsFired(); + updateMetaData(); + +// LG_NATIVE_D << "OnFamppEndExistEvent() NumberOfSubContexts:" << NumberOfSubContexts +// << " sz:" << getItems().size() +// << " url:" << getURL() +// << endl; + NumberOfSubContexts = getItems().size(); + + + try + { +#ifdef PERMIT_FAM + if( !FamppChangedEventConnected ) + { + if( !FamReq ) + { + FamReq = Fampp::MonitorDirectory( getDirPath() ); + } + + typedef NativeContext NC; + const FamReq_t& R = FamReq; + R->getSig().connect(mem_fun( *this, &NC::OnFamppChangedEvent)); + FamppChangedEventConnected = true; + } +#endif + } + catch( Fampp::FamppDirMonitorInitFailedException& e) + { + ostringstream ss; + ss << "FamppDirMonitorInitFailedException for path:" << getDirPath(); + cerr << tostr(ss) << endl; + Throw_CanNotMonitorDirWithFAM( tostr(ss), this, e ); + } +} + +const struct stat& +NativeContext::getStat_Follow() +{ + LG_NATIVE_D << "NativeContext::getStat_Follow() this:" << (void*)this + << " active:" << isActiveView() + << " sb_follow_version:" << sb_follow_version + << " getVersion():" << getVersion() + << " url:" << getURL() + << endl; + LG_CTXREC_D << "getStat_Follow() " << endl; + + if( isActiveView() && sb_follow_version == getVersion() ) + { + LG_NATIVE_D << "NativeContext::getStat_Follow(cache) " + << " IsDanglingLink:" << (bool)IsDanglingLink + << " sz:" << sb_follow.st_size + << " url:" << getURL() + << endl; + if( IsDanglingLink ) + return sb_dont_follow; + + return sb_follow; + } + +// LG_NATIVE_D << "NativeContext::getStat_Follow() path:" << getDirPath() << endl; + int rv = stat( getDirPath().c_str(), &sb_follow ); + + LG_NATIVE_D << "NativeContext::getStat_Follow() rv:" << rv + << " sz:" << sb_follow.st_size + << endl; + + if( rv == 0 ) + { + IsDanglingLink = false; + } + if( rv != 0 ) + { + int eno = errno; + LG_NATIVE_W << "stat failed" << endl; + LG_NATIVE_W << "name:" << getDirName() << endl; + LG_NATIVE_W << "path:" << getDirPath() << endl; + + sb_follow_version = getVersion(); + IsDanglingLink = true; + return sb_dont_follow; +// fh_stringstream ss; +// ss << "Failed to stat url:" << getURL(); +// LG_CTXREC_D << "getStat_Follow(e) e:" << tostr(ss) << endl; +// ThrowFromErrno( eno, tostr(ss), this ); + } + + sb_follow_version = getVersion(); + return sb_follow; +} + +const struct stat& +NativeContext::getStat_DontFollow() +{ + if( isActiveView() && sb_dont_follow_version == getVersion() ) + { + return sb_dont_follow; + } + + LG_NATIVE_D << "lstat() path:" << getDirPath() << endl; + int rv = lstat( getDirPath().c_str(), &sb_dont_follow); + + if( rv != 0 ) + { + int eno = errno; + LG_NATIVE_W << "stat failed" << endl; + LG_NATIVE_W << "name:" << getDirName() << endl; + LG_NATIVE_W << "path:" << getDirPath() << endl; + + fh_stringstream ss; + ss << "Failed to lstat url:" << getURL(); + ThrowFromErrno( eno, tostr(ss), this ); + } + + LG_NATIVE_D << "lstat() path:" << getDirPath() + << " size:" << sb_dont_follow.st_size + << endl; + + /* If the lstat() is not a link then we have the stat() data too */ + if( !S_ISLNK(sb_dont_follow.st_mode)) + { + sb_follow = sb_dont_follow; + sb_follow_version = getVersion(); + } + + sb_dont_follow_version = getVersion(); + return sb_dont_follow; +} + +void +NativeContext::updateMetaData() +{ + LG_NATIVE_D << "updateMetaData() path:" << getDirPath() << endl; + getStat_DontFollow(); + getStat_Follow(); + + Context::updateMetaData(); + LG_NATIVE_D << "updateMetaData(end) path:" << getDirPath() << endl; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +#ifdef HAVE_LIBFILE + +void +NativeContext__mimetype_cb( libfile_op* x ) +{ + char* tmp=0; + + + NativeContext* nc = (NativeContext*)libfile_get_udata(x); + + if( tmp = libfile_get_mimetype(x) ) + { + nc->Mimetype = tmp; + } + else + { + nc->Mimetype = ""; + LG_NATIVE_D << " NativeContext__mimetype_cb() " + << " path:" << nc->getDirPath() + << " MIME RESOLUTION HAS FAILED" + << endl; + } + + LG_NATIVE_D << "NativeContext__mimetype_cb() " + << " path:" << nc->getDirPath() + << " mimetype:" << nc->Mimetype + << endl; +} + +void +NativeContext__filetype_cb( libfile_op* x ) +{ + char* tmp=0; + NativeContext* nc = (NativeContext*)libfile_get_udata(x); + + if( tmp = libfile_get_filetype(x) ) + { + nc->Filetype = tmp; + } + +} + +static void +libfile_filename_cb( libfile_op* x ) +{ +// char* inname = libfile_get_filename(x); +} + +libfile_op* +NativeContext::getFileMimeClient() +{ + static libfile_op* mc = 0; + + if( !mc ) + { + int argc = 1; + char*const argv[] = { "-i" }; + + if( !(mc = libfile_new()) ) + { + LG_NATIVE_D << "NativeContext::getFileMimeClient() " + << " can not make a new libfile instance." + << " path:" << getDirPath() + << endl; + return mc; + } + + libfile_set_program_name( mc, "libferris.so" ); + int rv = libfile_set_params( mc, argc, argv ); + + if( rv != LIBFILE_E_RETURN_SUCCESS ) + { + LG_NATIVE_D << "NativeContext::getFileMimeClient() " + << " libfile_set_params() failed" + << " path:" << getDirPath() + << endl; + return 0; + } + + libfile_set_mimetype_callback( mc, NativeContext__mimetype_cb ); + libfile_set_filetype_callback( mc, NativeContext__mimetype_cb ); + libfile_set_udata( mc, this ); + libfile_set_filename_callback( mc, NativeContext__mimetype_cb ); + } + + libfile_set_udata( mc, this ); + return mc; +} + +libfile_op* +NativeContext::getFileTypeClient() +{ + static libfile_op* mc = 0; + + if( !mc ) + { + int argc = 1; + char*const argv[] = { " " }; + + if( !(mc = libfile_new()) ) + { + LG_NATIVE_D << "NativeContext::getFileTypeClient() " + << " can not make a new libfile instance." + << " path:" << getDirPath() + << endl; + return mc; + } + + libfile_set_program_name( mc, "libferris.so" ); + int rv = libfile_set_params( mc, argc, argv ); + + if( rv != LIBFILE_E_RETURN_SUCCESS ) + { + LG_NATIVE_D << "NativeContext::getFileTypeClient() " + << " libfile_set_params() failed" + << " path:" << getDirPath() + << endl; + return 0; + } + + libfile_set_mimetype_callback( mc, NativeContext__filetype_cb ); + libfile_set_filetype_callback( mc, NativeContext__filetype_cb ); + libfile_set_udata( mc, this ); + libfile_set_filename_callback( mc, NativeContext__filetype_cb ); + } + + libfile_set_udata( mc, this ); + return mc; +} + + +// void +// NativeContext::setupLibFile( +// libfile_op*& x, +// int argc, char*const argv[], +// void (*cb)(libfile_op*) +// ) +// { +// int rv = 0; + +// if(x) +// { +// libfile_set_udata( x, this ); +// return; +// } + +// if( !(x = libfile_new()) ) +// { +// LG_NATIVE_D << "NativeContext::setupLibFile() can not make a new libfile instance." +// << " path:" << getDirPath() +// << endl; +// return; +// } + +// libfile_set_program_name( x, "libferris.so" ); +// rv = libfile_set_params( x, argc, argv ); + +// libfile_set_mimetype_callback( x, cb ); +// libfile_set_filetype_callback( x, cb ); +// libfile_set_udata( x, this ); +// libfile_set_filename_callback( x, libfile_filename_cb ); +// } + + + +// void +// NativeContext::setupLibFile(native_libfile_detection_bits b) +// { +// LG_NATIVE_D << "NativeContext::setupLibFile()" << endl; + +// if( b & NATIVE_LIBFILE_MIME ) +// { +// int argc = 1; +// char*const argv[] = { "-i" }; +// setupLibFile( libfile_mime_client, argc, argv, NativeContext__mimetype_cb ); +// libfile_mime_Version = 0; +// } +// if( b & NATIVE_LIBFILE_TYPE ) +// { +// int argc = 1; +// char*const argv[] = { " " }; +// setupLibFile( libfile_type_client, argc, argv, NativeContext__filetype_cb ); +// libfile_type_Version = 0; +// } +// } + + +void +NativeContext::ensureMimeAndFileTypeUpToDate( native_libfile_detection_bits b ) +{ + int rv=LIBFILE_E_RETURN_SUCCESS; + + LG_NATIVE_D << "NativeContext::ensureMimeAndFileTypeUpToDate()" << endl; +// LG_NATIVE_D << "ensureMimeAndFileTypeUpToDate() libfile_Version:" << libfile_Version << endl; + LG_NATIVE_D << "ensureMimeAndFileTypeUpToDate() getVersion:" << getVersion() << endl; + + if( b & NATIVE_LIBFILE_MIME && libfile_mime_Version < getVersion()) + { + if( libfile_op* mc = getFileMimeClient() ) + { + libfile_clear_sources( mc ); + libfile_append_source( mc, getDirPath().c_str() ); +// cerr << "NativeContext::ensureMimeAndFileTypeUpToDate() url:" << getURL() << endl; + rv = libfile_perform( mc ); + libfile_mime_Version = getVersion(); + LG_NATIVE_D << "ensureMimeAndFileTypeUpToDate() rv:" << rv << endl; + } + } + + if( b & NATIVE_LIBFILE_TYPE && libfile_type_Version < getVersion()) + { + if( libfile_op* mc = getFileTypeClient() ) + { + libfile_clear_sources( mc ); + libfile_append_source( mc, getDirPath().c_str() ); + rv = libfile_perform( mc ); + libfile_type_Version = getVersion(); + } + } + + if( !Mimetype.length() || Mimetype == "data" ) + { + if( ends_with( getDirName(), ".png" )) + { + Mimetype = "image/png"; + } + if( ends_with( getDirName(), ".mp3" )) + { + Mimetype = "audio/mp3"; + } + if( ends_with( getDirName(), ".ogg" )) + { + Mimetype = "audio/ogg"; + } + + string path = getDirPath(); + if( string::npos != path.find( FERRIS_CONFIG_APPS_DIR )) + { + Mimetype = "ferris/application"; + } + if( string::npos != path.find( FERRIS_CONFIG_EVENT_DIR )) + { + Mimetype = "ferris/event"; + } + if( string::npos != path.find( FERRIS_CONFIG_MIMEBIND_DIR )) + { + Mimetype = "ferris/mime"; + } + } + + if( ends_with( getDirName(), ".avi" )) + { + Mimetype = "video/avi"; + } + if( ends_with( getDirName(), ".mpg" )) + { + Mimetype = "video/mpg"; + } + if( ends_with( getDirName(), ".mpeg" )) + { + Mimetype = "video/mpg"; + } + if( ends_with( getDirName(), ".desktop" )) + { + Mimetype = "text/application-metadata"; + } + if( ends_with( getDirName(), ".db" )) + { + Mimetype = "application/db4"; + } + if( ends_with( getDirName(), ".mov" )) + { + Mimetype = "video/quicktime"; + } + + + if( Mimetype == "video/mpeg" ) + { + Mimetype = "video/mpg"; + } + + + // Handled in Ferris.cpp now. +// string path = getDirPath(); + +// if( string::npos != path.find( "/.ego/desktop" )) +// { +// if( isParentBound() && getParent()->getDirName() == "desktop" ) +// if( SL_getIsDir( this,"",0 ) ) +// { +// Mimetype = "desktop/directory"; +// } +// } +} + +string +NativeContext::priv_getMimeType( bool fromContent ) +{ + const struct stat& sb = FollowLinks::getStat(this); + ensureMimeAndFileTypeUpToDate(NativeContext::NATIVE_LIBFILE_MIME); + return Mimetype; +} + +string +NativeContext::getFileType() +{ + const struct stat& sb = FollowLinks::getStat(this); + ensureMimeAndFileTypeUpToDate(NativeContext::NATIVE_LIBFILE_TYPE); + return Filetype; +} +#endif + + +#ifdef HAVE_EFSD + +GMainLoop* NativeContext::m_efsdGML = 0; +EfsdConnection* NativeContext::m_efsdConnection = 0; +GIOChannel* NativeContext::m_efsdChannel = 0; +bool NativeContext::m_waitingForMimetype = false; +bool NativeContext::m_efsdTimedOut = false; + +static gboolean +mimeCreated_cb( GIOChannel *source, + GIOCondition condition, + gpointer user_data ) +{ + EfsdCmdId id; + EfsdEvent ee; + + NativeContext* c = (NativeContext*)user_data; + GMainLoop* gml = c->m_efsdGML; + c->m_waitingForMimetype = false; + + while( efsd_events_pending(c->m_efsdConnection) ) + { + if( efsd_next_event( c->m_efsdConnection, &ee) >= 0) + { + switch (ee.type) + { + case EFSD_EVENT_REPLY: + switch (ee.efsd_reply_event.command.type) + { + case EFSD_CMD_GETFILETYPE: + if (ee.efsd_reply_event.errorcode == 0) + { +// printf("Gettype event %i on %s\n", +// ee.efsd_reply_event.command.efsd_file_cmd.id, +// ee.efsd_reply_event.command.efsd_file_cmd.files[0]); +// if (ee.efsd_reply_event.errorcode == 0) +// { +// printf("filetype is %s\n", (char*)ee.efsd_reply_event.data); +// } + +// printf("Filetype of file %s is %s\n", +// efsd_reply_filename(&ee), +// (char*)ee.efsd_reply_event.data); + c->Mimetype = (char*)ee.efsd_reply_event.data; + } + break; + } + } + efsd_event_cleanup(&ee); + } + } + g_main_loop_quit( gml ); + return 0; +} +static gboolean mimeCreated_to( gpointer user_data ) +{ + NativeContext* c = (NativeContext*)user_data; + GMainLoop* gml = c->m_efsdGML; + + c->m_efsdTimedOut; + LG_NATIVE_W << "Timeout waiting for efsd to generate mime type. url:" << c->getURL() << endl; + g_main_loop_quit( gml ); + return 0; +} + +void +NativeContext::openEFSDConnection() +{ + if( !m_efsdConnection && !(m_efsdConnection = efsd_open())) + { + /* Oops. Couldn't establish connection. + * Is Efsd really running ? + */ + static Util::SingleShot virgin; + if( virgin() ) + { + /* only warn once */ + LG_NATIVE_ER << "Can not open connection to efsd." << endl; + } + return; + } + int efsdfd = efsd_get_connection_fd( m_efsdConnection ); + m_efsdChannel = g_io_channel_unix_new( efsdfd ); +} + +string +NativeContext::priv_getMimeType( bool fromContent ) +{ +// const struct stat& sb = FollowLinks::getStat(this); +// ensureMimeAndFileTypeUpToDate(NativeContext::NATIVE_LIBFILE_MIME); +// return Mimetype; + + EfsdCmdId id; + EfsdEvent ee; + + Mimetype = "document/unknown"; + + openEFSDConnection(); + if( !m_efsdConnection ) + return Mimetype; + + + // I found some files that would cause no result to ever be sent back + // so rather than hanging forever, we give efsd a one second timeout to + // get back to us, if it doesn't then we move on. + GIOCondition cond = GIOCondition(G_IO_IN | G_IO_ERR | G_IO_PRI); + guint srcID = g_io_add_watch( m_efsdChannel, cond, mimeCreated_cb, this ); + + m_waitingForMimetype = true; + m_efsdTimedOut = false; + + + /* Request the filetype: */ + + if ( (id = efsd_get_filetype( m_efsdConnection, (char*)getDirPath().c_str() )) < 0) + { + /* Could not send command. Continue accordingly. */ + LG_NATIVE_W << "Can not send efsd command to obtain the mime type of context:" + << getURL() << endl; + return Mimetype; + } + + + { + GMainContext* gmc = g_main_context_default(); + GMainLoop* gml = m_efsdGML = g_main_loop_new( gmc, 0 ); + + g_timeout_add( 1500, GSourceFunc(mimeCreated_to), this ); + g_main_loop_run( gml ); + g_source_remove( srcID ); +// g_main_loop_unref( gml ); + g_main_destroy( gml ); + } + + + // Churn over this efsd. + if( m_efsdTimedOut ) + { + if( m_efsdConnection ) + efsd_close( m_efsdConnection ); + m_efsdConnection = 0; + openEFSDConnection(); + } + + + // + // Clean up the extended mimetype to just two levels + // + int slash = Mimetype.find( '/' ); + if( slash != string::npos ) + { + slash = Mimetype.find( '/', slash+1 ); + if( slash != string::npos ) + { + Mimetype = Mimetype.substr( 0, slash ); + } + } + + return Mimetype; +} +#endif +#ifdef HAVE_KDE3 + +std::string +NativeContext::priv_getMimeType( bool fromContent ) +{ + Mimetype = "document/unknown"; + +// KMimeType::Ptr type = KMimeType::findByURL( getDirPath().c_str() ); +// Mimetype = type->name(); +// if (type->name() == KMimeType::defaultMimeType()) +// cerr << "Could not find out type" << endl; +// else +// cerr << "Type: " << type->name() << endl; + +// KMimeMagicResult* result = KMimeMagic::self()->findFileType( getDirPath().c_str() ); +// Mimetype = result->mimeType(); +// return Mimetype; + + return KDE::getMimeType( this, fromContent ); +} + +#endif + + + +// fh_istream +// NativeContext::getMimetypeStream( Attribute* attr ) +// { +// fh_stringstream ss; +// ensureMimeAndFileTypeUpToDate(NATIVE_LIBFILE_MIME); +// ss << Mimetype; +// return ss; +// } + +// fh_istream +// NativeContext::getFiletypeStream( Attribute* attr ) +// { +// fh_stringstream ss; +// ensureMimeAndFileTypeUpToDate(NATIVE_LIBFILE_TYPE); +// ss << Filetype; +// return ss; +// } + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +bool +NativeContext::supportsReClaim() +{ + return true; +} + +bool +NativeContext::supportsMonitoring() +{ + return true; +} + +bool +NativeContext::supportsRename() +{ + return true; +} + +bool +NativeContext::supportsRemove() +{ + return true; +} + +void +NativeContext::priv_remove( fh_context c ) +{ + LG_NATIVE_D << "Native::remove() path:" << c->getDirPath() << endl; + + c->ensureUpdateMetaDataCalled(); + + int rc = ::remove( c->getDirPath().c_str() ); + if( rc != 0 ) + { + string es = errnum_to_string( "", errno ); + fh_stringstream ss; + ss << "Native context can not remove object: " << c->getURL() + << " reason:" << es + << endl; + Throw_CanNotDelete( tostr(ss), GetImpl(c) ); + } + + ProcessAllFamppEvents(); +} + +fh_context +NativeContext::priv_rename( const std::string& rdn, + const std::string& newPathRelative, + bool TryToCopyOverFileSystems, + bool OverWriteDstIfExists ) +{ + string oldPath = appendToPath( getDirPath(), rdn ); + string newPath = appendToPath( getDirPath(), newPathRelative, true ); + + LG_NATIVE_D << "NativeContext::priv_rename() url:" << getURL() + << " rdn:" << rdn + << " oldPath:" << oldPath + << " newPath:" << newPath + << " TryToCopyOverFileSystems:" << TryToCopyOverFileSystems + << " OverWriteDstIfExists:" << OverWriteDstIfExists + << endl; + + + if( OverWriteDstIfExists ) + { + try + { + fh_context c = Resolve( newPath ); + } + catch( exception& e ) + { + int rc = ::remove( newPath.c_str() ); + if( rc != 0 && errno != ENOENT ) + { + int eno = errno; + string es = errnum_to_string( "", errno ); + LG_NATIVE_D << "priv_rename() rc:" << rc << " e#:" << eno << endl; + fh_stringstream ss; + ss << "Native context can not remove object: " << newPath + << " to make way for rename of:" << oldPath + << " reason:" << es + << endl; + Throw_CanNotDelete( tostr(ss), this ); + } + } + } + + if( starts_with( newPath, "file:" ) ) + newPath = newPath.substr( 5 ); + + LG_NATIVE_D << "NativeContext::priv_rename() Calling system rename function" + << " old:" << oldPath + << " new:" << newPath + << endl; + + if( !::rename( oldPath.c_str(), newPath.c_str() ) ) + { + /* ok */ + LG_NATIVE_D << "NativeContext::priv_rename(ok)" + << " old:" << oldPath + << " new:" << newPath + << endl; + + if( !isActiveView() ) + { + LG_NATIVE_D << "NativeContext::priv_rename(not active view)" + << " old:" << oldPath + << " new:" << newPath + << endl; + +// cerr << "passive view. rdn:" << rdn << " newPathRelative:" << newPathRelative << endl; + return contextHasBeenRenamed( rdn, newPathRelative ); + } + + LG_NATIVE_D << "NativeContext::priv_rename(active view, updating with process-all-events) " + << " old:" << oldPath + << " new:" << newPath + << endl; + +// // Try to force fam/gamin to update the new directory +// try +// { +// fh_context parent_newc = Resolve( newPath, RESOLVE_PARENT ); +// parent_newc->SubContextNamesCacheIsValid = false; +// parent_newc->bumpVersion(); +// } +// catch( exception& e ) +// { +// } + +// cerr << "active view at url:" << getURL() << " updating internal ferris state." << endl; + + // + // This is a charming race condition. Sometimes the kernel itself will not + // have the rename() effects in the fam/gamin queue for us at this stage. + // what can we do? + // + double RaceSleepTimeLeft = 30; + double RaceSleepTimeDropSize = 0.2; + while( RaceSleepTimeLeft ) + { + ProcessAllFamppEvents(); + + try + { + LG_NATIVE_D << "NativeContext::priv_rename(fam/gamin queue) " + << " RaceSleepTimeLeft:" << RaceSleepTimeLeft + << " old:" << oldPath + << " new:" << newPath + << endl; + fh_context ret = Resolve( newPath ); + break; + } + catch( exception& e ) + {} + + LG_NATIVE_D << "NativeContext::priv_rename(sleeping) " + << " RaceSleepTimeLeft:" << RaceSleepTimeLeft + << " old:" << oldPath + << " new:" << newPath + << endl; + RaceSleepTimeLeft -= RaceSleepTimeDropSize; + Time::Sleep( RaceSleepTimeDropSize ); + } + + + LG_NATIVE_D << "NativeContext::priv_rename(getting ret) " + << " old:" << oldPath + << " new:" << newPath + << endl; + fh_context ret = Resolve( newPath ); + LG_NATIVE_D << "NativeContext::priv_rename(returning) " + << " old:" << oldPath + << " new:" << newPath + << endl; + return ret; + } + int e = errno; + + /* failed */ + fh_stringstream ss; + ss << "Rename attempt failed. URL:" << getURL() << " src:" << rdn << " dst:" << newPath; + Throw_RenameFailed( errnum_to_string( tostr(ss), e ), this ); +} + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +void +NativeContext::imageEAGenerator_priv_createAttributes() +{ +} + + + time_t + NativeContext::getMTime() + { + if( getDirPath().empty() ) + return 0; + + try + { +// cerr << "NativeContext::getMTime().. path:" << getDirPath() << endl; + const struct stat& sb = getStat_DontFollow(); + return sb.st_mtime; + } + catch( exception& e ) + { + return 0; + } + } + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +void +NativeContext::bumpVersion() +{ + _Base::bumpVersion(); +} + + +}; + diff --git a/Ferris/Native.hh b/Ferris/Native.hh new file mode 100644 index 0000000..b0a94c9 --- /dev/null +++ b/Ferris/Native.hh @@ -0,0 +1,421 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Native.hh,v 1.11 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_NATIVE_H_ +#define _ALREADY_INCLUDED_FERRIS_NATIVE_H_ + +// this file is not part of the public headers +#include "config.h" + + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#ifdef HAVE_LIBFILE +#include +#endif +#ifdef HAVE_EFSD +#include +#endif +#ifdef HAVE_LIBRPM +#include +#include +#include +#include +#endif +#include + +#include +#include + +#include + +namespace Ferris +{ +#ifdef HAVE_LIBRPM + struct rpmState; + FERRIS_SMARTPTR( rpmState, fh_rpmState ); +#endif + + FERRISEXP_DLLLOCAL stringset_t& getNativeStatelessEANames(); + + class FERRISEXP_API NativeContext + : + public StateLessEAHolder< NativeContext > + { + typedef NativeContext _Self; + typedef StateLessEAHolder< NativeContext > _Base; + + friend class Ferrisls_aggregate_data; + + friend fh_stringstream SL_getPreallocationAtTailStream( NativeContext* c, const std::string& rdn, EA_Atom* atom, int m = 0 ); + friend void + SL_updatePreallocationAtTail( NativeContext* c, const std::string& rdn, EA_Atom* atom, fh_istream ss ); + + friend fh_stringstream getTimeStrFTimeStream( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getTimeStrFTimeIStream( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_iostream SL_getTimeStrFTimeIOStream( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + + friend fh_istream SL_getFSType( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSBlockSize( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSFreeBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSFreeSize( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSAvailableBlockCount( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSFileNodesTotal( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSFileNodesFree( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSID( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSMaxNameLength( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + friend fh_istream SL_getFSName( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + + + friend class NativeVFS_RootContextDropper; + + fh_context getNonKernelLinkTarget(); + + + virtual Context* priv_CreateContext( Context* parent, std::string rdn ); + virtual fh_context priv_getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ); + + fh_context + native_readSubContext( const std::string& rdn, bool created = false, bool checkIfExistsAlready = true ) + throw( NoSuchSubContext, FerrisNotSupportedInThisContext ); + + + + typedef Fampp::fh_fampp_req FamReq_t; + FamReq_t FamReq; + + void setupFAM(); + + std::string OnFamppEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + + void OnFamppChangedEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppDeletedEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppStartExecutingEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppStopExecutingEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppCreatedEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppMovedEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppAcknowledgeEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppExistsEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + void OnFamppEndExistEvent( std::string filename, Fampp::fh_fampp_req req, Fampp::fh_fampp_ev ev ); + + + protected: + +// struct ::statfs getStatFS(); + struct statfs getStatFS(); + + virtual void updateMetaData(); + + friend struct FollowLinks; + struct stat sb_follow; + struct stat sb_dont_follow; + Version_t sb_follow_version; + Version_t sb_dont_follow_version; + + guint8 +/**/ DontHaveRPMEntry:1, //< if we have already failed to find rpm info for file. +/**/ IsDanglingLink:1, //< for softlinks for which the target doesn't exist. + //< if IsDanglingLink is true then sb_follow==sb_dont_follow. + //< if IsDanglingLink then you should report an error attempting + //< to access sb_follow data. +/**/ FamppChangedEventConnected:1; //< only monitor changed once per directory + + + + public: + +#ifdef HAVE_LIBFILE + enum native_libfile_detection_bits { + NATIVE_LIBFILE_MIME = (1<<1), + NATIVE_LIBFILE_TYPE = (1<<2) + }; + friend void NativeContext__mimetype_cb( libfile_op* x ); + friend void NativeContext__filetype_cb( libfile_op* x ); +// fh_istream getMimetypeStream( Attribute* attr ); +// fh_istream getFiletypeStream( Attribute* attr ); + + + std::string Mimetype; + std::string Filetype; +// libfile_op* libfile_mime_client; +// libfile_op* libfile_type_client; + + libfile_op* getFileMimeClient(); + libfile_op* getFileTypeClient(); + + Version_t libfile_mime_Version; + Version_t libfile_type_Version; +// void setupLibFile(libfile_op*&, int argc, char*const argv[], void (*cb)(libfile_op*)); +// void setupLibFile(native_libfile_detection_bits b); + void ensureMimeAndFileTypeUpToDate(native_libfile_detection_bits b); + + public: + /************************************************************* + * Multiple mimetype engine support + *************************************************************/ + virtual std::string priv_getMimeType( bool fromContent = false ); + virtual std::string getFileType(); +#endif + +#ifdef HAVE_EFSD + public: + static GMainLoop* m_efsdGML; + static EfsdConnection* m_efsdConnection; + static GIOChannel* m_efsdChannel; + static bool m_waitingForMimetype; + static bool m_efsdTimedOut; + std::string Mimetype; + protected: + void openEFSDConnection(); + virtual std::string priv_getMimeType( bool fromContent = false ); +#endif +#ifdef HAVE_KDE3 + std::string Mimetype; + virtual std::string priv_getMimeType( bool fromContent = false ); +#endif + + protected: + + virtual ferris_ios::openmode getSupportedOpenModes(); + + + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual fh_iostream priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual fh_context SubCreate_file( fh_context c, fh_context md ); + +// friend fh_context SL_SubCreate_dir ( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_softlink( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_hardlink( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_fifo( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_special( fh_context c, fh_context md ); + friend fh_context SL_SubCreate_db4 ( fh_context c, fh_context md ); + + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + + + virtual void priv_read(); + + + virtual void priv_createAttributes(); + virtual void createStateLessAttributes( bool force = false ); + void adjustREAForAttributeIfPresent( std::string& rea, const std::string& s ); + virtual std::string priv_getRecommendedEA(); + virtual bool getHasSubContextsGuess(); + + virtual bool supportsReClaim(); + virtual bool supportsRename(); + virtual bool supportsMonitoring(); + virtual bool priv_supportsShortCutLoading() { return true; } + + + virtual fh_context priv_rename( const std::string& rdn, + const std::string& newPath, + bool TryToCopyOverFileSystems = true, + bool OverWriteDstIfExists = false ); + + virtual bool supportsRemove(); + virtual void priv_remove( fh_context c ); + + fh_context SubCreate_dir( fh_context c, fh_context md ); + fh_context SubCreate_softlink( fh_context c, fh_context md ); + fh_context SubCreate_hardlink( fh_context c, fh_context md ); + fh_context SubCreate_fifo( fh_context c, fh_context md ); + fh_context SubCreate_special( fh_context c, fh_context md ); + +// fh_istream getLinkTarget( Context*, const std::string&, EA_Atom* attr ); + fh_istream getLinkTargetRelative( Context*, const std::string&, EA_Atom* attr ); + + void ProcessAllFamppEvents(); + + virtual void tryToFindAttributeByOverMounting( const std::string& eaname = "" ); + + public: + + NativeContext(); + virtual ~NativeContext(); + + virtual bool isDir(); + virtual long priv_guessSize() throw(); + + static const std::string CreateObjectType_k; + static const std::string CreateObjectType_v_Dir; + static const std::string CreateObjectType_v_File; + + const struct stat& getStat_Follow(); + const struct stat& getStat_DontFollow(); + + void bumpVersion(); + + void public_updateMetaData() + { + updateMetaData(); + } + +// protected: + +// virtual void getTypeInfos( TypeInfos_t& l ) +// { +// l.push_back( typeid( _Self ) ); +// } + + + bool public_hasOverMounter() + { + return hasOverMounter(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +#ifdef HAVE_LIBRPM + + fh_rpmState get_rpm_header( rpmdb db ); + fh_rpmState get_rpmfi( rpmdb db ); + + static fh_stringstream SL_getRPMVerifyFlag( NativeContext*,int flag); + static fh_stringstream SL_getRPMVerifySize( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyMode( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyMD5( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyDevice( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyOwner( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyGroup( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVerifyMTime( NativeContext*,const std::string&,EA_Atom*); + + static fh_stringstream SL_getRPMFileFlag( NativeContext* c, rpmfileAttrs a ); + static fh_stringstream SL_getRPMIsConfig( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMIsDoc( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMIsGhost( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMIsLicense( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMIsPubkey( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMIsReadme( NativeContext*,const std::string&,EA_Atom*); + + static fh_stringstream SL_getRPMHeaderString( NativeContext*, int_32 ); + static fh_stringstream SL_getRPMPackage( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVersion( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMRelease( NativeContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMInfoURL( NativeContext*,const std::string&,EA_Atom*); + + static fh_stringstream SL_getRPMVendor( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMDistribution( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMLicense( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMPackager( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMGroup( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMBuildtime( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + static fh_stringstream SL_getRPMSummary( NativeContext* c, const std::string& rdn, EA_Atom* atom ); + + +#endif + + protected: + virtual void imageEAGenerator_priv_createAttributes(); + + void + SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + XSDBasic_t sct = XSD_UNKNOWN ) + { + getNativeStatelessEANames().insert( rdn ); + tryAddStateLessAttribute( rdn, fi, sct ); + } + void + SLEAPI( const std::string& rdn, + const StateLessIEA_PassedInStream_t& fi, + XSDBasic_t sct ) + { + getNativeStatelessEANames().insert( rdn ); + tryAddStateLessAttributePI( rdn, fi, sct ); + } + void + SLEA( const std::string& rdn, + const StateLessIEA_t& fi, + const StateLessIOEA_t& fio, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct = XSD_UNKNOWN ) + { + getNativeStatelessEANames().insert( rdn ); + tryAddStateLessAttribute( rdn, fi, fio, fioc, sct ); + } + void + SLEAPI( const std::string& rdn, + const StateLessIEA_PassedInStream_t& fi, + const StateLessIOClosedEA_t& fioc, + XSDBasic_t sct ) + { + getNativeStatelessEANames().insert( rdn ); + tryAddStateLessAttributePI( rdn, fi, fioc, sct ); + } + + public: + virtual void read( bool force = 0 ); + + virtual time_t getMTime(); + + }; + + + namespace System + { + FERRISEXP_DLLLOCAL bool gotRoot(); + }; + + + namespace Shell + { + FERRISEXP_DLLLOCAL bool canChangeFileToUser( uid_t u ); + FERRISEXP_DLLLOCAL bool canChangeFileToGroup( gid_t g ); + }; + +}; + +#endif diff --git a/Ferris/Numeric.hh b/Ferris/Numeric.hh new file mode 100644 index 0000000..ccf46f7 --- /dev/null +++ b/Ferris/Numeric.hh @@ -0,0 +1,54 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Numeric.hh,v 1.2 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_NUMERIC_H_ +#define _ALREADY_INCLUDED_FERRIS_NUMERIC_H_ + +namespace Ferris +{ + namespace Numeric + { + /** + * Make sure that mi <= v <= mx + */ + template < class ValueT, class MinT, class MaxT > + ValueT clamp( ValueT v, MinT mi, MaxT mx ) + { + if( v < mi ) + return mi; + if( v > mx ) + return mx; + return v; + } + + }; +}; +#endif + diff --git a/Ferris/Personalities.cpp b/Ferris/Personalities.cpp new file mode 100644 index 0000000..2705581 --- /dev/null +++ b/Ferris/Personalities.cpp @@ -0,0 +1,358 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Personalities.cpp,v 1.2 2010/09/24 21:30:55 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + const string EMBLEM_PERSONALITY_TREE_NAME = "personalities"; + const string EMBLEM_USER_PERSONALITY_NAME = "user"; + const string EMBLEM_GENERAL_AGENT_NAME = "generic-agent"; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + Personality::Personality( fh_etagere et, fh_emblem em ) + : + m_et( et ), + m_em( em ) + { + } + + Personality::~Personality() + { + } + + string + Personality::getName() + { + return m_em->getName(); + } + + emblemID_t + Personality::getID() + { + return m_em->getID(); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Nice little subclass that allows factory methods creation ability + */ + class FERRISEXP_DLLLOCAL PersonalityImpl + : + public Personality + { + public: + PersonalityImpl(fh_etagere et, fh_emblem em ) + : + Personality( et, em ) + {} + + virtual ~PersonalityImpl() + {} + + fh_emblem getEmblem() + { + return m_em; + } + }; + FERRIS_SMARTPTR( PersonalityImpl, fh_personalityImpl ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static fh_personalityImpl EmblemToPersonality( fh_emblem em, fh_etagere et = 0 ) + { + static map< fh_emblem, fh_personalityImpl > cache; + + map< fh_emblem, fh_personalityImpl >::iterator ci = cache.find( em ); + if( ci != cache.end() ) + { + return ci->second; + } + + fh_personalityImpl pi = new PersonalityImpl( et, em ); + cache[ em ] = pi; + return pi; + +// static Cache< fh_emblem, fh_personalityImpl > cache; + +// if( fh_personalityImpl pi = cache.get( em ) ) +// { +// return pi; +// } + +// fh_personalityImpl pi = new PersonalityImpl( et, em ); +// cache.put( em, pi ); +// return pi; + } + + static fh_personalityImpl getCurrentUserPersonalityImpl( fh_etagere et = 0 ) + { + if( !et ) + et = Factory::getEtagere(); + fh_emblem em = getFerrisSystemEmblem( et ); + + fh_emblem ptree = em->obtainChild( EMBLEM_PERSONALITY_TREE_NAME ); + fh_emblem user = ptree->obtainChild( EMBLEM_USER_PERSONALITY_NAME ); + et->sync(); + return EmblemToPersonality( user, et ); + } + + struct EmblemByNameWithParents + { + string name; + list parents; + + EmblemByNameWithParents( string n, + const std::list& p ) + : + name(n), + parents(p) + { + } + bool operator()( fh_emblem em ) + { + if( em->getName() == name ) + { +// return true; + + list< fh_emblem > wanted_pem; + for( list::iterator pi = parents.begin(); + pi!=parents.end(); ++pi ) + { + fh_personality tmp = *pi; + if( PersonalityImpl* pip = + dynamic_cast( GetImpl( tmp ))) + { + wanted_pem.push_back( pip->getEmblem() ); + } + } + emblems_t actual_pem = em->getParents(); + + wanted_pem.sort(); + actual_pem.sort(); + + list< fh_emblem > tmp; + set_difference( wanted_pem.begin(), wanted_pem.end(), + actual_pem.begin(), actual_pem.end(), + inserter( tmp, tmp.begin() )); + + return tmp.empty(); + } + return false; + } + }; + + namespace Factory + { + fh_personality getCurrentUserPersonality( fh_etagere et ) + { + return getCurrentUserPersonalityImpl( et ); + } + + fh_personality getGenericClassifierAgentPersonality( fh_etagere et ) + { + if( !et ) + et = Factory::getEtagere(); + + fh_personalityImpl p = getCurrentUserPersonalityImpl( et ); + fh_emblem em = p->getEmblem(); + fh_emblem generalagent = em->obtainChild( EMBLEM_GENERAL_AGENT_NAME ); + et->sync(); + return EmblemToPersonality( generalagent, et ); + + } + + + + fh_personality createPersonality( fh_etagere et, + const std::string& name, + const std::list& parents ) + { + fh_personalityImpl p = getCurrentUserPersonalityImpl(); + fh_emblem em = p->getEmblem(); + emblems_t ds = em->getDownset(); + + emblems_t::iterator ei = find_if( ds.begin(), ds.end(), + EmblemByNameWithParents( name, parents )); + if( ei != ds.end() ) + { + return EmblemToPersonality( em, et ); + } + + fh_stringstream ss; + ss << "No personaility with name:" << name << " found"; + Throw_NoSuchPersonalityException( tostr(ss), 0 ); + } + + fh_personality createPersonality( const std::string& name, + const std::list& parents ) + { + return createPersonality( Factory::getEtagere(), name, parents ); + } + + fh_personality createPersonality( const std::string& name ) + { + std::list parents; + return createPersonality( Factory::getEtagere(), name, parents ); + } + }; + + + fh_personality + obtainPersonality( fh_etagere et, + const std::string& name, + const std::list& parents ) + { + try + { + std::list< fh_personality > pl = findAllPersonalities( name, parents ); + if( !pl.empty() ) + return pl.front(); + } + catch( NoSuchPersonalityException& e ) + { + } + return Factory::createPersonality( et, name, parents ); + } + + fh_personality + obtainPersonality( const std::string& name ) + { + std::list parents; + return obtainPersonality( Factory::getEtagere(), name, parents ); + } + + fh_personality + obtainPersonality( emblemID_t id ) + { + fh_etagere et = Factory::getEtagere(); + fh_emblem em = et->getEmblemByID( id ); + return EmblemToPersonality( em, et ); + } + + fh_personality + findPersonality( const std::string& name, bool decend ) + { + fh_etagere et = Factory::getEtagere(); + std::list parents; + + if( decend ) + { + std::list< fh_personality > pl = findAllPersonalities( name, parents ); + if( pl.empty() ) + { + fh_stringstream ss; + ss << "No personaility with name:" << name << " found"; + Throw_NoSuchPersonalityException( tostr(ss), 0 ); + } + return pl.front(); + } + + try + { + fh_personalityImpl p = getCurrentUserPersonalityImpl( et ); + fh_emblem em = p->getEmblem(); + fh_emblem child = em->findChild( name ); + return EmblemToPersonality( child, et ); + } + catch( EmblemNotFoundException& e ) + { + fh_stringstream ss; + ss << "No personaility with name:" << name << " found"; + Throw_NoSuchPersonalityException( tostr(ss), 0 ); + } + fh_stringstream ss; + ss << "No personaility with name:" << name << " found"; + Throw_NoSuchPersonalityException( tostr(ss), 0 ); + } + + std::list< fh_personality > + findAllPersonalities( const std::string& name, + const std::list& parents ) + { + fh_etagere et = Factory::getEtagere(); + std::list< fh_personality > ret; + + fh_personalityImpl p = getCurrentUserPersonalityImpl( et ); + fh_emblem em = p->getEmblem(); + emblems_t ds = em->getDownset(); + + emblems_t::iterator begin = ds.begin(); + emblems_t::iterator end = ds.end(); + + while( begin != end ) + { + emblems_t::iterator ei = find_if( begin, end, + EmblemByNameWithParents( name, parents )); + if( ei == end ) + break; + + ret.push_back( EmblemToPersonality( *ei, et ) ); + begin = ei; + ++begin; + } + + return ret; + } + + std::list< fh_personality > + findAllPersonalities() + { + std::list< fh_personality > ret; + + fh_etagere et = Factory::getEtagere(); + fh_personalityImpl p = getCurrentUserPersonalityImpl( et ); + fh_emblem em = p->getEmblem(); + emblems_t ds = em->getDownset(); + emblems_t::iterator ei = ds.begin(); + emblems_t::iterator end = ds.end(); + for( ; ei != end; ++ei ) + { + ret.push_back( EmblemToPersonality( *ei, et ) ); + } + return ret; + } + + + +}; diff --git a/Ferris/Personalities.hh b/Ferris/Personalities.hh new file mode 100644 index 0000000..e35b3c7 --- /dev/null +++ b/Ferris/Personalities.hh @@ -0,0 +1,189 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Personalities.hh,v 1.2 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_PERSONALITIES_H_ +#define _ALREADY_INCLUDED_FERRIS_PERSONALITIES_H_ + +#include +#include +#include + +namespace Ferris +{ + /** + * Whenever a program or agent needs to identify itself to libferris + * it should obtain and use a 'personality'. This is split out of the + * Medallion.hh header because it is a reasonably generic thing that + * some program might wish to make assertions or perform actions + * and give some 'token' as to what program or group of programs it + * was acting as. + * + * This is somewhat different from the process group and username becase + * it is expected that a user will have many programs running and will + * wish to discern the actions of various single programs or groups. + * For example when one has many agents adding hints as to what emblems + * a file should have attached then you will want to be able to identify + * the different Machine Learning code that has made assertions because + * you can trust a given ML agent more or less than another one for a + * specific filetype or just in the general. + * + * To keep the code simple it is best to have unique names for all + * personailities in the system and not rely on the covering + * (ie. parent-child) relation to provide unique names. + */ + class FERRISEXP_API Personality + : + public CacheHandlable + { + NOT_COPYABLE( Personality ); + protected: + + fh_etagere m_et; + fh_emblem m_em; + + Personality( fh_etagere et, fh_emblem em ); + + public: + virtual ~Personality(); + + std::string getName(); + emblemID_t getID(); + }; + + namespace Factory + { + /** + * Get the personality of the current user. This should be used in + * direct HCI manipulation when the user is asserting or retracting + * facts. Agents should register and use a personaility of their + * own to discern agents from direct user beliefs. + */ + FERRISEXP_API fh_personality getCurrentUserPersonality( fh_etagere et = 0 ); + + /** + * Get the personality that agents that are classifying files + * should use. + */ + FERRISEXP_API fh_personality getGenericClassifierAgentPersonality( fh_etagere et = 0 ); + + + /** + * Note that there will be overloaded versions that take less params + * but the most specific is described in full detail. + * + * Create a new personality in the given etagere + * (usually done with the default Factory::getEtagere()) + * the new personality will have the given name for identification + * and will have the parent personalities given. Note that + * the belief system uses the ordering of personalities to + * resolve who to trust more. + * + * @param et The Etagere that we should save our data into. This + * is usually the default for the user Factory::getEtagere() + * @param name What the new personality should be called. Should be + * reasonably specific and not a reversed name. Reserved + * names are "user" and all caps names. + * @param parents if given and the collection is non-empty then this + * is a list of what parents the sought personality should + * have. + */ + FERRISEXP_API fh_personality createPersonality( fh_etagere et, + const std::string& name, + const std::list& parents ); + + + /** + * Note that there will be overloaded versions that take less params + * but the most specific is described in full detail. + * + */ + FERRISEXP_API fh_personality createPersonality( const std::string& name, + const std::list& parents ); + + /** + * See also the header comment for the most specific version of + * createPersonality(). + * + * This will create a personality that is only under the user personality. + * The new personality will share the second top trust level with all other + * personalities that are direct decendants of the user personaility. + */ + FERRISEXP_API fh_personality createPersonality( const std::string& name ); + }; + + /** + * If the given personality exists then this is like a call to + * findPersonality() + * + * If the given personality doesn't exist then it is loke a call to + * createPersonality() + */ + FERRISEXP_API fh_personality obtainPersonality( fh_etagere et, + const std::string& name, + const std::list& parents ); + + FERRISEXP_API fh_personality obtainPersonality( const std::string& name ); + FERRISEXP_API fh_personality obtainPersonality( emblemID_t id ); + + /** + * Try to find the personality looking at the top node (the user) and its + * children. optionally decend into all the children attempting to find all + * personalities with the given name. + * + * In the case where the user has two personailities with the same name the + * first one is returned. + * + * @param name Personality should have the given name + * @param decend Should all personailities be considered or just the user + * and his direct children. + */ + FERRISEXP_API fh_personality findPersonality( const std::string& name, bool decend = true); + + /** + * Find the personaility with the given name and who's parents have + * the names given. + * + * If there are no personalities that match the constraints given then + * no exception is thrown, the return value is just empty. + * + */ + FERRISEXP_API + std::list< fh_personality > + findAllPersonalities( const std::string& name, + const std::list& parents ); + + /** + * Get a list of all available personalities + */ + FERRISEXP_API + std::list< fh_personality > + findAllPersonalities(); + +}; +#endif diff --git a/Ferris/PluginOutOfProcNotificationEngine.cpp b/Ferris/PluginOutOfProcNotificationEngine.cpp new file mode 100644 index 0000000..9ee8e53 --- /dev/null +++ b/Ferris/PluginOutOfProcNotificationEngine.cpp @@ -0,0 +1,735 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: PluginOutOfProcNotificationEngine.cpp,v 1.12 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "PluginOutOfProcNotificationEngine.hh" +#include "common-ferris-out-of-proc-notification-deamon.hh" +#include "Runner.hh" +#include "FerrisDOM.hh" +#include "Medallion.hh" +#include "ValueRestorer.hh" + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris::OProcMessage; + +namespace Ferris +{ + static bool s_dontConnectWithFerrisOutOfProcDeamon = false; + + static bool dontConnectWithFerrisOutOfProcDeamon() + { + static bool readEnvVar = false; + if( !readEnvVar ) + { + readEnvVar = true; + if( !s_dontConnectWithFerrisOutOfProcDeamon ) + { + s_dontConnectWithFerrisOutOfProcDeamon = + (g_getenv ("LIBFERRIS_DONT_CONNECT_WITH_OUT_OF_PROC_DAEMON") != 0); + } + } + return s_dontConnectWithFerrisOutOfProcDeamon; + } + + + void + IHandleOutOfProcEANotification::OnOutOfProcEACreationNotification( const std::string& eaname, + bool isDataValid, + const std::string& data ) + { + } + + void + IHandleOutOfProcEANotification::OnOutOfProcEADeletionNotification( const std::string& eaname ) + { + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + OutOfProcNotificationEngine::OutOfProcNotificationEngine() + : + m_fromserv_aio( 0 ), + outgoingss( Factory::fcnull() ), + m_basedir( FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT ) + { + } + + OutOfProcNotificationEngine::~OutOfProcNotificationEngine() + { + string fromserv = appendFromServPrefix( m_basedir ) + tostr(getpid()); + ::unlink( fromserv.c_str() ); + } + + void + OutOfProcNotificationEngine::setBaseDir( const std::string& v ) + { + m_basedir = v; + } + + std::string + OutOfProcNotificationEngine::getBaseDir() + { + return m_basedir; + } + + + void + OutOfProcNotificationEngine::xml_msg_arrived( fh_xstreamcol h ) + { + stringmap_t& m = h->getStringMap(); +// cerr << "OutOfProcNotificationEngine::xml_msg_arrived()" << endl; + } + + OutOfProcNotificationEngine::clientID_t + OutOfProcNotificationEngine::getClientID() + { + return getpid(); + } + + pid_t + OutOfProcNotificationEngine::getServerPID() + { + fh_context c = Shell::acquireContext( m_basedir ); + fh_context s = Shell::acquireSubContext( c, "pid" ); + string pid = getStrAttr( s, "content", "0" ); + return toType( pid ); + } + + + void + OutOfProcNotificationEngine::ensureServerRunning() + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + + bool serverRunning = true; + static pid_t pid = 0; + + if( !pid ) + pid = getServerPID(); + + if( pid ) + { + if( kill( pid, SIGUSR2 ) ) + { + if( ESRCH == errno ) + { + pid = 0; + serverRunning = false; + LG_JOURNAL_D << "Server ping failed! starting server..." + << " it should have been at pid:" << pid << endl; + } + } + } + else + serverRunning = false; + + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning(neartop)" + << " pid:" << pid + << " client-pid:" << tostr(getpid()) + << " serverRunning:" << serverRunning + << " isBound(m_fromserv_aio):" << isBound(m_fromserv_aio) + << endl; + + bool needToSetupIO = false; + + if( !isBound(m_fromserv_aio) ) + { + needToSetupIO = true; + + Shell::acquireContext( appendStagePrefix( m_basedir ) ); + /* + * Create the fifo in the staging area, when we have it open we move it + * to the incoming dir so that the server can open its end and unlink it. + */ + string stagePath = appendStagePrefix( m_basedir ) + tostr(getpid()); + string inUsePath = appendFromServPrefix( m_basedir ) + tostr(getpid()); + int fd = Factory::MakeFIFO( stagePath ); + ::rename( stagePath.c_str(), inUsePath.c_str() ); + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " client-pid:" << tostr(getpid()) + << " serv->us fd:" << fd + << endl; + +// cerr << "PluginOutOfProcNotificationEngine::ensureServerRunning()" +// << " pid:" << tostr(getpid()) +// << " serv->us fd:" << fd +// << endl; + + m_fromserv_aio = new AsyncIOHandler( fd ); + m_fromserv_xs = Factory::MakeXMLStreamCol(); + m_fromserv_xs->attach( m_fromserv_aio ); + m_fromserv_xs->getMessageArrivedSig().connect( sigc::mem_fun( *this, &_Self::xml_msg_arrived ) ); + +// m_fromserv_aio->setFunctor( +// AsyncIOHandler::AsyncIOFunctor_t( +// this, &_Self::serv_aio_handler )); + } + + + + if( !serverRunning ) + { + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " starting server!" + << endl; + + Factory::MakeFIFO( appendToServPath( m_basedir ), false ); + + fh_runner r = new Runner(); + fh_stringstream cmdss; + cmdss << "ferris-out-of-proc-notification-deamon " + << " --dont-recreate-fifo " + << " --target-directory=" << m_basedir + << " "; + r->setCommandLine( tostr(cmdss) ); + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " cmd:" << tostr(cmdss) + << endl; + + r->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_STDOUT_TO_DEV_NULL | + 0 )); + r->Run(); + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " opening a write only fd to the server at:" + << appendToServPath( m_basedir ) << endl; + int fd = open( appendToServPath( m_basedir ).c_str(), O_WRONLY ); + close( fd ); + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " COMPLETED opening a write only fd to the server." << endl; + } + + if( needToSetupIO ) + { + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::ensureServerRunning()" + << " setting up to server iostream" + << " at:" << appendToServPath( m_basedir ) + << endl; + fh_ofstream fss( appendToServPath( m_basedir ) ); + outgoingss = fss; + + } + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + OutOfProcNotificationEngineDebug::OutOfProcNotificationEngineDebug() + : + m_messageLogStream( Factory::fcerr() ), + m_messageCount( 0 ) + { + } + + OutOfProcNotificationEngineDebug::~OutOfProcNotificationEngineDebug() + { + } + + void + OutOfProcNotificationEngineDebug::xml_msg_arrived( fh_xstreamcol h ) + { + stringmap_t& m = h->getStringMap(); + fh_stringstream ss; + + ss << "--- start of message:" << m_messageCount << endl; + for( stringmap_t::iterator mi = m.begin(); mi != m.end(); ++mi ) + { + ss << "key:" << mi->first << " value:" << mi->second << endl; + } + ss << "--- end of message:" << m_messageCount << " ---" << endl; + + m_messageLogStream << tostr(ss) << flush; + LG_JOURNAL_D << tostr(ss) << flush; + + ++m_messageCount; + } + + void + OutOfProcNotificationEngineDebug::connect() + { + ensureServerRunning(); + } + + + void + OutOfProcNotificationEngineDebug::setOutputStream( fh_ostream oss ) + { + m_messageLogStream = oss; + } + + void + OutOfProcNotificationEngineDebug::sendMessage( stringmap_t& m ) + { + XML::writeMessage( outgoingss, m ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + PluginOutOfProcNotificationEngine::PluginOutOfProcNotificationEngine() + : + m_ignoreCreatedSignals( false ), + m_ignoreDeletedSignals( false ) + { +// cerr << "PluginOutOfProcNotificationEngine(ctor)" << endl; + } + + PluginOutOfProcNotificationEngine::~PluginOutOfProcNotificationEngine() + { +// cerr << "~PluginOutOfProcNotificationEngine(~dtor)" << endl; + } + + void + PluginOutOfProcNotificationEngine::connectSignals( fh_context c ) + { + m_monitoredContexts_t::iterator mi = m_monitoredContexts.find( GetImpl(c) ); + if( mi == m_monitoredContexts.end() ) + { + m_monitoredContexts.insert( GetImpl(c) ); + + LG_JOURNAL_D << "connectSignals() c:" << toVoid(GetImpl(c)) << endl; + c->getNamingEvent_Created_Sig().connect( sigc::mem_fun( *this, &_Self::OnCreated )); + c->getNamingEvent_Exists_Sig() .connect( sigc::mem_fun( *this, &_Self::OnExists )); + c->getNamingEvent_Deleted_Sig().connect( sigc::mem_fun( *this, &_Self::OnDeleted )); + } + } + + void + PluginOutOfProcNotificationEngine::signalContextDeleted( fh_context p, const std::string& olddn ) + { + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_CTX_DELETED; + m[ KEY_URL ] = p->getURL(); + m[ KEY_NAME ] = olddn; + m[ KEY_OBAND_PID ] = tostr(getpid()); + XML::writeMessage( outgoingss, m ); + + m_monitoredContexts.erase( GetImpl(p) ); + } + + + void + PluginOutOfProcNotificationEngine::OnDeleted( NamingEvent_Deleted* ev, + std::string olddn, + std::string newdn ) + { + if( m_ignoreDeletedSignals ) + return; + + fh_context c = ev->getSource(); + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::OnDeleted() url:" << c->getURL() + << " olddn:" << olddn + << endl; + + signalContextDeleted( c, olddn ); + } + + void + PluginOutOfProcNotificationEngine::OnExists( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, + std::string newdn ) + { +// fh_context subc = ev->getSource()->getSubContext( olddn ); + connectSignals( subc ); + } + + void + PluginOutOfProcNotificationEngine::signalContextChanged( fh_context c, + const std::string& data, bool isDataValid ) + { + /* + * tell the server + */ + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_CTX_CHANGED; + m[ KEY_URL ] = c->getURL(); + m[ KEY_NAME ] = c->getDirName(); + m[ KEY_OBAND_PID ] = tostr(getpid()); + if( isDataValid ) + m[ KEY_DATA ] = data; + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalContextChanged()" + << " url:" << c->getURL() << endl; + XML::writeMessage( outgoingss, m ); + } + + void + PluginOutOfProcNotificationEngine::signalContextCreated( fh_context subc, + const std::string& data, + bool isDataValid ) + { + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalContextCreated()" + << " url:" << subc->getURL() + << " m_ignoreCreatedSignals:" << m_ignoreCreatedSignals + << endl; + + if( m_ignoreCreatedSignals ) + return; + + /* + * tell the server + */ + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_CTX_CREATED; + m[ KEY_URL ] = subc->getParent()->getURL(); + m[ KEY_NAME ] = subc->getDirName(); + m[ KEY_OBAND_PID ] = tostr(getpid()); + if( isDataValid ) + m[ KEY_DATA ] = data; + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalContextCreated()" + << " url:" << subc->getURL() << endl; + XML::writeMessage( outgoingss, m ); + } + void + PluginOutOfProcNotificationEngine::signalContextCreated( fh_context subc ) + { + signalContextCreated( subc, "", false ); + } + + + + void + PluginOutOfProcNotificationEngine::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, + std::string newdn ) + { + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::OnCreated() olddn:" << olddn << endl; + + if( m_ignoreCreatedSignals ) + return; + +// fh_context subc = ev->getSource()->getSubContext( olddn ); + connectSignals( subc ); + signalContextCreated( subc ); + } + + void + PluginOutOfProcNotificationEngine::xml_msg_arrived( fh_xstreamcol h ) + { + stringmap_t& m = h->getStringMap(); + +// cerr << "PluginOutOfProcNotificationEngine::xml_msg_arrived( top )" << endl; + + if( m[ KEY_COMMAND ] == COMMAND_CTX_CREATED ) + { + string url = m[ KEY_URL ]; + string name = m[ KEY_NAME ]; + + LG_JOURNAL_D << "Got notification of created context:" << url << " for:" << name << endl; + + fh_context c = Resolve( url ); + + if( IHandleOutOfProcContextCreationNotification* h = + dynamic_cast( c->getOverMountContext() ) ) + { + stringmap_t::const_iterator si = m.find( KEY_DATA ); + bool isDataValid = (si != m.end()); + Util::ValueRestorer r( m_ignoreCreatedSignals, true ); + h->OnOutOfProcContextCreationNotification( name, isDataValid, isDataValid ? si->second : "" ); + } + else + { + LG_JOURNAL_W << "CANT DOWNCAST url:" << c->getURL() + << " to IHandleOutOfProcContextCreationNotification interface!" + << endl; + } + } + if( m[ KEY_COMMAND ] == COMMAND_CTX_CHANGED ) + { + string url = m[ KEY_URL ]; + string name = m[ KEY_NAME ]; + LG_JOURNAL_D << "Got notification of changed context:" << url << " for:" << name << endl; + fh_context c = Resolve( url ); + + if( IHandleOutOfProcContextChangedNotification* h = + dynamic_cast( c->getOverMountContext() ) ) + { + Util::ValueRestorer r( m_ignoreCreatedSignals, true ); + h->OnOutOfProcContextChangedNotification( name, true, m[ KEY_DATA ] ); + } + else + { + LG_JOURNAL_W << "CANT DOWNCAST url:" << c->getURL() + << " to IHandleOutOfProcContextCreationNotification interface!" + << endl; + } + } + if( m[ KEY_COMMAND ] == COMMAND_CTX_DELETED ) + { + string url = m[ KEY_URL ]; + string name = m[ KEY_NAME ]; + + LG_JOURNAL_D << "notification of deleted context:" << url << " for:" << name << endl; + + fh_context c = Resolve( url ); + + if( IHandleOutOfProcContextDeletionNotification* h = + dynamic_cast( c->getOverMountContext() ) ) + { + Util::ValueRestorer r( m_ignoreDeletedSignals, true ); + h->OnOutOfProcContextDeletionNotification( name ); + } + else + { + LG_JOURNAL_W << "CANT DOWNCAST url:" << c->getURL() + << " to IHandleOutOfProcContextDeletionNotification interface!" + << endl; + } + } + else if( m[ KEY_COMMAND ] == COMMAND_EA_CREATED || m[ KEY_COMMAND ] == COMMAND_EA_DELETED ) + { + string url = m[ KEY_URL ]; + string name = m[ KEY_NAME ]; + fh_context c = Resolve( url ); + if( IHandleOutOfProcEANotification* h = + dynamic_cast( c->getOverMountContext() ) ) + { + stringmap_t::const_iterator si = m.find( KEY_DATA ); + bool isDataValid = (si != m.end()); + + Util::ValueRestorer r( m_ignoreEASignals, true ); + if( m[ KEY_COMMAND ] == COMMAND_EA_CREATED ) + h->OnOutOfProcEACreationNotification( name, isDataValid, isDataValid ? si->second : "" ); + else if( m[ KEY_COMMAND ] == COMMAND_EA_DELETED ) + h->OnOutOfProcEADeletionNotification( name ); + } + else + { + LG_JOURNAL_W << "CANT DOWNCAST url:" << c->getURL() + << " to IHandleOutOfProcEANotification interface!" + << endl; + } + } + else if( m[ KEY_COMMAND ] == COMMAND_MEDALLION_UPDATED ) + { + string url = m[ KEY_URL ]; +// cerr << "PluginOutOfProcNotificationEngine::xml_msg_arrived( medallion )" +// << " url:" << url << endl; + + getMedallionUpdated_Sig().emit( url ); + } + else if( m[ KEY_COMMAND ] == COMMAND_ETAGERE_NEW_EMBLEM ) + { + set< emblemID_t > eset; + Util::parseSeperatedList( m[KEY_ESET], + eset, inserter( eset, eset.end() ) ); + fh_etagere et = Factory::getEtagere(); + et->OnOutOfProcNewEmblemNotification( eset ); + } + } + + void + PluginOutOfProcNotificationEngine::forgetContext( Context* base ) + { + cerr << "PluginOutOfProcNotificationEngine::forgetContext() base:" << (void*)base << endl; + + m_monitoredContexts.erase( base ); + } + + void + PluginOutOfProcNotificationEngine::watchTree( fh_context base ) + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + LG_JOURNAL_D << "watchTree() Adding watch to base:" << base->getURL() << endl; + + /* + * We need to tell the server about this new base context and see if there + * is already someone monitoring it. + */ + ensureServerRunning(); + + LG_JOURNAL_D << "watchTree() Server is running base:" << base->getURL() << endl; + + connectSignals( base ); + } + + void + PluginOutOfProcNotificationEngine::ensureServerRunning() + { + _Base::ensureServerRunning(); + } + + + + void + PluginOutOfProcNotificationEngine::signalEACreated( fh_context c, const std::string& eaname, + const std::string& data, bool isDataValid ) + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_EA_CREATED; + m[ KEY_URL ] = c->getURL(); + m[ KEY_NAME ] = eaname; + m[ KEY_OBAND_PID ] = tostr(getpid()); + if( isDataValid ) + m[ KEY_DATA ] = data; + + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalEACreated url:" << c->getURL() + << " eaname:" << eaname + << endl; + XML::writeMessage( outgoingss, m ); + } + void + PluginOutOfProcNotificationEngine::signalEACreated( fh_context c, const std::string& eaname ) + { + signalEACreated( c, eaname, "", false ); + } + + void + PluginOutOfProcNotificationEngine::signalEADeleted( fh_context c, const std::string& eaname ) + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_EA_DELETED; + m[ KEY_URL ] = c->getURL(); + m[ KEY_NAME ] = eaname; + m[ KEY_OBAND_PID ] = tostr(getpid()); + LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalEADeleted url:" << c->getURL() + << " eaname:" << eaname + << endl; + XML::writeMessage( outgoingss, m ); + } + + void + PluginOutOfProcNotificationEngine::signalMedallionUpdated( fh_context c ) + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + ensureServerRunning(); + + stringmap_t m; + m[ KEY_COMMAND ] = COMMAND_MEDALLION_UPDATED; + m[ KEY_URL ] = c->getURL(); + m[ KEY_OBAND_PID ] = tostr(getpid()); + +// cerr << "PluginOutOfProcNotificationEngine::signalMedallionUpdated(1)" +// << " url:" << c->getURL() +// << endl; +// LG_JOURNAL_D << "PluginOutOfProcNotificationEngine::signalMedallionUpdated()" +// << " url:" << c->getURL() +// << endl; + + XML::writeMessage( outgoingss, m ); + +// cerr << "PluginOutOfProcNotificationEngine::signalMedallionUpdated(2)" +// << " url:" << c->getURL() +// << endl; + } + + void + PluginOutOfProcNotificationEngine::signalEtagereNewEmblems( fh_etagere et, + std::set< emblemID_t >& eset ) + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return; + + ensureServerRunning(); + + if( et == Factory::getEtagere() ) + { + stringmap_t m; +// cerr << "signalEtagereNewEmblems eset.sz:" << eset.size() << endl; + string esetstr = Util::createSeperatedList( eset.begin(), eset.end() ); +// cerr << "signalEtagereNewEmblems eset.str:" << esetstr << endl; + m[ KEY_COMMAND ] = COMMAND_ETAGERE_NEW_EMBLEM; + m[ KEY_ESET ] = esetstr; + m[ KEY_OBAND_PID ] = tostr(getpid()); + + XML::writeMessage( outgoingss, m ); + } + } + + + + PluginOutOfProcNotificationEngine::MedallionUpdated_Sig_t& + PluginOutOfProcNotificationEngine::getMedallionUpdated_Sig() + { + if( dontConnectWithFerrisOutOfProcDeamon() ) + return MedallionUpdated_Sig; + + ensureServerRunning(); + return MedallionUpdated_Sig; + } + + + + namespace Factory + { + PluginOutOfProcNotificationEngine& getPluginOutOfProcNotificationEngine() + { + typedef Loki::SingletonHolder< + PluginOutOfProcNotificationEngine, + Loki::CreateUsingNew, + Loki::PhoenixSingleton > S; + return S::Instance(); + } + + void + setDontConnectWithFerrisOutOfProcDeamon( bool v ) + { + s_dontConnectWithFerrisOutOfProcDeamon = v; + } + + + } + + +}; diff --git a/Ferris/PluginOutOfProcNotificationEngine.hh b/Ferris/PluginOutOfProcNotificationEngine.hh new file mode 100644 index 0000000..3562eaa --- /dev/null +++ b/Ferris/PluginOutOfProcNotificationEngine.hh @@ -0,0 +1,366 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: PluginOutOfProcNotificationEngine.hh,v 1.6 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#ifndef _ALREADY_INCLUDED_FERRIS_PLUGIN_OUTOFPROC_NE_H_ +#define _ALREADY_INCLUDED_FERRIS_PLUGIN_OUTOFPROC_NE_H_ + +#include +#include +#include +#include + +namespace Ferris +{ + class PluginOutOfProcNotificationEngine; + + /** + * If a plugin handles notification of contexts created by other processes + * using the same plugin it should implement this interface. + * + * @see IHandleOutOfProcEACreationNotification + * @see PluginOutOfProcNotificationEngine + */ + class FERRISEXP_API IHandleOutOfProcContextCreationNotification + { + public: + virtual void OnOutOfProcContextCreationNotification( + const std::string& rdn, + bool isDataValid, + const std::string& data ) = 0; + }; + + /** + * If a plugin handles notification of contexts being changed (their contents written too) + * by other processes using the same plugin it should implement this interface. + * + * @see IHandleOutOfProcContextCreationNotification + * @see PluginOutOfProcNotificationEngine + */ + class FERRISEXP_API IHandleOutOfProcContextChangedNotification + { + public: + virtual void OnOutOfProcContextChangedNotification( + const std::string& rdn, + bool isDataValid, + const std::string& data ) = 0; + }; + + /** + * If a plugin handles notification of contexts created by other processes + * using the same plugin it should implement this interface. + * + * @see IHandleOutOfProcContextCreationNotification + * @see IHandleOutOfProcEACreationNotification + * @see PluginOutOfProcNotificationEngine + */ + class FERRISEXP_API IHandleOutOfProcContextDeletionNotification + { + public: + virtual void OnOutOfProcContextDeletionNotification( const std::string& rdn ) = 0; + }; + + /** + * If a plugin handles notification of new EA created on a context + * by other processes using the same plugin it should implement this interface. + * + * @see IHandleOutOfProcContextCreationNotification + * @see PluginOutOfProcNotificationEngine + */ + class FERRISEXP_API IHandleOutOfProcEANotification + { + public: + virtual void OnOutOfProcEACreationNotification( const std::string& eaname, + bool isDataValid, + const std::string& data ); + virtual void OnOutOfProcEADeletionNotification( const std::string& eaname ); + }; + + namespace Factory + { + /** + * Used by context plugins which implement + * IHandleOutOfProcContextCreationNotification + * to start monitoring a local tree of contexts + * + * Usually called on the root of an overmount. + **/ + FERRISEXP_API PluginOutOfProcNotificationEngine& getPluginOutOfProcNotificationEngine(); + + /** + * Mainly only useful for ferris-out-of-proc-notification-deamon + * so that it doesn't try to make connections with itself. + * + * Can be used by other apps if they want to ignore out-of-proc + * update notifications. Must be called before any contexts are + * created. + */ + FERRISEXP_API void setDontConnectWithFerrisOutOfProcDeamon( bool v ); + }; + + + /** + * Allow sending of any XML messages to many processes in a monitoring + * group. Subclasses handle explicit cases such as notification of + * changes in Context trees using PluginOutOfProcNotificationEngine + * + * Note that there can be many objects of type OutOfProcNotificationEngine + * aslong as the deamon that replicates the message is monitoring a different + * path. + */ + class FERRISEXP_API OutOfProcNotificationEngine + : + public sigc::trackable + { + typedef OutOfProcNotificationEngine _Self; + + protected: + + /** + * fifo to send data to the multicast server ferris-out-of-proc-notification-deamon + */ + fh_ostream outgoingss; + + /** + * handle async io from server (notifications from other processes) + */ + fh_aiohandler m_fromserv_aio; + + /** + * XML stream collector for reading msgs from the server + */ + fh_xstreamcol m_fromserv_xs; + + /** + * Where to connect the deamon for this notification object. + */ + std::string m_basedir; + + /** + * handle async io from server (notifications from other processes) + * callback for when data is received from server + */ + virtual void xml_msg_arrived( fh_xstreamcol h ); + + + /** + * get the proccess ID of the multicast server + */ + pid_t getServerPID(); + + /** + * Make sure the server (ferris-out-of-proc-notification-deamon) + * is running and attached to its end of the fifo + */ + void ensureServerRunning(); + + + typedef pid_t clientID_t; + + /** + * Get the unique ID that identifies this client to the server + */ + clientID_t getClientID(); + + public: + + OutOfProcNotificationEngine(); + virtual ~OutOfProcNotificationEngine(); + + /** + * Where to connect the deamon for this notification object. + */ + void setBaseDir( const std::string& v ); + std::string getBaseDir(); + }; + + /** + * Used to debug the notification engine. Allows one to save incomming + * data to a stream and send messages + */ + class FERRISEXP_API OutOfProcNotificationEngineDebug + : + public OutOfProcNotificationEngine + { + fh_ostream m_messageLogStream; + int m_messageCount; + + protected: + + virtual void xml_msg_arrived( fh_xstreamcol h ); + + public: + + OutOfProcNotificationEngineDebug(); + virtual ~OutOfProcNotificationEngineDebug(); + + void connect(); + void setOutputStream( fh_ostream oss ); + void sendMessage( stringmap_t& m ); + }; + + + + /** + * Monitor the watching server for changes and tell each plugin module + * about the changes that other procs have made to the underlying data. + * + * eg. When another app creates a new context in a db4 file we are notified + * and should tell any db4 overmounts in this proc to update their state to + * reflect the new context that the other proc has made. + */ + class FERRISEXP_API PluginOutOfProcNotificationEngine + : + public OutOfProcNotificationEngine + { + typedef OutOfProcNotificationEngine _Base; + typedef PluginOutOfProcNotificationEngine _Self; + + /** + * Avoid the senario: + * ProcA creates + * ProcA notifies daemon which notifies ProcB + * ProcB creates + * ProcB notifies daemon + * by setting m_ignoreCreatedSignals temporarily when calling + * OnOutOfProcContextCreationNotification() + */ + bool m_ignoreCreatedSignals; + bool m_ignoreDeletedSignals; + bool m_ignoreEASignals; + + /** + * Monitor each new context for exists/created signals too + */ + void OnExists( NamingEvent_Exists* ev, + const fh_context& newc, + std::string olddn, std::string newdn ); + + /** + * When an object is created we monitor it too and tell the server that + * there is a new context that all interested procs should know about + */ + void OnCreated( NamingEvent_Created*, + const fh_context& newc, + std::string, std::string ); + + /** + * Notify when contexts are deleted + */ + void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + + + /** + * We keep a collection of which contexts we are monitoring so that we + * dont monitor something twice. + */ + typedef FERRIS_STD_HASH_SET< Context*, + f_hash, + f_equal_to > m_monitoredContexts_t; + m_monitoredContexts_t m_monitoredContexts; + + /** + * Connect to exists and created signals for context + */ + void connectSignals( fh_context c ); + + + virtual void xml_msg_arrived( fh_xstreamcol h ); + + public: + + /** + * Use getPluginOutOfProcNotificationEngine() instead of creating one! + */ + PluginOutOfProcNotificationEngine(); + + virtual ~PluginOutOfProcNotificationEngine(); + + + /** + * Start monitoring create events on base and all its children + * and reporting that data to the watcher server + */ + virtual void watchTree( fh_context base ); + + /** + * Undo anything that was done during watchTree() + */ + virtual void forgetContext( Context* base ); + + void ensureServerRunning(); + + /** + * Send notifications to other processes that a new EA now exists + */ + void signalEACreated( fh_context c, const std::string& eaname ); + void signalEACreated( fh_context c, const std::string& eaname, + const std::string& data, bool isDataValid = true ); + + /** + * Send notifications to other processes that an EA has been deleted + */ + void signalEADeleted( fh_context c, const std::string& eaname ); + + /** + * Send notifications that a single context was created. Do not use + * this method if you have called watchTree(). + */ + void signalContextCreated( fh_context subc ); + void signalContextDeleted( fh_context p, const std::string& olddn ); + + void signalContextCreated( fh_context subc, + const std::string& data, bool isDataValid = true ); + + void signalContextChanged( fh_context c, const std::string& data, bool isDataValid = true ); + + /** + * Tell other processes that a medallion has been updated. + */ + void signalMedallionUpdated( fh_context c ); + + /** + * Tell other processes that a new item was created in the etagere + */ + void signalEtagereNewEmblems( fh_etagere et, std::set< emblemID_t >& eset ); + + /***************************/ + /*** singals ***************/ + /***************************/ + + typedef sigc::signal1< void, std::string > MedallionUpdated_Sig_t; + MedallionUpdated_Sig_t& getMedallionUpdated_Sig(); + + + private: + MedallionUpdated_Sig_t MedallionUpdated_Sig; + }; +}; +#endif diff --git a/Ferris/RPM.cpp b/Ferris/RPM.cpp new file mode 100644 index 0000000..bf7d2fa --- /dev/null +++ b/Ferris/RPM.cpp @@ -0,0 +1,92 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RPM.cpp,v 1.2 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#ifdef HAVE_LIBRPM + +#include +using namespace std; + +namespace Ferris +{ + static long rpmdb_ref_count = 0; + static rpmdb rpmdb_db = NULL; + static guint rpmdb_timer = 0; + const int rpmdb_timer_interval = 5000; + + static gint + rpmdb_closedb(gpointer data) + { + rpmdbClose( rpmdb_db ); + rpmdb_db = 0; + } + + rpmdb get_rpmdb() + { + if( !rpmdb_db ) + { + rpmReadConfigFiles(NULL, NULL); + if (rpmdbOpen(NULL, &rpmdb_db, O_RDONLY, 0644)) + { + cerr << "could not open RPM database\n" << endl; + return 0; + } + } + + if( rpmdb_timer ) + { + g_source_remove( rpmdb_timer ); + rpmdb_timer = 0; + } + ++rpmdb_ref_count; + return rpmdb_db; + } + + void release_rpmdb( rpmdb d ) + { + if( d ) + { + --rpmdb_ref_count; + if( !rpmdb_ref_count ) + { + if( !rpmdb_timer ) + rpmdb_timer = g_timeout_add( rpmdb_timer_interval, + GSourceFunc(rpmdb_closedb), 0 ); + } + } + } + + +}; +#endif diff --git a/Ferris/RPMContext.cpp b/Ferris/RPMContext.cpp new file mode 100644 index 0000000..783bf47 --- /dev/null +++ b/Ferris/RPMContext.cpp @@ -0,0 +1,568 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RPMContext.cpp,v 1.5 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + extern std::string adjustRecommendedEAForDotFiles( Context* c, const std::string& s ); + + void + RPMRootContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + std::string + RPMRootContext::getGroupName() + { + string p = getDirPath(); + + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + p = trimmer( p ); + + PostfixTrimmer ptrimmer; + ptrimmer.push_back( "/" ); + p = ptrimmer( p ); + + return p; + } + +// static void showTree( fh_context c ) +// { +// try +// { c->read(); } +// catch(...) +// {} + +// if( c->begin() == c->end() ) +// return; + +// cerr << "--- enter c:" << c->getURL() << " --- " << endl; +// for( Context::iterator ci = c->begin(); ci != c->end(); ++ci ) +// { +// cerr << " child:" << (*ci)->getURL() +// << " nameEA:" << getStrAttr( *ci,"name","<>" ) << endl; +// } +// for( Context::iterator ci = c->begin(); ci != c->end(); ++ci ) +// { +// showTree( *ci ); +// } +// cerr << "--- exit c:" << c->getURL() << " --- " << endl; +// } + + void + RPMRootContext::priv_read() + { + static bool addingAlready = false; + if( addingAlready ) + { + emitExistsEventForEachItemRAII _raii1( this ); + return; + } + Util::ValueRestorer< bool > _obj( addingAlready, true ); + EnsureStartStopReadingIsFiredRAII _raii1( this ); + AlreadyEmittedCacheRAII _raiiec( this ); + + { + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + + if( this == getBaseContext() && SubContextCount() == 0 ) + { + // create a tree for the sorted unique group names + fh_context child = 0; + + stringlist_t grlist; + + rpmdbMatchIterator mi = rpmdbInitIterator(db, (rpmTag)RPMDBI_PACKAGES, 0, 0 ); + for( Header header; header = rpmdbNextIterator(mi); ) + { + char *group; + rpmHeaderGetEntry(header, RPMTAG_GROUP, NULL, (void **)&group, NULL); + string sg = group; + PostfixTrimmer trimmer; + trimmer.push_back( "\n" ); + sg = trimmer( sg ); + + grlist.push_back( sg ); + } + rpmdbFreeIterator( mi ); + + grlist.sort(); + grlist.erase( unique( grlist.begin(), grlist.end() ), grlist.end() ); + + for( stringlist_t::iterator si = grlist.begin(); si != grlist.end(); ++si ) + { + string xdn = *si; + ensureContextCreated( xdn ); + } + } + if( this != getBaseContext() && SubContextCount() == 0 ) + { + rpmts ts = NULL; + rpmdbMatchIterator mi = rpmdbInitIterator(db, RPMTAG_GROUP, getGroupName().c_str(), 0); + + for( Header header; header = rpmdbNextIterator(mi); ) + { + const char *name, *version, *release; + rpmHeaderGetEntry(header, RPMTAG_NAME, NULL, (void **)&name, NULL); + rpmHeaderGetEntry(header, RPMTAG_VERSION,NULL, (void **)&version,NULL); + rpmHeaderGetEntry(header, RPMTAG_RELEASE,NULL, (void **)&release,NULL); + LG_CTX_D << " name:" << name << " version:" << version + << " release:" << release << endl; + + fh_stringstream rdnss; + rdnss << name << "-" << version << "-" << release; + string rdn = tostr(rdnss); + + fh_context child = new RPMPackageContext( this, rdn ); + Insert( GetImpl(child), false, false ); + + LG_CTX_D << "added pkg:" << child->getURL() << endl; + } + rpmdbFreeIterator( mi ); + } + } + } + + + + + RPMRootContext::RPMRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + RPMRootContext::~RPMRootContext() + { + } + + fh_context + RPMRootContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "rpm:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + + void + RPMRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + class FERRISEXP_DLLLOCAL RPMRootContext_RootContextDropper + : + public RootContextDropper + { + public: + RPMRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("rpm"); + RootContextFactory::Register( "rpm", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new RPMRootContext(); + } + return c; + } + }; + static RPMRootContext_RootContextDropper ___RPMRootContext_static_init; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + RPMPackageContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + string + RPMPackageContext::getPackageName() + { + string s = getDirName(); + return s.substr( 0, s.find("-")); + } + + void + RPMPackageContext::read( bool force ) + { + if( m_readingDir ) + return; + + Util::ValueRestorer< bool > dummy_x1( m_readingDir, true ); + priv_read(); + } + + void + RPMPackageContext::priv_read() + { + if( !empty() ) + { + emitExistsEventForEachItemRAII _raii1( this ); + return; + } + + LG_CTX_D << "priv_read() url:" << getURL() << endl; +// BackTrace(); + + typedef Loki::SmartPtr< RootContextFactory, + Loki::RefLinked, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > fh_rcf; + fh_rcf rfac = new RootContextFactory(); + rfac->setContextClass( "rpm" ); + rfac->AddInfo( RootContextFactory::ROOT, "/" ); + + rpmts ts = NULL; + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + rpmdbMatchIterator mi = rpmdbInitIterator(db, RPMTAG_NAME, getPackageName().c_str(), 0); + + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + + for( Header header; header = rpmdbNextIterator(mi); ) + { + const char *name, *version, *release; + rpmHeaderGetEntry(header, RPMTAG_NAME, NULL, (void **)&name, NULL); + rpmHeaderGetEntry(header, RPMTAG_VERSION,NULL, (void **)&version,NULL); + rpmHeaderGetEntry(header, RPMTAG_RELEASE,NULL, (void **)&release,NULL); + LG_CTX_D << " name:" << name << " version:" << version + << " release:" << release << endl; + + rpmfi fi = rpmfiNew( ts, header, RPMTAG_BASENAMES, 1 ); + LG_CTX_D << "fi.count:" << rpmfiFC( fi ) << endl; + for( rpmfiInit( fi, 0 ); rpmfiNext(fi) >= 0; ) + { + try + { + string path = rpmfiFN(fi); + LG_CTX_D << "RPMPATH:" << path << endl; + fh_context delegate = Resolve( path ); + + // + // Make sure that the child directory entries exist and + // place the delegate wrapping rpmContext at the right + // place in the tree. + // + typedef std::list< fh_context > clist_t; + clist_t cl; + if( delegate->isParentBound() ) + { + for( fh_context p = delegate->getParent(); p; p = p->getParent() ) + { + LG_CTX_D << "parent:" << p->getDirPath() + << " name:" << p->getDirName() + << endl; + if( p->getDirPath() != "/" ) + cl.push_front( p ); + if( !p->isParentBound() ) + break; + } + } + + // + // make parent directories + // we cache the parent for the new context in 'p' because + // we are walking from least to most specific directory, + // ie, the root outwards + // + fh_context p = this; + for( clist_t::iterator ci = cl.begin(); ci != cl.end(); ++ci ) + { + LG_CTX_D << "making parent context:" << (*ci)->getURL() << endl; + + try + { + string path = (*ci)->getDirPath(); + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + path = trimmer( path ); + path = "./" + path; + fh_context rc = getRelativeContext( path, rfac ); + LG_CTX_D << "getRelativeContext(1) path:" << path + << " rc:" << rc->getURL() + << " rc.path:" << rc->getDirPath() + << " this:" << getURL() + << endl; + + p = rc; + } + catch( exception& e ) + { + LG_CTX_D << "making parent context:" << (*ci)->getURL() + << " name:" << (*ci)->getDirName() + << " p:" << p->getURL() + << " p.path:" << p->getDirPath() + << " e:" << e.what() + << endl; + fh_context child = new RPMContext( p, *ci ); + + p->Insert( GetImpl(child), false, false ); + p = child; + LG_CTX_D << "MADE parent context:" << (*ci)->getURL() + << " name:" << (*ci)->getDirName() + << " p:" << p->getURL() + << " p.path:" << p->getDirPath() + << endl; + } + } + + // make the RPMContext itself and insert it at the correct + // place in the tree + { + string path = cl.back()->getDirPath(); + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + path = trimmer( path ); + + p = getRelativeContext( path, rfac ); + LG_CTX_D << "making delegate context:" << delegate->getURL() + << " p:" << p->getURL() + << " path:" << path + << " is-bound:" << p->isSubContextBound( delegate->getDirName() ) + << endl; + + fh_context child = new RPMContext( p, delegate ); + p->Insert( GetImpl(child), false, false ); + } + + } + catch( exception& e ) + { + cerr << " ...e:" << e.what() << endl; + } + +// static int xxcount = 0; +// if( xxcount >= 10 ) +// break; +// ++xxcount; + + } + rpmfiFree( fi ); + } + rpmdbFreeIterator( mi ); + } + + + fh_stringstream + RPMPackageContext::SL_getRPMHeaderString( RPMPackageContext* c, int_32 tag ) + { + rpmdb db = get_rpmdb(); + rpmdb_releaser dum1( db ); + + fh_stringstream ss; + const char *cstr; + + rpmTag match_type = RPMTAG_BASENAMES; + rpmdbMatchIterator mi = rpmdbInitIterator(db, RPMTAG_NAME, + c->getPackageName().c_str(), 0); + if( mi ) + { + Header rh = rpmdbNextIterator(mi); + if( rh ) + { + rpmHeaderGetEntry( rh, tag, NULL, (void **)&cstr, NULL); + if( cstr ) + ss << cstr; + } + } + return ss; + } + + fh_stringstream + RPMPackageContext::SL_getRPMPackage( RPMPackageContext* c,const std::string&,EA_Atom*) + { + return SL_getRPMHeaderString( c, RPMTAG_NAME ); + } + + fh_stringstream + RPMPackageContext::SL_getRPMVersion( RPMPackageContext* c,const std::string&,EA_Atom*) + { + return SL_getRPMHeaderString( c, RPMTAG_VERSION ); + } + + fh_stringstream + RPMPackageContext::SL_getRPMRelease( RPMPackageContext* c,const std::string&,EA_Atom*) + { + return SL_getRPMHeaderString( c, RPMTAG_RELEASE ); + } + + fh_stringstream + RPMPackageContext::SL_getRPMInfoURL( RPMPackageContext* c,const std::string&,EA_Atom*) + { + return SL_getRPMHeaderString( c, RPMTAG_URL ); + } + + + RPMPackageContext::RPMPackageContext( const fh_context& parent, + const std::string& rdn ) + : + _Base( GetImpl( parent ), rdn ), + m_readingDir( false ) + { + if( isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( "rpm-package", &_Self::SL_getRPMPackage, XSD_BASIC_STRING ); + SLEA( "rpm-version", &_Self::SL_getRPMVersion, XSD_BASIC_STRING ); + SLEA( "rpm-release", &_Self::SL_getRPMRelease, XSD_BASIC_STRING ); + SLEA( "rpm-info-url", &_Self::SL_getRPMInfoURL, FXD_URL_IMPLICIT_RESOLVE ); +#undef SLEA + + createStateLessAttributes( true ); + } + } + + RPMPackageContext::~RPMPackageContext() + { + } + + fh_context + RPMPackageContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "rpm:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + void + RPMPackageContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + RPMPackageContext* + RPMPackageContext::priv_CreateContext( Context* parent, std::string rdn ) + { + return 0; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + void + RPMContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + void + RPMContext::read( bool ) + { + NumberOfSubContexts=getItems().size(); + HaveReadDir=1; + + emitExistsEventForEachItemRAII _raii1( this ); + } + + RPMContext::RPMContext( const fh_context& parent, const fh_context& delegate ) + : + _Base( parent, delegate, false ) + { + createStateLessAttributes(); + LG_CTX_D << "RPMContext::RPMContext() url:" << getURL() << endl; + + } + + RPMContext::~RPMContext() + { + } + + fh_context + RPMContext::createSubContext( const std::string& rdn, fh_context md ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "rpm:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + void + RPMContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + std::string + RPMContext::getDirPath() throw (FerrisParentNotSetError) + { + if( !isParentBound() ) + return _Base::getDirPath(); + + return getParent()->getDirPath() + "/" + getDirName(); + } + + std::string + RPMContext::getURL() + { + return "rpm://" + getDirPath(); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; diff --git a/Ferris/RPMContext_private.hh b/Ferris/RPMContext_private.hh new file mode 100644 index 0000000..dda6b48 --- /dev/null +++ b/Ferris/RPMContext_private.hh @@ -0,0 +1,170 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RPMContext_private.hh,v 1.3 2010/09/24 21:30:56 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_RPM_CONTEXT_H_ +#define _ALREADY_INCLUDED_FERRIS_RPM_CONTEXT_H_ + +#include +#include +#include +#include + +namespace Ferris +{ + + /** + * root context for rpm:// + */ + class FERRISEXP_DLLLOCAL RPMRootContext + : + public Statefull_Recommending_ParentPointingTree_Context< RPMRootContext > + { + typedef RPMRootContext _Self; + typedef Statefull_Recommending_ParentPointingTree_Context< RPMRootContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + virtual void priv_read(); + std::string getGroupName(); + virtual std::string priv_getMimeType( bool fromContent = false ) + { return MIMETYPE_DIRECTORY; } + + public: + + RPMRootContext(); + virtual ~RPMRootContext(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Context for showing the base dir for an installed rpm package. + */ + class FERRISEXP_DLLLOCAL RPMPackageContext + : + public StateLessEAHolder< RPMPackageContext, FakeInternalContext > + { + typedef RPMPackageContext _Self; + typedef StateLessEAHolder< RPMPackageContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + bool m_readingDir; + + protected: + + virtual void priv_read(); + virtual std::string priv_getMimeType( bool fromContent = false ) + { return MIMETYPE_DIRECTORY; } + + public: + + RPMPackageContext( const fh_context& parent, const std::string& rdn ); + virtual ~RPMPackageContext(); + + std::string getPackageName(); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + + + static fh_stringstream SL_getRPMHeaderString( RPMPackageContext*, int_32 ); + static fh_stringstream SL_getRPMPackage( RPMPackageContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMVersion( RPMPackageContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMRelease( RPMPackageContext*,const std::string&,EA_Atom*); + static fh_stringstream SL_getRPMInfoURL( RPMPackageContext*,const std::string&,EA_Atom*); + + _Self* priv_CreateContext( Context* parent, std::string rdn ); + virtual void read( bool force = 0 ); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Context for showing dirs/rpm packages. + * + * We have to overload the getURL()/getDirPath() methods to ensure + * that the rpm groups are shown as the parent of the context instead + * of the filesystem parents. ie. instead of /usr/local/doc/ferris-5/README + * we need to give the path including the rpm group inforation in the 'parent' + * context; + * rpm://Development/C++/Ferris-5/usr/local/doc/ferris-5/README + */ + class FERRISEXP_DLLLOCAL RPMContext + : + public ChainedViewContext + { + typedef RPMContext _Self; + typedef ChainedViewContext _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + + protected: + + public: + + RPMContext( const fh_context& parent, const fh_context& delegate ); + virtual ~RPMContext(); + + virtual void read( bool force = 0 ); + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ); + + void createStateLessAttributes( bool force = false ); + + virtual std::string getDirPath() throw (FerrisParentNotSetError); + virtual std::string getURL(); + + + + _Self* + priv_CreateContext( Context* parent, std::string rdn ) + { + return 0; + } + }; + +}; +#endif diff --git a/Ferris/RPM_private.hh b/Ferris/RPM_private.hh new file mode 100644 index 0000000..28a2df6 --- /dev/null +++ b/Ferris/RPM_private.hh @@ -0,0 +1,76 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RPM_private.hh,v 1.2 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_RPM_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_RPM_PRIVATE_H_ + +#include +#include + +#ifdef HAVE_LIBRPM +#include +#include +#include +#include + +namespace Ferris +{ + /** + * get an open reference to the rpm database. calls to get_rpmdb() + * are counted internally and must be matched with calls to release_rpmdb(); + * For easy use one should create a rpmdb_releaser object on the stack which + * will take care of releasing the reference for you. + */ + FERRISEXP_API rpmdb get_rpmdb(); + + /** + * release a reference to an open rpmdb obtained via get_rpmdb(); + * Please use a rpmdb_releaser object on the stack instead of explicit call to + * this function. + */ + FERRISEXP_API void release_rpmdb( rpmdb ); + + /** + * used to release a rpmdb by assignment is initialization + */ + struct FERRISEXP_API rpmdb_releaser + { + rpmdb d; + rpmdb_releaser( rpmdb d ) : d(d) + {} + ~rpmdb_releaser() + { + release_rpmdb( d ); + } + }; + +}; +#endif +#endif diff --git a/Ferris/Regex.cpp b/Ferris/Regex.cpp new file mode 100644 index 0000000..04ed4a6 --- /dev/null +++ b/Ferris/Regex.cpp @@ -0,0 +1,171 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Regex.cpp,v 1.5 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ +// static char *get_regerror (int errcode, const regex_t *compiled) +// { +// size_t length = regerror (errcode, compiled, NULL, 0); +// char *buffer = (char*)malloc (length); +// (void) regerror (errcode, compiled, buffer, length); +// return buffer; +// } + +// string +// getErrorString( int e, const Regex& r) +// { +// char* estr = get_regerror( e, &r.RE ); +// string ErrorString = estr; +// free(estr); +// return ErrorString; +// } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void Regex::setup() + { + if( REstr.empty() ) + m_regex = 0; + else + m_regex = toregexh( REstr, m_rflags ); + +// memset( &RE, 0, sizeof(regex_t) ); +// if( m_cflags == -1 ) +// { +// m_cflags = REG_EXTENDED | REG_NOSUB;// | REG_NEWLINE; +// } + +// switch( int rc = regcomp( &RE, REstr.c_str(), m_cflags) ) +// { +// case 0: // success +// break; + +// default: +// // cerr << "Regex.cpp: Invalid regex given:" << re << endl; +// Throw_FerrisRegExCompileError( getErrorString( rc, *this ) ); +// } + } + +// Regex::Regex( const string& re, int cflags) +// : +// REstr(re), +// m_cflags( cflags ) +// { +// // cerr << "Regex::Regex() re:" << re << endl; +// setup(); +// } + + + Regex::Regex( const std::string& re, boost::regex::flag_type rflags ) + : + REstr(re), + m_cflags( -1 ), + m_regex( 0 ), + m_rflags( rflags ) + { +// cerr << "Regex::Regex() re:" << re << endl; + setup(); + } + + + Regex::~Regex() + { +// regfree( &RE ); + + } + + +// bool +// Regex::operator()( const string& s, int EFLAGS ) const +// { + +// int rc = regexec( &RE, (char*)s.c_str(), 0, NULL, EFLAGS ); + +// switch(rc) +// { +// /* +// * Matched +// */ +// case 0: +// return true; + +// case REG_NOMATCH: +// return false; + +// case REG_ESPACE: +// Throw_FerrisOutOfMemory("",0); + +// default: +// break; +// } +// Throw_FerrisRegExCompileError( getErrorString( rc, *this ) ); +// } + + + bool + Regex::operator()( const string& s ) const + { + if( !m_regex ) + return false; + + return regex_search( s, m_regex, boost::match_any ); + } + + + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +FerrisRegExCompileError::FerrisRegExCompileError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& errorString, + Attribute* a ) + : + FerrisVFSExceptionBase( state, log, errorString.c_str(), a ), + ErrorString( errorString ) +{ + setExceptionName("FerrisRegExCompileError"); +} + + + + +}; diff --git a/Ferris/Regex.hh b/Ferris/Regex.hh new file mode 100644 index 0000000..dc633e1 --- /dev/null +++ b/Ferris/Regex.hh @@ -0,0 +1,141 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Regex.hh,v 1.5 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_REGEX_H_ +#define _ALREADY_INCLUDED_FERRIS_REGEX_H_ + +#include +#include +//#include +#include + +namespace boost { + namespace serialization { + class access; + } +} + +namespace Ferris +{ + + +// class Regex; +// FERRIS_SMARTPTR( Regex, fh_regex ); + +}; + + +#include +#include + +#include + +namespace Ferris +{ +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_API Regex : public Handlable // , public Object +{ + friend class FerrisRegExCompileError; + + fh_rex m_regex; +// regex_t RE; + std::string REstr; + int m_cflags; + boost::regex::flag_type m_rflags; + + friend std::string getErrorString( int e, const Regex& r); + + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) + { + ar & REstr; + ar & m_cflags; + // after load, setup regex state. + this->setup(); + } + + void setup(); + +public: + +// Regex( const std::string& re, int cflags = -1 ); + Regex( const std::string& re, boost::regex::flag_type rflags = boost::regex::optimize ); + ~Regex(); + +// bool operator()( const std::string& s, int EFLAGS ) const; + bool operator()( const std::string& s ) const; + + +}; + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +class FERRISEXP_EXCEPTION FerrisRegExCompileError + : + public FerrisVFSExceptionBase +{ + std::string ErrorString; + +public: + + FerrisRegExCompileError( + const FerrisException_CodeState& state, + fh_ostream log, + const std::string& errorString, + Attribute* a=0); + + ~FerrisRegExCompileError() throw () + { + } + + + +}; +#define Throw_FerrisRegExCompileError(estr) \ +throw FerrisRegExCompileError( \ +FerrisException_CodeState( __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ), \ +(Enamel::get__t_l1w()), (estr), 0) + + + +}; + +#endif // #ifndef _ALREADY_INCLUDED_FERRIS_REGEX_H_ + + + + + diff --git a/Ferris/RemembranceContext.cpp b/Ferris/RemembranceContext.cpp new file mode 100644 index 0000000..181b585 --- /dev/null +++ b/Ferris/RemembranceContext.cpp @@ -0,0 +1,516 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RemembranceContext.cpp,v 1.7 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Ferris.hh" +#include "FerrisSemantic.hh" +#include "Resolver_private.hh" +#include "Context_private.hh" + +using namespace std; + +namespace Ferris +{ + using namespace RDFCore; + using namespace Semantic; + + static const int MAX_NumberOfFilesInView = 30; + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + + /** + * root context for remembrance:// + */ + class FERRISEXP_DLLLOCAL RemembranceRootContext + : + public StateLessEAHolder< RemembranceRootContext, FakeInternalContext > + { + typedef RemembranceRootContext _Self; + typedef StateLessEAHolder< RemembranceRootContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + + protected: + + virtual void priv_read(); + + public: + + RemembranceRootContext() + : + _Base( 0, "/" ) + { + createStateLessAttributes(); + } + + + virtual ~RemembranceRootContext() + { + } + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "remembrance:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + }; + + class FERRISEXP_DLLLOCAL RemembranceTopLevelContext; + FERRIS_CTX_SMARTPTR( RemembranceTopLevelContext, fh_RemembranceTopLevelContext ); + class FERRISEXP_DLLLOCAL RemembranceTopLevelContext + : + public StateLessEAHolder< RemembranceTopLevelContext, FakeInternalContext > + { + typedef StateLessEAHolder< RemembranceTopLevelContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + fh_node m_historyNode; + fh_node m_mostRecentTimeNode; + fh_node m_originalCmdNodePred; + + fh_fcontext + getDesiredParent( fh_context _c, const std::string& rdn ) + { + FakeInternalContext* c = 0; + c = priv_ensureSubContext( rdn, c ); + return c; +// if( isSubContextBound( rdn ) ) +// return dynamic_cast(GetImpl(getSubContext( rdn ))); + +// fh_fcontext child = new FakeInternalContext( this, rdn ); +// addNewChild( child ); +// return child; + } + + + fh_fcontext + getDesiredParent( fh_context c ) + { + string mt = getStrAttr( c, "mimetype", "" ); + + if( starts_with( mt, "audio" )) + return getDesiredParent( c, "audio" ); + if( starts_with( mt, "text" )) + return getDesiredParent( c, "text" ); + if( starts_with( mt, "video" )) + return getDesiredParent( c, "video" ); + + return this; + } + + + protected: + + virtual void priv_read(); + + public: + + RemembranceTopLevelContext( Context* parent, const std::string& rdn, + fh_node m_historyNode, + fh_node m_mostRecentTimeNode, + fh_node m_originalCmdNodePred ) + : + _Base( parent, rdn ), + m_historyNode( m_historyNode ), + m_mostRecentTimeNode( m_mostRecentTimeNode ), + m_originalCmdNodePred( m_originalCmdNodePred ) + { + createStateLessAttributes(); + } + + virtual ~RemembranceTopLevelContext() + { + } + + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "remembrance:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + }; + + class FERRISEXP_DLLLOCAL RemembranceContext; + FERRIS_SMARTPTR( RemembranceContext, fh_RemembranceContext ); + class FERRISEXP_DLLLOCAL RemembranceContext + : + public StateLessEAHolder< RemembranceContext, FakeInternalContext > + { + typedef RemembranceContext _Self; + typedef StateLessEAHolder< RemembranceContext, FakeInternalContext > _Base; + + virtual void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + } + + fh_node m_urlnode; + fh_node m_anode; + fh_node m_originalCmdNodePred; + time_t m_tt; + + string removeURLs( const std::string& s ); + + protected: + + virtual void priv_read(); + + public: + + void constructObject( time_t tt, + fh_node m_urlnode, + fh_node m_anode, + fh_node m_originalCmdNodePred ) + { + m_urlnode = m_urlnode ; + m_anode = m_anode ; + m_originalCmdNodePred = m_originalCmdNodePred ; + m_tt = tt ; + } + + + RemembranceContext( Context* parent, const std::string& rdn, + time_t tt = 0, + fh_node m_urlnode = 0, + fh_node m_anode = 0, + fh_node m_originalCmdNodePred = 0 ) + : + _Base( parent, rdn ), + m_urlnode( m_urlnode ), + m_anode( m_anode ), + m_originalCmdNodePred( m_originalCmdNodePred ), + m_tt( tt ) + { + createStateLessAttributes(); + } + + virtual ~RemembranceContext() + { + } + + + virtual fh_context + createSubContext( const std::string& rdn, fh_context md = 0 ) + throw( FerrisCreateSubContextFailed, FerrisCreateSubContextNotSupported ) + { + fh_stringstream ss; + ss << "remembrance:// directory can not have new items created in this way" << endl; + Throw_FerrisCreateSubContextNotSupported( tostr(ss), this ); + } + + static fh_stringstream + SL_getTT( RemembranceContext* c, const std::string& ean, EA_Atom* atom ) + { + fh_stringstream ret; + ret << c->m_tt; + return ret; + } + + virtual std::string getRecommendedEA() + { + return "name,file-view-time-display"; + } + + void createStateLessAttributes( bool force = false ) + { + if( force || isStateLessEAVirgin() ) + { +#define SLEA tryAddStateLessAttribute + SLEA( "file-view-time", &_Self::SL_getTT, FXD_UNIXEPOCH_T ); +#undef SLEA + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + }; + + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + void + RemembranceRootContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + // We have to setup the children the first time.. + fh_context child = 0; + + fh_fcontext hc = new FakeInternalContext( this, "history" ); + Insert( GetImpl(hc), false ); + { + fh_RemembranceTopLevelContext child; + + string pfx = Semantic::getAttrPrefix(); +// string pfx = ""; + { + fh_node historyNode = RDFCore::Node::CreateURI( pfx + "ferris-file-view-history" ); + fh_node mostRecentTimeNode = RDFCore::Node::CreateURI( pfx + "most-recent-view-time" ); + fh_node originalCmdNodePred = RDFCore::Node::CreateURI( pfx + "view-command" ); + + child = new RemembranceTopLevelContext( GetImpl(hc), "view", + historyNode, + mostRecentTimeNode, + originalCmdNodePred ); + hc->addNewChild( child ); + } + { + fh_node historyNode = RDFCore::Node::CreateURI( pfx + "ferris-file-edit-history" ); + fh_node mostRecentTimeNode = RDFCore::Node::CreateURI( pfx + "most-recent-edit-time" ); + fh_node originalCmdNodePred = RDFCore::Node::CreateURI( pfx + "edit-command" ); + + child = new RemembranceTopLevelContext( GetImpl(hc), "edit", + historyNode, + mostRecentTimeNode, + originalCmdNodePred ); + hc->addNewChild( child ); + } + + } + + } + } + + void + RemembranceTopLevelContext::priv_read() + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + + LG_CTX_D << "RemembranceTopLevelContext::priv_read()" << endl; + clearContext(); +// if( empty() ) + { + typedef map< time_t, pair< fh_node, fh_node > > mrtime_to_node_map_t; + mrtime_to_node_map_t mrtime_to_node_map; + + fh_model m = RDFCore::getDefaultFerrisModel(); + fh_statement query_statement = new Statement(); + query_statement->setPredicate( m_historyNode ); + StatementIterator iter = m->findStatements( query_statement ); + + for( StatementIterator end; iter != end; ++iter ) + { + string earl = (*iter)->getSubject()->toString(); + LG_CTX_D << "file:" << earl << endl; + + fh_node anode = (*iter)->getObject(); + fh_node mrtime = m->getObject( anode, m_mostRecentTimeNode ); + if( mrtime ) + { + LG_CTX_D << " mrtime:" << mrtime->toString() << endl; + time_t tt = toType( mrtime->toString() ); + mrtime_to_node_map[ tt ] = make_pair( (*iter)->getSubject(), anode ); + } + } + + LG_CTX_D << "----------------------------------------" << endl; + int i = 0; + for( mrtime_to_node_map_t::reverse_iterator mi = mrtime_to_node_map.rbegin(); + mi != mrtime_to_node_map.rend() && i < MAX_NumberOfFilesInView ; ++mi, ++i ) + { + string earl = ""; + time_t tt = mi->first; + fh_node uuidnode = mi->second.first; + fh_node n = m->getSubject( Semantic::uuidPredNode(), uuidnode ); + if( !n ) + continue; + LG_CTX_D << "n:" << n->toString() << endl; + + if( !n->getURI() ) + continue; + + earl = n->getURI()->toString(); + LG_CTX_D << "mrtime:" << mi->first << " url:" << earl << endl; + + try + { + fh_context ctx = Resolve( earl ); + string rdn = ctx->getDirName(); + + fh_fcontext parent = getDesiredParent( ctx ); + + RemembranceContext* c = 0; + c = parent->priv_ensureSubContext( rdn, c ); + c->constructObject( tt, n, mi->second.second, + m_originalCmdNodePred ); +// fh_RemembranceContext child; +// child = new RemembranceContext( GetImpl(parent), rdn, tt, +// n, mi->second.second, +// m_originalCmdNodePred ); +// parent->addNewChild( child ); + } + catch( exception& e ) + { + LG_CTX_W << "warning:" << e.what() << endl; + } + catch( ... ) + { + } + } + } + } + + string + RemembranceContext::removeURLs( const std::string& s ) + { + stringstream oss; + stringstream iss; + iss << s; + char ch; + + while( iss >> noskipws >> ch ) + { + if( ch == '"' ) + break; + oss << ch; + } + + return oss.str(); + } + + void + RemembranceContext::priv_read() + { + staticDirContentsRAII _raii1( this ); + if( !m_urlnode ) + return; + + if( empty() ) + { + LG_CTX_D << "RemembranceContext::priv_read()" << endl; + + fh_context c = Resolve( m_urlnode->toString() ); + if( c->isParentBound() ) + { + fh_context child = 0; + + string selfrdn = "self." + getStrAttr( c, "name-extension", "" ); + child = new VirtualSoftlinkContext( this, c, selfrdn ); + addNewChild( child ); + + string dirrdn = "parent"; + child = new VirtualSoftlinkContext( this, c->getParent(), dirrdn ); + addNewChild( child ); + + fh_model m = RDFCore::getDefaultFerrisModel(); + + if( fh_node originalCmdNode = m->getObject( m_anode, m_originalCmdNodePred ) ) + { + string originalcmd = originalCmdNode->toString(); + + stringstream redocontentss; + redocontentss << "#!/bin/sh" << endl + << "echo " << removeURLs( originalcmd ) + << " \"" << c->getDirPath() << "\" " << " | " + << "ferris-internal-remembrance-redo-script.sh" << endl + << endl; + string redordn = "redo.fsh"; + child = new StaticContentLeafContext( this, redordn, redocontentss.str() ); + addNewChild( child ); + + { + stringstream redocontentss; + redocontentss << "#!/bin/sh" << endl + << "echo " << originalcmd << " | " + << "ferris-internal-remembrance-redo-batch-script.sh" << endl + << endl; + string redordn = "redo-batch.fsh"; + child = new StaticContentLeafContext( this, redordn, redocontentss.str() ); + addNewChild( child ); + } + } + } + } + } + + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + class FERRISEXP_DLLLOCAL RemembranceRootContext_RootContextDropper + : + public RootContextDropper + { + public: + RemembranceRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("remembrance"); + RootContextFactory::Register( "remembrance", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new RemembranceRootContext(); + } + return c; + } + }; + static RemembranceRootContext_RootContextDropper ___RemembranceRootContext_static_init; +}; diff --git a/Ferris/Resolver.cpp b/Ferris/Resolver.cpp new file mode 100644 index 0000000..3dbc7a3 --- /dev/null +++ b/Ferris/Resolver.cpp @@ -0,0 +1,2755 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Resolver.cpp,v 1.28 2011/10/22 21:30:21 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +// context VM debug +#include + +#include + +#include "config.h" + +using namespace std; + +#define CERR cerr + +namespace Ferris +{ + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +/** + * A Context dropper that loads its context from a GModule. + */ + class FERRISEXP_DLLLOCAL gmodule_RootContextDropper + : + public RootContextDropper + { + string ModuleName; + GModule* ghandle; + GModule* ghandle_factory; + + bool m_tryToOverMountToFindEA; + + fh_ommatchers (*module_GetOverMountMatchers)(RootContextFactory* rf); + string (*module_getName)(); + bool (*module_isTopLevel)(); + fh_context (*module_Brew)( RootContextFactory* rf ); + + + + void initFactoryModule() + { +// cerr << "opening ModuleName:" << ModuleName << endl; + ghandle_factory = g_module_open ( ModuleName.c_str(), G_MODULE_BIND_LAZY); + + if (!ghandle_factory) + { + ostringstream ss; + ss << "Error, unable to open module file:" << ModuleName << " " + << g_module_error () + << endl; + cerr << tostr(ss); + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle_factory, "getName", + (gpointer*)&module_getName)) + { + ostringstream ss; + ss << "Error, unable to resolve getName in module file:" << ModuleName + << " " + << g_module_error() + << endl; + cerr << tostr(ss); + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle_factory, "GetOverMountMatchers", + (gpointer*)&module_GetOverMountMatchers)) + { + ostringstream ss; + ss << "Error, unable to resolve GetOverMountMatchers in module file:" + << ModuleName << " " + << g_module_error() + << endl; + cerr << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + module_isTopLevel = 0; + g_module_symbol (ghandle_factory, "isTopLevel", (gpointer*)&module_isTopLevel); + + m_tryToOverMountToFindEA = 0; + bool (*module_tryToOverMountToFindEA)() = 0; + if( g_module_symbol (ghandle_factory, "tryToOverMountToFindEA", + (gpointer*)&module_tryToOverMountToFindEA) ) + { + m_tryToOverMountToFindEA = module_tryToOverMountToFindEA(); + } + } + + void ensureModuleLoaded() + { + if( !ghandle_factory ) + { + initFactoryModule(); + } + } + + + void ensureImplementationModuleLoaded() + { + if( !ghandle ) + { + string implname = ModuleName; + string ending = "_factory.so"; + + implname.replace( implname.find(ending), ending.length(), ".so" ); + LG_PLUGIN_I << "Linking in implementaion of:" << implname << endl; + + ghandle = g_module_open ( implname.c_str(), G_MODULE_BIND_LAZY); + if (!ghandle) + { + ostringstream ss; + ss << "Error, unable to open module file:" << implname + << " module error:" << g_module_error () + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + + if (!g_module_symbol (ghandle, "Brew", + (gpointer*)&module_Brew)) + { + ostringstream ss; + ss << "Error, unable to resolve Brew in module file, %s" + << g_module_error() + << endl; + LG_PLUGIN_I << tostr(ss) << endl; + Throw_GModuleOpenFailed( tostr(ss), 0 ); + } + } + } + + + public: + + gmodule_RootContextDropper( string _ModuleName ) + : + ModuleName( _ModuleName ), + ghandle_factory(0), + ghandle(0) + { +// RootContextFactory::Register("edb", this); + } + + virtual fh_ommatchers GetOverMountMatchers(RootContextFactory* rf) + { + ensureModuleLoaded(); + return module_GetOverMountMatchers(rf); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + try + { + LG_PLUGIN_I << "About to brew a context for :" << getName() << endl; +// LG_PLUGIN_I << "root:" << rf->getInfo( RootContextFactory::ROOT ) << endl; + + ensureImplementationModuleLoaded(); + return module_Brew(rf); + } + catch( RootContextCreationFailed& e ) + { + LG_PLUGIN_I << "Cought and rethrow :" << e.what() << endl; + throw; + } + catch( exception& e ) + { + LG_PLUGIN_I << "Cought :" << e.what() << endl; + + stringstream ss; + ss << "gmodule_RootContextDropper::Brew() cought e:" << e.what() << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + } + + virtual bool isTopLevel() + { + ensureModuleLoaded(); + if( module_isTopLevel ) + return module_isTopLevel(); + return RootContextDropper::isTopLevel(); + } + + virtual bool tryToOverMountToFindEA() + { + return m_tryToOverMountToFindEA; + } + + string getName() + { + ensureModuleLoaded(); + return module_getName(); + } + + }; + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +/** + * Prepared for root resolution on the native filesystem by default. + */ + RootContextFactory::RootContextFactory() + : + Style(RESOLVE_EXACT), + ContextClass("file") + { + AddInfo( ROOT, "/" ); + } + + RootContextFactory::~RootContextFactory() + { + } + + RootContextFactory::RootContextFactory( const string& module, + const string& root, + const string& path, + ResolveStyle s ) + : + Style(s), + ContextClass( module ) + { + AddInfo( ROOT, root ); + AddInfo( PATH, path ); + LG_FACTORY_D << "RootContextFactory::RootContextFactory() Style:" << Style << endl; + } + + + + + + +/** + * Get the info bound by key. + * + * @param key The key to lookup + * @return data bound to key + */ + string + RootContextFactory::getInfo( string key ) + { + return BindData[ key ]; + } + + +/** + * Set the name of the context class to resolve to. + * + * @param cl Class name, for example "Native" + */ + void + RootContextFactory::setContextClass( string cl ) + throw( NoSuchContextClass ) + { + ContextClass = cl; + if( getDroppers().end() == getDroppers().find( ContextClass ) ) + { + ostringstream ss; + ss << "setContextClass() NoSuchContextClass:" << cl; + Throw_NoSuchContextClass( tostr(ss), 0 ); + } + } + + std::string + RootContextFactory::getContextClass() + { + return ContextClass; + } + + + + +/** + * Bind the given value to the key + * + * @see PATH + * @see ROOT + * + * @param key Key to bind data to + * @param val Val to bind to key + */ + void + RootContextFactory::AddInfo( string key, string val ) + { + BindData[ key ] = val; + } + + +/** + * get the cache of root context objects keyed on the name of the context class. + */ + RootContextFactory::RootContextCache_t& + RootContextFactory::getRootContextCache() + { + static RootContextCache_t RootContextCache; + return RootContextCache; + } + + +/** + * Get the root context for this resolution. + */ + fh_context + RootContextFactory::getRootContext() + throw( RootContextCreationFailed ) + { + string ContextClassName = ContextClass; + string FilesystemArgs = ""; + + LG_FACTORY_D << "RootContextFactory::getRootContext() " << endl; + LG_FACTORY_D << "RootContextFactory::getRootContext() cc:" << ContextClassName << endl; + + if( starts_with( ContextClassName, "xsltfs?" ) ) + { +// cerr << "ContextClass:" << ContextClass << endl; + int p = ContextClassName.find( '?' ); + if( p != string::npos ) + FilesystemArgs = ContextClassName.substr( p+1 ); + ContextClassName = "xsltfs"; + } + + bool isStaticDOM = false; + if( ContextClassName == "xml" ) + { + if( !getInfo( "StaticString" ).empty() || !getInfo( "StaticDOM" ).empty() ) + isStaticDOM = true; + } + + if( !isStaticDOM && + FilesystemArgs.empty() + && isBound(getRootContextCache()[ ContextClassName ]) ) + { + LG_FACTORY_D << "RootContextFactory::getRootContext() GET cache ContextClassName:" + << ContextClassName << " obj addr :" + << toVoid(getRootContextCache()[ ContextClassName ]) << endl; + LG_FACTORY_D << "RootContextFactory::getRootContext() " + << " root path:" + << getRootContextCache()[ ContextClassName ]->getDirPath() + << endl; + + return getRootContextCache()[ ContextClassName ]; + } + + LG_FACTORY_D << ">>>>>>>>>> Brew(enter) for ContextClassName:" << ContextClassName + << " FilesystemArgs:" << FilesystemArgs + << endl; + if( getDroppers().end() == getDroppers().find( ContextClassName ) ) + { + fh_stringstream ss; + ss << "Can not create the root context for context class:" + << ContextClassName << " because there is no RootContextDropper" + << " for a class with name:" << ContextClassName; +// cerr << tostr(ss); +// BackTrace(); + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + RootContextDropper* dropper = getDroppers()[ ContextClassName ]; +// cerr << "RootContextFactory::getRootContext() staticstring:" << getInfo( "StaticString" ) << endl; + fh_context obj = dropper->Brew( this ); + LG_FACTORY_D << ">>>>>>>>>> Brew( call done. ) for ContextClassName :" << ContextClassName << endl; + + if( !FilesystemArgs.empty() ) + setStrAttr( obj, "filesystem-args", FilesystemArgs ); + + LG_FACTORY_D << "RootContextFactory::getRootContext() setting cache ContextClassName:" + << ContextClassName << " obj addr :" << toVoid(obj) << endl; + +// cerr << "RootContextFactory::getRootContext() setting cache ContextClassName:" +// << ContextClassName << " obj addr :" << toVoid(obj) << endl; +// cerr << "RootContextFactory::getRootContext() setting cache path: " +// << obj->getDirPath() << " name:" << obj->getDirName() << endl; +// sleep(5); + + /* + * FIXME: This is a messy solution to the "mount a string as a ffilter fs" + */ + if( !isStaticDOM && FilesystemArgs.empty() + && ContextClassName != "ffilter" + && ContextClassName != "ffilter2" + && ContextClassName != "ffilter.pccts" + && ContextClassName != "ffilter.spirit" + && ContextClassName != "fulltextboolean" + && ContextClassName != "fulltextboolean2" + && ContextClassName != "fulltextboolean.pccts" + && ContextClassName != "fulltextboolean.spirit" + ) + { +// cerr << "Adding to RootContextCache ContextClassName:" << ContextClassName +// << " ctx:" << GetImpl(obj) +// << " ref_count:" << obj->ref_count +// << endl; + + obj->ref_count = ImplementationDetail::MAX_REF_COUNT; + +// cerr << "Adding2 to RootContextCache ContextClassName:" << ContextClassName +// << " ctx:" << GetImpl(obj) +// << " rdn:" << obj->getDirName() +// << " ref_count:" << obj->ref_count +// << endl; + getRootContextCache()[ ContextClassName ] = obj; + } + return obj; + } + + typedef multimap< Context*, string > AdditionalRootContextClassNames_t; + AdditionalRootContextClassNames_t& + getAdditionalRootContextClassNames() + { + static AdditionalRootContextClassNames_t ret; + return ret; + } + + void + RootContextFactory::pushAdditionalRootContextClassName( string n, Context* c ) + { + getAdditionalRootContextClassNames().insert( make_pair( c, n ) ); + } + + +/** + * Given the root context of a tree find out the name of the context + * dropper that will create the same root object + * + * @param c The root of a context tree + */ + const std::string + RootContextFactory::getRootContextClassName( const Context* c ) + { + typedef RootContextCache_t::iterator RCCI; + + RootContextCache_t& cache = getRootContextCache(); + + for( RCCI iter = cache.begin(); iter != cache.end(); ++iter ) + { + if( GetImpl(iter->second) == c ) + { + LG_FACTORY_D << "getRootContextClassName() looked up root:" << iter->first << endl; + return iter->first; + } + } + +// cerr << "getRootContextClassName() c:" << toVoid(c) << endl; + + AdditionalRootContextClassNames_t::iterator iter = getAdditionalRootContextClassNames().find( (Context*)c ); + if( iter != getAdditionalRootContextClassNames().end() ) + { + return iter->second; + } + +// { +// fh_context c = Resolve("root://"); +// Context::iterator e = c->end(); +// Context::iterator ci = c->begin(); +// cerr << "TRY TO FIND:" << c->getDirPath() << endl; +// for( ; ci!=e; ++ci ) +// { +// cerr << "ci:" << (*ci)->getDirPath() << endl; +// if( GetImpl(*ci) == c ) +// { +// return "file"; +// } +// } +// } + + +// LG_FACTORY_D << "getRootContextClassName() Failing to lookup root:" << c->getDirPath() << endl; + return "x-ferris"; + } + + const std::string + RootContextFactory::getRootContextClassName( fh_context c ) + { + return getRootContextClassName( GetImpl( c ) ); + } + + /* + * 1.1.12: allow uris to be file names in all contexts. + * Mainly of interest for RDF mounted contexts + * + * To handle resolution of filenames that have "/" in them we should + * check if larger parts of 'rest' are resolvable as a direct child + * of 'ctx' + * + * return 0 if URI as dirname fails to resolve. + */ + fh_context + RootContextFactory::priv_resolveContext_tryURIAsDirName( fh_context ctx, + const string& rdn, + const string& rest, + pair& split ) + { + if( !split.second.empty() ) + { + string rdnslash = split.first; + pair npair = split; + +// cerr << "priv_resolveContext(1) rdnslash:" << rdnslash << endl; +// cerr << "priv_resolveContext(1) npair.first:" << npair.first << endl; +// cerr << "priv_resolveContext(1) npair.second:" << npair.second << endl; + + while( !npair.second.empty() ) + { + npair = ctx->splitPathAtStart( npair.second ); + rdnslash = rdnslash + "/" + npair.first; + +// cerr << "priv_resolveContext(loop) rdnslash:" << rdnslash << endl; +// cerr << "priv_resolveContext(loop) npair.first:" << npair.first << endl; +// cerr << "priv_resolveContext(loop) npair.second:" << npair.second << endl; + + if( ctx->isSubContextBound( rdnslash ) ) + { +// cerr << "priv_resolveContext(found/rdn 0) rdnslash:" << rdnslash << endl; + + if( !npair.second.empty() ) + { +// cerr << "priv_resolveContext(found/rdnA) rdnslash:" << rdnslash << endl; +// cerr << "priv_resolveContext(found/rdnA) npair.first:" << npair.first << endl; +// cerr << "priv_resolveContext(found/rdnA) npair.second:" << npair.second << endl; + + fh_context subctx = ctx; + subctx = ctx->getSubContext( rdnslash ); + + return priv_resolveContext( + subctx, + rdn, + npair.second ); + } + else + { +// cerr << "priv_resolveContext(found/rdnB) rdnslash:" << rdnslash << endl; +// cerr << "priv_resolveContext(found/rdnB) npair.first:" << npair.first << endl; +// cerr << "priv_resolveContext(found/rdnB) npair.second:" << npair.second << endl; + + switch( Style ) + { + case RESOLVE_EXACT: + case RESOLVE_CLOSEST: + if( npair.first.length() ) + { + return ctx->getSubContext( rdnslash ); + } + return ctx; + case RESOLVE_PARENT: + return ctx; + } + fh_stringstream ss; + ss << "Unsupported resolve style passed style:" << Style << endl; + Throw_NoSuchSubContext( tostr(ss), GetImpl(ctx) ); + } + } + } + +// cerr << "priv_resolveContext(e) ctx:" << ctx->getURL() << endl; +// cerr << "priv_resolveContext(e) getHaveReadDir:" << ctx->getHaveReadDir() << endl; +// ctx->dumpOutItems(); + +// ctx->read(); +// cerr << "priv_resolveContext(e2) ctx:" << ctx->getURL() << endl; +// cerr << "priv_resolveContext(e2) getHaveReadDir:" << ctx->getHaveReadDir() << endl; +// ctx->dumpOutItems(); +// cerr << "priv_resolveContext(e) rdnslash:" << rdnslash << endl; +// cerr << "priv_resolveContext(e) npair.first:" << npair.first << endl; +// cerr << "priv_resolveContext(e) npair.second:" << npair.second << endl; + } + return 0; + } + + /** + * Resolve the context found by rdn using the working set + * ctx and rest. Note that the resolve style given in + * Style is used to effect how the resolution is carried out. + * + * @param ctx + * @param rdn rdn of context sought + * @param rest + * @return Context with rdn == getDirPath() + */ + fh_context + RootContextFactory::priv_resolveContext( + fh_context ctx, + const string& rdn, + const string& rest + ) +// throw( NoSuchSubContext ) + { +// CERR << "priv_resolveContext() ctx:" << GetImpl(ctx) +// << " rc:" << ctx->ref_count +// << " rdn:" << rdn +// << " rest:" << rest +// << endl; + + LG_FACTORY_D << "==================================================" << endl; + LG_FACTORY_D << "priv_resolveContext() getDirPath:" << ctx->getDirPath() << endl; + LG_FACTORY_D << "priv_resolveContext() getURL:" << ctx->getURL() << endl; + LG_FACTORY_D << "priv_resolveContext() rdn:" << rdn << endl; + LG_FACTORY_D << "priv_resolveContext() rest:" << rest << endl; + + pair split = ctx->splitPathAtStart( rest ); + + LG_FACTORY_D << "priv_resolveContext() split.first :" << split.first << endl; + LG_FACTORY_D << "priv_resolveContext() split.second:" << split.second<< endl; + LG_FACTORY_D << "==================================================" << endl; + +// if( ContextClass == "xsltfs" ) +// { +// if( string::npos != split.first.find( "?" ) ) +// { +// int andslashpos = split.second.find( "&/" ); +// if( andslashpos == string::npos ) +// { +// split.first += split.second; +// split.second = ""; +// } +// else +// { +// split.first += split.second.substr( 0, andslashpos ); +// split.second = split.second.substr( andslashpos + 2 ); +// } +// } +// } + + + /* + * The root node is a little qwerky, we need to test this so that we + * dont read / for no reason + */ + if( split.first.empty() && (rest == "/" || rest == "//") ) + { + return ctx; + } + + try + { + LG_FACTORY_D << "priv_resolveContext() getDirPath:" << ctx->getDirPath() << endl; + +// cerr << "split.first:" << split.first << " split.first.empty():" << split.first.empty() << endl; +// cerr << "split.sec:" << split.second << " split.sec.empty():" << split.second.empty() << endl; +// cerr << "rest.empty:" << rest.empty() << " rest:" << rest << endl; + + + /* + * If the next path component of 'rest' is not a child of the + * current working context we have problems. + */ + if( !ctx->isSubContextBound( split.first ) ) + { + bool shouldStillRead = true; + + /* + * The root node is a little qwerky, we need to test this so that we + * dont read / for no reason + */ + if( rest == "/" && split.first.empty() && split.second.empty() ) + { + return ctx; + } + + LG_FACTORY_D << "priv_resolveContext() first is not bound." << endl; + /* + * is a closest match acceptable? + */ + if( split.second.empty() && Style != RESOLVE_EXACT ) + { + LG_FACTORY_D << "priv_resolveContext() ending for non EXACT:" << endl; + LG_FACTORY_D << "priv_resolveContext() name:" << ctx->getDirName() << endl; + LG_FACTORY_D << "priv_resolveContext() path:" << ctx->getDirPath() << endl; + LG_FACTORY_D << "priv_resolveContext() addr:" << toVoid(ctx) << endl; + return ctx; + } + + if( fh_context r = priv_resolveContext_tryURIAsDirName( ctx, rdn, rest, split ) ) + return r; + + + if( ctx->supportsShortCutLoading() ) + { + /* + * Because we no longer cleanup // to / and other things so that + * URI's can form directory names, we have to handle the case that + * there was a "/rdn" and split.first is empty, split.second is "rdn" + */ + if( split.first.empty() && !split.second.empty() ) + { + return priv_resolveContext( ctx, split.second, split.second ); + } + + // + // If the filesystem does shortcut loading and the user wants + // to hit an overlay virtual softlink directly, we need + // to give the context a chance to set that up. + // + if( !hasOverMounter( ctx ) ) + { + ctx->OnReadComplete_setupUserOverlayLinks(); + LG_USEROVERLAY_D << "rdn:" << rdn + << " rest:" << rest + << " first:" << split.first + << " sec:" << split.second + << endl; + if( ctx->isSubContextBound( split.first ) ) + { + if( fh_context r = priv_resolveContext( ctx, rdn, rest ) ) + { + LG_USEROVERLAY_D << "have r:" << r->getURL() << endl; + return r; + } + } + } + + // if the module supports ShortCutLoading then the above call to + // isSubContextBound() which calls priv_getSubContext() would have + // checked for sure that the subcontext does not exist, + // this we know now that the object we are seeking can't exist. + // + // We have to check if there is an overmounter willing to mount + // this object that might provide children also before fully + // giving up + + LG_FACTORY_D << "priv_resolveContext() supports short cut loading." << endl; + if( !hasOverMounter( ctx ) ) + { + static const gchar* LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION = + g_getenv ("LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION"); + + // + // It gets more fun. If the user wants file@eaname to work we + // can't assume failure if a short cut loading path has failed + // FIXME: + // +// if( !LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION ) + { + fh_stringstream ss; + ss << "Context does not exist. rdn:" << split.first + << " split.second:" << split.second + << " rest:" << rest + << " parent:" << ctx->getURL() << endl; + LG_FACTORY_D << "priv_resolveContext() no overmounter, ss:" << tostr(ss) << endl; +// BackTrace(); + Throw_NoSuchSubContext( tostr(ss), GetImpl(ctx) ); + } + } + + // we know there is an overmounter, so overmount it and try + // to hit the path directly if the overmounting plugin supports + // short cut loading. + ctx->tryToOverMount(); + if( ctx->getOverMountContext()->supportsShortCutLoading() ) + { + if( ctx->isSubContextBound( split.first ) ) + { + shouldStillRead = false; + } + } + } + + LG_FACTORY_D << "priv_resolveContext() reading path:" << ctx->getDirPath() + << " because subcontext:" << split.first + << " could not be found." + << " first:" << split.first + << " sec:" << split.second + << " rest:" << rest + << endl; + + if( shouldStillRead ) + ctx->read(); + + LG_FACTORY_D << "priv_resolveContext(2) read path:" << ctx->getDirPath() + << " because subcontext:" << split.first + << " could not be found." + << " first:" << split.first + << " sec:" << split.second + << " rest:" << rest + << endl; + + + /* + * Try again for URI as filename because we may have overmounted + * a new context. + */ + if( fh_context r = priv_resolveContext_tryURIAsDirName( ctx, rdn, rest, split ) ) + return r; + } + + + + LG_FACTORY_D << "priv_resolveContext() getDirPath:" << ctx->getDirPath() << endl; + + if( split.second.length() ) + { + fh_context subctx = ctx; + if( split.first.length() ) + { + LG_FACTORY_D << "priv_resolveContext() split.first:" << split.first << endl; + subctx = ctx->getSubContext( split.first ); + } + + LG_FACTORY_D << "priv_resolveContext() x dirname:" << subctx->getDirName() << endl; + LG_FACTORY_D << "priv_resolveContext() x dirpath:" << subctx->getDirPath() << endl; + + return priv_resolveContext( + subctx, + rdn, + split.second); + } + else + { + LG_FACTORY_D << "priv_resolveContext() finalizing... split.first:" + << split.first << endl; + LG_FACTORY_D << "priv_resolveContext() ctx->path:" << ctx->getDirPath() << endl; + LG_FACTORY_D << "priv_resolveContext() ctx->url:" << ctx->getURL() << endl; + LG_FACTORY_D << "priv_resolveContext() closest|exact split.first:" + << split.first << endl; + + + switch( Style ) + { + case RESOLVE_EXACT: + + if( split.first.length() ) + { +// if( !ctx->isSubContextBound( split.first ) ) + try + { + // + // libferris 1.4.3: adding the ability to convert + // url/context@attribute into + // branchfs-attributes://url/context/attribute + // + static const gchar* LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION = + g_getenv ("LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION"); + + LG_FACTORY_D << "LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION:" << (LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION!=0) << endl; + LG_FACTORY_D << "split.first:" << split.first << endl; + LG_FACTORY_D << "split.second:" << split.second << endl; + LG_FACTORY_D << "rest:" << rest << endl; + + if( LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION + && string::npos != split.first.find("@") ) + { + stringpair_t p = ::Ferris::split( split.first, "@" ); + stringstream earlss; + earlss << "branchfs-attributes:" + << ctx->getURLScheme() << "/" << ctx->getDirPath() + << "/" << p.first << "/" << p.second + << flush; + LG_FACTORY_D << "brachfs url:" << earlss.str() << endl; + + fh_context ret = Resolve( earlss.str() ); + LG_FACTORY_D << "priv_resolveContext() ret:" << ret->getURL() << endl; + return ret; + } + + fh_context ret = ctx->getSubContext( split.first ); + LG_FACTORY_D << "priv_resolveContext() ret:" << ret->getURL() << endl; + return ret; + } + catch( NoSuchSubContext& e ) + { +// cerr << "RESOLVE_EXACT url:" << ctx->getURL() +// << " rdn:" << split.first +// << endl; +#ifdef FERRIS_DEBUG_RESOLVE + ctx->dumpOutItems(); + DEBUG_dumpcl( "Context does not exist" ); +#endif + fh_stringstream ss; + ss << "Context does not exist. rdn:" << split.first + << " parent:" << ctx->getURL() << endl; + LG_FACTORY_D << tostr(ss); +// BackTrace(); + + Throw_NoSuchSubContext( tostr(ss), GetImpl(ctx) ); + } + } + return ctx; + + case RESOLVE_CLOSEST: + + if( split.first.length() ) + { + return ctx->getSubContext( split.first ); + } + return ctx; + + + case RESOLVE_PARENT: + LG_FACTORY_D << "priv_resolveContext() term on RESOLVE_PARENT:\n"; + LG_FACTORY_D << "priv_resolveContext() name:" << ctx->getDirName() << endl; + LG_FACTORY_D << "priv_resolveContext() path:" << ctx->getDirPath() << endl; + LG_FACTORY_D << "priv_resolveContext() addr:" << toVoid(ctx) << endl; + return ctx; + } + LG_FACTORY_D << "priv_resolveContext() should not be reached\n"; + } + } + + catch( NoSuchSubContext& e ) + { + LG_FACTORY_D << "priv_resolveContext() NoSuchSubContext:" << e.what() << endl; + switch( Style ) + { + case RESOLVE_CLOSEST: return ctx; + } + throw; + } + catch( exception& e ) + { + LG_FACTORY_ER << "priv_resolveContext() exception:" << e.what() << endl; + } + catch( ... ) + { + LG_FACTORY_ER << "priv_resolveContext() ...\n"; + } + + { + fh_stringstream ss; + ss << "Should never happen!" + << " rdn:" << rdn + << " rest:" << rest + << endl; + Throw_NoSuchSubContext( tostr(ss), GetImpl(ctx) ); + } + } + + const string RootContextFactory::PATH = "Path"; + const string RootContextFactory::ROOT = "Root"; + const string RootContextFactory::SERVERNAME = "ServerName"; + + static bool isRelPath( string p ) + { + return (p.length() && p[0] != '/'); + } + + fh_context + RootContextFactory::resolveContext_relative_file_path( ResolveStyle s ) + { + string path = getInfo( PATH ); + string root = getInfo( ROOT ); + /* + * Get CWD is always non relative, thus it will not come back in here + * and getRootContext() will be set by the next line. + */ + fh_context rc = Shell::getCWD(); + string relativePath = path.length() ? path : root; + + AddInfo( PATH, relativePath ); + AddInfo( ROOT, "/" ); + + fh_context ret = rc->getRelativeContext( relativePath, this ); +// cerr << "RootContextFactory::resolveContext() ret:" << isBound(ret) << endl; + return ret; + } + + + +/** + * Using the preset data from setContextClass() and AddInfo() resolve + * to a Context using the resolution style given. + * + * + * @param s How exact to make the resolution. + * @return The context + */ + fh_context + RootContextFactory::resolveContext( ResolveStyle s ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + Style = s; + string path = getInfo( PATH ); + string root = getInfo( ROOT ); + + LG_FACTORY_D << "RootContextFactory::resolveContext()" << endl; + LG_FACTORY_D << "RootContextFactory::resolveContext() path:" << path << endl; + LG_FACTORY_D << "RootContextFactory::resolveContext() root:" << root << endl; + LG_FACTORY_D << "RootContextFactory::resolveContext() Style:" << Style << endl; + LG_FACTORY_D << "RootContextFactory::resolveContext() s:" << s << endl; + LG_FACTORY_D << "RootContextFactory::resolveContext() ContextClass:" << ContextClass << endl; + + /* + * Resolve relative paths. This is a little mucky. + */ + if( ContextClass=="Native" || ContextClass=="file" + && (isRelPath(path) || isRelPath(root))) + { + return resolveContext_relative_file_path( s ); + } + + fh_context ctx = 0; + try + { + ctx = getRootContext(); + } + catch( RootContextCreationFailed& e ) + { + if( isRelPath(path) || isRelPath(root) ) + { + return resolveContext_relative_file_path( s ); + } + throw; + } + + + LG_FACTORY_D << "resolveContext() root path:" << ctx->getDirPath() << endl; +// cerr << "resolveContext() root :" << root << endl; +// cerr << "resolveContext() path :" << path << endl; + + try + { + string rdn = getInfo( "Path" ); + + /** + * They just want the root context, so our work is complete before + * it really begins. + */ + if( rdn.empty() ) + { + switch(Style) + { + case RESOLVE_CLOSEST: + case RESOLVE_EXACT: + return ctx; + + default: + Throw_NoSuchSubContext("No parent of root context", 0 ); + } + } + + +// cerr << "resolveContext() calling priv() len:" << rdn.length() << endl; + + /* + * The user has given us a path to resolve, we pass that to + * priv_resolveContext() to do the actual work. + */ + string trimmed = ctx->trimEdgeSeps( rdn ); + LG_FACTORY_D << "resolveContext() trimmed:" << trimmed << endl; + LG_FACTORY_D << "resolveContext() dirname:" << ctx->getDirName() << endl; + LG_FACTORY_D << "resolveContext() dirpath:" << ctx->getDirPath() << endl; +// sleep(4); + LG_FACTORY_D << "resolveContext() calling priv()" << endl; + +// CERR << "calling priv_resolveContext() ctx:" << GetImpl(ctx) +// << " rc:" << ctx->ref_count +// << " rdn:" << rdn +// << endl; + fh_context ret = priv_resolveContext( ctx, rdn, trimmed ); + return ret; + } + catch( exception& e ) + { + LG_FACTORY_ER << "resolveContext() e:" << e.what() << endl; + throw; + } + catch( ... ) + { + LG_FACTORY_ER << "resolveContext() e:... " << endl; + throw; + } + +// return ResolveData; + return 0; + } + + + +/** + * Bind the context class name CtxName to the context dropper given. + * + * @param CtxName context class name + * @param dropper A class that can drop new contexts. + */ + void + RootContextFactory::Register( string CtxName, RootContextDropper* dropper ) + { + if( !dropper ) + { + LG_CTX_ER << "RootContextFactory::Register() without valid dropper for" + << " ctx:" << CtxName << endl; + } + +// cerr << "RootContextFactory::Register() CtxName:" << CtxName << endl; + getDroppers()[ CtxName ] = dropper; + } + + + /** + * Scan the context library directory looking for factory objects and add then + * all to droppers. + * + * Note that this method only performs the scan one time for the lifetime of + * the factory. + * + * @param droppers Where to put any new context droppers found. + * + */ + void + RootContextFactory::ensureGModuleFactoriesLoaded( Droppers_t& droppers ) + { + static bool virgin = true; +// string SystemPluginDir = PREFIX + "/lib/ferris/plugins/context/"; + string SystemPluginDir = makeFerrisPluginPath( "context" ); + + // FIXME: +// LG_PLUGIN_D << "ensureGModuleFactoriesLoaded()" << endl; + + if( virgin ) + { + virgin = false; + + DIR *d; + struct dirent *e; + + + stringlist_t pluginlist; + if ((d = opendir ( SystemPluginDir.c_str() )) == NULL) + { + LG_PLUGIN_ER << "Can not open system plugin dir :" << SystemPluginDir << endl; + return; + } + while ((e = readdir (d)) != NULL) + { + string fn = e->d_name; + pluginlist.push_back(fn); + } + closedir (d); + + + for( stringlist_t::iterator pi = pluginlist.begin(); + pi != pluginlist.end(); ++pi ) + { + string fn = *pi; + +// cerr << "fn:" << fn << endl; +// LG_PLUGIN_I << "Found:" << fn << endl; + + const string factory_tail = "factory.so"; + if( ends_with( fn, factory_tail ) ) + { + try + { +// LG_PLUGIN_I << "Loading plugin:" << fn << endl; + + ostringstream ss; + ss << SystemPluginDir << fn; + gmodule_RootContextDropper* drop = new + gmodule_RootContextDropper( tostr(ss) ); + + droppers[ drop->getName() ] = drop; +// cerr << "Loaded new context class:" << drop->getName() << endl; + } + catch( GModuleOpenFailed& e ) + { +// LG_PLUGIN_ER << "Failed to load plugin" << endl; +// LG_PLUGIN_ER << "Failed to load plugin:" << fn << endl; + +// cerr << "Failed to load plugin" << endl; + LG_PLUGIN_W << "Failed to load plugin:" << fn + << " e:" << e.what() + << endl; + cerr << "Failed to load plugin:" << fn + << " e:" << e.what() + << endl; + } + } + } + } + +// cerr << "RootContextFactory::ensureGModuleFactoriesLoaded(begin)" << endl; +// typedef Droppers_t::iterator DI; +// for( DI di = droppers.begin(); di!=droppers.end(); ++di ) +// { +// cerr << " name:" << di->first << " object:" << toVoid(di->second) << endl; +// } +// cerr << "RootContextFactory::ensureGModuleFactoriesLoaded(end)" << endl << endl; + + + } + + + +/** + * Get the collection of droppers that is keyed on a string context class name + */ + RootContextFactory::Droppers_t& + RootContextFactory::getDroppers() + { + static Droppers_t Droppers; + ensureGModuleFactoriesLoaded( Droppers ); + return Droppers; + } + + void + RootContextFactory::setBaseOverMountContext( fh_context c ) + { + BaseOverMountContext = c; + } + + const fh_context& + RootContextFactory::getBaseOverMountContext() + { + return BaseOverMountContext; + } + + +/** + * Find out if there is a possible overmount for this context. + * + * This is primarily used in Context::getHasSubContextsGuess() to check + * if a context that is not reable natively having subcontexts if there + * would be a possible overmounter to allow reading the context as a + * dir. + */ + bool + RootContextFactory::hasOverMounter( const fh_context& ctx ) + { +// cerr << "RootContextFactory::hasOverMounter( enter ) c:" << ctx->getURL() << endl; + + bool ret = false; + + for( Droppers_t::const_iterator iter = getDroppers().begin(); + iter != getDroppers().end(); iter++ ) + { +// cerr << "RootContextFactory::hasOverMounter() first:" << iter->first +// << " sec:" << toVoid(iter->second) << endl; + + fh_ommatchers m = iter->second->GetOverMountMatchers( this ); + + for( fh_ommatchers::iterator mat_iter = m.begin(); + mat_iter != m.end(); mat_iter++ ) + { + LG_OVERMOUNT_D << "testing:" << iter->first << endl; + LG_OVERMOUNT_D << "ctx:" << ctx->getDirPath() << endl; + + fh_ommatcher& f = *mat_iter; + if( f( ctx ) ) + { +// cerr << "RootContextFactory::hasOverMounter( exit ) c:" << ctx->getURL() << endl; + return true; + } + } + } +// cerr << "RootContextFactory::hasOverMounter( exitf ) c:" << ctx->getURL() << endl; + return ret; + } + + /** + * Core of findOverMounter which was abstracted to a private method so that + * the main public findOverMounter() method can choose which ordering to + * test the droppers in + * + * @param ctx Base context to try to mount over + * @param followLinkTTL how many times to dereference softlinks before giving up + * @param dropperName the first part of a Droppers_t entry + * @param dropper the second part of a Droppers_t entry + * + * @return Context that is mounted over ctx or un unBound() context on failure. + */ + fh_context + RootContextFactory::findOverMounter_TryDropper( fh_context ctx, + int followLinkTTL, + const std::string& dropperName, + RootContextDropper* dropper, + bool attemptingOverMountOnlyToFindEA ) + { +// cerr << "TryDropper ctx:" << ctx->getURL() +// << " attemptingOverMountOnlyToFindEA:" << attemptingOverMountOnlyToFindEA +// << " dropper->tryToOverMountToFindEA:" << dropper->tryToOverMountToFindEA() +// << endl; + + if( attemptingOverMountOnlyToFindEA ) + { + if( !dropper->tryToOverMountToFindEA()) + { + LG_OVERMOUNT_D << "findOverMounter_TryDropper() only looking for ea... returning." + << " attemptingOverMountOnlyToFindEA:" << attemptingOverMountOnlyToFindEA + << endl; + return 0; + } + } + + fh_ommatchers m = dropper->GetOverMountMatchers( this ); + +// cerr << "RootContextFactory::TryDropper() name:" << dropperName +// << " number of matchers:" << m.size() +// << endl; + + for( fh_ommatchers::iterator mat_iter = m.begin(); + mat_iter != m.end(); mat_iter++ ) + { + LG_OVERMOUNT_D << "testing:" << dropperName << endl; + LG_OVERMOUNT_D << "ctx:" << ctx->getDirPath() << endl; + +// cerr << "testing:" << dropperName << endl; +// cerr << "ctx:" << ctx->getDirPath() << endl; + + fh_ommatcher& f = *mat_iter; + if( f( ctx ) ) + { +// cerr << "Overmount: Got a match on:" << dropperName << endl; + LG_OVERMOUNT_I << "Got a match on:" << dropperName << endl; +// cerr << "Got a match on:" << dropperName << endl; + + BaseOverMountScope scope( this, ctx ); + setContextClass( dropperName ); + AddInfo( RootContextFactory::ROOT, ctx->getDirPath() ); +// (*mat_iter)->setup( this ); + + fh_context ret = dropper->Brew( this ); + ret->setCoveredContext( ctx ); + return ret; + } + } + + return 0; + } + + + + /** + * Find a context that is willing to mount itself over the given context. + * + * This method is also used by context to find an overmounter. + * + * @param ctx Base context to try to mount over + * @param followLinkTTL how many times to dereference softlinks before giving up + * + * @return Context that is mounted over ctx + */ + fh_context + RootContextFactory::findOverMounter( fh_context ctx, + int followLinkTTL, + bool attemptingOverMountOnlyToFindEA ) + { + LG_OVERMOUNT_I << "RootContextFactory::findOverMounter() path:" << ctx->getDirPath() + << " attemptingOverMountOnlyToFindEA:" << attemptingOverMountOnlyToFindEA + << endl; + + + Droppers_t::const_iterator iter = getDroppers().find( "rdf" ); + Droppers_t::const_iterator end = getDroppers().end(); + + if( iter != end ) + { + LG_OVERMOUNT_D << "RootContextFactory::findOverMounter(rdf) path:" << ctx->getDirPath() + << " iter->first:" << iter->first + << endl; + + const std::string dropperName = iter->first; + RootContextDropper* dropper = iter->second; + fh_context c = findOverMounter_TryDropper( ctx, + followLinkTTL, + dropperName, + dropper, + attemptingOverMountOnlyToFindEA ); + if( c ) + return c; + } + LG_OVERMOUNT_D << "RootContextFactory::findOverMounter(other) path:" << ctx->getDirPath() << endl; + + for( iter = getDroppers().begin(); iter != end; iter++ ) + { + LG_OVERMOUNT_D << "RootContextFactory::findOverMounter(x) path:" << ctx->getDirPath() + << " iter->first:" << iter->first + << endl; + + const std::string dropperName = iter->first; + RootContextDropper* dropper = iter->second; + fh_context c = findOverMounter_TryDropper( ctx, followLinkTTL, + dropperName, + dropper, + attemptingOverMountOnlyToFindEA ); + if( c ) + return c; + +// fh_ommatchers m = iter->second->GetOverMountMatchers( this ); + +// for( fh_ommatchers::iterator mat_iter = m.begin(); +// mat_iter != m.end(); mat_iter++ ) +// { +// LG_OVERMOUNT_D << "testing:" << iter->first << endl; +// LG_OVERMOUNT_D << "ctx:" << ctx->getDirPath() << endl; + +// fh_ommatcher& f = *mat_iter; +// if( f( ctx ) ) +// { +// // cerr << "Overmount: Got a match on:" << iter->first << endl; +// LG_OVERMOUNT_I << "Got a match on:" << iter->first << endl; + +// BaseOverMountScope scope( this, ctx ); +// setContextClass( iter->first ); +// AddInfo( RootContextFactory::ROOT, ctx->getDirPath() ); +// // (*mat_iter)->setup( this ); + +// fh_context ret = iter->second->Brew( this ); +// ret->setCoveredContext( ctx ); +// return ret; +// } +// } + } + + if( followLinkTTL ) + { + string realpath = getStrAttr( ctx, "realpath", "" ); + if( !realpath.empty() ) + { + try + { + fh_context targetc = Resolve( realpath ); + + // + // Dont follow links to ourself. + // + if( targetc->getURL() != ctx->getURL() ) + { + return findOverMounter( targetc, --followLinkTTL ); + } + } + catch( exception& e ) + { + ostringstream ss; + ss << "RootContextFactory::findOverMounter()" + << " can not follow link when attempting to locate overmounter path:" + << ctx->getDirPath() << endl; + LG_OVERMOUNT_D << tostr(ss) << endl; + Throw_FerrisNotReadableAsContext( tostr(ss), 0 ); + } + } + } + + ostringstream ss; + ss << "RootContextFactory::findOverMounter() NO OVERMOUNTER path:" + << ctx->getDirPath() << endl; + + LG_OVERMOUNT_D << tostr(ss); + Throw_FerrisNotReadableAsContext( tostr(ss), 0 ); + } + + + + /*******************************************************************************/ + /*******************************************************************************/ + /*******************************************************************************/ + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +// string CleanupURL( const string& s ) +// { +// string ret = s; + +// if( !s.length() ) +// { +// fh_stringstream ss; +// ss << "Zero length URL given."; +// Throw_MalformedURL( tostr(ss), 0 ); +// } +// if( s[0] == '~' ) +// { +// ret = "file://"; +// ret += Shell::getHomeDirPath_nochecks(); +// ret += "/"; +// if( string::npos != s.find("/") ) +// { +// ret += s.substr( s.find("/") ); +// } +// } +// else if( s[0] == '.' ) +// { +// ret = "file://"; +// ret += Shell::getCWDDirPath(); +// ret += "/"; +// ret += s; +// } +// else if( s[0] == '/' ) +// { +// ret = "file://"; +// ret += s; +// } +// else if( string::npos == s.find(":") ) +// { +// ret = "file://"; +// ret += Shell::getCWDDirPath(); +// ret += "/"; +// ret += s; +// } + +// // cerr << "before /./ reduction ret:" << ret << endl; +// int loc = ret.find("/./"); +// while( loc != string::npos ) +// { +// fh_stringstream ss; +// ss << ret.substr( 0, loc ) << "/" << ret.substr( loc+3 ); +// ret = tostr(ss); +// loc = ret.find("/./"); +// } + +// // cerr << "after /./ reduction ret:" << ret << endl; + +// // Remove unescaped '//' to be '/' +// { +// int loc = ret.find("//"); +// while( loc != string::npos ) +// { +// fh_stringstream ss; +// ss << ret.substr( 0, loc ) << "/" << ret.substr( loc+2 ); +// ret = tostr(ss); +// loc = ret.find("//"); +// } +// } + +// if( starts_with( ret, "file:" )) +// { +// ret = ret.substr( 5 ); +// } + +// return ret; +// } + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + + string + FerrisURL::getScheme() + { + return scheme; + } + + string + FerrisURL::getInternalFerisScheme() + { + string xferris = "x-ferris"; + + if( starts_with( getScheme(), xferris )) + { + return "file"; + // string ret = getScheme().substr( xferris.length() ); + // return ret; + } + return getScheme(); + } + + std::string + FerrisURL::tostr() + { + return getScheme() + "://" + getPath(); + } + + std::string + FerrisURL::getURL() + { + return this->tostr(); + } + + string + FerrisURL::getPath() + { + return path; + } + + FerrisURL + FerrisURL::fromString( const string& s ) + { + FerrisURL ret; + string::size_type colonidx = s.find( ":" ); + if( colonidx == string::npos ) + { + ret.scheme = "file"; + ret.path = s; + } + else + { + ret.scheme = s.substr( 0, colonidx ); + ret.path = s.substr( colonidx+1 ); + } + return ret; + } + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + + ostream& operator<<(ostream& ss, FerrisURL& u ) + { + return ss << " scheme:" << u.getScheme() << " path:" << u.getPath() << endl; + } + + /** + * Given a URL like earl="prefix://params/other" + * where prefix is contained the the prefix function arg, + * we remove the params part of the URL and put that into + * extraData. + * + * the string earl is modified to have the "prefix://params" + * portion removed and the FerrisURL 'u' is updated to reflect + * the new earl value. + */ + static void + Resolve_AdjustForWrap( const std::string& dirty_earl, + string& earl, + FerrisURL& u, + const string& prefix, + string& extraData ) + { + string s = earl.substr( string(prefix).length() ); + int endOfExtraData = s.find( "/" ); + + if( endOfExtraData == string::npos ) + { + fh_stringstream ss; + ss << "Malformed " << prefix << " in URL:" << dirty_earl << endl; + Throw_MalformedURL( tostr(ss), 0 ); + } + + extraData = s.substr( 0, endOfExtraData ); + + /* Adjust the earl not to have this prefix & extradata stuff in it */ + string rest = s.substr( endOfExtraData ); + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + earl = trimmer( rest ); + earl = CleanupURL( earl ); + +// cerr << " rest:" << rest +// << " earl:" << earl +// << endl; + u = FerrisURL::fromString( earl ); + } + + static string + Resolve_FirstManyToOneURL( string& earl, list< FerrisURL >& urllist ) + { + if( earl.empty() ) + return earl; + + int colonpos = earl.find(":"); + if( colonpos == string::npos ) + return ""; + + // For finding the start of the 3rd and on URL we need to skip one colon + if( !urllist.empty() ) + { + int npos = earl.substr( colonpos+1 ).find(":"); + if( npos == string::npos ) + { + string ret = earl; + earl = ""; + return ret; + } + colonpos = colonpos + npos; + } + + string tmp = earl.substr( 0, colonpos ); + int secondURLpos = tmp.rfind("/"); + if( secondURLpos == string::npos ) + { +// cerr << "Resolve_FirstManyToOneURL(X) earl:" << earl +// << " secondURLpos:" << secondURLpos +// << " colonpos:" << colonpos +// << " urllist.empty():" << urllist.empty() +// << endl; + return earl; + } + + string ret = earl.substr( 0, secondURLpos ); +// cerr << "Resolve_FirstManyToOneURL() earl:" << earl +// << " ret:" << ret +// << " secondURLpos:" << secondURLpos +// << " colonpos:" << colonpos +// << endl; + earl = earl.substr( secondURLpos+1 ); + return ret; + } + + static void + Resolve_FirstManyToOneURL_PostAssert( list< FerrisURL >& urllist, int min, string prefix ) + { + typedef list< FerrisURL > urllist_t; + + if( urllist.empty() || urllist.size() < min ) + { + cerr << "no urls for " << prefix << endl; + } + + for( urllist_t::iterator uiter = urllist.begin(); uiter != urllist.end(); ++uiter ) + { + cerr << prefix << ":// list of contexts:" << uiter->getURL() << endl; + } + } + + fh_context Resolve( const std::string earl, ResolveStyle rs, int ex ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + + fh_context ret = Resolve( earl, rs ); + + if( ex & RESOLVEEX_UNROLL_LINKS ) + { + ret = Shell::unrollLinks( ret ); + } + + return ret; + } + + fh_context Resolve( const std::string dirty_earl, ResolveStyle rs ) + { + CacheManager::fh_insideResolve resolveGuard = getCacheManager()->getInsideResolve(); + // + // This is a little nasty, in XPath there is a really big difference between + // a leading "/" and a leading "//" + // / --> start at the top + // // --> any subtree from the top + // + string earl = dirty_earl; + if( earl.find( "xpath:/" ) == string::npos ) + earl = CleanupURL( earl, false, true ); + + LG_CTX_D << "Resolve() dirty_earl:" << dirty_earl + << " clean_earl:" << earl + << endl; + + FerrisURL u = FerrisURL::fromString( earl ); + bool CacheWrapper_Add = false; + string CacheWrapper_extraData = ""; + + bool InheritEAWrapper_Add = false; + string InheritEAWrapper_extraData = ""; + + bool FilterWrapper_Add = false; + string FilterWrapper_extraData = ""; + string FilterWrapper_FilterString = ""; + const string FILTERWRAPPER_FILTERSTRING_KEY = "predicate"; + fh_context FilterWrapper_FilterObject = 0; + + typedef list< FerrisURL > urllist_t; + bool UnionWrapper_Add = false; + urllist_t UnionWrapper_urllist; + bool SetDiffWrapper_Add = false; + urllist_t SetDiffWrapper_urllist; + bool SetIntersectWrapper_Add = false; + urllist_t SetIntersectWrapper_urllist; + bool SetSymmetricDiffWrapper_Add = false; + urllist_t SetSymmetricDiffWrapper_urllist; + bool DiffWrapper_Add = false; + urllist_t DiffWrapper_urllist; + bool URLTrWrapper_Add = false; + urllist_t URLTrWrapper_urllist; + + + + bool SortingWrapper_Add = false; + string SortingWrapper_SortString = ""; + fh_sorter SortingWrapper_sorter; + + + // + // A single file as a filesystem. Specific use is in a FUSE mount + // for example for an xsltfs:// where you are really only interested + // in a single file which is a read/write result of an XSLT. + // + string single_file_filesystem = "single-file-filesystem:"; + if( starts_with( earl, single_file_filesystem ) ) + { + string fileURL = earl.substr( single_file_filesystem.length() ); + PrefixTrimmer trimmer; + trimmer.push_back( "/" ); + fileURL = trimmer( fileURL ); + LG_CTX_D << "fileURL:" << fileURL << endl; + + fh_context fc = Resolve( fileURL ); + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + if( SelectionContext* sc = dynamic_cast( GetImpl(selection ) ) ) + { + sc->setSelectionContextRDNConflictResolver( + get_SelectionContextRDNConflictResolver_MonsterName() ); + } + + LG_CTX_D << "--------Setting the child...------------" << endl; + selection->createSubContext( "", fc ); + + LG_CTX_D << "selection.url :" << selection->getURL() << endl; + LG_CTX_D << "selection.path:" << selection->getDirPath() << endl; + LG_CTX_D << "selection.rdn :" << selection->getDirName() << endl; + LG_CTX_D << "selection.child.url :" << (*selection->begin())->getURL() << endl; + LG_CTX_D << "selection.child.path:" << (*selection->begin())->getDirPath() << endl; + LG_CTX_D << "selection.child.rdn :" << (*selection->begin())->getDirName() << endl; + + LG_CTX_D << "selection.child.rdn:" << (*selection->begin())->getDirName() << endl; + + for( Context::iterator ci = selection->begin(); ci != selection->end(); ++ci ) + { + LG_CTX_D << "ci.rdn:" << (*ci)->getDirName() << endl; + } + return selection; + } + + string cacheprefix = "cachecontext:"; + if( starts_with( earl, cacheprefix ) ) + { + CacheWrapper_Add = true; + Resolve_AdjustForWrap( dirty_earl, earl, u, + cacheprefix, CacheWrapper_extraData ); + } + + + string inheritEAprefix = "inheritea:"; + if( starts_with( earl, inheritEAprefix ) ) + { + InheritEAWrapper_Add = true; + Resolve_AdjustForWrap( dirty_earl, earl, u, + inheritEAprefix, InheritEAWrapper_extraData ); +// cerr << "After finding inheritea:// prefix." +// << " dirty:" << dirty_earl << endl +// << " earl:" << earl << endl +// << " InheritEAWrapper_extraData:" << InheritEAWrapper_extraData +// << endl; + } + + + + /* + * Try to perform as much work as possible here so that we don't bother + * resolving the actual URL if the filter is botched. + */ + string sortingprefix = "sort:"; + if( starts_with( earl, sortingprefix ) ) + { + SortingWrapper_Add = true; + Resolve_AdjustForWrap( dirty_earl, earl, u, + sortingprefix, SortingWrapper_SortString ); + PostfixTrimmer trimmer; + trimmer.push_back( "/" ); + SortingWrapper_SortString = trimmer( SortingWrapper_SortString ); + +// cerr << "Found request, Sorting by -->" << SortingWrapper_SortString +// << "<--" << endl; + SortingWrapper_sorter = Factory::MakeSorter( SortingWrapper_SortString ); + } + + + string filterprefix = "filter:"; + if( starts_with( earl, filterprefix ) ) + { + FilterWrapper_Add = true; + Resolve_AdjustForWrap( dirty_earl, earl, u, + filterprefix, FilterWrapper_extraData ); + +// StringMap_t m = Util::ParseKeyValueString( FilterWrapper_extraData ); +// FilterWrapper_FilterString = m[ FILTERWRAPPER_FILTERSTRING_KEY ]; + FilterWrapper_FilterString = FilterWrapper_extraData; + + LG_FACTORY_D + << "Filtering though resolve string, filter string is:" << FilterWrapper_extraData + << " FilterWrapper_FilterString:" << FilterWrapper_FilterString + << " earl:" << earl << endl; + + FilterWrapper_FilterObject = Factory::MakeFilter( FilterWrapper_FilterString ); + } + + string unionprefix = "union:"; + if( starts_with( earl, unionprefix ) ) + { + UnionWrapper_Add = true; + string ex; + Resolve_AdjustForWrap( dirty_earl, earl, u, unionprefix, ex ); + +// cerr << "Wrapping for union://. ex:" << ex +// << " dirty_earl:" << dirty_earl +// << " earl:" << earl +// << endl; + + while( true ) + { +// cerr << "Wrapping for union:// while(top)" +// << " earl:" << earl +// << endl; + string nextu = Resolve_FirstManyToOneURL( earl, UnionWrapper_urllist ); + if( nextu.empty() ) + break; + +// cerr << "Wrapping for union:// while(after FirstManyToOneURL)" +// << " earl:" << earl +// << " next:" << nextu +// << endl; + + FerrisURL x = FerrisURL::fromString( nextu ); + UnionWrapper_urllist.push_back( x ); + + +// cerr << "Wrapping for union:// while(top)" +// << " earl:" << earl +// << endl; +// int colonpos = earl.find(":"); +// if( colonpos == string::npos ) +// break; + +// // For finding the start of the 3rd and on URL we need to skip one colon +// if( !UnionWrapper_urllist.empty() ) +// colonpos = colonpos + earl.substr( colonpos+1 ).find(":"); +// if( colonpos == string::npos ) +// break; + +// string tmp = earl.substr( 0, colonpos ); +// int secondURLpos = tmp.rfind("/"); +// if( secondURLpos == string::npos ) +// { +// if( !earl.empty() ) +// { +// cerr << "Wrapping for union:// ending while()" +// << " earl:" << earl +// << " colonpos:" << colonpos +// << endl; +// FerrisURL x = FerrisURL::fromString( earl ); +// UnionWrapper_urllist.push_back( x ); +// } +// break; +// } +// string secondURLString = earl.substr( secondURLpos+1 ); + +// cerr << "Wrapping for union:// while()" +// << " earl:" << earl +// << " secondURLString:" << secondURLString +// << " firstURLString:" << earl.substr( 0, secondURLpos ) +// << endl; + +// FerrisURL x = FerrisURL::fromString( earl.substr( 0, secondURLpos ) ); +// UnionWrapper_urllist.push_back( x ); +// earl = secondURLString; + } + + Resolve_FirstManyToOneURL_PostAssert( UnionWrapper_urllist, 1, unionprefix ); + +// if( UnionWrapper_urllist.empty() ) +// { +// cerr << "no urls for union" << endl; +// } + +// for( urllist_t::iterator uiter = UnionWrapper_urllist.begin(); +// uiter != UnionWrapper_urllist.end(); ++uiter ) +// { +// cerr << "union:// list of contexts:" << uiter->getURL() << endl; +// } + + urllist_t::iterator uiter = UnionWrapper_urllist.begin(); + u = *uiter; + earl = u.getURL(); +// UnionWrapper_urllist.erase( uiter ); + } + + + string setdiffprefix = "setdifference:"; + if( starts_with( earl, setdiffprefix ) ) + { + SetDiffWrapper_Add = true; + string ex; + Resolve_AdjustForWrap( dirty_earl, earl, u, setdiffprefix, ex ); + + while( true ) + { + string nextu = Resolve_FirstManyToOneURL( earl, SetDiffWrapper_urllist ); + if( nextu.empty() ) + break; + + FerrisURL x = FerrisURL::fromString( nextu ); + SetDiffWrapper_urllist.push_back( x ); + } + + Resolve_FirstManyToOneURL_PostAssert( SetDiffWrapper_urllist, 1, setdiffprefix ); + urllist_t::iterator uiter = SetDiffWrapper_urllist.begin(); + u = *uiter; + earl = u.getURL(); + } + + string setintersectionprefix = "setintersection:"; + if( starts_with( earl, setintersectionprefix ) ) + { + SetIntersectWrapper_Add = true; + string ex; + Resolve_AdjustForWrap( dirty_earl, earl, u, setintersectionprefix, ex ); + + while( true ) + { + string nextu = Resolve_FirstManyToOneURL( earl, SetIntersectWrapper_urllist ); + if( nextu.empty() ) + break; + + FerrisURL x = FerrisURL::fromString( nextu ); + SetIntersectWrapper_urllist.push_back( x ); + } + + Resolve_FirstManyToOneURL_PostAssert( SetIntersectWrapper_urllist, 1, setintersectionprefix ); + urllist_t::iterator uiter = SetIntersectWrapper_urllist.begin(); + u = *uiter; + earl = u.getURL(); + } + + + string setsymdiffprefix = "setsymdifference:"; + if( starts_with( earl, setsymdiffprefix ) ) + { + SetSymmetricDiffWrapper_Add = true; + string ex; + Resolve_AdjustForWrap( dirty_earl, earl, u, setsymdiffprefix, ex ); + + while( true ) + { + string nextu = Resolve_FirstManyToOneURL( earl, SetSymmetricDiffWrapper_urllist ); + if( nextu.empty() ) + break; + +// cerr << "Wrapping for symdiff:// while(after FirstManyToOneURL)" +// << " earl:" << earl +// << " next:" << nextu +// << endl; + + FerrisURL x = FerrisURL::fromString( nextu ); + SetSymmetricDiffWrapper_urllist.push_back( x ); + } + + Resolve_FirstManyToOneURL_PostAssert( SetSymmetricDiffWrapper_urllist, 1, setsymdiffprefix ); + urllist_t::iterator uiter = SetSymmetricDiffWrapper_urllist.begin(); + u = *uiter; + earl = u.getURL(); + } + + + string diffprefix = "diff:"; + if( starts_with( earl, diffprefix ) ) + { + DiffWrapper_Add = true; + string ex; + Resolve_AdjustForWrap( dirty_earl, earl, u, diffprefix, ex ); + + while( true ) + { + string nextu = Resolve_FirstManyToOneURL( earl, DiffWrapper_urllist ); + if( nextu.empty() ) + break; + +// cerr << "Wrapping for diff:// while(after FirstManyToOneURL)" +// << " earl:" << earl +// << " next:" << nextu +// << endl; + + FerrisURL x = FerrisURL::fromString( nextu ); + DiffWrapper_urllist.push_back( x ); + } + + Resolve_FirstManyToOneURL_PostAssert( DiffWrapper_urllist, 1, diffprefix ); + urllist_t::iterator uiter = DiffWrapper_urllist.begin(); + u = *uiter; + earl = u.getURL(); + } + +// string urltrprefix = "urltr:"; +// if( starts_with( earl, urltrprefix ) ) +// { +// URLTrWrapper_Add = true; +// string ex; +// Resolve_AdjustForWrap( dirty_earl, earl, u, diffprefix, ex ); + +// while( true ) +// { +// string nextu = Resolve_FirstManyToOneURL( earl, URLTrWrapper_urllist ); +// if( nextu.empty() ) +// break; + +// // cerr << "Wrapping for diff:// while(after FirstManyToOneURL)" +// // << " earl:" << earl +// // << " next:" << nextu +// // << endl; + +// FerrisURL x = FerrisURL::fromString( nextu ); +// URLTrWrapper_urllist.push_back( x ); +// } + +// Resolve_FirstManyToOneURL_PostAssert( URLTrWrapper_urllist, 2, diffprefix ); +// u = URLTrWrapper_urllist.back(); +// earl = u.getURL(); +// } + + + + + + LG_FACTORY_D << "Resolve() dirty_earl:" << dirty_earl << endl; + LG_FACTORY_D << "Resolve() earl:" << earl << endl; + LG_FACTORY_D << "Resolve() u:" << u << endl; + LG_FACTORY_D << "Resolve() rs:" << rs << endl; + + fh_context ret = 0; + +// cerr << "Resolve() internal scheme:" << u.getInternalFerisScheme() +// << " path:" << u.getPath() +// << endl; + + // + // For XPath resolution we want to pass the expression right + // to the xpath:// handler as one string rather than try to + // parse it into a path ourself. + // + if( u.getInternalFerisScheme() == "xpath" && !u.getPath().empty() ) + { + FerrisURL u2 = FerrisURL::fromString( earl ); +// cerr << "Resolve(xpath) internal scheme:" << u2.getInternalFerisScheme() +// << " path:" << u2.getPath() +// << " earl:" << earl +// << endl; + + fh_context xroot = RootContextFactory( u.getInternalFerisScheme(), + "/", + "", + rs ).resolveContext(rs); + ret = xroot->getSubContext( u.getPath() ); + } + else + { +// cerr << "Resolve( non xpath ) scheme:" << u.getInternalFerisScheme() +// << " path:" << u.getPath() +// << endl; + + static const gchar* LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION_ENV = + g_getenv ("LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION"); + bool enableAttributeResolution = rs & ENABLE_ATTRIBUTE_RESOLUTION + || LIBFERRIS_ENABLE_ATTRIBUTE_RESOLUTION_ENV; + + string eaname = ""; + string path = u.getPath(); + if( enableAttributeResolution ) + { + int ampos = path.rfind("@"); + if( string::npos != ampos ) + { + LG_FACTORY_D << "path:" << path << endl; + eaname = path.substr(ampos+1); + path = path.substr(0,ampos); + } + } + + ret = RootContextFactory( u.getInternalFerisScheme(), + "/", + path, + rs ).resolveContext(rs); +// DEBUG_dumpcl("Resolve() after real work" ); + + + if( enableAttributeResolution && !eaname.empty() ) + { + stringstream earlss; + earlss << "branchfs-attributes:" + << ret->getURLScheme() << "/" << ret->getDirPath() + << "/" << eaname + << flush; + LG_FACTORY_D << "brachfs url:" << earlss.str() << endl; + ret = Resolve( earlss.str() ); + } + } + + +// cerr << "Resolve() add cache:" << CacheWrapper_Add +// << " ED:" << CacheWrapper_extraData +// << " earl:" << earl +// << endl; + + if( FilterWrapper_Add ) + { + ret = Factory::MakeFilteredContext( ret, FilterWrapper_FilterObject ); + +// typedef list clist_t; +// clist_t clist; +// { +// fh_context tc = ret; +// while( tc->isParentBound() ) +// { +// clist.push_back( tc ); +// tc = tc->getParent(); +// } +// } + +// fh_context c = getRootOfContext( ret ); +// fh_context fc = Factory::MakeFilteredContext( c, FilterWrapper_FilterObject ); + +// for( clist::reverse_iterator iter = clist.rbegin(); iter != clist.rend(); ++iter ) +// { +// fc = fc->getSubContext( iter->getDirName() ); +// } + } + + + if( SortingWrapper_Add ) + ret = Factory::MakeSortedContext( ret, SortingWrapper_sorter ); + + if( InheritEAWrapper_Add ) + ret = Factory::makeInheritingEAContext( ret ); + + if( CacheWrapper_Add ) + ret = Factory::MakeCachedContext( ret, CacheWrapper_extraData ); + + if( UnionWrapper_Add ) + { + std::list< fh_context > unionContexts; + for( urllist_t::iterator uiter = UnionWrapper_urllist.begin(); + uiter != UnionWrapper_urllist.end(); ++uiter ) + { + unionContexts.push_back( Resolve( uiter->getURL() ) ); + } + fh_context parent = ret->getParent(); + ret = Factory::MakeUnionContext( parent, unionContexts ); + } + + if( SetDiffWrapper_Add ) + { + std::list< fh_context > clist; + for( urllist_t::iterator uiter = SetDiffWrapper_urllist.begin(); + uiter != SetDiffWrapper_urllist.end(); ++uiter ) + { + clist.push_back( Resolve( uiter->getURL() ) ); + } + fh_context parent = ret->getParent(); + ret = Factory::MakeSetDifferenceContext( parent, clist ); + } + + if( SetIntersectWrapper_Add ) + { + std::list< fh_context > clist; + for( urllist_t::iterator uiter = SetIntersectWrapper_urllist.begin(); + uiter != SetIntersectWrapper_urllist.end(); ++uiter ) + { + clist.push_back( Resolve( uiter->getURL() ) ); + } + fh_context parent = ret->getParent(); + ret = Factory::MakeSetIntersectionContext( parent, clist ); + } + + if( SetSymmetricDiffWrapper_Add ) + { + std::list< fh_context > clist; + for( urllist_t::iterator uiter = SetSymmetricDiffWrapper_urllist.begin(); + uiter != SetSymmetricDiffWrapper_urllist.end(); ++uiter ) + { + clist.push_back( Resolve( uiter->getURL() ) ); + } + fh_context parent = ret->getParent(); + ret = Factory::MakeSetSymmetricDifferenceContext( parent, clist ); + } + + if( DiffWrapper_Add ) + { + std::list< fh_context > clist; + for( urllist_t::iterator uiter = DiffWrapper_urllist.begin(); + uiter != DiffWrapper_urllist.end(); ++uiter ) + { + clist.push_front( Resolve( uiter->getURL() ) ); + } + fh_context parent = ret->getParent(); + ret = Factory::MakeDiffContext( parent, clist ); + } + +// if( URLTrWrapper_Add ) +// { +// std::list< fh_context > clist; +// for( urllist_t::iterator uiter = URLTrWrapper_urllist.begin(); +// uiter != URLTrWrapper_urllist.end(); ++uiter ) +// { +// clist.push_front( Resolve( uiter->getURL() ) ); +// } +// fh_context parent = ret->getParent(); +// ret = Factory::MakeDiffContext( parent, clist ); +// } + + + +// cerr << "Resolve(end) add cache:" << CacheWrapper_Add +// << " ED:" << CacheWrapper_extraData +// << " earl:" << earl +// << " ret:" << ret->getURL() +// << " ret.sz:" << ret->SubContextCount() +// << endl; + + return ret; + } + + +// namespace Factory +// { + +// fh_context Resolve( ConfigLocation cl, std::string extrapath ) +// { +// fh_stringstream ss; +// switch( cl ) +// { +// case CONFIGLOC_EVENTBIND: +// ss << "~/.ferris/eventbind" << extrapath; +// break; + +// case CONFIGLOC_MIMEBIND: +// ss << "~/.ferris/mimebind" << extrapath; +// break; + +// case CONFIGLOC_APPS: +// ss << "~/.ferris/apps" << extrapath; +// break; + +// case CONFIGLOC_ICONS: +// ss << "~/.ferris/icons" << extrapath; +// break; +// } + +// if( tostr(ss).length() ) +// { +// return ::Ferris::Resolve( tostr(ss) ); +// } + +// ss << "Unknown config location:" << (int)cl << endl; +// Throw_UnknownConfigLocation( tostr(ss), 0 ); +// } + +// fh_context ResolveMime( std::string majort, std::string minort ) +// { +// fh_stringstream ss; +// ss << "/" << majort << "/" << minort; +// return Resolve( CONFIGLOC_MIMEBIND, tostr(ss) ); +// } + +// fh_context ResolveIcon( std::string s ) +// { +// fh_stringstream ss; +// ss << "/" << s; +// return Resolve( CONFIGLOC_ICONS, tostr(ss) ); +// } + + +// }; + + + + + +// fh_context Resolve( const std::string& module, +// const std::string& root, +// const std::string& path ) +// { +// return RootContextFactory( module, root, path ).resolveContext(); +// } + +// static fh_context getDotFerris() +// { +// fh_stringstream rss; +// rss << Shell::getHomeDirPath_nochecks() << "/.ferris"; +// cerr << "getDotFerris() rss:" << tostr(rss) << endl; +// return Resolve( "Native", "/", tostr(rss) ); +// } + +// static void unlinkDotFerrisFile( const std::string& s ) +// { +// fh_stringstream rss; +// rss << Shell::getHomeDirPath_nochecks() << "/.ferris/" << s; +// cerr << "unlink() :" << tostr(rss) << endl; +// unlink( tostr(rss).c_str() ); +// } + +// const string MEDALLION_TEMP_NAME = "medallion_temp.xml"; + +// fh_context fromMedallion( std::string medstr ) +// { +// fh_context dfc = getDotFerris(); + +// LG_FACTORY_D << "fromMedallion(string) medstr:" << medstr << endl; +// LG_FACTORY_D << "dfc path:" << dfc->getDirPath() << endl; + +// fh_mdcontext md = new f_mdcontext(); +// md->setAttr( "CreateObjectType", "File" ); +// unlinkDotFerrisFile( MEDALLION_TEMP_NAME ); +// fh_context medc = dfc->createSubContext( MEDALLION_TEMP_NAME, md ); + +// LG_FACTORY_D << "medc path:" << medc->getDirPath() << endl; + +// { +// fh_iostream tcss = medc->getIOStream(); +// tcss << medstr; +// } + +// return fromMedallion( medc ); +// } + +// fh_context fromMedallion( fh_context c ) +// { +// LG_FACTORY_D << "fromMedallion(c) c.path:" << c->getDirPath() << endl; + +// string s; + +// while( c->getDirName() != "medallion" ) +// { +// c = c->getSubContext( "medallion" ); +// } + + +// string rccName = getStrAttr( c, "medrootcontext", ""); +// string root = getStrAttr( c, "medroot", ""); +// string path = getStrAttr( c, "medpath", ""); + +// LG_FACTORY_D << "rootcontext:" << rccName << endl; +// LG_FACTORY_D << " root:" << root << endl; +// LG_FACTORY_D << " path:" << path << endl; +// sleep(3); + +// return Resolve( rccName, root, path ); + + +// // string s; +// // fh_istream iss = c->getIStream(); +// // fh_stringstream ss; + +// // std::copy( std::istreambuf_iterator(iss), +// // std::istreambuf_iterator(), +// // std::ostreambuf_iterator(ss)); + +// // return fromMedallion( tostr(ss) ); +// } + + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + + static unsigned long globalDisableExpansion = 0; + + const fh_rex& hasShellGlobRegex() + { + static const fh_rex rex = toregexh( "(\\*|\\?|\\[|\\]|[?*+!@]\\()" ); + return rex; + } + + + static stringlist_t& expandShellGlobs( stringlist_t& ret, + stringlist_t& splitPath, + stringlist_t::iterator iter, + stringlist_t::iterator& e, + fh_context c ) + { + if( iter == e ) + { + LG_GLOB_D << "expandShellGlobs(iter==e) c:" << c->getURL() << endl; + ret.push_back( c->getURL() ); + return ret; + } + + LG_GLOB_D << "expandShellGlobs(called) c:" << c->getURL() << endl; + LG_GLOB_D << "expandShellGlobs(called) iter:" << *iter << endl; + + stringlist_t::iterator iternext = iter; + ++iternext; + + if( !regex_search( *iter, hasShellGlobRegex(), boost::match_any ) ) + { + LG_GLOB_D << "expandShellGlobs(no glob) c:" << c->getURL() << endl; + fh_context nextc = 0; + try + { + nextc = c->getSubContext( *iter ); + } + catch( exception& e ) + { + c->read(true); + nextc = c->getSubContext( *iter ); + if( !nextc ) + throw; + } + LG_GLOB_D << "expandShellGlobs(no glob) nc:" << nextc->getURL() << endl; + return expandShellGlobs( ret, splitPath, iternext, e, nextc ); + } + + if( *iter == "*" ) + c->read(); + bool haveFoundMatch = false; + Context::SubContextNames_t& scn = c->getSubContextNames(); + Context::SubContextNames_t::iterator si = scn.begin(); + Context::SubContextNames_t::iterator se = scn.end(); + if( si == se ) + { + c->read(); + scn = c->getSubContextNames(); + si = scn.begin(); + se = scn.end(); + } + string pattern = *iter; + int flags = FNM_PERIOD; + LG_GLOB_D << "expandShellGlobs(si==se):" << (si==se) << " pattern:" << pattern << endl; + + for( ; si != se; ++si ) + { + string filename = *si; + int rc = fnmatch( pattern.c_str(), filename.c_str(), flags ); + if( !rc ) + { + LG_GLOB_D << "expandShellGlobs(globm) c:" << c->getURL() << endl; + fh_context nextc = c->getSubContext( filename ); + LG_GLOB_D << "expandShellGlobs(globm) nc:" << nextc->getURL() << endl; + + // If we have something we can't decend into + // and we have more path to go then this can't be a match + if( !isTrue( getStrAttr( nextc, "is-dir", "false" ))) + { + if( iternext != e ) + continue; + } + haveFoundMatch = true; + expandShellGlobs( ret, splitPath, iternext, e, nextc ); + } + else if( rc == FNM_NOMATCH ) + {} + else + { + LG_GLOB_D << "Error globbing at:" << *iter << endl; + return ret; + } + } + + // + // allow something like xsltfs://foo/bar?params/subdir1 + // to resolve bar?params as the directory name + // + if( !haveFoundMatch ) + { +// if( starts_with( c->getURL(), "xsltfs" ) ) +// { +// } + + LG_GLOB_D << "expandShellGlobs(no match) c:" << c->getURL() << endl; + fh_context nextc = c->getSubContext( *iter ); + LG_GLOB_D << "expandShellGlobs(no match) nc:" << nextc->getURL() << endl; + return expandShellGlobs( ret, splitPath, iternext, e, nextc ); + } + + return ret; + } + + + stringlist_t& expandShellGlobs( stringlist_t& ret, const std::string& s ) + { + bool DisableExpansion = globalDisableExpansion; + + LG_GLOB_D << "expandShellGlobs(0) DisableExpansion:" << DisableExpansion << endl; + + static bool LIBFERRIS_DISABLE_GLOBBING = false; + static bool LIBFERRIS_DISABLE_GLOBBING_SETUP = false; + if( !LIBFERRIS_DISABLE_GLOBBING_SETUP ) + { + LIBFERRIS_DISABLE_GLOBBING_SETUP = true; + if( const gchar* p = g_getenv ("LIBFERRIS_DISABLE_GLOBBING") ) + { + if( strlen(p) && p[0]=='1' ) + { + LIBFERRIS_DISABLE_GLOBBING = true; + } + } + } + + if( !DisableExpansion ) + { + if( starts_with( s, "xpath:" ) ) + DisableExpansion = true; + if( starts_with( s, "http:" ) ) + DisableExpansion = true; + } + + LG_GLOB_D << "expandShellGlobs(1) DisableExpansion:" << DisableExpansion << endl; + + // if there are no special characters then we are already done. + if( !DisableExpansion ) + { + if( !regex_search( s, hasShellGlobRegex(), boost::match_any ) ) + { + DisableExpansion = true; + } + } + + LG_GLOB_D << "expandShellGlobs(2) DisableExpansion:" << DisableExpansion << endl; + + // see if the user has settings to not expand this URL + if( !DisableExpansion ) + { + if( isTrue( getEDBString( FDB_GENERAL, + CFG_GLOB_SKIP_FILE_URLS_K, + CFG_GLOB_SKIP_FILE_URLS_DEFAULT ))) + { +// // disable for anything that is absolute, relative or a file:// +// // url +// static const fh_rex rex = toregexh( "^[A-z-]+:(?. + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Resolver.hh,v 1.5 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_RESOLVER_H_ +#define _ALREADY_INCLUDED_FERRIS_RESOLVER_H_ + + +namespace Ferris +{ +#ifdef BUILDING_LIBFERRIS + #pragma GCC visibility push(default) +#endif + + enum ResolveStyle { + RESOLVE_CLOSEST = (1<<1), //< Closest match to the context sought + RESOLVE_PARENT = (1<<2), //< Parent of the context sought + RESOLVE_EXACT = (1<<3), //< Exactly match the required context + ENABLE_ATTRIBUTE_RESOLUTION = (1<<4) //< Allow path/to/file@attr to select an EA + }; + + fh_context Resolve( const std::string earl, ResolveStyle rs = RESOLVE_EXACT ); + + enum { + RESOLVEEX_UNROLL_LINKS = (1<<1) //< follow links and return non-link result + }; + + /** + * Extended Resolve() method added in ferris 1.1.7 to allow inlining of some other + * calls that would normally happen after a Resolve(). + * + * like the other Resolve() method but also processes the RESOLVEEX param in ex. + * if RESOLVEEX_UNROLL_LINKS is set then soft/hard links + * are unrolled so that the context returned is not a link. + * + * This method should allow other flags to be added without breaking ABI. + */ + fh_context Resolve( const std::string earl, ResolveStyle rs, int ex ); + +// namespace Factory +// { +// enum ConfigLocation +// { +// CONFIGLOC_EVENTBIND = (1<<1), +// CONFIGLOC_MIMEBIND = (1<<2), +// CONFIGLOC_APPS = (1<<3), +// CONFIGLOC_ICONS = (1<<4), +// CONFIGLOC_ENUMSIZE = (1<<5) +// }; +// fh_context Resolve( ConfigLocation cl, std::string extrapath ); +// fh_context ResolveMime( std::string majort, std::string minort ); +// fh_context ResolveIcon( std::string s ); +// }; + + /** + * Shells such as bash do not natively understand all URLs that libferris + * does, so this method allows libferris to expand something like + * pg://localhost/mydb/foo/file* + * into a list of matching URLs similar to the work that bash does + * for /tmp/foo* + */ + stringlist_t& expandShellGlobs( stringlist_t& ret, const std::string& s ); + +#ifdef BUILDING_LIBFERRIS + #pragma GCC visibility pop +#endif +}; + +#include +namespace Ferris +{ + FERRISEXP_API struct ::poptOption* getExpandShellGlobsPopTable(); + FERRISEXP_API stringlist_t& expandShellGlobs( stringlist_t& ret, poptContext& optCon ); +}; +#define FERRIS_SHELL_GLOB_POPT_OPTIONS \ +{ 0, 0, POPT_ARG_INCLUDE_TABLE,::Ferris::getExpandShellGlobsPopTable(), \ + 0, "Ferris shell glob options:", 0 }, + + +#endif diff --git a/Ferris/Resolver_private.hh b/Ferris/Resolver_private.hh new file mode 100644 index 0000000..b732a6a --- /dev/null +++ b/Ferris/Resolver_private.hh @@ -0,0 +1,329 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Resolver_private.hh,v 1.7 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_RESOLVER_PRIVATE_H_ +#define _ALREADY_INCLUDED_FERRIS_RESOLVER_PRIVATE_H_ + +namespace Ferris +{ + + struct FERRISEXP_GMODAPI FerrisURL + { + std::string scheme; + std::string path; + + std::string getScheme(); + std::string getInternalFerisScheme(); + std::string getPath(); + + std::string tostr(); + std::string getURL(); + + static FerrisURL fromString( const std::string& s ); + }; + + typedef fh_matcher fh_ommatcher; + typedef std::list fh_ommatchers; + + class FERRISEXP_DLLLOCAL RootContextDropper + { + public: + virtual fh_context Brew(RootContextFactory* rf) + throw( RootContextCreationFailed ) = 0; + + /** + * This returns a predicate that if a context matches against then + * an overmounting may be performed using this plugin handler ontop + * of the existing context. + */ + virtual fh_ommatchers GetOverMountMatchers(RootContextFactory* rf) + { + fh_ommatchers ret; + return ret; + } + + /** + * If a context is top level, like http:// ftp:// or file:// then it + * should override this method and return true. The default is false. + * + * Note that this method will become a extern "C" funtion in plugin + * factory libraries and if no such function is present then the default + * is assumed. + * + * Top level context classes appear also under root:// which provides + * a single top node for looking into many different URL schemes. + */ + virtual bool isTopLevel() + { + return false; + } + + /** + * Some overmount formats can never support top level EA so trying + * to overmount then to discover if an attribute is bound or not is + * a waste of time. For example, a directory full of tar.gz files + * with a few .anx and .ogg files the tar files will never be able + * to support an "artist", "license" or "creator" EA to the top level + * context by being overmounted. + */ + virtual bool tryToOverMountToFindEA() + { + return false; + } + + + }; + + + class ContextVFS_RootContextDropper; + class FerrisGPGSignaturesRootContext; + class FerrisBranchRootContext; + +/** + * + * Factory that bootstraps to context objects. + * + *

+ * EXAMPLE USE
+ * 
+ * RootContextFactory fac;
+ * fac.setContextClass( "ffilter" );
+ * fac.AddInfo( RootContextFactory::ROOT, v );
+ * fac.AddInfo( RootContextFactory::PATH, ""   );
+ * fh_context c = fac.resolveContext( RootContextFactory::RESOLVE_EXACT );
+ * 
+ */ + class FERRISEXP_GMODAPI RootContextFactory + { + public: + + typedef ::Ferris::ResolveStyle ResolveStyle; + + private: + /** + * What level of matching we are to perform + */ + ResolveStyle Style; + + public: + + + /** + * Get how the resolution has been currently set. + */ + ResolveStyle getResolveStyle() + { + return Style; + } + + virtual ~RootContextFactory(); + + /** + * Path of the context we seek + * + * Data that can be added with AddInfo + */ + static const std::string PATH; + + /** + * Where to start resolving from within the context. + * + * Data that can be added with AddInfo + */ + static const std::string ROOT; + + + /** + * If a remote resolution is required (a context on another machine) + * then set this to the name/ip address of the remote machine + * + * Data that can be added with AddInfo + */ + static const std::string SERVERNAME; + + protected: + + /** + * We have a tight binding with the dropper for context:// + * and root:// because they both expose what context classes + * are available as a filesystem + */ + friend class ContextVFS_RootContextDropper; + friend class RootContextVFS_RootContextDropper; + friend struct RootRootContext; + friend class FerrisGPGSignaturesRootContext; + friend class FerrisBranchRootContext; + + /** + * What class we are using to make context objects + */ + std::string ContextClass; + + /** + * User params given for the binding process + * + * @see PATH + * @see ROOT + */ + std::map< std::string, std::string > BindData; + + /** + * Used to lookup a dropper from a context class name + */ + typedef std::map< std::string, RootContextDropper* > Droppers_t; + + static Droppers_t& getDroppers(); + + static void ensureGModuleFactoriesLoaded( Droppers_t& droppers ); + + virtual fh_context priv_resolveContext_tryURIAsDirName( fh_context ctx, + const std::string& rdn, + const std::string& rest, + std::pair& split ); + + virtual fh_context priv_resolveContext( + fh_context ctx, + const std::string& rdn, + const std::string& rest + ); + + /** + * Cache of root context objects keyed on the name of the context class. + */ + typedef std::map< std::string, fh_context > RootContextCache_t; + static RootContextCache_t& getRootContextCache(); + + fh_context BaseOverMountContext; + void setBaseOverMountContext( fh_context c ); + + /** + * A struct that is ment to be created on the stack to set the + * setBaseOverMountContext() to a given context and clear the + * overmount context when the object is destroyed. + * + * INTERNAL FERRIS USE ONLY + */ + struct BaseOverMountScope + { + RootContextFactory* f; + BaseOverMountScope( RootContextFactory* _f, const fh_context& c ) + : + f(_f) + { + f->setBaseOverMountContext( c ); + } + + ~BaseOverMountScope() + { + f->setBaseOverMountContext( 0 ); + } + }; + + fh_context findOverMounter_TryDropper( fh_context ctx, + int followLinkTTL, + const std::string& dropperName, + RootContextDropper* dropper, + bool attemptingOverMountOnlyToFindEA ); + + public: + + RootContextFactory(); + + RootContextFactory( const std::string& module, + const std::string& root, + const std::string& path, + ResolveStyle s = RESOLVE_EXACT ); + + void setContextClass( std::string cl ) throw( NoSuchContextClass ); + std::string getContextClass(); + + void AddInfo( std::string key, std::string val ); + + fh_context getRootContext() throw( RootContextCreationFailed ); + fh_context resolveContext_relative_file_path( ResolveStyle s = RESOLVE_EXACT ); + fh_context resolveContext( ResolveStyle s = RESOLVE_EXACT ); + + // For package use only atm. Register a new vfs switch fs + static void Register( std::string CtxName, RootContextDropper* dropper ); + std::string getInfo( std::string key ); + + /* + * Used by context to find an overmounter. + */ + fh_context findOverMounter( fh_context ctx, + int followLinkTTL = 100, + bool attemptingOverMountOnlyToFindEA = false ); + bool hasOverMounter( const fh_context& ctx ); + + const fh_context& getBaseOverMountContext(); + + + static const std::string getRootContextClassName( fh_context c ); + static const std::string getRootContextClassName( const Context* c ); + + static void pushAdditionalRootContextClassName( std::string n, Context* c ); + + }; + +#define STATICLINKED_ROOTCTX_DROPPER( URISCHEME, KLASS ) \ + class FERRISEXP_DLLLOCAL KLASS ## _RootContextDropper \ + : \ + public RootContextDropper \ + { \ + public: \ + KLASS ## _RootContextDropper() \ + { \ + ImplementationDetail::appendToStaticLinkedRootContextNames( URISCHEME ); \ + RootContextFactory::Register( URISCHEME, this ); \ + } \ + \ + fh_context Brew( RootContextFactory* rf ) \ + throw( RootContextCreationFailed ) \ + { \ + static fh_context c = 0; \ + if( !isBound(c) ) \ + { \ + c = new KLASS(); \ + } \ + return c; \ + } \ + }; \ + static KLASS ## _RootContextDropper ___ ## KLASS ## _RootContextDropper; + + +}; +#endif diff --git a/Ferris/RootContext.cpp b/Ferris/RootContext.cpp new file mode 100644 index 0000000..0a0416b --- /dev/null +++ b/Ferris/RootContext.cpp @@ -0,0 +1,419 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RootContext.cpp,v 1.6 2010/09/24 21:30:57 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +// required for NativeVFS_RootContextDropper +#include + + +using namespace std; + +namespace Ferris +{ + struct FERRISEXP_DLLLOCAL RootRootContext : public FakeInternalContext + { + RootRootContext( Context* parent, const std::string& rdn ) + : + FakeInternalContext( parent, rdn ) + { + } + virtual ~RootRootContext() + { + } + + virtual void priv_read() + { + staticDirContentsRAII _raii1( this ); + + if( empty() ) + { + typedef RootContextFactory::Droppers_t Droppers_t; + const Droppers_t& d = RootContextFactory::getDroppers(); + typedef Droppers_t::const_iterator iterT; + RootContextFactory* rfac = new RootContextFactory(); + + for( iterT iter = d.begin(); iter != d.end(); iter++) + { + string urlScheme = iter->first; + + LG_CTX_D << "Testing ctx -->:" << urlScheme << ":<-- " + << " isBound():" << priv_isSubContextBound( urlScheme ) + << endl; + if( priv_isSubContextBound( urlScheme ) || urlScheme == "root" ) + continue; + + if( iter->second->isTopLevel() ) + { + LG_CTX_D << "Adding ctx:" << urlScheme << endl; + RootContextDropper* f = iter->second; + rfac->setContextClass( urlScheme ); + fh_context delegate = f->Brew( rfac ); + LG_CTX_D << "Delegate.rdn:" << delegate->getDirName() << endl; + + Context* child = new RootContext( this, + GetImpl(delegate), + urlScheme ); + Insert( child ); + + // explicit leak here. + child->AddRef(); + child->AddRef(); + RootContextFactory::pushAdditionalRootContextClassName( + urlScheme, GetImpl(delegate) ); + + LG_CTX_D << " Child.name:" << child->getDirName() + << " child.path:" << child->getDirPath() + << " child.url:" << child->getURL() + << " urlScheme:" << urlScheme + << " child:" << toVoid( child ) + << " delegate:" << toVoid( delegate ) + << endl; +// cerr << " Child.name:" << child->getDirName() +// << " child.path:" << child->getDirPath() +// << " child.url:" << child->getURL() +// << " urlScheme:" << urlScheme +// << " child:" << toVoid( child ) +// << " delegate:" << toVoid( delegate ) +// << endl; + +// child->setOverMountContext( delegate ); +// delegate->setCoveredContext( child ); +// child->readOverMount(); + +// delegate->read(); + +// LG_CTX_D << "rrc::read() --- delegate.begin to delegate.end --- " << endl; +// for( Context::iterator ci = delegate->begin(); +// ci != delegate->end(); ++ci ) +// { +// LG_CTX_D << "ci.name:" << (*ci)->getDirName() +// << " ci.url:" << (*ci)->getURL() +// << endl; +// } + } + } + +// dumpOutItems(); + + stringset_t& sl = ImplementationDetail::getStaticLinkedRootContextNames(); + + for( stringset_t::const_iterator si = sl.begin(); si!=sl.end(); ++si ) + { + string urlScheme = *si; + + if( !priv_isSubContextBound( urlScheme ) ) + { +// cerr << "making scheme:" << urlScheme << endl; + + fh_context delegate = Resolve( urlScheme + "://" ); + LG_CTX_D << "Delegate.rdn:" << delegate->getDirName() << endl; + + Context* child = new RootContext( this, + GetImpl(delegate), + urlScheme ); + Insert( child ); + } + } + } + + + + for( Context::iterator ci = begin(); ci != end(); ++ci ) + { + LG_CTX_D << "ci.name:" << (*ci)->getDirName() + << " ci.url:" << (*ci)->getURL() + << endl; + } + fh_context x = getSubContext( "file" ); + LG_CTX_D << "direct test url:" << x->getURL() << endl; + } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /** INIT STUFF ******************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + RootContext::RootContext( Context* parent, + Context* delegate, + const std::string& rdn ) + : + ChainedViewContext( parent, delegate, false, false ) + { + LG_CTX_D << "RootContext() rdn:" << rdn << endl; + if( rdn.empty() ) setContext( parent, delegate->getDirName() ); + else setContext( parent, rdn ); + + SetupEventConnections(); + createStateLessAttributes(); + } + + Context* + RootContext::priv_CreateContext( Context* parent, string rdn ) + { + RootContext* ret = new RootContext( parent, 0 ); + ret->setContext( parent, rdn ); + return ret; + } + +// void +// RootContext::OnExists ( NamingEvent_Exists* ev, string olddn, string newdn ) +// { +// LG_CTX_D << "RootContext::OnExists() olddn:" << olddn +// << " url:" << ev->getSource()->getSubContext( olddn )->getURL() +// << endl; + +// fh_context c = ev->getSource(); +// if( !priv_isSubContextBound( olddn )) +// { +// Insert( GetImpl(c->getSubContext( olddn )) ); +// LG_CTX_D << "RootContext::OnExists() olddn:" << olddn +// << " url:" << ev->getSource()->getSubContext( olddn )->getURL() +// << " inserted." +// << endl; +// } +// } + + void + RootContext::read( bool force ) + { +// if( OverMountContext_Delegate ) +// OverMountContext_Delegate->read(); + + LG_CTX_D << "rc::read(top) force:" << force + << " ReadingDir:" << ReadingDir + << " HaveReadDir:" << HaveReadDir + << endl; + if( OverMountContext_Delegate ) + { + LG_CTX_D << " omc.ReadingDir:" << OverMountContext_Delegate->ReadingDir + << " omc.HaveReadDir:" << OverMountContext_Delegate->HaveReadDir + << endl; + } + + if( ReadingDir ) + return; + if( HaveReadDir && !force ) + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + return; + } + + { + EnsureStartStopReadingIsFiredRAII _raii1( this ); + ReadingDirRAII _raiird1( this, true ); + Delegate->read( force ); + HaveReadDir = 1; + } + + LG_CTX_D << "RootContext::read() --------------- DEBUG starting ------------" << endl; + LG_CTX_D << " this:" << toVoid( this ) << endl; + LG_CTX_D << " omc:" << toVoid( OverMountContext_Delegate ) << endl; + LG_CTX_D << " cc:" << toVoid( CoveredContext ) << endl; + +// dumpOutItems(); + + LG_CTX_D << "RootContext::read() --- this.begin to this.end --- " << endl; + for( Context::iterator ci = begin(); ci != end(); ++ci ) + { + LG_CTX_D << "ci.name:" << (*ci)->getDirName() + << " ci.url:" << (*ci)->getURL() + << endl; + } + + if( OverMountContext_Delegate ) + { + LG_CTX_D << " this.url:" << getURL() << endl; + LG_CTX_D << " omc.url:" << OverMountContext_Delegate->getURL() << endl; +// OverMountContext_Delegate->dumpOutItems(); + LG_CTX_D << "RootContext::read() --- omc.begin to omc.end --- " << endl; + for( Context::iterator ci = OverMountContext_Delegate->begin(); + ci != OverMountContext_Delegate->end(); ++ci ) + { + LG_CTX_D << "ci.name:" << (*ci)->getDirName() + << " ci.url:" << (*ci)->getURL() + << endl; + } + } + + + } + + const std::string& + RootContext::getDirName() const + { + return _NonChainedBase::getDirName(); + } + + string + RootContext::getDirPath() throw (FerrisParentNotSetError) + { + return _NonChainedBase::getDirPath(); + } + + std::string + RootContext::getURL() + { +// LG_CTX_D << "RootContext::getURL() ncb:" << _NonChainedBase::getURL() +// << " del:" << Delegate->getURL() +// << endl; + +// cerr << "RootContext::getURL() ncb:" << _NonChainedBase::getURL() +// << " del:" << Delegate->getURL() +// << endl; + + return _NonChainedBase::getURL(); + } + + std::string + RootContext::getURLScheme() + { +// cerr << "RootContext::getURLScheme()" << endl; + return _Base::getURLScheme(); + } + + + std::set< std::string >& + RootContext::getPreferLocalAttributeNames() + { + static std::set< std::string > ret; + if( ret.empty() ) + { + ret.insert( "name" ); + ret.insert( "path" ); + ret.insert( "url" ); + } + return ret; + } + bool + RootContext::isAttributeLocal( const std::string& s ) + { + std::set< std::string >& localNames = getPreferLocalAttributeNames(); + return localNames.end() != localNames.find( s ); + } + + + std::string + RootContext::private_getStrAttr( const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throwEx ) + { + if( isAttributeLocal( rdn ) ) + return _NonChainedBase::private_getStrAttr( rdn, def, getAllLines, throwEx ); + return _Base::private_getStrAttr( rdn, def, getAllLines, throwEx ); + } + + fh_attribute + RootContext::getAttribute( const std::string& rdn ) throw( NoSuchAttribute ) + { + if( isAttributeLocal( rdn ) ) + return _NonChainedBase::getAttribute( rdn ); + return _Base::getAttribute( rdn ); + } + + bool + RootContext::isAttributeBound( + const std::string& rdn, + bool createIfNotThere ) + throw( NoSuchAttribute ) + { + if( isAttributeLocal( rdn ) ) + return _NonChainedBase::isAttributeBound( rdn, createIfNotThere ); + return _Base::isAttributeBound( rdn, createIfNotThere ); + } + + + + AttributeCollection::AttributeNames_t& + RootContext::getAttributeNames( AttributeNames_t& ret ) + { + AttributeCollection::AttributeNames_t t1; + AttributeCollection::AttributeNames_t t2; + _Base::getAttributeNames( t1 ); + std::set< std::string >& d = getPreferLocalAttributeNames(); + copy( d.begin(), d.end(), back_inserter( t2 )); + return mergeAttributeNames( ret, t1, t2 ); + } + + int + RootContext::getAttributeCount() + { + AttributeNames_t tmp; + getAttributeNames( tmp ); + return tmp.size(); + } + + + class RootContextVFS_RootContextDropper : public RootContextDropper + { + public: + RootContextVFS_RootContextDropper() + { + RootContextFactory::Register("root", this); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context rr = 0; + if( !rr ) + { + rr = new RootRootContext( 0, "/" ); + } + +// for( RootContextFactory::Droppers_t::iterator iter = rf->getDroppers().begin(); +// iter != rf->getDroppers().end(); iter++) +// { +// // LG_CTX_D << "Adding ctx:" << iter->first << endl; +// RootContextDropper* f = iter->second; +// fh_context delegate = f->Brew( 0 ); +// Context* child = new RootContext( rr, +// GetImpl(delegate), +// f ); +// rr->Insert( child ); +// } + + return rr; + } + + + }; + + static RootContextVFS_RootContextDropper ___RootContextVFS_static_init; + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// +}; diff --git a/Ferris/RootContext_private.hh b/Ferris/RootContext_private.hh new file mode 100644 index 0000000..e5ca2f5 --- /dev/null +++ b/Ferris/RootContext_private.hh @@ -0,0 +1,83 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: RootContext_private.hh,v 1.4 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_ROOT_CONTEXT_PRIV_H_ +#define _ALREADY_INCLUDED_FERRIS_ROOT_CONTEXT_PRIV_H_ + +#include +#include +#include + +namespace Ferris +{ + + + class FERRISEXP_DLLLOCAL RootContext : public ChainedViewContext + { + typedef ChainedViewContext _Base; + typedef Context _NonChainedBase; //< lowest superclass which is not under ChainedViewContext + + friend class RootContextFactory; + + Context* priv_CreateContext( Context* parent, std::string rdn ); + + protected: + + std::set< std::string >& getPreferLocalAttributeNames(); + bool isAttributeLocal( const std::string& s ); + virtual std::string private_getStrAttr( const std::string& rdn, + const std::string& def = "", + bool getAllLines = false , + bool throwEx = false ); + + public: + RootContext( Context* parent, + Context* delegate, + const std::string& rdn = "" ); + + + virtual void read( bool force = 0 ); + virtual const std::string& getDirName() const; + virtual std::string getDirPath() throw (FerrisParentNotSetError); + virtual std::string getURL(); + virtual std::string getURLScheme(); + + virtual fh_attribute getAttribute( const std::string& rdn ) throw( NoSuchAttribute ); + virtual AttributeNames_t& getAttributeNames( AttributeNames_t& ret ); + virtual int getAttributeCount(); + virtual bool isAttributeBound( const std::string& rdn, + bool createIfNotThere = true + ) throw( NoSuchAttribute ); + +// virtual void OnExists ( NamingEvent_Exists* ev, std::string olddn, std::string newdn ); + }; + +}; +#endif diff --git a/Ferris/Runner.cpp b/Ferris/Runner.cpp new file mode 100644 index 0000000..ecde321 --- /dev/null +++ b/Ferris/Runner.cpp @@ -0,0 +1,728 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Runner.cpp,v 1.11 2010/11/17 21:30:47 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + + static void childSetupFunctor_null( fh_runner ) + { + } + + + void Ferris_GSpawnChildSetupFunc(gpointer user_data) + { + ::Ferris::Runner* r = (::Ferris::Runner*)user_data; + r->SetupFunc(); + } + + + char** + stringvec_to_CSTRvec( const vector& v ) + { + int l = v.size(); + int i = 0; + + char** ret = g_new0(char*, l+2 ); + for( i=0; i < l; ++i ) + { + ret[i] = g_strdup(v[i].c_str()); + } + + ret[i] = 0; + return ret; + } + + vector + CSTRvec_to_stringvec( char** cv ) + { + vector ret; + + if( cv ) + { + char** p = &cv[0]; + while( *p ) + { + ret.push_back( *p ); + ++p; + } + } + + return ret; + } + + static fh_istream null_runner_async_functor( fh_runner r, fh_istream ret ) + { + return ret; + } + + + Runner::Runner() + : + argvCSTR(0), + envpCSTR(0), + SpawnFlags( GSpawnFlags(G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_SEARCH_PATH) ), + ConnectStdIn(false), + InPipeFd(-1), + OutPipeFd(-1), + ErrPipeFd(-1), + pid(0), + myerror(0), + WorkingDir("/tmp"), + HaveWaitedForProcess( false ), + InhertENV( true ), + m_stdoutFunctor( null_runner_async_functor ), + m_stdoutFunctorUsed( false ), + m_stdoutAsyncHandler( new AsyncIOHandler() ), + m_childSetupFunctor( childSetupFunctor_null ), + m_Connect_ChildStdOut_To_ParentStdOut( false ), + m_Connect_ChildStdErr_To_ParentStdErr( false ) + { + setWaitTimeOut( 120 ); + } + + + Runner::~Runner() + { + LG_EAIDX_D << "~Runner()" << endl; +/// cerr << "~Runner()" << endl; + m_stdoutAsyncHandler->release(); + clearMyError(); + } + + Runner::Runner( const Runner& r ) + { + argvCSTR = 0; + envpCSTR = 0; + SpawnFlags = r.SpawnFlags; + ConnectStdIn = r.ConnectStdIn; + InPipeFd = r.InPipeFd; + OutPipeFd = r.OutPipeFd; + ErrPipeFd = r.ErrPipeFd; + pid = r.pid; + myerror = 0; + WorkingDir = r.WorkingDir; + HaveWaitedForProcess = r.HaveWaitedForProcess; + InhertENV = r.InhertENV; + WaitTimeOut = r.WaitTimeOut; + ExitStatus = r.ExitStatus; + m_stdoutFunctor = r.m_stdoutFunctor; + m_stdoutFunctorUsed = r.m_stdoutFunctorUsed; + m_stdoutAsyncHandler = r.m_stdoutAsyncHandler; + m_childSetupFunctor = r.m_childSetupFunctor; + m_Connect_ChildStdOut_To_ParentStdOut = r.m_Connect_ChildStdOut_To_ParentStdOut; + m_Connect_ChildStdErr_To_ParentStdErr = r.m_Connect_ChildStdErr_To_ParentStdErr; + + copy( r.Argv.begin(), r.Argv.end(), back_inserter(Argv) ); + copy( r.Envp.begin(), r.Envp.end(), back_inserter(Envp) ); + } + + Runner& + Runner::operator=( const Runner& r ) + { + if( this != &r ) + { + argvCSTR = 0; + envpCSTR = 0; + SpawnFlags = r.SpawnFlags; + ConnectStdIn = r.ConnectStdIn; + InPipeFd = r.InPipeFd; + OutPipeFd = r.OutPipeFd; + ErrPipeFd = r.ErrPipeFd; + pid = r.pid; + myerror = 0; + WorkingDir = r.WorkingDir; + HaveWaitedForProcess = r.HaveWaitedForProcess; + InhertENV = r.InhertENV; + WaitTimeOut = r.WaitTimeOut; + ExitStatus = r.ExitStatus; + m_stdoutFunctor = r.m_stdoutFunctor; + m_stdoutFunctorUsed = r.m_stdoutFunctorUsed; + m_stdoutAsyncHandler = r.m_stdoutAsyncHandler; + m_childSetupFunctor = r.m_childSetupFunctor; + m_Connect_ChildStdOut_To_ParentStdOut = r.m_Connect_ChildStdOut_To_ParentStdOut; + m_Connect_ChildStdErr_To_ParentStdErr = r.m_Connect_ChildStdErr_To_ParentStdErr; + + copy( r.Argv.begin(), r.Argv.end(), back_inserter(Argv) ); + copy( r.Envp.begin(), r.Envp.end(), back_inserter(Envp) ); + } + return *this; + } + + + void + Runner::setCommandLine( const std::string& cmdline ) + { + gint argc = 0; + gchar** c_argv = 0; + GError *err = 0; + + gboolean rc = g_shell_parse_argv( cmdline.c_str(), &argc, &c_argv, &err ); + if( !rc ) + { + fh_stringstream ss; + ss << "Error passing cmdline:" << cmdline << " msg:" << err->message; + Throw_ParseError( tostr(ss), 0 ); + } + +// cerr << "cmdline:" << cmdline << endl; +// cerr << "argc:" << argc << endl; + + Argv.clear(); + Argv = CSTRvec_to_stringvec( c_argv ); + g_strfreev( c_argv ); + } + + void + Runner::pushCommandLineArg( const std::string& a ) + { + Argv.push_back( a ); + } + + + + Runner::ArgArray_t& + Runner::getArgv() + { + return Argv; + } + + Runner::ArgArray_t& + Runner::getEnvp() + { + return Envp; + } + + + void + Runner::argvPushPath( const std::string& v ) + { +// if( contains( v, " " ) ) +// { +// stringstream ss; +// ss << "\"" << v << "\""; +// getArgv().push_back( ss.str() ); +// } +// else + { + getArgv().push_back( v ); + } + } + + + + void + Runner::SetupFunc() + { + fh_runner r = this; + m_childSetupFunctor( r ); + } + + void + Runner::setWorkingDir( std::string v ) + { + WorkingDir = v; + } + + void + Runner::setInheritENV( bool v ) + { + InhertENV = v; + } + + + void + Runner::setSpawnFlags( GSpawnFlags v ) + { + SpawnFlags = v; + } + + GSpawnFlags + Runner::getSpawnFlags() + { + return SpawnFlags; + } + + + + fh_ostream + Runner::getStdIn( bool AutoCloseFDOnStreamBufDtor ) + { + return ::Ferris::Factory::MakeFdOStream( InPipeFd, AutoCloseFDOnStreamBufDtor ); + } + + fh_istream + Runner::getStdOut( bool AutoCloseFDOnStreamBufDtor ) + { + return ::Ferris::Factory::MakeFdIStream( OutPipeFd, AutoCloseFDOnStreamBufDtor ); + } + + fh_istream + Runner::getStdErr( bool AutoCloseFDOnStreamBufDtor ) + { + return ::Ferris::Factory::MakeFdIStream( ErrPipeFd, AutoCloseFDOnStreamBufDtor ); + } + + int + Runner::getStdInFd() + { + return InPipeFd; + } + + int + Runner::getStdOutFd() + { + return OutPipeFd; + } + + int + Runner::getStdErrFd() + { + return ErrPipeFd; + } + + pid_t + Runner::getChildProcessID() + { + return pid; + } + + void + Runner::signalChild( int sig ) + { + kill( pid, sig ); + } + + void + Runner::killChild() + { + signalChild( 9 ); + } + + + void + Runner::setExitStatus( gint status ) + { +// cerr << "Runner::setExitStatus() st:" << status << endl; + + if(!(ConnectStdIn == false)) close(InPipeFd); + if(!(SpawnFlags & G_SPAWN_STDOUT_TO_DEV_NULL)) close(OutPipeFd); + if(!(SpawnFlags & G_SPAWN_STDERR_TO_DEV_NULL)) close(ErrPipeFd); + m_stdoutAsyncHandler->disconnect(); + + ExitStatus = status; + HaveWaitedForProcess = true; + } + + void + Runner::closeChildStdOut() + { + if( OutPipeFd < 0 ) + return; + + if(!(SpawnFlags & G_SPAWN_STDOUT_TO_DEV_NULL)) close(OutPipeFd); + OutPipeFd = -1; + } + void + Runner::closeChildStdErr() + { + if( ErrPipeFd < 0 ) + return; + + if(!(SpawnFlags & G_SPAWN_STDERR_TO_DEV_NULL)) close(ErrPipeFd); + ErrPipeFd = -1; + } + void + Runner::closeChildStdIn() + { + if( InPipeFd < 0 ) + return; + + if(!(ConnectStdIn == false)) close(InPipeFd); + InPipeFd = -1; + } + + + + gint + Runner::getExitStatus() + { + LG_RUNNER_D << "Runner::getExitStatus()" + << " HaveWaitedForProcess:" << HaveWaitedForProcess + << " WaitTimeOut:" << WaitTimeOut + << " pid:" << pid + << endl; + +// /* Try to force the local filehandles out of scope */ +// if(!(ConnectStdIn == false)) close(InPipeFd); +// if(!(SpawnFlags & G_SPAWN_STDOUT_TO_DEV_NULL)) close(OutPipeFd); +// if(!(SpawnFlags & G_SPAWN_STDERR_TO_DEV_NULL)) close(ErrPipeFd); + /* Try to force the local filehandles out of scope */ + if(!(ConnectStdIn == false)) close(InPipeFd); + if(!(SpawnFlags & G_SPAWN_STDOUT_TO_DEV_NULL)) fsync(OutPipeFd); + if(!(SpawnFlags & G_SPAWN_STDERR_TO_DEV_NULL)) fsync(ErrPipeFd); + + /* wait for the subprocess */ + if( !HaveWaitedForProcess ) + { + int status = 0; + bool virgin = true; + pid_t rc = -1; + int WaitTimeOutRemaining = WaitTimeOut; + + LG_RUNNER_D << "About to wait for child pid:" << pid << endl; + HaveWaitedForProcess = true; + ExitStatus = 0; + errno = 0; + + while( rc < 0 && (virgin || errno == EINTR || WaitTimeOutRemaining) ) + { + virgin = false; + + LG_RUNNER_D << "calling waitpid() pid:" << pid << endl; + + pid_t rc = waitpid( pid, &status, WNOHANG ); +// pid_t rc = waitpid( pid, &status, 0 ); + int errnocache = errno; + + LG_RUNNER_D << "waitpid() status:" << status + << " rc:" << rc + << " exit:" << WEXITSTATUS(status) + << " errno:" << errno + << " errstr:" << errnum_to_string("", errnocache ) + << endl; + + if( rc == 0 ) + { + /* The child is not ready yet */ + if( !WaitTimeOutRemaining ) + { + stringstream ss; + ss << "Runner::getExitStatus(), time ran out waiting for the subprocess" + << " pid:" << pid + << endl; + Throw_FerrisWaitTimedOut( tostr(ss), 0 ); + } + + sleep( 1 ); + --WaitTimeOutRemaining; + rc = -1; + + LG_RUNNER_D << "About to wait again after decrementing the" + << " total time left:" << WaitTimeOutRemaining << endl; + continue; + } + else if( rc < 0 ) + { + /* Why did we fail? */ + LG_RUNNER_D << "waiting failed! errnocache:" << errnocache << endl; + + if (errnocache == EINTR) + { + LG_RUNNER_D << "due to interupt during system call, retrying" << endl; + continue; + } + else if (errnocache == ECHILD) + { + LG_RUNNER_ER << "getExitStatus(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program using class Runner; either don't request the exit status, or don't set the SIGCHLD action." << endl; + } + else + { + LG_RUNNER_ER << "getExitStatus(), Unexpected error." << endl; + } + } + else + { + /* waitpid was ok, get the exit status for a normal exit or + * return 1 for a strange client exit. + */ + if( WIFEXITED( status ) ) + { + ExitStatus = WEXITSTATUS(status); + } + else + { + ExitStatus = 1; + } + LG_RUNNER_D << "waited, exit status:" << ExitStatus << endl; + break; + } + } + } + + m_stdoutAsyncHandler->disconnect(); + + LG_RUNNER_D << "exit status:" << ExitStatus << endl; + return ExitStatus; + } + + void + Runner::setConnectStdIn( bool v ) + { + ConnectStdIn = v; + } + + void + Runner::setWaitTimeOut( int v ) + { + WaitTimeOut = v; + } + + void + Runner::clearMyError() + { + if( myerror != NULL ) + { + g_error_free( myerror ); + myerror = NULL; + } + } + + string + Runner::getErrorString() + { + if( myerror ) + { + stringstream ss; + ss << "GError, " << myerror->message << endl; + return tostr(ss); + } + return ""; + } + + void + Runner::setConnect_ChildStdOut_To_ParentStdOut( bool v ) + { + m_Connect_ChildStdOut_To_ParentStdOut = v; + } + + void + Runner::setConnect_ChildStdErr_To_ParentStdErr( bool v ) + { + m_Connect_ChildStdErr_To_ParentStdErr = v; + } + + + + void + Runner::operator()() + { + argvCSTR = stringvec_to_CSTRvec( getArgv() ); + envpCSTR = stringvec_to_CSTRvec( getEnvp() ); + + clearMyError(); + + HaveWaitedForProcess = false; + ExitStatus = 0; + + LG_RUNNER_D << "Runner::operator() wd:" << WorkingDir + << " SpawnFlags:" << SpawnFlags + << " pid:" << pid + << " ConnectStdIn:" << ConnectStdIn + << " InhertENV:" << InhertENV + << endl; + LG_RUNNER_D << "Runner::operator() desc:" << getDescription() << endl; + { + char** p = argvCSTR; + while( *p ) + { + LG_RUNNER_D << "Runner::operator() p:" << *p << endl; + ++p; + } + } + + bool ret = g_spawn_async_with_pipes( + WorkingDir.c_str(), + argvCSTR, + InhertENV ? NULL : envpCSTR, + SpawnFlags, + Ferris_GSpawnChildSetupFunc, (void*)this, + &pid, + (ConnectStdIn == false) ? NULL : &InPipeFd, + m_Connect_ChildStdOut_To_ParentStdOut | + (SpawnFlags & G_SPAWN_STDOUT_TO_DEV_NULL) ? NULL : &OutPipeFd, + m_Connect_ChildStdErr_To_ParentStdErr | + (SpawnFlags & G_SPAWN_STDERR_TO_DEV_NULL) ? NULL : &ErrPipeFd, + &myerror); + + if(argvCSTR) g_strfreev( argvCSTR ); + if(envpCSTR) g_strfreev( envpCSTR ); + + if( !ret ) + { + fh_stringstream ss; + ss << "Error running command:" << getDescription(); + Throw_ProgramSpawn( tostr(ss), 0 ); + } + + if( m_stdoutFunctorUsed ) + { + m_stdoutAsyncHandler->release(); + m_stdoutAsyncHandler->attach( getStdOutFd() ); + m_stdoutAsyncHandler->setFunctor( + AsyncIOHandler::AsyncIOFunctor_t( this, &_Self::stdoutAsyncFunctor )); + } + } + + fh_istream + Runner::stdoutAsyncFunctor( fh_aiohandler aio, fh_istream iss ) + { + fh_runner r = this; + return m_stdoutFunctor( r, iss ); + } + + + + void + Runner::Run() + { + operator()(); + } + + fh_istream + Runner::RunWithStdoutAsReadablePipe() + { + setConnectStdIn( false ); + + GSpawnFlags spawnflags = getSpawnFlags(); + spawnflags = GSpawnFlags( spawnflags | G_SPAWN_STDERR_TO_DEV_NULL ); + spawnflags = GSpawnFlags( spawnflags & (~G_SPAWN_DO_NOT_REAP_CHILD) ); + setSpawnFlags( spawnflags ); + + Run(); + fh_istream ret = getStdOut(); + return ret; + } + + + + std::string + Runner::getDescription() + { + int i=0; + fh_stringstream ss; + + ss << " WorkingDir:" << WorkingDir + << " WaitTimeOut:" << WaitTimeOut + << " SpawnFlags:" << SpawnFlags + << " HaveWaitedForProcess:" << HaveWaitedForProcess + << " ExitStatus:" << ExitStatus + << " ConnectStdIn:" << ConnectStdIn + << " InhertENV:" << InhertENV + << " InPipeFd:" << InPipeFd + << " OutPipeFd:" << OutPipeFd + << " ErrPipeFd:" << ErrPipeFd + << " pid:" << pid + << " "; + ss << getErrorString(); + + i=0; + for( ArgArray_t::iterator iter = Argv.begin(); iter != Argv.end(); ++iter, ++i ) + { + ss << " argv[" << i << "]:" << *iter; + } + i=0; + for( ArgArray_t::iterator iter = Envp.begin(); iter != Envp.end(); ++iter, ++i ) + { + ss << " env[" << i << "]:" << *iter; + } + return tostr(ss); + } + + void + Runner::setAsyncStdOutFunctor( Runner_AsyncIOFunctor_t x ) + { + m_stdoutFunctor = x; + m_stdoutFunctorUsed = true; + } + + void + Runner::setChildSetupFunctor( const ChildSetupFunctor_t& f ) + { + m_childSetupFunctor = f; + } + + + template< class T > + T copyTo( fh_istream iss, T oss ) + { + copy( istreambuf_iterator(iss), + istreambuf_iterator(), + ostreambuf_iterator(oss)); + oss << flush; + return oss; + } + + int + Runner::executeAndReturnStdOut( std::string& ret ) + { + LG_RUNNER_D << "executeAndReturnStdOut()" << endl; + + setSpawnFlags( GSpawnFlags( getSpawnFlags() + | G_SPAWN_STDERR_TO_DEV_NULL + | G_SPAWN_DO_NOT_REAP_CHILD + | G_SPAWN_SEARCH_PATH) ); + + Run(); + fh_stringstream ss; + LG_RUNNER_D << "OutPipeFd:" << OutPipeFd << endl; + + fh_istream iss = getStdOut(); + copyTo( iss, ss ); + // copy( istreambuf_iterator(iss), + // istreambuf_iterator(), + // ostreambuf_iterator(ss)); + + ret = ss.str(); + LG_RUNNER_D << "executeAndReturnStdOut() ret.sz:" << ret.length() << endl; + + gint e = getExitStatus(); + LG_RUNNER_D << "executeAndReturnStdOut() e:" << e << endl; + return e; + } + + namespace Private + { + void attachStreamCollector( const fh_runner& r, + const Runner_AsyncIOFunctor_t& f ) + { + r->setAsyncStdOutFunctor( f ); + } + }; + +}; diff --git a/Ferris/Runner.hh b/Ferris/Runner.hh new file mode 100644 index 0000000..9c35cab --- /dev/null +++ b/Ferris/Runner.hh @@ -0,0 +1,220 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Runner.hh,v 1.10 2010/11/17 21:30:47 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_RUNNER_H_ +#define _ALREADY_INCLUDED_FERRIS_RUNNER_H_ + +#include + +#include +#include +#include +#include +#include +#include + +namespace Ferris +{ + namespace Private + { + FERRISEXP_API void attachStreamCollector( const fh_runner& r, + const Runner_AsyncIOFunctor_t& x ); + }; +}; + +#include + +#include + +#include +#include + + +namespace Ferris +{ + FERRISEXP_API char** stringvec_to_CSTRvec( const std::vector& v ); + + + class FERRISEXP_API Runner + : + public Handlable + { + typedef Runner _Self; + + public: + + typedef std::vector ArgArray_t; +// typedef Loki::Functor< fh_istream, +// LOKI_TYPELIST_2( fh_runner, fh_istream ) > AsyncIOFunctor_t; +#ifndef LIBFERRIS_INTERNAL_COMPILING_SWIG_WRAPPER + + private: + + + std::string WorkingDir; + ArgArray_t Argv; + ArgArray_t Envp; + gchar **argvCSTR; + gchar **envpCSTR; + + int WaitTimeOut; + GSpawnFlags SpawnFlags; + bool HaveWaitedForProcess; + gint ExitStatus; + bool ConnectStdIn; + GError* myerror; + bool InhertENV; + + gint InPipeFd; + gint OutPipeFd; + gint ErrPipeFd; + + gint pid; + + bool m_Connect_ChildStdOut_To_ParentStdOut; + bool m_Connect_ChildStdErr_To_ParentStdErr; + + Runner_AsyncIOFunctor_t m_stdoutFunctor; + bool m_stdoutFunctorUsed; + fh_aiohandler m_stdoutAsyncHandler; + fh_istream stdoutAsyncFunctor( fh_aiohandler aio, fh_istream iss ); + + + friend void Ferris_GSpawnChildSetupFunc(gpointer user_data); + void SetupFunc(); + + void clearMyError(); + +#endif + public: + + Runner(); + virtual ~Runner(); + Runner( const Runner& ); + Runner& operator=( const Runner& ); + + void setCommandLine( const std::string& cmdline ); + void pushCommandLineArg( const std::string& a ); + ArgArray_t& getArgv(); + ArgArray_t& getEnvp(); + + void argvPushPath( const std::string& v ); + + + void setSpawnFlags( GSpawnFlags v ); + GSpawnFlags getSpawnFlags(); + void setWorkingDir( std::string v ); + + fh_ostream getStdIn( bool AutoCloseFDOnStreamBufDtor = true ); + fh_istream getStdOut( bool AutoCloseFDOnStreamBufDtor = true ); + fh_istream getStdErr( bool AutoCloseFDOnStreamBufDtor = true ); + + int getStdInFd(); + int getStdOutFd(); + int getStdErrFd(); + + pid_t getChildProcessID(); + void signalChild( int sig = 9 ); + void killChild(); + + gint getExitStatus(); + + /** + * Close access to the child's stdout and stderr if they + * were not set to NULL + */ + void closeChildStdOut(); + void closeChildStdErr(); + void closeChildStdIn(); + + /** + * Connect the child stdout/err to the parents stream. + */ + void setConnect_ChildStdOut_To_ParentStdOut( bool v ); + void setConnect_ChildStdErr_To_ParentStdErr( bool v ); + + + /* + * if the user calls waitpid() etc then they should inform the runner + * that they have discovered it has finished and set its exit status + */ + void setExitStatus( gint status ); + + void setConnectStdIn( bool v ); + void setWaitTimeOut( int v ); + void setInheritENV( bool v ); + + std::string getErrorString(); + + void operator()(); + void Run(); + + /** + * Sets the flags G_SPAWN_DO_NOT_REAP_CHILD + * and G_SPAWN_STDERR_TO_DEV_NULL etc and calls Run(); + * This method sets up the command to give you a pipe to the + * new child's stdout which you can read until EOF (you + * consumed all the child's output) or you can just drop the + * streambuf out of scope which will close the child with SIGPIPE. + * + * @returns A readable pipe to the subprocesses stdout. You can close + * this pipe early to have the child terminated if you don't want + * to read the entire subprocess' output. + */ + fh_istream RunWithStdoutAsReadablePipe(); + + std::string getDescription(); + + void setAsyncStdOutFunctor( Runner_AsyncIOFunctor_t x ); + + typedef Loki::Functor< void, LOKI_TYPELIST_1( fh_runner ) > ChildSetupFunctor_t; + + /* + * A function to be called after fork() just before exec() + */ + void setChildSetupFunctor( const ChildSetupFunctor_t& f ); + + + // private. + gboolean internal_async_cb( GIOChannel *source, GIOCondition condition ); + + /* + * Execute the runner and return it's stdout as a string. + */ + int executeAndReturnStdOut( std::string& ret ); + + + private: + ChildSetupFunctor_t m_childSetupFunctor; + }; + +}; + +#endif diff --git a/Ferris/Runner_FunctorType.hh b/Ferris/Runner_FunctorType.hh new file mode 100644 index 0000000..15d79ff --- /dev/null +++ b/Ferris/Runner_FunctorType.hh @@ -0,0 +1,42 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Runner_FunctorType.hh,v 1.3 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_RUNNER_FUN_H_ +#define _ALREADY_INCLUDED_FERRIS_RUNNER_FUN_H_ + +#include + +namespace Ferris +{ + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_2( fh_runner, fh_istream ) > Runner_AsyncIOFunctor_t; +}; + +#endif diff --git a/Ferris/SM.cpp b/Ferris/SM.cpp new file mode 100644 index 0000000..29829fa --- /dev/null +++ b/Ferris/SM.cpp @@ -0,0 +1,34 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SM.cpp,v 1.2 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +using namespace std; + +namespace Ferris +{ +}; diff --git a/Ferris/SM.hh b/Ferris/SM.hh new file mode 100644 index 0000000..97a58ac --- /dev/null +++ b/Ferris/SM.hh @@ -0,0 +1,157 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SM.hh,v 1.4 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#ifndef _ALREADY_INCLUDED_SM_H_ +#define _ALREADY_INCLUDED_SM_H_ + +namespace Ferris +{ + /** + * Unary function to convert objects of type X to type Y using existing + * IOStream inserters and extractors to do the dirty work. + */ + template + struct xtoy : public std::unary_function + { + /** + * Convert object __x of type X into an object of type Y. + * + * @param __x X type object + * @return Y type object that represents __x + */ + inline Y operator()(const X& __x) const + { + std::istringstream ss(__x); + Y y; + ss >> y; + return y; + } + }; + + /** + * Unary function to convert strings to lower case + */ + struct FERRISEXP_API tolowerstr : public std::unary_function< std::string , std::string > + { + /** + */ + inline std::string operator()(const std::string& x) const + { + std::string ret = x; + + std::transform (ret.begin(), ret.end(), ret.begin(), ::tolower ); + +// std::string::iterator e = ret.end(); +// for( std::string::iterator p = ret.begin(); p != e; ++p ) +// { +// *p = ::tolower( *p ); +// } + + // This is nastier code but not really much faster. + // size() and length() both seem to use begin()/end() + // to work out the string size. +// char* p = (char*)ret.data(); +// int max = ret.size(); +// for( int i = 0; i < max; ++i, ++p ) +// { +// *p = ::tolower( *p ); +// } + + return ret; + } + }; + + struct FERRISEXP_API toupperstr : public std::unary_function< std::string , std::string > + { + inline std::string operator()(const std::string& x) const + { + std::string ret = x; + + for( std::string::iterator p = ret.begin(); p != ret.end(); ++p ) + { + *p = ::toupper( *p ); + } + + return ret; + } + }; + + + + template + class tuple_binary_compose + : public std::binary_function + { + protected: + + _Operation1 _M_op1; + _Operation2 _M_op2; + _Operation3 _M_op3; + + public: + + tuple_binary_compose( + const _Operation1& __x = _Operation1(), + const _Operation2& __y = _Operation2(), + const _Operation3& __z = _Operation3()) + : + _M_op1(__x), _M_op2(__y), _M_op3(__z) + { } + + typename _Operation1::result_type + inline operator()( + const typename _Operation2::argument_type& __x, + const typename _Operation2::argument_type& __y + ) const + { + return _M_op1(_M_op2(__x), _M_op3(__y)); + } + }; + + template + inline tuple_binary_compose<_Operation1, _Operation2, _Operation3> + tuple_compose2(const _Operation1& __op1, + const _Operation2& __op2, + const _Operation3& __op3) + { + return tuple_binary_compose<_Operation1,_Operation2,_Operation3> + (__op1, __op2, __op3); + } + +}; +#endif diff --git a/Ferris/SM_private.hh b/Ferris/SM_private.hh new file mode 100644 index 0000000..1402127 --- /dev/null +++ b/Ferris/SM_private.hh @@ -0,0 +1,40 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SM_private.hh,v 1.2 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#ifndef _ALREADY_INCLUDED_SM_PRIVATE_H_ +#define _ALREADY_INCLUDED_SM_PRIVATE_H_ + +namespace Ferris +{ + +}; +#endif diff --git a/Ferris/SchemaManips.cpp b/Ferris/SchemaManips.cpp new file mode 100644 index 0000000..cee065a --- /dev/null +++ b/Ferris/SchemaManips.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SchemaManips.cpp,v 1.3 2010/09/24 21:30:58 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + justification::justification( fh_context schemac ) + : one_arg_manip< fh_context >( justification::fct, schemac ) + {} + + void + justification::fct( std::ios_base& ib, fh_context schemac ) + { + std::string js = schemac + ? getStrAttr( schemac, SCHEMA_JUSTIFICATION, "left" ) + : "left"; + + if( js == "right" ) + ib.setf( std::ios_base::right, std::ios_base::adjustfield ); + else + ib.setf( std::ios_base::left, std::ios_base::adjustfield ); + } + + justificationC::justificationC( fh_context& c, const std::string& eaname ) + : two_arg_manip< fh_context, std::string >( justificationC::fct, c, eaname ) + {} + void + justificationC::fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ) + { + std::string js = getSchemaJustification( c, eaname, "left" ); + + if( js == "right" ) + ib.setf( std::ios_base::right, std::ios_base::adjustfield ); + else + ib.setf( std::ios_base::left, std::ios_base::adjustfield ); + } + + width::width( fh_context schemac ) + : one_arg_manip< fh_context >( width::fct, schemac ) + {} + void + width::fct( std::ios_base& ib, fh_context schemac ) + { + int wid = schemac + ? toint(getStrAttr( schemac, SCHEMA_DEFAULT_DISPLAY_WIDTH, "0" )) + : 0; + + if( wid ) + { + ib.width( wid ); + } + } + widthC::widthC( fh_context c, const std::string& eaname ) + : two_arg_manip< fh_context, std::string >( widthC::fct, c, eaname ) + {} + void + widthC::fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ) + + { + int wid = getSchemaDisplayWidth( c, eaname, 0 ); + + if( wid ) + { + ib.width( wid ); + } + } + + precision::precision( fh_context schemac ) + : one_arg_manip< fh_context >( precision::fct, schemac ) + {} + void + precision::fct( std::ios_base& ib, fh_context schemac ) + { + int wid = schemac + ? toint(getStrAttr( schemac, SCHEMA_DEFAULT_DISPLAY_PRECISION, "0" )) + : 0; + std::cerr << "precision::fct() schemac:" << isBound( schemac ) + << " wid:" << wid + << std::endl; + + + if( wid ) + { + ib.precision( wid ); + } + } + precisionC::precisionC( fh_context c, const std::string& eaname ) + : two_arg_manip< fh_context, std::string >( precisionC::fct, c, eaname ) + {} + void + precisionC::fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ) + + { + int wid = getSchemaDisplayPrecision( c, eaname, 0 ); + + if( wid ) + { + ib.precision( wid ); + } + } + +}; diff --git a/Ferris/SchemaManips.hh b/Ferris/SchemaManips.hh new file mode 100644 index 0000000..02c8e29 --- /dev/null +++ b/Ferris/SchemaManips.hh @@ -0,0 +1,141 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SchemaManips.hh,v 1.3 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_SCHEMA_MANIPS_H_ +#define _ALREADY_INCLUDED_FERRIS_SCHEMA_MANIPS_H_ + +namespace Ferris +{ + /** + * The following template is based on the one_arg_manip<> code + * from the "Standard C++ IOStreams and Locales" book. + */ + template < class Argument1, class Argument2 > + class two_arg_manip + { + public: + typedef void (*manipFct)(std::ios_base&, const Argument1&, const Argument2& ); + + two_arg_manip( manipFct pf, const Argument1& arg1, const Argument2& arg2 ) + : pf_(pf), arg1_(arg1), arg2_(arg2) + {} + + private: + + manipFct pf_; + const Argument1 arg1_; + const Argument2 arg2_; + + template < class CharT, class Traits > + friend std::basic_istream< CharT, Traits >& operator>> + (std::basic_istream< CharT, Traits >& is, const two_arg_manip& oam ) + { + if( !is.good()) return is; + (*(oam.pf_))( is, oam.arg1_, oam.arg2_ ); + return is; + } + + template < class CharT, class Traits > + friend std::basic_ostream< CharT, Traits >& operator<< + (std::basic_ostream< CharT, Traits >& os, const two_arg_manip& oam ) + { + if( !os.good()) return os; + (*(oam.pf_))( os, oam.arg1_, oam.arg2_ ); + return os; + } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Convert a schema justification indication into an iostream manipulator. + * Note that this class can gracefully handle the case where schemac == 0 + */ + struct FERRISEXP_API justification : public one_arg_manip< fh_context > + { + explicit justification( fh_context schemac ); + static void fct( std::ios_base& ib, fh_context schemac ); + }; + struct FERRISEXP_API justificationC : public two_arg_manip< fh_context, std::string > + { + explicit justificationC( fh_context& c, const std::string& eaname ); + static void fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ); + }; + + /** + * Convert a schema SCHEMA_DEFAULT_DISPLAY_WIDTH indication into an + * iostream manipulator which operates similarly to setw(). + * Note that this class can gracefully handle the case where schemac == 0 + */ + struct FERRISEXP_API width : public one_arg_manip< fh_context > + { + explicit width( fh_context schemac ); + static void fct( std::ios_base& ib, fh_context schemac ); + }; + struct FERRISEXP_API widthC : public two_arg_manip< fh_context, std::string > + { + explicit widthC( fh_context c, const std::string& eaname ); + static void fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ); + + + }; + + /** + * Convert a schema SCHEMA_DEFAULT_DISPLAY_PRECISION indication into an + * iostream manipulator which operates similarly to precision(). + * Note that this class can gracefully handle the case where schemac == 0 + */ + struct FERRISEXP_API precision : public one_arg_manip< fh_context > + { + explicit precision( fh_context schemac ); + static void fct( std::ios_base& ib, fh_context schemac ); + }; + struct FERRISEXP_API precisionC : public two_arg_manip< fh_context, std::string > + { + explicit precisionC( fh_context c, const std::string& eaname ); + static void fct( std::ios_base& ib, + const fh_context& c, + const std::string& eaname ); + + + }; + +}; +#endif diff --git a/Ferris/SchemaSupport.cpp b/Ferris/SchemaSupport.cpp new file mode 100644 index 0000000..e319da4 --- /dev/null +++ b/Ferris/SchemaSupport.cpp @@ -0,0 +1,602 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SchemaSupport.cpp,v 1.11 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + const char* SCHEMA_BASE = "schema://xsd/attributes/"; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// struct StatelessEAMetaData +// { +// XSDBasic_t sct; +// string justification; +// int displayWidth; + +// StatelessEAMetaData( XSDBasic_t sct = XSD_UNKNOWN, +// string justification = "left", +// int displayWidth = 0 ) +// : sct( sct ), justification( justification ), displayWidth(displayWidth) +// { +// } +// }; +// typedef map< string, StatelessEAMetaData > StatelessEAMetaDataCache_t; +// static StatelessEAMetaDataCache_t& +// getStatelessEAMetaDataCache() +// { +// static StatelessEAMetaDataCache_t ret; +// return ret; +// } + + +// static const StatelessEAMetaData* +// ensureStatelessEAMetaDataCachePopulated( +// const fh_context& c, const std::string& eaname ) +// { +// // cerr << "ensureStatelessEAMetaDataCachePopulated() eaname:" << eaname << endl; + +// StatelessEAMetaDataCache_t::const_iterator sleaiter = +// getStatelessEAMetaDataCache().find( eaname ); + +// if( sleaiter != getStatelessEAMetaDataCache().end() ) +// { +// return &(sleaiter->second); +// } + +// fh_context sc = c->getSchema( eaname ); +// XSDBasic_t sct = (toType(getStrAttr( sc, "ferrisenum", tostr(sct) ))); +// string justification = getStrAttr( sc, SCHEMA_JUSTIFICATION, "left" ); +// int displayWidth = toint(getStrAttr( sc, SCHEMA_DEFAULT_DISPLAY_WIDTH, "0" )); + +// sleaiter = getStatelessEAMetaDataCache().insert( +// make_pair( eaname, StatelessEAMetaData( sct, justification, displayWidth ))).first; +// return &(sleaiter->second); +// } + +// static void +// ensureStatelessEAMetaDataCachePopulated( +// const fh_context& c, const stringset_t& sl ) +// { +// for( stringset_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) +// { +// string eaname = *si; + +// cerr << "ensureStatelessEAMetaDataCachePopulated() eaname:" << eaname << endl; + +// fh_context sc = c->getSchema( eaname ); +// XSDBasic_t sct = (toType(getStrAttr( sc, "ferrisenum", tostr(sct) ))); +// string justification = getStrAttr( sc, SCHEMA_JUSTIFICATION, "left" ); +// int displayWidth = toint(getStrAttr( sc, SCHEMA_DEFAULT_DISPLAY_WIDTH, "0" )); + +// getStatelessEAMetaDataCache()[ eaname ] = +// StatelessEAMetaData( sct, justification, displayWidth ); +// } +// } + +// static void +// ensureStatelessEAMetaDataCachePopulated( const fh_context& c ) +// { +// static bool virgin = true; +// if( virgin ) +// { +// virgin = false; +// ensureStatelessEAMetaDataCachePopulated( +// c, getNativeStatelessEANames() ); +// ensureStatelessEAMetaDataCachePopulated( +// c, Context::getContextClassStatelessEANames() ); +// } +// } + + + XSDBasic_t getSchemaType( const fh_context& c, const std::string& eaname, XSDBasic_t sct ) + { +// if( c->getIsNativeContext() ) +// { +// ensureStatelessEAMetaDataCachePopulated( c ); +// StatelessEAMetaDataCache_t::const_iterator sleaiter = +// getStatelessEAMetaDataCache().find( eaname ); + +// if( sleaiter != getStatelessEAMetaDataCache().end() ) +// return sleaiter->second.sct; +// } + + fh_context sc = c->getSchemaOrDefault( eaname, sct ); + return XSDBasic_t(toType(getStrAttr( sc, "ferrisenum", tostr(sct) ))); + } + + std::string getSchemaJustification( const fh_context& c, + const std::string& eaname, + const std::string& def ) + { +// if( c->getIsNativeContext() ) +// { +// const StatelessEAMetaData* sldata +// = ensureStatelessEAMetaDataCachePopulated( c, eaname ); +// return sldata->justification; +// } + + fh_context sc = c->getSchema( eaname ); + if( !isBound( sc ) ) + return def; + + return getStrAttr( sc, SCHEMA_JUSTIFICATION, def ); + } + + int getSchemaDisplayWidth( const fh_context& c, + const std::string& eaname, + int def ) + { +// if( c->getIsNativeContext() ) +// { +// const StatelessEAMetaData* sldata +// = ensureStatelessEAMetaDataCachePopulated( c, eaname ); +// return sldata->displayWidth; +// } + + fh_context sc = c->getSchema( eaname ); + if( !isBound(sc) ) + return def; + + return toint(getStrAttr( sc, SCHEMA_DEFAULT_DISPLAY_WIDTH, tostr(def) )); + } + + + int getSchemaDisplayPrecision( const fh_context& c, + const std::string& eaname, + int def ) + { + fh_context sc = c->getSchema( eaname ); + if( !isBound(sc) ) + return def; + + return toint(getStrAttr( sc, SCHEMA_DEFAULT_DISPLAY_PRECISION, tostr(def) )); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef map< XSDBasic_t, string > typeToURLMap_t; + static typeToURLMap_t& getTypeToURLMap() + { + static typeToURLMap_t ret; + + if( ret.empty() ) + { + ret[ XSD_UNKNOWN ] = "unknown"; + ret[ XSD_SCHEMA ] = "schema"; + ret[ XSD_BASIC_BOOL ] = "boolean"; + ret[ XSD_BASIC_FLOAT ] = "float"; + ret[ XSD_BASIC_DOUBLE ] = "double"; + ret[ XSD_BASIC_STRING ] = "string"; + ret[ XSD_BASIC_INT ] = "decimal/integer/long/int"; + ret[ XSD_BASIC_INTEGER ] = "decimal/integer"; + ret[ FXD_MODE_T ] = "decimal/integer/long/fs/mode"; + ret[ FXD_UNIXEPOCH_T ] = "decimal/integer/long/fs/time"; + ret[ FXD_INODE_T ] = "decimal/integer/long/fs/inode"; + ret[ FXD_MIMETYPE ] = "string/mimetype"; + ret[ FXD_GID_T ] = "decimal/integer/long/fs/gid"; + ret[ FXD_UID_T ] = "decimal/integer/long/fs/uid"; + ret[ FXD_USERNAME ] = "string/username"; + ret[ FXD_GROUPNAME ] = "string/groupname"; + ret[ FXD_PID ] = "decimal/integer/long/fs/pid"; + ret[ FXD_FILESIZE ] = "decimal/integer/width64/filesize"; + ret[ FXD_URL ] = "string/url"; + ret[ FXD_URL_IMPLICIT_RESOLVE ] = "string/url/implicitresolve"; + ret[ FXD_MACHINE_NAME ] = "string/machinename"; + ret[ FXD_FSID_T ] = "decimal/integer/long"; + ret[ FXD_INT32 ] = "decimal/integer/width32"; + ret[ FXD_UINT32 ] = "decimal/integer/unsigned/width32"; + ret[ FXD_LONG ] = "decimal/integer/width32"; + ret[ FXD_BINARY ] = "binary"; + ret[ FXD_BINARY_RGBA32 ] = "binary/rgba32bpp"; + ret[ FXD_BINARY_NATIVE_EA ] = "binary/nativeea"; + ret[ FXD_BINARY_PGMPIPE ] = "binary/pgmpipe"; + ret[ FXD_BINARY_A52PIPE ] = "binary/a52pipe"; + ret[ FXD_EANAMES ] = "stringlist/eanames"; + ret[ FXD_DIGEST ] = "string/digest"; + ret[ FXD_XMLDOCSTRING ] = "string/xmldoc"; + ret[ FXD_PIXELCOUNT ] = "decimal/integer/pixelcount"; + ret[ FXD_WIDTH_PIXELS ] = "decimal/integer/pixelcount/width"; + ret[ FXD_HEIGHT_PIXELS ] = "decimal/integer/pixelcount/height"; + ret[ FXD_PRIMARY_KEY ] = "string/primarykey"; + ret[ FXD_PRIMARY_KEY_REAL ] = "string/primarykey/real"; + ret[ FXD_PRIMARY_KEY_VIRTUAL ] = "string/primarykey/virtual"; + ret[ FXD_FTX_RANK ] = "double/query/rank"; + ret[ FXD_FFILTER ] = "string/ffilter"; + ret[ FXD_STR_IP4ADDR ] = "string/ipv4address"; + ret[ FXD_IP4PORT ] = "decimal/integer/unsigned/width16/ipv4port"; + ret[ FXD_DISTINGUISHED_PERSON ] = "string/distinguishedperson"; + ret[ FXD_CIPHER_NAME ] = "string/ciphername"; + ret[ FXD_CIPHER_VERSION ] = "string/cipherversion"; + ret[ FXD_CIPHER_NAME_LIST ] = "stringlist/ciphername"; + ret[ FXD_CIPHER_BITS ] = "decimal/integer/unsigned/width16/cipherbits"; + ret[ FXD_STRINGLIST ] = "stringlist"; + ret[ FXD_UNIXEPOCH_STRING ] = "string/unixepoch"; + ret[ FXD_MODE_STRING_T ] = "string/modestring"; + ret[ FXD_URLLIST ] = "stringlist/urllist"; + ret[ FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM ] = "string/url/implicitresolvefs"; + + ret[ FXD_LATLONG ] = "double/latlong"; + ret[ FXD_LATITUDE ] = "double/latlong/latitude"; + ret[ FXD_LONGITUDE ] = "double/latlong/longitude"; + } + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + inline static fh_stringstream SL_Schema_T( Context* c, const std::string& typepath ) + { + fh_stringstream ret; + ret << SCHEMA_BASE << typepath << endl; + return ret; + } + + struct FERRISEXP_DLLLOCAL GetSchemaURLIStream + { + XSDBasic_t sct; + GetSchemaURLIStream( XSDBasic_t sct ) + : + sct( sct ) + { + } + + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > SchemaReadFunctor_t; + SchemaReadFunctor_t getFunctor() + { + SchemaReadFunctor_t f( this, &GetSchemaURLIStream::getIStream ); + return f; + } + + string getSchemaURL( Context* c, const std::string& rdn ) + { + typeToURLMap_t& m = getTypeToURLMap(); + typeToURLMap_t::iterator mi = m.find( sct ); + string typepath = ""; + + if( mi != m.end() ) + typepath = mi->second; + else + { + // PURE DEBUG + LG_SCHEMA_ER << "schema type:" << (guint32)sct + << " rdn:" << rdn + << " SCT IS NOT BOUND!" << endl; + } + + stringstream ret; + ret << SCHEMA_BASE << typepath << endl; + + LG_SCHEMA_D << "GetSchemaURLIStream() sct:" << sct << " rdn:" << rdn + << " GIVES:" << tostr(ret) << endl; + + return ret.str(); + } + + fh_istream getIStream( Context* c, + const std::string& rdn, + EA_Atom* atom ) + { + fh_stringstream ss; + ss << getSchemaURL( c, rdn ); + return ss; + // typeToURLMap_t& m = getTypeToURLMap(); + // typeToURLMap_t::iterator mi = m.find( sct ); + // string typepath = ""; + + // if( mi != m.end() ) + // typepath = mi->second; + // else + // { + // // PURE DEBUG + // LG_SCHEMA_ER << "schema type:" << (guint32)sct + // << " rdn:" << rdn + // << " SCT IS NOT BOUND!" << endl; + // } + + // fh_stringstream ret; + // ret << SCHEMA_BASE << typepath << endl; + + // LG_SCHEMA_D << "GetSchemaURLIStream() sct:" << sct << " rdn:" << rdn + // << " GIVES:" << tostr(ret) << endl; + + // return ret; + } + + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + stringlist_t getSchemaDefaultSort( fh_context sc, bool onlyGetFirst ) + { + stringlist_t ret; + string s; + stringstream ss; + ss << getStrAttr( sc, SCHEMA_DEFAULTSORT, "binary" ); + + LG_SCHEMA_D << "getSchemaDefaultSort() sc:" << sc->getURL() << " defaultsort:" << tostr(ss) << endl; + + while( getline( ss, s, ',' )) + { + ret.push_back( s ); + if( onlyGetFirst ) + break; + } + + return ret; + } + stringlist_t getSchemaDefaultSortList( fh_context sc ) + { + return getSchemaDefaultSort( sc, false ); + } + + string getSchemaDefaultSort( fh_context sc ) + { + return getSchemaDefaultSort( sc, true ).front(); + } + + + + + XSDBasic_t maskOffXSDMeta( XSDBasic_t t ) + { +// cerr << "maskOffXSDMeta() in:" << t << " out1:" << (t & 0x00FFFFFFL) << endl; + return (XSDBasic_t)(t & 0x00FFFFFF); + } + + typedef Loki::Functor< fh_istream, + LOKI_TYPELIST_3( Context*, + const std::string&, + EA_Atom* ) > SchemaReadFunctor_t; + struct FERRISEXP_DLLLOCAL StateLessAttacher + { + static void attach( Context* c, + const std::string& eaname, + const SchemaReadFunctor_t& f ) + { + c->tryAddStateLessAttribute( eaname, f ); + } + }; + struct FERRISEXP_DLLLOCAL GenericAttacher + { + static void attach( Context* c, + const std::string& eaname, + const SchemaReadFunctor_t& f ) + { + c->addAttribute( eaname, f ); + } + }; + + template + static void attachSchema( Context* c, const std::string& rawname, XSDBasic_t t ) + { + string sea = "schema:" + rawname; + + if( starts_with( rawname, "schema:" )) + return; + + LG_SCHEMA_D << endl << " ******* " << endl + << "attachSchema() c:" << c->getURL() << " sea:" << sea + << " t:" << t << " mask(t):" << maskOffXSDMeta( t ) + << endl; + + t = maskOffXSDMeta( t ); + if( !t ) + return; + + typedef map< XSDBasic_t, GetSchemaURLIStream* > Functions_t; + static Functions_t Functions; + Functions_t::iterator fi = Functions.find( t ); + + if( fi == Functions.end() ) + { + LG_SCHEMA_D << "attachSchema(2) c:" << c->getURL() << " sea:" << sea << " t:" << t << endl; + + GetSchemaURLIStream* obj = new GetSchemaURLIStream( t ); + Functions[ t ] = obj; + fi = Functions.find( t ); + } + + if( fi != Functions.end() ) + { +// fh_istream iss = fi->second->getIStream(c,rawname,0); +// string readval = getFirstLine( iss ); + string readval = fi->second->getSchemaURL( c, rawname ); + + LG_SCHEMA_D << "attachSchema(about to attach()) c:" << c->getURL() << " sea:" << sea << " t:" << t + << " GIVES:" << readval << endl; + + Attacher::attach( c, sea, + SchemaReadFunctor_t( fi->second, + &GetSchemaURLIStream::getIStream ) ); + + LG_SCHEMA_D << "attachSchema(final test) getattr:" << getStrAttr( c, sea, "no" ) << endl; + + } + + } + + + void attachStatelessSchema( Context* c, const std::string& rawname, XSDBasic_t t ) + { + attachSchema( c, rawname, t ); + } + + + void attachGenericSchema( Context* c, const std::string& rawname, XSDBasic_t t ) + { + attachSchema( c, rawname, t ); + } + + XSDBasic_t getSchemaType( const fh_context& sc, XSDBasic_t sct ) + { + return XSDBasic_t(toType(getStrAttr( sc, "ferrisenum", tostr(sct) ))); + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Factory + { + string getSchemaURLForType( XSDBasic_t sct ) + { + const typeToURLMap_t& ttu = getTypeToURLMap(); + typeToURLMap_t::const_iterator ti = ttu.find( sct ); + if( ti == ttu.end() ) + { + return "schema://xsd/attributes/unknown"; + } + return ti->second; + } + + + xsdtypemap_t& makeBasicTypeMap( xsdtypemap_t& m ) + { + typeToURLMap_t ttu = getTypeToURLMap(); + for( typeToURLMap_t::iterator ti = ttu.begin(); ti != ttu.end(); ++ti ) + { + fh_stringstream ss; + ss << SCHEMA_BASE << ti->second; +// LG_SCHEMA_D << "type:" << ti->first << " is at url:" << tostr(ss) << endl; + + // Note that RESOLVE_CLOSEST works for this, but we then don't get an indivial uuid + // and the ferrisenum reverse map doesn't work properly. thus we should have exact + // resolution. We allow non exact currently but slap the user for doing it. + m[ ti->first ] = Resolve( tostr(ss), RESOLVE_CLOSEST ); + + // + // Check to make sure we got exact, complain if it is not so. + // + bool issueWarning = false; + try + { + fh_context exact = Resolve( tostr(ss) ); + if( exact != m[ ti->first ] ) + issueWarning = true; + } + catch( ... ) + { + issueWarning = true; + } + + if( issueWarning ) + { + LG_SCHEMA_W << "SCHEMA WARNING: for type" << ti->first << endl + << " there should be a schema at:" << tostr(ss) << endl + << " using closest match at:" << m[ ti->first ]->getURL() << endl; + } + +// LG_SCHEMA_D << "type2:" << ti->first << " is at url:" << m[ ti->first ]->getURL() << endl; + } + + return m; + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL SchemaContextSchemaVFS_RootContextDropper + : + public RootContextDropper + { + public: + + SchemaContextSchemaVFS_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("schema"); + RootContextFactory::Register( "schema", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + try + { + static fh_context ret = 0; + static bool v = true; + if( v ) + { +// Time::Benchmark bm( "getting schema" ); + v = false; + + static fh_context base = Resolve( "~/.ferris/schema.xml" ); + static fh_context c1 = base; + static fh_context c2 = Factory::makeInheritingEAContext( base ); + ret = c2; + } + + return ret; + } + catch( RootContextCreationFailed& e ) + { + throw; + } + catch( std::exception& e ) + { + fh_stringstream ss; + ss << "Schema resolution error:" << e.what() << endl; + Throw_RootContextCreationFailed( tostr(ss), 0 ); + } + } + }; + typedef Loki::SingletonHolder< SchemaContextSchemaVFS_RootContextDropper, + Loki::CreateUsingNew, Loki::NoDestroy > link_ctx_schema_singleton; + static RootContextDropper& schemad = link_ctx_schema_singleton::Instance(); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + +}; diff --git a/Ferris/SchemaSupport.hh b/Ferris/SchemaSupport.hh new file mode 100644 index 0000000..d570ec4 --- /dev/null +++ b/Ferris/SchemaSupport.hh @@ -0,0 +1,287 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SchemaSupport.hh.in,v 1.6 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_SCHEMA_SUPPORT_H_ +#define _ALREADY_INCLUDED_FERRIS_SCHEMA_SUPPORT_H_ + +#include + + +namespace Ferris +{ + /** + * These are the basic always present types in the schema. They include many of + * the standard XSD basic types and are augmented with types that are file + * system specific. + * + * Note that each context in the schema also stores its XSDBasic_t value so + * that one can test an EA to see what type it is easily using getSchemaType() + */ + enum XSDBasic_t { + XSD_UNKNOWN = 290, + XSD_SCHEMA = 291, + XSD_BASIC_BOOL = 300, + XSD_BASIC_FLOAT = 301, + XSD_BASIC_DOUBLE = 302, + XSD_BASIC_STRING = 303, + XSD_BASIC_INT = 304, + XSD_BASIC_INTEGER= 346, + FXD_MODE_T = 305, //< mode_t feild out of lstat(2) + FXD_UNIXEPOCH_T = 306, // seconds since the unix epoch. a time_t + FXD_INODE_T = 307, // ino_t from lstat(2) + FXD_MIMETYPE = 308, // string which should represent the mimetype of data + FXD_GID_T = 309, // gid_t from lstat(2) + FXD_UID_T = 310, // uid_t from lstat(2) + FXD_USERNAME = 311, // user login name on the box + FXD_GROUPNAME = 312, // group name on the box + FXD_PID = 313, // process id + FXD_FILESIZE = 314, // usually 64 bit. + FXD_URL = 315, // a url that may be of interest to the user + FXD_URL_IMPLICIT_RESOLVE = 316, // like FXD_URL but + // it is recommended to Resolve() + // the url and show the data at that location instead + // of the url itself. + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = 350, // like + // FXD_URL but the filesystem that is obtained + // by Resolve()ing the URL string is the interesting + // thing. This differs slightly from + // FXD_URL_IMPLICIT_RESOLVE in that this schema + // type recommends displaying the target as a dir. + FXD_MACHINE_NAME = 317,// computer name in dns relative to local machine + FXD_FSID_T = 318, // see STATFS(2) fsid_t + FXD_INT32 = 319, // 32 bit signed integer + FXD_UINT32 = 320, // 32 bit unsigned integer + FXD_LONG = 321, // whatever a c 'long' type size is on this machine. + FXD_BINARY = 322, // raw binary data + FXD_BINARY_RGBA32 = 323, // 32 bit per pixel RGBA image data + FXD_BINARY_NATIVE_EA = 324,// binary data stored as on disk EA through the kernel + FXD_BINARY_PGMPIPE = 325, // a series of pgm images + FXD_BINARY_A52PIPE = 326, // an audio track in a52 format + FXD_EANAMES = 327, // A list of ea names seperated by a single comma between each ea + FXD_DIGEST = 328, // A string which is known to be a digest of a + // binary object. it is also written that each digest + // will have a similar length + FXD_XMLDOCSTRING = 329, // A string containing a valid xml document + FXD_PIXELCOUNT = 330, // A width or height or length in screen pixels. + FXD_WIDTH_PIXELS = 331, // A width in screen pixels. + FXD_HEIGHT_PIXELS = 332, // A height in screen pixels. + FXD_PRIMARY_KEY = 333, // primary key in a database or some grouping that + // is being used as the primary key would be + FXD_PRIMARY_KEY_REAL = 334, // real primary key from a relational database + FXD_PRIMARY_KEY_VIRTUAL = 335, // a grouping of columns that is being treated + // as a primary key for this context + // (eg. synthetic key made for a query) + FXD_FTX_RANK = 336, // full text query ranking for a document + FXD_FFILTER = 337, // ferris-filter + FXD_STR_IP4ADDR = 338, // ipv4 string address + FXD_IP4PORT = 339, // ipv4 port number + + FXD_DISTINGUISHED_PERSON = 340, // an object that owns or issues a certificate + FXD_CIPHER_NAME = 341, // name of a cipher + FXD_CIPHER_VERSION = 342, // version of FXD_CIPHER_NAME + FXD_CIPHER_NAME_LIST = 343, // comma seperated list of FXD_CIPHER_NAME objects + FXD_CIPHER_BITS = 344, // number of bits in use + FXD_STRINGLIST = 345, // a list of strings seperated by commas + FXD_URLLIST = 351, // a list of urls seperated by commas + FXD_UNIXEPOCH_STRING = 347, //< a time_t value flattened to a string + + FXD_INTLIST = 352, // list of XSD_BASIC_INT comma seperated + + FXD_EXIF_VERSION = 360, // exif version type + FXD_EXIF_USER_COMMENT = 361,// 8 byte encoding prefixed string + FXD_EXIF_COPYRIGHT = 362, // specially formatted string + FXD_EXIF_FLASH = 363, // if flash fired and was ment to string + FXD_EXIF_EXPOSURE_PROGRAM = 364, // custom string from enum + FXD_UNIT_NAME_LENGTH = 365, // strings for length: Centimeter etc + FXD_EXIF_DATETIME_STRING = 366, // special formated date/time str + + + // A string which can only take on a handful of values // + FXD_ENUMERATED_STRING = 367, + + // exif data which have an enumerated range of allowed values // + FXD_EXIF_SENSING_METHOD = 368, + FXD_EXIF_ORIENTATION = 369, + FXD_EXIF_METERING_MODE = 370, + FXD_EXIF_YCBCR_POSITIONING = 371, + FXD_EXIF_COMPRESSION = 372, + FXD_EXIF_LIGHT_SOURCE = 373, + + FXD_MODE_STRING_T = 374, //< mode_t feild out of lstat(2) as string + + FXD_LATLONG = 375, + FXD_LATITUDE = 376, + FXD_LONGITUDE = 377, + + FXD_XLIST = 400, + FXD_UINT64 = 401, + FXD_INT64 = 402, + + FXDC_READONLY = 1L<<25, //< read only ea + FXDC_IS_GENERATED = 1L<<26, //< is the value generated + FXDC_IS_STATELESS = 1L<<27 //< is the ea attached in a stateless manner (maybe not have this?) + + + }; + + /*** + * Default max width for an attribute + */ + const std::string SCHEMA_DEFAULT_DISPLAY_WIDTH = "default-display-width"; + + const std::string SCHEMA_DEFAULT_DISPLAY_PRECISION = "default-display-precision"; + + /** + * Default justification for an attribute + * @see struct justification in SignalStreams.hh for an iostream manipulator that + * handles this value + */ + const std::string SCHEMA_JUSTIFICATION = "justification"; + + /** + * Default sorting comparison style. For example, int, string, cis + */ + const std::string SCHEMA_DEFAULTSORT = "defaultsort"; + + /** + * Get the SCHEMA_DEFAULTSORT value for the schema context sc. + * + * @param sc the schema context as returned by getSchema() + * + * @return the value of SCHEMA_DEFAULTSORT for sc parsed into individual strings. + */ + FERRISEXP_API stringlist_t getSchemaDefaultSortList( fh_context sc ); + /** + * Only gets first + * Get the SCHEMA_DEFAULTSORT value for the schema context sc. + * + * @param sc the schema context as returned by getSchema() + * + * @return the value of SCHEMA_DEFAULTSORT for sc parsed into individual strings. + */ + FERRISEXP_API std::string getSchemaDefaultSort( fh_context sc ); + + /** + * Some of the parts of a XSDBasic_t detail if the type is read only etc + * they are really just augmentation on the type and can be masked off + * with this function to see if a type is equal to another type which may + * have different read/write access + */ + FERRISEXP_API XSDBasic_t maskOffXSDMeta( XSDBasic_t t ); + + /** + * Add a basic schema for the ea with name rawname giving the builtin type t + * rawname is for example "size" and then the schema is bound to "schema:size" + * + * This method attaches stateless schema data. For attributes which are bound + * using addAttribute() see attachGenericSchema(). + * + * The types which are built in are based on those presented in Built-in datatypes + * in "XML Schema Part 2: Datatypes, W3C Recommendation 02 May 2001" + * + * @see attachGenericSchema() + */ + FERRISEXP_API void attachStatelessSchema( Context* c, const std::string& rawname, XSDBasic_t t ); + + /** + * Add a basic schema for the ea with name rawname giving the builtin type t + * rawname is for example "size" and then the schema is bound to "schema:size" + * + * This method attaches statefull schema data. For attributes which are bound + * based on the Context class itself, (ie. stateless ea) see attachStatelessSchema(). + * + * The types which are built in are based on those presented in Built-in datatypes + * in "XML Schema Part 2: Datatypes, W3C Recommendation 02 May 2001" + * + * @see attachGenericSchema() + */ + FERRISEXP_API void attachGenericSchema( Context* c, const std::string& rawname, XSDBasic_t t ); + + + /** + * Get the enum type for the attribute eaname or sct if no such type exists. + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the schema for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API XSDBasic_t getSchemaType( const fh_context& c, const std::string& eaname, XSDBasic_t sct ); + + /** + * Get the justification for the attribute eaname or def if no justification exists. + * + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the justification for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API std::string getSchemaJustification( + const fh_context& c, const std::string& eaname, const std::string& def = "left" ); + + /** + * Get the display width for the attribute eaname or def if no display width exists. + * + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the display width for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API int getSchemaDisplayWidth( + const fh_context& c, const std::string& eaname, int def = 0 ); + FERRISEXP_API int getSchemaDisplayPrecision( + const fh_context& c, const std::string& eaname, int def = 0 ); + + + /** + * Get the enum type for the attribute eaname or sct if no such type exists. + * @param sc The Schema for the attribute we are interested in. + * This will be sc = c->getSchema( eaname ) for the other version of this call. + * @param sct Default if no schema is bound. + */ + FERRISEXP_API XSDBasic_t getSchemaType( const fh_context& sc, XSDBasic_t sct ); + + namespace Factory + { + typedef std::map< XSDBasic_t, fh_context > xsdtypemap_t; + + /** + * Get the schema URL for the given schema type. + */ + std::string getSchemaURLForType( XSDBasic_t sct ); + + /** + * creates a map from each XSDBasic_t to a fh_context representing that type + * note that the return value is the same as 'm'. + */ + FERRISEXP_API xsdtypemap_t& makeBasicTypeMap( xsdtypemap_t& m ); + } + +}; +#endif + diff --git a/Ferris/SchemaSupport.hh.in b/Ferris/SchemaSupport.hh.in new file mode 100644 index 0000000..5f2fe30 --- /dev/null +++ b/Ferris/SchemaSupport.hh.in @@ -0,0 +1,287 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SchemaSupport.hh.in,v 1.6 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#ifndef _ALREADY_INCLUDED_FERRIS_SCHEMA_SUPPORT_H_ +#define _ALREADY_INCLUDED_FERRIS_SCHEMA_SUPPORT_H_ + +#include + + +namespace Ferris +{ + /** + * These are the basic always present types in the schema. They include many of + * the standard XSD basic types and are augmented with types that are file + * system specific. + * + * Note that each context in the schema also stores its XSDBasic_t value so + * that one can test an EA to see what type it is easily using getSchemaType() + */ + enum XSDBasic_t { + XSD_UNKNOWN = @XSD_UNKNOWN@, + XSD_SCHEMA = @XSD_SCHEMA@, + XSD_BASIC_BOOL = @XSD_BASIC_BOOL@, + XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@, + XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@, + XSD_BASIC_STRING = @XSD_BASIC_STRING@, + XSD_BASIC_INT = @XSD_BASIC_INT@, + XSD_BASIC_INTEGER= @XSD_BASIC_INTEGER@, + FXD_MODE_T = @FXD_MODE_T@, //< mode_t feild out of lstat(2) + FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@, // seconds since the unix epoch. a time_t + FXD_INODE_T = @FXD_INODE_T@, // ino_t from lstat(2) + FXD_MIMETYPE = @FXD_MIMETYPE@, // string which should represent the mimetype of data + FXD_GID_T = @FXD_GID_T@, // gid_t from lstat(2) + FXD_UID_T = @FXD_UID_T@, // uid_t from lstat(2) + FXD_USERNAME = @FXD_USERNAME@, // user login name on the box + FXD_GROUPNAME = @FXD_GROUPNAME@, // group name on the box + FXD_PID = @FXD_PID@, // process id + FXD_FILESIZE = @FXD_FILESIZE@, // usually 64 bit. + FXD_URL = @FXD_URL@, // a url that may be of interest to the user + FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@, // like FXD_URL but + // it is recommended to Resolve() + // the url and show the data at that location instead + // of the url itself. + FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@, // like + // FXD_URL but the filesystem that is obtained + // by Resolve()ing the URL string is the interesting + // thing. This differs slightly from + // FXD_URL_IMPLICIT_RESOLVE in that this schema + // type recommends displaying the target as a dir. + FXD_MACHINE_NAME = @FXD_MACHINE_NAME@,// computer name in dns relative to local machine + FXD_FSID_T = @FXD_FSID_T@, // see STATFS(2) fsid_t + FXD_INT32 = @FXD_INT32@, // 32 bit signed integer + FXD_UINT32 = @FXD_UINT32@, // 32 bit unsigned integer + FXD_LONG = @FXD_LONG@, // whatever a c 'long' type size is on this machine. + FXD_BINARY = @FXD_BINARY@, // raw binary data + FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@, // 32 bit per pixel RGBA image data + FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@,// binary data stored as on disk EA through the kernel + FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@, // a series of pgm images + FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@, // an audio track in a52 format + FXD_EANAMES = @FXD_EANAMES@, // A list of ea names seperated by a single comma between each ea + FXD_DIGEST = @FXD_DIGEST@, // A string which is known to be a digest of a + // binary object. it is also written that each digest + // will have a similar length + FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@, // A string containing a valid xml document + FXD_PIXELCOUNT = @FXD_PIXELCOUNT@, // A width or height or length in screen pixels. + FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@, // A width in screen pixels. + FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@, // A height in screen pixels. + FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@, // primary key in a database or some grouping that + // is being used as the primary key would be + FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@, // real primary key from a relational database + FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@, // a grouping of columns that is being treated + // as a primary key for this context + // (eg. synthetic key made for a query) + FXD_FTX_RANK = @FXD_FTX_RANK@, // full text query ranking for a document + FXD_FFILTER = @FXD_FFILTER@, // ferris-filter + FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@, // ipv4 string address + FXD_IP4PORT = @FXD_IP4PORT@, // ipv4 port number + + FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@, // an object that owns or issues a certificate + FXD_CIPHER_NAME = @FXD_CIPHER_NAME@, // name of a cipher + FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@, // version of FXD_CIPHER_NAME + FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@, // comma seperated list of FXD_CIPHER_NAME objects + FXD_CIPHER_BITS = @FXD_CIPHER_BITS@, // number of bits in use + FXD_STRINGLIST = @FXD_STRINGLIST@, // a list of strings seperated by commas + FXD_URLLIST = @FXD_URLLIST@, // a list of urls seperated by commas + FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@, //< a time_t value flattened to a string + + FXD_INTLIST = @FXD_INTLIST@, // list of XSD_BASIC_INT comma seperated + + FXD_EXIF_VERSION = @FXD_EXIF_VERSION@, // exif version type + FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@,// 8 byte encoding prefixed string + FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@, // specially formatted string + FXD_EXIF_FLASH = @FXD_EXIF_FLASH@, // if flash fired and was ment to string + FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@, // custom string from enum + FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@, // strings for length: Centimeter etc + FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@, // special formated date/time str + + + // A string which can only take on a handful of values // + FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@, + + // exif data which have an enumerated range of allowed values // + FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@, + FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@, + FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@, + FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@, + FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@, + FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@, + + FXD_MODE_STRING_T = @FXD_MODE_STRING_T@, //< mode_t feild out of lstat(2) as string + + FXD_LATLONG = @FXD_LATLONG@, + FXD_LATITUDE = @FXD_LATITUDE@, + FXD_LONGITUDE = @FXD_LONGITUDE@, + + FXD_XLIST = @FXD_XLIST@, + FXD_UINT64 = @FXD_UINT64@, + FXD_INT64 = @FXD_INT64@, + + FXDC_READONLY = 1L<<25, //< read only ea + FXDC_IS_GENERATED = 1L<<26, //< is the value generated + FXDC_IS_STATELESS = 1L<<27 //< is the ea attached in a stateless manner (maybe not have this?) + + + }; + + /*** + * Default max width for an attribute + */ + const std::string SCHEMA_DEFAULT_DISPLAY_WIDTH = "default-display-width"; + + const std::string SCHEMA_DEFAULT_DISPLAY_PRECISION = "default-display-precision"; + + /** + * Default justification for an attribute + * @see struct justification in SignalStreams.hh for an iostream manipulator that + * handles this value + */ + const std::string SCHEMA_JUSTIFICATION = "justification"; + + /** + * Default sorting comparison style. For example, int, string, cis + */ + const std::string SCHEMA_DEFAULTSORT = "defaultsort"; + + /** + * Get the SCHEMA_DEFAULTSORT value for the schema context sc. + * + * @param sc the schema context as returned by getSchema() + * + * @return the value of SCHEMA_DEFAULTSORT for sc parsed into individual strings. + */ + FERRISEXP_API stringlist_t getSchemaDefaultSortList( fh_context sc ); + /** + * Only gets first + * Get the SCHEMA_DEFAULTSORT value for the schema context sc. + * + * @param sc the schema context as returned by getSchema() + * + * @return the value of SCHEMA_DEFAULTSORT for sc parsed into individual strings. + */ + FERRISEXP_API std::string getSchemaDefaultSort( fh_context sc ); + + /** + * Some of the parts of a XSDBasic_t detail if the type is read only etc + * they are really just augmentation on the type and can be masked off + * with this function to see if a type is equal to another type which may + * have different read/write access + */ + FERRISEXP_API XSDBasic_t maskOffXSDMeta( XSDBasic_t t ); + + /** + * Add a basic schema for the ea with name rawname giving the builtin type t + * rawname is for example "size" and then the schema is bound to "schema:size" + * + * This method attaches stateless schema data. For attributes which are bound + * using addAttribute() see attachGenericSchema(). + * + * The types which are built in are based on those presented in Built-in datatypes + * in "XML Schema Part 2: Datatypes, W3C Recommendation 02 May 2001" + * + * @see attachGenericSchema() + */ + FERRISEXP_API void attachStatelessSchema( Context* c, const std::string& rawname, XSDBasic_t t ); + + /** + * Add a basic schema for the ea with name rawname giving the builtin type t + * rawname is for example "size" and then the schema is bound to "schema:size" + * + * This method attaches statefull schema data. For attributes which are bound + * based on the Context class itself, (ie. stateless ea) see attachStatelessSchema(). + * + * The types which are built in are based on those presented in Built-in datatypes + * in "XML Schema Part 2: Datatypes, W3C Recommendation 02 May 2001" + * + * @see attachGenericSchema() + */ + FERRISEXP_API void attachGenericSchema( Context* c, const std::string& rawname, XSDBasic_t t ); + + + /** + * Get the enum type for the attribute eaname or sct if no such type exists. + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the schema for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API XSDBasic_t getSchemaType( const fh_context& c, const std::string& eaname, XSDBasic_t sct ); + + /** + * Get the justification for the attribute eaname or def if no justification exists. + * + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the justification for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API std::string getSchemaJustification( + const fh_context& c, const std::string& eaname, const std::string& def = "left" ); + + /** + * Get the display width for the attribute eaname or def if no display width exists. + * + * @param c Is the context that has the EA we are interested in + * @param eaname The EA we are wanting to know the display width for + * @param sct Default if no schema is bound. + */ + FERRISEXP_API int getSchemaDisplayWidth( + const fh_context& c, const std::string& eaname, int def = 0 ); + FERRISEXP_API int getSchemaDisplayPrecision( + const fh_context& c, const std::string& eaname, int def = 0 ); + + + /** + * Get the enum type for the attribute eaname or sct if no such type exists. + * @param sc The Schema for the attribute we are interested in. + * This will be sc = c->getSchema( eaname ) for the other version of this call. + * @param sct Default if no schema is bound. + */ + FERRISEXP_API XSDBasic_t getSchemaType( const fh_context& sc, XSDBasic_t sct ); + + namespace Factory + { + typedef std::map< XSDBasic_t, fh_context > xsdtypemap_t; + + /** + * Get the schema URL for the given schema type. + */ + std::string getSchemaURLForType( XSDBasic_t sct ); + + /** + * creates a map from each XSDBasic_t to a fh_context representing that type + * note that the return value is the same as 'm'. + */ + FERRISEXP_API xsdtypemap_t& makeBasicTypeMap( xsdtypemap_t& m ); + } + +}; +#endif + diff --git a/Ferris/Shell.cpp b/Ferris/Shell.cpp new file mode 100644 index 0000000..b7f6660 --- /dev/null +++ b/Ferris/Shell.cpp @@ -0,0 +1,1140 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Shell.cpp,v 1.16 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include "Shell.hh" + +#include +#include +#include +#include +#include +#include + +//#include "Ferrisls.hh" +#include "SignalStreams.hh" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + static bool priv_isTransitiveParent( fh_context base, fh_context p ) + { + if( base->isParentBound() ) + { + fh_context basep = base->getParent(); + if( basep == p ) + return true; + return priv_isTransitiveParent( basep, p ); + } + return false; + } + + bool isTransitiveParent( fh_context base, fh_context p ) + { + if( base == p || !base || !p ) + return false; + return priv_isTransitiveParent( base, p ); + } + + static bool running_set_UID = false; + + void setRunningSetUID( bool v ) + { + running_set_UID = v; + } + + bool runningSetUID() + { + return running_set_UID; + } + + bool canResolve( const std::string& s ) + { + if( starts_with( s, "file:" ) ) + { + string subs = s.substr( strlen( "file:" ) ); + struct stat buf; + int rc = lstat( subs.c_str(), &buf ); + return !rc; + } + try + { + Resolve( s ); + return 1; + } + catch( ... ) + { + return 0; + } + } + + std::string canonicalizeMissing( const std::string& earl ) + { + fh_context rootc = Resolve("/"); + + Context::SplitPath_t sp = rootc->splitPath( earl ); + Context::SplitPath_t col; + for( Context::SplitPath_t::iterator si = sp.begin(); + si != sp.end(); ++si ) + { + string s = *si; + if( s == "." ) + continue; + if( s == ".." ) + { + col.pop_back(); + continue; + } + col.push_back(s); + } + std::string ret = rootc->unSplitPath( col ); + return ret; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /** + * Save the data from byteContent into the context at rdn with the parent + * parentURL. + * + * One can control if the context is created if it does not exist by setting + * overwrite=true. If one wants to create a new file then set shouldMonsterName=true + * and overwrite=false, which will not overwrite existing data and create a unique + * file with a prefix of the given rdn. + * + * If shouldMonsterName=false and overwrite=false then if a context exists with + * the desired rdn an exception will be thrown. + * + * @parentURL Parent of the desired context + * @rdn_raw Rdn of where to store the data in parentURL + * @byteContent The data to save + * @shouldMonsterName Keep chaning the rdn if objects already exist with the + * given rdn + * @overwrite Overwrite data in existing contexts without prompting + * + */ + fh_context saveFile( const std::string& parentURL, + const std::string& rdn_raw, + const std::string& byteContent, + bool shouldMonsterName, + bool overwrite ) + { + fh_context parent = Shell::acquireContext( parentURL ); + string rdn = rdn_raw; + fh_context c; + + if( shouldMonsterName ) + { + rdn = monsterName( parent, rdn ); + } + + if( parent->isSubContextBound( rdn ) ) + { + if( overwrite ) + { + c = parent->getSubContext( rdn ); + } + else + { + fh_stringstream ss; + ss << "context exists and told not to overwrite existing\n" + << "for:" << rdn; + Throw_ObjectExists( tostr(ss), 0 ); + } + } + else + { + c = Shell::CreateFile( parent, rdn ); + } + + fh_iostream oss = c->getIOStream( ios::trunc ); + oss << byteContent; + return c; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Shell + { + ContextCreated_Sig_t& getNullContextCreated_Sig() + { + static ContextCreated_Sig_t x; + return x; + } + + + + std::string quote( const std::string& s ) + { + static StringQuote sq( StringQuote::SHELL_QUOTING ); + return sq(s); + } + + fh_context unrollLinks( fh_context c, + bool throwForException, + int levelOfRecursion ) + { + string realpath = getStrAttr( c, "realpath", "" ); +// cerr << "unrollLinks() c:" << c->getURL() +// << " realpath:" << realpath +// << endl; + + if( realpath.empty() ) + return c; + + try + { + fh_context nextc = Resolve( realpath ); + if( nextc->getURL() == c->getURL() ) + return c; + return unrollLinks( nextc, levelOfRecursion - 1 ); + } + catch( exception& e ) + { + if( !throwForException ) + return c; + + throw; + } + } + + + string getCWDString() + { + return getCWDDirPath(); +// fh_char c_dir(getcwd(0,0)); // FIXME: Linux only. +// const string& dir = tostr(c_dir); +// return dir; + } + + + fh_context + getCWD() + { + const string& dir = getCWDString(); + RootContextFactory f; + + f.setContextClass( "file" ); + f.AddInfo( RootContextFactory::ROOT, "/" ); + f.AddInfo( RootContextFactory::PATH, dir ); + + fh_context ret = f.resolveContext( RESOLVE_EXACT ); + return ret; + } + + const fh_context& + setCWD(fh_context& ctx) + { + int rc = chdir( ctx->getDirPath().c_str() ); + if( !rc ) + return ctx; + + ostringstream ss; + ss << "Ferris::setCWD() for path:" << ctx->getDirPath(); + Throw_FerrisSetCWDException( tostr(ss), GetImpl(ctx) ); + } + + void ensureEA( fh_context c, + const std::string& name, + const std::string& value ) + { + setStrAttr( c, name, value, true, true ); + } + + static void priv_createEA( fh_context c, + const std::string& name, + const std::string& value, + const std::string& explicitPluginShortName, + bool dontDelegateToOvermountContext ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "ea", "" ); + child->setChild( "name", name ); + child->setChild( "value", value ); + if( dontDelegateToOvermountContext ) + { + child->setChild( "dont-delegate-to-overmount-context", "1" ); + } + if( !explicitPluginShortName.empty() ) + { + child->setChild( "explicit-plugin-name", explicitPluginShortName ); + } +// cerr << "priv_createEA() name:" << name << " value:" << value +// << " value2:" << getStrSubCtx( child, "value", "", true ) +// << endl; + c->createSubContext( "", md ); + } + + void createEA( fh_context c, + const std::string& name, + const std::string& value ) + { + priv_createEA( c, name, value, "", false ); + } + + void createEA( fh_context c, + const std::string& name, + const std::string& value, + const std::string& explicitPluginShortName ) + { + priv_createEA( c, name, value, explicitPluginShortName, true ); + } + + void createEA( fh_context c, + const std::string& name, + const std::string& value, + bool dontDelegateToOvermountContext ) + { + priv_createEA( c, name, value, "", dontDelegateToOvermountContext ); + } + + + + /** + * If the subcontext is bound, return it, otherwise try to create a + * new subcontext with the given name and return it. + * + * @param parent the parent of the desired context + * @param rdn the name of the child of parent that is desired + */ + fh_context acquireSubContext( fh_context parent, + const std::string& rdn, + bool isDir, + int mode, + ContextCreated_Sig_t& sigh ) + { + parent->read(); + LG_CTX_D << "acquireSubContext parent:" << parent->getURL() + << " rdn:" << rdn + << " bound:" << parent->isSubContextBound( rdn ) + << endl; + if( parent->isSubContextBound( rdn ) ) + { + return parent->getSubContext( rdn ); + } + if( isDir ) + { + return Shell::CreateDir( parent, rdn, false, mode, sigh ); + } + else + { + return Shell::CreateFile( parent, rdn, mode, sigh ); + } + } + + + + + fh_context CreateFile( fh_context c, + const std::string& n, + int mode, + ContextCreated_Sig_t& sigh ) + + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "file", "" ); + child->setChild( "name", n ); + if( mode ) + { + child->setChild( "mode", tostr( mode ) ); + child->setChild( "ignore-umask", "1" ); + } + fh_context newc = c->createSubContext( "", md ); + sigh.emit( newc ); + + return newc; + } + + fh_context CreateDB4( fh_context c, + const std::string& n, + int mode, + ContextCreated_Sig_t& sigh ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "db4", "" ); + child->setChild( "name", n ); + if( mode ) + { + child->setChild( "mode", tostr( mode ) ); + child->setChild( "ignore-umask", "1" ); + } + fh_context newc = c->createSubContext( "", md ); + sigh.emit( newc ); + + return newc; + } + fh_context EnsureDB4( const std::string& path, const std::string& n ) + { + try + { + fh_context ret = Resolve( path + "/" + n ); + return ret; + } + catch( exception& e ) + { + return CreateDB4( Resolve(path), n ); + } + + } + + + + /** + * Create a link to existingc in a new object with newrdn under the parent newc_parent. + * Optionally use the URL of the existing object. + */ + fh_context CreateLink( fh_context existingc, + fh_context newc_parent, + const std::string& newrdn, + bool useURL, + bool isSoft, + ContextCreated_Sig_t& sigh ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child; + if( isSoft ) + child = md->setChild( "softlink", "" ); + else + child = md->setChild( "hardlink", "" ); + + string target = existingc->getDirPath(); + if( useURL ) + target = existingc->getURL(); + + child->setChild( "name", newrdn ); + child->setChild( "link-target", target ); + fh_context newc = newc_parent->createSubContext( "", md ); + sigh.emit( newc ); + return newc; + } + + static fh_context CreateDirOneLevel( fh_context c, + const std::string& n, + int mode, + ContextCreated_Sig_t& sigh ) + { + LG_CTX_D << "CreateDirOneLevel() c:" << c->getURL() << " n:" << n << endl; + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( "dir", "" ); + child->setChild( "name", n ); + if( mode ) + { +// cerr << "CreateDirOneLevel() user supplied mode:" << mode << endl; + child->setChild( "mode", tostr(mode) ); + child->setChild( "ignore-umask", "1" ); + } + else + { +// cerr << "CreateDirOneLevel() using mode 770" << endl; + child->setChild( "mode", "770" ); +// child->setChild( "ignore-umask", "1" ); + } + fh_context newc = c->createSubContext( "", md ); +// cerr << "calling emit on sigh for newc:" << newc->getURL() << endl; + + sigh.emit( newc ); + LG_CTX_D << "CreateDirOneLevel() c:" << c->getURL() << " n:" << n + << " newc:" << newc->getURL() + << endl; + return newc; + } + + fh_context CreateDirWithParents( fh_context c, + const std::string& n, + int mode, + ContextCreated_Sig_t& sigh ) + { + typedef Context::SplitPath_t SplitPath_t; + SplitPath_t sp = c->splitPath( n ); + + for( SplitPath_t::iterator iter = sp.begin(); iter != sp.end(); ++iter ) + { + LG_CTX_D << "CreateDirWithParents() c:" << c->getURL() + << " n:" << n + << " iter:" << *iter + << " iter.len:" << iter->length() + << endl; + string rdn = *iter; + + if( rdn.empty() ) + continue; + + try + { + if( c->isSubContextBound( rdn ) ) + { + c = c->getSubContext( rdn ); + } + else + { + fh_context newc = Shell::CreateDirOneLevel( c, rdn, mode, sigh ); + c = newc; + } + } + catch( FerrisCreateSubContextFailed& e ) + { + LG_CTX_D << "CreateDirWithParents() c:" << c->getURL() + << " n:" << n + << " iter:" << *iter + << " FerrisCreateSubContextFailed:" << e.what() + << endl; + c = c->getSubContext( rdn ); + } + } + return c; + } + + + /** + * Create a directory context. + * + * @param c parent of new context + * @param n rdn of new context + * @param WithParents if true then 'n' can be a partial path and all directories + * in that path will be created under the context 'c'. Handy for creating + * directories from a given compile time prefix or ~ etc. + */ + fh_context CreateDir( fh_context c, + const std::string& n, + bool WithParents, + int mode, + ContextCreated_Sig_t& sigh ) + { + if( !WithParents ) + { + return CreateDirOneLevel( c, n, mode, sigh ); + } + return CreateDirWithParents( c, n, mode, sigh ); + } + + /** + * Create a directory context. + * + * @param path the new context to create + * @param WithParents if true then create all parent directories if they + * dont already exist. If false then only one directory may be created. + */ + fh_context CreateDir( const std::string& path, + bool WithParents, + int mode, + ContextCreated_Sig_t& sigh ) + { + fh_context rc = Resolve("/"); + + if( !WithParents ) + { + typedef Context::SplitPath_t SplitPath_t; + SplitPath_t sp = rc->splitPath( path ); + + string rdn = sp.back(); + string cpath = path.substr( 0, path.length() - rdn.length() ); + fh_context c = Resolve( cpath ); + + return CreateDirOneLevel( c, rdn, mode, sigh ); + } + + string earl = CleanupURL( path ); + FerrisURL u = FerrisURL::fromString( earl ); + string scheme = u.getInternalFerisScheme(); + string url = u.getPath(); + + LG_CTX_D << "CreateDir() scheme:" << scheme << " url:" << url << endl; + + return CreateDirWithParents( Resolve(scheme + ":///"), url, mode, sigh ); + } + +// // +// // FIXME: should walk known schemes here too +// // +// bool isRelativePath( const std::string& path ) +// { +// return( !starts_with( path, "/" ) +// && !starts_with( path, "file:" ) +// && !starts_with( path, "~" ) +// && !starts_with( path, "root:" ) +// && !starts_with( path, "x-ferris:" ) ); +// } + + +// template<> + stringlist_t::iterator XparseSeperatedList( const std::string& s, + stringlist_t& c, + stringlist_t::iterator out, + const char sepchar ) + { +// bool dummy = Loki::Conversion< OutputIterator, stringlist_t::iterator >::exists; + + std::string tmp; + std::stringstream ss(s); + while( std::getline( ss, tmp, sepchar )) + if( !tmp.empty() ) + { + *++out = tmp; + } + + return out; + } + + + fh_context acquireContext( std::string path, + int mode, + bool isDir, + ContextCreated_Sig_t& sigh ) + { +// cerr << "acquireContext() path:" << path << " isrel:" << isRelativePath(path) +// << endl; +// if( isRelativePath(path) ) +// { +// path = getCWDDirPath() + "/" + path; +// } + + LG_CTX_D << "acquireContext(top) path:" << path << endl; + try + { + fh_context c = Resolve( path ); + return c; + } + catch( exception& e ) + { + LG_CTX_D << "acquireContext() e:" << e.what() << endl; +// string rootdir = "/"; +// if( path.find(":") != string::npos ) +// { +// rootdir = path.substr( 0, path.find(":") ) + "://"; +// path = path.substr( path.find(":")+1 ); +// PrefixTrimmer trimmer; +// trimmer.push_back( "/" ); +// path = trimmer( path ); +// } +// if( starts_with( path, "~" )) +// { +// rootdir = "~"; +// PrefixTrimmer trimmer; +// trimmer.push_back( "/" ); +// trimmer.push_back( "~" ); +// path = trimmer( path ); +// } + +// LG_CTX_D << "acquireContext() path:" << path +// << " root:" << rootdir +// << endl; + +// fh_context c = 0; +// if( isDir ) +// c = Shell::CreateDir( Resolve( rootdir ), path, true, mode, sigh ); +// else +// c = Shell::CreateFile( Resolve( rootdir ), path, mode, sigh ); +// return c; + + + +// cerr << "acquireContext(make) path:" << path << endl; + + + + + + string rdn = ""; +// int slashpos = path.find("/"); + int slashpos = -1; + fh_context lastc = 0; + if( string::npos == path.find("/") ) + { + lastc = getCWD(); + } + else + { + if( path.find("/") == 0 ) + slashpos = 0; + + while( true ) + { + try + { + int tpos = path.find( '/', slashpos+1 ); + LG_CTX_D << "acquireContext(seeking) path:" << path + << " path.substr:" << path.substr( 0, tpos ) + << " slashpos:" << slashpos + << " tpos:" << tpos + << endl; + fh_context tc = Resolve( path.substr( 0, tpos )); + slashpos = tpos; + lastc = tc; + } + catch( ... ) + { + break; + } + } + } + + LG_CTX_D << "acquireContext(lastc) lastc:" << toVoid(lastc) << endl; + + fh_context parent = lastc; + LG_CTX_D << "acquireContext(lastc) parent:" << toVoid(parent) << endl; + LG_CTX_D << "acquireContext(lastc) parent:" << parent->getURL() << endl; + + rdn = path.substr( slashpos+1, path.length() - slashpos ); + + LG_CTX_D << "TOUCH() parent:" << parent->getURL() + << " rdn:" << rdn + << " slashpos:" << slashpos + << endl; +// cerr << "TOUCH() parent:" << parent->getURL() +// << " rdn:" << rdn +// << " slashpos:" << slashpos +// << endl; + + /** + * Make all non terminal objects directories and the last object a file + * if we are requested to make a 'file' + */ + fh_context c = parent; + stringlist_t rdnlist; + Util::parseSeperatedList( rdn, rdnlist, back_inserter( rdnlist ), '/' ); +// XparseSeperatedList( rdn, rdnlist, back_inserter( rdnlist ), '/' ); + for( stringlist_t::const_iterator si = rdnlist.begin(); si != rdnlist.end(); ++si ) + { + string rdn = *si; + + bool createDir = isDir; + stringlist_t::const_iterator nextiter = si; + ++nextiter; + if( nextiter != rdnlist.end() ) + createDir = true; + + LG_CTX_D << "TOUCH(building) c:" << c->getURL() + << " rdn:" << rdn + << endl; + + if( createDir ) + c = Shell::CreateDir( c, rdn, true, mode, sigh ); + else + c = Shell::CreateFile( c, rdn, mode, sigh ); + } + return c; + } + } + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace Shell + { + string getHomeDirPath_nochecks() + { + static bool cached_ret_set = false; + static string cached_ret; + + if( !runningSetUID() && cached_ret_set ) + return cached_ret; + + string ret; + + +// const char *home = g_get_home_dir(); +// const char *home = getenv("HOME"); +// ret = home; + ret = ferris_g_get_home_dir(); + + if( !cached_ret_set ) + { + cached_ret_set = true; + cached_ret = ret; + } + + return ret; + } + + string getCWDDirPath() + { + gchar* cdir = g_get_current_dir(); + string ret = cdir; + g_free(cdir); + return ret; + } + + void setCWDDirPath( const std::string& p ) + { + if( 0 != chdir( p.c_str() )) + { + int eno = errno; + fh_stringstream ss; + ss << "Can not setCWDDirPath to p:" << p << endl; + ThrowFromErrno( eno, tostr(ss), 0 ); + } + } + + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + /** + * + * NOTE: This is under debait as to if this class should be used or + * appendToPath() used to pass the full path to system calls. + * + * Sets the CWD to the given value and then restores it when this + * object is deleted. The use of this class could also hold a lock + * against other users of setCWDDirPath() so that they have to wait + * for this object to die. + */ + class FERRISEXP_DLLLOCAL HoldRestoreCWD + { + const std::string& oldCWD; + public: + HoldRestoreCWD( const std::string& p ); + ~HoldRestoreCWD(); + }; + + + HoldRestoreCWD::HoldRestoreCWD( const std::string& p ) + : + oldCWD( getCWDDirPath() ) + { + setCWDDirPath( p ); + } + + HoldRestoreCWD::~HoldRestoreCWD() + { + setCWDDirPath( oldCWD ); + } + + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + + + string getTmpDirPath() + { + const char *td = getenv("FERRIS_TMP"); +// cerr << "getTmpDirPath() td:" << ( td ? td : "null" ) << endl; + if( td ) + { + return td; + } + return g_get_tmp_dir(); + } + + + + string getHomeDirPath() + { + string ret = getHomeDirPath_nochecks(); + + + if(!ret.length()) + { + LG_PATHS_ER + << "Can not determine home directory! please set HOME and try again" + << endl; + exit(1); + } + + return ret; + } + + bool contextExists( const std::string& path ) + { + try + { + fh_context c = Resolve( path ); + return true; + } + catch(...) + { + } + return false; + } + + + static struct passwd* passwd_lookup_by_name( string name ) + { + if( name.empty() ) + { + struct passwd* ptr = getpwuid( getuid() ); + return ptr; + } + + struct passwd* ptr = getpwnam( name.c_str() ); + return ptr; + +// struct passwd* ptr = 0; + +// setpwent(); +// while( ptr = getpwent() ) +// { +// if( name == ptr->pw_name ) +// break; +// } +// endpwent(); +// return ptr; + } + + uid_t getUserID( const std::string& name ) + { + struct passwd* ptr = passwd_lookup_by_name( name ); + + if( ptr ) + return ptr->pw_uid; + + fh_stringstream ss; + ss << "Cant find user:" << name << " in password database"; + Throw_NoSuchUser( tostr(ss), 0 ); + } + + gid_t getGroupID( const std::string& name ) + { + struct passwd* ptr = passwd_lookup_by_name( name ); + + if( ptr ) + return ptr->pw_gid; + + fh_stringstream ss; + ss << "Cant find user:" << name << " in password database"; + Throw_NoSuchUser( tostr(ss), 0 ); + } + + string getUserName( uid_t id ) + { + struct passwd* p = getpwuid( id ); + return ( p ? p->pw_name : "" ); + } + + string getGroupName( gid_t id ) + { + struct group *g = getgrgid( id ); + return( g ? g->gr_name : "" ); + } + + fh_context touch( const std::string& path, + bool create, + bool isDir, + int mode, + bool touchMTime, + bool touchATime, + time_t useMTime, + time_t useATime ) + { + return touch( path, "", + create, isDir, mode, + touchMTime, touchATime, + useMTime, useATime ); + } + + fh_context touch( const std::string& path, + const std::string& SELinux_context, + bool create, + bool isDir, + int mode, + bool touchMTime, + bool touchATime, + time_t useMTime, + time_t useATime ) + { + int rc = 0; + fh_context c = 0; + + if( create ) + { + c = acquireContext( path, mode, isDir ); + } + else + c = Resolve( path ); + + if( !SELinux_context.empty() ) + { + setStrAttr( c, + "dontfollow-selinux-context", + SELinux_context, + true, true ); + } + + struct utimbuf tbuf; + time_t timenow = Time::getTime(); + + if( touchMTime ) + { + if( useMTime ) tbuf.modtime = useMTime; + else tbuf.modtime = timenow; + } + else + { + tbuf.modtime = toType(getStrAttr( c, "mtime", "0", true, true )); + } + + if( touchATime ) + { + if( useATime ) tbuf.actime = useATime; + else tbuf.actime = timenow; + } + else + { + tbuf.actime = toType(getStrAttr( c, "atime", "0", true, true )); + } + + + + + if( c->getIsNativeContext() ) + { + rc = utime( c->getDirPath().c_str(), &tbuf ); + + if( rc ) + { + int eno = errno; + fh_stringstream ss; + ss << "Can not touch file url:" << c->getURL() << endl; + ThrowFromErrno( eno, tostr(ss), 0 ); + } + } + + + return c; + } + + int generateTempFD( std::string& templateStr ) + { + string s = templateStr; + if( !ends_with( s, "XXXXXX" ) ) + { + int dotpos = s.rfind( "." ); + if( dotpos == string::npos ) + { + s = s + "XXXXXX"; + } + else + { + s = s.substr( 0, dotpos ) + "-XXXXXX" + s.substr( dotpos ); + } + } + + int fd = mkstemp( (char*)s.c_str() ); + + if( fd == -1 ) + { + ThrowFromErrno( errno, (string)"error creating tempfile at:" + s ); + } + templateStr = s; + return fd; + } + + + fh_iostream generteTempFile( std::string& templateStr, bool closeFD ) + { + int fd = generateTempFD( templateStr ); + fh_iostream ret = Factory::MakeFdIOStream( fd, closeFD ); + return ret; + } + + + fh_context generateTempDir( std::string& templateStr ) + { + string s = templateStr; + if( !starts_with( s, "/tmp" ) ) + { + stringstream ss; + ss << "/tmp/" << getuid() << "-" << s; + s = ss.str(); + } + + if( !ends_with( s, "XXXXXX" ) ) + { + int dotpos = s.rfind( "." ); + if( dotpos == string::npos ) + { + s = s + "XXXXXX"; + } + else + { + s = s.substr( 0, dotpos ) + "-XXXXXX" + s.substr( dotpos ); + } + } + + char* p = mkdtemp( (char*)s.c_str() ); + if( !p ) + { + ThrowFromErrno( errno, (string)"error creating temp dir at:" + s ); + } + + + templateStr = p; + fh_context ret = Resolve( templateStr ); + return ret; + } + + int generateTempFD() + { + string s = "/tmp/temp"; + return generateTempFD( s ); + } + + int + generateTempFD( const char* templateStrReadOnly ) + { + string s = templateStrReadOnly; + return generateTempFD( s ); + } + + + fh_iostream generteTempFile( bool closeFD ) + { + string s = "/tmp/temp"; + return generteTempFile( s, closeFD ); + } + + + + }; +}; diff --git a/Ferris/Shell.hh b/Ferris/Shell.hh new file mode 100644 index 0000000..4604468 --- /dev/null +++ b/Ferris/Shell.hh @@ -0,0 +1,292 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Shell.hh,v 1.13 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_SHELL_H__ +#define __GTK_FERRIS_SHELL_H__ + +#include +#include +#include +#include + +#include + +#include + +namespace Ferris +{ + /** + * Test to see if the context 'p' is a transitive parent of the context 'base'. + * + * @param p The context that should be a transitive parent of base + * @param base The context that should be a transitive child of p + * @return true of p is reachable as a parent from base or false otherwise + */ + FERRISEXP_API bool isTransitiveParent( fh_context base, fh_context p ); + + + /** + * Tell libferris that it will be running set UID. + */ + FERRISEXP_API void setRunningSetUID( bool v ); + + /** + * Some functionality in libferris is dropped out when + * running set UID. + */ + FERRISEXP_API bool runningSetUID(); + + /** + * Try to work out as quickly as possible if the given URL can + * be resolved. For file:// URLs this might use lstat() instead + * of Resolve() to get that little bit of extra speed. + */ + FERRISEXP_API bool canResolve( const std::string& s ); + + /** + * Performs the same action as readlink --canonicalize-missing on the URL + */ + FERRISEXP_API std::string canonicalizeMissing( const std::string& earl ); + + + /** + * Note that the use of ContextCreated_Sig_t is entirely optional. It is there + * mainly to allow clients to have full access to an audit trail of mkdir -p + * type actions. + * + * Usage of the 'int mode' param is also optional, sane defaults are provided + * which allow fairly restricted access by default. Use MakeChmodMode() to parse + * a standard mode spec to obtain the normalized mode for use in parameters. + */ + namespace Shell + { + typedef sigc::signal1< void, fh_context > ContextCreated_Sig_t; + FERRISEXP_API ContextCreated_Sig_t& getNullContextCreated_Sig(); + + /** + * Quote the given string for use in a shell if it needs quoting. + */ + FERRISEXP_API std::string quote( const std::string& s ); + + /** + * If c is a soft/hardlink then return what it points to. + * if what it points to is also a link then resolve that again. + * + * @param throwForException if true then throw errors to the caller, + * otherwise if there is a problem resolving one of + * the links then just return the last context in the resolution + * @param levelOfRecursion max number of times to try to find a non + * link target. + * @returns the last attempt to find a non link target. + */ + FERRISEXP_API fh_context unrollLinks( fh_context c, + bool throwForException = true, + int levelOfRecursion = 255 ); + + FERRISEXP_API std::string getCWDString(); + FERRISEXP_API fh_context getCWD(); + FERRISEXP_API const fh_context& setCWD(fh_context& ctx); + + /** + * Create a new name/value EA for the given context. + */ + FERRISEXP_API void createEA( fh_context c, + const std::string& name, + const std::string& value ); + + /** + * Sometimes the plugin used should be explicitly specified. For example, + * copying a file from an NFS share to a local disk, most user written EA + * will be in RDF for the source file and we would like to preserve this + * in the destination if possible by writing that same metadata into RDF + * again. + */ + FERRISEXP_API void createEA( fh_context c, + const std::string& name, + const std::string& value, + const std::string& explicitPluginShortName ); + + /** + * For files which are overmounted, for example, the path /tmp/example.xml, + * we want the ability to create an extended attribute on the file itself + * rather than delegating to the XML handler. + */ + FERRISEXP_API void createEA( fh_context c, + const std::string& name, + const std::string& value, + bool dontDelegateToOvermountContext ); + + /** + * Ensure that a given EA exists for the context and has the given value. + */ + FERRISEXP_API void ensureEA( fh_context c, + const std::string& name, + const std::string& value ); + FERRISEXP_API fh_context CreateFile( fh_context c, + const std::string& n, + int mode = 0, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + FERRISEXP_API fh_context CreateDB4( fh_context c, + const std::string& n, + int mode = 0, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + FERRISEXP_API fh_context EnsureDB4( const std::string& path, const std::string& n ); + FERRISEXP_API fh_context CreateLink( fh_context existingc, + fh_context newc_parent, + const std::string& newrdn, + bool useURL = false, + bool isSoft = true, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + FERRISEXP_API fh_context CreateDir( fh_context c, + const std::string& n, + bool WithParents = false, + int mode = 0, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + FERRISEXP_API fh_context CreateDir( const std::string& path, + bool WithParents = false, + int mode = 0, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + FERRISEXP_API fh_context acquireSubContext( fh_context parent, + const std::string& rdn, + bool isDir = false, + int mode = 0, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + + + /** + * get the directory context at path, create it if it doesn't exist yet. + */ + FERRISEXP_API fh_context acquireContext( std::string path, + int mode = 0, + bool isDir = true, + ContextCreated_Sig_t& sigh = + Ferris::Shell::getNullContextCreated_Sig() ); + + + FERRISEXP_API std::string getHomeDirPath_nochecks(); + FERRISEXP_API std::string getHomeDirPath(); + FERRISEXP_API std::string getCWDDirPath(); + FERRISEXP_API void setCWDDirPath( const std::string& p ); + FERRISEXP_API std::string getTmpDirPath(); + + FERRISEXP_API bool contextExists( const std::string& path ); + + + /** + * lookup the numerical user ID for a user with a given login name + * @param name Name of user to find numerical ID for. default is + * user running current proccess. + */ + FERRISEXP_API uid_t getUserID( const std::string& name = "" ); + + /** + * lookup the numerical group ID for a user with a given login name + * @param name Name of user to find numerical ID for. default is + * user running current proccess. + */ + FERRISEXP_API gid_t getGroupID( const std::string& name = "" ); + + /** + * lookup a user name for a given user ID + */ + FERRISEXP_API std::string getUserName( uid_t id ); + /** + * lookup a group name for a given group ID + */ + FERRISEXP_API std::string getGroupName( gid_t id ); + + + + /** + * touch a context updating the mtime, atime or both. + * Optionally create the target context as either a file + * by default or a directory if isDir is true. The initial + * mode for the new object(s) can be set using the mode arg. + * Control over what time values are updated and to what value + * is exposed with the touch?Time, use?Time args. + * + * @return The context that was touched + * @arg path The path of the context to touch + * @arg create if true and the target context doesn't exist + * then it will be created first + * @arg isDir If new context(s) are required set this to true to + * create directories instead of files by default + * @arg mode chmod like protection for new objects + * @arg touchMTime Should mtime be updated + * @arg touchATime Should atime be updated + * @arg useMTime set the modification time value to set the object + * at path to. A default value of zero means to set + * to time to Time::getTime(), ie the current time. + * @arg useATime set the atime time value to set the object + * at path to. A default value of zero means to set + * to time to Time::getTime(), ie the current time. + * + * + */ + FERRISEXP_API fh_context touch( const std::string& path, + bool create = true, + bool isDir = false, + int mode = 0, + bool touchMTime = true, + bool touchATime = true, + time_t useMTime = 0, + time_t useATime = 0 ); + FERRISEXP_API fh_context touch( const std::string& path, + const std::string& SELinux_context, + bool create = true, + bool isDir = false, + int mode = 0, + bool touchMTime = true, + bool touchATime = true, + time_t useMTime = 0, + time_t useATime = 0 ); + + /** + * Generate a unique tempfile with the given path prefix. + * the given string is updated and the opened file is returned. + */ + fh_iostream generteTempFile( std::string& templateStr, bool closeFD = true ); + int generateTempFD( const char* templateStrReadOnly ); + int generateTempFD( std::string& templateStr ); + int generateTempFD(); + fh_iostream generteTempFile( bool closeFD = true ); + fh_context generateTempDir( std::string& templateStr ); + + }; + + +}; +#endif diff --git a/Ferris/SignalStreams.cpp b/Ferris/SignalStreams.cpp new file mode 100644 index 0000000..2650421 --- /dev/null +++ b/Ferris/SignalStreams.cpp @@ -0,0 +1,754 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SignalStreams.cpp,v 1.4 2010/09/24 21:30:59 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include // only for loki +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef FERRIS_HAVE_LIBZ +#include +#endif + +#ifdef FERRIS_HAVE_BZIP2 +#include +#endif + +using namespace std; +using namespace FerrisLoki; + +namespace Ferris +{ + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +static const char* COMPRESSION_SENTINAL = "is-ferris-compressed"; +static const char* COMPRESSION_BITMAP = "compression-bitmap"; +static const char* COMPRESSION_ALGO = "compression-algo"; +static const char* COMPRESSION_BLOCKSZ = "compression-block-size"; +static const char* COMPRESSION_LEVEL = "compression-level"; + +static void readBitmap( fh_context c, intmap_t& b ) +{ + fh_stringstream ss; + ss << getStrAttr( c, COMPRESSION_BITMAP, "", true, true ); + + while( ss->good() ) + { + string k, v; + getline( ss, k, '=' ); + getline( ss, v ); + b[ toint(k) ] = toint(v); + } +} +static void writeBitmap( fh_context c, const intmap_t& b ) +{ + fh_attribute a = c->acquireAttribute( COMPRESSION_BITMAP ); + fh_ostream ss = a->getIOStream( ios::trunc | ios::out ); + + for( intmap_t::const_iterator bi = b.begin(); bi!=b.end(); ++bi ) + { + ss << bi->first << "=" << bi->second << endl; + } + +// bool TESTING = 1; +// if( TESTING ) +// { +// intmap_t x; +// readBitmap( c, x ); +// cerr << "Write test, should have saved " << endl; +// for( intmap_t::iterator bi = b.begin(); bi != b.end(); ++bi ) +// { +// cerr << "logical:" << bi->first << " phy:" << bi->second << endl; +// } + +// cerr << "write test. READ BACK FOLLOWING dump_bitmap_to_cerr()" << endl; +// for( intmap_t::iterator bi = x.begin(); bi != x.end(); ++bi ) +// { +// cerr << "logical:" << bi->first << " phy:" << bi->second << endl; +// } + +// } +} + +static int compressed_buffer_size( std::streamsize src_sz ) +{ + // bzip2 has the largest compressed buffer size requirements of no compression/gzip/bzip2 + // ftp://sources.redhat.com/pub/bzip2/docs/manual_3.html + // + // 1% larger than the uncompressed data, plus six hundred extra bytes. + double sz = src_sz; + sz *= 1.01; + sz += 600; + return (int)sz; +} + +static char* compressed_buffer_alloc( std::streamsize src_sz ) +{ + char* b = new char[ compressed_buffer_size( src_sz ) ]; + return b; +} + +static void compressed_buffer_free( char* p ) +{ + delete [] p; +} + + +/** + * Use the given algo to compress src_sz bytes from src to dst. + * level is an algo specific hint as the CPU/compression trade off + * + * return the size of data from dst that has been used for the compressed version + */ +static std::streamsize cf_compress( int algo, + void* dst, std::streamsize dst_sz, + const void* src, std::streamsize src_sz, + int level ) +{ + std::streamsize ret = 0; + +#ifdef FERRIS_HAVE_LIBZ + if( algo == Factory::COMPRESS_GZIP ) + { + // compress the buffer here + static const char* myVersion = ZLIB_VERSION; + + if (zlibVersion()[0] != myVersion[0]) + { + fh_stringstream ss; + ss << "incompatible zlib version"; + Throw_CompressionAlgoNotFoundException( tostr(ss), 0 ); + } + else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) + { + cerr << "warning: different zlib version" << endl; + } + + LG_IOSTREAM_D << "compressing src_sz:" << src_sz + << " dst_sz:" << dst_sz + << " dst:" << toVoid(dst) + << " src:" << toVoid(src) + << " level:" << level + << " algo:" << algo + << endl; + + uLongf gz_sz = dst_sz; + int rc = compress2( (Bytef*)dst, &gz_sz, + (const Bytef *)src, (uLong)src_sz, + level ); + ret = gz_sz; + + if( rc != Z_OK ) + { + switch( rc ) + { + case Z_MEM_ERROR: + case Z_BUF_ERROR: + default: + fh_stringstream ss; + ss << "strange problem with compress2() rc:" << rc; + Throw_CompressionException( tostr(ss), 0 ); + } + } + } +#endif +#ifdef FERRIS_HAVE_BZIP2 + if( algo == Factory::COMPRESS_BZIP2 ) + { + // compress the buffer here + int blockSize100k = min( level, 9 ); + int workFactor = 0; + + unsigned int dsz = dst_sz; + int rc = BZ2_bzBuffToBuffCompress( (char*)dst, &dsz, + (char*)src, src_sz, + blockSize100k, 0, workFactor ); + ret = dsz; + + if( rc != BZ_OK ) + { + fh_stringstream ss; + ss << "Problem with bzip2 compression rc:" << rc; + Throw_CompressionException( tostr(ss), 0 ); + } + } +#endif + + if( algo == Factory::COMPRESS_NONE ) + { + memcpy( dst, src, src_sz ); + ret = src_sz; + LG_IOSTREAM_D << "cf_compress() src_sz:" << src_sz << " ret:" << ret << endl; + } + return ret; +} + +/** + * opposive of cf_compress() + * + * Use the given algo to decompress src_sz bytes from src to dst. + * level is an algo specific hint as the CPU/compression trade off + * + * return the size of data from dst that has been used for the compressed version + */ +static std::streamsize cf_decompress( int algo, + gpointer dst, std::streamsize dst_sz, + gpointer src, std::streamsize src_sz, + int level ) +{ + std::streamsize ret = 0; + +#ifdef FERRIS_HAVE_LIBZ + if( algo == Factory::COMPRESS_GZIP ) + { + static const char* myVersion = ZLIB_VERSION; + + if (zlibVersion()[0] != myVersion[0]) + { + fh_stringstream ss; + ss << "incompatible zlib version"; + Throw_CompressionAlgoNotFoundException( tostr(ss), 0 ); + } + else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) + { + cerr << "warning: different zlib version" << endl; + } + + LG_IOSTREAM_D << "cf_decompress() src_sz:" << src_sz + << " dst_sz:" << dst_sz + << endl; + + uLongf gz_sz = dst_sz; + int rc = uncompress( (Bytef*)dst, &gz_sz, (const Bytef *)src, src_sz ); + ret = gz_sz; + + if( rc != Z_OK ) + { + switch( rc ) + { + case Z_MEM_ERROR: + case Z_BUF_ERROR: + default: + fh_stringstream ss; + ss << "strange problem with decompress() rc:" << rc; + Throw_CompressionException( tostr(ss), 0 ); + } + } + } +#endif +#ifdef FERRIS_HAVE_BZIP2 + if( algo == Factory::COMPRESS_BZIP2 ) + { + int verbosity = 0; + int small = 0; + unsigned int dsz = dst_sz; + + int rc = BZ2_bzBuffToBuffDecompress ( (char*)dst, &dsz, + (char*)src, src_sz, + small, verbosity ); + ret = dsz; + + if( rc != BZ_OK ) + { + fh_stringstream ss; + ss << "Problem with bzip2 decompression rc:" << rc; + Throw_CompressionException( tostr(ss), 0 ); + } + } +#endif + + if( algo == Factory::COMPRESS_NONE ) + { + memcpy( dst, src, src_sz ); + ret = src_sz; + } + return ret; +} + + + +template< + class _CharT, + class _Traits = std::char_traits < _CharT >, + class _Alloc = std::allocator < _CharT >, + class _BufferSizers = ferris_basic_streambuf_virtual +// class _BufferSizers = ferris_basic_streambuf_fourk + > +class FERRISEXP_DLLLOCAL basic_chunkedfile_streambuf + : + public ferris_basic_streambuf< _CharT, _Traits, _Alloc, _BufferSizers > +{ + typedef basic_chunkedfile_streambuf< _CharT, _Traits, _Alloc, _BufferSizers > _Self; + typedef ferris_basic_streambuf< _CharT, _Traits, _Alloc, _BufferSizers > _Base; + +public: + + /** + * Mapping of logical block number to file name number + */ + intmap_t m_bitmap; + + /** + * Current logical block being used. + */ + int m_currentBlock; + + /** + * size that each block should be close to in ideal world + */ + int m_blocksize; + + /** + * algo to use + */ + int m_algo; + + /** + * level of compression to use + */ + int m_level; + + /** + * Context that contains the chunks + */ + fh_context m_ctx; + + typedef char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + basic_chunkedfile_streambuf( fh_context c, int blocksize ) + : + _Base( new char_type[ blocksize ], blocksize ), + m_ctx( c ), + m_blocksize( blocksize ), + m_currentBlock( 0 ), + m_algo( Factory::COMPRESS_NONE ), + m_level( 1 ) + { + this->setBufSize( blocksize ); + + m_algo = toint(getStrAttr( c, COMPRESSION_ALGO, tostr(Factory::COMPRESS_NONE), true, true )); + m_level = toint(getStrAttr( c, COMPRESSION_LEVEL, tostr(1), true, true )); + + readBitmap( m_ctx, m_bitmap ); + } + + virtual ~basic_chunkedfile_streambuf() + { +// cerr << "~basic_chunkedfile_streambuf(1)" << endl; + ensureMode( this->mode_mute ); + writeBitmap( m_ctx, m_bitmap ); + } + + void delete_all_chunks() + { + for( int i=0; m_bitmap.end() != m_bitmap.find( i ); ++i ) + { + int phyBlock = m_bitmap[ i ]; + string rdn = tostr( phyBlock ); + LG_IOSTREAM_D << "Removing chunk at:" << rdn << endl; + m_ctx->remove( rdn ); + } + } + + +protected: + + /** + * Write out the data starting at buffer of length sz to the "external" + * device. + * + * return -1 for error or 0 for success + */ + virtual int write_out_given_data( const char_type* buffer, std::streamsize sz ) + { + if( m_bitmap.end() == m_bitmap.find( m_currentBlock ) ) + { + m_bitmap[ m_currentBlock ] = m_currentBlock; + } + int phyBlock = m_bitmap[ m_currentBlock ]; + m_currentBlock++; + string rdn = tostr( phyBlock ); + + if( !m_ctx->isSubContextBound( rdn )) + { + Shell::CreateFile( m_ctx, rdn ); + } + fh_context pc = m_ctx->getSubContext( rdn ); + fh_iostream ioss = pc->getIOStream( ios::trunc | ios::out ); + + char* compressed_buffer = compressed_buffer_alloc( m_blocksize ); + int compressed_sz = cf_compress( m_algo, + compressed_buffer, + compressed_buffer_size( m_blocksize ), + buffer, sz, + m_level ); + ioss.write( compressed_buffer, compressed_sz ); + LG_IOSTREAM_D << "write_out_given_data() blocknum:" << m_currentBlock + << " compressed_sz:" << compressed_sz + << " input_sz:" << sz + << endl; + compressed_buffer_free( compressed_buffer ); + + return ioss.good() ? 0 : -1; + } + + void dump_bitmap_to_cerr() + { + LG_IOSTREAM_ER << "dump_bitmap_to_cerr()" << endl; + for( intmap_t::iterator bi = m_bitmap.begin(); bi != m_bitmap.end(); ++bi ) + { + LG_IOSTREAM_ER << "logical:" << bi->first << " phy:" << bi->second << endl; + } + } + + /** + * This is the only methods that really needs to be here. It gets + * up to maxsz data into buffer and returns how much data was really + * read. Return 0 for a failure, you must read atleast one byte. + */ + virtual int make_new_data_avail( char_type* buffer, std::streamsize maxsz ) + { + if( m_bitmap.end() == m_bitmap.find( m_currentBlock ) ) + { + LG_IOSTREAM_ER << "make_new_data_avail() m_currentBlock:" << m_currentBlock + << " not in bitmap" << endl; + dump_bitmap_to_cerr(); + return 0; + } + int phyBlock = m_bitmap[ m_currentBlock ]; + m_currentBlock++; + fh_context pc = m_ctx->getSubContext( tostr( phyBlock ) ); + int pc_sz = toint(getStrAttr( pc, "size", tostr(maxsz) )); +// if( pc_sz > maxsz ) pc_sz = maxsz; + + fh_istream iss = pc->getIStream(); + char* compressed_buffer = new char[ pc_sz + 1 ]; + iss.read( compressed_buffer, pc_sz ); + int real_sz = cf_decompress( m_algo, + buffer, m_blocksize, + compressed_buffer, iss.gcount(), + m_level ); + delete [] compressed_buffer; + + LG_IOSTREAM_D << "make_new_data_avail() block:" << (m_currentBlock-1) + << " read:" << iss.gcount() << endl; + + return real_sz; + } + +private: + + // prohibit copy/assign + basic_chunkedfile_streambuf( const basic_chunkedfile_streambuf& ); + basic_chunkedfile_streambuf& operator = ( const basic_chunkedfile_streambuf& ); +}; + + +template< + typename _CharT, + typename _Traits = std::char_traits < _CharT >, + typename _Alloc = std::allocator < _CharT > +> + +class FERRISEXP_DLLLOCAL ChunkedIOStream + : + public Ferris_iostream< _CharT, _Traits > +{ + typedef ChunkedIOStream<_CharT, _Traits,_Alloc> _Self; + + typedef basic_chunkedfile_streambuf<_CharT, _Traits> ss_impl_t; + FERRIS_SMARTPTR( ss_impl_t, ss_t ); + ss_t ss; + +public: + + typedef typename std::char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef emptystream_methods< _CharT, _Traits > delegating_methods; + + ChunkedIOStream( fh_context c, int blocksize ) + : + ss( new ss_impl_t( c, blocksize )) + { + init( rdbuf() ); + setsbT( GetImpl(ss) ); +// cerr << "ChunkedIOStream() c:" << c->getURL() << endl; + } + + ChunkedIOStream( const ChunkedIOStream& rhs ) + : + ss( rhs.ss ) + { + init( rdbuf() ); + setsbT( GetImpl(ss) ); + } + + + + virtual ~ChunkedIOStream() + {} + + _Self* operator->() + { + return this; + } + + ss_impl_t* + rdbuf() const + { + return GetImpl(ss); + } + + + enum + { + stream_readable = true, + stream_writable = true + }; +}; + + +/********************************************************************************/ +/********************************************************************************/ + +bool isCompressedContext( fh_context c ) +{ + return c->isCompressedContext(); +} + + namespace Factory + { + ConvertToCompressedChunkContextProgress_Sig_t& getNullConvertToCompressedChunkContextProgress_Sig() + { + static ConvertToCompressedChunkContextProgress_Sig_t s; + return s; + } + + + static void checkIfSupportingAlgo( fh_context c, int algo ) + { + if( algo == COMPRESS_INVALID ) + { + fh_stringstream ss; + ss << "Invalid compression chosen"; + Throw_CompressionAlgoNotFoundException( tostr(ss), GetImpl(c) ); + } +#ifndef FERRIS_HAVE_LIBZ + if( algo == COMPRESS_GZIP ) + { + fh_stringstream ss; + ss << "This version of libferris can not handle the algo chosen for compression"; + Throw_CompressionAlgoNotFoundException( tostr(ss), GetImpl(c) ); + } +#endif +#ifndef FERRIS_HAVE_BZIP2 + if( algo == COMPRESS_BZIP2 ) + { + fh_stringstream ss; + ss << "This version of libferris can not handle the algo chosen for compression"; + Throw_CompressionAlgoNotFoundException( tostr(ss), GetImpl(c) ); + } +#endif + } + + static ChunkedIOStream priv_getCompressedChunkIOStream( fh_context c ) + { + int algo = toint(getStrAttr( c, COMPRESSION_ALGO, "0", true, true )); + int blocksize = toint(getStrAttr( c, COMPRESSION_BLOCKSZ, "0", true, true )); + checkIfSupportingAlgo( c, algo ); + +// intmap_t bm; +// readBitmap( c, bm ); + + return ChunkedIOStream( c, blocksize ); + } + + + fh_iostream getCompressedChunkIOStream( fh_context c ) + { + return priv_getCompressedChunkIOStream( c ); + } + + static void priv_ConvertToCompressedChunkContext( fh_context c, + fh_context target, + int blocksize, + int algo, + int compress_level, + ConvertToCompressedChunkContextProgress_Sig_t& progress_sig ) + { + checkIfSupportingAlgo( c, algo ); + + if( blocksize == 0 ) + { + blocksize = compress_level * 100 * 1024; + } + + fh_istream iss = c->getIStream(); + int mode = toint( getStrAttr( target, "mode", "644" )); + mode |= S_IXUSR; + intmap_t bm; + + int totalblocks = toint(getStrAttr( c, "size", "0" )) / blocksize; + + char* buffer = compressed_buffer_alloc( blocksize ); + char* uncompressed_buffer = new char[ blocksize + 1 ]; + for( int n=0; iss.good(); ++n ) + { + iss.read( uncompressed_buffer, blocksize ); + + // possibly compress buffer + int compressedsz = cf_compress( algo, + buffer, + compressed_buffer_size( blocksize ), + uncompressed_buffer, iss.gcount(), + compress_level ); + + LG_IOSTREAM_D << "ConvertToCompressedChunkContext() source block:" << blocksize + << " gcount:" << iss.gcount() + << " compressedsize:" << compressedsz + << endl; + + // write compressed chunk + fh_context chunk = Shell::CreateFile( target, tostr(n), mode ); + fh_iostream oss = chunk->getIOStream( ios::trunc | ios::out ); + oss.write( buffer, compressedsz ); +// int wsz = oss.wcount(); +// if( wsz != compressedsz ) + if( !oss->good() ) + { + fh_stringstream ss; + ss << "Error writing compressed chunk for:" << chunk->getURL(); + Throw_CompressionAlgoNotFoundException( tostr(ss), GetImpl(c) ); + } + + // add to bitmap for compressed extents + bm[ n ] = n; + progress_sig.emit( c, target, n, totalblocks ); + } + compressed_buffer_free( buffer ); + delete [] uncompressed_buffer; + + // store the bitmap of block num to file extent number from bm to an EA + writeBitmap( target, bm ); + setStrAttr( target, COMPRESSION_SENTINAL, tostr(true), true, true ); + setStrAttr( target, COMPRESSION_ALGO, tostr(algo), true, true ); + setStrAttr( target, COMPRESSION_BLOCKSZ, tostr(blocksize), true, true ); + setStrAttr( target, COMPRESSION_LEVEL, tostr(compress_level), true, true ); + } + + void ConvertToCompressedChunkContext( fh_context c, + fh_context target, + int blocksize, + int algo, + int compress_level, + ConvertToCompressedChunkContextProgress_Sig_t& progress_sig ) + { + string rdn = c->getDirName(); + int mode = toint( getStrAttr( c, "mode", "644" )); + mode |= S_IXUSR; + if( !target ) + { + target = Shell::CreateDir( c->getParent(), + c->getDirName() + ".compressed", + false, mode ); + } + priv_ConvertToCompressedChunkContext( c, target, blocksize, algo, compress_level, progress_sig ); + c->getParent()->remove( c->getDirName() ); + target->getParent()->rename( target->getDirName(), rdn ); + } + + + + void ConvertToCompressedChunkContext( fh_context c, + int blocksize, + int algo, + int compress_level, + ConvertToCompressedChunkContextProgress_Sig_t& progress_sig ) + { + ConvertToCompressedChunkContext( c, 0, blocksize, algo, compress_level, progress_sig ); + } + + void ConvertFromCompressedChunkContext( fh_context c, + fh_context target, + ConvertToCompressedChunkContextProgress_Sig_t& progress_sig ) + { + ChunkedIOStream iss = priv_getCompressedChunkIOStream( c ); + fh_iostream oss = target->getIOStream( ios::trunc | ios::out ); + std::copy( std::istreambuf_iterator(iss), + std::istreambuf_iterator(), + std::ostreambuf_iterator(oss)); + iss->rdbuf()->delete_all_chunks(); + } + + void ConvertFromCompressedChunkContext( fh_context c, + ConvertToCompressedChunkContextProgress_Sig_t& progress_sig ) + { + string rdn = c->getDirName(); + + int mode = toint( getStrAttr( c, "mode", "644" )); + fh_context target = Shell::CreateFile( c->getParent(), + c->getDirName() + ".uncompressed", + mode ); + ConvertFromCompressedChunkContext( c, target, progress_sig ); + c->getParent()->remove( c ); + target->getParent()->rename( target->getDirName(), rdn ); + } + + }; + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + +}; diff --git a/Ferris/SignalStreams.hh b/Ferris/SignalStreams.hh new file mode 100644 index 0000000..21a6c1e --- /dev/null +++ b/Ferris/SignalStreams.hh @@ -0,0 +1,321 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SignalStreams.hh,v 1.6 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_SIGNALSTREAMS_H_ +#define _ALREADY_INCLUDED_SIGNALSTREAMS_H_ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include +#include + +#include + +namespace Ferris +{ +template < class T > +struct gStreamPosRAII +{ + std::streampos restore; + T& stream; + + gStreamPosRAII( T& stream ) + : + stream( stream ) + { + restore = stream->tellg(); + } + ~gStreamPosRAII() + { + stream->seekg( restore ); + } +}; + +struct giStreamPosRAII : public gStreamPosRAII< fh_istream > +{ + giStreamPosRAII( fh_istream& stream ) + : + gStreamPosRAII< fh_istream >( stream ) + { + } +}; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +/** + * This was modified only to put the delimiter between items. + * ie. foo,bar,baz + * instead of the standard foo,bar,baz, + * + * osid_iterator = Output Stream Internal Delimiter iterator + */ +template > +class osid_iterator: public std::iterator { + typedef osid_iterator<_TpP, _CharT, _Traits> _Self; + bool m_virgin; +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef std::basic_ostream<_CharT, _Traits> ostream_type; + + typedef std::output_iterator_tag iterator_category; + + osid_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0), m_virgin(true) {} + osid_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c), m_virgin(true) {} + _Self& operator=(const _TpP& __val) { + if (_M_string) + { + if( m_virgin ) + m_virgin = false; + else + *_M_stream << _M_string; + } + *_M_stream << __val; + return *this; + } + _Self& operator*() { return *this; } + _Self& operator++() { return *this; } + _Self& operator++(int) { return *this; } +private: + ostream_type* _M_stream; + const _CharT* _M_string; +}; + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// namespace Factory +// { +// /** +// * Make a istream for a memory mapped version of fd +// * +// * fd is the file descriptor to memory map. +// * @param m describes extra information relating to the openmode of fd and +// * how to memory map fd. If ferris_ios::mseq is set then madvise is done to +// * tell the kernel about access patterns. +// * @param ctx if provided is used to embed a URL into exceptions that are thrown. +// */ +// fh_istream MakeMMapIStream( int fd, +// ferris_ios::openmode m = ios::in, +// fh_context ctx = 0 ); + + +// /** +// * Make a iostream for a memory mapped version of fd +// * +// * Note that the memory map automatically extends itself if you write past +// * end of file. The file is extended in largish chunks and remaped for you. +// * +// * fd is the file descriptor to memory map. +// * @param m describes extra information relating to the openmode of fd and +// * how to memory map fd. If ferris_ios::mseq is set then madvise is done to +// * tell the kernel about access patterns. +// * @param ctx if provided is used to embed a URL into exceptions that are thrown. +// */ +// fh_iostream MakeMMapIOStream( int fd, +// ferris_ios::openmode m = ios::in | ios::out, +// fh_context ctx = 0 ); + +// }; + + /** + * Return true if this context has been compressed. + */ + FERRISEXP_API bool isCompressedContext( fh_context c ); + + namespace Factory + { + enum { + COMPRESS_INVALID = 0, + COMPRESS_NONE = 1<<0, + COMPRESS_GZIP = 1<<1, + COMPRESS_BZIP2 = 1<<2 + }; + + typedef sigc::signal4< void, fh_context, fh_context, int, int > + ConvertToCompressedChunkContextProgress_Sig_t; + FERRISEXP_API ConvertToCompressedChunkContextProgress_Sig_t& + getNullConvertToCompressedChunkContextProgress_Sig(); + + + /** + * Make an iostream that handles compressed "chunks" of data and makes + * a streambuf that is exactly on decompressed chunk in length. + * + * The returned stream allows random access read/write to the chunks. + * + * This method uses sane defaults for block size and algo. There is a overloaded + * method that allows one to select both for converting a file into a compressed + * chunked file. + * + * @param c The context that the compressed chunks exist under. Note that + * ea is used on this context to setup block sizes and decompression if + * it is not overriden in the parameters to this function. + */ + FERRISEXP_API fh_iostream getCompressedChunkIOStream( fh_context c ); + + /** + * Convert a context into a compressed chunked context. + * + * @param c The context whos getIOStream() will be chunked and converted + * into compressed contents. + * @param target You can create any type of context that supports EA and subcontexts + * and use it as the target. You will have to remove the source 'c' context + * yourself after calling the function. if target==0 then a directory target is + * assumed and created for you. + */ + FERRISEXP_API void ConvertToCompressedChunkContext( + fh_context c, + fh_context target, + int blocksize = 512*1024, + int algo = COMPRESS_GZIP, + int compress_level = 1, + ConvertToCompressedChunkContextProgress_Sig_t& = + Ferris::Factory::getNullConvertToCompressedChunkContextProgress_Sig()); + + + /** + * Convert a context into a compressed chunked context. + * + * @param c The context whos getIOStream() will be chunked and converted + * into compressed contents. + */ + FERRISEXP_API void ConvertToCompressedChunkContext( + fh_context c, + int blocksize = 512*1024, + int algo = COMPRESS_GZIP, + int compress_level = 1, + ConvertToCompressedChunkContextProgress_Sig_t& = + Ferris::Factory::getNullConvertToCompressedChunkContextProgress_Sig()); + + /** + * Convert a chunked compressed file back into a normal one and delete the + * no longer needed compressed chunks. + * + * Note that 'c' will still exist after the method call, only the chunks themself + * are reclaimed. You may wish to use the one param version of this method instead. + * + * @param c The compressed context with subcontexts being the chunks + * @param target Where to decompress to + */ + FERRISEXP_API void ConvertFromCompressedChunkContext( + fh_context c, + fh_context target, + ConvertToCompressedChunkContextProgress_Sig_t& = + Ferris::Factory::getNullConvertToCompressedChunkContextProgress_Sig()); + + /** + * Convert a chunked compressed file back into a normal one and delete the + * no longer needed compressed chunks. + * + * This is a simple operation but can be handy for defragmenting a context + * that has changed alot since it was chunked. + * + * Note that if the compressed object was a file before compression it will + * be converted back into a file when the chunks are deleted. + * + * @param the context this is compressed, ie. that contains the compressed chunks. + */ + FERRISEXP_API void ConvertFromCompressedChunkContext( + fh_context c, + ConvertToCompressedChunkContextProgress_Sig_t& = + Ferris::Factory::getNullConvertToCompressedChunkContextProgress_Sig()); + }; + +}; + + +#endif // ifndef _ALREADY_INCLUDED_SIGNALSTREAMS_H_ + + + diff --git a/Ferris/SpiritFFilter.cpp b/Ferris/SpiritFFilter.cpp new file mode 100644 index 0000000..50e3175 --- /dev/null +++ b/Ferris/SpiritFFilter.cpp @@ -0,0 +1,186 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SpiritFFilter.cpp,v 1.2 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * This is a part start on an implementation using Boost::Spirit + * to parse ffilter strings. I stopped on 19-sep-2005 because: + * http://boost.org/libs/spirit/example/fundamental/regular_expression.cpp + * /usr/include/boost/spirit/utility/impl/regex.ipp:65: error: wrong number of template arguments (1, should be 2) + * /usr/include/boost/regex/v4/basic_regex.hpp:558: error: provided for template class boost::reg_expression + * + * So basically I couldn't use spirits regex_p() to parse low level constructs + * and the PCCTS ffitler implementation works, PCCTS isn't changing etc. + * + * I'll have another crack at this when boost > 1.33 comes out. + */ + +// #include +// #include + +// #define BOOST_SPIRIT_RULE_SCANNERTYPE_LIMIT 3 + +// #include +// #include +// using namespace boost::spirit; + +// #include +// #include +// using namespace boost::lambda; + +// using namespace std; + +// namespace Ferris +// { + +// /** +// * Root context for ffilter syntax strings. ffilter:// +// */ +// class FERRISEXP_DLLLOCAL SpiritFFilterRootContext +// : +// public StateLessEAHolder< SpiritFFilterRootContext, FakeInternalContext > +// { +// typedef SpiritFFilterRootContext _Self; +// typedef StateLessEAHolder< SpiritFFilterRootContext, FakeInternalContext > _Base; + +// void parse_ffilter( string& data ); + +// public: + +// SpiritFFilterRootContext( string& data ); +// virtual ~SpiritFFilterRootContext(); + +// void createStateLessAttributes( bool force = false ); +// }; + +// SpiritFFilterRootContext::SpiritFFilterRootContext( string& data ) +// : +// _Base( 0, "/" ) +// { +// createStateLessAttributes(); +// parse_ffilter( data ); +// } + +// SpiritFFilterRootContext::~SpiritFFilterRootContext() +// { +// } + +// void +// SpiritFFilterRootContext::createStateLessAttributes( bool force ) +// { +// if( force || isStateLessEAVirgin() ) +// { +// _Base::createStateLessAttributes( true ); +// supplementStateLessAttributes( true ); +// } +// } + +// void +// SpiritFFilterRootContext::parse_ffilter( string& data ) +// { +// typedef scanner_list, phrase_scanner_t> scanners; +// typedef rule< scanners > R; + +// R comparison = str_p("=~") +// | str_p("<=") | str_p(">=") | str_p("==") +// | str_p("?=") | str_p("=?="); + +// R eakey = regex_p("[ a-zA-Z0-9\\-\\_\\*\\$\\^\\]\\[\\\\\\/\\~\\:]+"); +// R value = regex_p("[^)]+)"); +// R eamatch = eakey comparison eavalue; +// R eaterm = str_p("(") +// >> ( eamatch +// | ( "!" >> eaterm >> ")" ) +// | ( "&" >> eaterm >> ")" ) +// | ( "|" >> eaterm >> ")" ) +// ); +// R ffilter_p = eaterm; + +// parse_info<> info = parse( +// data.c_str(), +// ffilter_p, +// space_p ); + +// if (info.full) +// { +// return; +// } +// else +// { +// fh_stringstream ss; +// ss << "Parsing ffilter string failed" << nl +// << "input:" << data << nl +// << "stopped at: \": " << info.stop << "\"" << nl +// << "char offset:" << ( info.stop - data.c_str() ) << nl; +// LG_CTX_W << tostr(ss) << endl; +// cerr << tostr(ss) << endl; +// Throw_ParseError( tostr(ss), 0 ); +// } + + +// } + + +// /********************************************************************************/ +// /********************************************************************************/ +// /********************************************************************************/ + +// class FERRISEXP_DLLLOCAL SpiritFFilterRootContext_RootContextDropper +// : +// public RootContextDropper +// { +// public: +// SpiritFFilterRootContext_RootContextDropper() +// { +// ImplementationDetail::appendToStaticLinkedRootContextNames("ffilter"); +// RootContextFactory::Register( "ffilter", this ); +// } + +// fh_context Brew( RootContextFactory* rf ) +// throw( RootContextCreationFailed ) +// { +// fh_context ret = 0; +// string data; + +// if( rf->getInfo( "StaticString" ).length() ) +// { +// data = rf->getInfo( "StaticString" ); +// } + +// ret = new SpiritFFilterRootContext( data ); +// return ret; +// } +// }; +// static SpiritFFilterRootContext_RootContextDropper ___SpiritFFilterRootContext_static_init; + +// /********************************************************************************/ +// /********************************************************************************/ +// /********************************************************************************/ + +// }; + diff --git a/Ferris/SpiritTime.cpp b/Ferris/SpiritTime.cpp new file mode 100644 index 0000000..5a0d840 --- /dev/null +++ b/Ferris/SpiritTime.cpp @@ -0,0 +1,997 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SpiritTime.cpp,v 1.9 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#define COMPILING_LIBFERRIS_SPIRIT_TIME_CAN_CRASH_SOME_CPUS_WORKAROUND + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility push(hidden) +// #endif + +#define BOOST_SPIRIT_RULE_SCANNERTYPE_LIMIT 3 + +#include +using namespace boost::spirit; + +#include +#include +using namespace boost::lambda; + +// #ifdef GCC_HASCLASSVISIBILITY +// #pragma GCC visibility pop +// #endif + +/**********/ +/**********/ +/**********/ + +using namespace std; + +namespace Ferris +{ + namespace Time + { + struct FERRISEXP_DLLLOCAL ParseRelativeTimeTramp + { + typedef Loki::Functor< + void, LOKI_TYPELIST_2( const char*, const char* ) > + SAction_t; + mutable SAction_t SAction; + typedef const char* IteratorT; + + ParseRelativeTimeTramp( const SAction_t& SAction ) + : + SAction( SAction ) + { + } + template + ParseRelativeTimeTramp( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + SAction( SAction_t( pObj, pMemFn ) ) + { + } + + void operator()( IteratorT first, IteratorT last) const + { + SAction( first, last ); + } + }; + + struct FERRISEXP_DLLLOCAL ParseRelativeTimeBoostFunction + { + typedef boost::function< void( const char*, const char*)> SAction_t; + mutable SAction_t SAction; + typedef const char* IteratorT; + + ParseRelativeTimeBoostFunction( const SAction_t& SAction ) + : + SAction( SAction ) + { + } + template + ParseRelativeTimeBoostFunction( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + SAction( SAction_t( pObj, pMemFn ) ) + { + } + + void operator()( IteratorT first, IteratorT last) const + { + SAction( first, last ); + } + }; + + template < class T > + struct ParseRelativeTimeTrampNumeric + { + typedef Loki::Functor< + void, LOKI_TYPELIST_1( T ) > + SAction_t; + mutable SAction_t SAction; + + ParseRelativeTimeTrampNumeric( const SAction_t& SAction ) + : + SAction( SAction ) + { + } + template + ParseRelativeTimeTrampNumeric( const PointerToObj& pObj, PointerToMemFn pMemFn ) + : + SAction( SAction_t( pObj, pMemFn ) ) + { + } + + void operator()( T n ) const + { + SAction( n ); + } + }; + + + struct FERRISEXP_DLLLOCAL ParseRelativeTime + { + typedef ParseRelativeTime _Self; + typedef ParseRelativeTimeTramp F_t; + typedef ParseRelativeTimeTrampNumeric< long > NF_t; + typedef ParseRelativeTimeBoostFunction BF; + + template < typename PointerToMemFn > + F_t F( PointerToMemFn pMemFun ) + { + return F_t( this, pMemFun ); + } + template < typename PointerToMemFn > + NF_t NF( PointerToMemFn pMemFun ) + { + return NF_t( this, pMemFun ); + } + + + + mutable time_t m_ret; //< Return value that is build duing parse + time_t m_relv; //< Relative value for use in time offsets + mutable struct tm m_tm; //< broken down time version of m_relv; + mutable struct tm m_tunit; //< broken down time translation for relative shifts + mutable struct tm m_abtm; //< broken down time translation for absolute times + mutable bool m_abtm_mon_used; //< since tm_mon is zero based flag if tm_mon is used + mutable bool m_ab_end; //< used for end 2006 type style + mutable bool m_yearDontClearDHMS; //< when parsing year don't clear Day, H, M and S. + bool m_abtm_reset_smh; //< zero the sec, min, hour of the absolute time + long m_mag; //< number of units to shift m_tunit + long m_dir; //< direction (future/past) for the application of m_tunit + bool m_blast; //< begining of last block + bool m_elast; //< ending of last block + bool m_bnext; //< begining of next block + bool m_enext; //< ending of next block + bool m_bthis; //< begining of this block + bool m_ethis; //< ending of this block + string m_func_URL; //< for calling getStrAttr() + string m_func_eaname; //< for calling getStrAttr() + + void fn_yesterday( const char* str, const char* end ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + m_tm.tm_mday--; + m_ret = mktime( &m_tm ); + } + + void fn_tomorrow( const char* str, const char* end ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + m_tm.tm_mday++; + m_ret = mktime( &m_tm ); + } + + void fn_today( const char* str, const char* end ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + m_ret = mktime( &m_tm ); + } + void fn_namedday( const char* str, const char* end ) + { + m_ret = mktime( &m_tm ); + } + + void fn_setDirection( const char* str, const char* end ) + { + string s( str, end ); + + if( contains( str, "last" ) ) m_dir = -1; + else m_dir = 1; + + } + + void fn_setMagnitude( long n ) + { + LG_RTIMEPARSE_D << "fn_setMagnitude() n:" << n << endl; + LG_RTIMEPARSE_D << "fh_setMagnitude m_tunit:" << tostr(m_tunit) << endl; + LG_RTIMEPARSE_D << "fh_setMagnitude m_tm:" << tostr(m_tm) << endl; + m_mag = n; + } + + void reset() + { + m_func_URL = ""; + m_func_eaname = ""; + m_mag = 1; + m_dir = 1; + bzero( &m_tunit, sizeof(m_tunit)); + bzero( &m_abtm, sizeof(m_abtm)); + m_abtm_reset_smh = false; + m_blast = false; + m_elast = false; + m_bnext = false; + m_enext = false; + m_bthis = false; + m_ethis = false; + m_abtm_mon_used = false; + m_ab_end = false; + m_yearDontClearDHMS = false; + } + + void fn_updateRetWithDirMagTUnit( const char* str, const char* end ) + { + LG_RTIMEPARSE_D << "m_tunit:" << endl + << tostr(m_tunit) << endl; + LG_RTIMEPARSE_D << "m_tm:" << endl + << tostr(m_tm) << endl; + + m_tm = m_tm + m_tunit; + + LG_RTIMEPARSE_D << "m_tm-result:" << endl + << tostr(m_tm) << endl; + m_ret = mktime( &m_tm ); + + reset(); + } + + int choose( int a, int b ) + { + return a ? a : b; + } + + void fn_updateRetReplaceWithNonZeroAbTm( const char* str, const char* end ) + { + LG_RTIMEPARSE_D << "fn_updateRetReplaceWithNonZeroTUnit()" << endl; + LG_RTIMEPARSE_D << "m_abtm:" << endl + << tostr(m_abtm) << endl; + LG_RTIMEPARSE_D << "m_tm:" << endl + << tostr(m_tm) << endl; + + m_tm.tm_year = choose( m_abtm.tm_year, m_tm.tm_year ); + m_tm.tm_mon = choose( m_abtm.tm_mon, m_tm.tm_mon ); + if( m_abtm_mon_used ) + m_tm.tm_mon = m_abtm.tm_mon; + m_tm.tm_mday = choose( m_abtm.tm_mday, m_tm.tm_mday ); + m_tm.tm_hour = choose( m_abtm.tm_hour, m_tm.tm_hour ); + m_tm.tm_min = choose( m_abtm.tm_min, m_tm.tm_min ); + m_tm.tm_sec = choose( m_abtm.tm_sec, m_tm.tm_sec ); + + if( m_abtm_reset_smh ) + { + m_tm.tm_hour = 0; + m_tm.tm_min = 0; + m_tm.tm_sec = 0; + } + + LG_RTIMEPARSE_D << "m_tm-result:" << endl + << tostr(m_tm) << endl; + + m_ret = mktime( &m_tm ); + reset(); + } + + + bool begend_inuse() + { + return m_blast || m_elast || m_bnext || m_enext + || m_bthis || m_ethis; + } + bool end_inuse() + { + return m_elast || m_enext || m_ethis; + } + + void fn_begend_sec( const char* str, const char* end ) + { + if( m_blast || m_bnext || m_bthis ) + m_tm.tm_sec = 0; + if( m_elast || m_enext || m_ethis ) + m_tm.tm_sec = 59; + if( m_bthis || m_ethis ) + m_tm.tm_min--; + } + void fn_begend_min( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + } + if( m_elast || m_enext ) + { + m_tm.tm_hour++; + } + if( m_bthis ) + m_tm.tm_hour--; + + if( end_inuse() ) + m_tm.tm_sec--; + } + void fn_begend_hour( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + } + if( m_elast || m_enext ) + { + m_tm.tm_mday++; + } + if( m_bthis ) + m_tm.tm_mday--; + + if( end_inuse() ) + m_tm.tm_sec--; + } + void fn_begend_week( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + } + if( m_blast || m_elast ) + { + m_tm.tm_mday = m_tm.tm_mday - m_tm.tm_wday + 1; + if( !m_tm.tm_wday ) + m_tm.tm_mday -= 7; + if( m_elast ) + m_tm.tm_mday += 7; + } + + if( m_bnext ) + { + m_tm.tm_mday -= m_tm.tm_wday; + ++m_tm.tm_mday; + } + if( m_enext ) + { + m_tm.tm_mday -= m_tm.tm_wday; + m_tm.tm_mday += 8; + } + if( m_bthis ) + { + m_tm.tm_mday -= m_tm.tm_wday; + m_tm.tm_mday -= 6; + } + if( m_ethis ) + { + m_tm.tm_mday -= m_tm.tm_wday; + m_tm.tm_mday += 1; + } + if( end_inuse() ) + m_tm.tm_sec--; + } + + void fn_begend_q( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + } + if( begend_inuse() ) + m_tm.tm_mon = m_tm.tm_mon - (m_tm.tm_mon%3); + if( m_elast || m_enext || m_ethis ) + m_tm.tm_mon += 3; + if( end_inuse() ) + m_tm.tm_sec--; + } + void fn_begend_mday( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + } + + if( begend_inuse() ) + m_tm.tm_mday = 1; + if( m_elast || m_enext ) + m_tm.tm_mon++; + if( m_bthis ) + m_tm.tm_mon--; + if( end_inuse() ) + m_tm.tm_sec--; + } + void fn_begend_month( const char* str, const char* end ) + { + if( begend_inuse() ) + { + m_tm.tm_sec = 0; + m_tm.tm_min = 0; + m_tm.tm_hour = 0; + m_tm.tm_mday = 1; + m_tm.tm_mon = 0; + } + + if( m_bthis || m_ethis ) + m_tm.tm_year--; + + if( m_elast || m_enext || m_ethis ) + { + m_tm.tm_year++; + } + else if( begend_inuse() ) + { + m_tm.tm_mday = 1; + } + + if( end_inuse() ) + { + m_tm.tm_sec--; + } + } + + void fn_ago( const char* str, const char* end ) + { + int v = -1; + + LG_RTIMEPARSE_D << "fh_ago m_tunit:" << tostr(m_tunit) << endl; + + m_tunit.tm_year *= v; + m_tunit.tm_mon *= v; + m_tunit.tm_mday *= v; + m_tunit.tm_hour *= v; + m_tunit.tm_min *= v; + m_tunit.tm_sec *= v; + } + + void fn_tunit_update_month_trim_mday( int mod ) + { + int re = m_tm.tm_mday%mod; + if( m_tm.tm_mday > mod ) + m_tm.tm_mday -= re; + } + + void fn_tunit_update_month( const char* str, const char* end ) + { + /* + 0 J 31 + 1 F 28 + 2 M 31 + 3 A 30 + 4 M 31 + 5 J 30 + 6 J 31 + 7 A 31 + 8 S 30 + 9 O 31 + 0 N 30 + 1 D 31 + */ + + m_tunit.tm_mon = m_mag * m_dir; + int newmonth = (m_tm.tm_mon + m_tunit.tm_mon) % 12; + LG_RTIMEPARSE_D << "newmonth:" << newmonth << endl; + + std::set daysOf30; + daysOf30.insert( 3 ); + daysOf30.insert( 5 ); + daysOf30.insert( 8 ); + daysOf30.insert( 10 ); + + if( newmonth == 1 ) + { + if( !(m_tm.tm_year % 4 )) + fn_tunit_update_month_trim_mday( 29 ); + else + fn_tunit_update_month_trim_mday( 28 ); + } + if( daysOf30.end() != daysOf30.find( newmonth ) ) + { + fn_tunit_update_month_trim_mday( 30 ); + } + + } + + /********/ + /********/ + /********/ + + void ab_sec( int n ) + { + m_abtm.tm_sec = n; + } + void ab_min( int n ) + { + m_abtm.tm_min = n; + m_abtm.tm_sec = 0; + } + void ab_hr( int n ) + { + m_abtm.tm_hour = n; + m_abtm.tm_min = 0; + m_abtm.tm_sec = 0; + } + void ab_day( int n ) + { + m_abtm.tm_sec = 0; + m_abtm.tm_min = 0; + m_abtm.tm_hour = 0; + m_abtm.tm_mday = n; + } + void ab_month( int n ) + { + m_abtm.tm_sec = 0; + m_abtm.tm_min = 0; + m_abtm.tm_hour = 0; + m_abtm.tm_mday = 1; + m_abtm.tm_mon = n - 1; + m_abtm_mon_used = true; + } + void ab_year( int n ) + { + if( n < 100 ) + n += 100; + if( n > 1900 ) + n -= 1900; + + if( !m_yearDontClearDHMS ) + { + m_abtm.tm_sec = 0; + m_abtm.tm_min = 0; + m_abtm.tm_hour = 0; + m_abtm.tm_mday = 1; + m_abtm.tm_mon = 0; + m_abtm_mon_used = true; + } + + m_abtm.tm_year = n; + + if( m_ab_end ) + { + m_abtm.tm_year++; + fn_updateRetReplaceWithNonZeroAbTm( 0, 0 ); + m_abtm.tm_sec--; + } + } + + /********/ + /********/ + /********/ + + + void fn_func_url( const char* beg, const char* end ) + { + string str( beg, end ); + m_func_URL = str; + } + + void fn_func_eaname( const char* beg, const char* end ) + { + string str( beg, end ); + m_func_eaname = str; + } + + void fn_func_perform( const char* beg, const char* end ) + { + if( m_func_eaname.empty() || m_func_URL.empty() ) + { + LG_RTIMEPARSE_W + << "Error, must have both URL and EA to read for absolute time" << endl; + cerr + << "Error, must have both URL and EA to read for absolute time" << endl; + reset(); + return; + } + + fh_context c = Resolve( m_func_URL ); + string s = getStrAttr( c, m_func_eaname, "", true, true ); + + time_t tt = toType( s ); + + m_relv = tt; + m_ret = tt; + m_tm = *(localtime( &tt )); + reset(); + } + + + + /********/ + /********/ + /********/ + + time_t operator()( const std::string& s, time_t relv ) + { +#ifdef GCC_HAS_BUGS_WITH_SPIRIT + return 0; +#else + + // yay, if multi_index is included anywhere it means + // we can't just use lambda natively. +#define _1 boost::lambda::_1 +#define _2 boost::lambda::_2 + + m_relv = relv; + m_ret = relv; + m_tm = *(localtime( &relv )); + reset(); + + + typedef scanner_list, phrase_scanner_t> scanners; + typedef rule< scanners > R; + +// update the field 'v' in the m_tunit using an optional 'm' +// magnitude to multiply the update value by +// (eg, quarterly = 3*monthly ) +#define TUUPD_MAG( v, m ) \ + [ BF((_1, var(m_tunit.v) = m * var(m_mag) * var(m_dir) )) ] >> ops +#define TUUPD( v ) TUUPD_MAG( v, 1 ) + +#define NAMED_DAY( offsetFromMonday ) \ + [ BF(( _1, \ + var(m_tm.tm_sec) = 0, \ + var(m_tm.tm_min) = 0, \ + var(m_tm.tm_hour) = 0, \ + var(m_tm.tm_mday) = var(m_tm.tm_mday) - var(m_tm.tm_wday) + offsetFromMonday + 1 )) ] \ + [ F( &_Self::fn_namedday ) ] + + R l_monday = (str_p("monday") | str_p("mon")); + R l_tuesday = (str_p("tuesday") | str_p("tue")); + R l_wednesday = (str_p("wednesday") | str_p("wed")); + R l_thursday = (str_p("thursday") | str_p("thu")); + R l_friday = (str_p("friday") | str_p("fri")); + R l_saturday = (str_p("saturday") | str_p("sat")); + R l_sunday = (str_p("sunday") | str_p("sun")); + + R minus = ch_p('-'); + R plus = ch_p('+'); + R ago = str_p("ago"); + R ops = !(ch_p('s')); + R yesterday = str_p("yesterday") | str_p("yes") | str_p("yester"); + R tomorrow = str_p("tomorrow") | str_p("tom") | str_p("tomor"); + R today = str_p("today") | str_p("tod") | str_p("td"); + R monday = (l_monday)NAMED_DAY(0); + R tuesday = (l_tuesday)NAMED_DAY(1); + R wednesday = (l_wednesday)NAMED_DAY(2); + R thursday = (l_thursday)NAMED_DAY(3); + R friday = (l_friday)NAMED_DAY(4); + R saturday = (l_saturday)NAMED_DAY(5); + R sunday = (l_sunday)NAMED_DAY(6); + R AllDays = monday | tuesday | wednesday | thursday | friday | saturday | sunday; + + R last = str_p("last"); + R next = str_p("next"); + R blast = (str_p("blast") | str_p("begin last") | str_p("begining last") + | str_p("beginning last") | str_p("beginning of last") ) + [ BF(( _1, var(m_blast)=true )) ]; + R elast = (str_p("elast") | str_p("end last") | str_p("ending last") + | str_p("ending of last") ) + [ BF(( _1, var(m_elast)=true )) ]; + R bnext = (str_p("bnext") | str_p("begin next") | str_p("begining next") + | str_p("beginning next") | str_p("beginning of next") ) + [ BF(( _1, var(m_bnext)=true )) ]; + R enext = (str_p("enext") | str_p("end next") | str_p("ending next") + | str_p("ending of next") ) + [ BF(( _1, var(m_enext)=true )) ]; + R bthis = (str_p("bthis") | str_p("begin this") | str_p("begining this") + | str_p("beginning this") | str_p("beginning of this") ) + [ BF(( _1, var(m_bthis)=true )) ]; + R ethis = (str_p("ethis") | str_p("end this") | str_p("ending this") + | str_p("ending of this") ) + [ BF(( _1, var(m_ethis)=true )) ]; + R Minute = (str_p("minute") | str_p("min")) + [ F(&_Self::fn_begend_sec) ] + TUUPD(tm_min); + R Hour = (str_p("hour") | str_p("hr") | str_p("h")) + [ F(&_Self::fn_begend_min) ] + TUUPD(tm_hour); + R Day = (str_p("day") | str_p("d")) + [ F(&_Self::fn_begend_hour) ] + TUUPD(tm_mday); + R Week = (str_p("week") | str_p("wk") | str_p("w")) + [ F(&_Self::fn_begend_week) ] + TUUPD_MAG(tm_mday,7); + R Month = (str_p("month") | str_p("mon") | str_p("mo")) + [ F(&_Self::fn_begend_mday) ] + [ F(&_Self::fn_tunit_update_month ) ] + >> ops; + R Year = (str_p("year") | str_p("yr") | str_p("y")) + [ F(&_Self::fn_begend_month) ] + TUUPD(tm_year); + R Quar = (str_p("quarter") | str_p("qu")) + TUUPD_MAG( tm_mon, 3 ) + [ F(&_Self::fn_begend_q) ]; + R TimeUnit = ( Minute | Hour | Minute | Day | Week | Month | Quar | Year ); + + + /****************************************/ + /****************************************/ + /****************************************/ + +#define AB_NAMED_MON( month ) \ + [ BF(( _1, \ + var( m_abtm_reset_smh ) = true, \ + var(m_abtm.tm_mday) = 1, \ + var(m_abtm_mon_used) = true, \ + var(m_abtm.tm_mon) = month )) ] +#define AB_NAMED_DAY( offsetFromMonday ) \ + [ BF(( _1, \ + var( m_abtm_reset_smh ) = true, \ + var(m_abtm.tm_mday) = var(m_tm.tm_mday) - var(m_tm.tm_wday) + offsetFromMonday + 1 )) ] + + R ab_bropen = ch_p('('); + R ab_brclose = ch_p(')'); + R ab_squote = ch_p('\''); + R ab_dquote = ch_p('\"'); + R ab_comma = ch_p(','); + R ab_colon = ch_p(':'); + R ab_dash = ch_p('-'); + R ab_slash = ch_p('/'); + R ab_space = ch_p(' '); + R ab_sec = uint_parser()[ NF( &_Self::ab_sec) ]; + R ab_min = uint_parser()[ NF( &_Self::ab_min) ]; + R ab_hr = uint_parser()[ NF( &_Self::ab_hr) ]; + R ab_time = + ( ab_hr + >> ab_colon >> ab_min + >> !(ab_colon >> ab_sec) + ); + + R ab_datesep = ab_dash | ab_slash; + R ab_year = (ch_p('0') >> uint_parser()[ NF( &_Self::ab_year) ]) + | uint_parser()[ NF( &_Self::ab_year) ]; + R ab_jan = (str_p("january") | str_p("jan") | str_p("ja"))AB_NAMED_MON( 0 ); + R ab_feb = (str_p("feburary") | str_p("feb") | str_p("fe"))AB_NAMED_MON( 1 ); + R ab_mar = (str_p("march") | str_p("mar") | str_p("ma"))AB_NAMED_MON( 2 ); + R ab_apr = (str_p("april") | str_p("apr") | str_p("ap"))AB_NAMED_MON( 3 ); + R ab_may = (str_p("may") | str_p("ma") )AB_NAMED_MON( 4 ); + R ab_jun = (str_p("june") | str_p("jun") | str_p("jn"))AB_NAMED_MON( 5 ); + R ab_jul = (str_p("july") | str_p("jul") | str_p("jl"))AB_NAMED_MON( 6 ); + R ab_aug = (str_p("august") | str_p("aug") | str_p("au"))AB_NAMED_MON( 7 ); + R ab_sep = (str_p("september")| str_p("sep") | str_p("se"))AB_NAMED_MON( 8 ); + R ab_oct = (str_p("october") | str_p("oct") | str_p("oc"))AB_NAMED_MON( 9 ); + R ab_nov = (str_p("november") | str_p("nov") | str_p("no"))AB_NAMED_MON( 10 ); + R ab_dec = (str_p("december") | str_p("dec") | str_p("de"))AB_NAMED_MON( 11 ); + R ab_monthStr = ( ab_jan | ab_feb | ab_mar | ab_apr | ab_may | ab_jun + | ab_jul | ab_aug | ab_sep | ab_oct | ab_nov | ab_dec ); + R ab_monthNum = uint_parser()[ NF( &_Self::ab_month) ]; + R ab_month = ( ab_monthNum | ab_monthStr ); + R ab_monday = (l_monday)AB_NAMED_DAY(0); + R ab_tuesday = (l_tuesday)AB_NAMED_DAY(1); + R ab_wednesday = (l_wednesday)AB_NAMED_DAY(2); + R ab_thursday = (l_thursday)AB_NAMED_DAY(3); + R ab_friday = (l_friday)AB_NAMED_DAY(4); + R ab_saturday = (l_saturday)AB_NAMED_DAY(5); + R ab_sunday = (l_sunday)AB_NAMED_DAY(6); + R ab_dayStr = ab_monday | ab_tuesday | ab_wednesday + | ab_thursday | ab_friday | ab_saturday | ab_sunday; + R ab_dayNum = uint_parser()[ NF( &_Self::ab_day) ]; + R ab_day = ( ab_dayNum | ab_dayStr ); + + R ab_begin = str_p("begin") + [ BF(( _1, var( m_abtm_reset_smh ) = true )) ]; + R ab_end = str_p("end") + [ BF(( _1, var( m_abtm_reset_smh ) = true, var(m_ab_end)=true )) ]; + + R ab_ctimeString = + (ab_dayStr >> ab_month >> ab_dayNum)[ BF(( _1, var( m_abtm_reset_smh ) = false ))] + >> ab_time[ BF(( _1, var( m_yearDontClearDHMS ) = true )) ] + >> ab_year; + + R ab_dateHeur = + ( + ( ab_ctimeString + | ab_begin >> ab_year + | ab_end >> ab_year + | !(ab_year >> !(ab_datesep)) + >> ( + (ab_monthNum >> ab_datesep >> ab_day) + | + (ab_monthStr >> !(!(ab_datesep) >> ab_day)) + | + (ab_day >> ab_datesep >> ab_month) + ) + ) + ); + + // + // Allow calling getea( url, eaname ) and mtime( url ) + // for setting an absolute time + // + R ab_notsqstr = (+( ~ch_p('\'') )); + R ab_notdqstr = (+( ~ch_p('\"') )); + R ab_notcommastr = (+( ~ch_p(',') )); + R ab_notclbrstr = (+( ~ch_p(')') )); + R ab_getEAf = str_p("getea"); + R ab_getEAmt = str_p("mtime"); + R ab_getEAat = str_p("atime"); + R ab_quotedURL = + ( ab_squote >> ab_notsqstr[ F(&_Self::fn_func_url) ] >> ab_squote ) + | + ( ab_dquote >> ab_notdqstr[ F(&_Self::fn_func_url) ] >> ab_dquote ) + ; + R ab_quotedEAName = + ( ab_squote >> ab_notsqstr[ F(&_Self::fn_func_eaname) ] >> ab_squote ) + | + ( ab_dquote >> ab_notdqstr[ F(&_Self::fn_func_eaname) ] >> ab_dquote ) + ; + R ab_dateEA = ( + ( + ab_getEAf >> ab_bropen + >> ( + ab_quotedURL + | + ab_notcommastr[ F(&_Self::fn_func_url) ] + ) + >> ab_comma + >> ( + ab_quotedEAName + | + ab_notclbrstr[ F(&_Self::fn_func_eaname) ] + ) + >> ab_brclose + )[ F( &_Self::fn_func_perform ) ] + | + ( + ab_getEAf >> ab_quotedURL >> !(ab_comma) >> ab_quotedEAName + )[ F( &_Self::fn_func_perform ) ] + | + ( + ( ab_getEAmt | ab_getEAat )[ F(&_Self::fn_func_eaname) ] + >> ab_bropen >> + ( + ab_quotedURL + | + ab_notclbrstr[ F(&_Self::fn_func_url) ] + ) + >> ab_brclose + )[ F( &_Self::fn_func_perform ) ] + | + ( + ( ab_getEAmt | ab_getEAat )[ F(&_Self::fn_func_eaname) ] + >> ab_quotedURL + )[ F( &_Self::fn_func_perform ) ] + ) + ; + + R ab_date = + ab_dateHeur | ab_dateEA + ; + + + R CustomTimeStamp = ( + ( ab_date >> ab_time ) + | ab_date + | ab_time + ) + [ F( &_Self::fn_updateRetReplaceWithNonZeroAbTm ) ]; + + /****************************************/ + /****************************************/ + /****************************************/ + + R PlusMinusRelativeTime = +( + !( minus[ BF((_1, var(m_dir)=-1 )) ] + | plus[ BF((_1, var(m_dir)=1 )) ] + ) + >> uint_p[ NF( &_Self::fn_setMagnitude) ] + >> TimeUnit + >> !( + ago[ F( &_Self::fn_ago ) ] + ) + )[ F( &_Self::fn_updateRetWithDirMagTUnit ) ]; + + R relativeTime_last_week_p = + +( + (last|next)[ F( &_Self::fn_setDirection ) ] + >> !(uint_p[ NF( &_Self::fn_setMagnitude) ]) + >> TimeUnit + )[ F( &_Self::fn_updateRetWithDirMagTUnit ) ] + >> !(PlusMinusRelativeTime); + R relativeTime_last_year_p = + +( + (blast|elast|bnext|enext|bthis|ethis)[ F( &_Self::fn_setDirection ) ] + >> !(uint_p[ NF( &_Self::fn_setMagnitude) ]) + >> TimeUnit + )[ F( &_Self::fn_updateRetWithDirMagTUnit ) ] + >> !(PlusMinusRelativeTime); + R relativeTime_last_p = + relativeTime_last_week_p + | relativeTime_last_year_p; + + R relativeTime_p + = yesterday [ F( &_Self::fn_yesterday ) ] + | tomorrow [ F( &_Self::fn_tomorrow ) ] + | today [ F( &_Self::fn_today ) ] + | AllDays + | relativeTime_last_p + // + 6 days - 3 months + | PlusMinusRelativeTime + ; + + R relativeTimeStamp_p = + CustomTimeStamp >> !(relativeTime_p) + | relativeTime_p; + + string lowers = tolowerstr()(s); + parse_info<> info = parse( + lowers.c_str(), + relativeTimeStamp_p, + space_p ); + + if (info.full) + { + } + else + { + fh_stringstream ss; + ss << "Parsing relative time string failed" << nl + << "input:" << s << nl + << "stopped at: \": " << info.stop << "\"" << nl + << "char offset:" << ( info.stop - s.c_str() ) << nl; + LG_RTIMEPARSE_W << tostr(ss) << endl; + cerr << tostr(ss) << endl; + + BackTrace(); + + Throw_RelativeTimeParsing( tostr(ss), 0 ); + } + + return m_ret; +#endif + } + + }; + + time_t ParseRelativeTimeString( const std::string& s, time_t relv ) + { + if( relv == 0 ) + relv = getTime(); + + if( struct tm* tm = getdate( s.c_str() ) ) + { + LG_TIME_D << "ParseRelativeTimeString() getdate() succeeded" << endl; + time_t ret = mktime( tm ); + return ret; + } + LG_TIME_D << "ParseRelativeTimeString() getdate() failed. getdate_err:" << getdate_err << endl; + + ParseRelativeTime obj; + return obj( s, relv ); + } + + + }; +}; diff --git a/Ferris/StatfsUtilities.cpp b/Ferris/StatfsUtilities.cpp new file mode 100644 index 0000000..5139bcf --- /dev/null +++ b/Ferris/StatfsUtilities.cpp @@ -0,0 +1,108 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: StatfsUtilities.cpp,v 1.2 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +#define SYSV_MAGIC_BASE 0x012FF7B3 +FERRISEXP_DLLLOCAL enum { + FSTYPE_NONE = 0, + FSTYPE_XENIX, + FSTYPE_SYSV4, + FSTYPE_SYSV2, + FSTYPE_COH, + FSTYPE_V7, + FSTYPE_AFS, + FSTYPE_END, +}; + +#define ADFS_SUPER_MAGIC 0xadf5 +#define AFFS_SUPER_MAGIC 0xadff +#define CODA_SUPER_MAGIC 0x73757245 +#define COH_SUPER_MAGIC (SYSV_MAGIC_BASE+FSTYPE_COH) +#define DEVFS_SUPER_MAGIC 0x1373 +#define EFS_SUPER_MAGIC 0x414A53 +#define EXT2_SUPER_MAGIC 0xEF53 +#define HPFS_SUPER_MAGIC 0xf995e849 +#define ISOFS_SUPER_MAGIC 0x9660 +#define JFFS2_SUPER_MAGIC 0x72b6 +#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ +#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ +#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ +#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ +#define NCP_SUPER_MAGIC 0x564c +#define NFS_SUPER_MAGIC 0x6969 +#define OPENPROM_SUPER_MAGIC 0x9fa1 +#define PROC_SUPER_MAGIC 0x9fa0 +#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ +#define REISERFS_SUPER_MAGIC 0x52654973 +#define SMB_SUPER_MAGIC 0x517B +#define SYSV4_SUPER_MAGIC (SYSV_MAGIC_BASE+FSTYPE_SYSV4) +#define SYSV2_SUPER_MAGIC (SYSV_MAGIC_BASE+FSTYPE_SYSV2) +#define UFS_MAGIC 0x00011954 +#define USBDEVICE_SUPER_MAGIC 0x9fa2 +#define XFS_SUPER_MAGIC 0x58465342 +#define XENIX_SUPER_MAGIC (SYSV_MAGIC_BASE+FSTYPE_XENIX) + +namespace Ferris +{ + namespace Util + { + std::string getFileSystemTypeString( const struct statfs& s ) + { + fh_stringstream ss; + + switch( s.f_type ) + { + case AFFS_SUPER_MAGIC: ss << "affs"; break; + case EXT2_SUPER_MAGIC: ss << "ext2"; break; + case HPFS_SUPER_MAGIC: ss << "hpfs"; break; + case ISOFS_SUPER_MAGIC: ss << "iso"; break; + case MINIX_SUPER_MAGIC: + case MINIX2_SUPER_MAGIC: + case MINIX2_SUPER_MAGIC2: ss << "minix"; break; + case MSDOS_SUPER_MAGIC: ss << "msdos"; break; + case NCP_SUPER_MAGIC: ss << "ncp"; break; + case NFS_SUPER_MAGIC: ss << "nfs"; break; + case PROC_SUPER_MAGIC: ss << "proc"; break; + case SMB_SUPER_MAGIC: ss << "smb"; break; + case XENIX_SUPER_MAGIC: + case SYSV4_SUPER_MAGIC: + case SYSV2_SUPER_MAGIC: + case COH_SUPER_MAGIC: ss << "sysv"; break; + case UFS_MAGIC: ss << "ufs"; break; + case XFS_SUPER_MAGIC: ss << "xfs"; break; + default: ss << "unknown"; + } + + return tostr(ss); + } + } +}; + diff --git a/Ferris/StatfsUtilities.hh b/Ferris/StatfsUtilities.hh new file mode 100644 index 0000000..715b31c --- /dev/null +++ b/Ferris/StatfsUtilities.hh @@ -0,0 +1,45 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: StatfsUtilities.hh,v 1.2 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_STATFS_UTILS_H_ +#define _ALREADY_INCLUDED_FERRIS_STATFS_UTILS_H_ + +#include +#include +#include + +namespace Ferris +{ + namespace Util + { + FERRISEXP_API std::string getFileSystemTypeString( const struct statfs& s ); + } +}; +#endif diff --git a/Ferris/SyncDelayer.cpp b/Ferris/SyncDelayer.cpp new file mode 100644 index 0000000..871fed8 --- /dev/null +++ b/Ferris/SyncDelayer.cpp @@ -0,0 +1,88 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SyncDelayer.cpp,v 1.3 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "SyncDelayer.hh" +#include "Enamel.hh" + +#include + +using namespace std; + +namespace Ferris +{ + int SyncDelayer::s_count = 0; + SyncDelayer::m_flist_t SyncDelayer::m_flist; + + SyncDelayer::SyncDelayer() + { + LG_XSLTFS_D << "SyncDelayer::SyncDelayer()" << endl; + ++s_count; + } + SyncDelayer::~SyncDelayer() + { + --s_count; + LG_XSLTFS_D << "SyncDelayer::~SyncDelayer() size:" << m_flist.size() + << " s_count:" << s_count + << endl; + if( !s_count ) + { + LG_XSLTFS_D << "SyncDelayer::~SyncDelayer() calling functors size:" << m_flist.size() << endl; +// cerr << "SyncDelayer::~SyncDelayer() calling functors size:" << m_flist.size() << endl; + for( m_flist_t::iterator iter = m_flist.begin(); iter != m_flist.end(); ++iter ) + { + f_functor f = iter->second; + f( this ); + } + m_flist.clear(); + } + } + bool + SyncDelayer::exists() + { +// cerr << "SyncDelayer::exists() ret:" << (s_count > 0) << endl; + return s_count > 0; + } + + void + SyncDelayer::add( void* key, const f_functor& f ) + { + SyncDelayer::m_flist[ key ] = f; + } + + void + SyncDelayer::ensure( void* key, const f_functor& f ) + { + if( SyncDelayer::m_flist.find( key ) == SyncDelayer::m_flist.end() ) + { + add( key, f ); + } + } + + +}; diff --git a/Ferris/SyncDelayer.hh b/Ferris/SyncDelayer.hh new file mode 100644 index 0000000..978efce --- /dev/null +++ b/Ferris/SyncDelayer.hh @@ -0,0 +1,57 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SyncDelayer.hh,v 1.4 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_SYNC_DELAYER_H_ +#define _ALREADY_INCLUDED_FERRIS_SYNC_DELAYER_H_ + +#include +#include + +namespace Ferris +{ + class SyncDelayer + { + public: + explicit SyncDelayer(); + ~SyncDelayer(); + + + typedef Loki::Functor< void, LOKI_TYPELIST_1( SyncDelayer* ) > f_functor; + static bool exists(); + static void add( void* key, const f_functor& f ); + static void ensure( void* key, const f_functor& f ); + private: + static int s_count; + typedef std::map< void*, f_functor > m_flist_t; + static m_flist_t m_flist; + }; +}; + +#endif diff --git a/Ferris/TimeDelayedAction.cpp b/Ferris/TimeDelayedAction.cpp new file mode 100644 index 0000000..e292d0e --- /dev/null +++ b/Ferris/TimeDelayedAction.cpp @@ -0,0 +1,128 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EAIndexer.hh,v 1.11 2009/01/09 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "TimeDelayedAction.hh" +#include + +namespace Ferris +{ + TimeDelayedAction::TimeDelayedAction() + : m_timeoutSeconds( 10 ) + , m_timerID( 0 ) + , m_maximalTimerAgeSeconds( 0 ) + { + } + + TimeDelayedAction::~TimeDelayedAction() + { + stopTimer(); + } + + void TimeDelayedAction::setTimeoutSeconds( int v ) + { + m_timeoutSeconds = v; + } + + int + TimeDelayedAction::getTimeoutSeconds() + { + return m_timeoutSeconds; + } + + static gint timer_cb( gpointer user_data ) + { + TimeDelayedAction* x = (TimeDelayedAction*)user_data; + x->callFired(); + return 0; + } + + void + TimeDelayedAction::callFired() + { + m_firstResetTimerEpoch = 0; + fired(); + } + + + void + TimeDelayedAction::setMaximalTimerAgeSeconds( int v ) + { + m_maximalTimerAgeSeconds = v; + } + + int + TimeDelayedAction::getMaximalTimerAgeSeconds() + { + return m_maximalTimerAgeSeconds; + } + + + void + TimeDelayedAction::resetTimer() + { + stopTimer(); + + if( !m_firstResetTimerEpoch ) + m_firstResetTimerEpoch = Time::getTime(); + else + { + time_t now = Time::getTime(); + if( m_firstResetTimerEpoch + m_maximalTimerAgeSeconds < now ) + { + callFired(); + return; + } + } + + m_timerID = g_timeout_add_seconds( m_timeoutSeconds, + GSourceFunc(timer_cb), this ); + } + + void + TimeDelayedAction::stopTimer() + { + if( m_timerID ) + g_source_remove( m_timerID ); + m_timerID = 0; + } + + + void + TimeDelayedAction::fired() + { + getFiredSignal().emit(); + } + + TimeDelayedAction::FiredSignal_t& + TimeDelayedAction::getFiredSignal() + { + return m_FiredSignal; + } + +}; diff --git a/Ferris/TimeDelayedAction.hh b/Ferris/TimeDelayedAction.hh new file mode 100644 index 0000000..0bda0d8 --- /dev/null +++ b/Ferris/TimeDelayedAction.hh @@ -0,0 +1,105 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ut_close_signal.cpp,v 1.3 2008/05/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_TIME_DELAYED_ACTION_H_ +#define _ALREADY_INCLUDED_FERRIS_TIME_DELAYED_ACTION_H_ + +#include +#include + +namespace Ferris +{ + /** + * In various cases, there is some work to be done which might be + * better performed in a few seconds. For example, automatically + * saving the user input. In this case you might like to reset the + * timeout if the user starts typing again. On the other hand, you + * also might like to set a maximal age to fire the signal even if + * user input is happening. This last case is good for batch processing + * where you might delay if new work keeps becoming available but + * perform the work regardless of new material arriving if 5 minutes + * have gone by since the first resetTimer() call. + */ + class FERRISEXP_API TimeDelayedAction + : + public Handlable + { + public: + TimeDelayedAction(); + virtual ~TimeDelayedAction(); + + /** + * Number of seconds to wait before firing the fired() method/signal + */ + void setTimeoutSeconds( int v ); + int getTimeoutSeconds(); + + /* + * If v > 0, then fire the signal even if resetTimer() was called + * again before the timer expired. Good for batch processing. The + * default is 0 + */ + void setMaximalTimerAgeSeconds( int v ); + int getMaximalTimerAgeSeconds(); + + /** + * Set the timer to expire in getTimeoutSeconds() from now. If + * there is already a timer waiting, remove that one first. ie, + * this method keeps delaying the timer until it is not called + * for getTimeoutSeconds() + */ + void resetTimer(); + void stopTimer(); + + /** + * The timer has expired. Do something. The default implementation + * fires the getFiredSignal. + */ + virtual void fired(); + + typedef sigc::signal0< void > FiredSignal_t; + FiredSignal_t& getFiredSignal(); + + /** + * This method is private. + */ + void callFired(); + + private: + FiredSignal_t m_FiredSignal; + int m_timeoutSeconds; + time_t m_firstResetTimerEpoch; + int m_maximalTimerAgeSeconds; + guint m_timerID; + + }; + FERRIS_SMARTPTR( TimeDelayedAction, fh_TimeDelayedAction ); +}; +#endif diff --git a/Ferris/Trimming.hh b/Ferris/Trimming.hh new file mode 100644 index 0000000..dfcb5e9 --- /dev/null +++ b/Ferris/Trimming.hh @@ -0,0 +1,186 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Trimming.hh,v 1.2 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_TRIMMING_H_ +#define _ALREADY_INCLUDED_TRIMMING_H_ + +#include + +#include +#include +#include + + +class FERRISEXP_API PrefixTrimmerOps +{ +public: + + inline bool match( const std::string& s, const std::string& code ) + { + std::string::size_type e = s.find( code ); + return e == 0; + } + + inline std::string trim( const std::string& s, const std::string& code ) + { + return s.substr( code.length() ); + } + +}; + + +class FERRISEXP_API PostfixTrimmerOps +{ +public: + + inline bool match( const std::string& s, const std::string& code ) + { + std::string::size_type e = s.rfind( code ); + return e == (s.length() - code.length()); + } + + inline std::string trim( const std::string& s, const std::string& code ) + { + return s.substr( 0, s.length() - code.length() ); + } + +}; + + +class FERRISEXP_API TrimmerBase +{ +protected: + + typedef std::vector codes_t; + +private: + + codes_t codes; + +protected: + + codes_t& getCodes() + { + return codes; + } + +public: + + virtual ~TrimmerBase() + {} + + + void push_back( const std::string& s ) + { + codes.push_back(s); + } + + void clear() + { + codes.clear(); + } + + virtual std::string operator()( std::string s ) = 0; +}; + + +template < class MatchingT > +class Trimmer : public TrimmerBase +{ + MatchingT mt; + +public: + + virtual std::string operator()( std::string s ) + { + bool foundPrefix = true; + + while( foundPrefix ) + { + foundPrefix = false; + + for( codes_t::iterator iter = getCodes().begin(); + iter != getCodes().end(); + ++iter ) + { + if( iter->length() < s.length() ) + { + if( mt.match( s, *iter ) ) + { + foundPrefix = true; + s = mt.trim( s, *iter ); + break; + } + } + } + + } + + return s; + } +}; + +template < class X, class Y > +class CompositeTrimmer : public TrimmerBase +{ + X x; + Y y; + +public: + + virtual std::string operator()( std::string s ) + { + x.clear(); + y.clear(); + + for( codes_t::iterator iter = getCodes().begin(); + iter != getCodes().end(); + ++iter ) + { + x.push_back( *iter ); + y.push_back( *iter ); + } + + s = x(s); + s = y(s); + + return s; + } + + +}; + + +typedef Trimmer PrefixTrimmer; +typedef Trimmer PostfixTrimmer; +typedef CompositeTrimmer< PrefixTrimmer, PostfixTrimmer > PrePostTrimmer; + + +#endif diff --git a/Ferris/TypeDecl.hh b/Ferris/TypeDecl.hh new file mode 100644 index 0000000..0b7ca54 --- /dev/null +++ b/Ferris/TypeDecl.hh @@ -0,0 +1,529 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: TypeDecl.hh,v 1.18 2010/09/24 21:31:00 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_TYPEDECL_H_ +#define _ALREADY_INCLUDED_TYPEDECL_H_ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/** + * NOTE TO SELF: The macros that define the smart pointer typedefs are + * wrapped in #ifndef blocks so that cedet can use its own personal + * definition of those macros which points to Loki::CedetSmartPtr<> + * instead of the real class. This keeps completion happy in emacs, + * and the code compiles as normal when not being inspected by emacs. + */ +namespace Ferris +{ + typedef Loki::SmartPtr< ::boost::regex, + Loki::RefLinked, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > fh_rex; + +struct RegexCollectionPriv; + class FERRISEXP_API RegexCollection + { + typedef Loki::SmartPtr< RegexCollectionPriv, + Loki::RefLinked, + Loki::AllowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > fh_pdata; + mutable fh_pdata m_priv; + + public: + explicit RegexCollection( bool caseSensitive = true ); + ~RegexCollection(); + void append( const std::string& s ); + void append( const std::list< std::string >& s ); + void clear(); + + fh_rex getRegex() const; + }; + + namespace FullTextIndex + { + /** + * Settings for what stemming to perform on tokens in the lexicon + */ + enum StemMode + { + STEM_J_B_LOVINS_68 = 1<<1, // ferris indexing only + STEM_PORTER = 1<<2, // lucene indexing only + STEM_NONE = 1<<16, + }; + }; + + + // For classes that shouldn't be copied this will disallow + // assignment and copy ctor at compile time + // Use it inside class private part. +#define NOT_COPYABLE(EnclosingClassName) \ + EnclosingClassName( const EnclosingClassName& ); \ + EnclosingClassName& operator=( const EnclosingClassName& ) + +#ifndef FERRIS_SMARTPTR +#define FERRIS_SMARTPTR( ClassName, HandleName ) \ + typedef Loki::SmartPtr< ClassName, \ + FerrisLoki::FerrisExRefCounted, \ + Loki::DisallowConversion, \ + FerrisLoki::FerrisExSmartPointerChecker, \ + FerrisLoki::FerrisExSmartPtrStorage > HandleName; +#endif + +#ifndef FERRIS_NIREF +#define FERRIS_NIREF( ClassName, HandleName ) \ + typedef Loki::SmartPtr< ClassName, \ + Loki::RefLinked, \ + Loki::DisallowConversion, \ + FerrisLoki::FerrisExSmartPointerChecker, \ + Loki::DefaultSPStorage > HandleName +#endif + + class FERRISEXP_API Handlable : public FerrisLoki::Handlable + { + public: + Handlable() + { + } + virtual ~Handlable() + { + } + }; + +// #define FerrisRefCounted FerrisLoki::FerrisExRefCounted +// #define FerrisSmartPointerChecker FerrisLoki::FerrisExSmartPointerChecker +// #define FerrisSmartPtrStorage FerrisLoki::FerrisExSmartPtrStorage +// typedef FerrisLoki::Handlable Handlable; + +// typedef FerrisLoki::FerrisExRefCounted FerrisRefCounted; +// typedef FerrisLoki::FerrisExSmartPointerChecker FerrisSmartPointerChecker; +// typedef FerrisLoki::FerrisExSmartPtrStorage FerrisSmartPtrStorage; + + /** + * every emblem has a unique numeric identifier + */ + typedef guint32 emblemID_t; + + class Attribute; + class AttributeCollection; + class IContext; + class Context; + class ContextIterator; + class NativeContext; + class SelectionFactoryContext; + class RootContext; + class NamingEvent; + class RootContextFactory; + class RootContextDropper; + class CacheManager; + class ContextVFS_RootContextDropper; + namespace Private { + class CacheManagerContextStateInTime; + }; + namespace FCA { + class DatabaseResultSetContext; + class LatticeRootConceptVFS_RootContextDropper; + }; + class EAGenerator; + class Versioned; + class Digest_EAGenerator; + class Head_EAGenerator; + class HeadRadix_EAGenerator; + class MatchedEAGeneratorFactory; + class CreateMetaDataContext; + class DelegatingCreateMetaDataContext; + class FerrisExceptionBase; + class childContext; + class SortedContext; + class Runner; + class AttributeProxy; + class PluginOutOfProcNotificationEngine; + class CreationStatelessFunctor; + class Ferrisls_aggregate_data; + class PreprocessedSortString; + class AsyncIOHandler; + class XMLMsgStreamCollector; + class Personality; + FERRIS_SMARTPTR( Personality, fh_personality ); + class ChildStreamServer; + class FerrisSlaveProcess; + FERRIS_SMARTPTR( FerrisSlaveProcess, fh_FerrisSlaveProcess ); + + typedef CreateMetaDataContext f_mdcontext; + + class Image; + FERRIS_SMARTPTR( Image, fh_image ); + + class MetadataWorker; + class MetadataBrokerDispatchInformation; + + + /** + * SmartPtr<> policy class [OwnershipPolicy] for Handlable objects. + * This class implements a intrusive reference count like the COMRefCounted + * policy in the Modern C++ design book. + */ + template + class FerrisExRefCountedContext + { + public: + + FerrisExRefCountedContext() {} + FerrisExRefCountedContext( const FerrisExRefCountedContext& r) {} + template FerrisExRefCountedContext(const FerrisExRefCountedContext&) {} + + /** + * Create a new handle + */ + P Clone(const P& val) + { + if( val ) + { + val->AddRef(); + } + return val; + } + + /** + * Release a reference. This may trigger a getClosureSignal() to fire due to + * the final reference being dropped. + * + * @param val Object that we are releasing an intrusive reference to + * @return true if the object should die. + */ + bool Release(const P& val) + { + if( !val ) + { + return false; + } + + int v = val->::Ferris::Handlable::AddRef(); + if( v == 2 ) + { + val->private_AboutToBeDeleted(); + } + v = val->::Ferris::Handlable::Release(); + + v = val->Release(); + if( !v ) + { + /* + * Time to die amigo + */ + return true; + } + + return false; + } + + enum { destructiveCopy = false }; + static void Swap(FerrisExRefCountedContext&) + {} + }; + template class CHECKER> + inline bool isBound( const Loki::SmartPtr< T, + ::Ferris::FerrisExRefCountedContext, + CONVERTER, + CHECKER, + FerrisLoki::FerrisExSmartPtrStorage > & sp) + { + return GetImpl(sp) != 0 ; + } + + FERRIS_SMARTPTR( AttributeProxy, fh_attribute ); +#ifndef FERRIS_CTX_SMARTPTR +#define FERRIS_CTX_SMARTPTR( ClassName, HandleName ) \ + typedef Loki::SmartPtr< ClassName, \ + ::Ferris::FerrisExRefCountedContext, \ + Loki::DisallowConversion, \ + FerrisLoki::FerrisExSmartPointerChecker, \ + FerrisLoki::FerrisExSmartPtrStorage > HandleName; +#endif + FERRIS_CTX_SMARTPTR( Context, fh_context ); +// FERRIS_SMARTPTR( Context, fh_context ); + + FERRIS_CTX_SMARTPTR( CreateMetaDataContext, fh_mdcontext ); + FERRIS_CTX_SMARTPTR( AttributeCollection, fh_attrcol ); + FERRIS_SMARTPTR( Runner, fh_runner ); + FERRIS_SMARTPTR( Ferrisls_aggregate_data, fh_display_aggdata ); + FERRIS_SMARTPTR( PreprocessedSortString, fh_sorter ); + typedef PreprocessedSortString f_sorter; + typedef std::list fh_sorters; + + FERRIS_SMARTPTR( AsyncIOHandler, fh_aiohandler ); + FERRIS_SMARTPTR( XMLMsgStreamCollector, fh_xstreamcol ); + + + class Emblem; + class ColdEmblem; + class Etagere; + class Medallion; + class MedallionBelief; + FERRIS_SMARTPTR( Emblem, fh_emblem ); + FERRIS_SMARTPTR( ColdEmblem, fh_cemblem ); + FERRIS_SMARTPTR( Etagere, fh_etagere ); + FERRIS_SMARTPTR( Medallion, fh_medallion ); + FERRIS_SMARTPTR( MedallionBelief, fh_medallionBelief ); + + class Regex; + FERRIS_SMARTPTR( Regex, fh_regex ); + + typedef std::list< std::string > stringlist_t; + typedef std::vector< std::string > stringvec_t; + typedef std::set< std::string > stringset_t; + typedef std::map< std::string, std::string > stringmap_t; + typedef std::map< int, int > intmap_t; + + typedef std::list< fh_context > ctxlist_t; + typedef std::pair< std::string, std::string > userpass_t; + typedef std::pair< std::string, std::string > stringpair_t; + + +// FERRIS_SMARTPTR( MatchedEAGeneratorFactory, fh_MatchedEAGeneratorFactory ); +// typedef std::list< fh_MatchedEAGeneratorFactory > EAGenFactorys_t; + + + namespace EAIndex + { + // These two need to know about each other in header files so + // that eaquery can make EAIndexManagerDB4 a friend and + // EAIndexManagerDB4 can call a method on fh_eaquery + // to continue processing the query using the db4 based indexing. + class EAQuery; + FERRIS_SMARTPTR( EAQuery, fh_eaquery ); + class EAIndexManagerDB4; + FERRIS_SMARTPTR( EAIndexManagerDB4, fh_db4idx ); + class EAIndexManagerDB4Tree; + FERRIS_SMARTPTR( EAIndexManagerDB4Tree, fh_db4treeidx ); + class FERRISEXP_API ForwardEAIndexInterface; + FERRIS_SMARTPTR( ForwardEAIndexInterface, fh_fwdeaidx ); + }; + + namespace redlandea + { + class SmushSet; + class TreeSmushing; + FERRIS_SMARTPTR( SmushSet, fh_SmushSet ); + FERRIS_SMARTPTR( TreeSmushing, fh_TreeSmushing ); + }; + + namespace Semantic + { + class SmushSet; + class TreeSmushing; + struct tryToGetUUIDNode_StringARM; + FERRIS_SMARTPTR( SmushSet, fh_SmushSet ); + FERRIS_SMARTPTR( TreeSmushing, fh_TreeSmushing ); + }; + +}; + +//#ifdef SIGCXX_HAS_LESS_THAN_FIVE_SIGNAL_ARGS_AS_MAX +#include + +// Using sigc++ 2.x +#ifdef _SIGC_REFERENCE_WRAPPER_H_ +#define LIBFERRIS__DONT_INCLUDE_SIGCC_EXTENSIONS +#endif + +#ifndef LIBFERRIS__DONT_INCLUDE_SIGCC_EXTENSIONS +namespace SigC +{ + +/// @ingroup Signals +template > +class Signal6 : public SignalBase + { + public: + typedef Slot6 InSlotType; + typedef Slot6 OutSlotType; + typedef typename Trait::type OutType; + + private: + // Used for both emit and proxy. + static OutType emit_( + typename Trait::ref p1,typename Trait::ref p2, + typename Trait::ref p3,typename Trait::ref p4, + typename Trait::ref p5,typename Trait::ref p6, + void* data); + + public: + OutSlotType slot() const + { return create_slot((FuncPtr)(&emit_)); } + + operator OutSlotType() const + { return create_slot((FuncPtr)(&emit_)); } + + /// You can call Connection::disconnect() later. + Connection connect(const InSlotType& s) + { return Connection(push_back(s)); } + + /// Call all the connected methods. + OutType emit(typename Trait::ref p1,typename Trait::ref p2,typename Trait::ref p3,typename Trait::ref p4,typename Trait::ref p5, typename Trait::ref p6) + { return emit_(p1,p2,p3,p4,p5,p6,impl_); } + + /// See emit() + OutType operator()(typename Trait::ref p1,typename Trait::ref p2,typename Trait::ref p3,typename Trait::ref p4,typename Trait::ref p5, typename Trait::ref p6) + { return emit_(p1,p2,p3,p4,p5,p6,impl_); } + + Signal6() + : SignalBase() + {} + + Signal6(const InSlotType& s) + : SignalBase() + { connect(s); } + + ~Signal6() {} + }; + + +// emit +template +typename Signal6::OutType +Signal6::emit_( + typename Trait::ref p1,typename Trait::ref p2, + typename Trait::ref p3,typename Trait::ref p4, + typename Trait::ref p5,typename Trait::ref p6, + void* data) +{ + SignalNode* impl = static_cast(data); + + if (!impl || !impl->begin_) + return Marsh::default_value(); + + Exec exec(impl); + Marsh rc; + SlotNode* s = 0; + + for (SignalConnectionNode* i = impl->begin_; i; i=i->next_) + { + if (i->blocked()) continue; + s = i->dest(); + if (rc.marshal(((typename Slot5::Proxy)(s->proxy_))(p1,p2,p3,p4,p5,s))) + return rc.value(); + } + return rc.value(); + } + + +/// @ingroup Signals +template +class Signal6 : public SignalBase + { + public: + typedef Slot6 InSlotType; + typedef InSlotType OutSlotType; + typedef void OutType; + + private: + // Used for both emit and proxy. + static OutType emit_(typename Trait::ref p1,typename Trait::ref p2,typename Trait::ref p3,typename Trait::ref p4,typename Trait::ref p5,typename Trait::ref p6,void* data); + + public: + OutSlotType slot() const + { return create_slot((FuncPtr)(&emit_)); } + + operator OutSlotType() const + { return create_slot((FuncPtr)(&emit_)); } + + /// You can call Connection::disconnect() later. + Connection connect(const InSlotType& s) + { return Connection(push_back(s)); } + + /// Call all the connected methods. + OutType emit(typename Trait::ref p1,typename Trait::ref p2,typename Trait::ref p3,typename Trait::ref p4,typename Trait::ref p5,typename Trait::ref p6) + { emit_(p1,p2,p3,p4,p5,p6,impl_); } + + /// See emit() + OutType operator()(typename Trait::ref p1,typename Trait::ref p2,typename Trait::ref p3,typename Trait::ref p4,typename Trait::ref p5, typename Trait::ref p6) + { emit_(p1,p2,p3,p4,p5,p6,impl_); } + + Signal6() + : SignalBase() + {} + + Signal6(const InSlotType& s) + : SignalBase() + { connect(s); } + + ~Signal6() {} + }; + + +// emit +template +void Signal6::emit_( + typename Trait::ref p1, + typename Trait::ref p2, + typename Trait::ref p3, + typename Trait::ref p4, + typename Trait::ref p5, + typename Trait::ref p6, + void* data) +{ + SignalNode* impl = static_cast(data); + + if (!impl||!impl->begin_) + return; + + Exec exec(impl); + SlotNode* s = 0; + for (SignalConnectionNode* i = impl->begin_; i; i = i->next_) + { + if (i->blocked()) + continue; + + s = i->dest(); + ((typename Slot6::Proxy)(s->proxy_))(p1,p2,p3,p4,p5,p6,s); + } + return; + } +}; +//#endif //SIGCXX_HAS_LESS_THAN_FIVE_SIGNAL_ARGS_AS_MAX +#endif + +#endif // ifndef _ALREADY_INCLUDED_TYPEDECL_H_ diff --git a/Ferris/ValueRestorer.hh b/Ferris/ValueRestorer.hh new file mode 100644 index 0000000..ec9e8f8 --- /dev/null +++ b/Ferris/ValueRestorer.hh @@ -0,0 +1,98 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ValueRestorer.hh,v 1.3 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_VALUE_RESTORER_H_ +#define _ALREADY_INCLUDED_VALUE_RESTORER_H_ + +#include + +namespace Ferris +{ + namespace Util + { + /** + * Class that stores a value into a location for the existance of an + * object of this class. This can be handy to set a value within a + * limited scope only, and to be sure that the old value is restored + * when that scope is left. + */ + template + struct ValueRestorer + { + typedef T& RefType; + + RefType var; + const T originalValue; + + explicit ValueRestorer( RefType x, const T& tmpVal ) + : + var(x), + originalValue( x ) + { + var = tmpVal; + } + explicit ValueRestorer( RefType x ) + : + var(x), + originalValue( x ) + { + } + ~ValueRestorer() + { + var = originalValue; + } + + }; + + /** + * increment the value on construction and decrement on dtor + */ + template + struct ValueBumpDrop + { + typedef T& RefType; + RefType var; + + ValueBumpDrop( RefType x ) + : + var( x ) + { + ++var; + } + ~ValueBumpDrop() + { + --var; + } + }; + + }; + +}; + +#endif diff --git a/Ferris/Versioned.cpp b/Ferris/Versioned.cpp new file mode 100644 index 0000000..114e4f6 --- /dev/null +++ b/Ferris/Versioned.cpp @@ -0,0 +1,80 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Versioned.cpp,v 1.2 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + /** + * Default ctor, version numbering starts at MINIMUM_VERSION + * + */ + Versioned::Versioned() + : + Version( MINIMUM_VERSION ) + { + } + + /** + * Get the current version of this versioned + * + * @return The current version + */ + Versioned::Version_t + Versioned::getVersion() const + { + return Version; + } + + + /** + * Increment the current version by one unit. + */ + void + Versioned::bumpVersion() + { + Version++; + } + + + /** + * Set the version to a given number. This method should be + * used with great caution because classes that expect a + * Versioned usually expect the version to steadily increase + * and never backtrack. + * + * @param v The version to set to + */ + void + Versioned::setVersion(Version_t v) + { + Version = v; + } +}; + diff --git a/Ferris/Versioned.hh b/Ferris/Versioned.hh new file mode 100644 index 0000000..cafe174 --- /dev/null +++ b/Ferris/Versioned.hh @@ -0,0 +1,62 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Versioned.hh,v 1.2 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_VERSIONED_H_ +#define _ALREADY_INCLUDED_FERRIS_VERSIONED_H_ + +#include +#include + +namespace Ferris +{ + class FERRISEXP_API Versioned + : + public Handlable + { + public: + + typedef guint32 Version_t; + + Versioned(); + Version_t getVersion() const; + + protected: + + void bumpVersion(); + void setVersion( Version_t v ); + + private: + + Version_t Version; + static const Version_t MINIMUM_VERSION = 1; + + }; +}; +#endif diff --git a/Ferris/WrapXMMS.cpp b/Ferris/WrapXMMS.cpp new file mode 100644 index 0000000..48a4d8f --- /dev/null +++ b/Ferris/WrapXMMS.cpp @@ -0,0 +1,347 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Ego + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: WrapXMMS.cpp,v 1.4 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "WrapXMMS.hh" +#include + +#include + +using namespace std; + +namespace Ferris +{ + + void + XMMS::ensureChildXMMSRunning() + { + if( theRunner ) + return; + + + fh_runner r = new Runner(); + theRunner = r; + + r->setCommandLine( "ferris-internal-xmms-server -D -D" ); + r->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_DO_NOT_REAP_CHILD | + r->getSpawnFlags())); + r->setConnectStdIn( true ); + r->Run(); + + + toChildss = r->getStdIn(); + fromChildss = r->getStdOut(); + } + + void + XMMS::putCommand( const std::string& s ) + { + ensureChildXMMSRunning(); + toChildss << s << endl << flush; + } + + string + XMMS::getReply() + { + string s; + getline( fromChildss, s ); + return s; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + XMMS::XMMS() + : + theRunner( 0 ) + { + } + + + XMMS::~XMMS() + { + if( theRunner ) + theRunner->killChild(); + } + + void XMMS::playlistPrev() + { + putCommand( "playlist-prev" ); + getReply(); + } + + void XMMS::playlistNext() + { + putCommand( "playlist-next" ); + getReply(); + } + + int + XMMS::getPlaylistPosition() + { + putCommand( "playlist-get-position" ); + return toint(getReply()); + } + + void + XMMS::setPlaylistPosition( int plpos ) + { + putCommand( "playlist-set-position " + tostr(plpos) ); + getReply(); + } + + void + XMMS::playlistEnqueue( const std::string& url ) + { + putCommand( "playlist-enqueue " + url ); + getReply(); + } + + void + XMMS::playlistAdd( const std::string& url ) + { + putCommand( "playlist-add " + url ); + getReply(); + } + + void + XMMS::playlistClear() + { + putCommand( "playlist-clear" ); + getReply(); + } + + int + XMMS::getPlaylistLength() + { + putCommand( "playlist-get-length" ); + return toint(getReply()); + } + + stringlist_t + XMMS::getPlaylistTitles() + { + stringlist_t ret; + int len = getPlaylistLength(); + + for( int i=0; i(getReply()); + } + + + + + int + XMMS::getVolume() + { + putCommand( "volume-get" ); + return toint( getReply() ); + } + + void + XMMS::setVolume( gint v ) + { + putCommand( "volume-set " + tostr(v) ); + getReply(); + } + + void + XMMS::adjustVolume( gint v ) + { + putCommand( "volume-adjust " + tostr(v) ); + getReply(); + } + + bool + XMMS::isPlaying() + { + putCommand( "is-playing" ); + return toint(getReply()); + } + + bool + XMMS::isPaused() + { + putCommand( "is-paused" ); + return toint(getReply()); + } + + + void + XMMS::play() + { + putCommand( "play" ); + getReply(); + } + + void + XMMS::pause() + { + putCommand( "pause" ); + getReply(); + } + + void + XMMS::stop() + { + putCommand( "stop" ); + getReply(); + } + + void + XMMS::playPause() + { + putCommand( "play-pause" ); + getReply(); + } + + + string + XMMS::getCurrentSongURL() + { + putCommand( "current-file" ); + return getReply(); + } + + string + XMMS::getCurrentSongTitle() + { + putCommand( "current-title" ); + return getReply(); + } + + void + XMMS::seek( int millis ) + { + cerr << "seeking to offset:" << millis << endl; + fh_stringstream ss; + ss << "seek " << millis; + putCommand( tostr(ss) ); + getReply(); + } + + void + XMMS::seekAbsolute( double v ) + { + cerr << "seeking to percent:" << v << endl; + fh_stringstream ss; + ss << "seek-absolute " << v; + putCommand( tostr(ss) ); + getReply(); + } + + + int + XMMS::getCurrentTime() + { + putCommand( "current-time" ); + return toint(getReply()); + } + + int + XMMS::getTotalTime() + { + putCommand( "current-total-time" ); + return toint(getReply()); + } + + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + fh_xmms getDefaultXMMS() + { + static fh_xmms x = 0; + if( !x ) + { + x = new XMMS(); + } + return x; + } + +}; diff --git a/Ferris/WrapXMMS.hh b/Ferris/WrapXMMS.hh new file mode 100644 index 0000000..4736217 --- /dev/null +++ b/Ferris/WrapXMMS.hh @@ -0,0 +1,114 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: WrapXMMS.hh,v 1.3 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_WRAP_XMMS_H_ +#define _ALREADY_INCLUDED_FERRIS_WRAP_XMMS_H_ + +#include +#include + + +namespace Ferris +{ + + class XMMS + : + public Handlable + { + fh_runner theRunner; + fh_ostream toChildss; + fh_istream fromChildss; + + void ensureChildXMMSRunning(); + void putCommand( const std::string& s ); + std::string getReply(); + public: + XMMS(); + virtual ~XMMS(); + + void playlistPrev(); + void playlistNext(); + + int getPlaylistPosition(); + void setPlaylistPosition( int plpos ); + + void playlistAdd( const std::string& url ); + void playlistEnqueue( const std::string& url ); + void playlistClear(); + + int getPlaylistLength(); + stringlist_t getPlaylistTitles(); + stringlist_t getPlaylistURLs(); + std::string getPlaylistTitle( int pos ); + std::string getPlaylistURL( int pos ); + time_t getPlaylistTime( int pos ); + struct PlaylistItem + { + std::string title; + std::string url; + time_t tt; + int pos; + PlaylistItem( std::string title = "", std::string url = "", time_t tt = 0, int pos = 0 ) + : + title( title ), url( url ), tt( tt ), pos( pos ) + { + } + }; + typedef std::list< PlaylistItem > PlaylistItemList_t; + PlaylistItemList_t getPlaylist(); + + + int getVolume(); + void setVolume( gint v ); + void adjustVolume( gint v ); + + bool isPlaying(); + bool isPaused(); + void play(); + void pause(); + void stop(); + void playPause(); + std::string getCurrentSongURL(); + std::string getCurrentSongTitle(); + + void seek( int millis ); + void seekAbsolute( double v ); + + int getCurrentTime(); + int getTotalTime(); + + }; + + FERRIS_SMARTPTR( XMMS, fh_xmms ); + fh_xmms getDefaultXMMS(); +}; + + +#endif diff --git a/Ferris/XQilla.cpp b/Ferris/XQilla.cpp new file mode 100644 index 0000000..2b03b98 --- /dev/null +++ b/Ferris/XQilla.cpp @@ -0,0 +1,3006 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: XQilla.cpp,v 1.20 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include + +using namespace XERCES_CPP_NAMESPACE; +using namespace std; + +bool PERFORM_UPDATES = true; + + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// These are from xqilla internal header files :/ +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +class XercesSequenceBuilder : public SequenceBuilder +{ +public: + XercesSequenceBuilder(const DynamicContext *context); + virtual ~XercesSequenceBuilder(); + + virtual void startDocumentEvent(const XMLCh *documentURI, const XMLCh *encoding); + virtual void endDocumentEvent(); + virtual void startElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname); + virtual void endElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void piEvent(const XMLCh *target, const XMLCh *value); + virtual void textEvent(const XMLCh *value); + virtual void textEvent(const XMLCh *chars, unsigned int length); + virtual void commentEvent(const XMLCh *value); + virtual void attributeEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *value, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void namespaceEvent(const XMLCh *prefix, const XMLCh *uri); + virtual void atomicItemEvent(AnyAtomicType::AtomicObjectType type, const XMLCh *value, const XMLCh *typeURI, + const XMLCh *typeName); + virtual void endEvent(); + + virtual Sequence getSequence() const { return seq_; } + + static void setElementTypeInfo(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *element, const XMLCh *typeURI, const XMLCh *typeName); + static void setAttributeTypeInfo(XERCES_CPP_NAMESPACE_QUALIFIER DOMAttr *attr, const XMLCh *typeURI, const XMLCh *typeName); + +private: + const DynamicContext *context_; + XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *document_; + XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *currentParent_; + XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *currentNode_; + Sequence seq_; +}; + +/// Stores and manages all the information for a Fast XDM document +class XQILLA_API FastXDMDocument : public EventHandler, public ReferenceCounted +{ +public: + typedef RefCountPointer Ptr; + + enum NodeKind { + DOCUMENT, + ELEMENT, + TEXT, + COMMENT, + PROCESSING_INSTRUCTION, + MARKER + }; + + struct Node; + + struct Attribute { + void set(unsigned int oi, const XMLCh *p, const XMLCh *u, const XMLCh *l, const XMLCh *v, const XMLCh *tu, const XMLCh *tn) + { + owner.index = oi; prefix = p; uri = u; localname = l; value = v; typeURI = tu; typeName = tn; + } + void setMarker() + { + owner.index = (unsigned int)-1; prefix = 0; uri = 0; localname = 0; value = 0; + } + + union { + unsigned int index; + Node *ptr; + } owner; + + const XMLCh *prefix; + const XMLCh *uri; + const XMLCh *localname; + + const XMLCh *value; + + const XMLCh *typeURI; + const XMLCh *typeName; + }; + + struct Namespace { + void set(unsigned int oi, const XMLCh *p, const XMLCh *u) + { + owner.index = oi; prefix = p; uri = u; + } + + union { + unsigned int index; + Node *ptr; + } owner; + + const XMLCh *prefix; + const XMLCh *uri; + }; + + struct Node { + void setDocument(const XMLCh *d, const XMLCh *e) + { + nodeKind = DOCUMENT; level = 0; nextSibling.index = (unsigned int)-1; data.document.documentURI = d; + data.document.encoding = e; + } + void setElement(unsigned int lv, const XMLCh *p, const XMLCh *u, const XMLCh *l) + { + nodeKind = ELEMENT; level = lv; nextSibling.index = (unsigned int)-1; + data.element.attributes.index = (unsigned int)-1; data.element.namespaces.index = (unsigned int)-1; + data.element.prefix = p; data.element.uri = u; data.element.localname = l; + } + void setElementType(const XMLCh *tu, const XMLCh *tn) + { + data.element.typeURI = tu; data.element.typeName = tn; + } + void setPI(unsigned int lv, const XMLCh *t, const XMLCh *v) + { + nodeKind = PROCESSING_INSTRUCTION; level = lv; nextSibling.index = (unsigned int)-1; data.other.target = t; + data.other.value = v; + } + void setText(unsigned int lv, const XMLCh *v) + { + nodeKind = TEXT; level = lv; nextSibling.index = (unsigned int)-1; data.other.target = 0; data.other.value = v; + } + void setComment(unsigned int lv, const XMLCh *v) + { + nodeKind = COMMENT; level = lv; nextSibling.index = (unsigned int)-1; data.other.target = 0; data.other.value = v; + } + void setMarker() + { + nodeKind = MARKER; level = 0; nextSibling.index = (unsigned int)-1; + } + + NodeKind nodeKind; + unsigned int level; + + union { + unsigned int index; + Node *ptr; + } nextSibling; + + union { + struct { + const XMLCh *documentURI; + const XMLCh *encoding; + } document; + + struct { + union { + unsigned int index; + Attribute *ptr; + } attributes; + + union { + unsigned int index; + Namespace *ptr; + } namespaces; + + const XMLCh *prefix; + const XMLCh *uri; + const XMLCh *localname; + + const XMLCh *typeURI; + const XMLCh *typeName; + } element; + + struct { + const XMLCh *target; + const XMLCh *value; + } other; + + } data; + + }; + + FastXDMDocument(XPath2MemoryManager *mm); + FastXDMDocument(unsigned int numNodes, unsigned int numAttributes, unsigned int numNamespaces, XPath2MemoryManager *mm); + virtual ~FastXDMDocument(); + + virtual void startDocumentEvent(const XMLCh *documentURI, const XMLCh *encoding); + virtual void endDocumentEvent(); + virtual void startElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname); + virtual void endElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void piEvent(const XMLCh *target, const XMLCh *value); + virtual void textEvent(const XMLCh *value); + virtual void textEvent(const XMLCh *chars, unsigned int length); + virtual void commentEvent(const XMLCh *value); + virtual void attributeEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *value, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void namespaceEvent(const XMLCh *prefix, const XMLCh *uri); + virtual void endEvent(); + + Node *getNode(unsigned int i); + const Node *getNode(unsigned int i) const; + unsigned int getNumNodes() const { return numNodes_; } + + Attribute *getAttribute(unsigned int i); + const Attribute *getAttribute(unsigned int i) const; + unsigned int getNumAttributes() const { return numAttributes_; } + + Namespace *getNamespace(unsigned int i); + const Namespace *getNamespace(unsigned int i) const; + unsigned int getNumNamespaces() const { return numNamespaces_; } + + static const Node *getParent(const Node *node); + + static void toEvents(const Node *node, EventHandler *events, bool preserveNS = true, bool preserveType = true); + static void toEvents(const Attribute *attr, EventHandler *events, bool preserveType = true); + static void toEvents(const Namespace *ns, EventHandler *events); + +private: + void resizeNodes(); + void resizeAttributes(); + void resizeNamespaces(); + + XERCES_CPP_NAMESPACE_QUALIFIER ValueStackOf elementStack_; + unsigned int prevNode_; + + XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer textBuffer_; + bool textToCreate_; + + Node *nodes_; + unsigned int numNodes_; + unsigned int maxNodes_; + + Attribute *attributes_; + unsigned int numAttributes_; + unsigned int maxAttributes_; + + Namespace *namespaces_; + unsigned int numNamespaces_; + unsigned int maxNamespaces_; + + XPath2MemoryManager *mm_; +}; + +inline const FastXDMDocument::Node *FastXDMDocument::getParent(const Node *node) +{ + unsigned int level = node->level; + + if(level == 0) return 0; + + do { + --node; + } while(node->level >= level); + + return node; +} + +class FastXDMSequenceBuilder : public SequenceBuilder +{ +public: + FastXDMSequenceBuilder(const DynamicContext *context); + + virtual void startDocumentEvent(const XMLCh *documentURI, const XMLCh *encoding); + virtual void endDocumentEvent(); + virtual void startElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname); + virtual void endElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void piEvent(const XMLCh *target, const XMLCh *value); + virtual void textEvent(const XMLCh *value); + virtual void textEvent(const XMLCh *chars, unsigned int length); + virtual void commentEvent(const XMLCh *value); + virtual void attributeEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *value, + const XMLCh *typeURI, const XMLCh *typeName); + virtual void namespaceEvent(const XMLCh *prefix, const XMLCh *uri); + virtual void atomicItemEvent(AnyAtomicType::AtomicObjectType type, const XMLCh *value, const XMLCh *typeURI, + const XMLCh *typeName); + virtual void endEvent(); + + virtual Sequence getSequence() const { return seq_; } + +private: + const DynamicContext *context_; + unsigned int level_; + FastXDMDocument::Ptr document_; + Sequence seq_; +}; + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace Ferris +{ + namespace qilla + { + void copyChildren( const DynamicContext* dc, + DOMDocument* document, fh_context c, DOMElement* target ); + + std::string + canonicalElementName( std::string rdn ) + { + LG_XQILLA_D << "canonicalElementName(top) rdn:" << rdn << endl; + + string nn = rdn; + if( starts_with( nn, "." )) + nn = (string)"_" + nn; + nn = Util::replace_all( nn, " ", "_space_" ); + nn = Util::replace_all( nn, "+", "_plus_" ); + nn = Util::replace_all( nn, "(", "_oper_" ); + nn = Util::replace_all( nn, ")", "_cper_" ); + nn = Util::replace_all( nn, ",", "_comma_" ); + nn = Util::replace_all( nn, "-", "_dash_" ); + nn = Util::replace_all( nn, ":", "_colon_" ); + + static const boost::regex r = toregex( "^[0-9]" ); + if( regex_search( nn, r, boost::match_any ) ) + { + nn = "number_" + nn; + } + + + + LG_XQILLA_D << "canonicalElementName(bottom) rdn:" << nn << endl; + return nn; + } + std::string + canonicalElementName( fh_context c ) + { + return canonicalElementName( c->getDirName() ); + } + + + ///////////////////////////////////////// + ///////////////////////////////////////// + ///////////////////////////////////////// + ///////////////////////////////////////// + + + ShouldIncludeAttribute::ShouldIncludeAttribute() + : + m_showColumnsRegexString("") + { + } + + bool + ShouldIncludeAttribute::nameContainsIllegalXMLAttributeChar( const std::string& eaname ) + { + LG_XQILLA_D << "nameContainsIllegalXMLAttributeChar() eaname:" << eaname << endl; + static const boost::regex r = toregex( "[-A-Za-z0-9_]+" ); + return( !regex_match( eaname, r, boost::match_any ) ); + } + + + + void + ShouldIncludeAttribute::setShowColumns( const std::string& s ) + { + Util::parseCommaSeperatedList( s, m_showColumnsList ); + } + + void + ShouldIncludeAttribute::setShowColumnsRegex( const std::string& s ) + { + m_showColumnsRegexString = s; + m_showColumnsRegex = toregex( s ); + } + + bool + ShouldIncludeAttribute::shouldInclude( fh_context c, const std::string& eaname ) + { + + if( m_showColumnsList.count( eaname ) ) + { + if( nameContainsIllegalXMLAttributeChar( eaname ) ) + return false; + return true; + } + + if( !m_showColumnsRegexString.empty() + && regex_search( eaname, m_showColumnsRegex, boost::match_any )) + { + if( nameContainsIllegalXMLAttributeChar( eaname ) ) + return false; + return true; + } + + return false; + } + + + typedef map< const DynamicContext*, fh_shouldIncludeAttribute > getShouldIncludeAttribute_cache_t; + getShouldIncludeAttribute_cache_t& getShouldIncludeAttribute_cache() + { + static getShouldIncludeAttribute_cache_t ret; + return ret; + } + + + fh_shouldIncludeAttribute getShouldIncludeAttribute( const DynamicContext* context ) + { + getShouldIncludeAttribute_cache_t::iterator iter = getShouldIncludeAttribute_cache().find( context ); + if( iter != getShouldIncludeAttribute_cache().end() ) + { + return iter->second; + } + fh_shouldIncludeAttribute n = new ShouldIncludeAttribute(); + n->setShowColumnsRegex(".*"); + getShouldIncludeAttribute_cache().insert( make_pair( context, n ) ); + return getShouldIncludeAttribute_cache()[ context ]; + } + + void setShouldIncludeAttribute( DynamicContext* context, fh_shouldIncludeAttribute sia ) + { + getShouldIncludeAttribute_cache()[ context ] = sia; + } + + + + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + + class FQilla_ResultImpl : public ResultImpl + { + protected: + fh_context m_ctx; + const NodeTest* m_nodeTest; + string m_NodeNameWildcard; + string m_NodeNamespaceURIWildcard; + SequenceType::ItemType* m_itemType; + boost::regex m_NodeNameWildcardRegex; + + + bool haveItemType() + { + return m_itemType; + } + + Item::Ptr handleNodeTestForItemType( DynamicContext *dynamicContext, fh_context ctx, const std::string& eaname ) + { + SequenceType::ItemType *itemType = m_nodeTest->getItemType(); + if(itemType != 0) + { +// Node::Ptr result = factory_.createNode(node, dynamicContext); + Node::Ptr result = new FQilla_Node( dynamicContext, ctx, eaname ); + if(itemType->matches(result, dynamicContext)) { + return result; + } + } + return 0; + } + + bool passesElementTests( fh_context ctx ) + { + LG_XQILLA_D << "passesElementTests(1) ctx:" << ctx->getURL() << endl; + LG_XQILLA_D << "passesElementTests(1.b) have name wildcard:" << (m_nodeTest->getNameWildcard()!=0) << endl; + LG_XQILLA_D << "passesElementTests(1.b) have type wildcard:" << (m_nodeTest->getTypeWildcard()!=0) << endl; + + if( !m_nodeTest->getTypeWildcard() + && m_nodeTest->getNodeType() != Node::element_string + && m_nodeTest->getNodeType() != Node::text_string ) + { + LG_XQILLA_D << "passesElementTests(1R) ctx:" << ctx->getURL() << endl; + return false; + } + + LG_XQILLA_D << "passesElementTests(2) ctx:" << ctx->getURL() << endl; + LG_XQILLA_D << "m_NodeNameWildcard:" << m_NodeNameWildcard << endl; + std::string localName; + if( !m_NodeNameWildcard.empty() )//|| !m_NodeNameWildcard.empty() ) + localName = canonicalElementName( ctx ); + + if( !m_NodeNameWildcard.empty() && + !regex_match( localName, m_NodeNameWildcardRegex, boost::match_any )) + { + LG_XQILLA_D << "passesElementTests(2-bad) ctx:" << ctx->getURL() + << " localName:" << localName + << " m_NodeNameWildcard:" << m_NodeNameWildcard + << endl; + return false; + } + +// std::string localName = canonicalElementName( ctx ); +// if( !m_NodeNameWildcard.empty() && m_NodeNameWildcard != localName ) +// { +// return false; +// } + + LG_XQILLA_D << "passesElementTests(3) ctx:" << ctx->getURL() << endl; + if( !m_NodeNamespaceURIWildcard.empty() && m_NodeNamespaceURIWildcard != "FIXME" ) + { + return false; + } + + LG_XQILLA_D << "passesElementTests(ok) ctx:" << ctx->getURL() << endl; + return true; + } + + + public: + FQilla_ResultImpl( const LocationInfo *o, + const NodeTest* nodeTest, + fh_context ctx ) + : + ResultImpl( o ), + m_nodeTest( nodeTest ), + m_ctx( ctx ), + m_itemType( 0 ), + m_NodeNameWildcard(""), + m_NodeNamespaceURIWildcard("") + { + if( m_nodeTest ) + { + LG_XQILLA_D << "FQilla_ResultImpl() have nodeTest" << endl; + m_itemType = m_nodeTest->getItemType(); + + if(!m_nodeTest->getNameWildcard() && !tostr(m_nodeTest->getNodeName()).empty()) + { + m_NodeNameWildcard = tostr(m_nodeTest->getNodeName()); + m_NodeNameWildcardRegex = toregex( m_NodeNameWildcard + "(--[0-9]+)?" ); + LG_XQILLA_D << "FQilla_ResultImpl() m_NodeNameWildcard:" << m_NodeNameWildcard << endl; + } + + if(!m_nodeTest->getNamespaceWildcard()) + m_NodeNamespaceURIWildcard = tostr(m_nodeTest->getNodeUri()); + } + } + virtual ~FQilla_ResultImpl() + { + } + +// virtual Item::Ptr next(DynamicContext *context); + virtual std::string asString(DynamicContext *context, int indent) const + { + LG_XQILLA_W << "asString() called but not implemented!" << endl; + } + }; + + + class FQilla_Attr_ResultImpl : public FQilla_ResultImpl + { + AttributeCollection::AttributeNames_t an; + AttributeCollection::AttributeNames_t::iterator b; + AttributeCollection::AttributeNames_t::iterator e; + AttributeCollection::AttributeNames_t::iterator iter; + string m_singleAttribute; + + public: + FQilla_Attr_ResultImpl( const LocationInfo *o, + const NodeTest* nodeTest, + fh_context ctx ) + : + FQilla_ResultImpl( o, + (nodeTest && nodeTest->getNodeName()) ? 0 : nodeTest, ctx ) + { + bool haveSetup = false; + + LG_XQILLA_D << "FQilla_Attr_ResultImpl() nodeTest:" << toVoid(nodeTest) << endl; + if( nodeTest && nodeTest->getNodeName() ) + { + LG_XQILLA_D << "node-type==attr:" << (nodeTest->getNodeType() == Node::attribute_string) << endl; + LG_XQILLA_D << "node.name:" << tostr(nodeTest->getNodeName()) << endl; + + string eaname = tostr(nodeTest->getNodeName()); + b = e = an.end(); + iter = e; + haveSetup = true; + m_singleAttribute = eaname; + } + + if( !haveSetup ) + { + ctx->getAttributeNames( an ); + b = an.begin(); + e = an.end(); + iter = an.begin(); + } + } + virtual ~FQilla_Attr_ResultImpl() + { + } + virtual Item::Ptr next( DynamicContext* dynamicContext ) + { + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() this:" << toVoid(this) << endl; + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() m_singleAttribute:" << m_singleAttribute << endl; + + if( !m_singleAttribute.empty() ) + { + LG_XQILLA_D << "m_singleAttribute:" << m_singleAttribute << endl; + string eaname = m_singleAttribute; + m_singleAttribute = ""; + FQilla_Node* ret = new FQilla_Node( dynamicContext, m_ctx, eaname ); + return ret; + } + + while( iter != e ) + { + string eaname = *iter; + ++iter; + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() ea:" << eaname << endl; + + if( haveItemType() ) + { + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() haveItemType..." << endl; + return handleNodeTestForItemType( dynamicContext, m_ctx, eaname ); + } + + + if(m_nodeTest->getTypeWildcard()) + { + if(m_nodeTest->getHasChildren()) + continue; + } + else + { + if(m_nodeTest->getNodeType() != Node::attribute_string) + { + continue; + } + } + + string localName = eaname; + if( !m_NodeNameWildcard.empty() && m_NodeNameWildcard != localName ) + { + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() ln-bad m_NodeNameWildcard:" << m_NodeNameWildcard << " ea:" << eaname << endl; + LG_XQILLA_D << "an.sz:" << an.size() << endl; + + if( !contains(m_NodeNameWildcard,"*") ) + { + AttributeCollection::AttributeNames_t::iterator t = iter; + for( ; t!=e; ++t ) + { +// LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() AA t:" << *t << endl; + if( *t == m_NodeNameWildcard ) + { + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() skipping right to it.. t:" << *t + << " url:" << m_ctx->getURL() + << endl; + iter = t; + eaname = *iter; + ++iter; + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() skipping right to it.. eaname:" << eaname + << " url:" << m_ctx->getURL() + << endl; + + return new FQilla_Node( dynamicContext, m_ctx, eaname ); +// continue; + } + } + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() NOT FOUND! url:" << m_ctx->getURL() << endl + << " m_NodeNameWildcard:" << m_NodeNameWildcard << " ea:" << eaname << endl; + return 0; + } + + +// AttributeCollection::AttributeNames_t::iterator t = find( an.begin(), e, m_NodeNameWildcard ); +// if( t != e ) +// { +// LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() skipping right to it... t:" << *t << endl; +// iter = t; +// continue; +// } + +// if( m_ctx->isAttributeBound( m_NodeNameWildcard ) ) + { + // FIXME: + // skip ahead to the attribute, need to update iter to be the correct attr as well + } + continue; + } + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() ln-ok m_NodeNameWildcard:" << m_NodeNameWildcard << " ea:" << eaname << endl; + if( !m_NodeNamespaceURIWildcard.empty() && m_NodeNamespaceURIWildcard != "FIXME" ) + continue; + + LG_XQILLA_D << "FQilla_Attr_ResultImpl::next() MATCH ea:" << eaname + << " m_ctx:" << m_ctx->getURL() + << endl; +// return new FQilla_Node( m_ctx, "" ); + return new FQilla_Node( dynamicContext, m_ctx, eaname ); + } + return 0; + } + }; + + template< class IteratorType > + class FQilla_Iterator_ResultImpl : public FQilla_ResultImpl + { + string eaname; + IteratorType m_iter; + IteratorType m_begin; + IteratorType m_end; + ctxlist_t* m_ctxlist; + bool selectingSingleNodeWithWildCard; + + public: + FQilla_Iterator_ResultImpl( const LocationInfo *o, + const NodeTest *nodeTest, + fh_context ctx, + IteratorType begin, + IteratorType end, + ctxlist_t* cl = 0 ) + : + FQilla_ResultImpl( o, nodeTest, ctx ), + m_iter( begin ), + m_begin( begin ), + m_end( end ), + m_ctxlist( cl ), + selectingSingleNodeWithWildCard( false ) + { + LG_XQILLA_D << "FQilla_Iterator_ResultImpl()" << endl; + +// if( !m_NodeNameWildcard.empty() ) +// { +// Context::iterator ci = ctx->find( m_NodeNameWildcard ); +// if( ci != m_end ) +// { +// m_iter = ci; +// selectingSingleNodeWithWildCard = true; +// } +// } + } + virtual ~FQilla_Iterator_ResultImpl() + { + if( m_ctxlist ) + { + m_ctxlist->clear(); + delete m_ctxlist; + } + } + + + virtual Item::Ptr next(DynamicContext *dynamicContext) + { + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next()" << endl; + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next() m_nodeTest:" << m_nodeTest << endl; + + if(!m_nodeTest->getTypeWildcard()) + { + LG_XQILLA_D << "NT:" << tostr(m_nodeTest->getNodeType()) << endl; + } + if(!m_nodeTest->getNameWildcard()) + { + LG_XQILLA_D << "NN:" << tostr(m_nodeTest->getNodeName()) << endl; + } + + + while( m_iter != m_end ) + { + fh_context ctx = *m_iter; + ++m_iter; + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next() ctx:" << ctx->getURL() << endl; +// LG_XQILLA_D << "canonicalElementName( ctx ):" << canonicalElementName( ctx ) << endl; + + if( selectingSingleNodeWithWildCard ) + { + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next() selecting single via wildcard..." << endl; + m_iter = m_end; + } + + + if( haveItemType() ) + return handleNodeTestForItemType( dynamicContext, ctx, "" ); + + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next() calling passesElementTests" << endl; + if( !passesElementTests( ctx ) ) + { + continue; + } + + +// if(!m_nodeTest->getTypeWildcard() +// && m_nodeTest->getNodeType() != Node::element_string) +// { +// continue; +// } + +// std::string localName = canonicalElementName( ctx ); +// if( !m_NodeNameWildcard.empty() && m_NodeNameWildcard != localName ) +// { +// continue; +// } + +// if( !m_NodeNamespaceURIWildcard.empty() && m_NodeNamespaceURIWildcard != "FIXME" ) +// { +// continue; +// } + + LG_XQILLA_D << "FQilla_Iterator_ResultImpl::next() ok ctx:" << ctx->getURL() << endl; + return new FQilla_Node( dynamicContext, ctx ); + } + return 0; + } + + }; + + + class FQilla_SingleNode_ResultImpl : public FQilla_ResultImpl + { + const FQilla_Node* m_node; + const FQilla_Node* m_iter; + + public: + FQilla_SingleNode_ResultImpl( const LocationInfo *o, + const NodeTest *nodeTest, + fh_context ctx, + const Node* n ) + : + FQilla_ResultImpl( o, nodeTest, ctx ), + m_node( (FQilla_Node*)n ), + m_iter( (FQilla_Node*)n ) + { + } + + virtual ~FQilla_SingleNode_ResultImpl() + { + } + + virtual Item::Ptr next(DynamicContext* dynamicContext) + { + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next()" << endl; + if( !m_iter ) + return 0; + + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next(2)" << endl; + const FQilla_Node* ret = m_iter; + m_iter = 0; + + fh_context ctx = ret->getFerrisContext(); + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next(3)" << endl; + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next(4) ctx:" << ctx->getURL() << endl; + + if( haveItemType() ) + return handleNodeTestForItemType( dynamicContext, ctx, "" ); + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next(5)" << endl; + + if( !passesElementTests( ctx ) ) + return 0; + LG_XQILLA_D << "FQilla_SingleNode_ResultImpl::next(6)" << endl; + + return ret; + } + }; + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct fr_hash : public std::unary_function< pair< const DynamicContext*, Context* const >, size_t > + { + inline size_t operator()( const pair< const DynamicContext*, Context* const >& s ) const + { + return GPOINTER_TO_INT( s.first ) | GPOINTER_TO_INT( s.second ); + } + }; + struct fr_equal_to + : public std::binary_function< + pair< const DynamicContext*, Context* const >, + pair< const DynamicContext*, Context* const >, bool> + { + inline bool operator()(const pair< const DynamicContext*, Context* const >& __x, + const pair< const DynamicContext*, Context* const >& __y) const + { + return __x.first == __y.first && __x.second == __y.second; + } + }; + + typedef FERRIS_STD_HASH_MAP< + pair< const DynamicContext*, Context* const >, + bool, + fr_hash, fr_equal_to > m_fqilla_fakeroots_t; + m_fqilla_fakeroots_t& get_fqilla_fakeroots() + { + static m_fqilla_fakeroots_t m_fqilla_fakeroots; + return m_fqilla_fakeroots; + } + + + const XMLCh fastxdm_string[] = { 'f', 'a', 's', 't', 'x', 'd', 'm', 0 }; + + const XMLCh FQilla_Node::fQilla[] = // Points to "fQilla" + { + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_F, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_Q, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_i, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_l, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_l, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_a, + XERCES_CPP_NAMESPACE_QUALIFIER chNull + }; + + FQilla_Node::FQilla_Node( const DynamicContext* dynamicContext, + fh_context ctx, + const std::string& eaname, + bool forceNoParent, + bool isSingleTextContentsNode ) + : + m_ctx( ctx ), + m_eaname( eaname ), + m_fSerializer(0), + m_forceNoParent( forceNoParent ), + m_isSingleTextContentsNode( isSingleTextContentsNode ) + { + if( forceNoParent ) + { + get_fqilla_fakeroots().insert( + make_pair( make_pair( dynamicContext, GetImpl(m_ctx) ), 1 ) + ); + } + } + + + FQilla_Node::~FQilla_Node() + { + if(m_fSerializer != 0) + { + m_fSerializer->release(); + } + } + + void * + FQilla_Node::getInterface(const XMLCh *name) const + { + LG_XQILLA_D << "FQilla_Node::getInterface()" << endl; + + if(XPath2Utils::equals(name,FQilla_Node::fQilla)) + { + return (void*)this; + } + else if(XPath2Utils::equals( name, XercesConfiguration::gXerces )) + { + bool hideXMLAttribute = true; + bool hideEmblemAttributes = true; + bool hideSchemaAttributes = true; + + fh_domdoc dom = Factory::makeDOM( m_ctx, + hideXMLAttribute, + hideEmblemAttributes, + hideSchemaAttributes ); + + cacheDOM( dom ); + return dom->getDocumentElement(); + } + return 0; + } + + void + FQilla_Node::cacheDOM( fh_domdoc d ) const + { + dom_cache.push_back( d ); + } + + + + bool + FQilla_Node::isNode() const + { + LG_XQILLA_D << "FQilla_Node::isNode()" << endl; +// return m_eaname.empty(); + return true; + } + + bool + FQilla_Node::isAtomicValue() const + { + LG_XQILLA_D << "FQilla_Node::isAtomicValue()" << endl; + return false; + } + +//#define X(str) XStr(str).unicodeForm() +#define X(str) XStr(str).unicodeForm() + + const XMLCh* + FQilla_Node::asString(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "FQilla_Node::asString()" << endl; + LG_XQILLA_D << "FQilla_Node::asString() ctx:" << m_ctx->getURL() << endl; +// dmNodeName( dynamicContext ); + + { + + fh_domdoc dom = Factory::makeDOM( "libferris" ); + DOMElement* parent = dom->getDocumentElement(); + copyChildren( dynamicContext, GetImpl(dom), m_ctx, parent ); + DOMNode* n = dom->getDocumentElement(); + XML::domnode_list_t nl; + XML::getChildren( nl, (DOMElement*)n ); + if( nl.size() == 1 ) + { + n = nl.front(); + + fh_stringstream iss = tostream( *n, true ); + static string s = StreamToString( iss ); +// cout << s << endl; + return X(s.c_str()); + } + + return 0; + } + + + + + +// stringstream ss; +// ss << "getURL() << "\">" << endl; +// ss << ""; +// static string s; +// s = ss.str(); +// return X(s.c_str()); + + + + if(!m_fSerializer) + { + const static XMLCh ls_string[] = + { + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_L, + XERCES_CPP_NAMESPACE_QUALIFIER chLatin_S, + XERCES_CPP_NAMESPACE_QUALIFIER chNull + }; + + DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(ls_string); + + m_fSerializer = ((DOMImplementationLS*)impl)->createLSSerializer(); + DOMConfiguration* dc = m_fSerializer->getDomConfig(); + dc->setParameter(XMLUni::fgDOMXMLDeclaration, false); + + // m_fSerializer = + // ((DOMImplementationLS*)impl)->createDOMWriter( dynamicContext->getMemoryManager()); + // m_fSerializer->setFeature(XMLUni::fgDOMXMLDeclaration, false); + } + + fh_domdoc dom = Factory::makeDOM( "root" ); + DOMElement* de = XML::createElement( dom, dom->getDocumentElement(), "context" ); + setAttribute( de, "url", m_ctx->getURL() ); + + +// bool hideXMLAttribute = true; +// bool hideEmblemAttributes = true; +// bool hideSchemaAttributes = true; + +// fh_domdoc dom = Factory::makeDOM( m_ctx, +// hideXMLAttribute, +// hideEmblemAttributes, +// hideSchemaAttributes ); + + DOMNode* n = dom->getDocumentElement(); + return m_fSerializer->writeToString( n, 0 ); + } + + bool FQilla_Node::hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "hasInstanceOfType() typeURI:" << tostr(typeURI) + << " typeName:" << tostr(typeName) + << " dc:" << toVoid(dynamicContext) + << endl; + return false; + } + + Sequence FQilla_Node::dmBaseURI(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmBaseURI()" + << " dc:" << toVoid(dynamicContext) + << endl; + return Sequence(dynamicContext->getMemoryManager()); + } + + const XMLCh* FQilla_Node::dmNodeKind() const + { + LG_XQILLA_D << "FQilla_Node::dmNodeKind this:" << toVoid(this) << endl; + LG_XQILLA_D << "dmNodeKind() m_isSingleTextContentsNode:" << m_isSingleTextContentsNode << endl; + if( isBound( m_ctx ) ) + { + LG_XQILLA_D << "dmNodeKind() ctx:" << m_ctx->getURL() << endl; + LG_XQILLA_D << "dmNodeKind() isAttrNode:" << isAttrNode() << endl; + } + + if( isAttrNode() ) + return attribute_string; + if( m_isSingleTextContentsNode ) + return text_string; + + return element_string; + } + +// std::string +// FQilla_Node::canonicalElementName( fh_context c ) const +// { +// string nn = m_ctx->getDirName().c_str(); +// if( starts_with( nn, "." )) +// nn = (string)"_" + nn; +// nn = Util::replace_all( nn, "+", "_plus_" ); +// return nn; +// } + + + ATQNameOrDerived::Ptr + FQilla_Node::dmNodeName(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmNodeName()" << endl; + LG_XQILLA_D << "dmNodeName() ctx:" << m_ctx->getURL() << endl; + + XMLCh* ns = 0; + XMLCh* prefix = 0; + string nn = canonicalElementName( m_ctx ); + XMLCh* localname = XMLString::transcode( nn.c_str() ); + + LG_XQILLA_D << "dmNodeName() ret:" << nn << endl; + + return dynamicContext->getItemFactory()->createQName( + ns, prefix, localname, dynamicContext ); + } + + const XMLCh* FQilla_Node::dmStringValue(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmStringValue() this:" << toVoid(this) << endl; + LG_XQILLA_D << "m_isSingleTextContentsNode:" << m_isSingleTextContentsNode << endl; + + if( isAttrNode() ) + { + string v = getStrAttr( m_ctx, m_eaname, "" ); + return dynamicContext->getMemoryManager()->getPooledString( X(v.c_str()) ); + } + + fh_istream iss = m_ctx->getIStream(); + string v = StreamToString( iss ); + +// LG_XQILLA_D << "dmStringValue(X)" << endl; +// return dynamicContext->getMemoryManager()->getPooledString( X( "bar" ) ); + + return dynamicContext->getMemoryManager()->getPooledString( X(v.c_str()) ); + } + + Sequence FQilla_Node::dmTypedValue(DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmTypedValue() this:" << toVoid(this) << endl; + LG_XQILLA_D << "m_isSingleTextContentsNode:" << m_isSingleTextContentsNode << endl; + + if( isAttrNode() ) + { + Item::Ptr item = 0; + item = (const Item::Ptr)dynamicContext->getItemFactory()->createUntypedAtomic( + dmStringValue(dynamicContext), dynamicContext); + return Sequence(item, dynamicContext->getMemoryManager()); + } + + + Item::Ptr item = 0; + item = (const Item::Ptr)dynamicContext->getItemFactory()->createUntypedAtomic( + dmStringValue(dynamicContext), dynamicContext); + return Sequence(item, dynamicContext->getMemoryManager()); + +// return Sequence(dynamicContext->getMemoryManager()); + } + + Sequence FQilla_Node::dmDocumentURI(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmDocumentURI()" << endl; + return Sequence(dynamicContext->getMemoryManager()); + } + + ATQNameOrDerived::Ptr FQilla_Node::dmTypeName(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmTypeName()" << endl; + + const XMLCh* uri = FunctionConstructor::XMLChXPath2DatatypesURI; +// const XMLCh* uri = XMLUni::fgZeroLenString; + const XMLCh* name = DocumentCache::g_szUntyped; + + if( isAttrNode() ) + { + uri=FunctionConstructor::XMLChXPath2DatatypesURI; + name=ATUntypedAtomic::fgDT_UNTYPEDATOMIC; + } + + return dynamicContext->getItemFactory()-> + createQName(uri, XMLUni::fgZeroLenString, name, dynamicContext); + } + + ATBooleanOrDerived::Ptr FQilla_Node::dmNilled(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmNilled()" << endl; + + if( isAttrNode() ) + { + return 0; + } + + return dynamicContext->getItemFactory()->createBoolean( false, dynamicContext ); + } + + bool FQilla_Node::lessThan(const Node::Ptr &other, const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "lessThan(top)" << endl; + const FQilla_Node* otherImpl = (const FQilla_Node*)other->getInterface(FQilla_Node::fQilla); + + fh_context otherc = otherImpl->m_ctx; + + string earl = m_ctx->getURL(); + string oearl = otherc->getURL(); + + LG_XQILLA_D << "lessThan() earl:" << earl << endl; + LG_XQILLA_D << "lessThan() oearl:" << oearl << endl; + LG_XQILLA_D << "lessThan() ret:" << (earl < oearl) << endl; + + return earl < oearl; + } + + bool FQilla_Node::equals(const Node::Ptr &other) const + { + LG_XQILLA_D << "equals(top)" << endl; + const FQilla_Node* otherImpl = (const FQilla_Node*)other->getInterface(FQilla_Node::fQilla); + fh_context otherc = otherImpl->m_ctx; + + string earl = m_ctx->getURL(); + string oearl = otherc->getURL(); + + LG_XQILLA_D << "equals() earl:" << earl << endl; + LG_XQILLA_D << "equals() oearl:" << oearl << endl; + LG_XQILLA_D << "equals() ret:" << (earl == oearl) << endl; + + return earl == oearl; + } + + bool FQilla_Node::uniqueLessThan(const Node::Ptr &other, const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "uniqueLessThan()" << endl; + return lessThan( other, dynamicContext ); + } + Node::Ptr FQilla_Node::dmParent(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmParent()" << endl; + LG_XQILLA_D << "m_ctx:" << m_ctx->getURL() << endl; + + if( m_forceNoParent ) + return 0; + + if( m_ctx->isParentBound() ) + { + return new FQilla_Node( (DynamicContext*)dynamicContext, m_ctx->getParent(), "" ); + } + return 0; + } + Result FQilla_Node::dmAttributes(const DynamicContext* dynamicContext, const LocationInfo *info) const + { + LG_XQILLA_D << "dmAttributes()" << endl; + if( m_eaname.empty() ) + { + return new FQilla_Attr_ResultImpl( info, 0, m_ctx ); +// return new AttributeAxis(info, fNode, this, NULL); + } + return 0; + } + Result FQilla_Node::dmNamespaceNodes(const DynamicContext* dynamicContext, const LocationInfo *info) const + { + LG_XQILLA_D << "dmNamespaceNodes()" << endl; + return 0; + } + Result FQilla_Node::dmChildren(const DynamicContext *context, const LocationInfo *info) const + { + LG_XQILLA_D << "dmChildren()" << endl; + if( m_eaname.empty() ) + { + return new FQilla_Iterator_ResultImpl( info, 0, m_ctx, m_ctx->begin(), m_ctx->end() ); +// return new ChildAxis(info, fNode, this, NULL); + } + return 0; + } + + void + FQilla_Node::getAllChildren( fh_context c, ctxlist_t* cl ) const + { + Context::iterator e = c->end(); + Context::iterator iter = c->begin(); + for( ; iter != e; ++iter ) + { + cl->push_back( *iter ); + getAllChildren( *iter, cl ); + } + } + + + + Result FQilla_Node::getAxisResult(XQStep::Axis axis, + const NodeTest *nodeTest, + const DynamicContext* dynamicContext, + const LocationInfo *info) const + { + LG_XQILLA_D << "getAxisResult() axis:" << axis << endl; + LG_XQILLA_D << "getAxisResult() ctx:" << m_ctx->getURL() << endl; + LG_XQILLA_D << " attr type:" << XQStep::ATTRIBUTE << " child type:" << XQStep::CHILD << endl; + LG_XQILLA_D << "have nodetest:" << toVoid( nodeTest ) << endl; + + if( nodeTest ) + { + if(nodeTest->getNameWildcard()) + LG_XQILLA_D << " name wildcard:" << tostr(nodeTest->getNameWildcard()) << endl; + if(nodeTest->getTypeWildcard()) + LG_XQILLA_D << " type wildcard:" << tostr(nodeTest->getTypeWildcard()) << endl; + if(nodeTest->getNodeName()) + LG_XQILLA_D << " nn:" << tostr(nodeTest->getNodeName()) << endl; + if(nodeTest->getNodePrefix()) + LG_XQILLA_D << " prefix:" << tostr(nodeTest->getNodePrefix()) << endl; + if(nodeTest->getNodeType()) + LG_XQILLA_D << " node type:" << tostr(nodeTest->getNodeType()) << endl; + SequenceType::ItemType *itemType = nodeTest->getItemType(); + if( itemType ) + { + LG_XQILLA_D << "have itemtype..." << endl; + } + } + + + switch(axis) + { + case XQStep::ANCESTOR_OR_SELF: + case XQStep::ANCESTOR: + { + LG_XQILLA_D << "XQStep::ANCESTOR or XQStep::ANCESTOR_OR_SELF" << endl; + + ctxlist_t* cl = new ctxlist_t; + fh_context c = m_ctx; + if( axis == XQStep::ANCESTOR_OR_SELF ) + { + cl->push_back( c ); + } + while( c && c->isParentBound() ) + { + c = c->getParent(); + + cl->push_back( c ); + if( get_fqilla_fakeroots().end() != + get_fqilla_fakeroots().find( make_pair( dynamicContext, GetImpl(c) ) ) ) + { + break; + } + } + return new FQilla_Iterator_ResultImpl( info, nodeTest, m_ctx, cl->begin(), cl->end(), cl ); + } + case XQStep::ATTRIBUTE: + { + LG_XQILLA_D << "XQStep::ATTRIBUTE m_eaname:" << m_eaname << endl; + + if( m_eaname.empty() ) + { + return new FQilla_Attr_ResultImpl( info, nodeTest, m_ctx ); + } + break; + } + case XQStep::CHILD: + { + LG_XQILLA_D << "XQStep::CHILD option..." << endl; + if( !isAttrNode() ) + { + if(!nodeTest->getNameWildcard()) + { + string n = tostr(nodeTest->getNodeName()); + LG_XQILLA_D << "specific child selected n:" << n << endl; + + if( m_ctx->isSubContextBound( n ) ) + { + fh_context cc = m_ctx->getSubContext( n ); + FQilla_Node* theNode = new FQilla_Node( + (DynamicContext*)dynamicContext, cc, "" ); + return new FQilla_SingleNode_ResultImpl( info, nodeTest, cc, theNode ); + } + } + + Context::iterator b = m_ctx->begin(); + Context::iterator e = m_ctx->end(); + +// if( b == e ) +// { +// string eaname = ""; +// bool forceNoParent = false; +// bool isSingleTextContentsNode = true; +// FQilla_Node* p = new FQilla_Node( dynamicContext, m_ctx, eaname, forceNoParent, isSingleTextContentsNode ); +// LG_XQILLA_D << "single TEXT child:" << toVoid(p) << endl; +// return new FQilla_SingleNode_ResultImpl( info, nodeTest, m_ctx, p ); +// } + return new FQilla_Iterator_ResultImpl( info, nodeTest, m_ctx, b, e ); + } + break; + } + case XQStep::DESCENDANT: + case XQStep::DESCENDANT_OR_SELF: + { + LG_XQILLA_D << "XQStep::DESCENDANT/XQStep::DESCENDANT_OR_SELF" << endl; + + ctxlist_t* cl = new ctxlist_t; + fh_context c = m_ctx; + if( axis == XQStep::DESCENDANT_OR_SELF ) + { + cl->push_back( c ); + } + getAllChildren( m_ctx, cl ); + return new FQilla_Iterator_ResultImpl( info, nodeTest, m_ctx, cl->begin(), cl->end(), cl ); + break; + } + case XQStep::FOLLOWING: + { + if( m_forceNoParent ) + return 0; + + if( m_ctx->isParentBound() ) + { + ctxlist_t* cl = new ctxlist_t; + + fh_context p = m_ctx->getParent(); + Context::iterator e = p->end(); + Context::iterator iter = p->find( m_ctx->getDirName() ); + ++iter; + for( ; iter != e ; ++iter ) + { + cl->push_back( *iter ); + getAllChildren( *iter, cl ); + } + return new FQilla_Iterator_ResultImpl( info, nodeTest, p, cl->begin(), cl->end(), cl ); + } + } + case XQStep::FOLLOWING_SIBLING: + { + if( m_forceNoParent ) + return 0; + + if( m_ctx->isParentBound() ) + { + fh_context p = m_ctx->getParent(); + Context::iterator e = p->end(); + Context::iterator iter = p->find( m_ctx->getDirName() ); + ++iter; + return new FQilla_Iterator_ResultImpl( info, nodeTest, p, iter, e ); + } +// return new FollowingSiblingAxis(info, nodeTest, fNode, this, nodeTest); + } + case XQStep::NAMESPACE: { +// if(fNode->getNodeType() == DOMNode::ELEMENT_NODE) { +// return new NamespaceAxis(info, fNode, this, nodeTest); +// } + break; + } + case XQStep::PARENT: { + Node::Ptr p = dmParent( dynamicContext ); + return new FQilla_SingleNode_ResultImpl( info, nodeTest, m_ctx, p ); + } + case XQStep::PRECEDING: + { + if( m_forceNoParent ) + return 0; + + if( m_ctx->isParentBound() ) + { + ctxlist_t* cl = new ctxlist_t; + + fh_context p = m_ctx->getParent(); + Context::iterator iter = p->begin(); + Context::iterator e = p->find( m_ctx->getDirName() ); + for( ; iter != e ; ++iter ) + { + cl->push_back( *iter ); + getAllChildren( *iter, cl ); + } + return new FQilla_Iterator_ResultImpl( info, nodeTest, p, cl->begin(), cl->end(), cl ); + } + } + case XQStep::PRECEDING_SIBLING: + { + if( m_forceNoParent ) + return 0; + + if( m_ctx->isParentBound() ) + { + fh_context p = m_ctx->getParent(); + Context::iterator iter = p->begin(); + Context::iterator e = p->find( m_ctx->getDirName() ); + return new FQilla_Iterator_ResultImpl( info, nodeTest, p, iter, e ); + } + } + case XQStep::SELF: { + return new FQilla_SingleNode_ResultImpl( info, nodeTest, m_ctx, this ); + } + } + + return 0; + + } + ATBooleanOrDerived::Ptr FQilla_Node::dmIsId(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmIsId()" << endl; + return 0; + } + ATBooleanOrDerived::Ptr FQilla_Node::dmIsIdRefs(const DynamicContext* dynamicContext) const + { + LG_XQILLA_D << "dmIsIdRefs()" << endl; + return 0; + } + const XMLCh* FQilla_Node::getTypeURI() const + { + LG_XQILLA_D << "getTypeURI()" << endl; + return FunctionConstructor::XMLChXPath2DatatypesURI; + } + const XMLCh* FQilla_Node::getTypeName() const + { + LG_XQILLA_D << "getTypeName()" << endl; + + if( m_eaname.empty() ) + { + return DocumentCache::g_szUntyped; + } + return ATUntypedAtomic::fgDT_UNTYPEDATOMIC; + } + + fh_context + FQilla_Node::getFerrisContext() const + { + return m_ctx; + } + + bool + FQilla_Node::isAttrNode() const + { + return !m_eaname.empty(); + } + + + Node::Ptr + FQilla_Node::root(const DynamicContext* context) const + { + return new FQilla_Node( context, m_ctx ); + } + + void + FQilla_Node::generateEvents(EventHandler *events, const DynamicContext *context, + bool preserveNS, bool preserveType) const + { + cerr << "FIXME: FQilla_Node::generateEvents()" << endl; +// FastXDMDocument::toEvents( attr_, events, preserveType ); + } + + + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + ///Macro used to facilitate the creation of functions + template + class FuncFactoryTemplate : public FuncFactory + { + XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer uriname; + public: + + FuncFactoryTemplate( int argCount, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *mm ) + : + FuncFactory( argCount, mm ) + { + uriname.set(getName()); + uriname.append(getURI()); + } + + virtual ASTNode *createInstance(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr) const + { + return new (memMgr) TYPE(args, memMgr); + } + + virtual const XMLCh *getName() const + { + return TYPE::name; + } + + virtual const XMLCh *getURI() const + { + return TYPE::XMLChFunctionURI; + } + virtual const XMLCh *getURINameHash() const + { + return uriname.getRawBuffer(); + } + + + virtual const XMLCh *getQName() const + { + return getName(); + } + + virtual size_t getMinArgs() const + { + return TYPE::minArgs; + } + + virtual size_t getMaxArgs() const + { + return TYPE::maxArgs; + } + }; + + + + const XMLCh FunctionFerrisDoc::name[] = { + chLatin_f, chLatin_e, chLatin_r, chLatin_r, chLatin_i, chLatin_s, + chDash, + chLatin_d, chLatin_o, chLatin_c, + chNull + }; + const unsigned int FunctionFerrisDoc::minArgs = 1; + const unsigned int FunctionFerrisDoc::maxArgs = 1; + + /** + * fn:ferris-doc($uri as xs:string?) as document? + **/ + FunctionFerrisDoc::FunctionFerrisDoc(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr) + : XQFunction(name, minArgs, maxArgs, "string?", args, memMgr) + { + } + + ASTNode* FunctionFerrisDoc::staticResolution(StaticContext *context) + { + return resolveArguments(context); + } + + ASTNode *FunctionFerrisDoc::staticTypingImpl(StaticContext *context) + { + _src.clear(); + + _src.setProperties(StaticAnalysis::DOCORDER | StaticAnalysis::GROUPED | + StaticAnalysis::PEER | StaticAnalysis::SUBTREE | StaticAnalysis::ONENODE); + _src.getStaticType() = StaticType(StaticType::DOCUMENT_TYPE, 0, 1); + _src.availableDocumentsUsed(true); + + return calculateSRCForArguments(context); + } + + + + Sequence FunctionFerrisDoc::createSequence(DynamicContext* context, int flags) const + { + LG_XQILLA_D << "FunctionFerrisDoc::createSequence(context,flags) flags:" << flags << endl; + Sequence uriArg = getParamNumber(1,context)->toSequence(context); + + if (uriArg.isEmpty()) + { + return Sequence(context->getMemoryManager()); + } + + const XMLCh* uri = uriArg.first()->asString(context); +// if(!XPath2Utils::isValidURI(uri, context->getMemoryManager())) +// XQThrow(FunctionException, +// X("FunctionFerrisDoc::collapseTreeInternal"), +// X("Invalid argument to fn:doc function [err:FODC0005]")); + + try + { +// return context->resolveDocument(uri, this); + Sequence result(context->getMemoryManager()); + + LG_XQILLA_D << "FunctionFerrisDoc::createSequence(context,flags) uri:" << tostr(uri) << endl; + fh_context m_ctx = Resolve( tostr(uri) ); + FQilla_Node* qn = new FQilla_Node( context, m_ctx, "", true ); + result.addItem( qn ); + return result; + } + //TODO: once DocumentCacheImpl can throw different errors, we should be able to throw the correct corresponding error messages. + catch(XMLParseException &e) + { + XQThrow(FunctionException, + X("FunctionFerrisDoc::collapseTreeInternal"), + e.getError()); + } + return Sequence(context->getMemoryManager()); + } + + //////////////////////////////////////// + //////////////////////////////////////// + //////////////////////////////////////// + + const XMLCh FunctionFerrisDocQuiet::name[] = { + chLatin_f, chLatin_e, chLatin_r, chLatin_r, chLatin_i, chLatin_s, + chDash, + chLatin_d, chLatin_o, chLatin_c, + chDash, + chLatin_q, chLatin_u, chLatin_i, chLatin_e, chLatin_t, + chNull + }; + const unsigned int FunctionFerrisDocQuiet::minArgs = 1; + const unsigned int FunctionFerrisDocQuiet::maxArgs = 1; + + /** + * fn:ferris-doc($uri as xs:string?) as document? + **/ + FunctionFerrisDocQuiet::FunctionFerrisDocQuiet(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr) + : XQFunction(name, minArgs, maxArgs, "string?", args, memMgr) + { + } + + ASTNode* FunctionFerrisDocQuiet::staticResolution(StaticContext *context) + { + return resolveArguments(context); + } + + ASTNode *FunctionFerrisDocQuiet::staticTypingImpl(StaticContext *context) + { + _src.clear(); + + _src.setProperties(StaticAnalysis::DOCORDER | StaticAnalysis::GROUPED | + StaticAnalysis::PEER | StaticAnalysis::SUBTREE | StaticAnalysis::ONENODE); + _src.getStaticType() = StaticType(StaticType::DOCUMENT_TYPE, 0, 1); + _src.availableDocumentsUsed(true); + + return calculateSRCForArguments(context); + } + + Sequence FunctionFerrisDocQuiet::createSequence(DynamicContext* context, int flags) const + { + LG_XQILLA_D << "FunctionFerrisDocQuiet::createSequence(top)" << endl; + Sequence uriArg = getParamNumber(1,context)->toSequence(context); + + if (uriArg.isEmpty()) + { + return Sequence(context->getMemoryManager()); + } + + const XMLCh* uri = uriArg.first()->asString(context); +// if(!XPath2Utils::isValidURI(uri, context->getMemoryManager())) +// XQThrow(FunctionException, +// X("FunctionFerrisDocQuiet::collapseTreeInternal"), +// X("Invalid argument to fn:doc function [err:FODC0005]")); + + try + { +// return context->resolveDocument(uri, this); + Sequence result(context->getMemoryManager()); + + try + { + LG_XQILLA_D << "FunctionFerrisDocQuiet::createSequence() uri:" << tostr(uri) << endl; + cerr << "FunctionFerrisDocQuiet::createSequence() uri:" << tostr(uri) << endl; + fh_context m_ctx = Resolve( tostr(uri) ); + FQilla_Node* qn = new FQilla_Node( context, m_ctx, "", true ); + result.addItem( qn ); + } + catch( ... ) + { + } + return result; + } + //TODO: once DocumentCacheImpl can throw different errors, we should be able to throw the correct corresponding error messages. + catch(XMLParseException &e) + { + XQThrow(FunctionException, + X("FunctionFerrisDocQuiet::collapseTreeInternal"), + e.getError()); + } + return Sequence(context->getMemoryManager()); + } + + //////////////////////////////////////// + //////////////////////////////////////// + //////////////////////////////////////// + + const XMLCh FunctionFerrisIndexLookup::name[] = { + chLatin_f, chLatin_e, chLatin_r, chLatin_r, chLatin_i, chLatin_s, + chDash, + chLatin_i, chLatin_n, chLatin_d, chLatin_e, chLatin_x, + chDash, + chLatin_l, chLatin_o, chLatin_o, chLatin_k, chLatin_u, chLatin_p, + chNull + }; + const unsigned int FunctionFerrisIndexLookup::minArgs = 3; + const unsigned int FunctionFerrisIndexLookup::maxArgs = 3; + + /** + * fn:ferris-doc($uri as xs:string?) as document? + **/ + FunctionFerrisIndexLookup::FunctionFerrisIndexLookup(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr) + : XQFunction(name, minArgs, maxArgs, "string, string, string", args, memMgr) + { + } + + ASTNode* FunctionFerrisIndexLookup::staticResolution(StaticContext *context) + { + return resolveArguments(context); + } + + ASTNode *FunctionFerrisIndexLookup::staticTypingImpl(StaticContext *context) + { + _src.clear(); + + _src.setProperties(StaticAnalysis::DOCORDER | StaticAnalysis::GROUPED | + StaticAnalysis::PEER | StaticAnalysis::SUBTREE | StaticAnalysis::ONENODE); + _src.getStaticType() = StaticType(StaticType::DOCUMENT_TYPE, 0, 1); + _src.availableDocumentsUsed(true); + + return calculateSRCForArguments(context); + } + + IndexLookupResult::IndexLookupResult() + { + } + + void + IndexLookupResult::insert( DynamicContext* context, const std::string& value, fh_context ctx ) + { + m_valueLookup_t::iterator iter = m_valueLookup.find( value ); + if( iter == m_valueLookup.end() ) + { + Sequence seq(context->getMemoryManager()); + iter = m_valueLookup.insert( make_pair( value, seq ) ).first; + } + + Sequence& seq = iter->second; + FQilla_Node* qn = new FQilla_Node( context, ctx, "", true ); + seq.addItem( qn ); + } + + Sequence + IndexLookupResult::find( DynamicContext* context, const std::string& value ) + { + m_valueLookup_t::iterator iter = m_valueLookup.find( value ); + if( iter == m_valueLookup.end() ) + { + LG_XQILLA_D << "IndexLookupResult::find() NO result for v:" << value << endl; + Sequence seq(context->getMemoryManager()); + return seq; + } + LG_XQILLA_D << "IndexLookupResult::find() returning result for v:" << value << endl; + LG_XQILLA_D << "IndexLookupResult::find() result.len:" << iter->second.getLength() << endl; + + return iter->second; + } + + + void + FunctionFerrisIndexLookup::populateLookup( DynamicContext* context, IndexLookupResult* l, fh_context ctx, const std::string eaname ) const + { + try + { + if( ctx->isAttributeBound( eaname ) ) + { + string value = getStrAttr( ctx, eaname, "" ); + LG_XQILLA_D << "FunctionFerrisIndexLookup::populateLookup() ea:" << eaname + << " v:" << value + << " adding ctx:" << ctx->getURL() + << endl; + + l->insert( context, value, ctx ); + } + for( Context::iterator ci = ctx->begin(); ci != ctx->end(); ++ci ) + populateLookup( context, l, *ci, eaname ); + } + catch( ... ) + { + } + } + + + Sequence + FunctionFerrisIndexLookup::createSequence( DynamicContext* context, int flags) const + { + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence(top)" << endl; + + if( getParamNumber(1,context)->next(context)->asString(context) == 0 + || getParamNumber(2,context)->next(context)->asString(context) == 0 + || getParamNumber(3,context)->next(context)->asString(context) == 0 + ) + { + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence(bad args)" << endl; + return Sequence(context->getMemoryManager()); + } + + string earl = tostr(getParamNumber(1,context)->next(context)->asString(context)); + string eaname = tostr(getParamNumber(2,context)->next(context)->asString(context)); + string value = tostr(getParamNumber(3,context)->next(context)->asString(context)); + + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence() eaname:" << eaname << endl; + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence() value:" << value << endl; + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence() earl:" << earl << endl; + + try + { + fh_context ctx = Resolve( earl ); + Sequence result(context->getMemoryManager()); + + m_lookup_t::iterator li = m_lookup.find( make_pair( earl, eaname ) ); + if( li == m_lookup.end() ) + { + LG_XQILLA_D << "FunctionFerrisIndexLookup::createSequence() populating index for eaname:" << eaname << endl; + IndexLookupResult* l = new IndexLookupResult(); + populateLookup( context, l, ctx, eaname ); + li = m_lookup.insert( make_pair( make_pair( earl, eaname ), l ) ).first; + } + + if( li == m_lookup.end() ) + return result; + + return li->second->find( context, value ); + } + catch(XMLParseException &e) + { + XQThrow(FunctionException, + X("FunctionFerrisIndexLookup::collapseTreeInternal"), + e.getError()); + } + return Sequence(context->getMemoryManager()); + } + + //////////////////////////////////////// + //////////////////////////////////////// + //////////////////////////////////////// + + void RegisterFerrisXQillaFunctions( StaticContext* context ) + { + + + context->addCustomFunction( new FuncFactoryTemplate(1,context->getMemoryManager()) ); + context->addCustomFunction( new FuncFactoryTemplate(1,context->getMemoryManager()) ); + context->addCustomFunction( new FuncFactoryTemplate(3,context->getMemoryManager()) ); + + LG_XQILLA_D << "Added custom ferris xqilla functions..." << endl; + } + + + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + /** + * Copy all children of 'c' to 'target' + */ + void copyChildren( const DynamicContext* dc, + DOMDocument* document, fh_context c, DOMElement* target ) + { + string txt = getStrAttr( c, "content", "" ); + if( !txt.empty() ) + { + XML::setChildText( document, (DOMElement*)target, txt ); + } + + fh_shouldIncludeAttribute sia = getShouldIncludeAttribute( dc ); + + AttributeCollection::AttributeNames_t an; + c->getAttributeNames( an ); + for( AttributeCollection::AttributeNames_t::iterator iter = an.begin(); + iter != an.end(); iter++ ) + { + std::string eaname = *iter; + if( sia->shouldInclude( c, eaname ) ) + { + string v = getStrAttr( c, eaname, "" ); + LG_XQILLA_D << "copying attribute:" << eaname << " value:" << v << endl; + ensureAttribute( document, target, eaname, v ); + } + } + + + + Context::iterator e = c->end(); + Context::iterator iter = c->begin(); + for( ; iter != e ; ++iter ) + { + string rdn = (*iter)->getDirName(); + + string t = getStrAttr( *iter, "libferris-element-name", "" ); + if( !t.empty() ) + rdn = t; + + string crdn = canonicalElementName( rdn ); + DOMNode *newChild = document->createElement(X( crdn.c_str() )); + target->appendChild(newChild); + + copyChildren( dc, document, *iter, (DOMElement*)newChild ); + } + } + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + + +// FQilla_ItemFactory::FQilla_ItemFactory( ItemFactory* ifactory ) +// // const DocumentCache* dc, +// // MemoryManager* memMgr ) +// : +// // ItemFactoryImpl( dc, memMgr ), +// m_ifactory( ifactory ) +// // m_outputDocument( 0 ) +// { +// } + +// FQilla_ItemFactory::~FQilla_ItemFactory() +// { +// } + + + +// Node::Ptr FQilla_ItemFactory::cloneNode(const Node::Ptr node, const DynamicContext *context) const +// { +// return m_ifactory->cloneNode( node, context ); +// } + +// Node::Ptr FQilla_ItemFactory::createTextNode(const XMLCh *value, const DynamicContext *context) const +// { +// return m_ifactory->createTextNode( value, context ); +// } + +// Node::Ptr FQilla_ItemFactory::createCommentNode(const XMLCh *value, const DynamicContext *context) const +// { +// return m_ifactory->createCommentNode( value, context ); +// } + +// Node::Ptr FQilla_ItemFactory::createPINode(const XMLCh *name, const XMLCh *value, const DynamicContext *context) const +// { +// return m_ifactory->createPINode( name, value, context ); +// } + +// Node::Ptr FQilla_ItemFactory::createAttributeNode(const XMLCh *uri, const XMLCh *prefix, const XMLCh *name, +// const XMLCh *value, const DynamicContext *context) const +// { +// return m_ifactory->createAttributeNode( uri, prefix, name, value, context ); +// } + + + + +// Node::Ptr FQilla_ItemFactory::createElementNode(const XMLCh *uri, const XMLCh *prefix, const XMLCh *name, +// const std::vector &attrList, +// const std::vector &childList, +// const DynamicContext *context) const +// { +// // return m_ifactory->createElementNode( uri, prefix, name, attrList, childList, context ); + +// StaticContext::ConstructionMode constrMode=context->getConstructionMode(); +// bool nsPreserveMode=context->getPreserveNamespaces(); +// bool nsInheritMode=context->getInheritNamespaces(); + +// DOMDocument *document = getOutputDocument(context); +// DOMElement *element = document->createElementNS(uri, name); +// if(prefix != 0 && !XPath2Utils::equals(XMLUni::fgZeroLenString, prefix)) +// element->setPrefix(prefix); + +// for(std::vector::const_iterator a = attrList.begin(); a != attrList.end(); ++a) +// { +// if( const NodeImpl *nodeImpl = (const NodeImpl *)(*a)->getInterface(Item::gXQilla) ) +// { +// LG_XQILLA_D << "createElementNode(attr) xqilla native node" << endl; + +// const DOMNode* attr=nodeImpl->getDOMNode(); +// DOMAttr* exists=element->getAttributeNodeNS(attr->getNamespaceURI(), attr->getLocalName()); + +// LG_XQILLA_D << "createElementNode(attr) xqilla native node localName:" << tostr(attr->getLocalName()) << endl; + +// DOMAttr* imported = (DOMAttr*)document->importNode(const_cast(attr),true); +// if(constrMode == StaticContext::CONSTRUCTION_MODE_PRESERVE) +// XPath2Utils::copyAttributeType(document, imported, (const DOMAttr*)attr); +// if(context->getDebugCallback()) context->getDebugCallback()->ReportClonedNode(const_cast(context), attr, imported); + +// element->setAttributeNodeNS(imported); +// } +// else +// { +// LG_XQILLA_D << "createElementNode(attr) ferris-xqilla native node" << endl; + +// const FQilla_Node* nodeImpl = (const FQilla_Node*)(*a)->getInterface(FQilla_Node::fQilla); +// assert( nodeImpl != 0 ); + +// LG_XQILLA_D << "createElementNode(attr) ferris-xqilla native node eaname:" << nodeImpl->m_eaname << endl; +// ensureAttribute( document, element, nodeImpl->m_eaname, +// getStrAttr( nodeImpl->m_ctx, nodeImpl->m_eaname, "" ) ); +// } + + +// } + +// // std::vector inScopePrefixes; +// // if(!nsInheritMode) +// // { +// // DOMNode* elt=element; +// // while(elt!=NULL) +// // { +// // // check if this node has a namespace, but the prefix is not declared in the attribute map +// // const XMLCh* uri=elt->getNamespaceURI(); +// // if(uri && *uri) +// // { +// // const XMLCh* prefix=elt->getPrefix(); +// // if (!XPath2Utils::containsString(inScopePrefixes, prefix)) +// // inScopePrefixes.push_back(prefix); +// // } +// // DOMNamedNodeMap* attrMap=elt->getAttributes(); +// // for(XMLSize_t i=0;igetLength();i++) +// // { +// // DOMNode* attr=attrMap->item(i); +// // if(XPath2Utils::equals(attr->getPrefix(), XMLUni::fgXMLNSString) || XPath2Utils::equals(attr->getNodeName(), XMLUni::fgXMLNSString)) +// // { +// // const XMLCh* prefix=attr->getPrefix()==NULL?XMLUni::fgZeroLenString:attr->getLocalName(); +// // if (!XPath2Utils::containsString(inScopePrefixes, prefix)) +// // inScopePrefixes.push_back(prefix); +// // } +// // } +// // elt=elt->getParentNode(); +// // } +// // } + +// for(std::vector::const_iterator i = childList.begin(); i != childList.end(); ++i) +// { +// if( const NodeImpl *nodeImpl = (const NodeImpl *)(*i)->getInterface(Item::gXQilla) ) +// { +// LG_XQILLA_D << "createElementNode(element) xqilla native node" << endl; +// LG_XQILLA_D << "createElementNode(element) xqilla native node localName:" << tostr(nodeImpl->getDOMNode()->getLocalName()) << endl; +// // LG_XQILLA_D << "createElementNode(element) xqilla native node year:" +// // << getAttribute( (DOMElement*)(nodeImpl->getDOMNode()), "year" ) +// // << endl; + + +// DOMNode *newChild = NULL; +// if(nodeImpl->getDOMNode()->getOwnerDocument() == document) +// { +// LG_XQILLA_D << "createElementNode(element) xqilla native node (same doc) i->clone:" << i->clone << endl; + +// if(i->clone) { +// newChild = nodeImpl->getDOMNode()->cloneNode(true); +// // if(constrMode == StaticContext::CONSTRUCTION_MODE_PRESERVE && nodeImpl->dmNodeKind()==Node::element_string) +// // XPath2Utils::copyElementType(newChild->getOwnerDocument(), (DOMElement*)newChild, (DOMElement*)nodeImpl->getDOMNode()); +// // if(context->getDebugCallback()) context->getDebugCallback()->ReportClonedNode(const_cast(context), nodeImpl->getDOMNode(), newChild); +// } +// else +// { +// LG_XQILLA_D << "createElementNode(element) xqilla native node (diff doc)" << endl; +// newChild = const_cast(nodeImpl->getDOMNode()); +// } +// } +// else { +// newChild = document->importNode(const_cast(nodeImpl->getDOMNode()),true); +// if(constrMode == StaticContext::CONSTRUCTION_MODE_PRESERVE && nodeImpl->dmNodeKind()==Node::element_string) +// XPath2Utils::copyElementType(newChild->getOwnerDocument(), (DOMElement*)newChild, (DOMElement*)nodeImpl->getDOMNode()); +// if(context->getDebugCallback()) context->getDebugCallback()->ReportClonedNode(const_cast(context), nodeImpl->getDOMNode(), newChild); +// } + +// // if(!nsPreserveMode && newChild->getNodeType()==DOMNode::ELEMENT_NODE) +// // { +// // DOMElement* childElem=(DOMElement*)newChild; + +// // DOMNamedNodeMap* attrMap=childElem->getAttributes(); +// // for(XMLSize_t i=0;igetLength();) +// // { +// // bool bPreserved=true; +// // DOMNode* attr=attrMap->item(i); + +// // if(XPath2Utils::equals(attr->getPrefix(), XMLUni::fgXMLNSString) || XPath2Utils::equals(attr->getNodeName(), XMLUni::fgXMLNSString)) +// // { +// // const XMLCh* prefix=attr->getPrefix()==NULL?XMLUni::fgZeroLenString:attr->getLocalName(); +// // // copy this namespace only if needed by the element name... +// // if(!XPath2Utils::equals(childElem->getPrefix(), prefix)) +// // { +// // bPreserved=false; +// // //... or by its attributes +// // for(XMLSize_t j=0;jgetLength();j++) +// // if(XPath2Utils::equals(attrMap->item(j)->getPrefix(), prefix)) +// // { +// // bPreserved=true; +// // break; +// // } +// // if(!bPreserved) +// // attrMap->removeNamedItemNS(attr->getNamespaceURI(), attr->getLocalName()); +// // } +// // } +// // if(bPreserved) +// // i++; +// // } +// // } + +// element->appendChild(newChild); +// } +// else +// { +// LG_XQILLA_D << "createElementNode(element) ferris-xqilla native node" << endl; + +// const FQilla_Node* nodeImpl = (const FQilla_Node*)(*i)->getInterface(FQilla_Node::fQilla); +// assert( nodeImpl != 0 ); + +// LG_XQILLA_D << "createElementNode(element) ferris-xqilla native node ctx:" << nodeImpl->m_ctx->getURL() << endl; +// LG_XQILLA_D << "createElementNode(element) ferris-xqilla native node i->clone:" << i->clone << endl; + +// string rdn = nodeImpl->m_ctx->getDirName(); +// LG_XQILLA_D << "createElementNode(element) ...2" << endl; +// string crdn = canonicalElementName( rdn ); +// LG_XQILLA_D << "createElementNode(element) ...3 crdn:" << crdn << endl; +// DOMNode *newChild = document->createElement(X( crdn.c_str() )); +// LG_XQILLA_D << "createElementNode(element) ...4" << endl; + +// // FIXME: maybe copy nodeImpl -> attributes and children to newChild? +// // we should do this because the above is all deep copies, +// // BUT: of all the attributes how do we know which to copy? + +// copyChildren( context, document, nodeImpl->m_ctx, (DOMElement*)newChild ); +// LG_XQILLA_D << "createElementNode(element) ...5" << endl; + +// // ensureAttribute( document, (DOMElement*)newChild, "foo", "bar" ); +// // { +// // string txt = getStrAttr( nodeImpl->m_ctx, "content", "" ); +// // if( !txt.empty() ) +// // { +// // XML::setChildText( document, (DOMElement*)newChild, txt ); +// // } +// // } + +// element->appendChild(newChild); +// LG_XQILLA_D << "createElementNode(element) ferris-xqilla done..." << endl; +// } +// } + + +// return new NodeImpl(element, context); +// } + +// Node::Ptr +// FQilla_ItemFactory::createDocumentNode(const std::vector &childList, const DynamicContext *context) const +// { +// return m_ifactory->createDocumentNode( childList, context ); +// } + +// const DOMNode* +// FQilla_ItemFactory::createNamespaceNode(const XMLCh* prefix, const XMLCh* uri, +// const DOMNode* parentNode, const DynamicContext *context) const +// { +// return m_ifactory->createNamespaceNode( prefix, uri, parentNode, context ); +// } + + +// AnyAtomicType::AtomicObjectType +// FQilla_ItemFactory::getPrimitiveTypeIndex(const XMLCh* typeURI, const XMLCh* typeName, bool &isPrimitive) const +// { +// return m_ifactory->getPrimitiveTypeIndex( typeURI, typeName, isPrimitive ); +// } + +// AnyAtomicType::Ptr +// FQilla_ItemFactory::createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, const XMLCh* value, +// const DynamicContext* context) +// { +// return m_ifactory->createDerivedFromAtomicType( typeIndex, value, context ); +// } + +// AnyAtomicType::Ptr +// FQilla_ItemFactory::createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, +// const XMLCh* typeURI, +// const XMLCh* typeName, +// const XMLCh* value, +// const DynamicContext* context) +// { +// return m_ifactory->createDerivedFromAtomicType( typeIndex, typeURI, typeName, value, context ); +// } + +// AnyAtomicType::Ptr +// FQilla_ItemFactory::createDerivedFromAtomicType(const XMLCh* typeURI, +// const XMLCh* typeName, +// const XMLCh* value, +// const DynamicContext* context) +// { +// return m_ifactory->createDerivedFromAtomicType( typeURI, typeName, value, context ); +// } + + +// ATDoubleOrDerived::Ptr +// FQilla_ItemFactory::createDouble(const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createDouble( value, context ); +// } + +// ATDoubleOrDerived::Ptr +// FQilla_ItemFactory::createDouble(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDouble( value, context ); +// } + +// ATDoubleOrDerived::Ptr +// FQilla_ItemFactory::createDoubleOrDerived(const XMLCh* typeURI, +// const XMLCh* typeName, +// const MAPM value, +// const DynamicContext* context) +// { +// return m_ifactory->createDoubleOrDerived( typeURI, typeName, value, context ); +// } + +// ATDoubleOrDerived::Ptr +// FQilla_ItemFactory::createDoubleOrDerived(const XMLCh* typeURI, +// const XMLCh* typeName, +// const XMLCh* value, +// const DynamicContext* context) +// { +// return m_ifactory->createDoubleOrDerived( typeURI, typeName, value, context ); +// } + + +// ATFloatOrDerived::Ptr +// FQilla_ItemFactory::createFloat(const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createFloat( value, context ); +// } + +// ATFloatOrDerived::Ptr +// FQilla_ItemFactory::createFloat(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createFloat( value, context ); +// } + +// ATFloatOrDerived::Ptr +// FQilla_ItemFactory::createFloatOrDerived(const XMLCh* typeURI, +// const XMLCh* typeName, +// const MAPM value, +// const DynamicContext* context) +// { +// return m_ifactory->createFloatOrDerived( typeURI, typeName, value, context ); +// } + +// ATFloatOrDerived::Ptr +// FQilla_ItemFactory::createFloatOrDerived(const XMLCh* typeURI, +// const XMLCh* typeName, +// const XMLCh* value, +// const DynamicContext* context) +// { +// return m_ifactory->createFloatOrDerived( typeURI, typeName, value, context ); +// } + +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createInteger(const int value, const DynamicContext* context) +// { +// return m_ifactory->createInteger( value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createInteger(const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createInteger( value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createInteger(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createInteger( value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createNonNegativeInteger(const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createNonNegativeInteger( value, context ); +// } + + +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createDecimal(const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createDecimal( value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createDecimal(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDecimal( value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const MAPM value, const DynamicContext* context) +// { +// return m_ifactory->createDecimalOrDerived( typeURI, typeName, value, context ); +// } +// ATDecimalOrDerived::Ptr FQilla_ItemFactory::createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDecimalOrDerived( typeURI, typeName, value, context ); +// } + + + +// ATDateOrDerived::Ptr FQilla_ItemFactory::createDate(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDate( value, context ); +// } +// ATDateOrDerived::Ptr FQilla_ItemFactory::createDateOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDateOrDerived( typeURI, typeName, value, context ); +// } + +// ATDateTimeOrDerived::Ptr FQilla_ItemFactory::createDateTime(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDateTime( value, context ); +// } +// ATDateTimeOrDerived::Ptr FQilla_ItemFactory::createDateTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDateTimeOrDerived( typeURI, typeName, value, context ); +// } + + +// ATTimeOrDerived::Ptr FQilla_ItemFactory::createTime(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createTime( value, context ); +// } +// ATTimeOrDerived::Ptr FQilla_ItemFactory::createTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createTimeOrDerived( typeURI, typeName, value, context ); +// } + + +// ATGDayOrDerived::Ptr FQilla_ItemFactory::createGDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createGDayOrDerived( typeURI, typeName, value, context ); +// } +// ATGMonthDayOrDerived::Ptr FQilla_ItemFactory::createGMonthDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createGMonthDayOrDerived( typeURI, typeName, value, context ); +// } +// ATGMonthOrDerived::Ptr FQilla_ItemFactory::createGMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createGMonthOrDerived( typeURI, typeName, value, context ); +// } +// ATGYearMonthOrDerived::Ptr FQilla_ItemFactory::createGYearMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createGYearMonthOrDerived( typeURI, typeName, value, context ); +// } +// ATGYearOrDerived::Ptr FQilla_ItemFactory::createGYearOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createGYearOrDerived( typeURI, typeName, value, context ); +// } + + +// ATDurationOrDerived::Ptr FQilla_ItemFactory::createDayTimeDuration(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDayTimeDuration( value, context ); +// } + +// ATDurationOrDerived::Ptr FQilla_ItemFactory::createDayTimeDuration(const MAPM &seconds, const DynamicContext* context) +// { +// return m_ifactory->createDayTimeDuration( seconds, context ); +// } +// ATDurationOrDerived::Ptr FQilla_ItemFactory::createYearMonthDuration(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createYearMonthDuration( value, context ); +// } +// ATDurationOrDerived::Ptr FQilla_ItemFactory::createYearMonthDuration(const MAPM &months, const DynamicContext* context) +// { +// return m_ifactory->createYearMonthDuration( months, context ); +// } +// ATDurationOrDerived::Ptr FQilla_ItemFactory::createDurationOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createDurationOrDerived( typeURI, typeName, value, context ); +// } + + +// ATStringOrDerived::Ptr FQilla_ItemFactory::createString(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createString( value, context ); +// } +// ATStringOrDerived::Ptr FQilla_ItemFactory::createStringOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createStringOrDerived( typeURI, typeName, value, context ); +// } + + +// ATUntypedAtomic::Ptr FQilla_ItemFactory::createUntypedAtomic(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createUntypedAtomic( value, context ); +// } + +// ATBooleanOrDerived::Ptr FQilla_ItemFactory::createBoolean(bool value, const DynamicContext* context) +// { +// return m_ifactory->createBoolean( value, context ); +// } +// ATBooleanOrDerived::Ptr FQilla_ItemFactory::createBoolean(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createBoolean( value, context ); +// } +// ATBooleanOrDerived::Ptr FQilla_ItemFactory::createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// bool value, const DynamicContext* context) +// { +// return m_ifactory->createBooleanOrDerived( typeURI, typeName, value, context ); +// } +// ATBooleanOrDerived::Ptr FQilla_ItemFactory::createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createBooleanOrDerived( typeURI, typeName, value, context ); +// } + +// ATAnyURIOrDerived::Ptr FQilla_ItemFactory::createAnyURI(const XMLCh* value, const DynamicContext* context) +// { +// return m_ifactory->createAnyURI( value, context ); +// } + +// ATQNameOrDerived::Ptr FQilla_ItemFactory::createQName(const XMLCh* uri, const XMLCh* prefix, const XMLCh* name, +// const DynamicContext* context) +// { +// return m_ifactory->createQName( uri, prefix, name, context ); +// } + +// ATQNameOrDerived::Ptr FQilla_ItemFactory::createQNameOrDerived(const XMLCh* typeURI, const XMLCh* typeName, +// const XMLCh* uri, const XMLCh* prefix, +// const XMLCh* name, const DynamicContext* context) +// { +// return m_ifactory->createQNameOrDerived( typeURI, typeName, uri, prefix, name, context ); +// } + + +// DOMDocument* +// FQilla_ItemFactory::getOutputDocument(const DynamicContext *context) const +// { +// // getDOM( context ); +// // return GetImpl( m_outputDocument ); +// return ((ItemFactoryImpl*)m_ifactory)->getOutputDocument( context ); +// } + + +// // fh_domdoc +// // FQilla_ItemFactory::getDOM( const DynamicContext *context ) const +// // { +// // return 0; + +// // // if( !m_outputDocument ) +// // // { +// // // m_outputDocument = Factory::makeDOM( "" ); +// // // } + +// // // return m_outputDocument; + + +// // // if( m_outputDocument ) +// // // return m_outputDocument; + +// // // m_outputDocument = getOutputDocument( context ); + +// // // // static list< fh_domdoc > explicitLeakList; +// // // // explicitLeakList.push_back( m_outputDocument ); +// // // return m_outputDocument; +// // } + + + + + + +// // Ferris_XQDynamicContextImpl::Ferris_XQDynamicContextImpl( +// // const StaticContext *staticContext, +// // XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr) +// // : +// // XQDynamicContextImpl( staticContext, memMgr ) +// // { +// // } + +// // Ferris_XQDynamicContextImpl::~Ferris_XQDynamicContextImpl() +// // { +// // } + + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + + DocumentCache* + FerrisXQillaConfiguration::createDocumentCache(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr) + { + return new (memMgr) DocumentCacheImpl(memMgr); + } + + SequenceBuilder* + FerrisXQillaConfiguration::createSequenceBuilder(const DynamicContext *context) + { +// return new (context->getMemoryManager()) XercesSequenceBuilder(context); + return new (context->getMemoryManager()) FastXDMSequenceBuilder(context); + + } + + + ItemFactory* + FerrisXQillaConfiguration::createItemFactory(DocumentCache *cache, + XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr) + { + return new (memMgr) ItemFactoryImpl(cache, memMgr); + } + + + class XQILLA_API FerrisXQillaUpdateFactory + : + public UpdateFactory + { + public: + virtual void applyPut(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertInto(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertAttributes(const PendingUpdate &update, DynamicContext *context); + virtual void applyReplaceValue(const PendingUpdate &update, DynamicContext *context); + virtual void applyRename(const PendingUpdate &update, DynamicContext *context); + virtual void applyDelete(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertBefore(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertAfter(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertAsFirst(const PendingUpdate &update, DynamicContext *context); + virtual void applyInsertAsLast(const PendingUpdate &update, DynamicContext *context); + virtual void applyReplaceNode(const PendingUpdate &update, DynamicContext *context); + virtual void applyReplaceAttribute(const PendingUpdate &update, DynamicContext *context); + virtual void applyReplaceElementContent(const PendingUpdate &update, DynamicContext *context); + + virtual void completeRevalidation(DynamicContext *context); + virtual void completeDeletions(DynamicContext *context); + virtual void completeUpdate(DynamicContext *context); + }; + + ////////// + + static const XMLCh file_scheme[] = { chLatin_f, chLatin_i, chLatin_l, chLatin_e, 0 }; + static const XMLCh utf8_str[] = { chLatin_u, chLatin_t, chLatin_f, chDash, chDigit_8, 0 }; + + void FerrisXQillaUpdateFactory::applyPut(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyPut()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyInsertInto(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "applyInsertInto()" << endl; + + const FQilla_Node* nodeImpl = (const FQilla_Node*)update.getTarget()->getInterface(FQilla_Node::fQilla); + LG_XQILLA_D << "applyInsertInto() nodeImpl:" << nodeImpl->getFerrisContext()->getURL() << endl; + + + Result children = update.getValue(); + Item::Ptr item; + while((item = children->next(context)).notNull()) + { + const Node* childImpl = (const Node*)item->getInterface(FQilla_Node::fQilla); + childImpl = (const Node*)item.get(); + +// { +// const Node* zz = 0; +// zz = (const Node*)item->getInterface(Item::gXQilla); +// LG_XQILLA_D << "zz1:" << zz << endl; + +// LG_XQILLA_D << "c0:" << (const Node*)item->getInterface(FQilla_Node::fQilla) << endl; +// LG_XQILLA_D << "c1:" << (const Node*)item->getInterface(fastxdm_string) << endl; +// LG_XQILLA_D << "c2:" << (const Node*)item->getInterface(XercesConfiguration::gXerces) << endl; +// LG_XQILLA_D << "c3:" << (const Node*)item->getInterface(Item::gXQilla) << endl; + +// zz = (const Node*)item.get(); +// LG_XQILLA_D << "zz2:" << zz << endl; +// const XMLCh* zzstr = 0; +// zzstr = zz->asString( context ); +// LG_XQILLA_D << "zz2.str:" << tostr(zzstr) << endl; +// } + + string childImplString = tostr( childImpl->asString( context ) ); + + // Deep copy childImpl filesystem into nodeImpl. + LG_XQILLA_D << "applyInsertInto() copy to:" << nodeImpl->getFerrisContext()->getURL() << endl; + LG_XQILLA_D << "applyInsertInto() data:" << childImplString << endl; + + { + ATQNameOrDerived::Ptr qname = childImpl->dmNodeName( context ); + const XMLCh* childNameXC = qname->getName(); + if( childNameXC ) + { + string childName = tostr(childNameXC); + LG_XQILLA_D << "childName:" << childName << endl; + + Result res = childImpl->dmChildren( context, 0 ); + Item::Ptr resitem; + if((resitem = res->next(context)).notNull()) + { + const Node* tnode = (const Node*)resitem.get(); + if( tnode->dmNodeKind() == Node::text_string ) + { + LG_XQILLA_D << "Child is a text node" << endl; + string content = tostr( tnode->asString( context ) ); + LG_XQILLA_D << "CONTENT:" << content << endl; + + fh_context parentc = nodeImpl->getFerrisContext(); + LG_XQILLA_D << "Should create new child at:" << parentc->getURL() << endl; + LG_XQILLA_D << "Filename:" << childName << endl; + LG_XQILLA_D << "Contents:" << content << endl; + + if( PERFORM_UPDATES ) + { + string rdn = parentc->monsterName( childName ); + LG_XQILLA_D << "Creating new child at:" << parentc->getURL() << endl; + LG_XQILLA_D << "Filename:" << rdn << endl; + LG_XQILLA_D << "Contents:" << content << endl; + + fh_context ctx = Shell::CreateFile( nodeImpl->getFerrisContext(), rdn ); + setStrAttr( ctx, "content", content, true, true ); + break; + } + } + } + } + } + + + + LG_XQILLA_D << "FIXME!" << endl; + } + + } + + void FerrisXQillaUpdateFactory::applyInsertAttributes(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyInsertAttributes()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyReplaceValue(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyReplaceValue()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyRename(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyRename()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyDelete(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyDelete()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyInsertBefore(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyInsertBefore()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyInsertAfter(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyInsertAfter()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyInsertAsFirst(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyInsertAsFirst()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyInsertAsLast(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyInsertAsLast()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyReplaceNode(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyReplaceNode()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyReplaceAttribute(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyReplaceAttribute()" << endl; + assert(false); + } + + void FerrisXQillaUpdateFactory::applyReplaceElementContent(const PendingUpdate &update, DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyReplaceElementContent()" << endl; + + const FQilla_Node* nodeImpl = (const FQilla_Node*)update.getTarget()->getInterface(FQilla_Node::fQilla); +// DOMElement *domnode = (DOMElement*)nodeImpl->getDOMNode(); + + LG_XQILLA_D << "FerrisXQillaUpdateFactory::applyReplaceElementContent() nodeImpl:" << nodeImpl->getFerrisContext()->getURL() << endl; + +// // 1. For each node $C that is a child of $target, the parent property of $C is set to empty. +// DOMNode *child = domnode->getFirstChild(); +// while(child != 0) { +// forDeletion_.insert(child); +// child = child->getNextSibling(); +// } + + const XMLCh *value = update.getValue().first()->asString(context); + LG_XQILLA_D << "applyReplaceElementContent() have-value:" << (value!=0) << endl; + if( value ) + LG_XQILLA_D << "applyReplaceElementContent() *value:" << (*value != 0) << endl; + + if(value != 0 && *value != 0) + { + // 2. The parent property of $text is set to $target. + // 3a. children is set to consist exclusively of $text. If $text is an empty sequence, then $target has + // no children. + // 3b. typed-value and string-value are set to the content property of $text. If $text is an empty sequence, + // then typed-value is an empty sequence and string-value is an empty string. + + LG_XQILLA_D << "applyReplaceElementContent() nodeImpl:" << nodeImpl->getFerrisContext()->getURL() << endl; + LG_XQILLA_D << "applyReplaceElementContent() new-value:" << tostr(value) << endl; + + if( PERFORM_UPDATES ) + { + fh_context c = nodeImpl->getFerrisContext(); + setStrAttr( c, "content", tostr(value) ); +// domnode->appendChild(domnode->getOwnerDocument()->createTextNode(value)); + } + } + + // 3c. upd:removeType($target) is invoked. +// removeType(domnode); + +// addToPutList(domnode, &update, context); + } + + void FerrisXQillaUpdateFactory::completeDeletions(DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::completeDeletions()" << endl; + } + + void FerrisXQillaUpdateFactory::completeRevalidation(DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::completeRevalidation()" << endl; + } + + void FerrisXQillaUpdateFactory::completeUpdate(DynamicContext *context) + { + LG_XQILLA_D << "FerrisXQillaUpdateFactory::completeUpdate(top)" << endl; + completeDeletions(context); + + LG_XQILLA_D << "FerrisXQillaUpdateFactory::completeUpdate(body)" << endl; + } + +///////// + + UpdateFactory* + FerrisXQillaConfiguration::createUpdateFactory(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr) + { + return new (memMgr) FerrisXQillaUpdateFactory(); + } + + class FerrisXDMURIResolver + : + public URIResolver + { + public: + FerrisXDMURIResolver(MemoryManager *mm) : _documentMap(3, mm) {} + + virtual bool putDocument(const RefCountPointer&, const XMLCh*, DynamicContext*) + { + cerr << "FIXME: URIResolver::putDocument() " << endl; + return false; + } + + + virtual bool resolveDocument(Sequence &result, const XMLCh* uri, DynamicContext* context, const QueryPathNode *projection) + { + LG_XQILLA_D << "resolveDocument() uri:" << tostr(uri) << endl; + + fh_context m_ctx = Resolve( tostr(uri) ); + FQilla_Node* qn = new FQilla_Node( context, m_ctx, "", true ); + result.addItem( qn ); + return true; + + +// Node::Ptr doc; + +// // Resolve the uri against the base uri +// const XMLCh *systemId = uri; +// XMLURL urlTmp(context->getMemoryManager()); +// if(urlTmp.setURL(context->getBaseURI(), uri, urlTmp)) { +// systemId = context->getMemoryManager()->getPooledString(urlTmp.getURLText()); +// } + +// // Check in the cache +// try { +// doc = _documentMap.get(systemId); +// } +// catch(NoSuchElementException &ex) { +// } + +// // Check to see if we can locate and parse the document +// if(doc.isNull()) { +// try { +// doc = const_cast(context->getDocumentCache())->loadDocument(uri, context, projection); +// _documentMap.put((void*)systemId, doc); +// } +// catch(const XMLParseException& e) { +// XMLBuffer errMsg; +// errMsg.set(X("Error parsing resource: ")); +// errMsg.append(uri); +// errMsg.append(X(". Error message: ")); +// errMsg.append(e.getError()); +// errMsg.append(X(" [err:FODC0002]")); +// XQThrow2(XMLParseException,X("FastXDMContextImpl::resolveDocument"), errMsg.getRawBuffer()); +// } +// } + +// if(doc.notNull()) { +// result.addItem(doc); +// return true; +// } + +// XMLBuffer errMsg; +// errMsg.set(X("Error retrieving resource: ")); +// errMsg.append(uri); +// errMsg.append(X(" [err:FODC0002]")); +// XQThrow2(XMLParseException,X("FastXDMContextImpl::resolveDocument"), errMsg.getRawBuffer()); + +// return false; + } + + virtual bool resolveCollection(Sequence &result, const XMLCh* uri, DynamicContext* context, const QueryPathNode *projection) + { + return resolveDocument( result, uri, context, projection ); + } + + virtual bool resolveDefaultCollection(Sequence &result, DynamicContext* context, const QueryPathNode *projection) + { + return false; + } + + private: + ValueHashTableOf _documentMap; + }; + + URIResolver* + FerrisXQillaConfiguration::createDefaultURIResolver(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr) + { + return new (memMgr) FerrisXDMURIResolver(memMgr); + } + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + }; +}; diff --git a/Ferris/XQillaContext.cpp b/Ferris/XQillaContext.cpp new file mode 100644 index 0000000..5aba977 --- /dev/null +++ b/Ferris/XQillaContext.cpp @@ -0,0 +1,366 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: XQillaContext.cpp,v 1.3 2010/09/24 21:31:01 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include + +// #include + +#define X(str) XStr(str).unicodeForm() + +using namespace std; +namespace Ferris +{ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// XPath2MemoryManager* init_pathan() +// { +// static XPath2MemoryManager* mm = 0; +// if( !mm ) +// { +// PathanPlatformUtils::initialize(); +// DOMImplementation* pathanImplementation = +// DOMImplementationRegistry::getDOMImplementation(X("XPath2 3.0")); + +// mm = PathanEngine::createMemoryManager(); +// } +// return mm; +// } + + + fh_context + XPathRootContext::performQuery( const std::string& qs_const ) + { + string qs = qs_const; +// string qs = "/fakeroot/child::*"; + qs = string("/*"); + qs += qs_const; + fh_context ret = 0; +// qs = "/*/*"; + + LG_XML_D << "qsc:" << qs_const << endl; + LG_XML_D << "qs :" << qs << endl; + + // Initialise Xerces-C and XQilla using XQillaPlatformUtils + static Util::SingleShot xqilla_virgin; + if( xqilla_virgin() ) + { + XQillaPlatformUtils::initialize(); + } + Factory::ensureXMLPlatformInitialized(); + + static DOMImplementation *xqillaImplementation = 0; + static DOMDocument* tdoc = 0; + + if( !xqillaImplementation ) + xqillaImplementation = DOMImplementationRegistry::getDOMImplementation(X("XPath2 3.0")); + if( !tdoc ) + tdoc = xqillaImplementation->createDocument(); + + +// XMLCh* qsUnicode = XMLString::transcode( qs.c_str() ); +// XPath2MemoryManager* mm = init_pathan(); + + fh_context root = Resolve("root://"); + fh_domdoc doc = Factory::makeDOM( root ); + + LG_XML_D << "XPathRootContext::performQuery(1) making ns resolver" << endl; + const DOMXPathNSResolver* nsResolver = tdoc->createNSResolver(tdoc->getDocumentElement()); + + LG_XML_D << "XPathRootContext::performQuery(2) made ns resolver" << endl; + XQillaNSResolver* xqillaResolver = (XQillaNSResolver*)nsResolver; + + const DOMXPathExpression* parsedExpression = NULL; + XPath2Result *result = NULL; + + LG_XML_D << "XPathRootContext::performQuery() root:" << root->getURL() + << " qs:" << qs + << " qs_const:" << qs_const + << endl; + + try + { + LG_XML_D << "XPathRootContext::performQuery(3) getting pathan expr impl" << endl; + + parsedExpression = tdoc->createExpression(X( qs.c_str() ), nsResolver ); + + LG_XML_D << "XPathRootContext::performQuery(4) evaluating expression" << endl; + + result = (XPath2Result*)parsedExpression->evaluate( doc->getDocumentElement(), + DOMXPathResult::SNAPSHOT_RESULT_TYPE, 0); + + LG_XML_D << "XPathRootContext::performQuery(5) evaluating success!" << endl; + + +// LG_XML_D << "XPathRootContext::performQuery(3) getting pathan expr impl" << endl; +// // parsedExpression = doc->createExpression( qsUnicode, nsResolver ); +// XMLGrammarPool *_xmlGrammarPool = 0; +// // parsedExpression = doc->createExpression(X(expression), nsResolver ); + +// parsedExpression = new (mm) PathanExpressionImpl( qsUnicode, GetImpl(doc), +// mm, nsResolver, _xmlGrammarPool); + +// LG_XML_D << "XPathRootContext::performQuery(4) evaluating expression" << endl; +// result = (XPath2Result*)parsedExpression->evaluate( doc->getDocumentElement(), +// // XPath2Result::FIRST_RESULT, 0 ); +// XPath2Result::SNAPSHOT_RESULT, 0 ); +// // XPath2Result::ITERATOR_RESULT, 0 ); +// LG_XML_D << "XPathRootContext::performQuery(5) evaluating success!" << endl; + } + catch( const XQException &e ) { +// delete nsResolver; + delete parsedExpression; + delete result; +// XMLString::release( &qsUnicode ); + fh_stringstream ss; + ss << "NoSuchSubContext XPath error for query:" << qs + << " error:" << tostr(e.getError()) << endl; + LG_XML_D << tostr(ss) << endl; + Throw_NoSuchSubContext( tostr(ss), this ); + } + catch (const XMLException& e) { +// delete nsResolver; + delete parsedExpression; + delete result; +// XMLString::release( &qsUnicode ); + fh_stringstream ss; + ss << "NoSuchSubContext XML error for query:" << qs + << " error:" << e.getMessage(); + LG_XML_D << tostr(ss) << endl; + Throw_NoSuchSubContext( tostr(ss), this ); + } + catch(...) + { +// delete nsResolver; + delete parsedExpression; +// XMLString::release( &qsUnicode ); + fh_stringstream ss; + ss << "NoSuchSubContext XPath error for query:" << qs; + LG_XML_D << tostr(ss) << endl; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + LG_XML_D << "XPathRootContext::performQuery(6) getting context list" << endl; + // + // We should add a new proxy Context class for each node that is in the + // result set. Since we know that the XML Node will just be a wrapper + // over the underlying filesystem object we can get its path and + // then resolve() the path to get the underlying Context object. + // + fh_contextlist clist = Factory::MakeContextList(); + LG_XML_D << "XPathRootContext::performQuery(6) result:" << result << endl; + LG_XML_D << "result->getSnapshotLength():" << result->getSnapshotLength() << endl; + + for(unsigned int i=0; igetSnapshotLength(); i++) + { + result->snapshotItem( i ); +// DOMNode *node = result->snapshotItem( i ); + + LG_XML_D << "XPathRootContext::performQuery(loop) index:" << i << endl; + if( result->isNode() ) + { + const DOMNode* node = result->getNodeValue(); + LG_XML_D << "XPathRootContext::performQuery(loop) node:" << node << endl; + + const XMLCh* path = node->getNodeName(); + LG_XML_D << "XPathRootContext::performQuery(loop) path:" << tostr(path) << endl; +// delete[] (XMLCh *)path; + + if( const Ferris_DOMElement* e = dynamic_cast( node )) + { + fh_context c = e->getContext(); + LG_XML_D << "dom element... c:" << c->getURL() << endl; +// cerr << "dom element... c:" << c->getURL() << endl; + clist->insert( c ); + } + } + +// result->iterateNext(); + } + ret = clist; + LG_XML_D << "XPathRootContext::performQuery(loop) done." + << " ret.size:" << ret->getSubContextCount() << endl; + +// delete nsResolver; +// delete parsedExpression; +// XMLString::release( &qsUnicode ); + LG_XML_D << "XPathRootContext::performQuery() returning" << endl; + return ret; + } + + + // + // Treat the attempt to view a context as the initiation of a query + // if the dir isn't already there then call performQuery() to make it + // Short cut loading each dir unless absolutely needed. + // + fh_context + XPathRootContext::getSubContext( const std::string& rdn ) + throw( NoSuchSubContext ) + { + try + { + if( priv_isSubContextBound( rdn ) ) + { + return _Base::priv_getSubContext( rdn ); + } + + if( rdn.empty() ) + { + fh_stringstream ss; + ss << "NoSuchSubContext no rdn given"; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + if( rdn == "//" ) + return this; + + if( m_querying ) + { + if( rdn == "//" ) + return this; + + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + Util::ValueRestorer< bool > _obj( m_querying, true ); + fh_context qc = performQuery( rdn ); + if( !isBound( qc ) ) + { + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + return qc; + } + catch( NoSuchSubContext& e ) + { + LG_XML_D << "XXX NoSuchSubContext e" << endl; + throw e; + } + catch( const XQException &e ) + { + LG_XML_D << "XXX NoSuchSubContext pe:" << tostr(e.getError()) << endl; + } + catch (const DOMException& e) + { + LG_XML_D << "XXX NoSuchSubContext de:" << tostr(e.getMessage()) << endl; + } + catch( exception& e ) + { + string s = e.what(); + LG_XML_D << "XXX NoSuchSubContext s:" << s << endl; + Throw_NoSuchSubContext( s, this ); + } + catch(...) + { + LG_XML_D << "XXX NoSuchSubContext e ..." << endl; + } + + fh_stringstream ss; + ss << "NoSuchSubContext:" << rdn; + Throw_NoSuchSubContext( tostr(ss), this ); + } + + void + XPathRootContext::priv_read() + { + emitExistsEventForEachItemRAII _raii1( this ); + } + + XPathRootContext::XPathRootContext() + : + _Base( 0, "/" ), + m_querying( 0 ) + { + createStateLessAttributes(); + } + + XPathRootContext::~XPathRootContext() + { + } + + void + XPathRootContext::createStateLessAttributes( bool force ) + { + if( force || isStateLessEAVirgin() ) + { + _Base::createStateLessAttributes( true ); + supplementStateLessAttributes( true ); + } + } + + + class FERRISEXP_DLLLOCAL XPathRootContext_RootContextDropper + : + public RootContextDropper + { + public: + XPathRootContext_RootContextDropper() + { + ImplementationDetail::appendToStaticLinkedRootContextNames("xpath"); + RootContextFactory::Register( "xpath", this ); + } + + fh_context Brew( RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + static fh_context c = 0; + if( !isBound(c) ) + { + c = new XPathRootContext(); + } + return c; + } + }; + static XPathRootContext_RootContextDropper ___XPathRootContext_static_init; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ +}; diff --git a/Ferris/XQillaContext_private.hh b/Ferris/XQillaContext_private.hh new file mode 100644 index 0000000..43186ee --- /dev/null +++ b/Ferris/XQillaContext_private.hh @@ -0,0 +1,83 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: XQillaContext_private.hh,v 1.2 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_XPATH_CONTEXT_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_XPATH_CONTEXT_PRIVH_ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace Ferris +{ + + /** + * root context for xpath evaluation + * this is the context for xpath:// + */ + class FERRISEXP_DLLLOCAL XPathRootContext + : + public StateLessEAHolder< XPathRootContext, FakeInternalContext > + { + typedef XPathRootContext _Self; + typedef StateLessEAHolder< XPathRootContext, FakeInternalContext > _Base; + + bool m_querying; + + protected: + + virtual void priv_read(); + + public: + + XPathRootContext(); + virtual ~XPathRootContext(); + + void createStateLessAttributes( bool force = false ); + + virtual fh_context getSubContext( const std::string& rdn ) throw( NoSuchSubContext ); + virtual fh_context performQuery( const std::string& rdn ); + }; + + + +}; +#endif diff --git a/Ferris/XQilla_private.hh b/Ferris/XQilla_private.hh new file mode 100644 index 0000000..e3a30a1 --- /dev/null +++ b/Ferris/XQilla_private.hh @@ -0,0 +1,386 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: XQilla_private.hh,v 1.13 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_XQILLA_PRIVATE_PRIVH_ +#define _ALREADY_INCLUDED_FERRIS_XQILLA_PRIVATE_PRIVH_ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +namespace Ferris +{ + namespace qilla + { + FERRISEXP_API std::string canonicalElementName( std::string rdn ); + FERRISEXP_API std::string canonicalElementName( fh_context c ); + class FQilla_ItemFactory; + + FERRISEXP_API void RegisterFerrisXQillaFunctions( StaticContext* context ); + + + + class FERRISEXP_API ShouldIncludeAttribute + : + public Handlable + { + std::string m_showColumnsRegexString; + boost::regex m_showColumnsRegex; + stringset_t m_showColumnsList; + + bool nameContainsIllegalXMLAttributeChar( const std::string& eaname ); + + public: + ShouldIncludeAttribute(); + + + void setShowColumns( const std::string& s ); + void setShowColumnsRegex( const std::string& s ); + + + bool shouldInclude( fh_context c, const std::string& eaname ); + }; + FERRIS_SMARTPTR( ShouldIncludeAttribute, fh_shouldIncludeAttribute ); + + + FERRISEXP_API fh_shouldIncludeAttribute getShouldIncludeAttribute( DynamicContext* context ); + FERRISEXP_API void setShouldIncludeAttribute( DynamicContext* context, fh_shouldIncludeAttribute sia ); + + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + + + class FERRISEXP_API FQilla_Node : public Node + { + typedef FQilla_Node _Self; + typedef Node _Base; + friend class FQilla_ItemFactory; + + fh_context m_ctx; + const std::string m_eaname; + bool m_forceNoParent; + bool m_isSingleTextContentsNode; + + mutable XERCES_CPP_NAMESPACE::DOMLSSerializer *m_fSerializer; + + void getAllChildren( fh_context c, ctxlist_t* cl ) const; + + typedef std::list< fh_domdoc > dom_cache_t; + mutable dom_cache_t dom_cache; + void cacheDOM( fh_domdoc ) const; + + bool isAttrNode() const; + + public: + + /** The "FQilla" item interface */ + static const XMLCh fQilla[]; + + FQilla_Node( const DynamicContext* dynamicContext, + fh_context ctx, + const std::string& eaname = "", + bool forceNoParent = false, + bool m_isSingleTextContentsNode = false ); + virtual ~FQilla_Node(); + + virtual void *getInterface(const XMLCh *name) const; + + virtual bool isNode() const; + virtual bool isAtomicValue() const; + virtual const XMLCh* asString(const DynamicContext* context) const; + virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const; + virtual Sequence dmBaseURI(const DynamicContext* context) const; + virtual const XMLCh* dmNodeKind() const; + virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const; + virtual const XMLCh* dmStringValue(const DynamicContext* context) const; + virtual Sequence dmTypedValue(DynamicContext* context) const; + virtual Sequence dmDocumentURI(const DynamicContext* context) const; + virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const; + virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const; + virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const; + virtual bool equals(const Node::Ptr &other) const; + virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const; + virtual Node::Ptr dmParent(const DynamicContext* context) const; + virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const; + virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const; + virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const; + virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const; + virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const; + virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const; + virtual const XMLCh* getTypeURI() const; + virtual const XMLCh* getTypeName() const; + + fh_context getFerrisContext() const; + + virtual Node::Ptr root(const DynamicContext* context) const; + virtual void generateEvents(EventHandler *events, const DynamicContext *context, + bool preserveNS = true, bool preserveType = true) const; + }; + + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + + class FERRISEXP_API FunctionFerrisDoc : public XQFunction + { + public: + static const XMLCh name[]; + static const unsigned int minArgs; + static const unsigned int maxArgs; + + FunctionFerrisDoc(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr); + + virtual ASTNode* staticResolution(StaticContext *context); + virtual ASTNode *staticTypingImpl(StaticContext *context); + + Sequence createSequence(DynamicContext* context, int flags=0) const; + }; + + + class FERRISEXP_API FunctionFerrisDocQuiet : public XQFunction + { + public: + static const XMLCh name[]; + static const unsigned int minArgs; + static const unsigned int maxArgs; + + FunctionFerrisDocQuiet(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr); + + virtual ASTNode* staticResolution(StaticContext *context); + virtual ASTNode *staticTypingImpl(StaticContext *context); + + Sequence createSequence(DynamicContext* context, int flags=0) const; + }; + + + struct IndexLookupResult + { + // eavalue -> seq + typedef std::map< std::string, Sequence > m_valueLookup_t; + m_valueLookup_t m_valueLookup; + + IndexLookupResult(); + void insert( DynamicContext* context, const std::string& value, fh_context c ); + Sequence find( DynamicContext* context, const std::string& value ); + }; + + + class FERRISEXP_API FunctionFerrisIndexLookup : public XQFunction + { + // key=earl,eanamex + typedef std::map< std::pair< std::string, std::string>, IndexLookupResult* > m_lookup_t; + mutable m_lookup_t m_lookup; + + public: + static const XMLCh name[]; + static const unsigned int minArgs; + static const unsigned int maxArgs; + + FunctionFerrisIndexLookup(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr); + + virtual ASTNode* staticResolution(StaticContext *context); + virtual ASTNode *staticTypingImpl(StaticContext *context); + + Sequence createSequence(DynamicContext* context, int flags=0) const; + + void populateLookup( DynamicContext* context, IndexLookupResult* l, fh_context ctx, const std::string eaname ) const; + + }; + + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + + class FERRISEXP_API FerrisXQillaConfiguration + : + public XQillaConfiguration + { + public: + virtual DocumentCache *createDocumentCache(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr); + + virtual SequenceBuilder *createSequenceBuilder(const DynamicContext *context); + + virtual ItemFactory *createItemFactory(DocumentCache *cache, + XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr); + + virtual UpdateFactory *createUpdateFactory(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr); + + virtual URIResolver *createDefaultURIResolver(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr); + }; + + + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + /////////////////////////////////////////////////// + + +// class FQilla_ItemFactory : public ItemFactory +// { +// typedef FQilla_ItemFactory _Self; +// typedef ItemFactoryImpl _Base; + +// ItemFactory* m_ifactory; +// // mutable fh_domdoc m_outputDocument; + +// public: + +// FQilla_ItemFactory( ItemFactory* ifactory ); +// virtual ~FQilla_ItemFactory(); + +// /* @name Node factory methods */ + +// virtual Node::Ptr cloneNode(const Node::Ptr node, const DynamicContext *context) const; +// virtual Node::Ptr createTextNode(const XMLCh *value, const DynamicContext *context) const; +// virtual Node::Ptr createCommentNode(const XMLCh *value, const DynamicContext *context) const; +// virtual Node::Ptr createPINode(const XMLCh *name, const XMLCh *value, const DynamicContext *context) const; +// virtual Node::Ptr createAttributeNode(const XMLCh *uri, const XMLCh *prefix, const XMLCh *name, +// const XMLCh *value, const DynamicContext *context) const; +// virtual Node::Ptr createElementNode(const XMLCh *uri, const XMLCh *prefix, const XMLCh *name, +// const std::vector &attrList, const std::vector &childList, +// const DynamicContext *context) const; +// virtual Node::Ptr createDocumentNode(const std::vector &childList, const DynamicContext *context) const; +// virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* createNamespaceNode(const XMLCh* prefix, const XMLCh* uri, const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* parentNode, const DynamicContext *context) const; + +// /* @name Atomic type factory methods */ + +// virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex(const XMLCh* typeURI, const XMLCh* typeName, bool &isPrimitive) const; +// virtual AnyAtomicType::Ptr createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, const XMLCh* value, +// const DynamicContext* context); +// virtual AnyAtomicType::Ptr createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, const XMLCh* typeURI, +// const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); +// virtual AnyAtomicType::Ptr createDerivedFromAtomicType(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// /* @name Number factory methods */ + +// virtual ATDoubleOrDerived::Ptr createDouble(const MAPM value, const DynamicContext* context); +// virtual ATDoubleOrDerived::Ptr createDouble(const XMLCh* value, const DynamicContext* context); +// virtual ATDoubleOrDerived::Ptr createDoubleOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context); +// virtual ATDoubleOrDerived::Ptr createDoubleOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATFloatOrDerived::Ptr createFloat(const MAPM value, const DynamicContext* context); +// virtual ATFloatOrDerived::Ptr createFloat(const XMLCh* value, const DynamicContext* context); +// virtual ATFloatOrDerived::Ptr createFloatOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context); +// virtual ATFloatOrDerived::Ptr createFloatOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATDecimalOrDerived::Ptr createInteger(const int value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createInteger(const MAPM value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createInteger(const XMLCh* value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createNonNegativeInteger(const MAPM value, const DynamicContext* context); + +// virtual ATDecimalOrDerived::Ptr createDecimal(const MAPM value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createDecimal(const XMLCh* value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context); +// virtual ATDecimalOrDerived::Ptr createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// /* @name Date / time factory methods */ + +// virtual ATDateOrDerived::Ptr createDate(const XMLCh* value, const DynamicContext* context); +// virtual ATDateOrDerived::Ptr createDateOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATDateTimeOrDerived::Ptr createDateTime(const XMLCh* value, const DynamicContext* context); +// virtual ATDateTimeOrDerived::Ptr createDateTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATTimeOrDerived::Ptr createTime(const XMLCh* value, const DynamicContext* context); +// virtual ATTimeOrDerived::Ptr createTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATGDayOrDerived::Ptr createGDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); +// virtual ATGMonthDayOrDerived::Ptr createGMonthDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); +// virtual ATGMonthOrDerived::Ptr createGMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); +// virtual ATGYearMonthOrDerived::Ptr createGYearMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); +// virtual ATGYearOrDerived::Ptr createGYearOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATDurationOrDerived::Ptr createDayTimeDuration(const XMLCh* value, const DynamicContext* context); +// virtual ATDurationOrDerived::Ptr createDayTimeDuration(const MAPM &seconds, const DynamicContext* context); +// virtual ATDurationOrDerived::Ptr createYearMonthDuration(const XMLCh* value, const DynamicContext* context); +// virtual ATDurationOrDerived::Ptr createYearMonthDuration(const MAPM &months, const DynamicContext* context); +// virtual ATDurationOrDerived::Ptr createDurationOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// /* @name Other factory methods */ + +// virtual ATStringOrDerived::Ptr createString(const XMLCh* value, const DynamicContext* context); +// virtual ATStringOrDerived::Ptr createStringOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATUntypedAtomic::Ptr createUntypedAtomic(const XMLCh* value, const DynamicContext* context); + +// virtual ATBooleanOrDerived::Ptr createBoolean(bool value, const DynamicContext* context); +// virtual ATBooleanOrDerived::Ptr createBoolean(const XMLCh* value, const DynamicContext* context); +// virtual ATBooleanOrDerived::Ptr createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, bool value, const DynamicContext* context); +// virtual ATBooleanOrDerived::Ptr createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context); + +// virtual ATAnyURIOrDerived::Ptr createAnyURI(const XMLCh* value, const DynamicContext* context); + +// virtual ATQNameOrDerived::Ptr createQName(const XMLCh* uri, const XMLCh* prefix, const XMLCh* name, const DynamicContext* context); +// virtual ATQNameOrDerived::Ptr createQNameOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* uri, const XMLCh* prefix, +// const XMLCh* name, const DynamicContext* context); + +// XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getOutputDocument(const DynamicContext *context) const; +// // fh_domdoc getDOM( const DynamicContext *context ) const; +// }; + + +// class Ferris_XQDynamicContextImpl : public XQDynamicContextImpl +// { +// public: +// Ferris_XQDynamicContextImpl(const StaticContext *staticContext, +// XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr); +// virtual ~Ferris_XQDynamicContextImpl(); +// }; + + + }; +}; +#endif diff --git a/Ferris/common-ferris-out-of-proc-notification-deamon.cpp b/Ferris/common-ferris-out-of-proc-notification-deamon.cpp new file mode 100644 index 0000000..44f9f08 --- /dev/null +++ b/Ferris/common-ferris-out-of-proc-notification-deamon.cpp @@ -0,0 +1,94 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: common-ferris-out-of-proc-notification-deamon.cpp,v 1.4 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "common-ferris-out-of-proc-notification-deamon.hh" + +#include "Resolver_private.hh" + +#include +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace OProcMessage + { + const string FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT = "~/.ferris/oprocnotify"; + + string appendToServPath( const std::string& r ) + { + string ret = r + "/incoming"; + ret = CleanupURL( ret ); + + if( starts_with( ret, "file:" ) ) + ret = ret.substr( 5 ); + + return ret; + } + + string appendFromServPrefix( const std::string& r ) + { + string ret = r + "/outgoing/"; + ret = CleanupURL( ret ); + + if( starts_with( ret, "file:" ) ) + ret = ret.substr( 5 ); + + return ret; + } + + string appendStagePrefix( const std::string& r ) + { + string ret = r + "/stage/"; + ret = CleanupURL( ret ); + + if( starts_with( ret, "file:" ) ) + ret = ret.substr( 5 ); + + return ret; + } + + const char* KEY_COMMAND = "command"; + const char* KEY_URL = "url"; + const char* KEY_NAME = "name"; + const char* KEY_OBAND_PID = "out-of-band-pid"; + const char* KEY_DATA = "data"; + const char* KEY_ESET = "eset"; + + const char* COMMAND_CTX_CREATED = "context-created"; + const char* COMMAND_CTX_DELETED = "context-deleted"; + const char* COMMAND_CTX_CHANGED = "context-changed"; + const char* COMMAND_EA_CREATED = "ea-created"; + const char* COMMAND_EA_DELETED = "ea-deleted"; + const char* COMMAND_MEDALLION_UPDATED = "medallion-updated"; + const char* COMMAND_ETAGERE_NEW_EMBLEM = "etagere-new-emblem"; + }; +}; diff --git a/Ferris/common-ferris-out-of-proc-notification-deamon.hh b/Ferris/common-ferris-out-of-proc-notification-deamon.hh new file mode 100644 index 0000000..ab8c25d --- /dev/null +++ b/Ferris/common-ferris-out-of-proc-notification-deamon.hh @@ -0,0 +1,77 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: common-ferris-out-of-proc-notification-deamon.hh,v 1.4 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_COMMON_OPROC_DEAMON_H_ +#define _ALREADY_INCLUDED_FERRIS_COMMON_OPROC_DEAMON_H_ + +#include +#include + +#include + +namespace Ferris +{ + /** + * write/readMessage() put extra data in the message, the Serv namespace + * is used by the server to get at that extra data. + * + * This is mainly used by PluginOutOfProcNotificationEngine to communicate + * with ferris-out-of-proc-notification-deamon + */ + namespace OProcMessage + { + FERRISEXP_API extern const std::string FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT; + FERRISEXP_API std::string appendToServPath( + const std::string& r = FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT ); + FERRISEXP_API std::string appendFromServPrefix( + const std::string& r = FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT ); + FERRISEXP_API std::string appendStagePrefix( + const std::string& r = FERRIS_OUT_OF_PROC_NOTIFICATION_DEAMON_ROOT ); + + + + FERRISEXP_API extern const char* KEY_COMMAND; + FERRISEXP_API extern const char* KEY_URL; + FERRISEXP_API extern const char* KEY_NAME; + FERRISEXP_API extern const char* KEY_OBAND_PID; + FERRISEXP_API extern const char* KEY_DATA; + FERRISEXP_API extern const char* KEY_ESET; + + FERRISEXP_API extern const char* COMMAND_CTX_CREATED; + FERRISEXP_API extern const char* COMMAND_CTX_DELETED; + FERRISEXP_API extern const char* COMMAND_CTX_CHANGED; + FERRISEXP_API extern const char* COMMAND_EA_CREATED; + FERRISEXP_API extern const char* COMMAND_EA_DELETED; + FERRISEXP_API extern const char* COMMAND_MEDALLION_UPDATED; + FERRISEXP_API extern const char* COMMAND_ETAGERE_NEW_EMBLEM; + + }; +}; +#endif diff --git a/Ferris/libferris.i b/Ferris/libferris.i new file mode 100644 index 0000000..c6a9b6d --- /dev/null +++ b/Ferris/libferris.i @@ -0,0 +1,302 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferris.i,v 1.3 2006/08/13 11:39:54 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +%{ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef Copy +#undef Copy +#endif +#include +#include +#include +#include +#include +#include + + using namespace Ferris; + +%} + +namespace Ferris +{ +}; +%ignore getConMAP(); +%ignore getMAP(); +%ignore ContextSetCompare; +%ignore RelativeTimeOrIntegerStringParser; +%ignore ContextStreamMemoryManager; +%ignore getCacheManagerImpl(); + + +%ignore Ferris::Context::tryToGetImplicitTreeSmush(); +%ignore Ferris::Data( const ContextIterator* ci ); +%ignore Ferris::Data(); + +%include +%include stl.i +%template(IntVector) std::vector; +%template(StringVector) std::vector; + + +%ignore Ferris::Nocase; +%ignore Ferris::ferris_ios::o_direct; +%ignore Ferris::ferris_ios::o_mmap; +%ignore Ferris::ferris_ios::o_mseq; +%ignore Ferris::ferris_ios::all_mask; + +%ignore FerrisLoki::Handlable::ref_count; +%ignore FerrisLoki::Handlable::GenericCloseSignal; + + +%include +%include +%include +%include + +%nodefault; +namespace Ferris +{ + %name(Context) class fh_context + { public: + Ferris::Context* operator->(); + }; + %name(AttributeProxy) class fh_attribute + { public: + Ferris::AttributeProxy* operator->(); + }; + %name(AttributeCollection) class fh_attrcol + { public: + Ferris::AttributeCollection* operator->(); + }; + %name(Runner) class fh_runner + { public: + Ferris::Runner* operator->(); + }; + %name(PreprocessedSortString) class fh_sorter + { public: + Ferris::PreprocessedSortString* operator->(); + }; + %name(Emblem) class fh_emblem + { public: + Ferris::Emblem* operator->(); + }; + %name(ColdEmblem) class fh_cemblem + { public: + Ferris::ColdEmblem* operator->(); + }; + %name(Etagere) class fh_etagere + { public: + Ferris::Etagere* operator->(); + }; + %name(Medallion) class fh_medallion + { public: + Ferris::Medallion* operator->(); + }; + %name(MedallionBelief) class fh_medallionBelief + { public: + Ferris::MedallionBelief* operator->(); + }; + + namespace FCA + { + %name(ConceptLattice) class fh_conceptLattice + { public: + Ferris::FCA::ConceptLattice* operator->(); + }; + }; +}; +%ignore Ferris::Context; +%ignore Ferris::AttributeProxy; +%ignore Ferris::AttributeCollection; +%ignore Ferris::Runner; +%ignore Ferris::PreprocessedSortString; +%ignore Ferris::Emblem; +%ignore Ferris::ColdEmblem; +%ignore Ferris::Etagere; +%ignore Ferris::Medallion; +%ignore Ferris::MedallionBelief; +%ignore Ferris::FCA::ConceptLattice; + + +%ignore getModeFromMetaData( fh_context ); +%ignore CreationStatelessFunctor; + +%ignore RegisterCreationModule( const std::string& libname, + const std::string& ferristype, + const std::string& xsd, + bool requiresNativeKernelDrive = true, + const std::string& simpleTypes = "" ); +%ignore appendExtraGenerateSchemaSimpleTypes( const std::string& s ); +%ignore insertAllCreatorModules( Context::CreateSubContextSchemaPart_t& m ); +%ignore insertAbstractCreatorModules( Context::CreateSubContextSchemaPart_t& m ); + +%ignore getCachedContextAggregateData( fh_context c, int m ); +%ignore SL_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_SubCreate_ea( fh_context c, fh_context md ); +%ignore SL_SubCreate_text ( fh_context c, fh_context md ); +%ignore SL_edb_SubCreate_dir( fh_context c, fh_context md ); +%ignore SL_edb_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_ipc_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_ipc_sem_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_db4_SubCreate_dir( fh_context c, fh_context md ); +%ignore SL_db4_SubCreate_file( fh_context c, fh_context md ); +%ignore Ferrisls_aggregate_data; + +%ignore Ferris::getStrAttr( AttributeCollection* c, + const std::string& rdn, + const std::string& def, + bool getAllLines, + bool throw_for_errors ); + +%ignore Ferris::RegexCollection::getRegex(); +%ignore Ferris::RegexCollection::getRegex() const; +%ignore Ferris::RegexCollection::clear(); +%ignore toStreamChar( wchar_t ch ); +%ignore toStreamChar( char ch ); +%ignore tryToGetImplicitTreeSmushSet(); + + +namespace Ferris +{ + %ignore Handlable; + %ignore CacheHandlable::OnlyInCacheSignal; +}; +%include +%include +%include +%include +%include + + + + + + +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include + +%ignore Ferris::Runner::setAsyncStdOutFunctor; +%ignore Ferris::Runner::internal_async_cb; +%include + +%include +%include + + //%include +%include +%include +%include + +%ignore Ferris::CacheManager::getInsideResolve(); +%ignore Ferris::Context::priv_isSubContextBound( const std::string& rdn, Items_t::iterator& iter ); +%ignore Ferris::Context::Emit_MedallionUpdated(); +%ignore Ferris::Context::Emit_Changed( NamingEvent_Changed* e, + const std::string& olddn, + const std::string& newdn, Object* ExtraData); +%ignore Ferris::Context::Emit_Changed( NamingEvent_Changed* e, + const std::string& olddn, + const std::string& newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Deleted( NamingEvent_Deleted* e, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Start_Execute( NamingEvent_Start_Execute* e, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Stop_Execute( NamingEvent_Stop_Execute* e, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Created( NamingEvent_Created* e, + const fh_context& newc, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Moved( NamingEvent_Moved* e, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Exists( NamingEvent_Exists* e, + const fh_context& newc, + std::string olddn, std::string newdn, Object* ExtraData ); +%ignore Ferris::Context::Emit_Start_Reading_Context( NamingEvent_Start_Reading_Context* e, + Object* ExtraData ); +%ignore Ferris::Context::Emit_Stop_Reading_Context( NamingEvent_Stop_Reading_Context* e, + Object* ExtraData ); +%ignore Ferris::Context::getNamingEvent_MedallionUpdated_Sig(); +%ignore Ferris::Context::getNamingEvent_Changed_Sig(); +%ignore Ferris::Context::getNamingEvent_Deleted_Sig(); +%ignore Ferris::Context::getNamingEvent_Start_Execute_Sig(); +%ignore Ferris::Context::getNamingEvent_Stop_Execute_Sig(); +%ignore Ferris::Context::getNamingEvent_Created_Sig(); +%ignore Ferris::Context::getNamingEvent_Moved_Sig(); +%ignore Ferris::Context::getNamingEvent_Exists_Sig(); +%ignore Ferris::Context::getNamingEvent_Start_Reading_Context_Sig(); +%ignore Ferris::Context::getNamingEvent_Stop_Reading_Context_Sig(); +%ignore Ferris::Context::getContextEvent_Headers_Received_Sig(); +%ignore Ferris::Context::getAttributeNames( AttributeNames_t& ret ); +%ignore insertCreatorModules( Context::CreateSubContextSchemaPart_t& m, bool ); +%ignore DepthFirstDeletePCCTS_DropInOderList( childContext* cc ); +%ignore DepthFirstDelete( Context* cc, bool callReclaimContextObject = true ); +%ignore DepthFirstDelete( Context* cc, std::list< Context* >& l, bool callReclaimContextObject = true ); +%ignore Ferris::Context::DepthFirstDeletePCCTS_DropInOderList( childContext* cc ); +%ignore Ferris::Context::DepthFirstDelete( Context* cc, bool callReclaimContextObject = true ); +%ignore Ferris::Context::DepthFirstDelete( Context* cc, std::list< Context* >& l, bool callReclaimContextObject = true ); +%ignore AppendAllStaticEAGeneratorFactories_Stateless( Context::s_StatelessEAGenFactorys_t& SL ); +%ignore AppendAllStaticEAGeneratorFactories_Statefull( Context::m_StatefullEAGenFactorys_t& SF ); + +%ignore Ferris::ContextIterator::ContextIterator( fh_context c, const std::string& rdn ); +%ignore Ferris::ContextIterator::ContextIterator(); + + +%include +%include + + + + + + + + diff --git a/Ferris/libferrisocaml.i b/Ferris/libferrisocaml.i new file mode 100644 index 0000000..23d664c --- /dev/null +++ b/Ferris/libferrisocaml.i @@ -0,0 +1,63 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisocaml.i,v 1.1 2005/07/04 08:57:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +/* libferris.i */ +%module libferris + +%include "typemaps.i" + +/* %rename(operator_assignment) operator=; */ +/* %rename(operator_equal_to) operator==; */ +/* %rename(operator_not_equal_to) operator!=; */ + +/* %rename(operator_plusplus) operator++(); */ +/* %rename(operator_plusplusint) operator++(int); */ +/* %rename(operator_minusminus) operator--(); */ +/* %rename(operator_minusminusint) operator--(int); */ + +/* %rename(operator_plus) operator+; */ +/* %rename(operator_minus) operator-; */ +/* %rename(operator_pluseq) operator+=; */ +/* %rename(operator_minuseq) operator-=; */ + +/* %rename(operator_lt) operator<; */ +/* %rename(operator_gt) operator>; */ +/* %rename(operator_lteq) operator<=; */ +/* %rename(operator_gteq) operator>=; */ + +/* %rename(operator_atindex) operator[]; */ +/* %rename(operator_functioncall) operator(); */ +/* %rename(operator_dereference) operator*; */ + + + +%include "libferris.i" + diff --git a/Ferris/libferrisocaml_wrap.c b/Ferris/libferrisocaml_wrap.c new file mode 100644 index 0000000..e69de29 diff --git a/Ferris/libferrisperl.i b/Ferris/libferrisperl.i new file mode 100644 index 0000000..d93ef35 --- /dev/null +++ b/Ferris/libferrisperl.i @@ -0,0 +1,90 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisperl.i,v 1.1 2005/07/04 08:57:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +/* libferris.i */ +%module libferris + + +%include "loki-smartptr.i" +%include "perlmain.i" +%include "typemaps.i" +%include "perl_std_list.i" +%include "cstring.i" + +%rename(operator_assignment) operator=; +%rename(operator_equal_to) operator==; +%rename(operator_not_equal_to) operator!=; + +%rename(operator_plusplus) operator++(); +%rename(operator_plusplusint) operator++(int); +%rename(operator_minusminus) operator--(); +%rename(operator_minusminusint) operator--(int); + +%rename(operator_plus) operator+; +%rename(operator_minus) operator-; +%rename(operator_pluseq) operator+=; +%rename(operator_minuseq) operator-=; + +%rename(operator_lt) operator<; +%rename(operator_gt) operator>; +%rename(operator_lteq) operator<=; +%rename(operator_gteq) operator>=; + +%rename(operator_atindex) operator[]; +%rename(operator_functioncall) operator(); +%rename(operator_dereference) operator*; + +%ignore SL_commondb_SubCreate_dir( fh_context c, fh_context md ); +%ignore SL_commondb_SubCreate_file( fh_context c, fh_context md ); +%ignore SL_SubCreate_commondb( fh_context c, fh_context md ); +%ignore SL_ldap_SubCreate_context( fh_context c, fh_context md ); + +%ignore tostr( fh_char ); +%include "libferris.i" + +/* %ignore fh_istreamChar::rdbuf(); */ +/* %ignore fh_istreamChar_rdbuf(); */ +/* %ignore Ferris::Ferris_istream::rdbuf(); */ +/* %ignore delete_fh_istreamChar; */ +/* %template(fh_istreamChar) Ferris::Ferris_istream; */ + +namespace Ferris +{ + namespace Shell + { + + fh_context acquireContext( std::string path, + int mode = 0, + bool isDir = true ); + }; + +}; + diff --git a/Ferris/libferrisperl_wrap.cpp b/Ferris/libferrisperl_wrap.cpp new file mode 100644 index 0000000..722ac4a --- /dev/null +++ b/Ferris/libferrisperl_wrap.cpp @@ -0,0 +1,96607 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.4 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGPERL +#define SWIG_CASTRANK_MODE + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#ifdef __cplusplus +/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ +#include +#include +extern "C" { +#endif +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ + +/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ +#ifndef PERL_REVISION +# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) +# define PERL_PATCHLEVEL_H_IMPLICIT +# include +# endif +# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) +# include +# endif +# ifndef PERL_REVISION +# define PERL_REVISION (5) +# define PERL_VERSION PATCHLEVEL +# define PERL_SUBVERSION SUBVERSION +# endif +#endif + +#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) +#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) +#endif + +#ifndef SvIOK_UV +# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) +#endif + +#ifndef SvUOK +# define SvUOK(sv) SvIOK_UV(sv) +#endif + +#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) +# define PL_sv_undef sv_undef +# define PL_na na +# define PL_errgv errgv +# define PL_sv_no sv_no +# define PL_sv_yes sv_yes +# define PL_markstack_ptr markstack_ptr +#endif + +#ifndef IVSIZE +# ifdef LONGSIZE +# define IVSIZE LONGSIZE +# else +# define IVSIZE 4 /* A bold guess, but the best we can make. */ +# endif +#endif + +#ifndef INT2PTR +# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +# else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +# endif + +# define NUM2PTR(any,d) (any)(PTRV)(d) +# define PTR2IV(p) INT2PTR(IV,p) +# define PTR2UV(p) INT2PTR(UV,p) +# define PTR2NV(p) NUM2PTR(NV,p) + +# if PTRSIZE == LONGSIZE +# define PTR2ul(p) (unsigned long)(p) +# else +# define PTR2ul(p) INT2PTR(unsigned long,p) +# endif +#endif /* !INT2PTR */ + +#ifndef SvPV_nolen +# define SvPV_nolen(x) SvPV(x,PL_na) +#endif + +#ifndef get_sv +# define get_sv perl_get_sv +#endif + +#ifndef ERRSV +# define ERRSV get_sv("@",FALSE) +#endif + +#ifndef pTHX_ +#define pTHX_ +#endif + +#include +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGINTERN const char* +SWIG_Perl_ErrorType(int code) { + const char* type = 0; + switch(code) { + case SWIG_MemoryError: + type = "MemoryError"; + break; + case SWIG_IOError: + type = "IOError"; + break; + case SWIG_RuntimeError: + type = "RuntimeError"; + break; + case SWIG_IndexError: + type = "IndexError"; + break; + case SWIG_TypeError: + type = "TypeError"; + break; + case SWIG_DivisionByZero: + type = "ZeroDivisionError"; + break; + case SWIG_OverflowError: + type = "OverflowError"; + break; + case SWIG_SyntaxError: + type = "SyntaxError"; + break; + case SWIG_ValueError: + type = "ValueError"; + break; + case SWIG_SystemError: + type = "SystemError"; + break; + case SWIG_AttributeError: + type = "AttributeError"; + break; + default: + type = "RuntimeError"; + } + return type; +} + + + + +/* ----------------------------------------------------------------------------- + * perlrun.swg + * + * This file contains the runtime support for Perl modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef PERL_OBJECT +#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), +#define SWIG_PERL_OBJECT_CALL pPerl, +#else +#define SWIG_PERL_OBJECT_DECL +#define SWIG_PERL_OBJECT_CALL +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) +#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) +#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) +#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) +#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + +/* Perl-specific SWIG API */ + +#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) +#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) +#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) + + +#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) +#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) +#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) +#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +#ifdef __cplusplus +extern "C" { +#endif + +#define SWIG_OWNER SWIG_POINTER_OWN +#define SWIG_SHADOW SWIG_OWNER << 1 + +#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL + +/* SWIG Perl macros */ + +/* Macro to declare an XS function */ +#ifndef XSPROTO +# define XSPROTO(name) void name(pTHX_ CV* cv) +#endif + +/* Macro to call an XS function */ +#ifdef PERL_OBJECT +# define SWIG_CALLXS(_name) _name(cv,pPerl) +#else +# ifndef MULTIPLICITY +# define SWIG_CALLXS(_name) _name(cv) +# else +# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) +# endif +#endif + +#ifdef PERL_OBJECT +#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) +#define SWIGCLASS_STATIC + +#else /* PERL_OBJECT */ + +#define MAGIC_PPERL +#define SWIGCLASS_STATIC static SWIGUNUSED + +#ifndef MULTIPLICITY +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#else /* MULTIPLICITY */ + +#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ + +/* Workaround for bug in perl 5.6.x croak and earlier */ +#if (PERL_VERSION < 8) +# ifdef PERL_OBJECT +# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) +static void SWIG_Perl_croak_null(CPerlObj *pPerl) +# else +static void SWIG_croak_null() +# endif +{ + SV *err=ERRSV; +# if (PERL_VERSION < 6) + croak("%_", err); +# else + if (SvOK(err) && !SvROK(err)) croak("%_", err); + croak(Nullch); +# endif +} +#else +# define SWIG_croak_null() croak(Nullch) +#endif + + +/* + Define how strict is the cast between strings and integers/doubles + when overloading between these types occurs. + + The default is making it as strict as possible by using SWIG_AddCast + when needed. + + You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to + disable the SWIG_AddCast, making the casting between string and + numbers less strict. + + In the end, we try to solve the overloading between strings and + numerical types in the more natural way, but if you can avoid it, + well, avoid it using %rename, for example. +*/ +#ifndef SWIG_PERL_NO_STRICT_STR2NUM +# ifndef SWIG_PERL_STRICT_STR2NUM +# define SWIG_PERL_STRICT_STR2NUM +# endif +#endif +#ifdef SWIG_PERL_STRICT_STR2NUM +/* string takes precedence */ +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#else +/* number takes precedence */ +#define SWIG_Str2NumCast(x) x +#endif + + + +#include + +SWIGRUNTIME const char * +SWIG_Perl_TypeProxyName(const swig_type_info *type) { + if (!type) return NULL; + if (type->clientdata != NULL) { + return (const char*) type->clientdata; + } + else { + return type->name; + } +} + +/* Identical to SWIG_TypeCheck, except for strcmp comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || + (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* Function for getting a pointer value */ + +SWIGRUNTIME int +SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { + swig_cast_info *tc; + void *voidptr = (void *)0; + SV *tsv = 0; + + if (own) + *own = 0; + + /* If magical, apply more magic */ + if (SvGMAGICAL(sv)) + mg_get(sv); + + /* Check to see if this is an object */ + if (sv_isobject(sv)) { + IV tmp = 0; + tsv = (SV*) SvRV(sv); + if ((SvTYPE(tsv) == SVt_PVHV)) { + MAGIC *mg; + if (SvMAGICAL(tsv)) { + mg = mg_find(tsv,'P'); + if (mg) { + sv = mg->mg_obj; + if (sv_isobject(sv)) { + tsv = (SV*)SvRV(sv); + tmp = SvIV(tsv); + } + } + } else { + return SWIG_ERROR; + } + } else { + tmp = SvIV(tsv); + } + voidptr = INT2PTR(void *,tmp); + } else if (! SvOK(sv)) { /* Check for undef */ + *(ptr) = (void *) 0; + return SWIG_OK; + } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ + if (!SvROK(sv)) { + /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value. */ + if (SvIOK(sv)) { + return SWIG_ERROR; + } else { + /* NULL pointer (reference to undef). */ + *(ptr) = (void *) 0; + return SWIG_OK; + } + } else { + return SWIG_ERROR; + } + } else { /* Don't know what it is */ + return SWIG_ERROR; + } + if (_t) { + /* Now see if the types match */ + char *_c = HvNAME(SvSTASH(SvRV(sv))); + tc = SWIG_TypeProxyCheck(_c,_t); + if (!tc) { + return SWIG_ERROR; + } + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + } else { + *ptr = voidptr; + } + + /* + * DISOWN implementation: we need a perl guru to check this one. + */ + if (tsv && (flags & SWIG_POINTER_DISOWN)) { + /* + * almost copy paste code from below SWIG_POINTER_OWN setting + */ + SV *obj = sv; + HV *stash = SvSTASH(SvRV(obj)); + GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (isGV(gv)) { + HV *hv = GvHVn(gv); + /* + * To set ownership (see below), a newSViv(1) entry is added. + * Hence, to remove ownership, we delete the entry. + */ + if (hv_exists_ent(hv, obj, 0)) { + hv_delete_ent(hv, obj, 0, 0); + } + } + } + return SWIG_OK; +} + +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); +} + +SWIGRUNTIME void +SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { + if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { + SV *self; + SV *obj=newSV(0); + HV *hash=newHV(); + HV *stash; + sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + stash=SvSTASH(SvRV(obj)); + if (flags & SWIG_POINTER_OWN) { + HV *hv; + GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (!isGV(gv)) + gv_init(gv, stash, "OWNER", 5, FALSE); + hv=GvHVn(gv); + hv_store_ent(hv, obj, newSViv(1), 0); + } + sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); + SvREFCNT_dec(obj); + self=newRV_noinc((SV *)hash); + sv_setsv(sv, self); + SvREFCNT_dec((SV *)self); + sv_bless(sv, stash); + } + else { + sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + } +} + +SWIGRUNTIMEINLINE SV * +SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { + SV *result = sv_newmortal(); + SWIG_MakePtr(result, ptr, t, flags); + return result; +} + +SWIGRUNTIME void +SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,SWIG_Perl_TypeProxyName(type)); + sv_setpv(sv, result); +} + +SWIGRUNTIME SV * +SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { + SV *result = sv_newmortal(); + SWIG_Perl_MakePackedObj(result, ptr, sz, type); + return result; +} + +/* Convert a packed value value */ +SWIGRUNTIME int +SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c = 0; + + if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; + c = SvPV_nolen(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') return SWIG_ERROR; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) return SWIG_ERROR; + } + return SWIG_OK; +} + + +/* Macros for low-level exception handling */ +#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } + + +typedef XSPROTO(SwigPerlWrapper); +typedef SwigPerlWrapper *SwigPerlWrapperPtr; + +/* Structure for command table */ +typedef struct { + const char *name; + SwigPerlWrapperPtr wrapper; +} swig_command_info; + +/* Information for constant table */ + +#define SWIG_INT 1 +#define SWIG_FLOAT 2 +#define SWIG_STRING 3 +#define SWIG_POINTER 4 +#define SWIG_BINARY 5 + +/* Constant information structure */ +typedef struct swig_constant_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_constant_info; + + +/* Structure for variable table */ +typedef struct { + const char *name; + SwigMagicFunc set; + SwigMagicFunc get; + swig_type_info **type; +} swig_variable_info; + +/* Magic variable code */ +#ifndef PERL_OBJECT +#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) + #ifndef MULTIPLICITY + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) + #else + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) + #endif +#else +# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) +SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) +#endif +{ + MAGIC *mg; + sv_magic(sv,sv,'U',(char *) name,strlen(name)); + mg = mg_find(sv,'U'); + mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; + mg->mg_virtual->svt_len = 0; + mg->mg_virtual->svt_clear = 0; + mg->mg_virtual->svt_free = 0; +} + + +SWIGRUNTIME swig_module_info * +SWIG_Perl_GetModule(void) { + static void *type_pointer = (void *)0; + SV *pointer; + + /* first check if pointer already created */ + if (!type_pointer) { + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); + if (pointer && SvOK(pointer)) { + type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); + } + } + + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Perl_SetModule(swig_module_info *module) { + SV *pointer; + + /* create a new pointer */ + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); + sv_setiv(pointer, PTR2IV(module)); +} + +#ifdef __cplusplus +} +#endif + +/* Workaround perl5 global namespace pollution. Note that undefining library + * functions like fopen will not solve the problem on all platforms as fopen + * might be a macro on Windows but not necessarily on other operating systems. */ +#ifdef do_open + #undef do_open +#endif +#ifdef do_close + #undef do_close +#endif +#ifdef do_exec + #undef do_exec +#endif +#ifdef scalar + #undef scalar +#endif +#ifdef list + #undef list +#endif +#ifdef apply + #undef apply +#endif +#ifdef convert + #undef convert +#endif +#ifdef Error + #undef Error +#endif +#ifdef form + #undef form +#endif +#ifdef vform + #undef vform +#endif +#ifdef LABEL + #undef LABEL +#endif +#ifdef METHOD + #undef METHOD +#endif +#ifdef Move + #undef Move +#endif +#ifdef yylex + #undef yylex +#endif +#ifdef yyparse + #undef yyparse +#endif +#ifdef yyerror + #undef yyerror +#endif +#ifdef invert + #undef invert +#endif +#ifdef ref + #undef ref +#endif +#ifdef read + #undef read +#endif +#ifdef write + #undef write +#endif +#ifdef eof + #undef eof +#endif +#ifdef bool + #undef bool +#endif +#ifdef close + #undef close +#endif +#ifdef rewind + #undef rewind +#endif +#ifdef free + #undef free +#endif +#ifdef malloc + #undef malloc +#endif +#ifdef calloc + #undef calloc +#endif +#ifdef Stat + #undef Stat +#endif +#ifdef check + #undef check +#endif +#ifdef seekdir + #undef seekdir +#endif +#ifdef open + #undef open +#endif +#ifdef readdir + #undef readdir +#endif +#ifdef bind + #undef bind +#endif +#ifdef access + #undef access +#endif +#ifdef stat + #undef stat +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t swig_types[0] +#define SWIGTYPE_p_ContextEvent_Headers_Received_Sig_t swig_types[1] +#define SWIGTYPE_p_Fampp__FamppDirMonitorInitFailedException swig_types[2] +#define SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator swig_types[3] +#define SWIGTYPE_p_FerrisLoki__Handlable swig_types[4] +#define SWIGTYPE_p_Ferris__AI__Agent swig_types[5] +#define SWIGTYPE_p_Ferris__AccessDenied swig_types[6] +#define SWIGTYPE_p_Ferris__AgentAlreadyExistsException swig_types[7] +#define SWIGTYPE_p_Ferris__AgentException swig_types[8] +#define SWIGTYPE_p_Ferris__AgentOnlyHandlesOneEmblemException swig_types[9] +#define SWIGTYPE_p_Ferris__Attribute swig_types[10] +#define SWIGTYPE_p_Ferris__AttributeAlreadyInUse swig_types[11] +#define SWIGTYPE_p_Ferris__AttributeCollection swig_types[12] +#define SWIGTYPE_p_Ferris__AttributeNotWritable swig_types[13] +#define SWIGTYPE_p_Ferris__AttributeProxy swig_types[14] +#define SWIGTYPE_p_Ferris__BackupException swig_types[15] +#define SWIGTYPE_p_Ferris__BackupNameWouldBeTooLong swig_types[16] +#define SWIGTYPE_p_Ferris__BadParam swig_types[17] +#define SWIGTYPE_p_Ferris__BadSignature swig_types[18] +#define SWIGTYPE_p_Ferris__BadlyFormedTime swig_types[19] +#define SWIGTYPE_p_Ferris__BadlyFormedTimeString swig_types[20] +#define SWIGTYPE_p_Ferris__BranchFileSystem swig_types[21] +#define SWIGTYPE_p_Ferris__CacheHandlable swig_types[22] +#define SWIGTYPE_p_Ferris__CacheManager swig_types[23] +#define SWIGTYPE_p_Ferris__CanNotAddEmblemException swig_types[24] +#define SWIGTYPE_p_Ferris__CanNotAddExternalAttribute swig_types[25] +#define SWIGTYPE_p_Ferris__CanNotDelete swig_types[26] +#define SWIGTYPE_p_Ferris__CanNotDereferenceDanglingSoftLink swig_types[27] +#define SWIGTYPE_p_Ferris__CanNotGetStream swig_types[28] +#define SWIGTYPE_p_Ferris__CanNotMonitorDirWithFAM swig_types[29] +#define SWIGTYPE_p_Ferris__CanNotReadContext swig_types[30] +#define SWIGTYPE_p_Ferris__CanNotReadContextPcctsParseFailed swig_types[31] +#define SWIGTYPE_p_Ferris__ChildNotRunning swig_types[32] +#define SWIGTYPE_p_Ferris__ColdEmblem swig_types[33] +#define SWIGTYPE_p_Ferris__CompressionAlgoNotFoundException swig_types[34] +#define SWIGTYPE_p_Ferris__CompressionException swig_types[35] +#define SWIGTYPE_p_Ferris__ContentNotModified swig_types[36] +#define SWIGTYPE_p_Ferris__Context swig_types[37] +#define SWIGTYPE_p_Ferris__ContextCollection swig_types[38] +#define SWIGTYPE_p_Ferris__ContextExists swig_types[39] +#define SWIGTYPE_p_Ferris__ContextIterator swig_types[40] +#define SWIGTYPE_p_Ferris__ContextSetCompare swig_types[41] +#define SWIGTYPE_p_Ferris__CopyFailed swig_types[42] +#define SWIGTYPE_p_Ferris__CreateFIFO swig_types[43] +#define SWIGTYPE_p_Ferris__CreateMetaDataContext swig_types[44] +#define SWIGTYPE_p_Ferris__CryptoBase swig_types[45] +#define SWIGTYPE_p_Ferris__CurlEasyInitFailed swig_types[46] +#define SWIGTYPE_p_Ferris__CurlPerformFailed swig_types[47] +#define SWIGTYPE_p_Ferris__CurlStateError swig_types[48] +#define SWIGTYPE_p_Ferris__CurlStaticInitFailed swig_types[49] +#define SWIGTYPE_p_Ferris__CursorException swig_types[50] +#define SWIGTYPE_p_Ferris__DBusConnectionException swig_types[51] +#define SWIGTYPE_p_Ferris__DBusException swig_types[52] +#define SWIGTYPE_p_Ferris__DTDCreationFailed swig_types[53] +#define SWIGTYPE_p_Ferris__DVDReadException swig_types[54] +#define SWIGTYPE_p_Ferris__Db4Exception swig_types[55] +#define SWIGTYPE_p_Ferris__Db4KeyNotFound swig_types[56] +#define SWIGTYPE_p_Ferris__DesktopFileKeyNotFound swig_types[57] +#define SWIGTYPE_p_Ferris__EAIndexException swig_types[58] +#define SWIGTYPE_p_Ferris__EA_Atom swig_types[59] +#define SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute swig_types[60] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadOnly swig_types[61] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream swig_types[62] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite swig_types[63] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t swig_types[64] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents swig_types[65] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached swig_types[66] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_PassedInStream swig_types[67] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t swig_types[68] +#define SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t swig_types[69] +#define SWIGTYPE_p_Ferris__EA_Atom_Static swig_types[70] +#define SWIGTYPE_p_Ferris__Emblem swig_types[71] +#define SWIGTYPE_p_Ferris__EmblemException swig_types[72] +#define SWIGTYPE_p_Ferris__EmblemNotFoundException swig_types[73] +#define SWIGTYPE_p_Ferris__Etagere swig_types[74] +#define SWIGTYPE_p_Ferris__EtagereException swig_types[75] +#define SWIGTYPE_p_Ferris__FCA__ConceptLattice swig_types[76] +#define SWIGTYPE_p_Ferris__FCA__fh_conceptLattice swig_types[77] +#define SWIGTYPE_p_Ferris__FFilterSyntaxError swig_types[78] +#define SWIGTYPE_p_Ferris__FerrisCanNotCreateLeafOfLeaf swig_types[79] +#define SWIGTYPE_p_Ferris__FerrisCanNotGetScriptNameError swig_types[80] +#define SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed swig_types[81] +#define SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported swig_types[82] +#define SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed swig_types[83] +#define SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported swig_types[84] +#define SWIGTYPE_p_Ferris__FerrisCurlServerNameNotFound swig_types[85] +#define SWIGTYPE_p_Ferris__FerrisExceptionBase swig_types[86] +#define SWIGTYPE_p_Ferris__FerrisException_CodeState swig_types[87] +#define SWIGTYPE_p_Ferris__FerrisGIMPImageLoadFailed swig_types[88] +#define SWIGTYPE_p_Ferris__FerrisGLibCException swig_types[89] +#define SWIGTYPE_p_Ferris__FerrisHALException swig_types[90] +#define SWIGTYPE_p_Ferris__FerrisImageLoadFailed swig_types[91] +#define SWIGTYPE_p_Ferris__FerrisImageSaveFailed swig_types[92] +#define SWIGTYPE_p_Ferris__FerrisImlib2ImageLoadFailed swig_types[93] +#define SWIGTYPE_p_Ferris__FerrisInternalError swig_types[94] +#define SWIGTYPE_p_Ferris__FerrisJPEGImageLoadFailed swig_types[95] +#define SWIGTYPE_p_Ferris__FerrisNotReadableAsContext swig_types[96] +#define SWIGTYPE_p_Ferris__FerrisNotSupportedInThisContext swig_types[97] +#define SWIGTYPE_p_Ferris__FerrisOutOfMemory swig_types[98] +#define SWIGTYPE_p_Ferris__FerrisPNGImageLoadFailed swig_types[99] +#define SWIGTYPE_p_Ferris__FerrisParentNotSetError swig_types[100] +#define SWIGTYPE_p_Ferris__FerrisSetCWDException swig_types[101] +#define SWIGTYPE_p_Ferris__FerrisSqlServerNameNotFound swig_types[102] +#define SWIGTYPE_p_Ferris__FerrisStatException swig_types[103] +#define SWIGTYPE_p_Ferris__FerrisStreamException swig_types[104] +#define SWIGTYPE_p_Ferris__FerrisStreamLoadFailed swig_types[105] +#define SWIGTYPE_p_Ferris__FerrisVFSExceptionBase swig_types[106] +#define SWIGTYPE_p_Ferris__FerrisWaitTimedOut swig_types[107] +#define SWIGTYPE_p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t swig_types[108] +#define SWIGTYPE_p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[109] +#define SWIGTYPE_p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t swig_types[110] +#define SWIGTYPE_p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[111] +#define SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t swig_types[112] +#define SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t swig_types[113] +#define SWIGTYPE_p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[114] +#define SWIGTYPE_p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[115] +#define SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t swig_types[116] +#define SWIGTYPE_p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[117] +#define SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t swig_types[118] +#define SWIGTYPE_p_Ferris__FileClipboard swig_types[119] +#define SWIGTYPE_p_Ferris__FullTextIndexException swig_types[120] +#define SWIGTYPE_p_Ferris__FulltextQuerySyntaxError swig_types[121] +#define SWIGTYPE_p_Ferris__GModuleOpenFailed swig_types[122] +#define SWIGTYPE_p_Ferris__GPGMEInitFailed swig_types[123] +#define SWIGTYPE_p_Ferris__GPhoto2 swig_types[124] +#define SWIGTYPE_p_Ferris__GdbmException swig_types[125] +#define SWIGTYPE_p_Ferris__GenericError swig_types[126] +#define SWIGTYPE_p_Ferris__Handlable swig_types[127] +#define SWIGTYPE_p_Ferris__ImplicitIteratorUpdateLock swig_types[128] +#define SWIGTYPE_p_Ferris__IndexException swig_types[129] +#define SWIGTYPE_p_Ferris__InvalidModeString swig_types[130] +#define SWIGTYPE_p_Ferris__InvalidSortSpecification swig_types[131] +#define SWIGTYPE_p_Ferris__KeylistException swig_types[132] +#define SWIGTYPE_p_Ferris__LDAPException swig_types[133] +#define SWIGTYPE_p_Ferris__MalformedURL swig_types[134] +#define SWIGTYPE_p_Ferris__Medallion swig_types[135] +#define SWIGTYPE_p_Ferris__MedallionBelief swig_types[136] +#define SWIGTYPE_p_Ferris__MedallionException swig_types[137] +#define SWIGTYPE_p_Ferris__MutableCollectionEvents swig_types[138] +#define SWIGTYPE_p_Ferris__NoOpenWithContext swig_types[139] +#define SWIGTYPE_p_Ferris__NoSuchAgentException swig_types[140] +#define SWIGTYPE_p_Ferris__NoSuchAttribute swig_types[141] +#define SWIGTYPE_p_Ferris__NoSuchBeliefException swig_types[142] +#define SWIGTYPE_p_Ferris__NoSuchContextClass swig_types[143] +#define SWIGTYPE_p_Ferris__NoSuchGroup swig_types[144] +#define SWIGTYPE_p_Ferris__NoSuchObject swig_types[145] +#define SWIGTYPE_p_Ferris__NoSuchPersonalityException swig_types[146] +#define SWIGTYPE_p_Ferris__NoSuchSubContext swig_types[147] +#define SWIGTYPE_p_Ferris__NoSuchUser swig_types[148] +#define SWIGTYPE_p_Ferris__NotSupported swig_types[149] +#define SWIGTYPE_p_Ferris__ObjectExists swig_types[150] +#define SWIGTYPE_p_Ferris__OpenActionIsNotDefined swig_types[151] +#define SWIGTYPE_p_Ferris__ParseError swig_types[152] +#define SWIGTYPE_p_Ferris__Personality swig_types[153] +#define SWIGTYPE_p_Ferris__PreprocessedSortString swig_types[154] +#define SWIGTYPE_p_Ferris__ProgramSpawn swig_types[155] +#define SWIGTYPE_p_Ferris__QuotaStorageFull swig_types[156] +#define SWIGTYPE_p_Ferris__RegexCollection swig_types[157] +#define SWIGTYPE_p_Ferris__RelativeTimeParsing swig_types[158] +#define SWIGTYPE_p_Ferris__RemoveFailed swig_types[159] +#define SWIGTYPE_p_Ferris__RenameFailed swig_types[160] +#define SWIGTYPE_p_Ferris__RootContextCreationFailed swig_types[161] +#define SWIGTYPE_p_Ferris__RootContextFactory swig_types[162] +#define SWIGTYPE_p_Ferris__Runner swig_types[163] +#define SWIGTYPE_p_Ferris__SQLiteException swig_types[164] +#define SWIGTYPE_p_Ferris__SchemaException swig_types[165] +#define SWIGTYPE_p_Ferris__SchemaNotFoundException swig_types[166] +#define SWIGTYPE_p_Ferris__SocketOptionsException swig_types[167] +#define SWIGTYPE_p_Ferris__StorageFull swig_types[168] +#define SWIGTYPE_p_Ferris__SubContextAlreadyInUse swig_types[169] +#define SWIGTYPE_p_Ferris__SyntaxError swig_types[170] +#define SWIGTYPE_p_Ferris__Time__Benchmark swig_types[171] +#define SWIGTYPE_p_Ferris__Times swig_types[172] +#define SWIGTYPE_p_Ferris__URLDecodeSyntaxError swig_types[173] +#define SWIGTYPE_p_Ferris__UnknownBackupMode swig_types[174] +#define SWIGTYPE_p_Ferris__UnknownConfigLocation swig_types[175] +#define SWIGTYPE_p_Ferris__UnspoortedBlockSize swig_types[176] +#define SWIGTYPE_p_Ferris__Util__SingleShot swig_types[177] +#define SWIGTYPE_p_Ferris__Versioned swig_types[178] +#define SWIGTYPE_p_Ferris__WebPhotoException swig_types[179] +#define SWIGTYPE_p_Ferris__XMLBase swig_types[180] +#define SWIGTYPE_p_Ferris__XMLFatalError swig_types[181] +#define SWIGTYPE_p_Ferris__XMLParseError swig_types[182] +#define SWIGTYPE_p_Ferris__XMPBase swig_types[183] +#define SWIGTYPE_p_Ferris__XMPPacketScanFailed swig_types[184] +#define SWIGTYPE_p_Ferris__dbXMLException swig_types[185] +#define SWIGTYPE_p_Ferris__eetException swig_types[186] +#define SWIGTYPE_p_Ferris__eetKeyNotFound swig_types[187] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_fourk swig_types[188] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_onemeg swig_types[189] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_quartk swig_types[190] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenbytes swig_types[191] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenk swig_types[192] +#define SWIGTYPE_p_Ferris__ferris_basic_streambuf_virtual swig_types[193] +#define SWIGTYPE_p_Ferris__ferris_ios swig_types[194] +#define SWIGTYPE_p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t swig_types[195] +#define SWIGTYPE_p_Ferris__fh_attrcol swig_types[196] +#define SWIGTYPE_p_Ferris__fh_attribute swig_types[197] +#define SWIGTYPE_p_Ferris__fh_cemblem swig_types[198] +#define SWIGTYPE_p_Ferris__fh_context swig_types[199] +#define SWIGTYPE_p_Ferris__fh_emblem swig_types[200] +#define SWIGTYPE_p_Ferris__fh_emblem_less swig_types[201] +#define SWIGTYPE_p_Ferris__fh_etagere swig_types[202] +#define SWIGTYPE_p_Ferris__fh_medallion swig_types[203] +#define SWIGTYPE_p_Ferris__fh_medallionBelief swig_types[204] +#define SWIGTYPE_p_Ferris__fh_runner swig_types[205] +#define SWIGTYPE_p_Ferris__fh_sorter swig_types[206] +#define SWIGTYPE_p_Ferris__getIOStreamCloseUpdateFailed swig_types[207] +#define SWIGTYPE_p_Ferris__getIOStreamCloseUpdatePermissionDenied swig_types[208] +#define SWIGTYPE_p_Ferris__giStreamPosRAII swig_types[209] +#define SWIGTYPE_p_Ferris__tdbException swig_types[210] +#define SWIGTYPE_p_GSpawnFlags swig_types[211] +#define SWIGTYPE_p_GenericCloseSignal_t swig_types[212] +#define SWIGTYPE_p_GetIOStream_Func_t swig_types[213] +#define SWIGTYPE_p_GetIStream_Func_t swig_types[214] +#define SWIGTYPE_p_GetIStream_PassedInStream_Func_t swig_types[215] +#define SWIGTYPE_p_IOStreamClosed_Func_t swig_types[216] +#define SWIGTYPE_p_Loki__AllowConversion swig_types[217] +#define SWIGTYPE_p_Loki__AssocVectorT_void_p_sigc__connection_t swig_types[218] +#define SWIGTYPE_p_Loki__AssocVectorT_void_p_void_p_t swig_types[219] +#define SWIGTYPE_p_Loki__DisallowConversion swig_types[220] +#define SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t swig_types[221] +#define SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t swig_types[222] +#define SWIGTYPE_p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t swig_types[223] +#define SWIGTYPE_p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t swig_types[224] +#define SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t swig_types[225] +#define SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t swig_types[226] +#define SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t swig_types[227] +#define SWIGTYPE_p_Loki__NullPointerException swig_types[228] +#define SWIGTYPE_p_Loki__Private__RefLinkedBase swig_types[229] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[230] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[231] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[232] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[233] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[234] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[235] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[236] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[237] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[238] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[239] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[240] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[241] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[242] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[243] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[244] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[245] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[246] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[247] +#define SWIGTYPE_p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t swig_types[248] +#define SWIGTYPE_p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t swig_types[249] +#define SWIGTYPE_p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t swig_types[250] +#define SWIGTYPE_p_NamingEvent_Changed swig_types[251] +#define SWIGTYPE_p_NamingEvent_Changed_Sig_t swig_types[252] +#define SWIGTYPE_p_NamingEvent_Created swig_types[253] +#define SWIGTYPE_p_NamingEvent_Created_Sig_t swig_types[254] +#define SWIGTYPE_p_NamingEvent_Deleted swig_types[255] +#define SWIGTYPE_p_NamingEvent_Deleted_Sig_t swig_types[256] +#define SWIGTYPE_p_NamingEvent_Exists swig_types[257] +#define SWIGTYPE_p_NamingEvent_Exists_Sig_t swig_types[258] +#define SWIGTYPE_p_NamingEvent_MedallionUpdated_Sig_t swig_types[259] +#define SWIGTYPE_p_NamingEvent_Moved swig_types[260] +#define SWIGTYPE_p_NamingEvent_Moved_Sig_t swig_types[261] +#define SWIGTYPE_p_NamingEvent_Start_Execute swig_types[262] +#define SWIGTYPE_p_NamingEvent_Start_Execute_Sig_t swig_types[263] +#define SWIGTYPE_p_NamingEvent_Start_Reading_Context swig_types[264] +#define SWIGTYPE_p_NamingEvent_Start_Reading_Context_Sig_t swig_types[265] +#define SWIGTYPE_p_NamingEvent_Stop_Execute swig_types[266] +#define SWIGTYPE_p_NamingEvent_Stop_Execute_Sig_t swig_types[267] +#define SWIGTYPE_p_NamingEvent_Stop_Reading_Context swig_types[268] +#define SWIGTYPE_p_NamingEvent_Stop_Reading_Context_Sig_t swig_types[269] +#define SWIGTYPE_p_OnlyInCacheSignal_t swig_types[270] +#define SWIGTYPE_p_PostfixTrimmerOps swig_types[271] +#define SWIGTYPE_p_PrefixTrimmerOps swig_types[272] +#define SWIGTYPE_p_RWBase_t swig_types[273] +#define SWIGTYPE_p_Runner_AsyncIOFunctor_t swig_types[274] +#define SWIGTYPE_p_SubContextNames_t swig_types[275] +#define SWIGTYPE_p_TrimmerBase swig_types[276] +#define SWIGTYPE_p_TrimmerT_PostfixTrimmerOps_t swig_types[277] +#define SWIGTYPE_p_TrimmerT_PrefixTrimmerOps_t swig_types[278] +#define SWIGTYPE_p_Version_t swig_types[279] +#define SWIGTYPE_p_XSDBasic_t swig_types[280] +#define SWIGTYPE_p__Base swig_types[281] +#define SWIGTYPE_p__Self swig_types[282] +#define SWIGTYPE_p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t swig_types[283] +#define SWIGTYPE_p_char swig_types[284] +#define SWIGTYPE_p_difference_type swig_types[285] +#define SWIGTYPE_p_fh_insideResolve swig_types[286] +#define SWIGTYPE_p_fh_ostream swig_types[287] +#define SWIGTYPE_p_freelist_t swig_types[288] +#define SWIGTYPE_p_gboolean swig_types[289] +#define SWIGTYPE_p_gint swig_types[290] +#define SWIGTYPE_p_guint32 swig_types[291] +#define SWIGTYPE_p_guint64 swig_types[292] +#define SWIGTYPE_p_iterator_category swig_types[293] +#define SWIGTYPE_p_openmode swig_types[294] +#define SWIGTYPE_p_p_char swig_types[295] +#define SWIGTYPE_p_p_std__istringstream swig_types[296] +#define SWIGTYPE_p_p_std__ostringstream swig_types[297] +#define SWIGTYPE_p_p_std__stringstream swig_types[298] +#define SWIGTYPE_p_pid_t swig_types[299] +#define SWIGTYPE_p_pointer swig_types[300] +#define SWIGTYPE_p_poptContext swig_types[301] +#define SWIGTYPE_p_poptOption swig_types[302] +#define SWIGTYPE_p_ref_count_t swig_types[303] +#define SWIGTYPE_p_reference swig_types[304] +#define SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t swig_types[305] +#define SWIGTYPE_p_sigc__signal1T_void_Ferris__CacheHandlable_p_t swig_types[306] +#define SWIGTYPE_p_sigc__signal1T_void_Ferris__fh_context_t swig_types[307] +#define SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t swig_types[308] +#define SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t swig_types[309] +#define SWIGTYPE_p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t swig_types[310] +#define SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t swig_types[311] +#define SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t swig_types[312] +#define SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t swig_types[313] +#define SWIGTYPE_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t swig_types[314] +#define SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t swig_types[315] +#define SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t swig_types[316] +#define SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t swig_types[317] +#define SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t swig_types[318] +#define SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t swig_types[319] +#define SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t swig_types[320] +#define SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t swig_types[321] +#define SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t swig_types[322] +#define SWIGTYPE_p_sigc__trackable swig_types[323] +#define SWIGTYPE_p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t swig_types[324] +#define SWIGTYPE_p_std__basic_streambufT_char_std__char_traitsT_char_t_t swig_types[325] +#define SWIGTYPE_p_std__exception swig_types[326] +#define SWIGTYPE_p_std__ios__openmode swig_types[327] +#define SWIGTYPE_p_std__iostream swig_types[328] +#define SWIGTYPE_p_std__istream swig_types[329] +#define SWIGTYPE_p_std__istringstream swig_types[330] +#define SWIGTYPE_p_std__listT_Ferris__fh_context_t swig_types[331] +#define SWIGTYPE_p_std__listT_Ferris__fh_emblem_t swig_types[332] +#define SWIGTYPE_p_std__listT_Ferris__fh_sorter_t swig_types[333] +#define SWIGTYPE_p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t swig_types[334] +#define SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t swig_types[335] +#define SWIGTYPE_p_std__listT_std__pairT_std__string_std__string_t_t swig_types[336] +#define SWIGTYPE_p_std__listT_std__string_t swig_types[337] +#define SWIGTYPE_p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t swig_types[338] +#define SWIGTYPE_p_std__mapT_int_int_t swig_types[339] +#define SWIGTYPE_p_std__mapT_std__string_std__string_t swig_types[340] +#define SWIGTYPE_p_std__ostringstream swig_types[341] +#define SWIGTYPE_p_std__out_of_range swig_types[342] +#define SWIGTYPE_p_std__pairT_std__string_std__string_t swig_types[343] +#define SWIGTYPE_p_std__reverse_iteratorT_Ferris__ContextIterator_t swig_types[344] +#define SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t swig_types[345] +#define SWIGTYPE_p_std__setT_guint32_t swig_types[346] +#define SWIGTYPE_p_std__setT_std__string_t swig_types[347] +#define SWIGTYPE_p_std__streampos swig_types[348] +#define SWIGTYPE_p_std__streamsize swig_types[349] +#define SWIGTYPE_p_std__string swig_types[350] +#define SWIGTYPE_p_std__stringstream swig_types[351] +#define SWIGTYPE_p_std__vectorT_int_t swig_types[352] +#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[353] +#define SWIGTYPE_p_std__wstring swig_types[354] +#define SWIGTYPE_p_time_t swig_types[355] +#define SWIGTYPE_p_tm swig_types[356] +#define SWIGTYPE_p_uint32_t swig_types[357] +#define SWIGTYPE_p_value_type swig_types[358] +#define SWIGTYPE_p_void swig_types[359] +static swig_type_info *swig_types[361]; +static swig_module_info swig_module = {swig_types, 360, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#define SWIG_init boot_libferrisperl + +#define SWIG_name "libferrisperlc::boot_libferrisperl" +#define SWIG_prefix "libferrisperlc::" + +#define SWIGVERSION 0x020004 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include + + +#ifdef __cplusplus +extern "C" +#endif +#ifndef PERL_OBJECT +#ifndef MULTIPLICITY +SWIGEXPORT void SWIG_init (CV* cv); +#else +SWIGEXPORT void SWIG_init (pTHXo_ CV* cv); +#endif +#else +SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); +#endif + + +SWIGINTERNINLINE SV * +SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) +{ + SV *obj = sv_newmortal(); + if (value) { + sv_setsv(obj, &PL_sv_yes); + } else { + sv_setsv(obj, &PL_sv_no); + } + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + SV *obj = sv_newmortal(); + if (carray) { + sv_setpvn(obj, carray, size); + } else { + sv_setsv(obj, &PL_sv_undef); + } + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + + + +static void xs_init _((pTHX)); +static PerlInterpreter *my_perl; + +int perl_eval(char *string) { + char *argv[2]; + argv[0] = string; + argv[1] = (char *) 0; + return perl_call_argv("eval",0,argv); +} + +int +main(int argc, char **argv, char **env) +{ + int exitstatus; + + my_perl = perl_alloc(); + if (!my_perl) + exit(1); + perl_construct( my_perl ); + + exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL ); + if (exitstatus) + exit( exitstatus ); + + /* Initialize all of the module variables */ + + exitstatus = perl_run( my_perl ); + + perl_destruct( my_perl ); + perl_free( my_perl ); + + exit( exitstatus ); +} + +/* Register any extra external extensions */ + +/* Do not delete this line--writemain depends on it */ +/* EXTERN_C void boot_DynaLoader _((CV* cv)); */ + +static void +xs_init(pTHX) +{ +/* dXSUB_SYS; */ + char *file = __FILE__; + { + /* newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); */ + newXS(SWIG_name, SWIG_init, file); +#ifdef SWIGMODINIT + SWIGMODINIT +#endif + } +} + + + +#include +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef Copy +#undef Copy +#endif +#include +#include +#include +#include +#include +#include + + using namespace Ferris; + + + +#include + + +#include + +double SwigSvToNumber(SV* sv) { + return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv); +} +std::string SwigSvToString(SV* sv) { + STRLEN len; + char *ptr = SvPV(sv, len); + return std::string(ptr, len); +} +void SwigSvFromString(SV* sv, const std::string& s) { + sv_setpvn(sv,s.data(),s.size()); +} + + +#include + + +#include +#include +#include + + +#include +#include +#include + + +#include + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) +{ + if (SvNIOK(obj)) { + if (val) *val = SvNV(obj); + return SWIG_OK; + } else if (SvIOK(obj)) { + if (val) *val = (double) SvIV(obj); + return SWIG_AddCast(SWIG_OK); + } else { + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + double v; + errno = 0; + v = strtod(nptr, &endptr); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); + } + } + } + } + return SWIG_TypeError; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) +{ + if (SvUOK(obj)) { + if (val) *val = SvUV(obj); + return SWIG_OK; + } else if (SvIOK(obj)) { + long v = SvIV(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else { + int dispatch = 0; + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + unsigned long v; + errno = 0; + v = strtoul(nptr, &endptr,0); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); + } + } + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + + +SWIGINTERN int +SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) +{ + if (SvIOK(obj)) { + if (val) *val = SvIV(obj); + return SWIG_OK; + } else { + int dispatch = 0; + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + long v; + errno = 0; + v = strtol(nptr, &endptr,0); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); + } + } + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) +{ + SV *obj = sv_newmortal(); + sv_setuv(obj, (UV) value); + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) +{ + return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); +} + +SWIGINTERN int std_vector_Sl_int_Sg__pop(std::vector< int > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty vector"); + int x = self->back(); + self->pop_back(); + return x; + } + +SWIGINTERNINLINE SV * +SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) +{ + SV *obj = sv_newmortal(); + sv_setiv(obj, (IV) value); + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) +{ + return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); +} + +SWIGINTERN int std_vector_Sl_int_Sg__get(std::vector< int > *self,int i){ + int size = int(self->size()); + if (i>=0 && i *self,int i,int x){ + int size = int(self->size()); + if (i>=0 && i(memcpy((new char[size]), cstr, sizeof(char)*(size))); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + char* vptr = 0; + if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = vptr; + if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string SWIG_PERL_DECL_ARGS_2(SV * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + +SWIGINTERN std::string std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty vector"); + std::string x = self->back(); + self->pop_back(); + return x; + } + +SWIGINTERNINLINE SV * +SWIG_From_std_string SWIG_PERL_DECL_ARGS_1(const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + +SWIGINTERN std::string std_vector_Sl_std_string_Sg__get(std::vector< std::string > *self,int i){ + int size = int(self->size()); + if (i>=0 && i *self,int i,std::string x){ + int size = int(self->size()); + if (i>=0 && i(v); + return res; +} + + + + + +#include +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# ifndef snprintf +# define snprintf _snprintf +# endif +#endif + + +SWIGINTERNINLINE SV * +SWIG_From_long_SS_long SWIG_PERL_DECL_ARGS_1(long long value) +{ + if (((long long) LONG_MIN <= value) && (value <= (long long) LONG_MAX)) { + return SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(value)); + } else { + char temp[256]; + SV *obj = sv_newmortal(); + sprintf(temp, "%lld", value); + sv_setpv(obj, temp); + return obj; + } +} + + +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long long value) +{ + if (value < (unsigned long long) LONG_MAX) { + return SWIG_From_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< long long >(value)); + } else { + char temp[256]; + SV *obj = sv_newmortal(); + sprintf(temp, "%llu", value); + sv_setpv(obj, temp); + return obj; + } +} + + +#include +#ifdef _MSC_VER +# ifndef strtoull +# define strtoull _strtoui64 +# endif +# ifndef strtoll +# define strtoll _strtoi64 +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val) +{ + if (SvUOK(obj)) { + if (val) *val = SvUV(obj); + return SWIG_OK; + } else if (SvIOK(obj)) { + long v = SvIV(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else { + int dispatch = 0; + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + unsigned long long v; + errno = 0; + v = strtoull(nptr, &endptr,0); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); + } + } + } + if (!dispatch) { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return res; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val) +{ + if (obj == &PL_sv_yes) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == &PL_sv_no) { + if (val) *val = false; + return SWIG_OK; + } else { + if (val) *val = SvTRUE(obj) ? true: false; + return SWIG_AddCast(SWIG_OK); + } + return SWIG_TypeError; +} + + +SWIGINTERNINLINE SV * +SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value) +{ + SV *obj = sv_newmortal(); + sv_setnv(obj, value); + return obj; +} + + +SWIGINTERN int +SWIG_AsCharArray(SV * obj, char *val, size_t size) +{ + char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; + int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); + if (SWIG_IsOK(res)) { + if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; + if (csize <= size) { + if (val) { + if (csize) memcpy(val, cptr, csize*sizeof(char)); + if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + } + if (alloc == SWIG_NEWOBJ) { + delete[] cptr; + res = SWIG_DelNewMask(res); + } + return res; + } + if (alloc == SWIG_NEWOBJ) delete[] cptr; + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_char SWIG_PERL_DECL_ARGS_2(SV * obj, char *val) +{ + int res = SWIG_AsCharArray(obj, val, 1); + if (!SWIG_IsOK(res)) { + long v; + res = SWIG_AddCast(SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v)); + if (SWIG_IsOK(res)) { + if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { + if (val) *val = static_cast< char >(v); + } else { + res = SWIG_OverflowError; + } + } + } + return res; +} + + +SWIGINTERNINLINE SV * +SWIG_From_float SWIG_PERL_DECL_ARGS_1(float value) +{ + return SWIG_From_double SWIG_PERL_CALL_ARGS_1(value); +} + + +SWIGINTERNINLINE SV * +SWIG_From_size_t SWIG_PERL_DECL_ARGS_1(size_t value) +{ + return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(value)); +} + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef PERL_OBJECT +#define MAGIC_CLASS _wrap_libferrisperl_var:: +class _wrap_libferrisperl_var : public CPerlObj { +public: +#else +#define MAGIC_CLASS +#endif +SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + croak("Value is read-only."); + return 0; +} +SWIGCLASS_STATIC int _wrap_NullTM_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setiv(SvRV(sv), PTR2IV(&Ferris::Time::NullTM)); + return 1; +} + + +SWIGCLASS_STATIC int _wrap_SCHEMA_DEFAULT_DISPLAY_WIDTH_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::SCHEMA_DEFAULT_DISPLAY_WIDTH))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_SCHEMA_DEFAULT_DISPLAY_PRECISION_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::SCHEMA_DEFAULT_DISPLAY_PRECISION))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_SCHEMA_JUSTIFICATION_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::SCHEMA_JUSTIFICATION))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_SCHEMA_DEFAULTSORT_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::SCHEMA_DEFAULTSORT))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_cursor_object_always_remake_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::Config::cursor_object_always_remake))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_cursor_object_list_size_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setsv(sv,SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(Ferris::Config::cursor_object_list_size))) ; + return 1; +} + + +SWIGCLASS_STATIC int _wrap_MAX_REF_COUNT_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + sv_setiv(SvRV(sv), PTR2IV(&Ferris::ImplementationDetail::MAX_REF_COUNT)); + return 1; +} + + + + +#ifdef PERL_OBJECT +}; +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif +XS(_wrap_new_RefLinkedBase__SWIG_0) { + { + int argvi = 0; + Loki::Private::RefLinkedBase *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_RefLinkedBase();"); + } + result = (Loki::Private::RefLinkedBase *)new Loki::Private::RefLinkedBase(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__Private__RefLinkedBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RefLinkedBase__SWIG_1) { + { + Loki::Private::RefLinkedBase *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Loki::Private::RefLinkedBase *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_RefLinkedBase(rhs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Loki__Private__RefLinkedBase, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RefLinkedBase" "', argument " "1"" of type '" "Loki::Private::RefLinkedBase const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RefLinkedBase" "', argument " "1"" of type '" "Loki::Private::RefLinkedBase const &""'"); + } + arg1 = reinterpret_cast< Loki::Private::RefLinkedBase * >(argp1); + result = (Loki::Private::RefLinkedBase *)new Loki::Private::RefLinkedBase((Loki::Private::RefLinkedBase const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__Private__RefLinkedBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RefLinkedBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Loki__Private__RefLinkedBase, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RefLinkedBase__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RefLinkedBase__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'new_RefLinkedBase'"); + XSRETURN(0); +} + + +XS(_wrap_RefLinkedBase_Release) { + { + Loki::Private::RefLinkedBase *arg1 = (Loki::Private::RefLinkedBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: RefLinkedBase_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__Private__RefLinkedBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefLinkedBase_Release" "', argument " "1"" of type '" "Loki::Private::RefLinkedBase *""'"); + } + arg1 = reinterpret_cast< Loki::Private::RefLinkedBase * >(argp1); + result = (bool)(arg1)->Release(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_RefLinkedBase_Swap) { + { + Loki::Private::RefLinkedBase *arg1 = (Loki::Private::RefLinkedBase *) 0 ; + Loki::Private::RefLinkedBase *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: RefLinkedBase_Swap(self,rhs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__Private__RefLinkedBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefLinkedBase_Swap" "', argument " "1"" of type '" "Loki::Private::RefLinkedBase *""'"); + } + arg1 = reinterpret_cast< Loki::Private::RefLinkedBase * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__Private__RefLinkedBase, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RefLinkedBase_Swap" "', argument " "2"" of type '" "Loki::Private::RefLinkedBase &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RefLinkedBase_Swap" "', argument " "2"" of type '" "Loki::Private::RefLinkedBase &""'"); + } + arg2 = reinterpret_cast< Loki::Private::RefLinkedBase * >(argp2); + (arg1)->Swap(*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_RefLinkedBase) { + { + Loki::Private::RefLinkedBase *arg1 = (Loki::Private::RefLinkedBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_RefLinkedBase(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__Private__RefLinkedBase, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RefLinkedBase" "', argument " "1"" of type '" "Loki::Private::RefLinkedBase *""'"); + } + arg1 = reinterpret_cast< Loki::Private::RefLinkedBase * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AllowConversion_Swap) { + { + Loki::AllowConversion *arg1 = (Loki::AllowConversion *) 0 ; + Loki::AllowConversion *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AllowConversion_Swap(self,Loki::AllowConversion &);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__AllowConversion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AllowConversion_Swap" "', argument " "1"" of type '" "Loki::AllowConversion *""'"); + } + arg1 = reinterpret_cast< Loki::AllowConversion * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__AllowConversion, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AllowConversion_Swap" "', argument " "2"" of type '" "Loki::AllowConversion &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AllowConversion_Swap" "', argument " "2"" of type '" "Loki::AllowConversion &""'"); + } + arg2 = reinterpret_cast< Loki::AllowConversion * >(argp2); + (arg1)->Swap(*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AllowConversion) { + { + int argvi = 0; + Loki::AllowConversion *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_AllowConversion();"); + } + result = (Loki::AllowConversion *)new Loki::AllowConversion(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__AllowConversion, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_AllowConversion) { + { + Loki::AllowConversion *arg1 = (Loki::AllowConversion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_AllowConversion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__AllowConversion, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AllowConversion" "', argument " "1"" of type '" "Loki::AllowConversion *""'"); + } + arg1 = reinterpret_cast< Loki::AllowConversion * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DisallowConversion__SWIG_0) { + { + int argvi = 0; + Loki::DisallowConversion *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_DisallowConversion();"); + } + result = (Loki::DisallowConversion *)new Loki::DisallowConversion(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__DisallowConversion, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DisallowConversion__SWIG_1) { + { + Loki::AllowConversion *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Loki::DisallowConversion *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_DisallowConversion(Loki::AllowConversion const &);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Loki__AllowConversion, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DisallowConversion" "', argument " "1"" of type '" "Loki::AllowConversion const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DisallowConversion" "', argument " "1"" of type '" "Loki::AllowConversion const &""'"); + } + arg1 = reinterpret_cast< Loki::AllowConversion * >(argp1); + result = (Loki::DisallowConversion *)new Loki::DisallowConversion((Loki::AllowConversion const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__DisallowConversion, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DisallowConversion) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Loki__AllowConversion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DisallowConversion__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DisallowConversion__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'new_DisallowConversion'"); + XSRETURN(0); +} + + +XS(_wrap_DisallowConversion_Swap) { + { + Loki::DisallowConversion *arg1 = (Loki::DisallowConversion *) 0 ; + Loki::DisallowConversion *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: DisallowConversion_Swap(self,Loki::DisallowConversion &);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__DisallowConversion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DisallowConversion_Swap" "', argument " "1"" of type '" "Loki::DisallowConversion *""'"); + } + arg1 = reinterpret_cast< Loki::DisallowConversion * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__DisallowConversion, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DisallowConversion_Swap" "', argument " "2"" of type '" "Loki::DisallowConversion &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DisallowConversion_Swap" "', argument " "2"" of type '" "Loki::DisallowConversion &""'"); + } + arg2 = reinterpret_cast< Loki::DisallowConversion * >(argp2); + (arg1)->Swap(*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_DisallowConversion) { + { + Loki::DisallowConversion *arg1 = (Loki::DisallowConversion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_DisallowConversion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__DisallowConversion, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DisallowConversion" "', argument " "1"" of type '" "Loki::DisallowConversion *""'"); + } + arg1 = reinterpret_cast< Loki::DisallowConversion * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NullPointerException) { + { + int argvi = 0; + Loki::NullPointerException *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_NullPointerException();"); + } + result = (Loki::NullPointerException *)new Loki::NullPointerException(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Loki__NullPointerException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_NullPointerException_what) { + { + Loki::NullPointerException *arg1 = (Loki::NullPointerException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + char *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: NullPointerException_what(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__NullPointerException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NullPointerException_what" "', argument " "1"" of type '" "Loki::NullPointerException const *""'"); + } + arg1 = reinterpret_cast< Loki::NullPointerException * >(argp1); + result = (char *)((Loki::NullPointerException const *)arg1)->what(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_NullPointerException) { + { + Loki::NullPointerException *arg1 = (Loki::NullPointerException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_NullPointerException(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Loki__NullPointerException, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NullPointerException" "', argument " "1"" of type '" "Loki::NullPointerException *""'"); + } + arg1 = reinterpret_cast< Loki::NullPointerException * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IntVector__SWIG_0) { + { + unsigned int arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::vector< int > *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_IntVector(size);"); + } + ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IntVector__SWIG_1) { + { + int argvi = 0; + std::vector< int > *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_IntVector();"); + } + result = (std::vector< int > *)new std::vector< int >(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IntVector__SWIG_2) { + { + unsigned int arg1 ; + int arg2 ; + unsigned int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::vector< int > *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_IntVector(size,value);"); + } + ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (std::vector< int > *)new std::vector< int >(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IntVector__SWIG_3) { + { + std::vector< int > *arg1 = 0 ; + std::vector< int > temp1 ; + std::vector< int > *v1 ; + int argvi = 0; + std::vector< int > *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_IntVector(std::vector< int > const &);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_int_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of new_IntVector. " + "Expected an array of ""int"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i *)new std::vector< int >((std::vector< int > const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IntVector) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + { + /* wrapped vector? */ + std::vector* v; + if (SWIG_ConvertPtr(ST(0),(void **) &v, + SWIGTYPE_p_std__vectorT_int_t,0) != -1) { + _v = 1; + } else if (SvROK(ST(0))) { + /* native sequence? */ + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) == SVt_PVAV) { + I32 len = av_len(av) + 1; + if (len == 0) { + /* an empty sequence can be of any type */ + _v = 1; + } else { + /* check the first element only */ + SV **tv = av_fetch(av, 0, 0); + if (SvIOK(*tv)) + _v = 1; + else + _v = 0; + } + } + } else { + _v = 0; + } + } + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IntVector__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IntVector__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IntVector__SWIG_3); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IntVector__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'new_IntVector'"); + XSRETURN(0); +} + + +XS(_wrap_IntVector_size) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > temp1 ; + std::vector< int > *v1 ; + int argvi = 0; + unsigned int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: IntVector_size(self);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_int_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of IntVector_size. " + "Expected an array of ""int"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i const *)arg1)->size(); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_empty) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > temp1 ; + std::vector< int > *v1 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: IntVector_empty(self);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_int_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of IntVector_empty. " + "Expected an array of ""int"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i const *)arg1)->empty(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_clear) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: IntVector_clear(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->clear(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_push) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: IntVector_push(self,x);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + (arg1)->push_back(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_pop) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: IntVector_pop(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + try { + result = (int)std_vector_Sl_int_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_get) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: IntVector_get(self,i);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_get" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + try { + result = (int)std_vector_Sl_int_Sg__get(arg1,arg2); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_IntVector_set) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: IntVector_set(self,i,x);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_set" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_set" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + try { + std_vector_Sl_int_Sg__set(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_IntVector) { + { + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_IntVector(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StringVector__SWIG_0) { + { + unsigned int arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::vector< std::string > *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_StringVector(size);"); + } + ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + result = (std::vector< std::string > *)new std::vector< std::string >(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StringVector__SWIG_1) { + { + int argvi = 0; + std::vector< std::string > *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_StringVector();"); + } + result = (std::vector< std::string > *)new std::vector< std::string >(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StringVector__SWIG_2) { + { + unsigned int arg1 ; + std::string arg2 ; + unsigned int val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::vector< std::string > *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_StringVector(size,value);"); + } + ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVector" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StringVector" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (std::vector< std::string > *)new std::vector< std::string >(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StringVector__SWIG_3) { + { + std::vector< std::string > *arg1 = 0 ; + std::vector< std::string > temp1 ; + std::vector< std::string > *v1 ; + int argvi = 0; + std::vector< std::string > *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_StringVector(std::vector< std::string > const &);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of new_StringVector. " + "Expected an array of ""std::string"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i *)new std::vector< std::string >((std::vector< std::string > const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StringVector) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + { + /* wrapped vector? */ + std::vector* v; + if (SWIG_ConvertPtr(ST(0),(void **) &v, + SWIGTYPE_p_std__vectorT_std__string_t,0) != -1) { + _v = 1; + } else if (SvROK(ST(0))) { + /* native sequence? */ + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) == SVt_PVAV) { + I32 len = av_len(av) + 1; + if (len == 0) { + /* an empty sequence can be of any type */ + _v = 1; + } else { + /* check the first element only */ + SV **tv = av_fetch(av, 0, 0); + if (SvPOK(*tv)) + _v = 1; + else + _v = 0; + } + } + } else { + _v = 0; + } + } + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringVector__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringVector__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringVector__SWIG_3); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringVector__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'new_StringVector'"); + XSRETURN(0); +} + + +XS(_wrap_StringVector_size) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string > temp1 ; + std::vector< std::string > *v1 ; + int argvi = 0; + unsigned int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: StringVector_size(self);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of StringVector_size. " + "Expected an array of ""std::string"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i const *)arg1)->size(); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_empty) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::vector< std::string > temp1 ; + std::vector< std::string > *v1 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: StringVector_empty(self);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of StringVector_empty. " + "Expected an array of ""std::string"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i const *)arg1)->empty(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_clear) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: StringVector_clear(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_clear" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + (arg1)->clear(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_push) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: StringVector_push(self,x);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_push" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringVector_push" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + (arg1)->push_back(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_pop) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: StringVector_pop(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_pop" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + try { + result = std_vector_Sl_std_string_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_get) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: StringVector_get(self,i);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_get" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_get" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + try { + result = std_vector_Sl_std_string_Sg__get(arg1,arg2); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_StringVector_set) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + int arg2 ; + std::string arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: StringVector_set(self,i,x);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVector_set" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVector_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StringVector_set" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + try { + std_vector_Sl_std_string_Sg__set(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_StringVector) { + { + std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_StringVector(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringVector" "', argument " "1"" of type '" "std::vector< std::string > *""'"); + } + arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Handlable_private_AboutToBeDeleted) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Handlable_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Handlable_private_AboutToBeDeleted" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + (arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Handlable) { + { + int argvi = 0; + FerrisLoki::Handlable *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Handlable();"); + } + result = (FerrisLoki::Handlable *)new FerrisLoki::Handlable(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FerrisLoki__Handlable, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_Handlable) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Handlable(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Handlable" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Handlable_AddRef) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Handlable_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Handlable_AddRef" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + result = (arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Handlable_Release) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Handlable_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Handlable_Release" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + result = (arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Handlable_getReferenceCount) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Handlable_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Handlable_getReferenceCount" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + result = (arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Handlable_getGenericCloseSig) { + { + FerrisLoki::Handlable *arg1 = (FerrisLoki::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Handlable_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Handlable_getGenericCloseSig" "', argument " "1"" of type '" "FerrisLoki::Handlable *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::Handlable * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSmallObjAllocator__SWIG_0) { + { + std::size_t arg1 ; + std::size_t arg2 ; + std::size_t arg3 ; + size_t val1 ; + int ecode1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int argvi = 0; + FerrisLoki::FerrisSmallObjAllocator *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisSmallObjAllocator(maxObjectSize,pageSize,objectAlignSize);"); + } + ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FerrisSmallObjAllocator" "', argument " "1"" of type '" "std::size_t""'"); + } + arg1 = static_cast< std::size_t >(val1); + ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FerrisSmallObjAllocator" "', argument " "2"" of type '" "std::size_t""'"); + } + arg2 = static_cast< std::size_t >(val2); + ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FerrisSmallObjAllocator" "', argument " "3"" of type '" "std::size_t""'"); + } + arg3 = static_cast< std::size_t >(val3); + result = (FerrisLoki::FerrisSmallObjAllocator *)new FerrisLoki::FerrisSmallObjAllocator(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSmallObjAllocator__SWIG_1) { + { + std::size_t arg1 ; + std::size_t arg2 ; + size_t val1 ; + int ecode1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int argvi = 0; + FerrisLoki::FerrisSmallObjAllocator *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_FerrisSmallObjAllocator(maxObjectSize,pageSize);"); + } + ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FerrisSmallObjAllocator" "', argument " "1"" of type '" "std::size_t""'"); + } + arg1 = static_cast< std::size_t >(val1); + ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FerrisSmallObjAllocator" "', argument " "2"" of type '" "std::size_t""'"); + } + arg2 = static_cast< std::size_t >(val2); + result = (FerrisLoki::FerrisSmallObjAllocator *)new FerrisLoki::FerrisSmallObjAllocator(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSmallObjAllocator__SWIG_2) { + { + std::size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + int argvi = 0; + FerrisLoki::FerrisSmallObjAllocator *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_FerrisSmallObjAllocator(maxObjectSize);"); + } + ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FerrisSmallObjAllocator" "', argument " "1"" of type '" "std::size_t""'"); + } + arg1 = static_cast< std::size_t >(val1); + result = (FerrisLoki::FerrisSmallObjAllocator *)new FerrisLoki::FerrisSmallObjAllocator(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSmallObjAllocator) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSmallObjAllocator__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSmallObjAllocator__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSmallObjAllocator__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisSmallObjAllocator'"); + XSRETURN(0); +} + + +XS(_wrap_FerrisSmallObjAllocator_Allocate) { + { + FerrisLoki::FerrisSmallObjAllocator *arg1 = (FerrisLoki::FerrisSmallObjAllocator *) 0 ; + std::size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int argvi = 0; + void *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: FerrisSmallObjAllocator_Allocate(self,size);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisSmallObjAllocator_Allocate" "', argument " "1"" of type '" "FerrisLoki::FerrisSmallObjAllocator *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::FerrisSmallObjAllocator * >(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FerrisSmallObjAllocator_Allocate" "', argument " "2"" of type '" "std::size_t""'"); + } + arg2 = static_cast< std::size_t >(val2); + result = (void *)(arg1)->Allocate(arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_FerrisSmallObjAllocator) { + { + FerrisLoki::FerrisSmallObjAllocator *arg1 = (FerrisLoki::FerrisSmallObjAllocator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FerrisSmallObjAllocator(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FerrisSmallObjAllocator" "', argument " "1"" of type '" "FerrisLoki::FerrisSmallObjAllocator *""'"); + } + arg1 = reinterpret_cast< FerrisLoki::FerrisSmallObjAllocator * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisException_CodeState) { + { + std::string *arg1 = 0 ; + int arg2 ; + std::string *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisException_CodeState *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisException_CodeState(fi,li,fu);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisException_CodeState" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisException_CodeState" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FerrisException_CodeState" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisException_CodeState" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisException_CodeState" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisException_CodeState *)new Ferris::FerrisException_CodeState((std::string const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisException_CodeState, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisException_CodeState_getFileName) { + { + Ferris::FerrisException_CodeState *arg1 = (Ferris::FerrisException_CodeState *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisException_CodeState_getFileName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisException_CodeState_getFileName" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + result = (std::string *) &((Ferris::FerrisException_CodeState const *)arg1)->getFileName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisException_CodeState_getFunctionName) { + { + Ferris::FerrisException_CodeState *arg1 = (Ferris::FerrisException_CodeState *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisException_CodeState_getFunctionName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisException_CodeState_getFunctionName" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + result = (std::string *) &((Ferris::FerrisException_CodeState const *)arg1)->getFunctionName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisException_CodeState_getLineNumber) { + { + Ferris::FerrisException_CodeState *arg1 = (Ferris::FerrisException_CodeState *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisException_CodeState_getLineNumber(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisException_CodeState_getLineNumber" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + result = (int)((Ferris::FerrisException_CodeState const *)arg1)->getLineNumber(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_FerrisException_CodeState) { + { + Ferris::FerrisException_CodeState *arg1 = (Ferris::FerrisException_CodeState *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FerrisException_CodeState(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisException_CodeState, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FerrisException_CodeState" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisExceptionBase__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + char *arg3 = (char *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + Ferris::FerrisExceptionBase *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisExceptionBase(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisExceptionBase" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisExceptionBase" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisExceptionBase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (Ferris::FerrisExceptionBase *)new Ferris::FerrisExceptionBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(char const *)arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisExceptionBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisExceptionBase__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::FerrisExceptionBase *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_FerrisExceptionBase(state,log);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisExceptionBase" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisExceptionBase" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + result = (Ferris::FerrisExceptionBase *)new Ferris::FerrisExceptionBase((Ferris::FerrisException_CodeState const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisExceptionBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisExceptionBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_fh_ostream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_fh_ostream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisExceptionBase__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisExceptionBase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisExceptionBase'"); + XSRETURN(0); +} + + +XS(_wrap_delete_FerrisExceptionBase) { + { + Ferris::FerrisExceptionBase *arg1 = (Ferris::FerrisExceptionBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FerrisExceptionBase(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisExceptionBase, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FerrisExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisExceptionBase *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisExceptionBase * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisExceptionBase_whats) { + { + Ferris::FerrisExceptionBase *arg1 = (Ferris::FerrisExceptionBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisExceptionBase_whats(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisExceptionBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisExceptionBase_whats" "', argument " "1"" of type '" "Ferris::FerrisExceptionBase const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisExceptionBase * >(argp1); + result = (std::string *) &((Ferris::FerrisExceptionBase const *)arg1)->whats(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisExceptionBase_what) { + { + Ferris::FerrisExceptionBase *arg1 = (Ferris::FerrisExceptionBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + char *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisExceptionBase_what(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisExceptionBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisExceptionBase_what" "', argument " "1"" of type '" "Ferris::FerrisExceptionBase const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisExceptionBase * >(argp1); + result = (char *)((Ferris::FerrisExceptionBase const *)arg1)->what(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisStreamException) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisStreamException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisStreamException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisStreamException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisStreamException" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamException" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisStreamException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisStreamException *)new Ferris::FerrisStreamException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisStreamException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_FerrisStreamException) { + { + Ferris::FerrisStreamException *arg1 = (Ferris::FerrisStreamException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FerrisStreamException(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisStreamException, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FerrisStreamException" "', argument " "1"" of type '" "Ferris::FerrisStreamException *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisStreamException * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamThrowFromErrno__SWIG_0) { + { + int arg1 ; + std::string *arg2 = 0 ; + void *arg3 = (void *) 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: StreamThrowFromErrno(eno,e,p);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "StreamThrowFromErrno" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StreamThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StreamThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StreamThrowFromErrno" "', argument " "3"" of type '" "void *""'"); + } + Ferris::StreamThrowFromErrno(arg1,(std::string const &)*arg2,arg3); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamThrowFromErrno__SWIG_1) { + { + int arg1 ; + std::string *arg2 = 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: StreamThrowFromErrno(eno,e);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "StreamThrowFromErrno" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StreamThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StreamThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + Ferris::StreamThrowFromErrno(arg1,(std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamThrowFromErrno) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *ptr = 0; + int res = SWIG_ConvertPtr(ST(2), &ptr, 0, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_StreamThrowFromErrno__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_StreamThrowFromErrno__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'StreamThrowFromErrno'"); + XSRETURN(0); +} + + +XS(_wrap_new_UnspoortedBlockSize) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::UnspoortedBlockSize *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_UnspoortedBlockSize(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnspoortedBlockSize" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnspoortedBlockSize" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnspoortedBlockSize" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnspoortedBlockSize" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnspoortedBlockSize" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnspoortedBlockSize" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::UnspoortedBlockSize *)new Ferris::UnspoortedBlockSize((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__UnspoortedBlockSize, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_UnspoortedBlockSize) { + { + Ferris::UnspoortedBlockSize *arg1 = (Ferris::UnspoortedBlockSize *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_UnspoortedBlockSize(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__UnspoortedBlockSize, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnspoortedBlockSize" "', argument " "1"" of type '" "Ferris::UnspoortedBlockSize *""'"); + } + arg1 = reinterpret_cast< Ferris::UnspoortedBlockSize * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_MalformedURL) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::MalformedURL *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_MalformedURL(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MalformedURL" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MalformedURL" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MalformedURL" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MalformedURL" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MalformedURL" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MalformedURL" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::MalformedURL *)new Ferris::MalformedURL((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__MalformedURL, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_MalformedURL) { + { + Ferris::MalformedURL *arg1 = (Ferris::MalformedURL *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_MalformedURL(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MalformedURL, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MalformedURL" "', argument " "1"" of type '" "Ferris::MalformedURL *""'"); + } + arg1 = reinterpret_cast< Ferris::MalformedURL * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CreateFIFO) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + fh_ostream arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CreateFIFO *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CreateFIFO(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CreateFIFO" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreateFIFO" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_fh_ostream, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CreateFIFO" "', argument " "2"" of type '" "fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreateFIFO" "', argument " "2"" of type '" "fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CreateFIFO" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreateFIFO" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CreateFIFO *)new Ferris::CreateFIFO((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CreateFIFO, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_CreateFIFO) { + { + Ferris::CreateFIFO *arg1 = (Ferris::CreateFIFO *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_CreateFIFO(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CreateFIFO, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CreateFIFO" "', argument " "1"" of type '" "Ferris::CreateFIFO *""'"); + } + arg1 = reinterpret_cast< Ferris::CreateFIFO * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ferris_g_get_home_dir) { + { + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: ferris_g_get_home_dir();"); + } + result = Ferris::ferris_g_get_home_dir(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_errnum_to_string) { + { + std::string *arg1 = 0 ; + int arg2 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: errnum_to_string(prefix,en);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "errnum_to_string" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "errnum_to_string" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "errnum_to_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::errnum_to_string((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ferris_ios_maskOffFerrisOptions__SWIG_0) { + { + std::ios::openmode arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ferris_ios_maskOffFerrisOptions(m);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__ios__openmode, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ferris_ios_maskOffFerrisOptions" "', argument " "1"" of type '" "std::ios::openmode""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ferris_ios_maskOffFerrisOptions" "', argument " "1"" of type '" "std::ios::openmode""'"); + } else { + arg1 = *(reinterpret_cast< std::ios::openmode * >(argp1)); + } + } + result = Ferris::ferris_ios::maskOffFerrisOptions(arg1); + ST(argvi) = SWIG_NewPointerObj((new std::ios::openmode(static_cast< const std::ios::openmode& >(result))), SWIGTYPE_p_std__ios__openmode, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ferris_ios_maskOffFerrisOptions__SWIG_1) { + { + Ferris::ferris_ios::openmode arg1 ; + unsigned long long val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ferris_ios_maskOffFerrisOptions(m);"); + } + ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ferris_ios_maskOffFerrisOptions" "', argument " "1"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg1 = static_cast< Ferris::ferris_ios::openmode >(val1); + result = Ferris::ferris_ios::maskOffFerrisOptions(arg1); + ST(argvi) = SWIG_NewPointerObj((new std::ios::openmode(static_cast< const std::ios::openmode& >(result))), SWIGTYPE_p_std__ios__openmode, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ferris_ios_maskOffFerrisOptions) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__ios__openmode, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ferris_ios_maskOffFerrisOptions__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ferris_ios_maskOffFerrisOptions__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'ferris_ios_maskOffFerrisOptions'"); + XSRETURN(0); +} + + +XS(_wrap_new_ferris_ios) { + { + int argvi = 0; + Ferris::ferris_ios *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_ios();"); + } + result = (Ferris::ferris_ios *)new Ferris::ferris_ios(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_ios, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_ios) { + { + Ferris::ferris_ios *arg1 = (Ferris::ferris_ios *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_ios(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_ios, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_ios" "', argument " "1"" of type '" "Ferris::ferris_ios *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_ios * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CleanupURL__SWIG_0) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CleanupURL(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CleanupURL" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CleanupURL" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::CleanupURL((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_CleanupURL__SWIG_1) { + { + std::string *arg1 = 0 ; + bool arg2 ; + bool arg3 ; + int res1 = SWIG_OLDOBJ ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CleanupURL(s,stripFileSchemePrefix,leaveURIConstructsIntact);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CleanupURL" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CleanupURL" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CleanupURL" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CleanupURL" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = Ferris::CleanupURL((std::string const &)*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CleanupURL) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CleanupURL__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CleanupURL__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'CleanupURL'"); + XSRETURN(0); +} + + +XS(_wrap_new_ferris_basic_streambuf_onemeg) { + { + int argvi = 0; + Ferris::ferris_basic_streambuf_onemeg *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_basic_streambuf_onemeg();"); + } + result = (Ferris::ferris_basic_streambuf_onemeg *)new Ferris::ferris_basic_streambuf_onemeg(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_basic_streambuf_onemeg, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_onemeg) { + { + Ferris::ferris_basic_streambuf_onemeg *arg1 = (Ferris::ferris_basic_streambuf_onemeg *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_onemeg(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_onemeg, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_onemeg" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_onemeg *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_onemeg * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ferris_basic_streambuf_sixteenk) { + { + int argvi = 0; + Ferris::ferris_basic_streambuf_sixteenk *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_basic_streambuf_sixteenk();"); + } + result = (Ferris::ferris_basic_streambuf_sixteenk *)new Ferris::ferris_basic_streambuf_sixteenk(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenk, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_sixteenk) { + { + Ferris::ferris_basic_streambuf_sixteenk *arg1 = (Ferris::ferris_basic_streambuf_sixteenk *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_sixteenk(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenk, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_sixteenk" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_sixteenk *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_sixteenk * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ferris_basic_streambuf_fourk) { + { + int argvi = 0; + Ferris::ferris_basic_streambuf_fourk *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_basic_streambuf_fourk();"); + } + result = (Ferris::ferris_basic_streambuf_fourk *)new Ferris::ferris_basic_streambuf_fourk(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_basic_streambuf_fourk, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_fourk) { + { + Ferris::ferris_basic_streambuf_fourk *arg1 = (Ferris::ferris_basic_streambuf_fourk *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_fourk(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_fourk, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_fourk" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_fourk *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_fourk * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ferris_basic_streambuf_quartk) { + { + int argvi = 0; + Ferris::ferris_basic_streambuf_quartk *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_basic_streambuf_quartk();"); + } + result = (Ferris::ferris_basic_streambuf_quartk *)new Ferris::ferris_basic_streambuf_quartk(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_basic_streambuf_quartk, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_quartk) { + { + Ferris::ferris_basic_streambuf_quartk *arg1 = (Ferris::ferris_basic_streambuf_quartk *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_quartk(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_quartk, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_quartk" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_quartk *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_quartk * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ferris_basic_streambuf_sixteenbytes) { + { + int argvi = 0; + Ferris::ferris_basic_streambuf_sixteenbytes *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ferris_basic_streambuf_sixteenbytes();"); + } + result = (Ferris::ferris_basic_streambuf_sixteenbytes *)new Ferris::ferris_basic_streambuf_sixteenbytes(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenbytes, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_sixteenbytes) { + { + Ferris::ferris_basic_streambuf_sixteenbytes *arg1 = (Ferris::ferris_basic_streambuf_sixteenbytes *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_sixteenbytes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenbytes, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_sixteenbytes" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_sixteenbytes *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_sixteenbytes * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ferris_basic_streambuf_virtual) { + { + Ferris::ferris_basic_streambuf_virtual *arg1 = (Ferris::ferris_basic_streambuf_virtual *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ferris_basic_streambuf_virtual(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_basic_streambuf_virtual, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ferris_basic_streambuf_virtual" "', argument " "1"" of type '" "Ferris::ferris_basic_streambuf_virtual *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_basic_streambuf_virtual * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_connectStreamBufferClosedSignal) { + { + std::basic_streambuf< char,std::char_traits< char > > *arg1 = (std::basic_streambuf< char,std::char_traits< char > > *) 0 ; + Ferris::ferris_streambuf< char,std::char_traits< char > > *arg2 = (Ferris::ferris_streambuf< char,std::char_traits< char > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: connectStreamBufferClosedSignal(sb,sh);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__basic_streambufT_char_std__char_traitsT_char_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connectStreamBufferClosedSignal" "', argument " "1"" of type '" "std::basic_streambuf< char,std::char_traits< char > > *""'"); + } + arg1 = reinterpret_cast< std::basic_streambuf< char,std::char_traits< char > > * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connectStreamBufferClosedSignal" "', argument " "2"" of type '" "Ferris::ferris_streambuf< char,std::char_traits< char > > *""'"); + } + arg2 = reinterpret_cast< Ferris::ferris_streambuf< char,std::char_traits< char > > * >(argp2); + Ferris::connectStreamBufferClosedSignal(arg1,arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getClosedSignal) { + { + Ferris::ferris_streambuf< char,std::char_traits< char > > *arg1 = (Ferris::ferris_streambuf< char,std::char_traits< char > > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::closeSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getClosedSignal(sh);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getClosedSignal" "', argument " "1"" of type '" "Ferris::ferris_streambuf< char,std::char_traits< char > > *""'"); + } + arg1 = reinterpret_cast< Ferris::ferris_streambuf< char,std::char_traits< char > > * >(argp1); + result = (Ferris::closeSignal_t *) &Ferris::getClosedSignal(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_modifyFileBufferForExtendedFlags) { + { + __gnu_cxx::stdio_filebuf< char,std::char_traits< char > > *arg1 = (__gnu_cxx::stdio_filebuf< char,std::char_traits< char > > *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: modifyFileBufferForExtendedFlags(fb,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "modifyFileBufferForExtendedFlags" "', argument " "1"" of type '" "__gnu_cxx::stdio_filebuf< char,std::char_traits< char > > *""'"); + } + arg1 = reinterpret_cast< __gnu_cxx::stdio_filebuf< char,std::char_traits< char > > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "modifyFileBufferForExtendedFlags" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + Ferris::Private::modifyFileBufferForExtendedFlags(arg1,arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_0) { + { + long arg1 ; + long val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(x);"); + } + ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "tostr" "', argument " "1"" of type '" "long""'"); + } + arg1 = static_cast< long >(val1); + result = Ferris::tostr(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_toint) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toint(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toint" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toint" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (int)Ferris::toint((std::string const &)*arg1); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_todouble) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: todouble(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "todouble" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "todouble" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (double)Ferris::todouble((std::string const &)*arg1); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_1) { + { + std::istringstream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__istringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::istringstream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::istringstream &""'"); + } + arg1 = reinterpret_cast< std::istringstream * >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_2) { + { + std::ostringstream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__ostringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::ostringstream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::ostringstream &""'"); + } + arg1 = reinterpret_cast< std::ostringstream * >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_3) { + { + std::stringstream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__stringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::stringstream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::stringstream &""'"); + } + arg1 = reinterpret_cast< std::stringstream * >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_4) { + { + std::istringstream **arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_p_std__istringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::istringstream *&""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::istringstream *&""'"); + } + arg1 = reinterpret_cast< std::istringstream ** >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_5) { + { + std::ostringstream **arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_p_std__ostringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::ostringstream *&""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::ostringstream *&""'"); + } + arg1 = reinterpret_cast< std::ostringstream ** >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_6) { + { + std::stringstream **arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_p_std__stringstream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "std::stringstream *&""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "std::stringstream *&""'"); + } + arg1 = reinterpret_cast< std::stringstream ** >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_7) { + { + Ferris::fh_ostringstream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "Ferris::fh_ostringstream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "Ferris::fh_ostringstream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_ostringstream * >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_8) { + { + Ferris::fh_stringstream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "Ferris::fh_stringstream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "Ferris::fh_stringstream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_stringstream * >(argp1); + result = Ferris::tostr(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamToString__SWIG_0) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: StreamToString(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StreamToString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StreamToString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = Ferris::StreamToString(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamToString__SWIG_1) { + { + Ferris::fh_istream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: StreamToString(iss,ret);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StreamToString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StreamToString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StreamToString" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StreamToString" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + result = (std::string *) &Ferris::StreamToString(*arg1,*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__string, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_StreamToString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_StreamToString__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_StreamToString__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'StreamToString'"); + XSRETURN(0); +} + + +XS(_wrap_getFirstLine) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getFirstLine(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getFirstLine" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getFirstLine" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = Ferris::getFirstLine(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ends_with) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ends_with(s,ending);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ends_with" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ends_with" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ends_with" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ends_with" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)Ferris::ends_with((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_starts_with__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: starts_with(s,starting);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starts_with" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "starts_with" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "starts_with" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "starts_with" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)Ferris::starts_with((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_starts_with__SWIG_1) { + { + std::string *arg1 = 0 ; + char *arg2 = (char *) 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: starts_with(s,starting);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starts_with" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "starts_with" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "starts_with" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)Ferris::starts_with((std::string const &)*arg1,(char const *)arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_starts_with) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_starts_with__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_starts_with__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'starts_with'"); + XSRETURN(0); +} + + +XS(_wrap_contains__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: contains(s,target);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "contains" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contains" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "contains" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contains" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)Ferris::contains((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_cmp_nocase) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: cmp_nocase(s,s2);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cmp_nocase" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmp_nocase" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cmp_nocase" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmp_nocase" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (int)Ferris::cmp_nocase((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeLimitingIStream) { + { + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg1 ; + std::streampos arg2 ; + std::streampos arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: MakeLimitingIStream(ss,be,en);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeLimitingIStream" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeLimitingIStream" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_istream * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__streampos, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MakeLimitingIStream" "', argument " "2"" of type '" "std::streampos""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeLimitingIStream" "', argument " "2"" of type '" "std::streampos""'"); + } else { + arg2 = *(reinterpret_cast< std::streampos * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__streampos, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MakeLimitingIStream" "', argument " "3"" of type '" "std::streampos""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeLimitingIStream" "', argument " "3"" of type '" "std::streampos""'"); + } else { + arg3 = *(reinterpret_cast< std::streampos * >(argp3)); + } + } + result = Ferris::Factory::MakeLimitingIStream(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeProxyStream__SWIG_0) { + { + std::istream *arg1 = (std::istream *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeProxyStream(base,takeOwnerShip);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__istream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeProxyStream" "', argument " "1"" of type '" "std::istream *""'"); + } + arg1 = reinterpret_cast< std::istream * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeProxyStream" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Factory::MakeProxyStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeProxyStream__SWIG_1) { + { + std::istream *arg1 = (std::istream *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeProxyStream(base);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__istream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeProxyStream" "', argument " "1"" of type '" "std::istream *""'"); + } + arg1 = reinterpret_cast< std::istream * >(argp1); + result = Ferris::Factory::MakeProxyStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeProxyStream__SWIG_2) { + { + std::iostream *arg1 = (std::iostream *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeProxyStream(base,takeOwnerShip);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__iostream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeProxyStream" "', argument " "1"" of type '" "std::iostream *""'"); + } + arg1 = reinterpret_cast< std::iostream * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeProxyStream" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Factory::MakeProxyStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeProxyStream__SWIG_3) { + { + std::iostream *arg1 = (std::iostream *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeProxyStream(base);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__iostream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeProxyStream" "', argument " "1"" of type '" "std::iostream *""'"); + } + arg1 = reinterpret_cast< std::iostream * >(argp1); + result = Ferris::Factory::MakeProxyStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeProxyStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__istream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__iostream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__iostream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__istream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeProxyStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeProxyStream__SWIG_3); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeProxyStream__SWIG_2); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeProxyStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeProxyStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeTeeStream) { + { + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg1 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeTeeStream(oss1,oss2);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeTeeStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeTeeStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_ostream * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MakeTeeStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeTeeStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + result = Ferris::Factory::MakeTeeStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeTeeIOStream) { + { + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg1 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeTeeIOStream(oss1,oss2);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeTeeIOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeTeeIOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_ostream * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MakeTeeIOStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeTeeIOStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + result = Ferris::Factory::MakeTeeIOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_fcin) { + { + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fcin();"); + } + result = Ferris::Factory::fcin(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_fcout) { + { + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fcout();"); + } + result = Ferris::Factory::fcout(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_fcerr) { + { + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fcerr();"); + } + result = Ferris::Factory::fcerr(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_fcnull) { + { + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fcnull();"); + } + result = Ferris::Factory::fcnull(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdIStream__SWIG_0) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeFdIStream(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdIStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Factory::MakeFdIStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdOStream__SWIG_0) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeFdOStream(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Factory::MakeFdOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdIOStream__SWIG_0) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeFdIOStream(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdIOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Factory::MakeFdIOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdIStream__SWIG_1) { + { + int arg1 ; + bool arg2 ; + int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeFdIStream(fd,closeFD);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdIStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeFdIStream" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Factory::MakeFdIStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdIStream__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdIStream__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'MakeFdIStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeFdOStream__SWIG_1) { + { + int arg1 ; + bool arg2 ; + int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeFdOStream(fd,closeFD);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeFdOStream" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Factory::MakeFdOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdOStream__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdOStream__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'MakeFdOStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeFdIOStream__SWIG_1) { + { + int arg1 ; + bool arg2 ; + int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeFdIOStream(fd,closeFD);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeFdIOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeFdIOStream" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Factory::MakeFdIOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFdIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdIOStream__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFdIOStream__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'MakeFdIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeHoleyOStream__SWIG_0) { + { + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg1 ; + int arg2 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeHoleyOStream(ss,blocksize);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeHoleyOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeHoleyOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_ostream * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeHoleyOStream" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::Factory::MakeHoleyOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeHoleyOStream__SWIG_1) { + { + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeHoleyOStream(ss);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeHoleyOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeHoleyOStream" "', argument " "1"" of type '" "Ferris::fh_ostream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_ostream * >(argp1)); + } + } + result = Ferris::Factory::MakeHoleyOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeHoleyOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeHoleyOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeHoleyOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeHoleyOStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeMemoryIStream) { + { + void *arg1 = (void *) 0 ; + int arg2 ; + int res1 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeMemoryIStream(data,data_size);"); + } + res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeMemoryIStream" "', argument " "1"" of type '" "void *""'"); + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMemoryIStream" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::Factory::MakeMemoryIStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMemoryIOStream) { + { + void *arg1 = (void *) 0 ; + int arg2 ; + int res1 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeMemoryIOStream(data,data_size);"); + } + res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeMemoryIOStream" "', argument " "1"" of type '" "void *""'"); + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMemoryIOStream" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::Factory::MakeMemoryIOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeReadOnlyIOStream) { + { + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeReadOnlyIOStream(ss);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeReadOnlyIOStream" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeReadOnlyIOStream" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_istream * >(argp1)); + } + } + result = Ferris::Factory::MakeReadOnlyIOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIStream__SWIG_0) { + { + int arg1 ; + Ferris::ferris_ios::openmode arg2 ; + std::string arg3 ; + int val1 ; + int ecode1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: MakeMMapIStream(fd,m,pathdesc);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMMapIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MakeMMapIStream" "', argument " "3"" of type '" "std::string const""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Factory::MakeMMapIStream(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIStream__SWIG_1) { + { + int arg1 ; + Ferris::ferris_ios::openmode arg2 ; + int val1 ; + int ecode1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeMMapIStream(fd,m);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMMapIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = Ferris::Factory::MakeMMapIStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIStream__SWIG_2) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeMMapIStream(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Factory::MakeMMapIStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIStream__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIStream__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeMMapIStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeMMapIOStream__SWIG_0) { + { + int arg1 ; + Ferris::ferris_ios::openmode arg2 ; + std::string arg3 ; + int val1 ; + int ecode1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: MakeMMapIOStream(fd,m,pathdesc);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMMapIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MakeMMapIOStream" "', argument " "3"" of type '" "std::string const""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Factory::MakeMMapIOStream(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIOStream__SWIG_1) { + { + int arg1 ; + Ferris::ferris_ios::openmode arg2 ; + int val1 ; + int ecode1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeMMapIOStream(fd,m);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeMMapIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = Ferris::Factory::MakeMMapIOStream(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIOStream__SWIG_2) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeMMapIOStream(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MakeMMapIOStream" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Factory::MakeMMapIOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeMMapIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIOStream__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIOStream__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeMMapIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeMMapIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_MakeFIFO__SWIG_0) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeFIFO(path);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + try { + result = (int)Ferris::Factory::MakeFIFO((std::string const &)*arg1); + } + catch(Ferris::CreateFIFO &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CreateFIFO(static_cast< const Ferris::CreateFIFO& >(_e))),SWIGTYPE_p_Ferris__CreateFIFO,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFIFO__SWIG_1) { + { + std::string *arg1 = 0 ; + bool arg2 ; + int arg3 ; + int res1 = SWIG_OLDOBJ ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: MakeFIFO(path,should_open,openmode);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeFIFO" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MakeFIFO" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + try { + result = (int)Ferris::Factory::MakeFIFO((std::string const &)*arg1,arg2,arg3); + } + catch(Ferris::CreateFIFO &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CreateFIFO(static_cast< const Ferris::CreateFIFO& >(_e))),SWIGTYPE_p_Ferris__CreateFIFO,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFIFO__SWIG_2) { + { + std::string *arg1 = 0 ; + bool arg2 ; + int res1 = SWIG_OLDOBJ ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeFIFO(path,should_open);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeFIFO" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MakeFIFO" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + try { + result = (int)Ferris::Factory::MakeFIFO((std::string const &)*arg1,arg2); + } + catch(Ferris::CreateFIFO &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CreateFIFO(static_cast< const Ferris::CreateFIFO& >(_e))),SWIGTYPE_p_Ferris__CreateFIFO,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeFIFO) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFIFO__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFIFO__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeFIFO__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'MakeFIFO'"); + XSRETURN(0); +} + + +XS(_wrap_Context___deref__) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context___deref__" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::Context *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getContextClassStatelessEANames) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::stringset_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getContextClassStatelessEANames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getContextClassStatelessEANames" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::stringset_t *) &(*arg1)->getContextClassStatelessEANames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isDir) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_isDir(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isDir" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->isDir(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getDirName) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getDirName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getDirName" "', argument " "1"" of type '" "Ferris::fh_context const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (std::string *) &(*arg1)->getDirName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getParent) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Attribute::Parent_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getParent(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getParent" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + try { + result = (Ferris::Attribute::Parent_t)(*arg1)->getParent(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isParentBound) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_isParentBound(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isParentBound" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->isParentBound(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getRecommendedEA) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getRecommendedEA(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getRecommendedEA" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getRecommendedEA(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getHasSubContextsGuess) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getHasSubContextsGuess(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getHasSubContextsGuess" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->getHasSubContextsGuess(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getHaveReadDir) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getHaveReadDir(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getHaveReadDir" "', argument " "1"" of type '" "Ferris::fh_context const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (int)(*arg1)->getHaveReadDir(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_toAttribute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_toAttribute(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_toAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->toAttribute(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getSchema) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getSchema(self,eaname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSchema" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getSchema((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getSchemaOrDefault) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::XSDBasic_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_getSchemaOrDefault(self,eaname,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSchemaOrDefault" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getSchemaOrDefault" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getSchemaOrDefault" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_getSchemaOrDefault" "', argument " "3"" of type '" "Ferris::XSDBasic_t""'"); + } + arg3 = static_cast< Ferris::XSDBasic_t >(val3); + result = (*arg1)->getSchemaOrDefault((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_begin) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_begin(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_begin" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->begin(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_end) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_end(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_end" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->end(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_rbegin) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::reverse_iterator< Ferris::ContextIterator > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_rbegin(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_rbegin" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->rbegin(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::reverse_iterator(static_cast< const Ferris::Context::reverse_iterator& >(result))), SWIGTYPE_p_std__reverse_iteratorT_Ferris__ContextIterator_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_rend) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::reverse_iterator< Ferris::ContextIterator > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_rend(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_rend" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->rend(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::reverse_iterator(static_cast< const Ferris::Context::reverse_iterator& >(result))), SWIGTYPE_p_std__reverse_iteratorT_Ferris__ContextIterator_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_find) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_find(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_find" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_find" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_find" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->find((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_monsterName) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_monsterName(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_monsterName" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_monsterName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_monsterName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->monsterName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getIsNativeContext) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getIsNativeContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getIsNativeContext" "', argument " "1"" of type '" "Ferris::fh_context const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->getIsNativeContext(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_setHasDynamicAttributes) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_setHasDynamicAttributes(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_setHasDynamicAttributes" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_setHasDynamicAttributes" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setHasDynamicAttributes(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_setAttribute__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + Ferris::XSDBasic_t arg5 ; + bool arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: Context_setAttribute(self,rdn,atx,addToREA,sct,isStateLess);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_setAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Context_setAttribute" "', argument " "5"" of type '" "Ferris::XSDBasic_t""'"); + } + arg5 = static_cast< Ferris::XSDBasic_t >(val5); + ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Context_setAttribute" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5,arg6); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_setAttribute__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + Ferris::XSDBasic_t arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_setAttribute(self,rdn,atx,addToREA,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_setAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Context_setAttribute" "', argument " "5"" of type '" "Ferris::XSDBasic_t""'"); + } + arg5 = static_cast< Ferris::XSDBasic_t >(val5); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_setAttribute__SWIG_2) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Context_setAttribute(self,rdn,atx,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_setAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_setAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_setAttribute__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_setAttribute__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_setAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_setAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getSubContextAttributesWithSameNameHaveSameSchema) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getSubContextAttributesWithSameNameHaveSameSchema(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSubContextAttributesWithSameNameHaveSameSchema" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->getSubContextAttributesWithSameNameHaveSameSchema(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_dumpOutItems) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_dumpOutItems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_dumpOutItems" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + (*arg1)->dumpOutItems(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getOverMountContext) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getOverMountContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getOverMountContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::Context *)(*arg1)->getOverMountContext(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_remove__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_remove(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_remove" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_remove" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_remove" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->remove((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_remove__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_remove(self,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_remove" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_remove" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_remove" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + (*arg1)->remove(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_remove) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_remove__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_remove__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_remove'"); + XSRETURN(0); +} + + +XS(_wrap_Context_rename__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_rename(self,rdn,newPath,TryToCopyOverFileSystems,OverWriteDstIfExists);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_rename" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_rename" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Context_rename" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_rename__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Context_rename(self,rdn,newPath,TryToCopyOverFileSystems);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_rename" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_rename" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_rename__SWIG_2) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_rename(self,rdn,newPath);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_rename" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_rename) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_rename__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_rename__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_rename__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_rename'"); + XSRETURN(0); +} + + +XS(_wrap_Context_copyTo__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_copyTo(self,newPath,OverWriteDstIfExists);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_copyTo" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_copyTo" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = (*arg1)->copyTo((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_copyTo__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_copyTo(self,newPath);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_copyTo" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->copyTo((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_copyTo) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_copyTo__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_copyTo__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_copyTo'"); + XSRETURN(0); +} + + +XS(_wrap_Context_createAttribute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_createAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_createAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_createAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->createAttribute((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateAttributeFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeFailed(static_cast< const Ferris::FerrisCreateAttributeFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateAttributeNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeNotSupported(static_cast< const Ferris::FerrisCreateAttributeNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_acquireAttribute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_acquireAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_acquireAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_acquireAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_acquireAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->acquireAttribute((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateAttributeFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeFailed(static_cast< const Ferris::FerrisCreateAttributeFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateAttributeNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeNotSupported(static_cast< const Ferris::FerrisCreateAttributeNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getCreateSubContextSchema) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getCreateSubContextSchema(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getCreateSubContextSchema" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getCreateSubContextSchema(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_createSubContext__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_createSubContext(self,rdn,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_createSubContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_createSubContext" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createSubContext" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2,arg3); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_createSubContext__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_createSubContext(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_createSubContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_createSubContext__SWIG_2) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::CreateMetaDataContext,::Ferris::FerrisExRefCountedContext,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_createSubContext(self,rdn,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_createSubContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_createSubContext" "', argument " "3"" of type '" "Ferris::fh_mdcontext""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_createSubContext" "', argument " "3"" of type '" "Ferris::fh_mdcontext""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_mdcontext * >(argp3)); + } + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2,arg3); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_createSubContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_createSubContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_createSubContext__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_createSubContext__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'Context_createSubContext'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getRelativeContext__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::RootContextFactory *arg3 = (Ferris::RootContextFactory *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_getRelativeContext(self,xdn,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getRelativeContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__RootContextFactory, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_getRelativeContext" "', argument " "3"" of type '" "Ferris::RootContextFactory *""'"); + } + arg3 = reinterpret_cast< Ferris::RootContextFactory * >(argp3); + try { + result = (*arg1)->getRelativeContext((std::string const &)*arg2,arg3); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getRelativeContext__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getRelativeContext(self,xdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getRelativeContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getRelativeContext((std::string const &)*arg2); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getRelativeContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__RootContextFactory, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getRelativeContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getRelativeContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_getRelativeContext'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getSubContextNames) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextCollection::SubContextNames_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getSubContextNames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSubContextNames" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::ContextCollection::SubContextNames_t *) &(*arg1)->getSubContextNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getSubContext) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getSubContext(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSubContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getSubContext((std::string const &)*arg2); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_priv_isSubContextBound) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_priv_isSubContextBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_priv_isSubContextBound" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_priv_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_priv_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)(*arg1)->priv_isSubContextBound((std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isSubContextBound) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_isSubContextBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isSubContextBound" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)(*arg1)->isSubContextBound((std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_read__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_read(self,force);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_read" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_read" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->read(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_read__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_read(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_read" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + (*arg1)->read(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_read) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_read__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_read__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_read'"); + XSRETURN(0); +} + + +XS(_wrap_Context_guessSize) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + long result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_guessSize(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_guessSize" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (long)(*arg1)->guessSize(); + ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_hasSubContexts) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_hasSubContexts(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_hasSubContexts" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->hasSubContexts(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_SubContextCount) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_SubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_SubContextCount" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (int)(*arg1)->SubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_AddRef) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_AddRef" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Release) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Release" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_all_attributes_have_single_ref_count) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_all_attributes_have_single_ref_count(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_all_attributes_have_single_ref_count" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->all_attributes_have_single_ref_count(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isAttributeBound__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_isAttributeBound(self,rdn,createIfNotThere);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isAttributeBound" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_isAttributeBound" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2,arg3); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isAttributeBound__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_isAttributeBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isAttributeBound" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isAttributeBound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_isAttributeBound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_isAttributeBound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_isAttributeBound'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getAttribute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getAttribute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getAttribute((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getAttributeCount) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getAttributeCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getAttributeCount" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (int)(*arg1)->getAttributeCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getAttributeRootEmblem) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getAttributeRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getAttributeRootEmblem" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getAttributeRootEmblem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Changed) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Changed *arg2 = (NamingEvent_Changed *) 0 ; + std::string *arg3 = 0 ; + std::string *arg4 = 0 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int res4 = SWIG_OLDOBJ ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_Emit_Changed(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Changed" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Changed, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Changed" "', argument " "2"" of type '" "NamingEvent_Changed *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Changed * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_Emit_Changed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_Emit_Changed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Context_Emit_Changed" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_Emit_Changed" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_Emit_Changed" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Changed(arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5); + ST(argvi) = sv_newmortal(); + + + if (SWIG_IsNewObj(res3)) delete arg3; + if (SWIG_IsNewObj(res4)) delete arg4; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + if (SWIG_IsNewObj(res4)) delete arg4; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Deleted) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Deleted *arg2 = (NamingEvent_Deleted *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_Emit_Deleted(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Deleted" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Deleted, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Deleted" "', argument " "2"" of type '" "NamingEvent_Deleted *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Deleted * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Deleted" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Deleted" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_Emit_Deleted" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Deleted(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Start_Execute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Start_Execute *arg2 = (NamingEvent_Start_Execute *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_Emit_Start_Execute(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Start_Execute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Start_Execute, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Start_Execute" "', argument " "2"" of type '" "NamingEvent_Start_Execute *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Start_Execute * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Start_Execute" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Start_Execute" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_Emit_Start_Execute" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Start_Execute(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Stop_Execute) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Stop_Execute *arg2 = (NamingEvent_Stop_Execute *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_Emit_Stop_Execute(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Stop_Execute" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Stop_Execute, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Stop_Execute" "', argument " "2"" of type '" "NamingEvent_Stop_Execute *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Stop_Execute * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Stop_Execute" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Stop_Execute" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_Emit_Stop_Execute" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Stop_Execute(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Created) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Created *arg2 = (NamingEvent_Created *) 0 ; + Ferris::fh_context *arg3 = 0 ; + std::string arg4 ; + std::string arg5 ; + sigc::trackable *arg6 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: Context_Emit_Created(self,e,newc,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Created" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Created, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Created" "', argument " "2"" of type '" "NamingEvent_Created *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Created * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_Emit_Created" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_Emit_Created" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + arg3 = reinterpret_cast< Ferris::fh_context * >(argp3); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Created" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Created" "', argument " "5"" of type '" "std::string""'"); + } + arg5 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Context_Emit_Created" "', argument " "6"" of type '" "sigc::trackable *""'"); + } + arg6 = reinterpret_cast< sigc::trackable * >(argp6); + (*arg1)->Emit_Created(arg2,(Ferris::fh_context const &)*arg3,arg4,arg5,arg6); + ST(argvi) = sv_newmortal(); + + + + + + + XSRETURN(argvi); + fail: + + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Moved) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Moved *arg2 = (NamingEvent_Moved *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_Emit_Moved(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Moved" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Moved, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Moved" "', argument " "2"" of type '" "NamingEvent_Moved *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Moved * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Moved" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Moved" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_Emit_Moved" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Moved(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Exists) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Exists *arg2 = (NamingEvent_Exists *) 0 ; + Ferris::fh_context *arg3 = 0 ; + std::string arg4 ; + std::string arg5 ; + sigc::trackable *arg6 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: Context_Emit_Exists(self,e,newc,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Exists" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Exists, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Exists" "', argument " "2"" of type '" "NamingEvent_Exists *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Exists * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_Emit_Exists" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_Emit_Exists" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + arg3 = reinterpret_cast< Ferris::fh_context * >(argp3); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Exists" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Context_Emit_Exists" "', argument " "5"" of type '" "std::string""'"); + } + arg5 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Context_Emit_Exists" "', argument " "6"" of type '" "sigc::trackable *""'"); + } + arg6 = reinterpret_cast< sigc::trackable * >(argp6); + (*arg1)->Emit_Exists(arg2,(Ferris::fh_context const &)*arg3,arg4,arg5,arg6); + ST(argvi) = sv_newmortal(); + + + + + + + XSRETURN(argvi); + fail: + + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Start_Reading_Context) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Start_Reading_Context *arg2 = (NamingEvent_Start_Reading_Context *) 0 ; + sigc::trackable *arg3 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_Emit_Start_Reading_Context(self,e,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Start_Reading_Context" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Start_Reading_Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Start_Reading_Context" "', argument " "2"" of type '" "NamingEvent_Start_Reading_Context *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Start_Reading_Context * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_Emit_Start_Reading_Context" "', argument " "3"" of type '" "sigc::trackable *""'"); + } + arg3 = reinterpret_cast< sigc::trackable * >(argp3); + (*arg1)->Emit_Start_Reading_Context(arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_Emit_Stop_Reading_Context) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + NamingEvent_Stop_Reading_Context *arg2 = (NamingEvent_Stop_Reading_Context *) 0 ; + sigc::trackable *arg3 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_Emit_Stop_Reading_Context(self,e,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_Emit_Stop_Reading_Context" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Stop_Reading_Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_Emit_Stop_Reading_Context" "', argument " "2"" of type '" "NamingEvent_Stop_Reading_Context *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Stop_Reading_Context * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_Emit_Stop_Reading_Context" "', argument " "3"" of type '" "sigc::trackable *""'"); + } + arg3 = reinterpret_cast< sigc::trackable * >(argp3); + (*arg1)->Emit_Stop_Reading_Context(arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getURL) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getURL(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getURL" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getURL(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_SubCreate_file) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::fh_context arg2 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_SubCreate_file(self,c,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_SubCreate_file" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_SubCreate_file" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_SubCreate_file" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_SubCreate_file" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_SubCreate_file" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + result = (*arg1)->SubCreate_file(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_dumpRefDebugData) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_dumpRefDebugData(self,ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_dumpRefDebugData" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_dumpRefDebugData" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_dumpRefDebugData" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (*arg1)->dumpRefDebugData(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_splitPath) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_splitPath(self,dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_splitPath" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_splitPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_splitPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->splitPath((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::SplitPath_t(static_cast< const Ferris::Context::SplitPath_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_unSplitPath) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::Context::SplitPath_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_unSplitPath(self,pa);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_unSplitPath" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_unSplitPath" "', argument " "2"" of type '" "Ferris::Context::SplitPath_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_unSplitPath" "', argument " "2"" of type '" "Ferris::Context::SplitPath_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::Context::SplitPath_t * >(argp2); + result = (*arg1)->unSplitPath((Ferris::Context::SplitPath_t const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getMimeType__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getMimeType(self,fromContent);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getMimeType" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_getMimeType" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (*arg1)->getMimeType(arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getMimeType__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getMimeType(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getMimeType" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getMimeType(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getMimeType) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getMimeType__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getMimeType__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_getMimeType'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getFileType) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getFileType(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getFileType" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getFileType(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getMedallion) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_medallion result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getMedallion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getMedallion" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getMedallion(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_medallion(static_cast< const Ferris::fh_medallion& >(result))), SWIGTYPE_p_Ferris__fh_medallion, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_hasMedallion) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_hasMedallion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_hasMedallion" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->hasMedallion(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamespacePrefixes) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamespacePrefixes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamespacePrefixes" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getNamespacePrefixes(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getBranchFileSystem) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getBranchFileSystem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getBranchFileSystem" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getBranchFileSystem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNameExtension) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNameExtension(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNameExtension" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getNameExtension(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getImage) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getImage(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getImage" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getImage(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getImageOrNULL) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getImageOrNULL(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getImageOrNULL" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->getImageOrNULL(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_priv_getImage) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_priv_getImage(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_priv_getImage" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (*arg1)->priv_getImage(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_taintImage) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_taintImage(self,im);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_taintImage" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_taintImage" "', argument " "2"" of type '" "Ferris::fh_image""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_taintImage" "', argument " "2"" of type '" "Ferris::fh_image""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_image * >(argp2)); + } + } + (*arg1)->taintImage(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_RegisterImageEAGeneratorModule) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + std::string *arg4 = 0 ; + std::string *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + int res5 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_RegisterImageEAGeneratorModule(self,ext,writable,implname,shortname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + { + std::string *ptr = (std::string *)0; + res5 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "5"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_RegisterImageEAGeneratorModule" "', argument " "5"" of type '" "std::string const &""'"); + } + arg5 = ptr; + } + result = (bool)(*arg1)->RegisterImageEAGeneratorModule((std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + if (SWIG_IsNewObj(res5)) delete arg5; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + if (SWIG_IsNewObj(res5)) delete arg5; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_UnrollRegisteredImageEAGeneratorModule) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + std::string *arg4 = 0 ; + Ferris::Context::f_imageEAGenerator *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Context_UnrollRegisteredImageEAGeneratorModule(self,ext,writable,implname,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "5"" of type '" "Ferris::Context::f_imageEAGenerator const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_UnrollRegisteredImageEAGeneratorModule" "', argument " "5"" of type '" "Ferris::Context::f_imageEAGenerator const &""'"); + } + arg5 = reinterpret_cast< Ferris::Context::f_imageEAGenerator * >(argp5); + result = (bool)(*arg1)->UnrollRegisteredImageEAGeneratorModule((std::string const &)*arg2,arg3,(std::string const &)*arg4,(Ferris::Context::f_imageEAGenerator const &)*arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_isCompressedContext) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_isCompressedContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_isCompressedContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->isCompressedContext(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_addHandlableToBeReleasedWithContext) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::Handlable *arg2 = (Ferris::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_addHandlableToBeReleasedWithContext(self,h);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_addHandlableToBeReleasedWithContext" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_addHandlableToBeReleasedWithContext" "', argument " "2"" of type '" "Ferris::Handlable *""'"); + } + arg2 = reinterpret_cast< Ferris::Handlable * >(argp2); + (*arg1)->addHandlableToBeReleasedWithContext(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_SubCreate_dir) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::fh_context arg2 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_SubCreate_dir(self,c,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_SubCreate_dir" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_SubCreate_dir" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_SubCreate_dir" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + result = (*arg1)->SubCreate_dir(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_dumpTree) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_dumpTree(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_dumpTree" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + (*arg1)->dumpTree(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getLastPartOfName) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getLastPartOfName(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getLastPartOfName" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getLastPartOfName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_appendToPath__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Context_appendToPath(self,p,d,allowDirToBeAbsolute);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_appendToPath" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Context_appendToPath" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_appendToPath__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_appendToPath(self,p,d);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_appendToPath" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Context_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_appendToPath) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_appendToPath__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_appendToPath__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_appendToPath'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getIStream__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getIStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getIStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_getIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getIStream__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getIStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getIStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + try { + result = (*arg1)->getIStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getLocalIStream__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + Ferris::ferris_ios::openmode arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned long long val3 ; + int ecode3 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Context_getLocalIStream(self,new_dn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getLocalIStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Context_getLocalIStream" "', argument " "3"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg3 = static_cast< Ferris::ferris_ios::openmode >(val3); + try { + result = (*arg1)->getLocalIStream(*arg2,arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getLocalIStream__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getLocalIStream(self,new_dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getLocalIStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Context_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Context_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + try { + result = (*arg1)->getLocalIStream(*arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getLocalIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getLocalIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getLocalIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_getLocalIStream'"); + XSRETURN(0); +} + + +XS(_wrap_Context_getIOStream__SWIG_0) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_getIOStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getIOStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_getIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIOStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getIOStream__SWIG_1) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getIOStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getIOStream" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + try { + result = (*arg1)->getIOStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Context_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Context_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_Context_checkOpenModeSupported) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Context_checkOpenModeSupported(self,userm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_checkOpenModeSupported" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Context_checkOpenModeSupported" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = (bool)(*arg1)->checkOpenModeSupported(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getSupportedOpenModes) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::ferris_ios::openmode)(*arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getDirPath) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getDirPath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getDirPath" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + try { + result = (*arg1)->getDirPath(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getSubContextCount) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getSubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getSubContextCount" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (int)(*arg1)->getSubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_empty) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_empty(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_empty" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (bool)(*arg1)->empty(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_MedallionUpdated_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_MedallionUpdated_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_MedallionUpdated_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *) &(*arg1)->getNamingEvent_MedallionUpdated_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_Ferris__fh_context_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Changed_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Changed_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *) &(*arg1)->getNamingEvent_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Deleted_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Deleted_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Deleted_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *) &(*arg1)->getNamingEvent_Deleted_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Start_Execute_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Start_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Start_Execute_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *) &(*arg1)->getNamingEvent_Start_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Stop_Execute_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Stop_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Stop_Execute_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *) &(*arg1)->getNamingEvent_Stop_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Created_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Created_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Created_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *) &(*arg1)->getNamingEvent_Created_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Moved_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Moved_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Moved_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *) &(*arg1)->getNamingEvent_Moved_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Exists_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Exists_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Exists_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *) &(*arg1)->getNamingEvent_Exists_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Start_Reading_Context_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Start_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Start_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *) &(*arg1)->getNamingEvent_Start_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getNamingEvent_Stop_Reading_Context_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getNamingEvent_Stop_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getNamingEvent_Stop_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *) &(*arg1)->getNamingEvent_Stop_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Context_getContextEvent_Headers_Received_Sig) { + { + Ferris::fh_context *arg1 = (Ferris::fh_context *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Context_getContextEvent_Headers_Received_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Context_getContextEvent_Headers_Received_Sig" "', argument " "1"" of type '" "Ferris::fh_context *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + result = (Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *) &(*arg1)->getContextEvent_Headers_Received_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy___deref__) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::AttributeProxy *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy___deref__" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (Ferris::AttributeProxy *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeProxy, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_AddRef) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_AddRef" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_Release) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_Release" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getIStream__SWIG_0) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_getIStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getIStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AttributeProxy_getIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getIStream__SWIG_1) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getIStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getIStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + try { + result = (*arg1)->getIStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeProxy_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeProxy_getLocalIStream__SWIG_0) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + std::string *arg2 = 0 ; + Ferris::ferris_ios::openmode arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned long long val3 ; + int ecode3 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeProxy_getLocalIStream(self,new_dn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getLocalIStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AttributeProxy_getLocalIStream" "', argument " "3"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg3 = static_cast< Ferris::ferris_ios::openmode >(val3); + try { + result = (*arg1)->getLocalIStream(*arg2,arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getLocalIStream__SWIG_1) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_getLocalIStream(self,new_dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getLocalIStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + try { + result = (*arg1)->getLocalIStream(*arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getLocalIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getLocalIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getLocalIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeProxy_getLocalIStream'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeProxy_getIOStream__SWIG_0) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_getIOStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getIOStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AttributeProxy_getIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIOStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getIOStream__SWIG_1) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getIOStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getIOStream" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + try { + result = (*arg1)->getIOStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeProxy_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeProxy_getDirName) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getDirName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getDirName" "', argument " "1"" of type '" "Ferris::fh_attribute const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (std::string *) &(*arg1)->getDirName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getDirPath) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getDirPath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getDirPath" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + try { + result = (*arg1)->getDirPath(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_checkOpenModeSupported) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_checkOpenModeSupported(self,userm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_checkOpenModeSupported" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AttributeProxy_checkOpenModeSupported" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = (bool)(*arg1)->checkOpenModeSupported(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getSupportedOpenModes) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (Ferris::ferris_ios::openmode)(*arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getLastPartOfName) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_getLastPartOfName(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getLastPartOfName" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getLastPartOfName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_appendToPath__SWIG_0) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeProxy_appendToPath(self,p,d,allowDirToBeAbsolute);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_appendToPath" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeProxy_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AttributeProxy_appendToPath" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_appendToPath__SWIG_1) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeProxy_appendToPath(self,p,d);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_appendToPath" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeProxy_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_appendToPath) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_appendToPath__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_appendToPath__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeProxy_appendToPath'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeProxy_getParent) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Attribute::Parent_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getParent(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getParent" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + try { + result = (Ferris::Attribute::Parent_t)(*arg1)->getParent(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_isParentBound) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_isParentBound(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_isParentBound" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (bool)(*arg1)->isParentBound(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_copyTo__SWIG_0) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_copyTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_copyTo" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_copyTo" "', argument " "2"" of type '" "Ferris::fh_iostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_copyTo" "', argument " "2"" of type '" "Ferris::fh_iostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_iostream * >(argp2)); + } + } + result = (*arg1)->copyTo(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_copyTo__SWIG_1) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeProxy_copyTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_copyTo" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeProxy_copyTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeProxy_copyTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + result = (*arg1)->copyTo(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_copyTo) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_copyTo__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeProxy_copyTo__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'AttributeProxy_copyTo'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeProxy_private_AboutToBeDeleted) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getReferenceCount) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeProxy_getGenericCloseSig) { + { + Ferris::fh_attribute *arg1 = (Ferris::fh_attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeProxy_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeProxy_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attribute * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection___deref__) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::AttributeCollection *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection___deref__" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (Ferris::AttributeCollection *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeCollection, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getIsNativeContext) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getIsNativeContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getIsNativeContext" "', argument " "1"" of type '" "Ferris::fh_attrcol const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (bool)(*arg1)->getIsNativeContext(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getAttribute) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_getAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getAttribute((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getAttributeNames) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + Ferris::AttributeCollection::AttributeNames_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + Ferris::AttributeCollection::AttributeNames_t *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_getAttributeNames(self,ret);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getAttributeNames" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_getAttributeNames" "', argument " "2"" of type '" "Ferris::AttributeCollection::AttributeNames_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_getAttributeNames" "', argument " "2"" of type '" "Ferris::AttributeCollection::AttributeNames_t &""'"); + } + arg2 = reinterpret_cast< Ferris::AttributeCollection::AttributeNames_t * >(argp2); + result = (Ferris::AttributeCollection::AttributeNames_t *) &(*arg1)->getAttributeNames(*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getAttributeCount) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getAttributeCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getAttributeCount" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (int)(*arg1)->getAttributeCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_isAttributeBound__SWIG_0) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_isAttributeBound(self,rdn,createIfNotThere);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_isAttributeBound" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AttributeCollection_isAttributeBound" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2,arg3); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_isAttributeBound__SWIG_1) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_isAttributeBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_isAttributeBound" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_isAttributeBound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_isAttributeBound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_isAttributeBound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeCollection_isAttributeBound'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeCollection_dumpAttributeNames) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_dumpAttributeNames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_dumpAttributeNames" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + (*arg1)->dumpAttributeNames(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_0) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + XSDBasic_t arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_1) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + XSDBasic_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3,arg4); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_2) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_9) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg4 = 0 ; + Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *arg5 = 0 ; + XSDBasic_t arg6 ; + bool arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + void *argp6 ; + int res6 = 0 ; + bool val7 ; + int ecode7 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 7) || (items > 7)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f_i,f_io,f_closed,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg4 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp4); + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + arg5 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t * >(argp5); + { + res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "AttributeCollection_addAttribute" "', argument " "6"" of type '" "XSDBasic_t""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "6"" of type '" "XSDBasic_t""'"); + } else { + arg6 = *(reinterpret_cast< XSDBasic_t * >(argp6)); + } + } + ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "AttributeCollection_addAttribute" "', argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg4,(Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &)*arg5,arg6,arg7); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_10) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg4 = 0 ; + Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *arg5 = 0 ; + XSDBasic_t arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + void *argp6 ; + int res6 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f_i,f_io,f_closed,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg4 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp4); + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + arg5 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t * >(argp5); + { + res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "AttributeCollection_addAttribute" "', argument " "6"" of type '" "XSDBasic_t""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "6"" of type '" "XSDBasic_t""'"); + } else { + arg6 = *(reinterpret_cast< XSDBasic_t * >(argp6)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg4,(Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &)*arg5,arg6); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_11) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *arg3 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg4 = 0 ; + Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,f_i,f_io,f_closed);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadOnly::GetIStream_Func_t * >(argp3); + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg4 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp4); + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + arg5 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t * >(argp5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(Ferris::EA_Atom_ReadOnly::GetIStream_Func_t const &)*arg3,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg4,(Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &)*arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_18) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + XSDBasic_t arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_19) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + XSDBasic_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_20) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_21) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + XSDBasic_t arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_22) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + XSDBasic_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3,arg4); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_23) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_24) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + XSDBasic_t arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(char const *)arg3,arg4,arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_25) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + XSDBasic_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(char const *)arg3,arg4); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_26) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,(char const *)arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_27) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + XSDBasic_t arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,atom,sct,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AttributeCollection_addAttribute" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_28) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + XSDBasic_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,atom,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "4"" of type '" "XSDBasic_t""'"); + } else { + arg4 = *(reinterpret_cast< XSDBasic_t * >(argp4)); + } + } + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3,arg4); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute__SWIG_29) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_addAttribute(self,rdn,atom);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_addAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_addAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_addAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + result = (bool)(*arg1)->addAttribute((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_addAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 9; + if (_rank == _rankm) goto dispatch; + } + } + check_9: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 10; + if (_rank == _rankm) goto dispatch; + } + } + check_10: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_11; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_11; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_11; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_11; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_11; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 11; + if (_rank == _rankm) goto dispatch; + } + } + check_11: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_12; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_12; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_12; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_12; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_12; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 12; + if (_rank == _rankm) goto dispatch; + } + } + check_12: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_13; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_13; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_13; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_13; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_13; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 13; + if (_rank == _rankm) goto dispatch; + } + } + check_13: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_14; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_14; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_14; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_14; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_14; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 14; + if (_rank == _rankm) goto dispatch; + } + } + check_14: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_15; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_15; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_15; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_15; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_15; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 15; + if (_rank == _rankm) goto dispatch; + } + } + check_15: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_16; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_16; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_16; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_16; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_16; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 16; + if (_rank == _rankm) goto dispatch; + } + } + check_16: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_17; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 17; + if (_rank == _rankm) goto dispatch; + } + } + check_17: + + if (items == 7) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_18; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 18; + if (_rank == _rankm) goto dispatch; + } + } + check_18: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_29); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_20); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_26); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_23); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_1); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_28); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_19); return; + case 9: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_25); return; + case 10: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_22); return; + case 11: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_11); return; + case 12: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_27); return; + case 13: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_0); return; + case 14: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_18); return; + case 15: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_21); return; + case 16: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_24); return; + case 17: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_10); return; + case 18: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_addAttribute__SWIG_9); return; + } + } + + croak("No matching function for overloaded 'AttributeCollection_addAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeCollection_setAttribute__SWIG_0) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + XSDBasic_t arg5 ; + bool arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + void *argp5 ; + int res5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: AttributeCollection_setAttribute(self,rdn,atx,addToREA,sct,isStateLess);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_setAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AttributeCollection_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "AttributeCollection_setAttribute" "', argument " "5"" of type '" "XSDBasic_t""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setAttribute" "', argument " "5"" of type '" "XSDBasic_t""'"); + } else { + arg5 = *(reinterpret_cast< XSDBasic_t * >(argp5)); + } + } + ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "AttributeCollection_setAttribute" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5,arg6); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_setAttribute__SWIG_1) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + XSDBasic_t arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: AttributeCollection_setAttribute(self,rdn,atx,addToREA,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_setAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AttributeCollection_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_XSDBasic_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "AttributeCollection_setAttribute" "', argument " "5"" of type '" "XSDBasic_t""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setAttribute" "', argument " "5"" of type '" "XSDBasic_t""'"); + } else { + arg5 = *(reinterpret_cast< XSDBasic_t * >(argp5)); + } + } + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_setAttribute__SWIG_2) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: AttributeCollection_setAttribute(self,rdn,atx,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_setAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AttributeCollection_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_setAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_attrcol, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_XSDBasic_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_setAttribute__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_setAttribute__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AttributeCollection_setAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'AttributeCollection_setAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_AttributeCollection_expandEAName) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_expandEAName(self,s,expandInternalFerrisNamespaces);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_expandEAName" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_expandEAName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_expandEAName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AttributeCollection_expandEAName" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = (*arg1)->expandEAName((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_setNamespace) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AttributeCollection_setNamespace(self,prefix,URI);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_setNamespace" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_setNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AttributeCollection_setNamespace" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_setNamespace" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + (*arg1)->setNamespace((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_resolveNamespace) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_resolveNamespace(self,prefix);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_resolveNamespace" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_resolveNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_resolveNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->resolveNamespace((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_removeNamespace) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_removeNamespace(self,prefix);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_removeNamespace" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_removeNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_removeNamespace" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->removeNamespace((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getNamespacePrefixes) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getNamespacePrefixes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getNamespacePrefixes" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->getNamespacePrefixes(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_isStatelessAttributeBound) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_isStatelessAttributeBound(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_isStatelessAttributeBound" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_isStatelessAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_isStatelessAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (bool)(*arg1)->isStatelessAttributeBound((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_unsetAttribute) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AttributeCollection_unsetAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_unsetAttribute" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AttributeCollection_unsetAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttributeCollection_unsetAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->unsetAttribute((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getMTime) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getMTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getMTime" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->getMTime(); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getRDFCacheMTime) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getRDFCacheMTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getRDFCacheMTime" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->getRDFCacheMTime(); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getVersion) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Versioned::Version_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getVersion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getVersion" "', argument " "1"" of type '" "Ferris::fh_attrcol const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->getVersion(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Versioned::Version_t(static_cast< const Ferris::Versioned::Version_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_private_AboutToBeDeleted) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_AddRef) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_AddRef" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_Release) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_Release" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getReferenceCount) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AttributeCollection_getGenericCloseSig) { + { + Ferris::fh_attrcol *arg1 = (Ferris::fh_attrcol *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: AttributeCollection_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_attrcol, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttributeCollection_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_attrcol *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_attrcol * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner___deref__) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Runner *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner___deref__" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (Ferris::Runner *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Runner, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_operator_assignment) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + Ferris::Runner *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::Runner *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_operator_assignment(self,Ferris::Runner const &);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_operator_assignment" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Runner, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_operator_assignment" "', argument " "2"" of type '" "Ferris::Runner const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_operator_assignment" "', argument " "2"" of type '" "Ferris::Runner const &""'"); + } + arg2 = reinterpret_cast< Ferris::Runner * >(argp2); + result = (Ferris::Runner *) &(*arg1)->operator =((Ferris::Runner const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Runner, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setCommandLine) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setCommandLine(self,cmdline);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setCommandLine" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_setCommandLine" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_setCommandLine" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setCommandLine((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_pushCommandLineArg) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_pushCommandLineArg(self,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_pushCommandLineArg" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_pushCommandLineArg" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_pushCommandLineArg" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->pushCommandLineArg((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getArgv) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Runner::ArgArray_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getArgv(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getArgv" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (Ferris::Runner::ArgArray_t *) &(*arg1)->getArgv(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, 0 | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getEnvp) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Runner::ArgArray_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getEnvp(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getEnvp" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (Ferris::Runner::ArgArray_t *) &(*arg1)->getEnvp(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, 0 | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_argvPushPath) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_argvPushPath(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_argvPushPath" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_argvPushPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_argvPushPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->argvPushPath((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setSpawnFlags) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + GSpawnFlags arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setSpawnFlags(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setSpawnFlags" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_GSpawnFlags, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_setSpawnFlags" "', argument " "2"" of type '" "GSpawnFlags""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_setSpawnFlags" "', argument " "2"" of type '" "GSpawnFlags""'"); + } else { + arg2 = *(reinterpret_cast< GSpawnFlags * >(argp2)); + } + } + (*arg1)->setSpawnFlags(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getSpawnFlags) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + GSpawnFlags result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getSpawnFlags(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getSpawnFlags" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getSpawnFlags(); + ST(argvi) = SWIG_NewPointerObj((new GSpawnFlags(static_cast< const GSpawnFlags& >(result))), SWIGTYPE_p_GSpawnFlags, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setWorkingDir) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setWorkingDir(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setWorkingDir" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Runner_setWorkingDir" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + (*arg1)->setWorkingDir(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdIn__SWIG_0) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_getStdIn(self,AutoCloseFDOnStreamBufDtor);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdIn" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_getStdIn" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (*arg1)->getStdIn(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdIn__SWIG_1) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdIn(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdIn" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getStdIn(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdIn) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdIn__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdIn__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Runner_getStdIn'"); + XSRETURN(0); +} + + +XS(_wrap_Runner_getStdOut__SWIG_0) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_getStdOut(self,AutoCloseFDOnStreamBufDtor);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_getStdOut" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (*arg1)->getStdOut(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdOut__SWIG_1) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdOut(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getStdOut(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdOut) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdOut__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdOut__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Runner_getStdOut'"); + XSRETURN(0); +} + + +XS(_wrap_Runner_getStdErr__SWIG_0) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_getStdErr(self,AutoCloseFDOnStreamBufDtor);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdErr" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_getStdErr" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (*arg1)->getStdErr(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdErr__SWIG_1) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdErr(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdErr" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getStdErr(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdErr) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdErr__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_getStdErr__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Runner_getStdErr'"); + XSRETURN(0); +} + + +XS(_wrap_Runner_getStdInFd) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdInFd(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdInFd" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (int)(*arg1)->getStdInFd(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdOutFd) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdOutFd(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdOutFd" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (int)(*arg1)->getStdOutFd(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getStdErrFd) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getStdErrFd(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getStdErrFd" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (int)(*arg1)->getStdErrFd(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getChildProcessID) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + pid_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getChildProcessID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getChildProcessID" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getChildProcessID(); + ST(argvi) = SWIG_NewPointerObj((new pid_t(static_cast< const pid_t& >(result))), SWIGTYPE_p_pid_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_signalChild__SWIG_0) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_signalChild(self,sig);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_signalChild" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_signalChild" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + (*arg1)->signalChild(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_signalChild__SWIG_1) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_signalChild(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_signalChild" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->signalChild(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_signalChild) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_runner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_signalChild__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Runner_signalChild__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Runner_signalChild'"); + XSRETURN(0); +} + + +XS(_wrap_Runner_killChild) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_killChild(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_killChild" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->killChild(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getExitStatus) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + gint result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getExitStatus(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getExitStatus" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getExitStatus(); + ST(argvi) = SWIG_NewPointerObj((new gint(static_cast< const gint& >(result))), SWIGTYPE_p_gint, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_closeChildStdOut) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_closeChildStdOut(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_closeChildStdOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->closeChildStdOut(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_closeChildStdErr) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_closeChildStdErr(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_closeChildStdErr" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->closeChildStdErr(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_closeChildStdIn) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_closeChildStdIn(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_closeChildStdIn" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->closeChildStdIn(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setConnect_ChildStdOut_To_ParentStdOut) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setConnect_ChildStdOut_To_ParentStdOut(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setConnect_ChildStdOut_To_ParentStdOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_setConnect_ChildStdOut_To_ParentStdOut" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setConnect_ChildStdOut_To_ParentStdOut(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setConnect_ChildStdErr_To_ParentStdErr) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setConnect_ChildStdErr_To_ParentStdErr(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setConnect_ChildStdErr_To_ParentStdErr" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_setConnect_ChildStdErr_To_ParentStdErr" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setConnect_ChildStdErr_To_ParentStdErr(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setExitStatus) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + gint arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setExitStatus(self,status);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setExitStatus" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gint, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_setExitStatus" "', argument " "2"" of type '" "gint""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_setExitStatus" "', argument " "2"" of type '" "gint""'"); + } else { + arg2 = *(reinterpret_cast< gint * >(argp2)); + } + } + (*arg1)->setExitStatus(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setConnectStdIn) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setConnectStdIn(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setConnectStdIn" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_setConnectStdIn" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setConnectStdIn(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setWaitTimeOut) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setWaitTimeOut(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setWaitTimeOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_setWaitTimeOut" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + (*arg1)->setWaitTimeOut(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setInheritENV) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setInheritENV(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setInheritENV" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Runner_setInheritENV" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setInheritENV(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getErrorString) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getErrorString(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getErrorString" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getErrorString(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner___call__) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner___call__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner___call__" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->operator ()(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_Run) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_Run(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_Run" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->Run(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_RunWithStdoutAsReadablePipe) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_RunWithStdoutAsReadablePipe(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_RunWithStdoutAsReadablePipe" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->RunWithStdoutAsReadablePipe(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getDescription) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getDescription(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getDescription" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getDescription(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_setChildSetupFunctor) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + Ferris::Runner::ChildSetupFunctor_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_setChildSetupFunctor(self,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_setChildSetupFunctor" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_setChildSetupFunctor" "', argument " "2"" of type '" "Ferris::Runner::ChildSetupFunctor_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_setChildSetupFunctor" "', argument " "2"" of type '" "Ferris::Runner::ChildSetupFunctor_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::Runner::ChildSetupFunctor_t * >(argp2); + (*arg1)->setChildSetupFunctor((Ferris::Runner::ChildSetupFunctor_t const &)*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_executeAndReturnStdOut) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Runner_executeAndReturnStdOut(self,ret);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_executeAndReturnStdOut" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Runner_executeAndReturnStdOut" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Runner_executeAndReturnStdOut" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + result = (int)(*arg1)->executeAndReturnStdOut(*arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_private_AboutToBeDeleted) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_AddRef) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_AddRef" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_Release) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_Release" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getReferenceCount) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Runner_getGenericCloseSig) { + { + Ferris::fh_runner *arg1 = (Ferris::fh_runner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Runner_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_runner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Runner_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_runner *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_PreprocessedSortString___deref__) { + { + Ferris::fh_sorter *arg1 = (Ferris::fh_sorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::PreprocessedSortString *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: PreprocessedSortString___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_sorter, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreprocessedSortString___deref__" "', argument " "1"" of type '" "Ferris::fh_sorter *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_sorter * >(argp1); + result = (Ferris::PreprocessedSortString *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__PreprocessedSortString, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem___deref__) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem___deref__" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Emblem, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getID) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblemID_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getID" "', argument " "1"" of type '" "Ferris::fh_emblem const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getID(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblemID_t(static_cast< const Ferris::emblemID_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getParents) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getParents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getParents" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getParents(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getChildren) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getChildren" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getChildren(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_hasChildren) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_hasChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_hasChildren" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (bool)(*arg1)->hasChildren(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_forceUpdateParentsAndChildrenIDs) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_forceUpdateParentsAndChildrenIDs(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_forceUpdateParentsAndChildrenIDs" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + (*arg1)->forceUpdateParentsAndChildrenIDs(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getUpset) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblems_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getUpset(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getUpset" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::emblems_t *) &(*arg1)->getUpset(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getDownset) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getDownset(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getDownset" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getDownset(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getPossibleParents) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getPossibleParents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getPossibleParents" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getPossibleParents(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getPossibleChildren) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getPossibleChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getPossibleChildren" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getPossibleChildren(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_hasParent) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_hasParent(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_hasParent" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_hasParent" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_hasParent" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasParent(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_hasChild) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_hasChild(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_hasChild" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_hasChild" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_hasChild" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasChild(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_obtainChild) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_obtainChild(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_obtainChild" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_obtainChild" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_obtainChild" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->obtainChild((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_obtainChild_EAOrdering) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_obtainChild_EAOrdering(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_obtainChild_EAOrdering" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_obtainChild_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_obtainChild_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->obtainChild_EAOrdering((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_findChild) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_findChild(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_findChild" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_findChild" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_findChild" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->findChild((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getUniqueName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getUniqueName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getUniqueName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getUniqueName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getIconName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getIconName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getIconName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getIconName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getMenuSizedIconName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getMenuSizedIconName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getMenuSizedIconName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getMenuSizedIconName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getDescription) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getDescription(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getDescription" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getDescription(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setIconName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setIconName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setIconName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_setIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_setIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setIconName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setMenuSizedIconName) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setMenuSizedIconName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setMenuSizedIconName" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_setMenuSizedIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_setMenuSizedIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setMenuSizedIconName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setDescription) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setDescription(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setDescription" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_setDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_setDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setDescription((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getDigitalLatitude) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getDigitalLatitude(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getDigitalLatitude" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (double)(*arg1)->getDigitalLatitude(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getDigitalLongitude) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getDigitalLongitude(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getDigitalLongitude" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (double)(*arg1)->getDigitalLongitude(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getZoomRange) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getZoomRange(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getZoomRange" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (double)(*arg1)->getZoomRange(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setDigitalLatitude) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setDigitalLatitude(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setDigitalLatitude" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Emblem_setDigitalLatitude" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setDigitalLatitude(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setDigitalLongitude) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setDigitalLongitude(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setDigitalLongitude" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Emblem_setDigitalLongitude" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setDigitalLongitude(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setZoomRange) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setZoomRange(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setZoomRange" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Emblem_setZoomRange" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setZoomRange(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getLimitedViewPriority) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::limitedViewPri_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getLimitedViewPriority(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getLimitedViewPriority" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::limitedViewPri_t)(*arg1)->getLimitedViewPriority(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_setLimitedViewPriority) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + Ferris::Emblem::limitedViewPri_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_setLimitedViewPriority(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_setLimitedViewPriority" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Emblem_setLimitedViewPriority" "', argument " "2"" of type '" "Ferris::Emblem::limitedViewPri_t""'"); + } + arg2 = static_cast< Ferris::Emblem::limitedViewPri_t >(val2); + (*arg1)->setLimitedViewPriority(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getIconName_Changed_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::IconName_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getIconName_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getIconName_Changed_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::IconName_Changed_Sig_t *) &(*arg1)->getIconName_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getMenuSizedIconName_Changed_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::IconName_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getMenuSizedIconName_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getMenuSizedIconName_Changed_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::IconName_Changed_Sig_t *) &(*arg1)->getMenuSizedIconName_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getAddedParent_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::AddedParent_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getAddedParent_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getAddedParent_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::AddedParent_Sig_t *) &(*arg1)->getAddedParent_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getAddedChild_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::AddedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getAddedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getAddedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::AddedChild_Sig_t *) &(*arg1)->getAddedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getRemovedParent_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::RemovedParent_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getRemovedParent_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getRemovedParent_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::RemovedParent_Sig_t *) &(*arg1)->getRemovedParent_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getRemovedChild_Sig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::RemovedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getRemovedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getRemovedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (Ferris::Emblem::RemovedChild_Sig_t *) &(*arg1)->getRemovedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_dumpTo) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Emblem_dumpTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_dumpTo" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Emblem_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Emblem_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (*arg1)->dumpTo(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_isTransitiveChildOfEAOrderingRootEmblem) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_isTransitiveChildOfEAOrderingRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_isTransitiveChildOfEAOrderingRootEmblem" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (bool)(*arg1)->isTransitiveChildOfEAOrderingRootEmblem(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + (*arg1)->forceUpdateTransitiveChildOfEAOrderingRootEmblem(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_private_AboutToBeDeleted) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_AddRef) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_AddRef" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_Release) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_Release" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getReferenceCount) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Emblem_getGenericCloseSig) { + { + Ferris::fh_emblem *arg1 = (Ferris::fh_emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Emblem_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Emblem_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem___deref__) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ColdEmblem *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem___deref__" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::ColdEmblem *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ColdEmblem, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getID) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblemID_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getID" "', argument " "1"" of type '" "Ferris::fh_cemblem const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getID(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblemID_t(static_cast< const Ferris::emblemID_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getParents) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getParents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getParents" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getParents(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getChildren) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getChildren" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getChildren(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_hasChildren) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_hasChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_hasChildren" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (bool)(*arg1)->hasChildren(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_forceUpdateParentsAndChildrenIDs) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_forceUpdateParentsAndChildrenIDs(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_forceUpdateParentsAndChildrenIDs" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + (*arg1)->forceUpdateParentsAndChildrenIDs(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getUpset) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblems_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getUpset(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getUpset" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::emblems_t *) &(*arg1)->getUpset(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getDownset) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getDownset(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getDownset" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getDownset(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getPossibleParents) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getPossibleParents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getPossibleParents" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getPossibleParents(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getPossibleChildren) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getPossibleChildren(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getPossibleChildren" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getPossibleChildren(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_hasParent) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_hasParent(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_hasParent" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_hasParent" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_hasParent" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasParent(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_hasChild) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_hasChild(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_hasChild" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_hasChild" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_hasChild" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasChild(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_obtainChild) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_obtainChild(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_obtainChild" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_obtainChild" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_obtainChild" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->obtainChild((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_obtainChild_EAOrdering) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_obtainChild_EAOrdering(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_obtainChild_EAOrdering" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_obtainChild_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_obtainChild_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->obtainChild_EAOrdering((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_findChild) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_findChild(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_findChild" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_findChild" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_findChild" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->findChild((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getUniqueName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getUniqueName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getUniqueName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getUniqueName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getIconName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getIconName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getIconName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getIconName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getMenuSizedIconName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getMenuSizedIconName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getMenuSizedIconName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getMenuSizedIconName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getDescription) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getDescription(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getDescription" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getDescription(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setIconName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setIconName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setIconName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_setIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_setIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setIconName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setMenuSizedIconName) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setMenuSizedIconName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setMenuSizedIconName" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_setMenuSizedIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_setMenuSizedIconName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setMenuSizedIconName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setDescription) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setDescription(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setDescription" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_setDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_setDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->setDescription((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getDigitalLatitude) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getDigitalLatitude(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getDigitalLatitude" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (double)(*arg1)->getDigitalLatitude(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getDigitalLongitude) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getDigitalLongitude(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getDigitalLongitude" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (double)(*arg1)->getDigitalLongitude(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getZoomRange) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getZoomRange(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getZoomRange" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (double)(*arg1)->getZoomRange(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setDigitalLatitude) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setDigitalLatitude(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setDigitalLatitude" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColdEmblem_setDigitalLatitude" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setDigitalLatitude(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setDigitalLongitude) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setDigitalLongitude(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setDigitalLongitude" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColdEmblem_setDigitalLongitude" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setDigitalLongitude(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setZoomRange) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setZoomRange(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setZoomRange" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColdEmblem_setZoomRange" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (*arg1)->setZoomRange(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getLimitedViewPriority) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::limitedViewPri_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getLimitedViewPriority(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getLimitedViewPriority" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::limitedViewPri_t)(*arg1)->getLimitedViewPriority(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_setLimitedViewPriority) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + Ferris::Emblem::limitedViewPri_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_setLimitedViewPriority(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_setLimitedViewPriority" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColdEmblem_setLimitedViewPriority" "', argument " "2"" of type '" "Ferris::Emblem::limitedViewPri_t""'"); + } + arg2 = static_cast< Ferris::Emblem::limitedViewPri_t >(val2); + (*arg1)->setLimitedViewPriority(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getIconName_Changed_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::IconName_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getIconName_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getIconName_Changed_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::IconName_Changed_Sig_t *) &(*arg1)->getIconName_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getMenuSizedIconName_Changed_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::IconName_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getMenuSizedIconName_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getMenuSizedIconName_Changed_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::IconName_Changed_Sig_t *) &(*arg1)->getMenuSizedIconName_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getAddedParent_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::AddedParent_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getAddedParent_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getAddedParent_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::AddedParent_Sig_t *) &(*arg1)->getAddedParent_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getAddedChild_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::AddedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getAddedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getAddedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::AddedChild_Sig_t *) &(*arg1)->getAddedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getRemovedParent_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::RemovedParent_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getRemovedParent_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getRemovedParent_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::RemovedParent_Sig_t *) &(*arg1)->getRemovedParent_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getRemovedChild_Sig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::RemovedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getRemovedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getRemovedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (Ferris::Emblem::RemovedChild_Sig_t *) &(*arg1)->getRemovedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_dumpTo) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ColdEmblem_dumpTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_dumpTo" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColdEmblem_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColdEmblem_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (*arg1)->dumpTo(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_isTransitiveChildOfEAOrderingRootEmblem) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_isTransitiveChildOfEAOrderingRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_isTransitiveChildOfEAOrderingRootEmblem" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (bool)(*arg1)->isTransitiveChildOfEAOrderingRootEmblem(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + (*arg1)->forceUpdateTransitiveChildOfEAOrderingRootEmblem(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_private_AboutToBeDeleted) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_AddRef) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_AddRef" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_Release) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_Release" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getReferenceCount) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ColdEmblem_getGenericCloseSig) { + { + Ferris::fh_cemblem *arg1 = (Ferris::fh_cemblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ColdEmblem_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_cemblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColdEmblem_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_cemblem *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_cemblem * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere___deref__) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Etagere *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere___deref__" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (Ferris::Etagere *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Etagere, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_sync) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_sync(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_sync" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + (*arg1)->sync(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAllEmblemsWithName__SWIG_0) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::emblems_t *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::emblems_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Etagere_getAllEmblemsWithName(self,ret,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "2"" of type '" "Ferris::emblems_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getAllEmblemsWithName" "', argument " "2"" of type '" "Ferris::emblems_t &""'"); + } + arg2 = reinterpret_cast< Ferris::emblems_t * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getAllEmblemsWithName" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::emblems_t *) &(*arg1)->getAllEmblemsWithName(*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAllEmblemsWithName__SWIG_1) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::emblemset_t *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::emblemset_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Etagere_getAllEmblemsWithName(self,ret,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "2"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getAllEmblemsWithName" "', argument " "2"" of type '" "Ferris::emblemset_t &""'"); + } + arg2 = reinterpret_cast< Ferris::emblemset_t * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Etagere_getAllEmblemsWithName" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getAllEmblemsWithName" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::emblemset_t *) &(*arg1)->getAllEmblemsWithName(*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAllEmblemsWithName) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_getAllEmblemsWithName__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_getAllEmblemsWithName__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Etagere_getAllEmblemsWithName'"); + XSRETURN(0); +} + + +XS(_wrap_Etagere_obtainEmblemByName) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_obtainEmblemByName(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_obtainEmblemByName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_obtainEmblemByName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_obtainEmblemByName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->obtainEmblemByName((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getEmblemByName) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_getEmblemByName(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getEmblemByName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_getEmblemByName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getEmblemByName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getEmblemByName((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getEmblemByUniqueName) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_getEmblemByUniqueName(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getEmblemByUniqueName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_getEmblemByUniqueName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getEmblemByUniqueName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getEmblemByUniqueName((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getEmblemByID) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::emblemID_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_getEmblemByID(self,id);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getEmblemByID" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_guint32, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_getEmblemByID" "', argument " "2"" of type '" "Ferris::emblemID_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_getEmblemByID" "', argument " "2"" of type '" "Ferris::emblemID_t""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::emblemID_t * >(argp2)); + } + } + result = (*arg1)->getEmblemByID(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAllEmblems) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getAllEmblems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getAllEmblems" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getAllEmblems(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAllEmblemsUniqueName) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getAllEmblemsUniqueName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getAllEmblemsUniqueName" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getAllEmblemsUniqueName(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_visitAllEmblems) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::Etagere::f_emblemVisitor *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_visitAllEmblems(self,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_visitAllEmblems" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_visitAllEmblems" "', argument " "2"" of type '" "Ferris::Etagere::f_emblemVisitor const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_visitAllEmblems" "', argument " "2"" of type '" "Ferris::Etagere::f_emblemVisitor const &""'"); + } + arg2 = reinterpret_cast< Ferris::Etagere::f_emblemVisitor * >(argp2); + (*arg1)->visitAllEmblems((Ferris::Etagere::f_emblemVisitor const &)*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getOntologyID) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getOntologyID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getOntologyID" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getOntologyID(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getLowestEmblemPriorityToShow) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Emblem::limitedViewPri_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getLowestEmblemPriorityToShow(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getLowestEmblemPriorityToShow" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (Ferris::Emblem::limitedViewPri_t)(*arg1)->getLowestEmblemPriorityToShow(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_setLowestEmblemPriorityToShow) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::Emblem::limitedViewPri_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_setLowestEmblemPriorityToShow(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_setLowestEmblemPriorityToShow" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Etagere_setLowestEmblemPriorityToShow" "', argument " "2"" of type '" "Ferris::Emblem::limitedViewPri_t""'"); + } + arg2 = static_cast< Ferris::Emblem::limitedViewPri_t >(val2); + (*arg1)->setLowestEmblemPriorityToShow(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_erase) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_erase(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_erase" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_erase" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_erase" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + (*arg1)->erase(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_dumpTo) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_dumpTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_dumpTo" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_dumpTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (*arg1)->dumpTo(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_createColdEmblem__SWIG_0) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_cemblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_createColdEmblem(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_createColdEmblem" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_createColdEmblem" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_createColdEmblem" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->createColdEmblem((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_cemblem(static_cast< const Ferris::fh_cemblem& >(result))), SWIGTYPE_p_Ferris__fh_cemblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_createColdEmblem__SWIG_1) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_cemblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_createColdEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_createColdEmblem" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->createColdEmblem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_cemblem(static_cast< const Ferris::fh_cemblem& >(result))), SWIGTYPE_p_Ferris__fh_cemblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_createColdEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_createColdEmblem__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_createColdEmblem__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Etagere_createColdEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Etagere_createColdEmblem_EAOrdering__SWIG_0) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_cemblem result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_createColdEmblem_EAOrdering(self,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_createColdEmblem_EAOrdering" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_createColdEmblem_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_createColdEmblem_EAOrdering" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->createColdEmblem_EAOrdering((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_cemblem(static_cast< const Ferris::fh_cemblem& >(result))), SWIGTYPE_p_Ferris__fh_cemblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_createColdEmblem_EAOrdering__SWIG_1) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_cemblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_createColdEmblem_EAOrdering(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_createColdEmblem_EAOrdering" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->createColdEmblem_EAOrdering(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_cemblem(static_cast< const Ferris::fh_cemblem& >(result))), SWIGTYPE_p_Ferris__fh_cemblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_createColdEmblem_EAOrdering) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_createColdEmblem_EAOrdering__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Etagere_createColdEmblem_EAOrdering__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Etagere_createColdEmblem_EAOrdering'"); + XSRETURN(0); +} + + +XS(_wrap_Etagere_getBasePath) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getBasePath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getBasePath" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getBasePath(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getDBPath) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getDBPath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getDBPath" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getDBPath(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getBoostSerializePath) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getBoostSerializePath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getBoostSerializePath" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getBoostSerializePath(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getBoostSerializePathTxt) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getBoostSerializePathTxt(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getBoostSerializePathTxt" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getBoostSerializePathTxt(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getEmblemCreated_Sig) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Etagere::EmblemCreated_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getEmblemCreated_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getEmblemCreated_Sig" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (Ferris::Etagere::EmblemCreated_Sig_t *) &(*arg1)->getEmblemCreated_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getAddedChild_Sig) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Etagere::AddedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getAddedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getAddedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (Ferris::Etagere::AddedChild_Sig_t *) &(*arg1)->getAddedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getRemovedChild_Sig) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Etagere::RemovedChild_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getRemovedChild_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getRemovedChild_Sig" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (Ferris::Etagere::RemovedChild_Sig_t *) &(*arg1)->getRemovedChild_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_OnOutOfProcNewEmblemNotification) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + std::set< Ferris::emblemID_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Etagere_OnOutOfProcNewEmblemNotification(self,eset);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_OnOutOfProcNewEmblemNotification" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__setT_guint32_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Etagere_OnOutOfProcNewEmblemNotification" "', argument " "2"" of type '" "std::set< Ferris::emblemID_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Etagere_OnOutOfProcNewEmblemNotification" "', argument " "2"" of type '" "std::set< Ferris::emblemID_t > &""'"); + } + arg2 = reinterpret_cast< std::set< Ferris::emblemID_t > * >(argp2); + (*arg1)->OnOutOfProcNewEmblemNotification(*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_private_AboutToBeDeleted) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_AddRef) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_AddRef" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_Release) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_Release" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getReferenceCount) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Etagere_getGenericCloseSig) { + { + Ferris::fh_etagere *arg1 = (Ferris::fh_etagere *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Etagere_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_etagere, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Etagere_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_etagere *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_etagere * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion___deref__) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Medallion *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion___deref__" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (Ferris::Medallion *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Medallion, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_addEmblem__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_addEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_addEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_addEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_addEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + (*arg1)->addEmblem(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_addEmblem__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + double val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Medallion_addEmblem(self,em,pers,judgementSureness);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_addEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_addEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_addEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_addEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_addEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Medallion_addEmblem" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + (*arg1)->addEmblem(arg2,arg3,arg4); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_addEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_addEmblem__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_addEmblem__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Medallion_addEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_retractEmblem__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_retractEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_retractEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_retractEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_retractEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + (*arg1)->retractEmblem(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_retractEmblem__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + double val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Medallion_retractEmblem(self,em,pers,judgementSureness);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_retractEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_retractEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_retractEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_retractEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_retractEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Medallion_retractEmblem" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + (*arg1)->retractEmblem(arg2,arg3,arg4); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_retractEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_retractEmblem__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_retractEmblem__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Medallion_retractEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_removeEmblem__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_removeEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_removeEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_removeEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_removeEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + (*arg1)->removeEmblem(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_removeEmblem__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Medallion_removeEmblem(self,em,pers);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_removeEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_removeEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_removeEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_removeEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_removeEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + (*arg1)->removeEmblem(arg2,arg3); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_removeEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_removeEmblem__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_removeEmblem__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Medallion_removeEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_hasEmblem__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_hasEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_hasEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_hasEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasEmblem(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_hasEmblem__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Medallion_hasEmblem(self,em,pers);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_hasEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_hasEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_hasEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + result = (bool)(*arg1)->hasEmblem(arg2,arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_hasEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_hasEmblem__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_hasEmblem__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Medallion_hasEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_hasRetractedEmblem) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_hasRetractedEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_hasRetractedEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_hasRetractedEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasRetractedEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasRetractedEmblem(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_ensureEmblem__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Medallion_ensureEmblem(self,em,has);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_ensureEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_ensureEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_ensureEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Medallion_ensureEmblem" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + (*arg1)->ensureEmblem(arg2,arg3); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_ensureEmblem__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + double arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + double val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: Medallion_ensureEmblem(self,em,pers,judgementSureness,has);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_ensureEmblem" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_ensureEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_ensureEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_ensureEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_ensureEmblem" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Medallion_ensureEmblem" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Medallion_ensureEmblem" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + (*arg1)->ensureEmblem(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_ensureEmblem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_ensureEmblem__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_ensureEmblem__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Medallion_ensureEmblem'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_getFuzzyBelief) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_getFuzzyBelief(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getFuzzyBelief" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_getFuzzyBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_getFuzzyBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (double)(*arg1)->getFuzzyBelief(arg2); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getListOfPersonalitiesWhoHaveOpinion) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_getListOfPersonalitiesWhoHaveOpinion(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getListOfPersonalitiesWhoHaveOpinion" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_getListOfPersonalitiesWhoHaveOpinion" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_getListOfPersonalitiesWhoHaveOpinion" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (*arg1)->getListOfPersonalitiesWhoHaveOpinion(arg2); + ST(argvi) = SWIG_NewPointerObj((new std::list< Ferris::fh_personality >(static_cast< const std::list< Ferris::fh_personality >& >(result))), SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getBelief__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_medallionBelief result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Medallion_getBelief(self,em,pers);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getBelief" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_getBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_getBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_getBelief" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_getBelief" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + result = (*arg1)->getBelief(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_medallionBelief(static_cast< const Ferris::fh_medallionBelief& >(result))), SWIGTYPE_p_Ferris__fh_medallionBelief, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getBelief__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_medallionBelief result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_getBelief(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getBelief" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_getBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_getBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (*arg1)->getBelief(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_medallionBelief(static_cast< const Ferris::fh_medallionBelief& >(result))), SWIGTYPE_p_Ferris__fh_medallionBelief, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getBelief) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getBelief__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getBelief__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Medallion_getBelief'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_hasBelief__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Medallion_hasBelief(self,em,p);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_hasBelief" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_hasBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Medallion_hasBelief" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasBelief" "', argument " "3"" of type '" "Ferris::fh_personality""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_personality * >(argp3)); + } + } + result = (bool)(*arg1)->hasBelief(arg2,arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_hasBelief__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_hasBelief(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_hasBelief" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Medallion_hasBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Medallion_hasBelief" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)(*arg1)->hasBelief(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_hasBelief) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_hasBelief__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_hasBelief__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Medallion_hasBelief'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_sync) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_sync(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_sync" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + (*arg1)->sync(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getMostSpecificEmblems__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::Emblem::limitedViewPri_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_getMostSpecificEmblems(self,cutoff);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getMostSpecificEmblems" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Medallion_getMostSpecificEmblems" "', argument " "2"" of type '" "Ferris::Emblem::limitedViewPri_t""'"); + } + arg2 = static_cast< Ferris::Emblem::limitedViewPri_t >(val2); + result = (*arg1)->getMostSpecificEmblems(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getMostSpecificEmblems__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_getMostSpecificEmblems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getMostSpecificEmblems" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (*arg1)->getMostSpecificEmblems(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getMostSpecificEmblems) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getMostSpecificEmblems__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getMostSpecificEmblems__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Medallion_getMostSpecificEmblems'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_getAllEmblems__SWIG_0) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + Ferris::Emblem::limitedViewPri_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Medallion_getAllEmblems(self,cutoff);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getAllEmblems" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Medallion_getAllEmblems" "', argument " "2"" of type '" "Ferris::Emblem::limitedViewPri_t""'"); + } + arg2 = static_cast< Ferris::Emblem::limitedViewPri_t >(val2); + result = (*arg1)->getAllEmblems(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getAllEmblems__SWIG_1) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_getAllEmblems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getAllEmblems" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (*arg1)->getAllEmblems(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getAllEmblems) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_medallion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getAllEmblems__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Medallion_getAllEmblems__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Medallion_getAllEmblems'"); + XSRETURN(0); +} + + +XS(_wrap_Medallion_reload) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_reload(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_reload" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + (*arg1)->reload(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getOnlyInCacheSignal) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::CacheHandlable::OnlyInCacheSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_getOnlyInCacheSignal(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getOnlyInCacheSignal" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (Ferris::CacheHandlable::OnlyInCacheSignal_t *) &(*arg1)->getOnlyInCacheSignal(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_Ferris__CacheHandlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_AddRef) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_AddRef" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_Release) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_Release" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_private_AboutToBeDeleted) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getReferenceCount) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Medallion_getGenericCloseSig) { + { + Ferris::fh_medallion *arg1 = (Ferris::fh_medallion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Medallion_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Medallion_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_medallion *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallion * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief___deref__) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MedallionBelief *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief___deref__" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (Ferris::MedallionBelief *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__MedallionBelief, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getMedallion) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_medallion result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getMedallion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getMedallion" "', argument " "1"" of type '" "Ferris::fh_medallionBelief const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->getMedallion(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_medallion(static_cast< const Ferris::fh_medallion& >(result))), SWIGTYPE_p_Ferris__fh_medallion, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getEmblem) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getEmblem" "', argument " "1"" of type '" "Ferris::fh_medallionBelief const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->getEmblem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getPersonality) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getPersonality(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getPersonality" "', argument " "1"" of type '" "Ferris::fh_medallionBelief const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->getPersonality(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getTimes) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Times,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getTimes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getTimes" "', argument " "1"" of type '" "Ferris::fh_medallionBelief const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->getTimes(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_times(static_cast< const Ferris::fh_times& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getSureness) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getSureness(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getSureness" "', argument " "1"" of type '" "Ferris::fh_medallionBelief const *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (double)(*arg1)->getSureness(); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_clampJudgementSureness) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MedallionBelief_clampJudgementSureness(self,double);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_clampJudgementSureness" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MedallionBelief_clampJudgementSureness" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + result = (double)(*arg1)->clampJudgementSureness(arg2); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_private_AboutToBeDeleted) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_private_AboutToBeDeleted(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_private_AboutToBeDeleted" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + (*arg1)->private_AboutToBeDeleted(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_AddRef) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_AddRef" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_Release) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_Release" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getReferenceCount) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getReferenceCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getReferenceCount" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (*arg1)->getReferenceCount(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MedallionBelief_getGenericCloseSig) { + { + Ferris::fh_medallionBelief *arg1 = (Ferris::fh_medallionBelief *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::GenericCloseSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MedallionBelief_getGenericCloseSig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_medallionBelief, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MedallionBelief_getGenericCloseSig" "', argument " "1"" of type '" "Ferris::fh_medallionBelief *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_medallionBelief * >(argp1); + result = (FerrisLoki::Handlable::GenericCloseSignal_t *) &(*arg1)->getGenericCloseSig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConceptLattice___deref__) { + { + Ferris::FCA::fh_conceptLattice *arg1 = (Ferris::FCA::fh_conceptLattice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::FCA::ConceptLattice *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ConceptLattice___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FCA__fh_conceptLattice, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConceptLattice___deref__" "', argument " "1"" of type '" "Ferris::FCA::fh_conceptLattice *""'"); + } + arg1 = reinterpret_cast< Ferris::FCA::fh_conceptLattice * >(argp1); + result = (Ferris::FCA::ConceptLattice *)(arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FCA__ConceptLattice, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RegexCollection__SWIG_0) { + { + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + int argvi = 0; + Ferris::RegexCollection *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_RegexCollection(caseSensitive);"); + } + ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RegexCollection" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + result = (Ferris::RegexCollection *)new Ferris::RegexCollection(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RegexCollection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RegexCollection__SWIG_1) { + { + int argvi = 0; + Ferris::RegexCollection *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_RegexCollection();"); + } + result = (Ferris::RegexCollection *)new Ferris::RegexCollection(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RegexCollection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RegexCollection) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RegexCollection__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RegexCollection__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_RegexCollection'"); + XSRETURN(0); +} + + +XS(_wrap_delete_RegexCollection) { + { + Ferris::RegexCollection *arg1 = (Ferris::RegexCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_RegexCollection(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__RegexCollection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RegexCollection" "', argument " "1"" of type '" "Ferris::RegexCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::RegexCollection * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_RegexCollection_append__SWIG_0) { + { + Ferris::RegexCollection *arg1 = (Ferris::RegexCollection *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: RegexCollection_append(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__RegexCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegexCollection_append" "', argument " "1"" of type '" "Ferris::RegexCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::RegexCollection * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegexCollection_append" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RegexCollection_append" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (arg1)->append((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_RegexCollection_append__SWIG_1) { + { + Ferris::RegexCollection *arg1 = (Ferris::RegexCollection *) 0 ; + std::list< std::string > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: RegexCollection_append(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__RegexCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegexCollection_append" "', argument " "1"" of type '" "Ferris::RegexCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::RegexCollection * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegexCollection_append" "', argument " "2"" of type '" "std::list< std::string > const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RegexCollection_append" "', argument " "2"" of type '" "std::list< std::string > const &""'"); + } + arg2 = reinterpret_cast< std::list< std::string > * >(argp2); + (arg1)->append((std::list< std::string > const &)*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_RegexCollection_append) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__RegexCollection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__RegexCollection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RegexCollection_append__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RegexCollection_append__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'RegexCollection_append'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisVFSExceptionBase__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + char *arg3 = (char *) 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisVFSExceptionBase *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisVFSExceptionBase(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisVFSExceptionBase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisVFSExceptionBase" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisVFSExceptionBase *)new Ferris::FerrisVFSExceptionBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(char const *)arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + XSRETURN(argvi); + fail: + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisVFSExceptionBase__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + char *arg3 = (char *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + Ferris::FerrisVFSExceptionBase *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisVFSExceptionBase(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisVFSExceptionBase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (Ferris::FerrisVFSExceptionBase *)new Ferris::FerrisVFSExceptionBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(char const *)arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisVFSExceptionBase__SWIG_2) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::FerrisVFSExceptionBase *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_FerrisVFSExceptionBase(state,log);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisVFSExceptionBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + result = (Ferris::FerrisVFSExceptionBase *)new Ferris::FerrisVFSExceptionBase((Ferris::FerrisException_CodeState const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisVFSExceptionBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisVFSExceptionBase__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisVFSExceptionBase__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisVFSExceptionBase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisVFSExceptionBase'"); + XSRETURN(0); +} + + +XS(_wrap_delete_FerrisVFSExceptionBase) { + { + Ferris::FerrisVFSExceptionBase *arg1 = (Ferris::FerrisVFSExceptionBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FerrisVFSExceptionBase(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FerrisVFSExceptionBase" "', argument " "1"" of type '" "Ferris::FerrisVFSExceptionBase *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisVFSExceptionBase * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FerrisVFSExceptionBase_whats) { + { + Ferris::FerrisVFSExceptionBase *arg1 = (Ferris::FerrisVFSExceptionBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FerrisVFSExceptionBase_whats(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FerrisVFSExceptionBase_whats" "', argument " "1"" of type '" "Ferris::FerrisVFSExceptionBase const *""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisVFSExceptionBase * >(argp1); + result = (std::string *) &((Ferris::FerrisVFSExceptionBase const *)arg1)->whats(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisGLibCException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisGLibCException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisGLibCException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisGLibCException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisGLibCException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisGLibCException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisGLibCException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisGLibCException *)new Ferris::FerrisGLibCException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisGLibCException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisGLibCException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisGLibCException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisGLibCException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisGLibCException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisGLibCException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisGLibCException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGLibCException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisGLibCException *)new Ferris::FerrisGLibCException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisGLibCException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisGLibCException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisGLibCException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisGLibCException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisGLibCException'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisStatException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + std::string *arg2 = 0 ; + Ferris::Attribute *arg3 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::FerrisStatException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisStatException(state,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisStatException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStatException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisStatException" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStatException" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisStatException" "', argument " "3"" of type '" "Ferris::Attribute *""'"); + } + arg3 = reinterpret_cast< Ferris::Attribute * >(argp3); + result = (Ferris::FerrisStatException *)new Ferris::FerrisStatException((Ferris::FerrisException_CodeState const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisStatException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisStatException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisStatException *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_FerrisStatException(state,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisStatException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStatException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisStatException" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStatException" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (Ferris::FerrisStatException *)new Ferris::FerrisStatException((Ferris::FerrisException_CodeState const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisStatException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisStatException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisStatException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisStatException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisStatException'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisSetCWDException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + std::string *arg2 = 0 ; + Ferris::Attribute *arg3 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::FerrisSetCWDException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisSetCWDException(state,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisSetCWDException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSetCWDException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisSetCWDException" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSetCWDException" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisSetCWDException" "', argument " "3"" of type '" "Ferris::Attribute *""'"); + } + arg3 = reinterpret_cast< Ferris::Attribute * >(argp3); + result = (Ferris::FerrisSetCWDException *)new Ferris::FerrisSetCWDException((Ferris::FerrisException_CodeState const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisSetCWDException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSetCWDException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisSetCWDException *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_FerrisSetCWDException(state,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisSetCWDException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSetCWDException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisSetCWDException" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSetCWDException" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (Ferris::FerrisSetCWDException *)new Ferris::FerrisSetCWDException((Ferris::FerrisException_CodeState const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisSetCWDException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSetCWDException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSetCWDException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSetCWDException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisSetCWDException'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotGetStream__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotGetStream *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotGetStream(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotGetStream" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotGetStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotGetStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotGetStream" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotGetStream *)new Ferris::CanNotGetStream((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotGetStream, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotGetStream__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotGetStream *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotGetStream(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotGetStream" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotGetStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotGetStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotGetStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotGetStream *)new Ferris::CanNotGetStream((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotGetStream, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotGetStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotGetStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotGetStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotGetStream'"); + XSRETURN(0); +} + + +XS(_wrap_new_NotSupported__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NotSupported *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NotSupported(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NotSupported" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NotSupported *)new Ferris::NotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NotSupported__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NotSupported *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NotSupported(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NotSupported *)new Ferris::NotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NotSupported) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NotSupported__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NotSupported__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NotSupported'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisNotSupportedInThisContext__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisNotSupportedInThisContext *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisNotSupportedInThisContext(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisNotSupportedInThisContext *)new Ferris::FerrisNotSupportedInThisContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisNotSupportedInThisContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisNotSupportedInThisContext__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisNotSupportedInThisContext *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisNotSupportedInThisContext(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotSupportedInThisContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisNotSupportedInThisContext *)new Ferris::FerrisNotSupportedInThisContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisNotSupportedInThisContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisNotSupportedInThisContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisNotSupportedInThisContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisNotSupportedInThisContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisNotSupportedInThisContext'"); + XSRETURN(0); +} + + +XS(_wrap_new_RootContextCreationFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::RootContextCreationFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_RootContextCreationFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RootContextCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RootContextCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RootContextCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RootContextCreationFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::RootContextCreationFailed *)new Ferris::RootContextCreationFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RootContextCreationFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RootContextCreationFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::RootContextCreationFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_RootContextCreationFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RootContextCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RootContextCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RootContextCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RootContextCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::RootContextCreationFailed *)new Ferris::RootContextCreationFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RootContextCreationFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RootContextCreationFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RootContextCreationFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RootContextCreationFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_RootContextCreationFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotDelete__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotDelete *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotDelete(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotDelete" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotDelete" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotDelete" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotDelete" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotDelete *)new Ferris::CanNotDelete((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotDelete, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotDelete__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotDelete *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotDelete(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotDelete" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotDelete" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotDelete" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDelete" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotDelete *)new Ferris::CanNotDelete((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotDelete, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotDelete) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotDelete__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotDelete__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotDelete'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchObject__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchObject *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchObject(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchObject" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchObject" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchObject" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchObject" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchObject *)new Ferris::NoSuchObject((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchObject, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchObject__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchObject *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchObject(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchObject" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchObject" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchObject" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchObject" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchObject *)new Ferris::NoSuchObject((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchObject, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchObject) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchObject__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchObject__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchObject'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchUser__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchUser *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchUser(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchUser" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchUser" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchUser" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchUser" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchUser *)new Ferris::NoSuchUser((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchUser, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchUser__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchUser *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchUser(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchUser" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchUser" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchUser" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchUser" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchUser *)new Ferris::NoSuchUser((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchUser, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchUser) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchUser__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchUser__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchUser'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchGroup__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchGroup *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchGroup(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchGroup" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchGroup" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchGroup" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchGroup" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchGroup *)new Ferris::NoSuchGroup((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchGroup, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchGroup__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchGroup *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchGroup(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchGroup" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchGroup" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchGroup" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchGroup" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchGroup *)new Ferris::NoSuchGroup((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchGroup, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchGroup) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchGroup__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchGroup__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchGroup'"); + XSRETURN(0); +} + + +XS(_wrap_new_ObjectExists__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ObjectExists *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ObjectExists(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ObjectExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ObjectExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ObjectExists" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ObjectExists" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ObjectExists *)new Ferris::ObjectExists((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ObjectExists, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ObjectExists__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ObjectExists *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ObjectExists(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ObjectExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ObjectExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ObjectExists" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ObjectExists" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ObjectExists *)new Ferris::ObjectExists((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ObjectExists, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ObjectExists) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ObjectExists__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ObjectExists__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ObjectExists'"); + XSRETURN(0); +} + + +XS(_wrap_new_ContextExists__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ContextExists *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ContextExists(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContextExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContextExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContextExists" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ContextExists" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ContextExists *)new Ferris::ContextExists((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextExists, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ContextExists__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ContextExists *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ContextExists(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContextExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContextExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContextExists" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextExists" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ContextExists *)new Ferris::ContextExists((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextExists, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ContextExists) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ContextExists__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ContextExists__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ContextExists'"); + XSRETURN(0); +} + + +XS(_wrap_new_CopyFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CopyFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CopyFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CopyFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CopyFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CopyFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CopyFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CopyFailed *)new Ferris::CopyFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CopyFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CopyFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CopyFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CopyFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CopyFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CopyFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CopyFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CopyFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CopyFailed *)new Ferris::CopyFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CopyFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CopyFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CopyFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CopyFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CopyFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_RemoveFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::RemoveFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_RemoveFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RemoveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RemoveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RemoveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RemoveFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::RemoveFailed *)new Ferris::RemoveFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RemoveFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RemoveFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::RemoveFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_RemoveFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RemoveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RemoveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RemoveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RemoveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::RemoveFailed *)new Ferris::RemoveFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RemoveFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RemoveFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RemoveFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RemoveFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_RemoveFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_AttributeNotWritable__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AttributeNotWritable *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AttributeNotWritable(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AttributeNotWritable" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AttributeNotWritable" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AttributeNotWritable" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AttributeNotWritable" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AttributeNotWritable *)new Ferris::AttributeNotWritable((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeNotWritable, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AttributeNotWritable__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AttributeNotWritable *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AttributeNotWritable(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AttributeNotWritable" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AttributeNotWritable" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AttributeNotWritable" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeNotWritable" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AttributeNotWritable *)new Ferris::AttributeNotWritable((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeNotWritable, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AttributeNotWritable) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AttributeNotWritable__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AttributeNotWritable__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AttributeNotWritable'"); + XSRETURN(0); +} + + +XS(_wrap_new_SubContextAlreadyInUse__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SubContextAlreadyInUse *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SubContextAlreadyInUse(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SubContextAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SubContextAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SubContextAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SubContextAlreadyInUse" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SubContextAlreadyInUse *)new Ferris::SubContextAlreadyInUse((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SubContextAlreadyInUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SubContextAlreadyInUse__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SubContextAlreadyInUse *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SubContextAlreadyInUse(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SubContextAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SubContextAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SubContextAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SubContextAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SubContextAlreadyInUse *)new Ferris::SubContextAlreadyInUse((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SubContextAlreadyInUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SubContextAlreadyInUse) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SubContextAlreadyInUse__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SubContextAlreadyInUse__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SubContextAlreadyInUse'"); + XSRETURN(0); +} + + +XS(_wrap_new_AttributeAlreadyInUse__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AttributeAlreadyInUse *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AttributeAlreadyInUse(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AttributeAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AttributeAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AttributeAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AttributeAlreadyInUse" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AttributeAlreadyInUse *)new Ferris::AttributeAlreadyInUse((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeAlreadyInUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AttributeAlreadyInUse__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AttributeAlreadyInUse *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AttributeAlreadyInUse(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AttributeAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AttributeAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AttributeAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AttributeAlreadyInUse" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AttributeAlreadyInUse *)new Ferris::AttributeAlreadyInUse((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AttributeAlreadyInUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AttributeAlreadyInUse) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AttributeAlreadyInUse__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AttributeAlreadyInUse__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AttributeAlreadyInUse'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCreateSubContextFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCreateSubContextFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCreateSubContextFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCreateSubContextFailed *)new Ferris::FerrisCreateSubContextFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateSubContextFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCreateSubContextFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCreateSubContextFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateSubContextFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCreateSubContextFailed *)new Ferris::FerrisCreateSubContextFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateSubContextFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateSubContextFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateSubContextFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCreateSubContextFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCreateSubContextNotSupported__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCreateSubContextNotSupported *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCreateSubContextNotSupported(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCreateSubContextNotSupported *)new Ferris::FerrisCreateSubContextNotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateSubContextNotSupported__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCreateSubContextNotSupported *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCreateSubContextNotSupported(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateSubContextNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCreateSubContextNotSupported *)new Ferris::FerrisCreateSubContextNotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateSubContextNotSupported) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateSubContextNotSupported__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateSubContextNotSupported__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCreateSubContextNotSupported'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCreateAttributeFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCreateAttributeFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCreateAttributeFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCreateAttributeFailed *)new Ferris::FerrisCreateAttributeFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateAttributeFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCreateAttributeFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCreateAttributeFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateAttributeFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCreateAttributeFailed *)new Ferris::FerrisCreateAttributeFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateAttributeFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateAttributeFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateAttributeFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCreateAttributeFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCreateAttributeNotSupported__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCreateAttributeNotSupported *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCreateAttributeNotSupported(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCreateAttributeNotSupported *)new Ferris::FerrisCreateAttributeNotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateAttributeNotSupported__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCreateAttributeNotSupported *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCreateAttributeNotSupported(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCreateAttributeNotSupported" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCreateAttributeNotSupported *)new Ferris::FerrisCreateAttributeNotSupported((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCreateAttributeNotSupported) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateAttributeNotSupported__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCreateAttributeNotSupported__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCreateAttributeNotSupported'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchSubContext__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchSubContext *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchSubContext(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchSubContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchSubContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchSubContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchSubContext" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchSubContext *)new Ferris::NoSuchSubContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchSubContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchSubContext__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchSubContext *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchSubContext(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchSubContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchSubContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchSubContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchSubContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchSubContext *)new Ferris::NoSuchSubContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchSubContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchSubContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchSubContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchSubContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchSubContext'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchAttribute__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchAttribute *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchAttribute(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchAttribute" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchAttribute *)new Ferris::NoSuchAttribute((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchAttribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchAttribute__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchAttribute *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchAttribute(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchAttribute *)new Ferris::NoSuchAttribute((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchAttribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchAttribute__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchContextClass__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchContextClass *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchContextClass(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchContextClass" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchContextClass" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchContextClass" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchContextClass" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchContextClass *)new Ferris::NoSuchContextClass((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchContextClass, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchContextClass__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchContextClass *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchContextClass(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchContextClass" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchContextClass" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchContextClass" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchContextClass" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchContextClass *)new Ferris::NoSuchContextClass((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchContextClass, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchContextClass) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchContextClass__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchContextClass__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchContextClass'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotReadContext__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotReadContext *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotReadContext(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotReadContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotReadContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotReadContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotReadContext" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotReadContext *)new Ferris::CanNotReadContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotReadContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotReadContext__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotReadContext *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotReadContext(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotReadContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotReadContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotReadContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotReadContext *)new Ferris::CanNotReadContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotReadContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotReadContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotReadContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotReadContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotReadContext'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotReadContextPcctsParseFailed) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + SwigValueWrapper< std::list< std::string > > arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + Ferris::CanNotReadContextPcctsParseFailed *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: new_CanNotReadContextPcctsParseFailed(state,log,e,a,syntaxErrorList);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + { + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "5"" of type '" "Ferris::stringlist_t""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotReadContextPcctsParseFailed" "', argument " "5"" of type '" "Ferris::stringlist_t""'"); + } else { + arg5 = *(reinterpret_cast< Ferris::stringlist_t * >(argp5)); + } + } + result = (Ferris::CanNotReadContextPcctsParseFailed *)new Ferris::CanNotReadContextPcctsParseFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotReadContextPcctsParseFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_CanNotReadContextPcctsParseFailed) { + { + Ferris::CanNotReadContextPcctsParseFailed *arg1 = (Ferris::CanNotReadContextPcctsParseFailed *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_CanNotReadContextPcctsParseFailed(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CanNotReadContextPcctsParseFailed, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CanNotReadContextPcctsParseFailed" "', argument " "1"" of type '" "Ferris::CanNotReadContextPcctsParseFailed *""'"); + } + arg1 = reinterpret_cast< Ferris::CanNotReadContextPcctsParseFailed * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CanNotReadContextPcctsParseFailed_getSyntaxErrorList) { + { + Ferris::CanNotReadContextPcctsParseFailed *arg1 = (Ferris::CanNotReadContextPcctsParseFailed *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CanNotReadContextPcctsParseFailed_getSyntaxErrorList(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CanNotReadContextPcctsParseFailed, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CanNotReadContextPcctsParseFailed_getSyntaxErrorList" "', argument " "1"" of type '" "Ferris::CanNotReadContextPcctsParseFailed *""'"); + } + arg1 = reinterpret_cast< Ferris::CanNotReadContextPcctsParseFailed * >(argp1); + result = (Ferris::stringlist_t *) &(arg1)->getSyntaxErrorList(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotDereferenceDanglingSoftLink__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotDereferenceDanglingSoftLink *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotDereferenceDanglingSoftLink(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotDereferenceDanglingSoftLink *)new Ferris::CanNotDereferenceDanglingSoftLink((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotDereferenceDanglingSoftLink, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotDereferenceDanglingSoftLink__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotDereferenceDanglingSoftLink *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotDereferenceDanglingSoftLink(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotDereferenceDanglingSoftLink" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotDereferenceDanglingSoftLink *)new Ferris::CanNotDereferenceDanglingSoftLink((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotDereferenceDanglingSoftLink, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotDereferenceDanglingSoftLink) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotDereferenceDanglingSoftLink__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotDereferenceDanglingSoftLink__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotDereferenceDanglingSoftLink'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotMonitorDirWithFAM__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + Fampp::FamppDirMonitorInitFailedException *arg3 = 0 ; + std::string *arg4 = 0 ; + Ferris::Attribute *arg5 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int res4 = SWIG_OLDOBJ ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + Ferris::CanNotMonitorDirWithFAM *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: new_CanNotMonitorDirWithFAM(state,log,_ne,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Fampp__FamppDirMonitorInitFailedException, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "3"" of type '" "Fampp::FamppDirMonitorInitFailedException &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "3"" of type '" "Fampp::FamppDirMonitorInitFailedException &""'"); + } + arg3 = reinterpret_cast< Fampp::FamppDirMonitorInitFailedException * >(argp3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "5"" of type '" "Ferris::Attribute *""'"); + } + arg5 = reinterpret_cast< Ferris::Attribute * >(argp5); + result = (Ferris::CanNotMonitorDirWithFAM *)new Ferris::CanNotMonitorDirWithFAM((Ferris::FerrisException_CodeState const &)*arg1,arg2,*arg3,(std::string const &)*arg4,arg5); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotMonitorDirWithFAM, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + if (SWIG_IsNewObj(res4)) delete arg4; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res4)) delete arg4; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotMonitorDirWithFAM__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + Fampp::FamppDirMonitorInitFailedException *arg3 = 0 ; + std::string *arg4 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int res4 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotMonitorDirWithFAM *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotMonitorDirWithFAM(state,log,_ne,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Fampp__FamppDirMonitorInitFailedException, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "3"" of type '" "Fampp::FamppDirMonitorInitFailedException &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "3"" of type '" "Fampp::FamppDirMonitorInitFailedException &""'"); + } + arg3 = reinterpret_cast< Fampp::FamppDirMonitorInitFailedException * >(argp3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotMonitorDirWithFAM" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + result = (Ferris::CanNotMonitorDirWithFAM *)new Ferris::CanNotMonitorDirWithFAM((Ferris::FerrisException_CodeState const &)*arg1,arg2,*arg3,(std::string const &)*arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotMonitorDirWithFAM, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + if (SWIG_IsNewObj(res4)) delete arg4; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res4)) delete arg4; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotMonitorDirWithFAM) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Fampp__FamppDirMonitorInitFailedException, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Fampp__FamppDirMonitorInitFailedException, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotMonitorDirWithFAM__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotMonitorDirWithFAM__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotMonitorDirWithFAM'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisNotReadableAsContext__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisNotReadableAsContext *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisNotReadableAsContext(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisNotReadableAsContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisNotReadableAsContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisNotReadableAsContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisNotReadableAsContext" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisNotReadableAsContext *)new Ferris::FerrisNotReadableAsContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisNotReadableAsContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisNotReadableAsContext__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisNotReadableAsContext *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisNotReadableAsContext(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisNotReadableAsContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisNotReadableAsContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisNotReadableAsContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisNotReadableAsContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisNotReadableAsContext *)new Ferris::FerrisNotReadableAsContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisNotReadableAsContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisNotReadableAsContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisNotReadableAsContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisNotReadableAsContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisNotReadableAsContext'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisImageSaveFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisImageSaveFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisImageSaveFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImageSaveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImageSaveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImageSaveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisImageSaveFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisImageSaveFailed *)new Ferris::FerrisImageSaveFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImageSaveFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImageSaveFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisImageSaveFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisImageSaveFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImageSaveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImageSaveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImageSaveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageSaveFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisImageSaveFailed *)new Ferris::FerrisImageSaveFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImageSaveFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImageSaveFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImageSaveFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImageSaveFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisImageSaveFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisImageLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisImageLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisImageLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisImageLoadFailed *)new Ferris::FerrisImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImageLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisImageLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisImageLoadFailed *)new Ferris::FerrisImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImageLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImageLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImageLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisImageLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisPNGImageLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisPNGImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisPNGImageLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisPNGImageLoadFailed *)new Ferris::FerrisPNGImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisPNGImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisPNGImageLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisPNGImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisPNGImageLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisPNGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisPNGImageLoadFailed *)new Ferris::FerrisPNGImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisPNGImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisPNGImageLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisPNGImageLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisPNGImageLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisPNGImageLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisJPEGImageLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisJPEGImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisJPEGImageLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisJPEGImageLoadFailed *)new Ferris::FerrisJPEGImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisJPEGImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisJPEGImageLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisJPEGImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisJPEGImageLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisJPEGImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisJPEGImageLoadFailed *)new Ferris::FerrisJPEGImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisJPEGImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisJPEGImageLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisJPEGImageLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisJPEGImageLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisJPEGImageLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisGIMPImageLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisGIMPImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisGIMPImageLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisGIMPImageLoadFailed *)new Ferris::FerrisGIMPImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisGIMPImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisGIMPImageLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisGIMPImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisGIMPImageLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisGIMPImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisGIMPImageLoadFailed *)new Ferris::FerrisGIMPImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisGIMPImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisGIMPImageLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisGIMPImageLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisGIMPImageLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisGIMPImageLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisImlib2ImageLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisImlib2ImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisImlib2ImageLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisImlib2ImageLoadFailed *)new Ferris::FerrisImlib2ImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImlib2ImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImlib2ImageLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisImlib2ImageLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisImlib2ImageLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisImlib2ImageLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisImlib2ImageLoadFailed *)new Ferris::FerrisImlib2ImageLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisImlib2ImageLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisImlib2ImageLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImlib2ImageLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisImlib2ImageLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisImlib2ImageLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisWaitTimedOut__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisWaitTimedOut *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisWaitTimedOut(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisWaitTimedOut" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisWaitTimedOut" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisWaitTimedOut" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisWaitTimedOut" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisWaitTimedOut *)new Ferris::FerrisWaitTimedOut((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisWaitTimedOut, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisWaitTimedOut__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisWaitTimedOut *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisWaitTimedOut(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisWaitTimedOut" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisWaitTimedOut" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisWaitTimedOut" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisWaitTimedOut" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisWaitTimedOut *)new Ferris::FerrisWaitTimedOut((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisWaitTimedOut, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisWaitTimedOut) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisWaitTimedOut__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisWaitTimedOut__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisWaitTimedOut'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisSqlServerNameNotFound__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisSqlServerNameNotFound *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisSqlServerNameNotFound(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisSqlServerNameNotFound *)new Ferris::FerrisSqlServerNameNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisSqlServerNameNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSqlServerNameNotFound__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisSqlServerNameNotFound *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisSqlServerNameNotFound(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisSqlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisSqlServerNameNotFound *)new Ferris::FerrisSqlServerNameNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisSqlServerNameNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisSqlServerNameNotFound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSqlServerNameNotFound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisSqlServerNameNotFound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisSqlServerNameNotFound'"); + XSRETURN(0); +} + + +XS(_wrap_new_GModuleOpenFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::GModuleOpenFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_GModuleOpenFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GModuleOpenFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GModuleOpenFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GModuleOpenFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GModuleOpenFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::GModuleOpenFailed *)new Ferris::GModuleOpenFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GModuleOpenFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GModuleOpenFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::GModuleOpenFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_GModuleOpenFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GModuleOpenFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GModuleOpenFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GModuleOpenFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GModuleOpenFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::GModuleOpenFailed *)new Ferris::GModuleOpenFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GModuleOpenFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GModuleOpenFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GModuleOpenFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GModuleOpenFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_GModuleOpenFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisStreamLoadFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisStreamLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisStreamLoadFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisStreamLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisStreamLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisStreamLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisStreamLoadFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisStreamLoadFailed *)new Ferris::FerrisStreamLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisStreamLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisStreamLoadFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisStreamLoadFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisStreamLoadFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisStreamLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisStreamLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisStreamLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisStreamLoadFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisStreamLoadFailed *)new Ferris::FerrisStreamLoadFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisStreamLoadFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisStreamLoadFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisStreamLoadFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisStreamLoadFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisStreamLoadFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCanNotCreateLeafOfLeaf__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCanNotCreateLeafOfLeaf *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCanNotCreateLeafOfLeaf(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCanNotCreateLeafOfLeaf *)new Ferris::FerrisCanNotCreateLeafOfLeaf((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCanNotCreateLeafOfLeaf, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCanNotCreateLeafOfLeaf__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCanNotCreateLeafOfLeaf *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCanNotCreateLeafOfLeaf(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotCreateLeafOfLeaf" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCanNotCreateLeafOfLeaf *)new Ferris::FerrisCanNotCreateLeafOfLeaf((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCanNotCreateLeafOfLeaf, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCanNotCreateLeafOfLeaf) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCanNotCreateLeafOfLeaf__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCanNotCreateLeafOfLeaf__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCanNotCreateLeafOfLeaf'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisOutOfMemory__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisOutOfMemory *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisOutOfMemory(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisOutOfMemory" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisOutOfMemory" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisOutOfMemory" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisOutOfMemory" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisOutOfMemory *)new Ferris::FerrisOutOfMemory((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisOutOfMemory, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisOutOfMemory__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisOutOfMemory *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisOutOfMemory(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisOutOfMemory" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisOutOfMemory" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisOutOfMemory" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisOutOfMemory" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisOutOfMemory *)new Ferris::FerrisOutOfMemory((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisOutOfMemory, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisOutOfMemory) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisOutOfMemory__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisOutOfMemory__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisOutOfMemory'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotAddExternalAttribute__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotAddExternalAttribute *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotAddExternalAttribute(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotAddExternalAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotAddExternalAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotAddExternalAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotAddExternalAttribute" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotAddExternalAttribute *)new Ferris::CanNotAddExternalAttribute((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotAddExternalAttribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotAddExternalAttribute__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotAddExternalAttribute *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotAddExternalAttribute(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotAddExternalAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotAddExternalAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotAddExternalAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddExternalAttribute" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotAddExternalAttribute *)new Ferris::CanNotAddExternalAttribute((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotAddExternalAttribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotAddExternalAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotAddExternalAttribute__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotAddExternalAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotAddExternalAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_new_CurlStaticInitFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CurlStaticInitFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CurlStaticInitFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlStaticInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlStaticInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlStaticInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CurlStaticInitFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CurlStaticInitFailed *)new Ferris::CurlStaticInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlStaticInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlStaticInitFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CurlStaticInitFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CurlStaticInitFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlStaticInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlStaticInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlStaticInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStaticInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CurlStaticInitFailed *)new Ferris::CurlStaticInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlStaticInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlStaticInitFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlStaticInitFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlStaticInitFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CurlStaticInitFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_CurlEasyInitFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CurlEasyInitFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CurlEasyInitFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlEasyInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlEasyInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlEasyInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CurlEasyInitFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CurlEasyInitFailed *)new Ferris::CurlEasyInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlEasyInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlEasyInitFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CurlEasyInitFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CurlEasyInitFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlEasyInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlEasyInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlEasyInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlEasyInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CurlEasyInitFailed *)new Ferris::CurlEasyInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlEasyInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlEasyInitFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlEasyInitFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlEasyInitFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CurlEasyInitFailed'"); + XSRETURN(0); +} + + +XS(_wrap_CurlPerformFailed_getResultCode) { + { + Ferris::CurlPerformFailed *arg1 = (Ferris::CurlPerformFailed *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CurlPerformFailed_getResultCode(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CurlPerformFailed, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlPerformFailed_getResultCode" "', argument " "1"" of type '" "Ferris::CurlPerformFailed *""'"); + } + arg1 = reinterpret_cast< Ferris::CurlPerformFailed * >(argp1); + result = (int)(arg1)->getResultCode(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlPerformFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + int arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::CurlPerformFailed *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: new_CurlPerformFailed(state,log,e,a,_r);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CurlPerformFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CurlPerformFailed" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + result = (Ferris::CurlPerformFailed *)new Ferris::CurlPerformFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlPerformFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlPerformFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CurlPerformFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CurlPerformFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CurlPerformFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CurlPerformFailed *)new Ferris::CurlPerformFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlPerformFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlPerformFailed__SWIG_2) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CurlPerformFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CurlPerformFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlPerformFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CurlPerformFailed *)new Ferris::CurlPerformFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlPerformFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlPerformFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlPerformFailed__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlPerformFailed__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlPerformFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CurlPerformFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_CurlStateError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CurlStateError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CurlStateError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlStateError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlStateError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlStateError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CurlStateError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CurlStateError *)new Ferris::CurlStateError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlStateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlStateError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CurlStateError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CurlStateError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlStateError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurlStateError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CurlStateError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlStateError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CurlStateError *)new Ferris::CurlStateError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CurlStateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CurlStateError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlStateError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CurlStateError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CurlStateError'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCurlServerNameNotFound__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCurlServerNameNotFound *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCurlServerNameNotFound(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCurlServerNameNotFound *)new Ferris::FerrisCurlServerNameNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCurlServerNameNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCurlServerNameNotFound__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCurlServerNameNotFound *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCurlServerNameNotFound(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCurlServerNameNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCurlServerNameNotFound *)new Ferris::FerrisCurlServerNameNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCurlServerNameNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCurlServerNameNotFound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCurlServerNameNotFound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCurlServerNameNotFound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCurlServerNameNotFound'"); + XSRETURN(0); +} + + +XS(_wrap_new_getIOStreamCloseUpdateFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::getIOStreamCloseUpdateFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_getIOStreamCloseUpdateFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::getIOStreamCloseUpdateFailed *)new Ferris::getIOStreamCloseUpdateFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__getIOStreamCloseUpdateFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_getIOStreamCloseUpdateFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::getIOStreamCloseUpdateFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_getIOStreamCloseUpdateFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdateFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::getIOStreamCloseUpdateFailed *)new Ferris::getIOStreamCloseUpdateFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__getIOStreamCloseUpdateFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_getIOStreamCloseUpdateFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_getIOStreamCloseUpdateFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_getIOStreamCloseUpdateFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_getIOStreamCloseUpdateFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_getIOStreamCloseUpdatePermissionDenied__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::getIOStreamCloseUpdatePermissionDenied *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_getIOStreamCloseUpdatePermissionDenied(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::getIOStreamCloseUpdatePermissionDenied *)new Ferris::getIOStreamCloseUpdatePermissionDenied((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__getIOStreamCloseUpdatePermissionDenied, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_getIOStreamCloseUpdatePermissionDenied__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::getIOStreamCloseUpdatePermissionDenied *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_getIOStreamCloseUpdatePermissionDenied(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_getIOStreamCloseUpdatePermissionDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::getIOStreamCloseUpdatePermissionDenied *)new Ferris::getIOStreamCloseUpdatePermissionDenied((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__getIOStreamCloseUpdatePermissionDenied, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_getIOStreamCloseUpdatePermissionDenied) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_getIOStreamCloseUpdatePermissionDenied__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_getIOStreamCloseUpdatePermissionDenied__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_getIOStreamCloseUpdatePermissionDenied'"); + XSRETURN(0); +} + + +XS(_wrap_new_DTDCreationFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::DTDCreationFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_DTDCreationFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DTDCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DTDCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DTDCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DTDCreationFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::DTDCreationFailed *)new Ferris::DTDCreationFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DTDCreationFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DTDCreationFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::DTDCreationFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_DTDCreationFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DTDCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DTDCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DTDCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DTDCreationFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::DTDCreationFailed *)new Ferris::DTDCreationFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DTDCreationFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DTDCreationFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DTDCreationFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DTDCreationFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_DTDCreationFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_UnknownConfigLocation__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::UnknownConfigLocation *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_UnknownConfigLocation(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnknownConfigLocation" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnknownConfigLocation" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnknownConfigLocation" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_UnknownConfigLocation" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::UnknownConfigLocation *)new Ferris::UnknownConfigLocation((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__UnknownConfigLocation, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_UnknownConfigLocation__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::UnknownConfigLocation *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_UnknownConfigLocation(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnknownConfigLocation" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnknownConfigLocation" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnknownConfigLocation" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownConfigLocation" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::UnknownConfigLocation *)new Ferris::UnknownConfigLocation((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__UnknownConfigLocation, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_UnknownConfigLocation) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnknownConfigLocation__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnknownConfigLocation__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_UnknownConfigLocation'"); + XSRETURN(0); +} + + +XS(_wrap_new_RenameFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::RenameFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_RenameFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RenameFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RenameFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RenameFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RenameFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::RenameFailed *)new Ferris::RenameFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RenameFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RenameFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::RenameFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_RenameFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RenameFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RenameFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RenameFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RenameFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::RenameFailed *)new Ferris::RenameFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RenameFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RenameFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RenameFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RenameFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_RenameFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_AccessDenied__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AccessDenied *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AccessDenied(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AccessDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AccessDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AccessDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AccessDenied" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AccessDenied *)new Ferris::AccessDenied((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AccessDenied, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AccessDenied__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AccessDenied *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AccessDenied(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AccessDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AccessDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AccessDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AccessDenied" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AccessDenied *)new Ferris::AccessDenied((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AccessDenied, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AccessDenied) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AccessDenied__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AccessDenied__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AccessDenied'"); + XSRETURN(0); +} + + +XS(_wrap_new_GenericError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::GenericError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_GenericError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenericError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GenericError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GenericError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GenericError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::GenericError *)new Ferris::GenericError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GenericError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GenericError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::GenericError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_GenericError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenericError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GenericError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GenericError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GenericError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::GenericError *)new Ferris::GenericError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GenericError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GenericError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GenericError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GenericError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_GenericError'"); + XSRETURN(0); +} + + +XS(_wrap_new_BadlyFormedTime__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BadlyFormedTime *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BadlyFormedTime(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadlyFormedTime" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadlyFormedTime" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadlyFormedTime" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BadlyFormedTime" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BadlyFormedTime *)new Ferris::BadlyFormedTime((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadlyFormedTime, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadlyFormedTime__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BadlyFormedTime *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BadlyFormedTime(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadlyFormedTime" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadlyFormedTime" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadlyFormedTime" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTime" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BadlyFormedTime *)new Ferris::BadlyFormedTime((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadlyFormedTime, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadlyFormedTime) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadlyFormedTime__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadlyFormedTime__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BadlyFormedTime'"); + XSRETURN(0); +} + + +XS(_wrap_new_BadlyFormedTimeString__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BadlyFormedTimeString *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BadlyFormedTimeString(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadlyFormedTimeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadlyFormedTimeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadlyFormedTimeString" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BadlyFormedTimeString" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BadlyFormedTimeString *)new Ferris::BadlyFormedTimeString((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadlyFormedTimeString, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadlyFormedTimeString__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BadlyFormedTimeString *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BadlyFormedTimeString(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadlyFormedTimeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadlyFormedTimeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadlyFormedTimeString" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadlyFormedTimeString" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BadlyFormedTimeString *)new Ferris::BadlyFormedTimeString((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadlyFormedTimeString, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadlyFormedTimeString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadlyFormedTimeString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadlyFormedTimeString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BadlyFormedTimeString'"); + XSRETURN(0); +} + + +XS(_wrap_new_SocketOptionsException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SocketOptionsException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SocketOptionsException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SocketOptionsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SocketOptionsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SocketOptionsException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SocketOptionsException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SocketOptionsException *)new Ferris::SocketOptionsException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SocketOptionsException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SocketOptionsException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SocketOptionsException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SocketOptionsException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SocketOptionsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SocketOptionsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SocketOptionsException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SocketOptionsException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SocketOptionsException *)new Ferris::SocketOptionsException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SocketOptionsException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SocketOptionsException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SocketOptionsException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SocketOptionsException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SocketOptionsException'"); + XSRETURN(0); +} + + +XS(_wrap_new_BackupException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BackupException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BackupException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BackupException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BackupException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackupException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackupException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BackupException *)new Ferris::BackupException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BackupException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BackupException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BackupException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BackupException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BackupException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BackupException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackupException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BackupException *)new Ferris::BackupException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BackupException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BackupException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BackupException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BackupException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BackupException'"); + XSRETURN(0); +} + + +XS(_wrap_new_UnknownBackupMode__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::UnknownBackupMode *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_UnknownBackupMode(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnknownBackupMode" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnknownBackupMode" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnknownBackupMode" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_UnknownBackupMode" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::UnknownBackupMode *)new Ferris::UnknownBackupMode((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__UnknownBackupMode, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_UnknownBackupMode__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::UnknownBackupMode *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_UnknownBackupMode(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnknownBackupMode" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnknownBackupMode" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnknownBackupMode" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnknownBackupMode" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::UnknownBackupMode *)new Ferris::UnknownBackupMode((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__UnknownBackupMode, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_UnknownBackupMode) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnknownBackupMode__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnknownBackupMode__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_UnknownBackupMode'"); + XSRETURN(0); +} + + +XS(_wrap_new_BackupNameWouldBeTooLong__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BackupNameWouldBeTooLong *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BackupNameWouldBeTooLong(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BackupNameWouldBeTooLong *)new Ferris::BackupNameWouldBeTooLong((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BackupNameWouldBeTooLong, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BackupNameWouldBeTooLong__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BackupNameWouldBeTooLong *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BackupNameWouldBeTooLong(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackupNameWouldBeTooLong" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackupNameWouldBeTooLong" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BackupNameWouldBeTooLong *)new Ferris::BackupNameWouldBeTooLong((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BackupNameWouldBeTooLong, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BackupNameWouldBeTooLong) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BackupNameWouldBeTooLong__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BackupNameWouldBeTooLong__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BackupNameWouldBeTooLong'"); + XSRETURN(0); +} + + +XS(_wrap_new_DVDReadException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::DVDReadException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_DVDReadException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DVDReadException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DVDReadException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DVDReadException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DVDReadException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::DVDReadException *)new Ferris::DVDReadException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DVDReadException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DVDReadException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::DVDReadException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_DVDReadException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DVDReadException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DVDReadException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DVDReadException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DVDReadException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::DVDReadException *)new Ferris::DVDReadException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DVDReadException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DVDReadException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DVDReadException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DVDReadException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_DVDReadException'"); + XSRETURN(0); +} + + +XS(_wrap_new_StorageFull__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::StorageFull *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_StorageFull(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_StorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_StorageFull" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::StorageFull *)new Ferris::StorageFull((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__StorageFull, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StorageFull__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::StorageFull *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_StorageFull(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_StorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::StorageFull *)new Ferris::StorageFull((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__StorageFull, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_StorageFull) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StorageFull__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StorageFull__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_StorageFull'"); + XSRETURN(0); +} + + +XS(_wrap_new_QuotaStorageFull__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::QuotaStorageFull *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_QuotaStorageFull(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuotaStorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuotaStorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QuotaStorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_QuotaStorageFull" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::QuotaStorageFull *)new Ferris::QuotaStorageFull((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__QuotaStorageFull, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_QuotaStorageFull__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::QuotaStorageFull *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_QuotaStorageFull(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuotaStorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuotaStorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QuotaStorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuotaStorageFull" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::QuotaStorageFull *)new Ferris::QuotaStorageFull((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__QuotaStorageFull, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_QuotaStorageFull) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QuotaStorageFull__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QuotaStorageFull__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_QuotaStorageFull'"); + XSRETURN(0); +} + + +XS(_wrap_new_FileClipboard__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FileClipboard *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FileClipboard(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FileClipboard" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FileClipboard" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FileClipboard" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FileClipboard" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FileClipboard *)new Ferris::FileClipboard((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FileClipboard, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FileClipboard__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FileClipboard *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FileClipboard(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FileClipboard" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FileClipboard" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FileClipboard" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileClipboard" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FileClipboard *)new Ferris::FileClipboard((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FileClipboard, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FileClipboard) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FileClipboard__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FileClipboard__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FileClipboard'"); + XSRETURN(0); +} + + +XS(_wrap_new_CursorException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CursorException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CursorException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CursorException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CursorException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CursorException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CursorException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CursorException *)new Ferris::CursorException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CursorException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CursorException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CursorException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CursorException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CursorException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CursorException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CursorException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CursorException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CursorException *)new Ferris::CursorException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CursorException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CursorException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CursorException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CursorException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CursorException'"); + XSRETURN(0); +} + + +XS(_wrap_new_ParseError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ParseError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ParseError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ParseError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ParseError *)new Ferris::ParseError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ParseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ParseError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ParseError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ParseError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ParseError *)new Ferris::ParseError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ParseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ParseError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ParseError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ParseError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ParseError'"); + XSRETURN(0); +} + + +XS(_wrap_new_ProgramSpawn__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ProgramSpawn *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ProgramSpawn(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ProgramSpawn" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ProgramSpawn" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ProgramSpawn" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ProgramSpawn" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ProgramSpawn *)new Ferris::ProgramSpawn((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ProgramSpawn, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ProgramSpawn__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ProgramSpawn *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ProgramSpawn(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ProgramSpawn" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ProgramSpawn" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ProgramSpawn" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ProgramSpawn" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ProgramSpawn *)new Ferris::ProgramSpawn((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ProgramSpawn, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ProgramSpawn) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ProgramSpawn__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ProgramSpawn__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ProgramSpawn'"); + XSRETURN(0); +} + + +XS(_wrap_new_Db4Exception__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + int arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::Db4Exception *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: new_Db4Exception(state,log,e,a,db_errno);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Db4Exception" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Db4Exception" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + result = (Ferris::Db4Exception *)new Ferris::Db4Exception((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Db4Exception, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Db4Exception__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::Db4Exception *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_Db4Exception(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Db4Exception" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::Db4Exception *)new Ferris::Db4Exception((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Db4Exception, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Db4Exception__SWIG_2) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::Db4Exception *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_Db4Exception(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4Exception" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::Db4Exception *)new Ferris::Db4Exception((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Db4Exception, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Db4Exception) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Db4Exception__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Db4Exception__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Db4Exception__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_Db4Exception'"); + XSRETURN(0); +} + + +XS(_wrap_Db4Exception_get_errno) { + { + Ferris::Db4Exception *arg1 = (Ferris::Db4Exception *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Db4Exception_get_errno(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Db4Exception, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Db4Exception_get_errno" "', argument " "1"" of type '" "Ferris::Db4Exception *""'"); + } + arg1 = reinterpret_cast< Ferris::Db4Exception * >(argp1); + result = (int)(arg1)->get_errno(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_eetException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::eetException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_eetException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_eetException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_eetException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_eetException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_eetException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::eetException *)new Ferris::eetException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__eetException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_eetException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::eetException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_eetException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_eetException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_eetException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_eetException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::eetException *)new Ferris::eetException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__eetException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_eetException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_eetException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_eetException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_eetException'"); + XSRETURN(0); +} + + +XS(_wrap_new_GdbmException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::GdbmException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_GdbmException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GdbmException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GdbmException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GdbmException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GdbmException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::GdbmException *)new Ferris::GdbmException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GdbmException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GdbmException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::GdbmException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_GdbmException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GdbmException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GdbmException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GdbmException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GdbmException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::GdbmException *)new Ferris::GdbmException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GdbmException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GdbmException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GdbmException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GdbmException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_GdbmException'"); + XSRETURN(0); +} + + +XS(_wrap_new_tdbException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::tdbException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_tdbException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tdbException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_tdbException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_tdbException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_tdbException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::tdbException *)new Ferris::tdbException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__tdbException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_tdbException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::tdbException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_tdbException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tdbException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_tdbException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_tdbException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_tdbException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::tdbException *)new Ferris::tdbException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__tdbException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_tdbException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_tdbException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_tdbException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_tdbException'"); + XSRETURN(0); +} + + +XS(_wrap_new_Db4KeyNotFound__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::Db4KeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_Db4KeyNotFound(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Db4KeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Db4KeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Db4KeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Db4KeyNotFound" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::Db4KeyNotFound *)new Ferris::Db4KeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Db4KeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Db4KeyNotFound__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::Db4KeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_Db4KeyNotFound(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Db4KeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Db4KeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Db4KeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Db4KeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::Db4KeyNotFound *)new Ferris::Db4KeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Db4KeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Db4KeyNotFound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Db4KeyNotFound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Db4KeyNotFound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_Db4KeyNotFound'"); + XSRETURN(0); +} + + +XS(_wrap_new_eetKeyNotFound__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::eetKeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_eetKeyNotFound(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_eetKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_eetKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_eetKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_eetKeyNotFound" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::eetKeyNotFound *)new Ferris::eetKeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__eetKeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_eetKeyNotFound__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::eetKeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_eetKeyNotFound(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_eetKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_eetKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_eetKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_eetKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::eetKeyNotFound *)new Ferris::eetKeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__eetKeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_eetKeyNotFound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_eetKeyNotFound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_eetKeyNotFound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_eetKeyNotFound'"); + XSRETURN(0); +} + + +XS(_wrap_new_InvalidSortSpecification__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::InvalidSortSpecification *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_InvalidSortSpecification(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidSortSpecification" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidSortSpecification" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidSortSpecification" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_InvalidSortSpecification" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::InvalidSortSpecification *)new Ferris::InvalidSortSpecification((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__InvalidSortSpecification, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_InvalidSortSpecification__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::InvalidSortSpecification *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_InvalidSortSpecification(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidSortSpecification" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidSortSpecification" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidSortSpecification" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidSortSpecification" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::InvalidSortSpecification *)new Ferris::InvalidSortSpecification((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__InvalidSortSpecification, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_InvalidSortSpecification) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidSortSpecification__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidSortSpecification__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_InvalidSortSpecification'"); + XSRETURN(0); +} + + +XS(_wrap_new_ContentNotModified__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ContentNotModified *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ContentNotModified(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContentNotModified" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContentNotModified" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContentNotModified" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ContentNotModified" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ContentNotModified *)new Ferris::ContentNotModified((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContentNotModified, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ContentNotModified__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ContentNotModified *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ContentNotModified(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContentNotModified" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContentNotModified" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContentNotModified" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContentNotModified" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ContentNotModified *)new Ferris::ContentNotModified((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContentNotModified, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ContentNotModified) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ContentNotModified__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ContentNotModified__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ContentNotModified'"); + XSRETURN(0); +} + + +XS(_wrap_new_ChildNotRunning__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::ChildNotRunning *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_ChildNotRunning(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ChildNotRunning" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChildNotRunning" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChildNotRunning" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ChildNotRunning" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::ChildNotRunning *)new Ferris::ChildNotRunning((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ChildNotRunning, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ChildNotRunning__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::ChildNotRunning *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_ChildNotRunning(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ChildNotRunning" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChildNotRunning" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChildNotRunning" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChildNotRunning" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::ChildNotRunning *)new Ferris::ChildNotRunning((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ChildNotRunning, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ChildNotRunning) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ChildNotRunning__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ChildNotRunning__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_ChildNotRunning'"); + XSRETURN(0); +} + + +XS(_wrap_new_InvalidModeString__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::InvalidModeString *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_InvalidModeString(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidModeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidModeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidModeString" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_InvalidModeString" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::InvalidModeString *)new Ferris::InvalidModeString((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__InvalidModeString, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_InvalidModeString__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::InvalidModeString *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_InvalidModeString(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidModeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidModeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidModeString" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidModeString" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::InvalidModeString *)new Ferris::InvalidModeString((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__InvalidModeString, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_InvalidModeString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidModeString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidModeString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_InvalidModeString'"); + XSRETURN(0); +} + + +XS(_wrap_new_LDAPException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::LDAPException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_LDAPException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LDAPException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LDAPException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LDAPException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LDAPException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::LDAPException *)new Ferris::LDAPException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__LDAPException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_LDAPException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::LDAPException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_LDAPException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LDAPException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LDAPException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LDAPException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LDAPException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::LDAPException *)new Ferris::LDAPException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__LDAPException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_LDAPException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_LDAPException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_LDAPException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_LDAPException'"); + XSRETURN(0); +} + + +XS(_wrap_new_CompressionException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CompressionException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CompressionException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CompressionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CompressionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CompressionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CompressionException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CompressionException *)new Ferris::CompressionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CompressionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CompressionException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CompressionException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CompressionException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CompressionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CompressionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CompressionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CompressionException *)new Ferris::CompressionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CompressionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CompressionException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CompressionException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CompressionException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CompressionException'"); + XSRETURN(0); +} + + +XS(_wrap_new_CompressionAlgoNotFoundException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CompressionAlgoNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CompressionAlgoNotFoundException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CompressionAlgoNotFoundException *)new Ferris::CompressionAlgoNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CompressionAlgoNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CompressionAlgoNotFoundException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CompressionAlgoNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CompressionAlgoNotFoundException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CompressionAlgoNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompressionAlgoNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CompressionAlgoNotFoundException *)new Ferris::CompressionAlgoNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CompressionAlgoNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CompressionAlgoNotFoundException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CompressionAlgoNotFoundException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CompressionAlgoNotFoundException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CompressionAlgoNotFoundException'"); + XSRETURN(0); +} + + +XS(_wrap_new_IndexException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::IndexException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_IndexException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IndexException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::IndexException *)new Ferris::IndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__IndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IndexException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::IndexException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_IndexException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::IndexException *)new Ferris::IndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__IndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IndexException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IndexException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_IndexException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_IndexException'"); + XSRETURN(0); +} + + +XS(_wrap_new_FullTextIndexException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FullTextIndexException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FullTextIndexException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FullTextIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FullTextIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FullTextIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FullTextIndexException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FullTextIndexException *)new Ferris::FullTextIndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FullTextIndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FullTextIndexException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FullTextIndexException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FullTextIndexException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FullTextIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FullTextIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FullTextIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FullTextIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FullTextIndexException *)new Ferris::FullTextIndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FullTextIndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FullTextIndexException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FullTextIndexException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FullTextIndexException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FullTextIndexException'"); + XSRETURN(0); +} + + +XS(_wrap_new_EAIndexException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::EAIndexException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_EAIndexException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EAIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EAIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EAIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_EAIndexException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::EAIndexException *)new Ferris::EAIndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EAIndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EAIndexException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::EAIndexException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EAIndexException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EAIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EAIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EAIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EAIndexException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::EAIndexException *)new Ferris::EAIndexException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EAIndexException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EAIndexException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EAIndexException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EAIndexException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_EAIndexException'"); + XSRETURN(0); +} + + +XS(_wrap_new_BadParam__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BadParam *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BadParam(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadParam" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadParam" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadParam" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BadParam" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BadParam *)new Ferris::BadParam((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadParam, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadParam__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BadParam *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BadParam(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadParam" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadParam" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadParam" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadParam" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BadParam *)new Ferris::BadParam((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadParam, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadParam) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadParam__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadParam__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BadParam'"); + XSRETURN(0); +} + + +XS(_wrap_new_SchemaException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SchemaException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SchemaException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SchemaException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SchemaException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SchemaException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SchemaException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SchemaException *)new Ferris::SchemaException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SchemaException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SchemaException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SchemaException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SchemaException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SchemaException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SchemaException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SchemaException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SchemaException *)new Ferris::SchemaException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SchemaException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SchemaException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SchemaException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SchemaException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SchemaException'"); + XSRETURN(0); +} + + +XS(_wrap_new_SchemaNotFoundException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SchemaNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SchemaNotFoundException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SchemaNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SchemaNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SchemaNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SchemaNotFoundException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SchemaNotFoundException *)new Ferris::SchemaNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SchemaNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SchemaNotFoundException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SchemaNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SchemaNotFoundException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SchemaNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SchemaNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SchemaNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SchemaNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SchemaNotFoundException *)new Ferris::SchemaNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SchemaNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SchemaNotFoundException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SchemaNotFoundException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SchemaNotFoundException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SchemaNotFoundException'"); + XSRETURN(0); +} + + +XS(_wrap_new_MedallionException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::MedallionException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_MedallionException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MedallionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MedallionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MedallionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MedallionException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::MedallionException *)new Ferris::MedallionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__MedallionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_MedallionException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::MedallionException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_MedallionException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MedallionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MedallionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MedallionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MedallionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::MedallionException *)new Ferris::MedallionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__MedallionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_MedallionException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MedallionException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MedallionException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_MedallionException'"); + XSRETURN(0); +} + + +XS(_wrap_new_EtagereException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::EtagereException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_EtagereException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EtagereException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EtagereException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EtagereException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_EtagereException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::EtagereException *)new Ferris::EtagereException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EtagereException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EtagereException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::EtagereException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EtagereException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EtagereException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EtagereException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EtagereException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EtagereException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::EtagereException *)new Ferris::EtagereException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EtagereException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EtagereException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EtagereException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EtagereException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_EtagereException'"); + XSRETURN(0); +} + + +XS(_wrap_new_EmblemException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::EmblemException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_EmblemException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_EmblemException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::EmblemException *)new Ferris::EmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EmblemException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::EmblemException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EmblemException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::EmblemException *)new Ferris::EmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EmblemException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EmblemException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EmblemException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_EmblemException'"); + XSRETURN(0); +} + + +XS(_wrap_new_EmblemNotFoundException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::EmblemNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_EmblemNotFoundException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmblemNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmblemNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EmblemNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_EmblemNotFoundException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::EmblemNotFoundException *)new Ferris::EmblemNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EmblemNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EmblemNotFoundException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::EmblemNotFoundException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EmblemNotFoundException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EmblemNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EmblemNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EmblemNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EmblemNotFoundException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::EmblemNotFoundException *)new Ferris::EmblemNotFoundException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EmblemNotFoundException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EmblemNotFoundException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EmblemNotFoundException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_EmblemNotFoundException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_EmblemNotFoundException'"); + XSRETURN(0); +} + + +XS(_wrap_new_CanNotAddEmblemException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CanNotAddEmblemException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CanNotAddEmblemException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotAddEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotAddEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotAddEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CanNotAddEmblemException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CanNotAddEmblemException *)new Ferris::CanNotAddEmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotAddEmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotAddEmblemException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CanNotAddEmblemException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CanNotAddEmblemException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanNotAddEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanNotAddEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanNotAddEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanNotAddEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CanNotAddEmblemException *)new Ferris::CanNotAddEmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CanNotAddEmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CanNotAddEmblemException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotAddEmblemException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CanNotAddEmblemException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CanNotAddEmblemException'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchPersonalityException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchPersonalityException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchPersonalityException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchPersonalityException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchPersonalityException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchPersonalityException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchPersonalityException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchPersonalityException *)new Ferris::NoSuchPersonalityException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchPersonalityException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchPersonalityException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchPersonalityException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchPersonalityException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchPersonalityException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchPersonalityException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchPersonalityException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchPersonalityException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchPersonalityException *)new Ferris::NoSuchPersonalityException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchPersonalityException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchPersonalityException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchPersonalityException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchPersonalityException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchPersonalityException'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchBeliefException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchBeliefException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchBeliefException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchBeliefException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchBeliefException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchBeliefException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchBeliefException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchBeliefException *)new Ferris::NoSuchBeliefException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchBeliefException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchBeliefException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchBeliefException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchBeliefException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchBeliefException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchBeliefException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchBeliefException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchBeliefException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchBeliefException *)new Ferris::NoSuchBeliefException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchBeliefException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchBeliefException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchBeliefException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchBeliefException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchBeliefException'"); + XSRETURN(0); +} + + +XS(_wrap_new_AgentException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AgentException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AgentException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AgentException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AgentException *)new Ferris::AgentException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AgentException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AgentException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AgentException *)new Ferris::AgentException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AgentException'"); + XSRETURN(0); +} + + +XS(_wrap_new_AgentAlreadyExistsException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AgentAlreadyExistsException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AgentAlreadyExistsException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentAlreadyExistsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentAlreadyExistsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentAlreadyExistsException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AgentAlreadyExistsException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AgentAlreadyExistsException *)new Ferris::AgentAlreadyExistsException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentAlreadyExistsException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentAlreadyExistsException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AgentAlreadyExistsException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AgentAlreadyExistsException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentAlreadyExistsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentAlreadyExistsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentAlreadyExistsException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentAlreadyExistsException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AgentAlreadyExistsException *)new Ferris::AgentAlreadyExistsException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentAlreadyExistsException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentAlreadyExistsException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentAlreadyExistsException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentAlreadyExistsException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AgentAlreadyExistsException'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoSuchAgentException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoSuchAgentException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoSuchAgentException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchAgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchAgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchAgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoSuchAgentException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoSuchAgentException *)new Ferris::NoSuchAgentException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchAgentException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchAgentException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoSuchAgentException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoSuchAgentException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoSuchAgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoSuchAgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoSuchAgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoSuchAgentException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoSuchAgentException *)new Ferris::NoSuchAgentException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoSuchAgentException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoSuchAgentException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchAgentException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoSuchAgentException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoSuchAgentException'"); + XSRETURN(0); +} + + +XS(_wrap_new_AgentOnlyHandlesOneEmblemException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::AgentOnlyHandlesOneEmblemException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_AgentOnlyHandlesOneEmblemException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::AgentOnlyHandlesOneEmblemException *)new Ferris::AgentOnlyHandlesOneEmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentOnlyHandlesOneEmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentOnlyHandlesOneEmblemException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::AgentOnlyHandlesOneEmblemException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_AgentOnlyHandlesOneEmblemException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AgentOnlyHandlesOneEmblemException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::AgentOnlyHandlesOneEmblemException *)new Ferris::AgentOnlyHandlesOneEmblemException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__AgentOnlyHandlesOneEmblemException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_AgentOnlyHandlesOneEmblemException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentOnlyHandlesOneEmblemException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AgentOnlyHandlesOneEmblemException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_AgentOnlyHandlesOneEmblemException'"); + XSRETURN(0); +} + + +XS(_wrap_new_XMLBase__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::XMLBase *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_XMLBase(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_XMLBase" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::XMLBase *)new Ferris::XMLBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLBase__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::XMLBase *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_XMLBase(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::XMLBase *)new Ferris::XMLBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLBase__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLBase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_XMLBase'"); + XSRETURN(0); +} + + +XS(_wrap_new_XMLParseError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::XMLParseError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_XMLParseError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_XMLParseError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::XMLParseError *)new Ferris::XMLParseError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLParseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLParseError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::XMLParseError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_XMLParseError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLParseError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::XMLParseError *)new Ferris::XMLParseError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLParseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLParseError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLParseError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLParseError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_XMLParseError'"); + XSRETURN(0); +} + + +XS(_wrap_new_XMLFatalError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::XMLFatalError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_XMLFatalError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLFatalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLFatalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLFatalError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_XMLFatalError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::XMLFatalError *)new Ferris::XMLFatalError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLFatalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLFatalError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::XMLFatalError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_XMLFatalError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMLFatalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMLFatalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMLFatalError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMLFatalError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::XMLFatalError *)new Ferris::XMLFatalError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMLFatalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMLFatalError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLFatalError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMLFatalError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_XMLFatalError'"); + XSRETURN(0); +} + + +XS(_wrap_new_dbXMLException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::dbXMLException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_dbXMLException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dbXMLException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dbXMLException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dbXMLException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dbXMLException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::dbXMLException *)new Ferris::dbXMLException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__dbXMLException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_dbXMLException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::dbXMLException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_dbXMLException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dbXMLException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dbXMLException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dbXMLException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dbXMLException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::dbXMLException *)new Ferris::dbXMLException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__dbXMLException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_dbXMLException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_dbXMLException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_dbXMLException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_dbXMLException'"); + XSRETURN(0); +} + + +XS(_wrap_new_BranchFileSystem__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BranchFileSystem *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BranchFileSystem(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BranchFileSystem" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BranchFileSystem" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BranchFileSystem" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BranchFileSystem" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BranchFileSystem *)new Ferris::BranchFileSystem((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BranchFileSystem, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BranchFileSystem__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BranchFileSystem *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BranchFileSystem(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BranchFileSystem" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BranchFileSystem" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BranchFileSystem" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BranchFileSystem" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BranchFileSystem *)new Ferris::BranchFileSystem((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BranchFileSystem, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BranchFileSystem) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BranchFileSystem__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BranchFileSystem__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BranchFileSystem'"); + XSRETURN(0); +} + + +XS(_wrap_new_RelativeTimeParsing__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::RelativeTimeParsing *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_RelativeTimeParsing(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelativeTimeParsing" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RelativeTimeParsing" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RelativeTimeParsing" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RelativeTimeParsing" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::RelativeTimeParsing *)new Ferris::RelativeTimeParsing((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RelativeTimeParsing, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RelativeTimeParsing__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::RelativeTimeParsing *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_RelativeTimeParsing(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelativeTimeParsing" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RelativeTimeParsing" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RelativeTimeParsing" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelativeTimeParsing" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::RelativeTimeParsing *)new Ferris::RelativeTimeParsing((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__RelativeTimeParsing, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_RelativeTimeParsing) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RelativeTimeParsing__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RelativeTimeParsing__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_RelativeTimeParsing'"); + XSRETURN(0); +} + + +XS(_wrap_new_CryptoBase__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::CryptoBase *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_CryptoBase(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CryptoBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CryptoBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CryptoBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CryptoBase" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::CryptoBase *)new Ferris::CryptoBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CryptoBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CryptoBase__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::CryptoBase *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_CryptoBase(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CryptoBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CryptoBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CryptoBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CryptoBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::CryptoBase *)new Ferris::CryptoBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CryptoBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CryptoBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CryptoBase__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_CryptoBase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_CryptoBase'"); + XSRETURN(0); +} + + +XS(_wrap_new_GPGMEInitFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::GPGMEInitFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_GPGMEInitFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GPGMEInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GPGMEInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GPGMEInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GPGMEInitFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::GPGMEInitFailed *)new Ferris::GPGMEInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GPGMEInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GPGMEInitFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::GPGMEInitFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_GPGMEInitFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GPGMEInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GPGMEInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GPGMEInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPGMEInitFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::GPGMEInitFailed *)new Ferris::GPGMEInitFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GPGMEInitFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GPGMEInitFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GPGMEInitFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GPGMEInitFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_GPGMEInitFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_BadSignature__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::BadSignature *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_BadSignature(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadSignature" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadSignature" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadSignature" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BadSignature" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::BadSignature *)new Ferris::BadSignature((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadSignature, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadSignature__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::BadSignature *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_BadSignature(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BadSignature" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BadSignature" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BadSignature" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BadSignature" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::BadSignature *)new Ferris::BadSignature((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__BadSignature, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_BadSignature) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadSignature__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BadSignature__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_BadSignature'"); + XSRETURN(0); +} + + +XS(_wrap_new_KeylistException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::KeylistException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_KeylistException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KeylistException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KeylistException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_KeylistException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_KeylistException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::KeylistException *)new Ferris::KeylistException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__KeylistException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_KeylistException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::KeylistException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_KeylistException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KeylistException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KeylistException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_KeylistException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KeylistException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::KeylistException *)new Ferris::KeylistException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__KeylistException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_KeylistException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_KeylistException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_KeylistException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_KeylistException'"); + XSRETURN(0); +} + + +XS(_wrap_new_XMPBase__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::XMPBase *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_XMPBase(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMPBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMPBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMPBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_XMPBase" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::XMPBase *)new Ferris::XMPBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMPBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMPBase__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::XMPBase *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_XMPBase(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMPBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMPBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMPBase" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPBase" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::XMPBase *)new Ferris::XMPBase((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMPBase, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMPBase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMPBase__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMPBase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_XMPBase'"); + XSRETURN(0); +} + + +XS(_wrap_new_XMPPacketScanFailed__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::XMPPacketScanFailed *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_XMPPacketScanFailed(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMPPacketScanFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMPPacketScanFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMPPacketScanFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_XMPPacketScanFailed" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::XMPPacketScanFailed *)new Ferris::XMPPacketScanFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMPPacketScanFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMPPacketScanFailed__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::XMPPacketScanFailed *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_XMPPacketScanFailed(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XMPPacketScanFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XMPPacketScanFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_XMPPacketScanFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XMPPacketScanFailed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::XMPPacketScanFailed *)new Ferris::XMPPacketScanFailed((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__XMPPacketScanFailed, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_XMPPacketScanFailed) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMPPacketScanFailed__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_XMPPacketScanFailed__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_XMPPacketScanFailed'"); + XSRETURN(0); +} + + +XS(_wrap_new_GPhoto2__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::GPhoto2 *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_GPhoto2(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GPhoto2" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GPhoto2" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GPhoto2" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GPhoto2" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::GPhoto2 *)new Ferris::GPhoto2((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GPhoto2, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GPhoto2__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::GPhoto2 *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_GPhoto2(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GPhoto2" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GPhoto2" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GPhoto2" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GPhoto2" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::GPhoto2 *)new Ferris::GPhoto2((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__GPhoto2, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_GPhoto2) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GPhoto2__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_GPhoto2__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_GPhoto2'"); + XSRETURN(0); +} + + +XS(_wrap_new_NoOpenWithContext__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::NoOpenWithContext *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_NoOpenWithContext(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoOpenWithContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoOpenWithContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoOpenWithContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NoOpenWithContext" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::NoOpenWithContext *)new Ferris::NoOpenWithContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoOpenWithContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoOpenWithContext__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::NoOpenWithContext *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_NoOpenWithContext(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NoOpenWithContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NoOpenWithContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NoOpenWithContext" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NoOpenWithContext" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::NoOpenWithContext *)new Ferris::NoOpenWithContext((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__NoOpenWithContext, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_NoOpenWithContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoOpenWithContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NoOpenWithContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_NoOpenWithContext'"); + XSRETURN(0); +} + + +XS(_wrap_new_OpenActionIsNotDefined__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::OpenActionIsNotDefined *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_OpenActionIsNotDefined(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OpenActionIsNotDefined" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OpenActionIsNotDefined" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OpenActionIsNotDefined" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OpenActionIsNotDefined" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::OpenActionIsNotDefined *)new Ferris::OpenActionIsNotDefined((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__OpenActionIsNotDefined, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_OpenActionIsNotDefined__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::OpenActionIsNotDefined *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_OpenActionIsNotDefined(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OpenActionIsNotDefined" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OpenActionIsNotDefined" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OpenActionIsNotDefined" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OpenActionIsNotDefined" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::OpenActionIsNotDefined *)new Ferris::OpenActionIsNotDefined((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__OpenActionIsNotDefined, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_OpenActionIsNotDefined) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_OpenActionIsNotDefined__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_OpenActionIsNotDefined__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_OpenActionIsNotDefined'"); + XSRETURN(0); +} + + +XS(_wrap_new_DBusException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::DBusException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_DBusException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DBusException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DBusException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DBusException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DBusException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::DBusException *)new Ferris::DBusException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DBusException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DBusException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::DBusException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_DBusException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DBusException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DBusException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DBusException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::DBusException *)new Ferris::DBusException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DBusException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DBusException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DBusException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DBusException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_DBusException'"); + XSRETURN(0); +} + + +XS(_wrap_new_DBusConnectionException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::DBusConnectionException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_DBusConnectionException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DBusConnectionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DBusConnectionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DBusConnectionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DBusConnectionException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::DBusConnectionException *)new Ferris::DBusConnectionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DBusConnectionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DBusConnectionException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::DBusConnectionException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_DBusConnectionException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DBusConnectionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DBusConnectionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DBusConnectionException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DBusConnectionException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::DBusConnectionException *)new Ferris::DBusConnectionException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DBusConnectionException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DBusConnectionException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DBusConnectionException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DBusConnectionException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_DBusConnectionException'"); + XSRETURN(0); +} + + +XS(_wrap_new_WebPhotoException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::WebPhotoException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_WebPhotoException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WebPhotoException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_WebPhotoException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_WebPhotoException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_WebPhotoException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::WebPhotoException *)new Ferris::WebPhotoException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__WebPhotoException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_WebPhotoException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::WebPhotoException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_WebPhotoException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WebPhotoException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_WebPhotoException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_WebPhotoException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WebPhotoException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::WebPhotoException *)new Ferris::WebPhotoException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__WebPhotoException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_WebPhotoException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_WebPhotoException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_WebPhotoException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_WebPhotoException'"); + XSRETURN(0); +} + + +XS(_wrap_new_SQLiteException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SQLiteException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SQLiteException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SQLiteException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SQLiteException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SQLiteException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SQLiteException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SQLiteException *)new Ferris::SQLiteException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SQLiteException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SQLiteException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SQLiteException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SQLiteException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SQLiteException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SQLiteException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SQLiteException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SQLiteException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SQLiteException *)new Ferris::SQLiteException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SQLiteException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SQLiteException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SQLiteException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SQLiteException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SQLiteException'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisHALException__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisHALException *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisHALException(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisHALException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisHALException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisHALException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisHALException" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisHALException *)new Ferris::FerrisHALException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisHALException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisHALException__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisHALException *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisHALException(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisHALException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisHALException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisHALException" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisHALException" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisHALException *)new Ferris::FerrisHALException((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisHALException, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisHALException) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisHALException__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisHALException__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisHALException'"); + XSRETURN(0); +} + + +XS(_wrap_new_SyntaxError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::SyntaxError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_SyntaxError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SyntaxError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::SyntaxError *)new Ferris::SyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SyntaxError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::SyntaxError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_SyntaxError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::SyntaxError *)new Ferris::SyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__SyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SyntaxError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SyntaxError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SyntaxError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_SyntaxError'"); + XSRETURN(0); +} + + +XS(_wrap_new_FFilterSyntaxError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FFilterSyntaxError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FFilterSyntaxError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FFilterSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FFilterSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FFilterSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FFilterSyntaxError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FFilterSyntaxError *)new Ferris::FFilterSyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FFilterSyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FFilterSyntaxError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FFilterSyntaxError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FFilterSyntaxError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FFilterSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FFilterSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FFilterSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFilterSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FFilterSyntaxError *)new Ferris::FFilterSyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FFilterSyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FFilterSyntaxError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FFilterSyntaxError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FFilterSyntaxError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FFilterSyntaxError'"); + XSRETURN(0); +} + + +XS(_wrap_delete_FFilterSyntaxError) { + { + Ferris::FFilterSyntaxError *arg1 = (Ferris::FFilterSyntaxError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_FFilterSyntaxError(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FFilterSyntaxError, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FFilterSyntaxError" "', argument " "1"" of type '" "Ferris::FFilterSyntaxError *""'"); + } + arg1 = reinterpret_cast< Ferris::FFilterSyntaxError * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FFilterSyntaxError_whats) { + { + Ferris::FFilterSyntaxError *arg1 = (Ferris::FFilterSyntaxError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FFilterSyntaxError_whats(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__FFilterSyntaxError, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FFilterSyntaxError_whats" "', argument " "1"" of type '" "Ferris::FFilterSyntaxError const *""'"); + } + arg1 = reinterpret_cast< Ferris::FFilterSyntaxError * >(argp1); + result = (std::string *) &((Ferris::FFilterSyntaxError const *)arg1)->whats(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FulltextQuerySyntaxError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FulltextQuerySyntaxError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FulltextQuerySyntaxError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FulltextQuerySyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FulltextQuerySyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FulltextQuerySyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FulltextQuerySyntaxError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FulltextQuerySyntaxError *)new Ferris::FulltextQuerySyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FulltextQuerySyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FulltextQuerySyntaxError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FulltextQuerySyntaxError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FulltextQuerySyntaxError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FulltextQuerySyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FulltextQuerySyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FulltextQuerySyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FulltextQuerySyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FulltextQuerySyntaxError *)new Ferris::FulltextQuerySyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FulltextQuerySyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FulltextQuerySyntaxError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FulltextQuerySyntaxError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FulltextQuerySyntaxError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FulltextQuerySyntaxError'"); + XSRETURN(0); +} + + +XS(_wrap_new_URLDecodeSyntaxError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::URLDecodeSyntaxError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_URLDecodeSyntaxError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URLDecodeSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_URLDecodeSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_URLDecodeSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_URLDecodeSyntaxError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::URLDecodeSyntaxError *)new Ferris::URLDecodeSyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__URLDecodeSyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_URLDecodeSyntaxError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::URLDecodeSyntaxError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_URLDecodeSyntaxError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URLDecodeSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_URLDecodeSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_URLDecodeSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URLDecodeSyntaxError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::URLDecodeSyntaxError *)new Ferris::URLDecodeSyntaxError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__URLDecodeSyntaxError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_URLDecodeSyntaxError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_URLDecodeSyntaxError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_URLDecodeSyntaxError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_URLDecodeSyntaxError'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisInternalError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisInternalError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisInternalError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisInternalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisInternalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisInternalError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisInternalError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisInternalError *)new Ferris::FerrisInternalError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisInternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisInternalError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisInternalError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisInternalError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisInternalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisInternalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisInternalError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisInternalError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisInternalError *)new Ferris::FerrisInternalError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisInternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisInternalError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisInternalError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisInternalError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisInternalError'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisParentNotSetError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisParentNotSetError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisParentNotSetError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisParentNotSetError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisParentNotSetError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisParentNotSetError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisParentNotSetError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisParentNotSetError *)new Ferris::FerrisParentNotSetError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisParentNotSetError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisParentNotSetError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisParentNotSetError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisParentNotSetError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisParentNotSetError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisParentNotSetError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisParentNotSetError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisParentNotSetError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisParentNotSetError *)new Ferris::FerrisParentNotSetError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisParentNotSetError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisParentNotSetError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisParentNotSetError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisParentNotSetError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisParentNotSetError'"); + XSRETURN(0); +} + + +XS(_wrap_new_FerrisCanNotGetScriptNameError__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::FerrisCanNotGetScriptNameError *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_FerrisCanNotGetScriptNameError(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::FerrisCanNotGetScriptNameError *)new Ferris::FerrisCanNotGetScriptNameError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCanNotGetScriptNameError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCanNotGetScriptNameError__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::FerrisCanNotGetScriptNameError *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_FerrisCanNotGetScriptNameError(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FerrisCanNotGetScriptNameError" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::FerrisCanNotGetScriptNameError *)new Ferris::FerrisCanNotGetScriptNameError((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__FerrisCanNotGetScriptNameError, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_FerrisCanNotGetScriptNameError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCanNotGetScriptNameError__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FerrisCanNotGetScriptNameError__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_FerrisCanNotGetScriptNameError'"); + XSRETURN(0); +} + + +XS(_wrap_ThrowFromErrno__SWIG_0) { + { + int arg1 ; + std::string *arg2 = 0 ; + Ferris::Attribute *arg3 = (Ferris::Attribute *) 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ThrowFromErrno(eno,e,a);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ThrowFromErrno" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ThrowFromErrno" "', argument " "3"" of type '" "Ferris::Attribute *""'"); + } + arg3 = reinterpret_cast< Ferris::Attribute * >(argp3); + Ferris::ThrowFromErrno(arg1,(std::string const &)*arg2,arg3); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ThrowFromErrno__SWIG_1) { + { + int arg1 ; + std::string *arg2 = 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ThrowFromErrno(eno,e);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ThrowFromErrno" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ThrowFromErrno" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + Ferris::ThrowFromErrno(arg1,(std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ThrowFromErrno) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ThrowFromErrno__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ThrowFromErrno__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ThrowFromErrno'"); + XSRETURN(0); +} + + +XS(_wrap_CacheHandlable_getOnlyInCacheSignal) { + { + Ferris::CacheHandlable *arg1 = (Ferris::CacheHandlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::CacheHandlable::OnlyInCacheSignal_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheHandlable_getOnlyInCacheSignal(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheHandlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheHandlable_getOnlyInCacheSignal" "', argument " "1"" of type '" "Ferris::CacheHandlable *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheHandlable * >(argp1); + result = (Ferris::CacheHandlable::OnlyInCacheSignal_t *) &(arg1)->getOnlyInCacheSignal(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_Ferris__CacheHandlable_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_CacheHandlable) { + { + int argvi = 0; + Ferris::CacheHandlable *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_CacheHandlable();"); + } + result = (Ferris::CacheHandlable *)new Ferris::CacheHandlable(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CacheHandlable, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheHandlable_AddRef) { + { + Ferris::CacheHandlable *arg1 = (Ferris::CacheHandlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheHandlable_AddRef(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheHandlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheHandlable_AddRef" "', argument " "1"" of type '" "Ferris::CacheHandlable *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheHandlable * >(argp1); + result = (arg1)->AddRef(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheHandlable_Release) { + { + Ferris::CacheHandlable *arg1 = (Ferris::CacheHandlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + FerrisLoki::Handlable::ref_count_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheHandlable_Release(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheHandlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheHandlable_Release" "', argument " "1"" of type '" "Ferris::CacheHandlable *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheHandlable * >(argp1); + result = (arg1)->Release(); + ST(argvi) = SWIG_NewPointerObj((new FerrisLoki::Handlable::ref_count_t(static_cast< const FerrisLoki::Handlable::ref_count_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheHandlable_sync) { + { + Ferris::CacheHandlable *arg1 = (Ferris::CacheHandlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheHandlable_sync(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheHandlable, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheHandlable_sync" "', argument " "1"" of type '" "Ferris::CacheHandlable *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheHandlable * >(argp1); + (arg1)->sync(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Versioned) { + { + int argvi = 0; + Ferris::Versioned *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Versioned();"); + } + result = (Ferris::Versioned *)new Ferris::Versioned(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Versioned, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Versioned_getVersion) { + { + Ferris::Versioned *arg1 = (Ferris::Versioned *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Versioned::Version_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Versioned_getVersion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Versioned, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Versioned_getVersion" "', argument " "1"" of type '" "Ferris::Versioned const *""'"); + } + arg1 = reinterpret_cast< Ferris::Versioned * >(argp1); + result = ((Ferris::Versioned const *)arg1)->getVersion(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Versioned::Version_t(static_cast< const Ferris::Versioned::Version_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AdjustForOpenMode_Opening__SWIG_0) { + { + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg1 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AdjustForOpenMode_Opening(ss,m);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjustForOpenMode_Opening" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjustForOpenMode_Opening" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_istream * >(argp1)); + } + } + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjustForOpenMode_Opening" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + Ferris::AdjustForOpenMode_Opening(arg1,arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AdjustForOpenMode_Opening__SWIG_1) { + { + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > arg1 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: AdjustForOpenMode_Opening(ss,m);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjustForOpenMode_Opening" "', argument " "1"" of type '" "Ferris::fh_iostream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjustForOpenMode_Opening" "', argument " "1"" of type '" "Ferris::fh_iostream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_iostream * >(argp1)); + } + } + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjustForOpenMode_Opening" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + Ferris::AdjustForOpenMode_Opening(arg1,arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_AdjustForOpenMode_Opening) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AdjustForOpenMode_Opening__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_AdjustForOpenMode_Opening__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'AdjustForOpenMode_Opening'"); + XSRETURN(0); +} + + +XS(_wrap_AdjustForOpenMode_Closing) { + { + Ferris::fh_istream *arg1 = 0 ; + Ferris::ferris_ios::openmode arg2 ; + std::streamsize arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: AdjustForOpenMode_Closing(ss,m,tellp);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjustForOpenMode_Closing" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjustForOpenMode_Closing" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjustForOpenMode_Closing" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__streamsize, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjustForOpenMode_Closing" "', argument " "3"" of type '" "std::streamsize""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjustForOpenMode_Closing" "', argument " "3"" of type '" "std::streamsize""'"); + } else { + arg3 = *(reinterpret_cast< std::streamsize * >(argp3)); + } + } + Ferris::AdjustForOpenMode_Closing(*arg1,arg2,arg3); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getLastPartOfName) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_getLastPartOfName(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getLastPartOfName" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (arg1)->getLastPartOfName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_appendToPath__SWIG_0) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: Attribute_appendToPath(self,p,d,allowDirToBeAbsolute);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_appendToPath" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Attribute_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Attribute_appendToPath" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_appendToPath__SWIG_1) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Attribute_appendToPath(self,p,d);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_appendToPath" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Attribute_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_appendToPath) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_appendToPath__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_appendToPath__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Attribute_appendToPath'"); + XSRETURN(0); +} + + +XS(_wrap_new_Attribute__SWIG_0) { + { + Ferris::Attribute::Parent_t arg1 = (Ferris::Attribute::Parent_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Attribute *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Attribute(parent);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Attribute" "', argument " "1"" of type '" "Ferris::Attribute::Parent_t""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute::Parent_t >(argp1); + result = (Ferris::Attribute *)new Ferris::Attribute(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Attribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Attribute__SWIG_1) { + { + int argvi = 0; + Ferris::Attribute *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Attribute();"); + } + result = (Ferris::Attribute *)new Ferris::Attribute(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Attribute, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Attribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Attribute__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Attribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_Attribute'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Attribute) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Attribute(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getIStream__SWIG_0) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_getIStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getIStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_getIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (arg1)->getIStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getIStream__SWIG_1) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getIStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getIStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + try { + result = (arg1)->getIStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Attribute_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_Attribute_getLocalIStream__SWIG_0) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + std::string *arg2 = 0 ; + Ferris::ferris_ios::openmode arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned long long val3 ; + int ecode3 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Attribute_getLocalIStream(self,new_dn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getLocalIStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Attribute_getLocalIStream" "', argument " "3"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg3 = static_cast< Ferris::ferris_ios::openmode >(val3); + try { + result = (arg1)->getLocalIStream(*arg2,arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getLocalIStream__SWIG_1) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_getLocalIStream(self,new_dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getLocalIStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + try { + result = (arg1)->getLocalIStream(*arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getLocalIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getLocalIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getLocalIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Attribute_getLocalIStream'"); + XSRETURN(0); +} + + +XS(_wrap_Attribute_getIOStream__SWIG_0) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_getIOStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getIOStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_getIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (arg1)->getIOStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getIOStream__SWIG_1) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getIOStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getIOStream" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + try { + result = (arg1)->getIOStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Attribute_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_Attribute_checkOpenModeSupported) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_checkOpenModeSupported(self,userm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_checkOpenModeSupported" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_checkOpenModeSupported" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = (bool)(arg1)->checkOpenModeSupported(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getSupportedOpenModes) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + result = (Ferris::ferris_ios::openmode)(arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getParent) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Attribute::Parent_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getParent(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getParent" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + try { + result = (Ferris::Attribute::Parent_t)(arg1)->getParent(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_isParentBound) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_isParentBound(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_isParentBound" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + result = (bool)(arg1)->isParentBound(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getDirName) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getDirName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getDirName" "', argument " "1"" of type '" "Ferris::Attribute const *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + result = (std::string *) &((Ferris::Attribute const *)arg1)->getDirName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_getDirPath) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Attribute_getDirPath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_getDirPath" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + try { + result = (arg1)->getDirPath(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_copyTo__SWIG_0) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_copyTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_copyTo" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_copyTo" "', argument " "2"" of type '" "Ferris::fh_iostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_copyTo" "', argument " "2"" of type '" "Ferris::fh_iostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_iostream * >(argp2)); + } + } + result = (arg1)->copyTo(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_copyTo__SWIG_1) { + { + Ferris::Attribute *arg1 = (Ferris::Attribute *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Attribute_copyTo(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_copyTo" "', argument " "1"" of type '" "Ferris::Attribute *""'"); + } + arg1 = reinterpret_cast< Ferris::Attribute * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_copyTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Attribute_copyTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + result = (arg1)->copyTo(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_ostream(static_cast< const Ferris::fh_ostream& >(result))), SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Attribute_copyTo) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_copyTo__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Attribute_copyTo__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'Attribute_copyTo'"); + XSRETURN(0); +} + + +XS(_wrap_delete_EA_Atom) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_EA_Atom(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EA_Atom" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getIStream__SWIG_0) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getIStream__SWIG_1) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_getIStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_getIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_getIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_EA_Atom_getIOStream__SWIG_0) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_getIOStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_getIOStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getIOStream__SWIG_1) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_EA_Atom_checkOpenModeSupported) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: EA_Atom_checkOpenModeSupported(self,userm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_checkOpenModeSupported" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EA_Atom_checkOpenModeSupported" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = (bool)(arg1)->checkOpenModeSupported(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_getSupportedOpenModes) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EA_Atom_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + result = (Ferris::ferris_ios::openmode)(arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_havePassedInSteamRead) { + { + Ferris::EA_Atom *arg1 = (Ferris::EA_Atom *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EA_Atom_havePassedInSteamRead(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_havePassedInSteamRead" "', argument " "1"" of type '" "Ferris::EA_Atom *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom * >(argp1); + result = (bool)(arg1)->havePassedInSteamRead(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadOnly_getIStream) { + { + Ferris::EA_Atom_ReadOnly *arg1 = (Ferris::EA_Atom_ReadOnly *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadOnly_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadOnly, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadOnly_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadOnly *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadOnly * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadOnly_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadOnly_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadOnly_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadOnly_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadOnly_PassedInStream_getIStream__SWIG_0) { + { + Ferris::EA_Atom_ReadOnly_PassedInStream *arg1 = (Ferris::EA_Atom_ReadOnly_PassedInStream *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadOnly_PassedInStream_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadOnly_PassedInStream *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadOnly_PassedInStream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadOnly_PassedInStream_getIStream__SWIG_1) { + { + Ferris::EA_Atom_ReadOnly_PassedInStream *arg1 = (Ferris::EA_Atom_ReadOnly_PassedInStream *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + Ferris::fh_stringstream *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + Ferris::fh_stringstream *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: EA_Atom_ReadOnly_PassedInStream_getIStream(self,c,rdn,m,ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadOnly_PassedInStream *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadOnly_PassedInStream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "5"" of type '" "Ferris::fh_stringstream &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadOnly_PassedInStream_getIStream" "', argument " "5"" of type '" "Ferris::fh_stringstream &""'"); + } + arg5 = reinterpret_cast< Ferris::fh_stringstream * >(argp5); + try { + result = (Ferris::fh_stringstream *) &(arg1)->getIStream(arg2,(std::string const &)*arg3,arg4,*arg5); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0 | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadOnly_PassedInStream_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadOnly_PassedInStream_getIStream__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadOnly_PassedInStream_getIStream__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_ReadOnly_PassedInStream_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_EA_Atom_ReadOnly_PassedInStream_havePassedInSteamRead) { + { + Ferris::EA_Atom_ReadOnly_PassedInStream *arg1 = (Ferris::EA_Atom_ReadOnly_PassedInStream *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EA_Atom_ReadOnly_PassedInStream_havePassedInSteamRead(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadOnly_PassedInStream_havePassedInSteamRead" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadOnly_PassedInStream *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadOnly_PassedInStream * >(argp1); + result = (bool)(arg1)->havePassedInSteamRead(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EA_Atom_ReadWrite) { + { + Ferris::EA_Atom_ReadWrite::GetIStream_Func_t *arg1 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg2 = 0 ; + Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::EA_Atom_ReadWrite *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EA_Atom_ReadWrite(f_i,f_io,f_closed);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EA_Atom_ReadWrite" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIStream_Func_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EA_Atom_ReadWrite" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EA_Atom_ReadWrite" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t * >(argp3); + result = (Ferris::EA_Atom_ReadWrite *)new Ferris::EA_Atom_ReadWrite((Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &)*arg1,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg2,(Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_priv_getIOStream) { + { + Ferris::EA_Atom_ReadWrite *arg1 = (Ferris::EA_Atom_ReadWrite *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_priv_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_priv_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_priv_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_priv_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_priv_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (arg1)->priv_getIOStream(arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_getIOStream__SWIG_0) { + { + Ferris::EA_Atom_ReadWrite *arg1 = (Ferris::EA_Atom_ReadWrite *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_getIOStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_getIOStream__SWIG_1) { + { + Ferris::EA_Atom_ReadWrite *arg1 = (Ferris::EA_Atom_ReadWrite *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_ReadWrite_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_new_EA_Atom_ReadWrite_PassedInStream) { + { + Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t *arg1 = 0 ; + Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::EA_Atom_ReadWrite_PassedInStream *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_EA_Atom_ReadWrite_PassedInStream(f_i,f_closed);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EA_Atom_ReadWrite_PassedInStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_PassedInStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EA_Atom_ReadWrite_PassedInStream" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_PassedInStream" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t * >(argp2); + result = (Ferris::EA_Atom_ReadWrite_PassedInStream *)new Ferris::EA_Atom_ReadWrite_PassedInStream((Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t const &)*arg1,(Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_PassedInStream, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_PassedInStream_priv_getIOStream) { + { + Ferris::EA_Atom_ReadWrite_PassedInStream *arg1 = (Ferris::EA_Atom_ReadWrite_PassedInStream *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_PassedInStream_priv_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_PassedInStream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_PassedInStream_priv_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_PassedInStream *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_PassedInStream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_PassedInStream_priv_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_PassedInStream_priv_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_PassedInStream_priv_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (arg1)->priv_getIOStream(arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_EA_Atom_ReadWrite_OpenModeCached) { + { + Ferris::EA_Atom_ReadWrite::GetIStream_Func_t *arg1 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg2 = 0 ; + Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::EA_Atom_ReadWrite_OpenModeCached *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_EA_Atom_ReadWrite_OpenModeCached(f_i,f_io,f_closed);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIStream_Func_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_OpenModeCached" "', argument " "3"" of type '" "Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t * >(argp3); + result = (Ferris::EA_Atom_ReadWrite_OpenModeCached *)new Ferris::EA_Atom_ReadWrite_OpenModeCached((Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &)*arg1,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg2,(Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getOpenMode) { + { + Ferris::EA_Atom_ReadWrite_OpenModeCached *arg1 = (Ferris::EA_Atom_ReadWrite_OpenModeCached *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_OpenModeCached_getOpenMode(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getOpenMode" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_OpenModeCached *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_OpenModeCached * >(argp1); + result = (Ferris::ferris_ios::openmode)(arg1)->getOpenMode(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIStream) { + { + Ferris::EA_Atom_ReadWrite_OpenModeCached *arg1 = (Ferris::EA_Atom_ReadWrite_OpenModeCached *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_OpenModeCached_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_OpenModeCached *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_OpenModeCached * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream__SWIG_0) { + { + Ferris::EA_Atom_ReadWrite_OpenModeCached *arg1 = (Ferris::EA_Atom_ReadWrite_OpenModeCached *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_OpenModeCached_getIOStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_OpenModeCached *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_OpenModeCached * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream__SWIG_1) { + { + Ferris::EA_Atom_ReadWrite_OpenModeCached *arg1 = (Ferris::EA_Atom_ReadWrite_OpenModeCached *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_OpenModeCached_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_OpenModeCached *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_OpenModeCached * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_OpenModeCached_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_ReadWrite_OpenModeCached_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_new_EA_Atom_ReadWrite_Contents) { + { + Ferris::EA_Atom_ReadWrite::GetIStream_Func_t *arg1 = 0 ; + Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::EA_Atom_ReadWrite_Contents *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_EA_Atom_ReadWrite_Contents(f_i,f_io);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EA_Atom_ReadWrite_Contents" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_Contents" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIStream_Func_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EA_Atom_ReadWrite_Contents" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EA_Atom_ReadWrite_Contents" "', argument " "2"" of type '" "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t * >(argp2); + result = (Ferris::EA_Atom_ReadWrite_Contents *)new Ferris::EA_Atom_ReadWrite_Contents((Ferris::EA_Atom_ReadWrite::GetIStream_Func_t const &)*arg1,(Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_Contents_getIOStream__SWIG_0) { + { + Ferris::EA_Atom_ReadWrite_Contents *arg1 = (Ferris::EA_Atom_ReadWrite_Contents *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_Contents_getIOStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_Contents *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_Contents * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_Contents_getIOStream__SWIG_1) { + { + Ferris::EA_Atom_ReadWrite_Contents *arg1 = (Ferris::EA_Atom_ReadWrite_Contents *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_Contents_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_Contents *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_Contents * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_Contents_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_ReadWrite_Contents_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_Contents_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_ReadWrite_Contents_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_ReadWrite_Contents_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_EA_Atom_ReadWrite_Contents_nullclosed) { + { + Ferris::EA_Atom_ReadWrite_Contents *arg1 = (Ferris::EA_Atom_ReadWrite_Contents *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::EA_Atom *arg4 = (Ferris::EA_Atom *) 0 ; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: EA_Atom_ReadWrite_Contents_nullclosed(self,Ferris::Context *,std::string const &,Ferris::EA_Atom *,Ferris::fh_istream);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "1"" of type '" "Ferris::EA_Atom_ReadWrite_Contents *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_ReadWrite_Contents * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "4"" of type '" "Ferris::EA_Atom *""'"); + } + arg4 = reinterpret_cast< Ferris::EA_Atom * >(argp4); + { + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "5"" of type '" "Ferris::fh_istream""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_ReadWrite_Contents_nullclosed" "', argument " "5"" of type '" "Ferris::fh_istream""'"); + } else { + arg5 = *(reinterpret_cast< Ferris::fh_istream * >(argp5)); + } + } + (arg1)->nullclosed(arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_Static_getIStream) { + { + Ferris::EA_Atom_Static *arg1 = (Ferris::EA_Atom_Static *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_Static_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_Static, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_Static_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_Static *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_Static * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_Static_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_Static_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_Static_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_Static_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_RDFCacheAttribute_getIStream) { + { + Ferris::EA_Atom_RDFCacheAttribute *arg1 = (Ferris::EA_Atom_RDFCacheAttribute *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_RDFCacheAttribute_getIStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_RDFCacheAttribute_getIStream" "', argument " "1"" of type '" "Ferris::EA_Atom_RDFCacheAttribute *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_RDFCacheAttribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_RDFCacheAttribute_getIStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_RDFCacheAttribute_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_RDFCacheAttribute_getIStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_RDFCacheAttribute_getIStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_RDFCacheAttribute_getIOStream__SWIG_0) { + { + Ferris::EA_Atom_RDFCacheAttribute *arg1 = (Ferris::EA_Atom_RDFCacheAttribute *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + Ferris::ferris_ios::openmode arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + unsigned long long val4 ; + int ecode4 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: EA_Atom_RDFCacheAttribute_getIOStream(self,c,rdn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_RDFCacheAttribute *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_RDFCacheAttribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "4"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg4 = static_cast< Ferris::ferris_ios::openmode >(val4); + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3,arg4); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_RDFCacheAttribute_getIOStream__SWIG_1) { + { + Ferris::EA_Atom_RDFCacheAttribute *arg1 = (Ferris::EA_Atom_RDFCacheAttribute *) 0 ; + Ferris::Context *arg2 = (Ferris::Context *) 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: EA_Atom_RDFCacheAttribute_getIOStream(self,c,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "1"" of type '" "Ferris::EA_Atom_RDFCacheAttribute *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_RDFCacheAttribute * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "2"" of type '" "Ferris::Context *""'"); + } + arg2 = reinterpret_cast< Ferris::Context * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EA_Atom_RDFCacheAttribute_getIOStream" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + try { + result = (arg1)->getIOStream(arg2,(std::string const &)*arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_EA_Atom_RDFCacheAttribute_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_RDFCacheAttribute_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_EA_Atom_RDFCacheAttribute_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'EA_Atom_RDFCacheAttribute_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_EA_Atom_RDFCacheAttribute_getSupportedOpenModes) { + { + Ferris::EA_Atom_RDFCacheAttribute *arg1 = (Ferris::EA_Atom_RDFCacheAttribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EA_Atom_RDFCacheAttribute_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EA_Atom_RDFCacheAttribute_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::EA_Atom_RDFCacheAttribute *""'"); + } + arg1 = reinterpret_cast< Ferris::EA_Atom_RDFCacheAttribute * >(argp1); + result = (Ferris::ferris_ios::openmode)(arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_remove_prefix) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: remove_prefix(ret,prefix);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remove_prefix" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remove_prefix" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remove_prefix" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remove_prefix" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::remove_prefix((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_remove_postfix) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: remove_postfix(ret,postfix);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remove_postfix" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remove_postfix" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remove_postfix" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remove_postfix" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::remove_postfix((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr__SWIG_9) { + { + tm *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tostr(tm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tostr" "', argument " "1"" of type '" "tm const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tostr" "', argument " "1"" of type '" "tm const &""'"); + } + arg1 = reinterpret_cast< tm * >(argp1); + result = Ferris::tostr((tm const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tostr) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__istringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__ostringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__stringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_p_std__istringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_p_std__ostringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_p_std__stringstream, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 9; + if (_rank == _rankm) goto dispatch; + } + } + check_9: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 10; + if (_rank == _rankm) goto dispatch; + } + } + check_10: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_3); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_4); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_5); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_6); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_7); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_8); return; + case 9: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_9); return; + case 10: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_tostr__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'tostr'"); + XSRETURN(0); +} + + +XS(_wrap_split) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::pair< std::string,std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: split(data,sep);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "split" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::split((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringpair_t(static_cast< const Ferris::stringpair_t& >(result))), SWIGTYPE_p_std__pairT_std__string_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_toupperstring) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toupperstring(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toupperstring" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toupperstring" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::toupperstring((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_tolowerstring) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tolowerstring(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tolowerstring" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tolowerstring" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::tolowerstring((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_attemptToAbsoluteURL__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: attemptToAbsoluteURL(maybeRelative,cwd);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attemptToAbsoluteURL" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attemptToAbsoluteURL" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attemptToAbsoluteURL" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attemptToAbsoluteURL" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::attemptToAbsoluteURL((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_attemptToAbsoluteURL__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: attemptToAbsoluteURL(maybeRelative);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attemptToAbsoluteURL" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attemptToAbsoluteURL" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::attemptToAbsoluteURL((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_attemptToAbsoluteURL) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_attemptToAbsoluteURL__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_attemptToAbsoluteURL__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'attemptToAbsoluteURL'"); + XSRETURN(0); +} + + +XS(_wrap___lshift__) { + { + std::basic_ostream< wchar_t,std::char_traits< wchar_t > > *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::basic_ostream< wchar_t,std::char_traits< wchar_t > > *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __lshift__(oss,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::basic_ostream< wchar_t,std::char_traits< wchar_t > > &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::basic_ostream< wchar_t,std::char_traits< wchar_t > > &""'"); + } + arg1 = reinterpret_cast< std::basic_ostream< wchar_t,std::char_traits< wchar_t > > * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (std::basic_ostream< wchar_t,std::char_traits< wchar_t > > *) &Ferris::operator <<(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t, 0 | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getline) { + { + std::istream *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::istream *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getline(ss,ret,delim);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__istream, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getline" "', argument " "1"" of type '" "std::istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getline" "', argument " "1"" of type '" "std::istream &""'"); + } + arg1 = reinterpret_cast< std::istream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getline" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getline" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getline" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getline" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (std::istream *) &Ferris::getline(*arg1,*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__istream, 0 | 0); argvi++ ; + + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_wstring_to_utf8__SWIG_0) { + { + std::string *arg1 = 0 ; + std::wstring *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: wstring_to_utf8(ret,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wstring_to_utf8" "', argument " "1"" of type '" "std::string &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "wstring_to_utf8" "', argument " "1"" of type '" "std::string &""'"); + } + arg1 = reinterpret_cast< std::string * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__wstring, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wstring_to_utf8" "', argument " "2"" of type '" "std::wstring const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "wstring_to_utf8" "', argument " "2"" of type '" "std::wstring const &""'"); + } + arg2 = reinterpret_cast< std::wstring * >(argp2); + result = (std::string *) &Ferris::Util::wstring_to_utf8(*arg1,(std::wstring const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__string, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_wstring_to_utf8__SWIG_1) { + { + std::wstring *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: wstring_to_utf8(s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__wstring, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wstring_to_utf8" "', argument " "1"" of type '" "std::wstring const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "wstring_to_utf8" "', argument " "1"" of type '" "std::wstring const &""'"); + } + arg1 = reinterpret_cast< std::wstring * >(argp1); + result = Ferris::Util::wstring_to_utf8((std::wstring const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_wstring_to_utf8) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__wstring, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__wstring, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_wstring_to_utf8__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_wstring_to_utf8__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'wstring_to_utf8'"); + XSRETURN(0); +} + + +XS(_wrap_utf8_to_wstring__SWIG_0) { + { + std::wstring *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::wstring *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: utf8_to_wstring(ret,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__wstring, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "utf8_to_wstring" "', argument " "1"" of type '" "std::wstring &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "utf8_to_wstring" "', argument " "1"" of type '" "std::wstring &""'"); + } + arg1 = reinterpret_cast< std::wstring * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "utf8_to_wstring" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "utf8_to_wstring" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (std::wstring *) &Ferris::Util::utf8_to_wstring(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__wstring, 0 | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_utf8_to_wstring__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::wstring result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: utf8_to_wstring(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "utf8_to_wstring" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "utf8_to_wstring" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::utf8_to_wstring((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new std::wstring(static_cast< const std::wstring& >(result))), SWIGTYPE_p_std__wstring, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_utf8_to_wstring) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__wstring, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_utf8_to_wstring__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_utf8_to_wstring__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'utf8_to_wstring'"); + XSRETURN(0); +} + + +XS(_wrap_iso8859_to_utf8) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: iso8859_to_utf8(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "iso8859_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "iso8859_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::iso8859_to_utf8((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_convert_url_to_utf8) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: convert_url_to_utf8(earl);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "convert_url_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "convert_url_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::convert_url_to_utf8((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_convert_basename_to_utf8) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: convert_basename_to_utf8(v);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "convert_basename_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "convert_basename_to_utf8" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::convert_basename_to_utf8((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_URLDecode) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: URLDecode(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "URLDecode" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "URLDecode" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::URLDecode((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_EscapeStringAsRegex) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: EscapeStringAsRegex(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EscapeStringAsRegex" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EscapeStringAsRegex" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::EscapeStringAsRegex((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_replace_all__SWIG_0) { + { + std::string *arg1 = 0 ; + char arg2 ; + char arg3 ; + int res1 = SWIG_OLDOBJ ; + char val2 ; + int ecode2 = 0 ; + char val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: replace_all(s,oldc,newc);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_all" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + ecode3 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "replace_all" "', argument " "3"" of type '" "char""'"); + } + arg3 = static_cast< char >(val3); + result = Ferris::Util::replace_all((std::string const &)*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_replace_all__SWIG_1) { + { + std::string *arg1 = 0 ; + char arg2 ; + std::string *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + char val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: replace_all(s,oldc,news);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "replace_all" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "replace_all" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::Util::replace_all((std::string const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_replace_all__SWIG_2) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: replace_all(s,olds,news);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_all" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "replace_all" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "replace_all" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::Util::replace_all((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_replace_all) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_replace_all__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_replace_all__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_replace_all__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'replace_all'"); + XSRETURN(0); +} + + +XS(_wrap_convertByteString__SWIG_0) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + guint64 result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: convertByteString(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "convertByteString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "convertByteString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::convertByteString((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new guint64(static_cast< const guint64& >(result))), SWIGTYPE_p_guint64, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_convertByteString__SWIG_1) { + { + guint64 arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: convertByteString(v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_guint64, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "convertByteString" "', argument " "1"" of type '" "guint64""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "convertByteString" "', argument " "1"" of type '" "guint64""'"); + } else { + arg1 = *(reinterpret_cast< guint64 * >(argp1)); + } + } + result = Ferris::Util::convertByteString(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_convertByteString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_guint64, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_convertByteString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_convertByteString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'convertByteString'"); + XSRETURN(0); +} + + +XS(_wrap_ParseKeyValueString__SWIG_0) { + { + Ferris::StringMap_t *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::StringMap_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ParseKeyValueString(ret,kvs,seps);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t &""'"); + } + arg1 = reinterpret_cast< Ferris::StringMap_t * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParseKeyValueString" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::StringMap_t *) &Ferris::Util::ParseKeyValueString(*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString__SWIG_1) { + { + Ferris::StringMap_t *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::StringMap_t *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ParseKeyValueString(ret,kvs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t &""'"); + } + arg1 = reinterpret_cast< Ferris::StringMap_t * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (Ferris::StringMap_t *) &Ferris::Util::ParseKeyValueString(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString__SWIG_2) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::map< std::string,std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ParseKeyValueString(kvs,seps);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Util::ParseKeyValueString((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::StringMap_t(static_cast< const Ferris::StringMap_t& >(result))), SWIGTYPE_p_std__mapT_std__string_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString__SWIG_3) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::map< std::string,std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ParseKeyValueString(kvs);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::ParseKeyValueString((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::StringMap_t(static_cast< const Ferris::StringMap_t& >(result))), SWIGTYPE_p_std__mapT_std__string_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString__SWIG_4) { + { + Ferris::fh_istream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::map< std::string,std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ParseKeyValueString(iss,seps);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Util::ParseKeyValueString(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::StringMap_t(static_cast< const Ferris::StringMap_t& >(result))), SWIGTYPE_p_std__mapT_std__string_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString__SWIG_5) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::map< std::string,std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ParseKeyValueString(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseKeyValueString" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = Ferris::Util::ParseKeyValueString(*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::StringMap_t(static_cast< const Ferris::StringMap_t& >(result))), SWIGTYPE_p_std__mapT_std__string_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseKeyValueString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_5); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_3); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_1); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_4); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_2); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseKeyValueString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ParseKeyValueString'"); + XSRETURN(0); +} + + +XS(_wrap_CreateKeyValueString__SWIG_0) { + { + Ferris::StringMap_t *arg1 = 0 ; + std::string arg2 ; + std::string arg3 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CreateKeyValueString(sm,kvsep,atomsep);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::StringMap_t * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CreateKeyValueString" "', argument " "2"" of type '" "std::string const""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CreateKeyValueString" "', argument " "3"" of type '" "std::string const""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Util::CreateKeyValueString((std::map< std::string,std::string > const &)*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CreateKeyValueString__SWIG_1) { + { + Ferris::StringMap_t *arg1 = 0 ; + std::string arg2 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CreateKeyValueString(sm,kvsep);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::StringMap_t * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CreateKeyValueString" "', argument " "2"" of type '" "std::string const""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Util::CreateKeyValueString((std::map< std::string,std::string > const &)*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CreateKeyValueString__SWIG_2) { + { + Ferris::StringMap_t *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CreateKeyValueString(sm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreateKeyValueString" "', argument " "1"" of type '" "Ferris::StringMap_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::StringMap_t * >(argp1); + result = Ferris::Util::CreateKeyValueString((std::map< std::string,std::string > const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CreateKeyValueString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__mapT_std__string_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CreateKeyValueString__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CreateKeyValueString__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CreateKeyValueString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CreateKeyValueString'"); + XSRETURN(0); +} + + +XS(_wrap_parseSeperatedList__SWIG_4) { + { + std::string *arg1 = 0 ; + char arg2 ; + int res1 = SWIG_OLDOBJ ; + char val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: parseSeperatedList(s,sepchar);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "parseSeperatedList" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + result = Ferris::Util::parseSeperatedList((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseSeperatedList__SWIG_5) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: parseSeperatedList(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::parseSeperatedList((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_parseSeperatedList__SWIG_6) { + { + std::string *arg1 = 0 ; + char arg2 ; + Ferris::stringlist_t *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + char val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: parseSeperatedList(s,sepchar,ret);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "parseSeperatedList" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "parseSeperatedList" "', argument " "3"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "3"" of type '" "Ferris::stringlist_t &""'"); + } + arg3 = reinterpret_cast< Ferris::stringlist_t * >(argp3); + result = (Ferris::stringlist_t *) &Ferris::Util::parseSeperatedList((std::string const &)*arg1,arg2,*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseSeperatedList__SWIG_7) { + { + std::string *arg1 = 0 ; + char arg2 ; + Ferris::stringset_t *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + char val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::stringset_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: parseSeperatedList(s,sepchar,ret);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "parseSeperatedList" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "parseSeperatedList" "', argument " "3"" of type '" "Ferris::stringset_t &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseSeperatedList" "', argument " "3"" of type '" "Ferris::stringset_t &""'"); + } + arg3 = reinterpret_cast< Ferris::stringset_t * >(argp3); + result = (Ferris::stringset_t *) &Ferris::Util::parseSeperatedList((std::string const &)*arg1,arg2,*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_t, 0 | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseSeperatedList) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseSeperatedList__SWIG_5); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseSeperatedList__SWIG_4); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseSeperatedList__SWIG_6); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseSeperatedList__SWIG_7); return; + } + } + + croak("No matching function for overloaded 'parseSeperatedList'"); + XSRETURN(0); +} + + +XS(_wrap_createSeperatedList__SWIG_3) { + { + Ferris::stringlist_t *arg1 = 0 ; + char arg2 ; + void *argp1 ; + int res1 = 0 ; + char val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: createSeperatedList(l,sepchar);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "createSeperatedList" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + result = Ferris::Util::createSeperatedList((std::list< std::string > const &)*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList__SWIG_4) { + { + Ferris::stringlist_t *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createSeperatedList(l);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + result = Ferris::Util::createSeperatedList((std::list< std::string > const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList__SWIG_5) { + { + Ferris::stringset_t *arg1 = 0 ; + char arg2 ; + void *argp1 ; + int res1 = 0 ; + char val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: createSeperatedList(l,sepchar);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringset_t * >(argp1); + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "createSeperatedList" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + result = Ferris::Util::createSeperatedList((std::set< std::string > const &)*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList__SWIG_6) { + { + Ferris::stringset_t *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createSeperatedList(l);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringset_t * >(argp1); + result = Ferris::Util::createSeperatedList((std::set< std::string > const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList__SWIG_7) { + { + Ferris::stringlist_t *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: createSeperatedList(l,sepchar);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "createSeperatedList" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Util::createSeperatedList((std::list< std::string > const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList__SWIG_8) { + { + Ferris::stringset_t *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: createSeperatedList(l,sepchar);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringset_t * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "createSeperatedList" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createSeperatedList" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Util::createSeperatedList((std::set< std::string > const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_createSeperatedList) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_4); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_6); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_5); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_3); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_7); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createSeperatedList__SWIG_8); return; + } + } + + croak("No matching function for overloaded 'createSeperatedList'"); + XSRETURN(0); +} + + +XS(_wrap_parseCommaSeperatedList__SWIG_0) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: parseCommaSeperatedList(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::parseCommaSeperatedList((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_parseCommaSeperatedList__SWIG_1) { + { + std::string *arg1 = 0 ; + Ferris::stringlist_t *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: parseCommaSeperatedList(s,sl);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parseCommaSeperatedList" "', argument " "2"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseCommaSeperatedList" "', argument " "2"" of type '" "Ferris::stringlist_t &""'"); + } + arg2 = reinterpret_cast< Ferris::stringlist_t * >(argp2); + Ferris::Util::parseCommaSeperatedList((std::string const &)*arg1,*arg2); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseCommaSeperatedList__SWIG_2) { + { + std::string *arg1 = 0 ; + Ferris::stringset_t *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: parseCommaSeperatedList(s,sl);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseCommaSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parseCommaSeperatedList" "', argument " "2"" of type '" "Ferris::stringset_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseCommaSeperatedList" "', argument " "2"" of type '" "Ferris::stringset_t &""'"); + } + arg2 = reinterpret_cast< Ferris::stringset_t * >(argp2); + Ferris::Util::parseCommaSeperatedList((std::string const &)*arg1,*arg2); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseCommaSeperatedList) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseCommaSeperatedList__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseCommaSeperatedList__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseCommaSeperatedList__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'parseCommaSeperatedList'"); + XSRETURN(0); +} + + +XS(_wrap_createCommaSeperatedList__SWIG_0) { + { + Ferris::stringlist_t *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createCommaSeperatedList(l);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createCommaSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createCommaSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + result = Ferris::Util::createCommaSeperatedList((std::list< std::string > const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_createCommaSeperatedList__SWIG_1) { + { + Ferris::stringset_t *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createCommaSeperatedList(l);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createCommaSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createCommaSeperatedList" "', argument " "1"" of type '" "Ferris::stringset_t const &""'"); + } + arg1 = reinterpret_cast< Ferris::stringset_t * >(argp1); + result = Ferris::Util::createCommaSeperatedList((std::set< std::string > const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_createCommaSeperatedList) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createCommaSeperatedList__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createCommaSeperatedList__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'createCommaSeperatedList'"); + XSRETURN(0); +} + + +XS(_wrap_parseNullSeperatedList__SWIG_0) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: parseNullSeperatedList(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseNullSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseNullSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Util::parseNullSeperatedList((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_parseNullSeperatedList__SWIG_1) { + { + std::string *arg1 = 0 ; + Ferris::stringlist_t *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: parseNullSeperatedList(s,ret);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseNullSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseNullSeperatedList" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parseNullSeperatedList" "', argument " "2"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "parseNullSeperatedList" "', argument " "2"" of type '" "Ferris::stringlist_t &""'"); + } + arg2 = reinterpret_cast< Ferris::stringlist_t * >(argp2); + result = (Ferris::stringlist_t *) &Ferris::Util::parseNullSeperatedList((std::string const &)*arg1,*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_parseNullSeperatedList) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseNullSeperatedList__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_parseNullSeperatedList__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'parseNullSeperatedList'"); + XSRETURN(0); +} + + +XS(_wrap_createNullSeperatedList) { + { + Ferris::stringlist_t *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createNullSeperatedList(l);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createNullSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createNullSeperatedList" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + result = Ferris::Util::createNullSeperatedList(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_makeUUID) { + { + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: makeUUID();"); + } + result = Ferris::Util::makeUUID(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap___add__) { + { + tm *arg1 = 0 ; + tm *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + tm result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __add__(t1,t2);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__add__" "', argument " "1"" of type '" "tm const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__add__" "', argument " "1"" of type '" "tm const &""'"); + } + arg1 = reinterpret_cast< tm * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__add__" "', argument " "2"" of type '" "tm const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__add__" "', argument " "2"" of type '" "tm const &""'"); + } + arg2 = reinterpret_cast< tm * >(argp2); + result = Ferris::Time::operator +((tm const &)*arg1,(tm const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new tm(static_cast< const tm& >(result))), SWIGTYPE_p_tm, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_toTime__SWIG_0) { + { + tm *arg1 = (tm *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toTime(tm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_tm, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toTime" "', argument " "1"" of type '" "tm *""'"); + } + arg1 = reinterpret_cast< tm * >(argp1); + result = Ferris::Time::toTime(arg1); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_toTime__SWIG_1) { + { + tm arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toTime(tm);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toTime" "', argument " "1"" of type '" "tm""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toTime" "', argument " "1"" of type '" "tm""'"); + } else { + arg1 = *(reinterpret_cast< tm * >(argp1)); + } + } + result = Ferris::Time::toTime(arg1); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_toTime) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toTime__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toTime__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'toTime'"); + XSRETURN(0); +} + + +XS(_wrap_toXMLDateTime) { + { + time_t arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toXMLDateTime(tt);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toXMLDateTime" "', argument " "1"" of type '" "time_t""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toXMLDateTime" "', argument " "1"" of type '" "time_t""'"); + } else { + arg1 = *(reinterpret_cast< time_t * >(argp1)); + } + } + result = Ferris::Time::toXMLDateTime(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseTimeString__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + tm result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ParseTimeString(stddatestr,defaultformat,autoFresh);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseTimeString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseTimeString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParseTimeString" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = Ferris::Time::ParseTimeString((std::string const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new tm(static_cast< const tm& >(result))), SWIGTYPE_p_tm, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseTimeString__SWIG_1) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + tm result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ParseTimeString(stddatestr,defaultformat);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseTimeString" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseTimeString" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Time::ParseTimeString((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new tm(static_cast< const tm& >(result))), SWIGTYPE_p_tm, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseTimeString__SWIG_2) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + tm result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ParseTimeString(stddatestr);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Time::ParseTimeString((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new tm(static_cast< const tm& >(result))), SWIGTYPE_p_tm, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseTimeString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseTimeString__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseTimeString__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseTimeString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ParseTimeString'"); + XSRETURN(0); +} + + +XS(_wrap_ParseSimpleIntervalString) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + guint64 result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ParseSimpleIntervalString(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseSimpleIntervalString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseSimpleIntervalString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Time::ParseSimpleIntervalString((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new guint64(static_cast< const guint64& >(result))), SWIGTYPE_p_guint64, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_FreshenTime__SWIG_0) { + { + tm *arg1 = 0 ; + tm arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + tm *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: FreshenTime(tm,ref);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreshenTime" "', argument " "1"" of type '" "tm &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FreshenTime" "', argument " "1"" of type '" "tm &""'"); + } + arg1 = reinterpret_cast< tm * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FreshenTime" "', argument " "2"" of type '" "tm""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FreshenTime" "', argument " "2"" of type '" "tm""'"); + } else { + arg2 = *(reinterpret_cast< tm * >(argp2)); + } + } + result = (tm *) &Ferris::Time::FreshenTime(*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tm, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FreshenTime__SWIG_1) { + { + tm *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + tm *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: FreshenTime(tm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_tm, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreshenTime" "', argument " "1"" of type '" "tm &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FreshenTime" "', argument " "1"" of type '" "tm &""'"); + } + arg1 = reinterpret_cast< tm * >(argp1); + result = (tm *) &Ferris::Time::FreshenTime(*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tm, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_FreshenTime) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_tm, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_FreshenTime__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_FreshenTime__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'FreshenTime'"); + XSRETURN(0); +} + + +XS(_wrap_getTime) { + { + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getTime();"); + } + result = Ferris::Time::getTime(); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Sleep) { + { + double arg1 ; + double val1 ; + int ecode1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Sleep(t);"); + } + ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Sleep" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + Ferris::Time::Sleep(arg1); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_setDefaultTimeFormat) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: setDefaultTimeFormat(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setDefaultTimeFormat" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setDefaultTimeFormat" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + Ferris::Time::setDefaultTimeFormat((std::string const &)*arg1); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_getDefaultTimeFormat) { + { + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getDefaultTimeFormat();"); + } + result = Ferris::Time::getDefaultTimeFormat(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_toTimeString__SWIG_0) { + { + time_t arg1 ; + std::string arg2 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: toTimeString(time_t,desired_format);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toTimeString" "', argument " "1"" of type '" "time_t""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toTimeString" "', argument " "1"" of type '" "time_t""'"); + } else { + arg1 = *(reinterpret_cast< time_t * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "toTimeString" "', argument " "2"" of type '" "std::string const""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Time::toTimeString(arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_toTimeString__SWIG_1) { + { + time_t arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toTimeString(time_t);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toTimeString" "', argument " "1"" of type '" "time_t""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toTimeString" "', argument " "1"" of type '" "time_t""'"); + } else { + arg1 = *(reinterpret_cast< time_t * >(argp1)); + } + } + result = Ferris::Time::toTimeString(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_toTimeString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toTimeString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toTimeString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'toTimeString'"); + XSRETURN(0); +} + + +XS(_wrap_toHMSString__SWIG_0) { + { + int arg1 ; + bool arg2 ; + int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: toHMSString(v,canOmitMinutes);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "toHMSString" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "toHMSString" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::Time::toHMSString(arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_toHMSString__SWIG_1) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toHMSString(v);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "toHMSString" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = Ferris::Time::toHMSString(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_toHMSString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toHMSString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_toHMSString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'toHMSString'"); + XSRETURN(0); +} + + +XS(_wrap_ParseRelativeTimeString__SWIG_0) { + { + std::string *arg1 = 0 ; + time_t arg2 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ParseRelativeTimeString(s,relv);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseRelativeTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseRelativeTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParseRelativeTimeString" "', argument " "2"" of type '" "time_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseRelativeTimeString" "', argument " "2"" of type '" "time_t""'"); + } else { + arg2 = *(reinterpret_cast< time_t * >(argp2)); + } + } + result = Ferris::Time::ParseRelativeTimeString((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseRelativeTimeString__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ParseRelativeTimeString(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseRelativeTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseRelativeTimeString" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Time::ParseRelativeTimeString((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseRelativeTimeString) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseRelativeTimeString__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ParseRelativeTimeString__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ParseRelativeTimeString'"); + XSRETURN(0); +} + + +XS(_wrap_new_Benchmark__SWIG_0) { + { + std::string *arg1 = 0 ; + bool arg2 ; + int res1 = SWIG_OLDOBJ ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::Time::Benchmark *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_Benchmark(name,startAutomatically);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Benchmark" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Benchmark" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Benchmark" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (Ferris::Time::Benchmark *)new Ferris::Time::Benchmark((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Time__Benchmark, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Benchmark__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::Time::Benchmark *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Benchmark(name);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Benchmark" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Benchmark" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (Ferris::Time::Benchmark *)new Ferris::Time::Benchmark((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Time__Benchmark, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Benchmark) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Benchmark__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Benchmark__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_Benchmark'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Benchmark) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Benchmark(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Benchmark" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Benchmark_start) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Benchmark_start(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_start" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + (arg1)->start(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Benchmark_stop) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Benchmark_stop(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_stop" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + (arg1)->stop(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Benchmark_print) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Benchmark_print(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_print" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + (arg1)->print(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Benchmark_getElapsedTime) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + float result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Benchmark_getElapsedTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_getElapsedTime" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + result = (float)(arg1)->getElapsedTime(); + ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1(static_cast< float >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Benchmark_setOutputStream) { + { + Ferris::Time::Benchmark *arg1 = (Ferris::Time::Benchmark *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Benchmark_setOutputStream(self,oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Time__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_setOutputStream" "', argument " "1"" of type '" "Ferris::Time::Benchmark *""'"); + } + arg1 = reinterpret_cast< Ferris::Time::Benchmark * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Benchmark_setOutputStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Benchmark_setOutputStream" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (arg1)->setOutputStream(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_pread) { + { + Ferris::fh_istream *arg1 = 0 ; + size_t arg2 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: pread(iss,count,offset);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pread" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pread" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pread" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pread" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + result = Ferris::Bindings::pread(*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_preadio) { + { + Ferris::fh_iostream *arg1 = 0 ; + size_t arg2 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: preadio(iss,count,offset);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preadio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "preadio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preadio" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preadio" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + result = Ferris::Bindings::preadio(*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_readline) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: readline(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "readline" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "readline" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = Ferris::Bindings::readline(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_pwrite) { + { + Ferris::fh_iostream *arg1 = 0 ; + std::string *arg2 = 0 ; + size_t arg3 ; + size_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + size_t val3 ; + int ecode3 = 0 ; + size_t val4 ; + int ecode4 = 0 ; + int argvi = 0; + size_t result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: pwrite(oss,str,count,offset);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pwrite" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pwrite" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pwrite" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pwrite" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pwrite" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pwrite" "', argument " "4"" of type '" "size_t""'"); + } + arg4 = static_cast< size_t >(val4); + result = Ferris::Bindings::pwrite(*arg1,(std::string const &)*arg2,arg3,arg4); + ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ferriswrite) { + { + Ferris::fh_iostream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + size_t result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ferriswrite(oss,str);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ferriswrite" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ferriswrite" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ferriswrite" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ferriswrite" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Bindings::ferriswrite(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_fsync) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: fsync(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fsync" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fsync" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + Ferris::Bindings::fsync(*arg1); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tellgi) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + size_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tellgi(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tellgi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tellgi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = Ferris::Bindings::tellgi(*arg1); + ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tellgio) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + size_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tellgio(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tellgio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tellgio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = Ferris::Bindings::tellgio(*arg1); + ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_tellp) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + size_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: tellp(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tellp" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "tellp" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = Ferris::Bindings::tellp(*arg1); + ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_seekgio) { + { + Ferris::fh_iostream *arg1 = 0 ; + long arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: seekgio(oss,offset,whence);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "seekgio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "seekgio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "seekgio" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "seekgio" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + Ferris::Bindings::seekgio(*arg1,arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_seekp) { + { + Ferris::fh_iostream *arg1 = 0 ; + long arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: seekp(oss,offset,whence);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "seekp" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "seekp" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "seekp" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "seekp" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + Ferris::Bindings::seekp(*arg1,arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_goodi) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: goodi(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "goodi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "goodi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = (bool)Ferris::Bindings::goodi(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_goodio) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: goodio(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "goodio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "goodio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = (bool)Ferris::Bindings::goodio(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_eofi) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: eofi(iss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eofi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eofi" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = (bool)Ferris::Bindings::eofi(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_eofio) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: eofio(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eofio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eofio" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = (bool)Ferris::Bindings::eofio(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_in) { + { + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_in();"); + } + result = (Ferris::ferris_ios::openmode)Ferris::Bindings::get_ios_in(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_out) { + { + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_out();"); + } + result = (Ferris::ferris_ios::openmode)Ferris::Bindings::get_ios_out(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_trunc) { + { + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_trunc();"); + } + result = (Ferris::ferris_ios::openmode)Ferris::Bindings::get_ios_trunc(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_ate) { + { + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_ate();"); + } + result = (Ferris::ferris_ios::openmode)Ferris::Bindings::get_ios_ate(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_app) { + { + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_app();"); + } + result = (Ferris::ferris_ios::openmode)Ferris::Bindings::get_ios_app(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_beg) { + { + int argvi = 0; + int result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_beg();"); + } + result = (int)Ferris::Bindings::get_ios_beg(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_cur) { + { + int argvi = 0; + int result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_cur();"); + } + result = (int)Ferris::Bindings::get_ios_cur(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_get_ios_end) { + { + int argvi = 0; + int result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: get_ios_end();"); + } + result = (int)Ferris::Bindings::get_ios_end(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_fireCloseSig) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: fireCloseSig(oss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fireCloseSig" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fireCloseSig" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + Ferris::Bindings::fireCloseSig(*arg1); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getAgentNames) { + { + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getAgentNames();"); + } + result = (Ferris::stringlist_t *) &Ferris::AI::getAgentNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getAgent) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::AI::Agent,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getAgent(agentName);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getAgent" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getAgent" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::AI::getAgent((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::AI::fh_agent(static_cast< const Ferris::AI::fh_agent& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_getCompleteAgent) { + { + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::AI::Agent,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getCompleteAgent();"); + } + result = Ferris::AI::getCompleteAgent(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::AI::fh_agent(static_cast< const Ferris::AI::fh_agent& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_eraseAgent) { + { + SwigValueWrapper< Loki::SmartPtr< Ferris::AI::Agent,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: eraseAgent(d);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eraseAgent" "', argument " "1"" of type '" "Ferris::AI::fh_agent""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eraseAgent" "', argument " "1"" of type '" "Ferris::AI::fh_agent""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::AI::fh_agent * >(argp1)); + } + } + Ferris::AI::eraseAgent(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getBinaryAgentImplemenationNames) { + { + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getBinaryAgentImplemenationNames();"); + } + result = (Ferris::stringlist_t *) &Ferris::AI::getBinaryAgentImplemenationNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_createBinaryAgent) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + Ferris::fh_emblem arg4 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg5 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + void *argp4 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::AI::Agent,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: createBinaryAgent(agentName,agentImplemenationName,stateDir,em,pers);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createBinaryAgent" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createBinaryAgent" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "createBinaryAgent" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createBinaryAgent" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "createBinaryAgent" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createBinaryAgent" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "createBinaryAgent" "', argument " "4"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createBinaryAgent" "', argument " "4"" of type '" "Ferris::fh_emblem""'"); + } else { + arg4 = *(reinterpret_cast< Ferris::fh_emblem * >(argp4)); + } + } + { + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "createBinaryAgent" "', argument " "5"" of type '" "Ferris::fh_personality""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createBinaryAgent" "', argument " "5"" of type '" "Ferris::fh_personality""'"); + } else { + arg5 = *(reinterpret_cast< Ferris::fh_personality * >(argp5)); + } + } + result = Ferris::AI::createBinaryAgent((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj((new Ferris::AI::fh_agent(static_cast< const Ferris::AI::fh_agent& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getUUID) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getUUID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getUUID" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getUUID(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getName) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getName" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setName) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setName" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (arg1)->setName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getEmblem) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getEmblem" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getEmblem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setEmblem) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setEmblem(self,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setEmblem" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setEmblem" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + (arg1)->setEmblem(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_allowsManyEmblems) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_allowsManyEmblems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_allowsManyEmblems" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (bool)(arg1)->allowsManyEmblems(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getEmblems) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Ferris::fh_emblem > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getEmblems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getEmblems" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getEmblems(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblems_t(static_cast< const Ferris::emblems_t& >(result))), SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setEmblems) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + Ferris::emblems_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setEmblems(self,el);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setEmblems" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setEmblems" "', argument " "2"" of type '" "Ferris::emblems_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setEmblems" "', argument " "2"" of type '" "Ferris::emblems_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::emblems_t * >(argp2); + (arg1)->setEmblems((Ferris::emblems_t const &)*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getPersonality) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getPersonality(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getPersonality" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getPersonality(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setPersonality) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setPersonality(self,pers);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setPersonality" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setPersonality" "', argument " "2"" of type '" "Ferris::fh_personality""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setPersonality" "', argument " "2"" of type '" "Ferris::fh_personality""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_personality * >(argp2)); + } + } + (arg1)->setPersonality(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getAgentImplemenationName) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getAgentImplemenationName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getAgentImplemenationName" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getAgentImplemenationName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setAgentImplemenationName) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setAgentImplemenationName(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setAgentImplemenationName" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setAgentImplemenationName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setAgentImplemenationName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (arg1)->setAgentImplemenationName((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getStateDir) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getStateDir(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getStateDir" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getStateDir(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_setStateDir) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_setStateDir(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_setStateDir" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_setStateDir" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_setStateDir" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (arg1)->setStateDir((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_getAlternateImplementationNames) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_getAlternateImplementationNames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_getAlternateImplementationNames" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + result = (arg1)->getAlternateImplementationNames(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_addTrainingExample) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_addTrainingExample(self,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_addTrainingExample" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_addTrainingExample" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_addTrainingExample" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + (arg1)->addTrainingExample(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_train) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Agent_train(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_train" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + (arg1)->train(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Agent_classify) { + { + Ferris::AI::Agent *arg1 = (Ferris::AI::Agent *) 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Agent_classify(self,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AI__Agent, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Agent_classify" "', argument " "1"" of type '" "Ferris::AI::Agent *""'"); + } + arg1 = reinterpret_cast< Ferris::AI::Agent * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Agent_classify" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Agent_classify" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + (arg1)->classify(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_fh_emblem_less___call__) { + { + Ferris::fh_emblem_less *arg1 = (Ferris::fh_emblem_less *) 0 ; + Ferris::fh_emblem arg2 ; + Ferris::fh_emblem arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: fh_emblem_less___call__(self,k1,k2);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__fh_emblem_less, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fh_emblem_less___call__" "', argument " "1"" of type '" "Ferris::fh_emblem_less *""'"); + } + arg1 = reinterpret_cast< Ferris::fh_emblem_less * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fh_emblem_less___call__" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fh_emblem_less___call__" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fh_emblem_less___call__" "', argument " "3"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fh_emblem_less___call__" "', argument " "3"" of type '" "Ferris::fh_emblem""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_emblem * >(argp3)); + } + } + result = (bool)(arg1)->operator ()(arg2,arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_contains__SWIG_2) { + { + Ferris::emblems_t *arg1 = 0 ; + Ferris::fh_emblem arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: contains(el,em);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "contains" "', argument " "1"" of type '" "Ferris::emblems_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contains" "', argument " "1"" of type '" "Ferris::emblems_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblems_t * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "contains" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contains" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + result = (bool)Ferris::contains(*arg1,arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_contains) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_Ferris__fh_emblem_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_contains__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_contains__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'contains'"); + XSRETURN(0); +} + + +XS(_wrap_setSkipLoadingEmblems) { + { + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: setSkipLoadingEmblems(v);"); + } + ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "setSkipLoadingEmblems" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + result = (bool)Ferris::setSkipLoadingEmblems(arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_link) { + { + Ferris::fh_emblem arg1 ; + Ferris::fh_emblem arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: link(parent,child);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "link" "', argument " "1"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "link" "', argument " "1"" of type '" "Ferris::fh_emblem""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_emblem * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "link" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "link" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + Ferris::link(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_unlink) { + { + Ferris::fh_emblem arg1 ; + Ferris::fh_emblem arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: unlink(parent,child);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "unlink" "', argument " "1"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "unlink" "', argument " "1"" of type '" "Ferris::fh_emblem""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_emblem * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "unlink" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "unlink" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + Ferris::unlink(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_UseGetNextID) { + { + Ferris::Emblem *arg1 = (Ferris::Emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblemID_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: UseGetNextID(e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UseGetNextID" "', argument " "1"" of type '" "Ferris::Emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::Emblem * >(argp1); + result = Ferris::UseGetNextID(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblemID_t(static_cast< const Ferris::emblemID_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_UseGetNextID_EAOrdering) { + { + Ferris::Emblem *arg1 = (Ferris::Emblem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblemID_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: UseGetNextID_EAOrdering(e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Emblem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UseGetNextID_EAOrdering" "', argument " "1"" of type '" "Ferris::Emblem *""'"); + } + arg1 = reinterpret_cast< Ferris::Emblem * >(argp1); + result = Ferris::UseGetNextID_EAOrdering(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblemID_t(static_cast< const Ferris::emblemID_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_setDefaultEtagere__SWIG_0) { + { + Ferris::fh_etagere arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: setDefaultEtagere(et);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setDefaultEtagere" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setDefaultEtagere" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_etagere * >(argp1)); + } + } + Ferris::Factory::setDefaultEtagere(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_setDefaultEtagere__SWIG_1) { + { + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: setDefaultEtagere();"); + } + Ferris::Factory::setDefaultEtagere(); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_setDefaultEtagere) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setDefaultEtagere__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setDefaultEtagere__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'setDefaultEtagere'"); + XSRETURN(0); +} + + +XS(_wrap_getEtagere) { + { + int argvi = 0; + Ferris::fh_etagere result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getEtagere();"); + } + result = Ferris::Factory::getEtagere(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_etagere(static_cast< const Ferris::fh_etagere& >(result))), SWIGTYPE_p_Ferris__fh_etagere, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_makeEtagere) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_etagere result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: makeEtagere(path);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "makeEtagere" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "makeEtagere" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Factory::makeEtagere((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_etagere(static_cast< const Ferris::fh_etagere& >(result))), SWIGTYPE_p_Ferris__fh_etagere, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Times) { + { + int argvi = 0; + Ferris::Times *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Times();"); + } + result = (Ferris::Times *)new Ferris::Times(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Times, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_setATime__SWIG_0) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + time_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Times_setATime(self,t);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_setATime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Times_setATime" "', argument " "2"" of type '" "time_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Times_setATime" "', argument " "2"" of type '" "time_t""'"); + } else { + arg2 = *(reinterpret_cast< time_t * >(argp2)); + } + } + (arg1)->setATime(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_setATime__SWIG_1) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_setATime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_setATime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + (arg1)->setATime(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_setATime) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Times, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Times, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Times_setATime__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Times_setATime__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Times_setATime'"); + XSRETURN(0); +} + + +XS(_wrap_Times_setMTime__SWIG_0) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + time_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Times_setMTime(self,t);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_setMTime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Times_setMTime" "', argument " "2"" of type '" "time_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Times_setMTime" "', argument " "2"" of type '" "time_t""'"); + } else { + arg2 = *(reinterpret_cast< time_t * >(argp2)); + } + } + (arg1)->setMTime(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_setMTime__SWIG_1) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_setMTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_setMTime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + (arg1)->setMTime(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_setMTime) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Times, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Times, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Times_setMTime__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Times_setMTime__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Times_setMTime'"); + XSRETURN(0); +} + + +XS(_wrap_Times_touchATime) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_touchATime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_touchATime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + (arg1)->touchATime(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_touchMTime) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_touchMTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_touchMTime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + (arg1)->touchMTime(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_getATime) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_getATime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_getATime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + result = (arg1)->getATime(); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Times_getMTime) { + { + Ferris::Times *arg1 = (Ferris::Times *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Times_getMTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Times, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Times_getMTime" "', argument " "1"" of type '" "Ferris::Times *""'"); + } + arg1 = reinterpret_cast< Ferris::Times * >(argp1); + result = (arg1)->getMTime(); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_emblemListToEAQuery__SWIG_0) { + { + Ferris::emblemset_t *arg1 = 0 ; + char arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + char val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: emblemListToEAQuery(el,combineOpcode);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "emblemListToEAQuery" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "emblemListToEAQuery" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblemset_t * >(argp1); + ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "emblemListToEAQuery" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + result = Ferris::emblemListToEAQuery(*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_emblemListToEAQuery__SWIG_1) { + { + Ferris::emblemset_t *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: emblemListToEAQuery(el);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "emblemListToEAQuery" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "emblemListToEAQuery" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblemset_t * >(argp1); + result = Ferris::emblemListToEAQuery(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_emblemListToEAQuery) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_emblemListToEAQuery__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_emblemListToEAQuery__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'emblemListToEAQuery'"); + XSRETURN(0); +} + + +XS(_wrap_DRangeToKiloMeters) { + { + double arg1 ; + double val1 ; + int ecode1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: DRangeToKiloMeters(d);"); + } + ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DRangeToKiloMeters" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + result = (double)Ferris::DRangeToKiloMeters(arg1); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_KiloMetersToDRange) { + { + double arg1 ; + double val1 ; + int ecode1 = 0 ; + int argvi = 0; + double result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: KiloMetersToDRange(d);"); + } + ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "KiloMetersToDRange" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + result = (double)Ferris::KiloMetersToDRange(arg1); + ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getEmblemsNear__SWIG_0) { + { + Ferris::emblemset_t *arg1 = 0 ; + Ferris::fh_emblem arg2 ; + double arg3 ; + Ferris::fh_etagere arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + void *argp4 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::emblemset_t *result = 0 ; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: getEmblemsNear(result,em,kmrange,et,ShowDownSet);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblemset_t * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getEmblemsNear" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "getEmblemsNear" "', argument " "4"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "4"" of type '" "Ferris::fh_etagere""'"); + } else { + arg4 = *(reinterpret_cast< Ferris::fh_etagere * >(argp4)); + } + } + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "getEmblemsNear" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (Ferris::emblemset_t *) &Ferris::getEmblemsNear(*arg1,arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getEmblemsNear__SWIG_1) { + { + Ferris::emblemset_t *arg1 = 0 ; + Ferris::fh_emblem arg2 ; + double arg3 ; + Ferris::fh_etagere arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + void *argp4 ; + int res4 = 0 ; + int argvi = 0; + Ferris::emblemset_t *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getEmblemsNear(result,em,kmrange,et);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblemset_t * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getEmblemsNear" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "getEmblemsNear" "', argument " "4"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "4"" of type '" "Ferris::fh_etagere""'"); + } else { + arg4 = *(reinterpret_cast< Ferris::fh_etagere * >(argp4)); + } + } + result = (Ferris::emblemset_t *) &Ferris::getEmblemsNear(*arg1,arg2,arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getEmblemsNear__SWIG_2) { + { + Ferris::emblemset_t *arg1 = 0 ; + Ferris::fh_emblem arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::emblemset_t *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getEmblemsNear(result,em,kmrange);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "1"" of type '" "Ferris::emblemset_t &""'"); + } + arg1 = reinterpret_cast< Ferris::emblemset_t * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_emblem, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getEmblemsNear" "', argument " "2"" of type '" "Ferris::fh_emblem""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_emblem * >(argp2)); + } + } + ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getEmblemsNear" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + result = (Ferris::emblemset_t *) &Ferris::getEmblemsNear(*arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getEmblemsNear) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_emblem, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getEmblemsNear__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getEmblemsNear__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getEmblemsNear__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getEmblemsNear'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Personality) { + { + Ferris::Personality *arg1 = (Ferris::Personality *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Personality(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Personality, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Personality" "', argument " "1"" of type '" "Ferris::Personality *""'"); + } + arg1 = reinterpret_cast< Ferris::Personality * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Personality_getName) { + { + Ferris::Personality *arg1 = (Ferris::Personality *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Personality_getName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Personality, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Personality_getName" "', argument " "1"" of type '" "Ferris::Personality *""'"); + } + arg1 = reinterpret_cast< Ferris::Personality * >(argp1); + result = (arg1)->getName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Personality_getID) { + { + Ferris::Personality *arg1 = (Ferris::Personality *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::emblemID_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Personality_getID(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Personality, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Personality_getID" "', argument " "1"" of type '" "Ferris::Personality *""'"); + } + arg1 = reinterpret_cast< Ferris::Personality * >(argp1); + result = (arg1)->getID(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::emblemID_t(static_cast< const Ferris::emblemID_t& >(result))), SWIGTYPE_p_guint32, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getCurrentUserPersonality__SWIG_0) { + { + Ferris::fh_etagere arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getCurrentUserPersonality(et);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getCurrentUserPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getCurrentUserPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_etagere * >(argp1)); + } + } + result = Ferris::Factory::getCurrentUserPersonality(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getCurrentUserPersonality__SWIG_1) { + { + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getCurrentUserPersonality();"); + } + result = Ferris::Factory::getCurrentUserPersonality(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getCurrentUserPersonality) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getCurrentUserPersonality__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getCurrentUserPersonality__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getCurrentUserPersonality'"); + XSRETURN(0); +} + + +XS(_wrap_getGenericClassifierAgentPersonality__SWIG_0) { + { + Ferris::fh_etagere arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getGenericClassifierAgentPersonality(et);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getGenericClassifierAgentPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getGenericClassifierAgentPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_etagere * >(argp1)); + } + } + result = Ferris::Factory::getGenericClassifierAgentPersonality(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getGenericClassifierAgentPersonality__SWIG_1) { + { + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getGenericClassifierAgentPersonality();"); + } + result = Ferris::Factory::getGenericClassifierAgentPersonality(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getGenericClassifierAgentPersonality) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getGenericClassifierAgentPersonality__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getGenericClassifierAgentPersonality__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getGenericClassifierAgentPersonality'"); + XSRETURN(0); +} + + +XS(_wrap_createPersonality__SWIG_0) { + { + Ferris::fh_etagere arg1 ; + std::string *arg2 = 0 ; + std::list< Ferris::fh_personality > *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: createPersonality(et,name,parents);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_etagere * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "createPersonality" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "createPersonality" "', argument " "3"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "3"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + arg3 = reinterpret_cast< std::list< Ferris::fh_personality > * >(argp3); + result = Ferris::Factory::createPersonality(arg1,(std::string const &)*arg2,(std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_createPersonality__SWIG_1) { + { + std::string *arg1 = 0 ; + std::list< Ferris::fh_personality > *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: createPersonality(name,parents);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "createPersonality" "', argument " "2"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "2"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + arg2 = reinterpret_cast< std::list< Ferris::fh_personality > * >(argp2); + result = Ferris::Factory::createPersonality((std::string const &)*arg1,(std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_createPersonality__SWIG_2) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: createPersonality(name);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Factory::createPersonality((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_createPersonality) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createPersonality__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createPersonality__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_createPersonality__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'createPersonality'"); + XSRETURN(0); +} + + +XS(_wrap_obtainPersonality__SWIG_0) { + { + Ferris::fh_etagere arg1 ; + std::string *arg2 = 0 ; + std::list< Ferris::fh_personality > *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: obtainPersonality(et,name,parents);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_etagere, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obtainPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "obtainPersonality" "', argument " "1"" of type '" "Ferris::fh_etagere""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_etagere * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "obtainPersonality" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "obtainPersonality" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "obtainPersonality" "', argument " "3"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "obtainPersonality" "', argument " "3"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + arg3 = reinterpret_cast< std::list< Ferris::fh_personality > * >(argp3); + result = Ferris::obtainPersonality(arg1,(std::string const &)*arg2,(std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_obtainPersonality__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: obtainPersonality(name);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obtainPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "obtainPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::obtainPersonality((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_obtainPersonality__SWIG_2) { + { + Ferris::emblemID_t arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: obtainPersonality(id);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_guint32, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obtainPersonality" "', argument " "1"" of type '" "Ferris::emblemID_t""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "obtainPersonality" "', argument " "1"" of type '" "Ferris::emblemID_t""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::emblemID_t * >(argp1)); + } + } + result = Ferris::obtainPersonality(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_obtainPersonality) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_guint32, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_etagere, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_obtainPersonality__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_obtainPersonality__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_obtainPersonality__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'obtainPersonality'"); + XSRETURN(0); +} + + +XS(_wrap_findPersonality__SWIG_0) { + { + std::string *arg1 = 0 ; + bool arg2 ; + int res1 = SWIG_OLDOBJ ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: findPersonality(name,decend);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "findPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "findPersonality" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = Ferris::findPersonality((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_findPersonality__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: findPersonality(name);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "findPersonality" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::findPersonality((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_personality(static_cast< const Ferris::fh_personality& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_findPersonality) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_findPersonality__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_findPersonality__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'findPersonality'"); + XSRETURN(0); +} + + +XS(_wrap_findAllPersonalities__SWIG_0) { + { + std::string *arg1 = 0 ; + std::list< Ferris::fh_personality > *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: findAllPersonalities(name,parents);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findAllPersonalities" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "findAllPersonalities" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findAllPersonalities" "', argument " "2"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "findAllPersonalities" "', argument " "2"" of type '" "std::list< Ferris::fh_personality > const &""'"); + } + arg2 = reinterpret_cast< std::list< Ferris::fh_personality > * >(argp2); + result = Ferris::findAllPersonalities((std::string const &)*arg1,(std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new std::list< Ferris::fh_personality >(static_cast< const std::list< Ferris::fh_personality >& >(result))), SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_findAllPersonalities__SWIG_1) { + { + int argvi = 0; + SwigValueWrapper< std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: findAllPersonalities();"); + } + result = Ferris::findAllPersonalities(); + ST(argvi) = SWIG_NewPointerObj((new std::list< Ferris::fh_personality >(static_cast< const std::list< Ferris::fh_personality >& >(result))), SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_findAllPersonalities) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_findAllPersonalities__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_findAllPersonalities__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'findAllPersonalities'"); + XSRETURN(0); +} + + +XS(_wrap_isXFS__SWIG_0) { + { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isXFS(fd);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "isXFS" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + result = (bool)Ferris::isXFS(arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_isXFS__SWIG_1) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isXFS(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isXFS" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isXFS" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = (bool)Ferris::isXFS(arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_isXFS__SWIG_2) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isXFS(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isXFS" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isXFS" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (bool)Ferris::isXFS((std::string const &)*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_isXFS) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_isXFS__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_isXFS__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_isXFS__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'isXFS'"); + XSRETURN(0); +} + + +XS(_wrap_PrefixTrimmerOps_match) { + { + PrefixTrimmerOps *arg1 = (PrefixTrimmerOps *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: PrefixTrimmerOps_match(self,s,code);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PrefixTrimmerOps, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PrefixTrimmerOps_match" "', argument " "1"" of type '" "PrefixTrimmerOps *""'"); + } + arg1 = reinterpret_cast< PrefixTrimmerOps * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PrefixTrimmerOps_match" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PrefixTrimmerOps_match" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PrefixTrimmerOps_match" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PrefixTrimmerOps_match" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (bool)(arg1)->match((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_PrefixTrimmerOps_trim) { + { + PrefixTrimmerOps *arg1 = (PrefixTrimmerOps *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: PrefixTrimmerOps_trim(self,s,code);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PrefixTrimmerOps, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PrefixTrimmerOps_trim" "', argument " "1"" of type '" "PrefixTrimmerOps *""'"); + } + arg1 = reinterpret_cast< PrefixTrimmerOps * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PrefixTrimmerOps_trim" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PrefixTrimmerOps_trim" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PrefixTrimmerOps_trim" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PrefixTrimmerOps_trim" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (arg1)->trim((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_PostfixTrimmerOps_match) { + { + PostfixTrimmerOps *arg1 = (PostfixTrimmerOps *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: PostfixTrimmerOps_match(self,s,code);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PostfixTrimmerOps, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostfixTrimmerOps_match" "', argument " "1"" of type '" "PostfixTrimmerOps *""'"); + } + arg1 = reinterpret_cast< PostfixTrimmerOps * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostfixTrimmerOps_match" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostfixTrimmerOps_match" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PostfixTrimmerOps_match" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostfixTrimmerOps_match" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (bool)(arg1)->match((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_PostfixTrimmerOps_trim) { + { + PostfixTrimmerOps *arg1 = (PostfixTrimmerOps *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: PostfixTrimmerOps_trim(self,s,code);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PostfixTrimmerOps, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostfixTrimmerOps_trim" "', argument " "1"" of type '" "PostfixTrimmerOps *""'"); + } + arg1 = reinterpret_cast< PostfixTrimmerOps * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostfixTrimmerOps_trim" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostfixTrimmerOps_trim" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PostfixTrimmerOps_trim" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostfixTrimmerOps_trim" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (arg1)->trim((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_TrimmerBase) { + { + TrimmerBase *arg1 = (TrimmerBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_TrimmerBase(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrimmerBase, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrimmerBase" "', argument " "1"" of type '" "TrimmerBase *""'"); + } + arg1 = reinterpret_cast< TrimmerBase * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_TrimmerBase_push_back) { + { + TrimmerBase *arg1 = (TrimmerBase *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: TrimmerBase_push_back(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrimmerBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrimmerBase_push_back" "', argument " "1"" of type '" "TrimmerBase *""'"); + } + arg1 = reinterpret_cast< TrimmerBase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TrimmerBase_push_back" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TrimmerBase_push_back" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (arg1)->push_back((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_TrimmerBase_clear) { + { + TrimmerBase *arg1 = (TrimmerBase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: TrimmerBase_clear(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrimmerBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrimmerBase_clear" "', argument " "1"" of type '" "TrimmerBase *""'"); + } + arg1 = reinterpret_cast< TrimmerBase * >(argp1); + (arg1)->clear(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_TrimmerBase___call__) { + { + TrimmerBase *arg1 = (TrimmerBase *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: TrimmerBase___call__(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrimmerBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrimmerBase___call__" "', argument " "1"" of type '" "TrimmerBase *""'"); + } + arg1 = reinterpret_cast< TrimmerBase * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "TrimmerBase___call__" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (arg1)->operator ()(arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_giStreamPosRAII) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::giStreamPosRAII *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_giStreamPosRAII(stream);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_giStreamPosRAII" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_giStreamPosRAII" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = (Ferris::giStreamPosRAII *)new Ferris::giStreamPosRAII(*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__giStreamPosRAII, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_isCompressedContext) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isCompressedContext(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isCompressedContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isCompressedContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = (bool)Ferris::isCompressedContext(arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getNullConvertToCompressedChunkContextProgress_Sig) { + { + int argvi = 0; + Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getNullConvertToCompressedChunkContextProgress_Sig();"); + } + result = (Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *) &Ferris::Factory::getNullConvertToCompressedChunkContextProgress_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0 | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getCompressedChunkIOStream) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getCompressedChunkIOStream(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getCompressedChunkIOStream" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getCompressedChunkIOStream" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::Factory::getCompressedChunkIOStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_0) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *arg6 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,target,blocksize,algo,compress_level,Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConvertToCompressedChunkContext" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ConvertToCompressedChunkContext" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ConvertToCompressedChunkContext" "', argument " "6"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "6"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + arg6 = reinterpret_cast< Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t * >(argp6); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3,arg4,arg5,*arg6); + ST(argvi) = sv_newmortal(); + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_1) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,target,blocksize,algo,compress_level);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConvertToCompressedChunkContext" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ConvertToCompressedChunkContext" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_2) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + int arg3 ; + int arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,target,blocksize,algo);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConvertToCompressedChunkContext" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3,arg4); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_3) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + int arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,target,blocksize);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_4) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,target);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_5) { + { + Ferris::fh_context arg1 ; + int arg2 ; + int arg3 ; + int arg4 ; + Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *arg5 = 0 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,blocksize,algo,compress_level,Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConvertToCompressedChunkContext" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ConvertToCompressedChunkContext" "', argument " "5"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "5"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + arg5 = reinterpret_cast< Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t * >(argp5); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3,arg4,*arg5); + ST(argvi) = sv_newmortal(); + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_6) { + { + Ferris::fh_context arg1 ; + int arg2 ; + int arg3 ; + int arg4 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,blocksize,algo,compress_level);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConvertToCompressedChunkContext" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3,arg4); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_7) { + { + Ferris::fh_context arg1 ; + int arg2 ; + int arg3 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,blocksize,algo);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConvertToCompressedChunkContext" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2,arg3); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_8) { + { + Ferris::fh_context arg1 ; + int arg2 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c,blocksize);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConvertToCompressedChunkContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + Ferris::Factory::ConvertToCompressedChunkContext(arg1,arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext__SWIG_9) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ConvertToCompressedChunkContext(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertToCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::Factory::ConvertToCompressedChunkContext(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertToCompressedChunkContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 9; + if (_rank == _rankm) goto dispatch; + } + } + check_9: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_10; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 10; + if (_rank == _rankm) goto dispatch; + } + } + check_10: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_9); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_4); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_8); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_3); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_7); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_2); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_6); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_1); return; + case 9: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_5); return; + case 10: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertToCompressedChunkContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ConvertToCompressedChunkContext'"); + XSRETURN(0); +} + + +XS(_wrap_ConvertFromCompressedChunkContext__SWIG_0) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ConvertFromCompressedChunkContext(c,target,Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ConvertFromCompressedChunkContext" "', argument " "3"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "3"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + arg3 = reinterpret_cast< Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t * >(argp3); + Ferris::Factory::ConvertFromCompressedChunkContext(arg1,arg2,*arg3); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertFromCompressedChunkContext__SWIG_1) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ConvertFromCompressedChunkContext(c,target);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::Factory::ConvertFromCompressedChunkContext(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertFromCompressedChunkContext__SWIG_2) { + { + Ferris::fh_context arg1 ; + Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ConvertFromCompressedChunkContext(c,Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "2"" of type '" "Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t &""'"); + } + arg2 = reinterpret_cast< Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t * >(argp2); + Ferris::Factory::ConvertFromCompressedChunkContext(arg1,*arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertFromCompressedChunkContext__SWIG_3) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ConvertFromCompressedChunkContext(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConvertFromCompressedChunkContext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::Factory::ConvertFromCompressedChunkContext(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_ConvertFromCompressedChunkContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertFromCompressedChunkContext__SWIG_3); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertFromCompressedChunkContext__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertFromCompressedChunkContext__SWIG_1); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ConvertFromCompressedChunkContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ConvertFromCompressedChunkContext'"); + XSRETURN(0); +} + + +XS(_wrap_getSchemaDefaultSortList) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getSchemaDefaultSortList(sc);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDefaultSortList" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDefaultSortList" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::getSchemaDefaultSortList(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaDefaultSort) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getSchemaDefaultSort(sc);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDefaultSort" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDefaultSort" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::getSchemaDefaultSort(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_maskOffXSDMeta) { + { + Ferris::XSDBasic_t arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + Ferris::XSDBasic_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: maskOffXSDMeta(t);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "maskOffXSDMeta" "', argument " "1"" of type '" "Ferris::XSDBasic_t""'"); + } + arg1 = static_cast< Ferris::XSDBasic_t >(val1); + result = (Ferris::XSDBasic_t)Ferris::maskOffXSDMeta(arg1); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_attachStatelessSchema) { + { + Ferris::Context *arg1 = (Ferris::Context *) 0 ; + std::string *arg2 = 0 ; + Ferris::XSDBasic_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: attachStatelessSchema(c,rawname,t);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attachStatelessSchema" "', argument " "1"" of type '" "Ferris::Context *""'"); + } + arg1 = reinterpret_cast< Ferris::Context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attachStatelessSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attachStatelessSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "attachStatelessSchema" "', argument " "3"" of type '" "Ferris::XSDBasic_t""'"); + } + arg3 = static_cast< Ferris::XSDBasic_t >(val3); + Ferris::attachStatelessSchema(arg1,(std::string const &)*arg2,arg3); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_attachGenericSchema) { + { + Ferris::Context *arg1 = (Ferris::Context *) 0 ; + std::string *arg2 = 0 ; + Ferris::XSDBasic_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: attachGenericSchema(c,rawname,t);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attachGenericSchema" "', argument " "1"" of type '" "Ferris::Context *""'"); + } + arg1 = reinterpret_cast< Ferris::Context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attachGenericSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attachGenericSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "attachGenericSchema" "', argument " "3"" of type '" "Ferris::XSDBasic_t""'"); + } + arg3 = static_cast< Ferris::XSDBasic_t >(val3); + Ferris::attachGenericSchema(arg1,(std::string const &)*arg2,arg3); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaType__SWIG_0) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + Ferris::XSDBasic_t arg3 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::XSDBasic_t result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getSchemaType(c,eaname,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaType" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaType" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaType" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaType" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getSchemaType" "', argument " "3"" of type '" "Ferris::XSDBasic_t""'"); + } + arg3 = static_cast< Ferris::XSDBasic_t >(val3); + result = (Ferris::XSDBasic_t)Ferris::getSchemaType((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaJustification__SWIG_0) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getSchemaJustification(c,eaname,def);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaJustification" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaJustification" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaJustification" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaJustification" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getSchemaJustification" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaJustification" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::getSchemaJustification((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaJustification__SWIG_1) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getSchemaJustification(c,eaname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaJustification" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaJustification" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaJustification" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaJustification" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::getSchemaJustification((Ferris::fh_context const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaJustification) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaJustification__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaJustification__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getSchemaJustification'"); + XSRETURN(0); +} + + +XS(_wrap_getSchemaDisplayWidth__SWIG_0) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getSchemaDisplayWidth(c,eaname,def);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDisplayWidth" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayWidth" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaDisplayWidth" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayWidth" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getSchemaDisplayWidth" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)Ferris::getSchemaDisplayWidth((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaDisplayWidth__SWIG_1) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getSchemaDisplayWidth(c,eaname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDisplayWidth" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayWidth" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaDisplayWidth" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayWidth" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (int)Ferris::getSchemaDisplayWidth((Ferris::fh_context const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaDisplayWidth) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaDisplayWidth__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaDisplayWidth__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getSchemaDisplayWidth'"); + XSRETURN(0); +} + + +XS(_wrap_getSchemaDisplayPrecision__SWIG_0) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getSchemaDisplayPrecision(c,eaname,def);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDisplayPrecision" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayPrecision" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaDisplayPrecision" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayPrecision" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getSchemaDisplayPrecision" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)Ferris::getSchemaDisplayPrecision((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaDisplayPrecision__SWIG_1) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getSchemaDisplayPrecision(c,eaname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaDisplayPrecision" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayPrecision" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getSchemaDisplayPrecision" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaDisplayPrecision" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (int)Ferris::getSchemaDisplayPrecision((Ferris::fh_context const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaDisplayPrecision) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaDisplayPrecision__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaDisplayPrecision__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getSchemaDisplayPrecision'"); + XSRETURN(0); +} + + +XS(_wrap_getSchemaType__SWIG_1) { + { + Ferris::fh_context *arg1 = 0 ; + Ferris::XSDBasic_t arg2 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::XSDBasic_t result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getSchemaType(sc,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSchemaType" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSchemaType" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "getSchemaType" "', argument " "2"" of type '" "Ferris::XSDBasic_t""'"); + } + arg2 = static_cast< Ferris::XSDBasic_t >(val2); + result = (Ferris::XSDBasic_t)Ferris::getSchemaType((Ferris::fh_context const &)*arg1,arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getSchemaType) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaType__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getSchemaType__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getSchemaType'"); + XSRETURN(0); +} + + +XS(_wrap_getSchemaURLForType) { + { + Ferris::XSDBasic_t arg1 ; + int val1 ; + int ecode1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getSchemaURLForType(sct);"); + } + ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getSchemaURLForType" "', argument " "1"" of type '" "Ferris::XSDBasic_t""'"); + } + arg1 = static_cast< Ferris::XSDBasic_t >(val1); + result = Ferris::Factory::getSchemaURLForType(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_makeBasicTypeMap) { + { + Ferris::Factory::xsdtypemap_t *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Factory::xsdtypemap_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: makeBasicTypeMap(m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "makeBasicTypeMap" "', argument " "1"" of type '" "Ferris::Factory::xsdtypemap_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "makeBasicTypeMap" "', argument " "1"" of type '" "Ferris::Factory::xsdtypemap_t &""'"); + } + arg1 = reinterpret_cast< Ferris::Factory::xsdtypemap_t * >(argp1); + result = (Ferris::Factory::xsdtypemap_t *) &Ferris::Factory::makeBasicTypeMap(*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_attachStreamCollector) { + { + Ferris::fh_runner *arg1 = 0 ; + Runner_AsyncIOFunctor_t *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: attachStreamCollector(r,x);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_runner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attachStreamCollector" "', argument " "1"" of type '" "Ferris::fh_runner const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attachStreamCollector" "', argument " "1"" of type '" "Ferris::fh_runner const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_runner * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Runner_AsyncIOFunctor_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attachStreamCollector" "', argument " "2"" of type '" "Runner_AsyncIOFunctor_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attachStreamCollector" "', argument " "2"" of type '" "Runner_AsyncIOFunctor_t const &""'"); + } + arg2 = reinterpret_cast< Runner_AsyncIOFunctor_t * >(argp2); + Ferris::Private::attachStreamCollector((Ferris::fh_runner const &)*arg1,(Runner_AsyncIOFunctor_t const &)*arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_stringvec_to_CSTRvec) { + { + std::vector< std::string > *arg1 = 0 ; + std::vector< std::string > temp1 ; + std::vector< std::string > *v1 ; + int argvi = 0; + char **result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: stringvec_to_CSTRvec(v);"); + } + { + if (SWIG_ConvertPtr(ST(0),(void **) &v1, + SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) { + arg1 = v1; + } else if (SvROK(ST(0))) { + AV *av = (AV *)SvRV(ST(0)); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument 1 of stringvec_to_CSTRvec. " + "Expected an array of ""std::string"); + SV **tv; + I32 len = av_len(av) + 1; + for (int i=0; i const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Resolve__SWIG_0) { + { + std::string arg1 ; + Ferris::ResolveStyle arg2 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Resolve(earl,rs);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Resolve" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Resolve" "', argument " "2"" of type '" "Ferris::ResolveStyle""'"); + } + arg2 = static_cast< Ferris::ResolveStyle >(val2); + result = Ferris::Resolve(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Resolve__SWIG_1) { + { + std::string arg1 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Resolve(earl);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Resolve" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Resolve(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Resolve__SWIG_2) { + { + std::string arg1 ; + Ferris::ResolveStyle arg2 ; + int arg3 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Resolve(earl,rs,ex);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Resolve" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Resolve" "', argument " "2"" of type '" "Ferris::ResolveStyle""'"); + } + arg2 = static_cast< Ferris::ResolveStyle >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Resolve" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = Ferris::Resolve(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Resolve) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Resolve__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Resolve__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Resolve__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'Resolve'"); + XSRETURN(0); +} + + +XS(_wrap_expandShellGlobs__SWIG_0) { + { + Ferris::stringlist_t *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: expandShellGlobs(ret,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "expandShellGlobs" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "expandShellGlobs" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "expandShellGlobs" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "expandShellGlobs" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (Ferris::stringlist_t *) &Ferris::expandShellGlobs(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getExpandShellGlobsPopTable) { + { + int argvi = 0; + ::poptOption *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getExpandShellGlobsPopTable();"); + } + result = (::poptOption *)Ferris::getExpandShellGlobsPopTable(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poptOption, 0 | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_expandShellGlobs__SWIG_1) { + { + Ferris::stringlist_t *arg1 = 0 ; + poptContext *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + Ferris::stringlist_t *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: expandShellGlobs(ret,optCon);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "expandShellGlobs" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "expandShellGlobs" "', argument " "1"" of type '" "Ferris::stringlist_t &""'"); + } + arg1 = reinterpret_cast< Ferris::stringlist_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_poptContext, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "expandShellGlobs" "', argument " "2"" of type '" "poptContext &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "expandShellGlobs" "', argument " "2"" of type '" "poptContext &""'"); + } + arg2 = reinterpret_cast< poptContext * >(argp2); + result = (Ferris::stringlist_t *) &Ferris::expandShellGlobs(*arg1,*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_expandShellGlobs) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_poptContext, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__listT_std__string_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_expandShellGlobs__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_expandShellGlobs__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'expandShellGlobs'"); + XSRETURN(0); +} + + +XS(_wrap_new_DesktopFileKeyNotFound__SWIG_0) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + Ferris::Attribute *arg4 = (Ferris::Attribute *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + void *argp4 = 0 ; + int res4 = 0 ; + int argvi = 0; + Ferris::DesktopFileKeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: new_DesktopFileKeyNotFound(state,log,e,a);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DesktopFileKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DesktopFileKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DesktopFileKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Ferris__Attribute, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DesktopFileKeyNotFound" "', argument " "4"" of type '" "Ferris::Attribute *""'"); + } + arg4 = reinterpret_cast< Ferris::Attribute * >(argp4); + result = (Ferris::DesktopFileKeyNotFound *)new Ferris::DesktopFileKeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DesktopFileKeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DesktopFileKeyNotFound__SWIG_1) { + { + Ferris::FerrisException_CodeState *arg1 = 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::DesktopFileKeyNotFound *result = 0 ; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: new_DesktopFileKeyNotFound(state,log,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DesktopFileKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "1"" of type '" "Ferris::FerrisException_CodeState const &""'"); + } + arg1 = reinterpret_cast< Ferris::FerrisException_CodeState * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DesktopFileKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DesktopFileKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DesktopFileKeyNotFound" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (Ferris::DesktopFileKeyNotFound *)new Ferris::DesktopFileKeyNotFound((Ferris::FerrisException_CodeState const &)*arg1,arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__DesktopFileKeyNotFound, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_DesktopFileKeyNotFound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__FerrisException_CodeState, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Ferris__Attribute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DesktopFileKeyNotFound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DesktopFileKeyNotFound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_DesktopFileKeyNotFound'"); + XSRETURN(0); +} + + +XS(_wrap_importDesktopFileTo) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: importDesktopFileTo(parentc,desktopc);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importDesktopFileTo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importDesktopFileTo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "importDesktopFileTo" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importDesktopFileTo" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::importDesktopFileTo(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_importDesktopFile) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: importDesktopFile(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importDesktopFile" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importDesktopFile" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::importDesktopFile(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getFileClipboard__SWIG_0) { + { + std::string arg1 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getFileClipboard(s);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getFileClipboard" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Factory::getFileClipboard(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getFileClipboard__SWIG_1) { + { + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getFileClipboard();"); + } + result = Ferris::Factory::getFileClipboard(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getFileClipboard) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getFileClipboard__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getFileClipboard__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getFileClipboard'"); + XSRETURN(0); +} + + +XS(_wrap_Clear) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Clear(clip);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clear" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Clear" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::FileClip::Clear(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Cut) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Cut(clip,c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cut" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cut" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cut" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cut" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::FileClip::Cut(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Copy) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Copy(clip,c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Copy" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Copy" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Copy" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Copy" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::FileClip::Copy(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Link) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Link(clip,c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Link" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Link" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Link" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Link" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::FileClip::Link(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Paste) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Paste(clip,dst);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Paste" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Paste" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Paste" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Paste" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + Ferris::FileClip::Paste(arg1,arg2); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Undo) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Undo(cursor);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Undo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Undo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::FileClip::Undo(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_Redo) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Redo(cursor);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Redo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Redo" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + Ferris::FileClip::Redo(arg1); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getMimeHistory__SWIG_0) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + std::string arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getMimeHistory(clip,c,action);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getMimeHistory" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getMimeHistory" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getMimeHistory" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getMimeHistory" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getMimeHistory" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::FileClip::getMimeHistory(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getMimeHistory__SWIG_1) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getMimeHistory(clip,c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getMimeHistory" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getMimeHistory" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getMimeHistory" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getMimeHistory" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::FileClip::getMimeHistory(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_getMimeHistory) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getMimeHistory__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getMimeHistory__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getMimeHistory'"); + XSRETURN(0); +} + + +XS(_wrap_setUseSloth) { + { + Ferris::fh_context arg1 ; + bool arg2 ; + void *argp1 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: setUseSloth(clip,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setUseSloth" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setUseSloth" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "setUseSloth" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + Ferris::FileClip::setUseSloth(arg1,arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_setUseAutoClose) { + { + Ferris::fh_context arg1 ; + bool arg2 ; + void *argp1 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: setUseAutoClose(clip,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setUseAutoClose" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setUseAutoClose" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "setUseAutoClose" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + Ferris::FileClip::setUseAutoClose(arg1,arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_setCursorOption) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: setCursorOption(parent,k,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setCursorOption" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setCursorOption" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setCursorOption" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setCursorOption" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setCursorOption" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setCursorOption" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + Ferris::Config::setCursorOption(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_getCursor) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getCursor(parent);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getCursor" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getCursor" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::Factory::getCursor(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_cursorNext) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: cursorNext(cursor);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cursorNext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cursorNext" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::Cursor::cursorNext(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_cursorPrev) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: cursorPrev(cursor);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cursorPrev" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cursorPrev" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::Cursor::cursorPrev(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_cursorOffset) { + { + Ferris::fh_context arg1 ; + int arg2 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: cursorOffset(cursor,offset);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cursorOffset" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cursorOffset" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cursorOffset" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::Cursor::cursorOffset(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_cursorSet) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: cursorSet(cursor,newc);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cursorSet" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cursorSet" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cursorSet" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cursorSet" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::Cursor::cursorSet(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_InitOpenSSL) { + { + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: InitOpenSSL();"); + } + InitOpenSSL(); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_digest__SWIG_0) { + { + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg1 ; + std::string arg2 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: digest(Ferris::fh_istream,digestName);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "digest" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_istream * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "digest" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::digest(arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_digest__SWIG_1) { + { + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: digest(Ferris::fh_istream);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "digest" "', argument " "1"" of type '" "Ferris::fh_istream""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_istream * >(argp1)); + } + } + result = Ferris::digest(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_digest__SWIG_2) { + { + std::string arg1 ; + std::string arg2 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: digest(std::string,digestName);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "digest" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "digest" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::digest(arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_digest__SWIG_3) { + { + std::string arg1 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: digest(std::string);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "digest" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::digest(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_digest) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_digest__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_digest__SWIG_3); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_digest__SWIG_0); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_digest__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'digest'"); + XSRETURN(0); +} + + +XS(_wrap_base64encode) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: base64encode(v);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "base64encode" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "base64encode" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::base64encode((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeDigestStream__SWIG_0) { + { + std::string arg1 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeDigestStream(digestName);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MakeDigestStream" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Factory::MakeDigestStream(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeDigestStream__SWIG_1) { + { + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: MakeDigestStream();"); + } + result = Ferris::Factory::MakeDigestStream(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeDigestStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeDigestStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeDigestStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeDigestStream'"); + XSRETURN(0); +} + + +XS(_wrap_new_ImplicitIteratorUpdateLock) { + { + int argvi = 0; + Ferris::ImplicitIteratorUpdateLock *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ImplicitIteratorUpdateLock();"); + } + result = (Ferris::ImplicitIteratorUpdateLock *)new Ferris::ImplicitIteratorUpdateLock(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ImplicitIteratorUpdateLock, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ImplicitIteratorUpdateLock) { + { + Ferris::ImplicitIteratorUpdateLock *arg1 = (Ferris::ImplicitIteratorUpdateLock *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ImplicitIteratorUpdateLock(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ImplicitIteratorUpdateLock, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImplicitIteratorUpdateLock" "', argument " "1"" of type '" "Ferris::ImplicitIteratorUpdateLock *""'"); + } + arg1 = reinterpret_cast< Ferris::ImplicitIteratorUpdateLock * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ImplicitIteratorUpdateLock_isTaken) { + { + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: ImplicitIteratorUpdateLock_isTaken();"); + } + result = (bool)Ferris::ImplicitIteratorUpdateLock::isTaken(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ContextIterator) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ContextIterator(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContextIterator" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ContextIterator) { + { + Ferris::ContextIterator *arg1 = 0 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextIterator *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_ContextIterator(ci);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContextIterator" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContextIterator" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::ContextIterator *)new Ferris::ContextIterator((Ferris::ContextIterator const &)*arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_operator_assignment) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::ContextIterator *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_operator_assignment(self,ci);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_operator_assignment" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_operator_assignment" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_operator_assignment" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (Ferris::ContextIterator *) &(arg1)->operator =((Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, 0 | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___ref__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextIterator::reference result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator___ref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___ref__" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = ((Ferris::ContextIterator const *)arg1)->operator *(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::reference(static_cast< const Ferris::ContextIterator::reference& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___deref__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextIterator::pointer result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator___deref__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___deref__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (arg1)->operator ->(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::pointer(static_cast< const Ferris::ContextIterator::pointer& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_operator_atindex) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::reference result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_operator_atindex(self,n);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_operator_atindex" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_operator_atindex" "', argument " "2"" of type '" "Ferris::ContextIterator::difference_type""'"); + } + arg2 = static_cast< Ferris::ContextIterator::difference_type >(val2); + result = ((Ferris::ContextIterator const *)arg1)->operator [](arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::reference(static_cast< const Ferris::ContextIterator::reference& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___plusplus____SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator___plusplus__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___plusplus__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::ContextIterator::_Self *) &(arg1)->operator ++(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, 0 | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___plusplus____SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___plusplus__(self,int);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___plusplus__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___plusplus__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (arg1)->operator ++(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::_Self(static_cast< const Ferris::ContextIterator::_Self& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___plusplus__) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator___plusplus____SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator___plusplus____SWIG_1); return; + } + } + + croak("No matching function for overloaded 'ContextIterator___plusplus__'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator___minmin____SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator___minmin__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___minmin__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::ContextIterator::_Self *) &(arg1)->operator --(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, 0 | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___minmin____SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___minmin__(self,int);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___minmin__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___minmin__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (arg1)->operator --(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::_Self(static_cast< const Ferris::ContextIterator::_Self& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___minmin__) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator___minmin____SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator___minmin____SWIG_1); return; + } + } + + croak("No matching function for overloaded 'ContextIterator___minmin__'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator___add__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___add__(self,n);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___add__" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___add__" "', argument " "2"" of type '" "Ferris::ContextIterator::difference_type""'"); + } + arg2 = static_cast< Ferris::ContextIterator::difference_type >(val2); + result = ((Ferris::ContextIterator const *)arg1)->operator +(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::_Self(static_cast< const Ferris::ContextIterator::_Self& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___iadd__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___iadd__(self,n);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___iadd__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___iadd__" "', argument " "2"" of type '" "Ferris::ContextIterator::difference_type""'"); + } + arg2 = static_cast< Ferris::ContextIterator::difference_type >(val2); + result = (Ferris::ContextIterator::_Self *) &(arg1)->operator +=(arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, 0 | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___sub__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___sub__(self,n);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___sub__" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___sub__" "', argument " "2"" of type '" "Ferris::ContextIterator::difference_type""'"); + } + arg2 = static_cast< Ferris::ContextIterator::difference_type >(val2); + result = ((Ferris::ContextIterator const *)arg1)->operator -(arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::ContextIterator::_Self(static_cast< const Ferris::ContextIterator::_Self& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator___isub__) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ContextIterator::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::_Self *result = 0 ; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator___isub__(self,n);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator___isub__" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator___isub__" "', argument " "2"" of type '" "Ferris::ContextIterator::difference_type""'"); + } + arg2 = static_cast< Ferris::ContextIterator::difference_type >(val2); + result = (Ferris::ContextIterator::_Self *) &(arg1)->operator -=(arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__ContextIterator, 0 | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getContextClassStatelessEANames) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::stringset_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getContextClassStatelessEANames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getContextClassStatelessEANames" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::stringset_t *) &(*arg1)->getContextClassStatelessEANames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isDir) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_isDir(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isDir" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->isDir(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getDirName) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getDirName(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getDirName" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (std::string *) &(*arg1)->getDirName(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getParent) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Attribute::Parent_t result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getParent(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getParent" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + try { + result = (Ferris::Attribute::Parent_t)(*arg1)->getParent(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isParentBound) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_isParentBound(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isParentBound" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->isParentBound(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getRecommendedEA) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getRecommendedEA(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getRecommendedEA" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getRecommendedEA(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getHasSubContextsGuess) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getHasSubContextsGuess(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getHasSubContextsGuess" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->getHasSubContextsGuess(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getHaveReadDir) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getHaveReadDir(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getHaveReadDir" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (int)(*arg1)->getHaveReadDir(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_toAttribute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_toAttribute(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_toAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->toAttribute(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getSchema) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getSchema(self,eaname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSchema" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getSchema" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getSchema((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getSchemaOrDefault) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::XSDBasic_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_getSchemaOrDefault(self,eaname,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSchemaOrDefault" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getSchemaOrDefault" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getSchemaOrDefault" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_getSchemaOrDefault" "', argument " "3"" of type '" "Ferris::XSDBasic_t""'"); + } + arg3 = static_cast< Ferris::XSDBasic_t >(val3); + result = (*arg1)->getSchemaOrDefault((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_begin) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_begin(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_begin" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->begin(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_end) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_end(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_end" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->end(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_rbegin) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::reverse_iterator< Ferris::ContextIterator > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_rbegin(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_rbegin" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->rbegin(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::reverse_iterator(static_cast< const Ferris::Context::reverse_iterator& >(result))), SWIGTYPE_p_std__reverse_iteratorT_Ferris__ContextIterator_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_rend) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::reverse_iterator< Ferris::ContextIterator > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_rend(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_rend" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->rend(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::reverse_iterator(static_cast< const Ferris::Context::reverse_iterator& >(result))), SWIGTYPE_p_std__reverse_iteratorT_Ferris__ContextIterator_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_find) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_find(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_find" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_find" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_find" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->find((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_monsterName) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_monsterName(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_monsterName" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_monsterName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_monsterName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->monsterName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getIsNativeContext) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getIsNativeContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getIsNativeContext" "', argument " "1"" of type '" "Ferris::ContextIterator const *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->getIsNativeContext(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_setHasDynamicAttributes) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_setHasDynamicAttributes(self,v);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_setHasDynamicAttributes" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_setHasDynamicAttributes" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->setHasDynamicAttributes(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_setAttribute__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + Ferris::XSDBasic_t arg5 ; + bool arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: ContextIterator_setAttribute(self,rdn,atx,addToREA,sct,isStateLess);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_setAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ContextIterator_setAttribute" "', argument " "5"" of type '" "Ferris::XSDBasic_t""'"); + } + arg5 = static_cast< Ferris::XSDBasic_t >(val5); + ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContextIterator_setAttribute" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5,arg6); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_setAttribute__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + Ferris::XSDBasic_t arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_setAttribute(self,rdn,atx,addToREA,sct);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_setAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ContextIterator_setAttribute" "', argument " "5"" of type '" "Ferris::XSDBasic_t""'"); + } + arg5 = static_cast< Ferris::XSDBasic_t >(val5); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4,arg5); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_setAttribute__SWIG_2) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::EA_Atom *arg3 = (Ferris::EA_Atom *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ContextIterator_setAttribute(self,rdn,atx,addToREA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_setAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_setAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__EA_Atom, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_setAttribute" "', argument " "3"" of type '" "Ferris::EA_Atom *""'"); + } + arg3 = reinterpret_cast< Ferris::EA_Atom * >(argp3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_setAttribute" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + try { + result = (bool)(*arg1)->setAttribute((std::string const &)*arg2,arg3,arg4); + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_setAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__EA_Atom, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_setAttribute__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_setAttribute__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_setAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_setAttribute'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getSubContextAttributesWithSameNameHaveSameSchema) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getSubContextAttributesWithSameNameHaveSameSchema(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSubContextAttributesWithSameNameHaveSameSchema" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->getSubContextAttributesWithSameNameHaveSameSchema(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_dumpOutItems) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_dumpOutItems(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_dumpOutItems" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + (*arg1)->dumpOutItems(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getOverMountContext) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getOverMountContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getOverMountContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::Context *)(*arg1)->getOverMountContext(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Context, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_remove__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_remove(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_remove" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_remove" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_remove" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + (*arg1)->remove((std::string const &)*arg2); + ST(argvi) = sv_newmortal(); + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_remove__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_remove(self,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_remove" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_remove" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_remove" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + (*arg1)->remove(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_remove) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_remove__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_remove__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_remove'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_rename__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_rename(self,rdn,newPath,TryToCopyOverFileSystems,OverWriteDstIfExists);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_rename" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_rename" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ContextIterator_rename" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_rename__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ContextIterator_rename(self,rdn,newPath,TryToCopyOverFileSystems);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_rename" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_rename" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_rename__SWIG_2) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_rename(self,rdn,newPath);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_rename" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_rename" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (*arg1)->rename((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_rename) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_rename__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_rename__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_rename__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_rename'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_copyTo__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_copyTo(self,newPath,OverWriteDstIfExists);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_copyTo" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_copyTo" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = (*arg1)->copyTo((std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_copyTo__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_copyTo(self,newPath);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_copyTo" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_copyTo" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->copyTo((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_copyTo) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_copyTo__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_copyTo__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_copyTo'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_createAttribute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_createAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_createAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_createAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->createAttribute((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateAttributeFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeFailed(static_cast< const Ferris::FerrisCreateAttributeFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateAttributeNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeNotSupported(static_cast< const Ferris::FerrisCreateAttributeNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeAlreadyInUse &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeAlreadyInUse(static_cast< const Ferris::AttributeAlreadyInUse& >(_e))),SWIGTYPE_p_Ferris__AttributeAlreadyInUse,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_acquireAttribute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_acquireAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_acquireAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_acquireAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_acquireAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->acquireAttribute((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateAttributeFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeFailed(static_cast< const Ferris::FerrisCreateAttributeFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateAttributeNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateAttributeNotSupported(static_cast< const Ferris::FerrisCreateAttributeNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getCreateSubContextSchema) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getCreateSubContextSchema(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getCreateSubContextSchema" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getCreateSubContextSchema(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_createSubContext__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_createSubContext(self,rdn,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_createSubContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_createSubContext" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createSubContext" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2,arg3); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_createSubContext__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_createSubContext(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_createSubContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_createSubContext__SWIG_2) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::CreateMetaDataContext,::Ferris::FerrisExRefCountedContext,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_createSubContext(self,rdn,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_createSubContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_createSubContext" "', argument " "3"" of type '" "Ferris::fh_mdcontext""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_createSubContext" "', argument " "3"" of type '" "Ferris::fh_mdcontext""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_mdcontext * >(argp3)); + } + } + try { + result = (*arg1)->createSubContext((std::string const &)*arg2,arg3); + } + catch(Ferris::FerrisCreateSubContextFailed &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextFailed(static_cast< const Ferris::FerrisCreateSubContextFailed& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::FerrisCreateSubContextNotSupported &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisCreateSubContextNotSupported(static_cast< const Ferris::FerrisCreateSubContextNotSupported& >(_e))),SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_createSubContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_createSubContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_createSubContext__SWIG_0); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_createSubContext__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_createSubContext'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getRelativeContext__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::RootContextFactory *arg3 = (Ferris::RootContextFactory *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_getRelativeContext(self,xdn,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getRelativeContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Ferris__RootContextFactory, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_getRelativeContext" "', argument " "3"" of type '" "Ferris::RootContextFactory *""'"); + } + arg3 = reinterpret_cast< Ferris::RootContextFactory * >(argp3); + try { + result = (*arg1)->getRelativeContext((std::string const &)*arg2,arg3); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getRelativeContext__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getRelativeContext(self,xdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getRelativeContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getRelativeContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getRelativeContext((std::string const &)*arg2); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getRelativeContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Ferris__RootContextFactory, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getRelativeContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getRelativeContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_getRelativeContext'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getSubContextNames) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextCollection::SubContextNames_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getSubContextNames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSubContextNames" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::ContextCollection::SubContextNames_t *) &(*arg1)->getSubContextNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getSubContext) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getSubContext(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSubContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getSubContext((std::string const &)*arg2); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_priv_isSubContextBound) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_priv_isSubContextBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_priv_isSubContextBound" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_priv_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_priv_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)(*arg1)->priv_isSubContextBound((std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isSubContextBound) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_isSubContextBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isSubContextBound" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)(*arg1)->isSubContextBound((std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_read__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_read(self,force);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_read" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_read" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (*arg1)->read(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_read__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_read(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_read" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + (*arg1)->read(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_read) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_read__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_read__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_read'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_guessSize) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + long result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_guessSize(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_guessSize" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (long)(*arg1)->guessSize(); + ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_hasSubContexts) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_hasSubContexts(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_hasSubContexts" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->hasSubContexts(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_SubContextCount) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_SubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_SubContextCount" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (int)(*arg1)->SubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_all_attributes_have_single_ref_count) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_all_attributes_have_single_ref_count(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_all_attributes_have_single_ref_count" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->all_attributes_have_single_ref_count(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isAttributeBound__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_isAttributeBound(self,rdn,createIfNotThere);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isAttributeBound" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_isAttributeBound" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2,arg3); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isAttributeBound__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_isAttributeBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isAttributeBound" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_isAttributeBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (bool)(*arg1)->isAttributeBound((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isAttributeBound) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_isAttributeBound__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_isAttributeBound__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_isAttributeBound'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getAttribute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_attribute result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getAttribute(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getAttribute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getAttribute" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (*arg1)->getAttribute((std::string const &)*arg2); + } + catch(Ferris::NoSuchAttribute &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchAttribute(static_cast< const Ferris::NoSuchAttribute& >(_e))),SWIGTYPE_p_Ferris__NoSuchAttribute,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_attribute(static_cast< const Ferris::fh_attribute& >(result))), SWIGTYPE_p_Ferris__fh_attribute, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getAttributeCount) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getAttributeCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getAttributeCount" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (int)(*arg1)->getAttributeCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getAttributeRootEmblem) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_emblem result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getAttributeRootEmblem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getAttributeRootEmblem" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getAttributeRootEmblem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_emblem(static_cast< const Ferris::fh_emblem& >(result))), SWIGTYPE_p_Ferris__fh_emblem, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Changed) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Changed *arg2 = (NamingEvent_Changed *) 0 ; + std::string *arg3 = 0 ; + std::string *arg4 = 0 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 = SWIG_OLDOBJ ; + int res4 = SWIG_OLDOBJ ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_Emit_Changed(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Changed" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Changed, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Changed" "', argument " "2"" of type '" "NamingEvent_Changed *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Changed * >(argp2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_Emit_Changed" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_Emit_Changed" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ContextIterator_Emit_Changed" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_Emit_Changed" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_Emit_Changed" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Changed(arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5); + ST(argvi) = sv_newmortal(); + + + if (SWIG_IsNewObj(res3)) delete arg3; + if (SWIG_IsNewObj(res4)) delete arg4; + + XSRETURN(argvi); + fail: + + + if (SWIG_IsNewObj(res3)) delete arg3; + if (SWIG_IsNewObj(res4)) delete arg4; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Deleted) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Deleted *arg2 = (NamingEvent_Deleted *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_Emit_Deleted(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Deleted" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Deleted, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Deleted" "', argument " "2"" of type '" "NamingEvent_Deleted *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Deleted * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Deleted" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Deleted" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_Emit_Deleted" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Deleted(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Start_Execute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Start_Execute *arg2 = (NamingEvent_Start_Execute *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_Emit_Start_Execute(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Start_Execute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Start_Execute, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Start_Execute" "', argument " "2"" of type '" "NamingEvent_Start_Execute *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Start_Execute * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Start_Execute" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Start_Execute" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_Emit_Start_Execute" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Start_Execute(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Stop_Execute) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Stop_Execute *arg2 = (NamingEvent_Stop_Execute *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_Emit_Stop_Execute(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Stop_Execute" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Stop_Execute, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Stop_Execute" "', argument " "2"" of type '" "NamingEvent_Stop_Execute *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Stop_Execute * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Stop_Execute" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Stop_Execute" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_Emit_Stop_Execute" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Stop_Execute(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Created) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Created *arg2 = (NamingEvent_Created *) 0 ; + Ferris::fh_context *arg3 = 0 ; + std::string arg4 ; + std::string arg5 ; + sigc::trackable *arg6 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: ContextIterator_Emit_Created(self,e,newc,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Created" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Created, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Created" "', argument " "2"" of type '" "NamingEvent_Created *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Created * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_Emit_Created" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_Emit_Created" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + arg3 = reinterpret_cast< Ferris::fh_context * >(argp3); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Created" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Created" "', argument " "5"" of type '" "std::string""'"); + } + arg5 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ContextIterator_Emit_Created" "', argument " "6"" of type '" "sigc::trackable *""'"); + } + arg6 = reinterpret_cast< sigc::trackable * >(argp6); + (*arg1)->Emit_Created(arg2,(Ferris::fh_context const &)*arg3,arg4,arg5,arg6); + ST(argvi) = sv_newmortal(); + + + + + + + XSRETURN(argvi); + fail: + + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Moved) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Moved *arg2 = (NamingEvent_Moved *) 0 ; + std::string arg3 ; + std::string arg4 ; + sigc::trackable *arg5 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_Emit_Moved(self,e,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Moved" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Moved, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Moved" "', argument " "2"" of type '" "NamingEvent_Moved *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Moved * >(argp2); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Moved" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Moved" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_Emit_Moved" "', argument " "5"" of type '" "sigc::trackable *""'"); + } + arg5 = reinterpret_cast< sigc::trackable * >(argp5); + (*arg1)->Emit_Moved(arg2,arg3,arg4,arg5); + ST(argvi) = sv_newmortal(); + + + + + + XSRETURN(argvi); + fail: + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Exists) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Exists *arg2 = (NamingEvent_Exists *) 0 ; + Ferris::fh_context *arg3 = 0 ; + std::string arg4 ; + std::string arg5 ; + sigc::trackable *arg6 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: ContextIterator_Emit_Exists(self,e,newc,olddn,newdn,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Exists" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Exists, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Exists" "', argument " "2"" of type '" "NamingEvent_Exists *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Exists * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_Emit_Exists" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_Emit_Exists" "', argument " "3"" of type '" "Ferris::fh_context const &""'"); + } + arg3 = reinterpret_cast< Ferris::fh_context * >(argp3); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Exists" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ContextIterator_Emit_Exists" "', argument " "5"" of type '" "std::string""'"); + } + arg5 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ContextIterator_Emit_Exists" "', argument " "6"" of type '" "sigc::trackable *""'"); + } + arg6 = reinterpret_cast< sigc::trackable * >(argp6); + (*arg1)->Emit_Exists(arg2,(Ferris::fh_context const &)*arg3,arg4,arg5,arg6); + ST(argvi) = sv_newmortal(); + + + + + + + XSRETURN(argvi); + fail: + + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Start_Reading_Context) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Start_Reading_Context *arg2 = (NamingEvent_Start_Reading_Context *) 0 ; + sigc::trackable *arg3 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_Emit_Start_Reading_Context(self,e,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Start_Reading_Context" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Start_Reading_Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Start_Reading_Context" "', argument " "2"" of type '" "NamingEvent_Start_Reading_Context *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Start_Reading_Context * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_Emit_Start_Reading_Context" "', argument " "3"" of type '" "sigc::trackable *""'"); + } + arg3 = reinterpret_cast< sigc::trackable * >(argp3); + (*arg1)->Emit_Start_Reading_Context(arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_Emit_Stop_Reading_Context) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + NamingEvent_Stop_Reading_Context *arg2 = (NamingEvent_Stop_Reading_Context *) 0 ; + sigc::trackable *arg3 = (sigc::trackable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_Emit_Stop_Reading_Context(self,e,ExtraData);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_Emit_Stop_Reading_Context" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_NamingEvent_Stop_Reading_Context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_Emit_Stop_Reading_Context" "', argument " "2"" of type '" "NamingEvent_Stop_Reading_Context *""'"); + } + arg2 = reinterpret_cast< NamingEvent_Stop_Reading_Context * >(argp2); + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_sigc__trackable, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_Emit_Stop_Reading_Context" "', argument " "3"" of type '" "sigc::trackable *""'"); + } + arg3 = reinterpret_cast< sigc::trackable * >(argp3); + (*arg1)->Emit_Stop_Reading_Context(arg2,arg3); + ST(argvi) = sv_newmortal(); + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getURL) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getURL(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getURL" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getURL(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_SubCreate_file) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::fh_context arg2 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_SubCreate_file(self,c,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_SubCreate_file" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_SubCreate_file" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_SubCreate_file" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_SubCreate_file" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_SubCreate_file" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + result = (*arg1)->SubCreate_file(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_dumpRefDebugData) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_dumpRefDebugData(self,ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_dumpRefDebugData" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_dumpRefDebugData" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_dumpRefDebugData" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (*arg1)->dumpRefDebugData(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_splitPath) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_splitPath(self,dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_splitPath" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_splitPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_splitPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->splitPath((std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::SplitPath_t(static_cast< const Ferris::Context::SplitPath_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_unSplitPath) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::Context::SplitPath_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_unSplitPath(self,pa);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_unSplitPath" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__listT_std__string_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_unSplitPath" "', argument " "2"" of type '" "Ferris::Context::SplitPath_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_unSplitPath" "', argument " "2"" of type '" "Ferris::Context::SplitPath_t const &""'"); + } + arg2 = reinterpret_cast< Ferris::Context::SplitPath_t * >(argp2); + result = (*arg1)->unSplitPath((Ferris::Context::SplitPath_t const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getMimeType__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getMimeType(self,fromContent);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getMimeType" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_getMimeType" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (*arg1)->getMimeType(arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getMimeType__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getMimeType(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getMimeType" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getMimeType(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getMimeType) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getMimeType__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getMimeType__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_getMimeType'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getFileType) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getFileType(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getFileType" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getFileType(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getMedallion) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_medallion result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getMedallion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getMedallion" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getMedallion(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_medallion(static_cast< const Ferris::fh_medallion& >(result))), SWIGTYPE_p_Ferris__fh_medallion, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_hasMedallion) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_hasMedallion(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_hasMedallion" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->hasMedallion(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamespacePrefixes) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< std::list< std::string > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamespacePrefixes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamespacePrefixes" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getNamespacePrefixes(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::stringlist_t(static_cast< const Ferris::stringlist_t& >(result))), SWIGTYPE_p_std__listT_std__string_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getBranchFileSystem) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getBranchFileSystem(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getBranchFileSystem" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getBranchFileSystem(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNameExtension) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNameExtension(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNameExtension" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getNameExtension(); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getImage) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getImage(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getImage" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getImage(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getImageOrNULL) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getImageOrNULL(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getImageOrNULL" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->getImageOrNULL(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_priv_getImage) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_priv_getImage(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_priv_getImage" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (*arg1)->priv_getImage(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_image(static_cast< const Ferris::fh_image& >(result))), SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_taintImage) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + SwigValueWrapper< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_taintImage(self,im);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_taintImage" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_taintImage" "', argument " "2"" of type '" "Ferris::fh_image""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_taintImage" "', argument " "2"" of type '" "Ferris::fh_image""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_image * >(argp2)); + } + } + (*arg1)->taintImage(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_RegisterImageEAGeneratorModule) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + std::string *arg4 = 0 ; + std::string *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + int res5 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_RegisterImageEAGeneratorModule(self,ext,writable,implname,shortname);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + { + std::string *ptr = (std::string *)0; + res5 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(4), &ptr); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "5"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_RegisterImageEAGeneratorModule" "', argument " "5"" of type '" "std::string const &""'"); + } + arg5 = ptr; + } + result = (bool)(*arg1)->RegisterImageEAGeneratorModule((std::string const &)*arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + if (SWIG_IsNewObj(res5)) delete arg5; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + if (SWIG_IsNewObj(res5)) delete arg5; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_UnrollRegisteredImageEAGeneratorModule) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + bool arg3 ; + std::string *arg4 = 0 ; + Ferris::Context::f_imageEAGenerator *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + void *argp5 ; + int res5 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: ContextIterator_UnrollRegisteredImageEAGeneratorModule(self,ext,writable,implname,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "4"" of type '" "std::string const &""'"); + } + arg4 = ptr; + } + res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "5"" of type '" "Ferris::Context::f_imageEAGenerator const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_UnrollRegisteredImageEAGeneratorModule" "', argument " "5"" of type '" "Ferris::Context::f_imageEAGenerator const &""'"); + } + arg5 = reinterpret_cast< Ferris::Context::f_imageEAGenerator * >(argp5); + result = (bool)(*arg1)->UnrollRegisteredImageEAGeneratorModule((std::string const &)*arg2,arg3,(std::string const &)*arg4,(Ferris::Context::f_imageEAGenerator const &)*arg5); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + + if (SWIG_IsNewObj(res4)) delete arg4; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_isCompressedContext) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_isCompressedContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_isCompressedContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->isCompressedContext(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_addHandlableToBeReleasedWithContext) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::Handlable *arg2 = (Ferris::Handlable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_addHandlableToBeReleasedWithContext(self,h);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_addHandlableToBeReleasedWithContext" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Ferris__Handlable, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_addHandlableToBeReleasedWithContext" "', argument " "2"" of type '" "Ferris::Handlable *""'"); + } + arg2 = reinterpret_cast< Ferris::Handlable * >(argp2); + (*arg1)->addHandlableToBeReleasedWithContext(arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_SubCreate_dir) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::fh_context arg2 ; + Ferris::fh_context arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_SubCreate_dir(self,c,md);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_SubCreate_dir" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_SubCreate_dir" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_SubCreate_dir" "', argument " "3"" of type '" "Ferris::fh_context""'"); + } else { + arg3 = *(reinterpret_cast< Ferris::fh_context * >(argp3)); + } + } + result = (*arg1)->SubCreate_dir(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_dumpTree) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_dumpTree(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_dumpTree" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + (*arg1)->dumpTree(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getLastPartOfName) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getLastPartOfName(self,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getLastPartOfName" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getLastPartOfName" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (*arg1)->getLastPartOfName((std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_appendToPath__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ContextIterator_appendToPath(self,p,d,allowDirToBeAbsolute);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_appendToPath" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ContextIterator_appendToPath" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_appendToPath__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_appendToPath(self,p,d);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_appendToPath" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_appendToPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ContextIterator_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_appendToPath" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = (*arg1)->appendToPath((std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_appendToPath) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_appendToPath__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_appendToPath__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_appendToPath'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getIStream__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getIStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getIStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_getIStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getIStream__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getIStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getIStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + try { + result = (*arg1)->getIStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_getIStream'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getLocalIStream__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + Ferris::ferris_ios::openmode arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned long long val3 ; + int ecode3 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ContextIterator_getLocalIStream(self,new_dn,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getLocalIStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContextIterator_getLocalIStream" "', argument " "3"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg3 = static_cast< Ferris::ferris_ios::openmode >(val3); + try { + result = (*arg1)->getLocalIStream(*arg2,arg3); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getLocalIStream__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_istream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getLocalIStream(self,new_dn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getLocalIStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextIterator_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextIterator_getLocalIStream" "', argument " "2"" of type '" "std::string &""'"); + } + arg2 = reinterpret_cast< std::string * >(argp2); + try { + result = (*arg1)->getLocalIStream(*arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_istream(static_cast< const Ferris::fh_istream& >(result))), SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getLocalIStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__string, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getLocalIStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getLocalIStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_getLocalIStream'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_getIOStream__SWIG_0) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_getIOStream(self,m);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getIOStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_getIOStream" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + try { + result = (*arg1)->getIOStream(arg2); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getIOStream__SWIG_1) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + SwigValueWrapper< Ferris::Ferris_iostream< char,std::char_traits< char > > > result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getIOStream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getIOStream" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + try { + result = (*arg1)->getIOStream(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::AttributeNotWritable &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::AttributeNotWritable(static_cast< const Ferris::AttributeNotWritable& >(_e))),SWIGTYPE_p_Ferris__AttributeNotWritable,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(Ferris::CanNotGetStream &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::CanNotGetStream(static_cast< const Ferris::CanNotGetStream& >(_e))),SWIGTYPE_p_Ferris__CanNotGetStream,SWIG_POINTER_OWN)); SWIG_fail ; + } + catch(std::exception &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new std::exception(static_cast< const std::exception& >(_e))),SWIGTYPE_p_std__exception,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_iostream(static_cast< const Ferris::fh_iostream& >(result))), SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getIOStream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getIOStream__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_ContextIterator_getIOStream__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'ContextIterator_getIOStream'"); + XSRETURN(0); +} + + +XS(_wrap_ContextIterator_checkOpenModeSupported) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + Ferris::ferris_ios::openmode arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextIterator_checkOpenModeSupported(self,userm);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_checkOpenModeSupported" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContextIterator_checkOpenModeSupported" "', argument " "2"" of type '" "Ferris::ferris_ios::openmode""'"); + } + arg2 = static_cast< Ferris::ferris_ios::openmode >(val2); + result = (bool)(*arg1)->checkOpenModeSupported(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getSupportedOpenModes) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ferris_ios::openmode result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getSupportedOpenModes(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSupportedOpenModes" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::ferris_ios::openmode)(*arg1)->getSupportedOpenModes(); + ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getDirPath) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getDirPath(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getDirPath" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + try { + result = (*arg1)->getDirPath(); + } + catch(Ferris::FerrisParentNotSetError &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::FerrisParentNotSetError(static_cast< const Ferris::FerrisParentNotSetError& >(_e))),SWIGTYPE_p_Ferris__FerrisParentNotSetError,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getSubContextCount) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getSubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getSubContextCount" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (int)(*arg1)->getSubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_empty) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_empty(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_empty" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (bool)(*arg1)->empty(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_MedallionUpdated_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_MedallionUpdated_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_MedallionUpdated_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *) &(*arg1)->getNamingEvent_MedallionUpdated_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_Ferris__fh_context_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Changed_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Changed_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *) &(*arg1)->getNamingEvent_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Deleted_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Deleted_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Deleted_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *) &(*arg1)->getNamingEvent_Deleted_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Start_Execute_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Start_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Start_Execute_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *) &(*arg1)->getNamingEvent_Start_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Stop_Execute_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Stop_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Stop_Execute_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *) &(*arg1)->getNamingEvent_Stop_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Created_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Created_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Created_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *) &(*arg1)->getNamingEvent_Created_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Moved_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Moved_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Moved_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *) &(*arg1)->getNamingEvent_Moved_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Exists_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Exists_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Exists_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *) &(*arg1)->getNamingEvent_Exists_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Start_Reading_Context_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Start_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Start_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *) &(*arg1)->getNamingEvent_Start_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getNamingEvent_Stop_Reading_Context_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getNamingEvent_Stop_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getNamingEvent_Stop_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *) &(*arg1)->getNamingEvent_Stop_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextIterator_getContextEvent_Headers_Received_Sig) { + { + Ferris::ContextIterator *arg1 = (Ferris::ContextIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextIterator_getContextEvent_Headers_Received_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextIterator_getContextEvent_Headers_Received_Sig" "', argument " "1"" of type '" "Ferris::ContextIterator *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + result = (Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *) &(*arg1)->getContextEvent_Headers_Received_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap___sub__) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::ContextIterator::difference_type result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __sub__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__sub__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__sub__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__sub__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__sub__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (Ferris::ContextIterator::difference_type)Ferris::operator -((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___eq____SWIG_0) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __eq__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__eq__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator ==((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___lt__) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __lt__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lt__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lt__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator <((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___ne____SWIG_0) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __ne__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__ne__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator !=((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___gt__) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __gt__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__gt__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__gt__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator >((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___le__) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __le__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__le__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__le__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator <=((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___ge__) { + { + Ferris::ContextIterator *arg1 = 0 ; + Ferris::ContextIterator *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __ge__(x,y);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ge__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', argument " "1"" of type '" "Ferris::ContextIterator const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextIterator * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__ge__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', argument " "2"" of type '" "Ferris::ContextIterator const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextIterator * >(argp2); + result = (bool)Ferris::operator >=((Ferris::ContextIterator const &)*arg1,(Ferris::ContextIterator const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_0) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getIOErrorDescription(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = Ferris::getIOErrorDescription(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_1) { + { + Ferris::fh_ostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getIOErrorDescription(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_ostream * >(argp1); + result = Ferris::getIOErrorDescription(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_2) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getIOErrorDescription(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = Ferris::getIOErrorDescription(*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_3) { + { + Ferris::fh_istream *arg1 = 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::getIOErrorDescription(*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_4) { + { + Ferris::fh_ostream *arg1 = 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_ostream * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::getIOErrorDescription(*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_5) { + { + Ferris::fh_iostream *arg1 = 0 ; + Ferris::fh_context arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,c);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::getIOErrorDescription(*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_6) { + { + Ferris::fh_istream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,earl);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::getIOErrorDescription(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_7) { + { + Ferris::fh_ostream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,earl);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_ostream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::getIOErrorDescription(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription__SWIG_8) { + { + Ferris::fh_iostream *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getIOErrorDescription(ss,earl);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getIOErrorDescription" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::getIOErrorDescription(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getIOErrorDescription) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 9; + if (_rank == _rankm) goto dispatch; + } + } + check_9: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_2); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_3); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_4); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_5); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_6); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_7); return; + case 9: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getIOErrorDescription__SWIG_8); return; + } + } + + croak("No matching function for overloaded 'getIOErrorDescription'"); + XSRETURN(0); +} + + +XS(_wrap_haveIOError__SWIG_0) { + { + Ferris::fh_istream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: haveIOError(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_istream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_istream * >(argp1); + result = (bool)Ferris::haveIOError(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_haveIOError__SWIG_1) { + { + Ferris::fh_ostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: haveIOError(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_ostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_ostream * >(argp1); + result = (bool)Ferris::haveIOError(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_haveIOError__SWIG_2) { + { + Ferris::fh_iostream *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: haveIOError(ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "haveIOError" "', argument " "1"" of type '" "Ferris::fh_iostream &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_iostream * >(argp1); + result = (bool)Ferris::haveIOError(*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_haveIOError) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_haveIOError__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_haveIOError__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_haveIOError__SWIG_2); return; + } + } + + croak("No matching function for overloaded 'haveIOError'"); + XSRETURN(0); +} + + +XS(_wrap_saveFile__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: saveFile(parentURL,rdn_raw,byteContent,shouldMonsterName,overwrite);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "saveFile" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "saveFile" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::saveFile((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_saveFile__SWIG_1) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: saveFile(parentURL,rdn_raw,byteContent,shouldMonsterName);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "saveFile" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::saveFile((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_saveFile__SWIG_2) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: saveFile(parentURL,rdn_raw,byteContent);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saveFile" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::saveFile((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_saveFile) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_saveFile__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_saveFile__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_saveFile__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'saveFile'"); + XSRETURN(0); +} + + +XS(_wrap_getStrAttr__SWIG_0) { + { + Ferris::AttributeCollection *arg1 = (Ferris::AttributeCollection *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrAttr(c,rdn,def,getAllLines);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AttributeCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::AttributeCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::AttributeCollection * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_1) { + { + Ferris::AttributeCollection *arg1 = (Ferris::AttributeCollection *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrAttr(c,rdn,def);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__AttributeCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::AttributeCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::AttributeCollection * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::getStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_2) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: getStrAttr(c,rdn,def,getAllLines,throw_for_errors);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "getStrAttr" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::getStrAttr((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_3) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrAttr(c,rdn,def,getAllLines);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrAttr((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_4) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrAttr(c,rdn,def);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "1"" of type '" "Ferris::fh_context const &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::getStrAttr((Ferris::fh_context const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_5) { + { + std::string arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: getStrAttr(earl,rdn,def,getAllLines,throw_for_errors);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrAttr" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "getStrAttr" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::getStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_6) { + { + std::string arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrAttr(earl,rdn,def,getAllLines);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrAttr" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr__SWIG_7) { + { + std::string arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrAttr(earl,rdn,def);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrAttr" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::getStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrAttr) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__AttributeCollection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__AttributeCollection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_4); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_7); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_0); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_3); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_6); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_2); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrAttr__SWIG_5); return; + } + } + + croak("No matching function for overloaded 'getStrAttr'"); + XSRETURN(0); +} + + +XS(_wrap_setChild) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: setChild(c,rdn,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setChild" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setChild" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setChild" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setChild" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setChild" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setChild" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::setChild(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_setStrAttr__SWIG_0) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + bool arg6 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: setStrAttr(c,rdn,v,create,throw_for_errors,dontDelegateToOvermountContext);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "setStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "setStrAttr" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "setStrAttr" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + result = Ferris::setStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5,arg6); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_setStrAttr__SWIG_1) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: setStrAttr(c,rdn,v,create,throw_for_errors);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "setStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "setStrAttr" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::setStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_setStrAttr__SWIG_2) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: setStrAttr(c,rdn,v,create);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "setStrAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::setStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_setStrAttr__SWIG_3) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int res3 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: setStrAttr(c,rdn,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setStrAttr" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = Ferris::setStrAttr(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + if (SWIG_IsNewObj(res3)) delete arg3; + SWIG_croak_null(); + } +} + + +XS(_wrap_setStrAttr) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 6) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setStrAttr__SWIG_3); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setStrAttr__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setStrAttr__SWIG_1); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_setStrAttr__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'setStrAttr'"); + XSRETURN(0); +} + + +XS(_wrap_getTimeAttr__SWIG_0) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + time_t arg3 ; + bool arg4 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getTimeAttr(c,rdn,v,throw_for_errors);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getTimeAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getTimeAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getTimeAttr" "', argument " "3"" of type '" "time_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "3"" of type '" "time_t""'"); + } else { + arg3 = *(reinterpret_cast< time_t * >(argp3)); + } + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getTimeAttr" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getTimeAttr(arg1,(std::string const &)*arg2,arg3,arg4); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getTimeAttr__SWIG_1) { + { + Ferris::fh_context arg1 ; + std::string *arg2 = 0 ; + time_t arg3 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + time_t result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getTimeAttr(c,rdn,v);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getTimeAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getTimeAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_time_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getTimeAttr" "', argument " "3"" of type '" "time_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getTimeAttr" "', argument " "3"" of type '" "time_t""'"); + } else { + arg3 = *(reinterpret_cast< time_t * >(argp3)); + } + } + result = Ferris::getTimeAttr(arg1,(std::string const &)*arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new time_t(static_cast< const time_t& >(result))), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_getTimeAttr) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_time_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getTimeAttr__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getTimeAttr__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'getTimeAttr'"); + XSRETURN(0); +} + + +XS(_wrap_getStrSubCtx__SWIG_0) { + { + Ferris::fh_context arg1 ; + std::string arg2 ; + std::string arg3 ; + bool arg4 ; + bool arg5 ; + void *argp1 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: getStrSubCtx(c,subname,def,getAllLines,throw_for_errors);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrSubCtx" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "getStrSubCtx" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::getStrSubCtx(arg1,arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_1) { + { + Ferris::fh_context arg1 ; + std::string arg2 ; + std::string arg3 ; + bool arg4 ; + void *argp1 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrSubCtx(c,subname,def,getAllLines);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrSubCtx" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrSubCtx(arg1,arg2,arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_2) { + { + Ferris::fh_context arg1 ; + std::string arg2 ; + std::string arg3 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrSubCtx(c,subname,def);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::getStrSubCtx(arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_3) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + std::string arg3 ; + bool arg4 ; + bool arg5 ; + int res1 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: getStrSubCtx(earl,subname,def,getAllLines,throw_for_errors);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrSubCtx" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "getStrSubCtx" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_4) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + std::string arg3 ; + bool arg4 ; + int res1 = SWIG_OLDOBJ ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrSubCtx(earl,subname,def,getAllLines);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrSubCtx" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2,arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_5) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + std::string arg3 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrSubCtx(earl,subname,def);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "std::string""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_6) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + bool arg3 ; + bool arg4 ; + int res1 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: getStrSubCtx(earl,def,getAllLines,throw_for_errors);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "getStrSubCtx" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2,arg3,arg4); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_7) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + bool arg3 ; + int res1 = SWIG_OLDOBJ ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: getStrSubCtx(earl,def,getAllLines);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "getStrSubCtx" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2,arg3); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx__SWIG_8) { + { + std::string *arg1 = 0 ; + std::string arg2 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: getStrSubCtx(earl,def);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getStrSubCtx" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "getStrSubCtx" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::getStrSubCtx((std::string const &)*arg1,arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + SWIG_croak_null(); + } +} + + +XS(_wrap_getStrSubCtx) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_7; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 7; + if (_rank == _rankm) goto dispatch; + } + } + check_7: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_8; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 8; + if (_rank == _rankm) goto dispatch; + } + } + check_8: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_9; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 9; + if (_rank == _rankm) goto dispatch; + } + } + check_9: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_8); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_7); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_5); return; + case 5: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_1); return; + case 6: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_6); return; + case 7: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_4); return; + case 8: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_0); return; + case 9: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_getStrSubCtx__SWIG_3); return; + } + } + + croak("No matching function for overloaded 'getStrSubCtx'"); + XSRETURN(0); +} + + +XS(_wrap_new_CacheManager) { + { + int argvi = 0; + Ferris::CacheManager *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_CacheManager();"); + } + result = (Ferris::CacheManager *)new Ferris::CacheManager(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CacheManager, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_CacheManager) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_CacheManager(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CacheManager" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_dumpFreeListTo) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + SwigValueWrapper< Ferris::Ferris_ostream< char,std::char_traits< char > > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CacheManager_dumpFreeListTo(self,ss);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_dumpFreeListTo" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CacheManager_dumpFreeListTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CacheManager_dumpFreeListTo" "', argument " "2"" of type '" "Ferris::fh_ostream""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_ostream * >(argp2)); + } + } + (arg1)->dumpFreeListTo(arg2); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp__SWIG_0) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CacheManager_cleanUp(self,force);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_cleanUp" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CacheManager_cleanUp" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (int)(arg1)->cleanUp(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp__SWIG_1) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheManager_cleanUp(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_cleanUp" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + result = (int)(arg1)->cleanUp(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__CacheManager, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__CacheManager, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CacheManager_cleanUp__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CacheManager_cleanUp__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CacheManager_cleanUp'"); + XSRETURN(0); +} + + +XS(_wrap_CacheManager_shouldAutoCleanUp) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheManager_shouldAutoCleanUp(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_shouldAutoCleanUp" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + result = (bool)(arg1)->shouldAutoCleanUp(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_insideCleanupCall) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheManager_insideCleanupCall(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_insideCleanupCall" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + result = (bool)(arg1)->insideCleanupCall(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp_only_CreateMetaDataContext__SWIG_0) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CacheManager_cleanUp_only_CreateMetaDataContext(self,force);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_cleanUp_only_CreateMetaDataContext" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CacheManager_cleanUp_only_CreateMetaDataContext" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (int)(arg1)->cleanUp_only_CreateMetaDataContext(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp_only_CreateMetaDataContext__SWIG_1) { + { + Ferris::CacheManager *arg1 = (Ferris::CacheManager *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CacheManager_cleanUp_only_CreateMetaDataContext(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__CacheManager, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CacheManager_cleanUp_only_CreateMetaDataContext" "', argument " "1"" of type '" "Ferris::CacheManager *""'"); + } + arg1 = reinterpret_cast< Ferris::CacheManager * >(argp1); + result = (int)(arg1)->cleanUp_only_CreateMetaDataContext(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CacheManager_cleanUp_only_CreateMetaDataContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__CacheManager, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__CacheManager, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CacheManager_cleanUp_only_CreateMetaDataContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CacheManager_cleanUp_only_CreateMetaDataContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CacheManager_cleanUp_only_CreateMetaDataContext'"); + XSRETURN(0); +} + + +XS(_wrap_getCacheManager) { + { + int argvi = 0; + Ferris::CacheManager *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getCacheManager();"); + } + result = (Ferris::CacheManager *)Ferris::getCacheManager(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__CacheManager, 0 | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_DEBUG_dumpcl) { + { + std::string arg1 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: DEBUG_dumpcl(s);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "DEBUG_dumpcl" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + Ferris::DEBUG_dumpcl(arg1); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_DEBUG_dumpcl_to_file) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: DEBUG_dumpcl_to_file(filenamePrefix);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DEBUG_dumpcl_to_file" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DEBUG_dumpcl_to_file" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + Ferris::DEBUG_dumpcl_to_file((std::string const &)*arg1); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ContextCollection) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ContextCollection(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContextCollection" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_getSubContextNames) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::ContextCollection::SubContextNames_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextCollection_getSubContextNames(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_getSubContextNames" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + result = (Ferris::ContextCollection::SubContextNames_t *) &(arg1)->getSubContextNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_isSubContextBound) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextCollection_isSubContextBound(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_isSubContextBound" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextCollection_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextCollection_isSubContextBound" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = (bool)(arg1)->isSubContextBound((std::string const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_getSubContext) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: ContextCollection_getSubContext(self,rdn);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_getSubContext" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContextCollection_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContextCollection_getSubContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + try { + result = (arg1)->getSubContext((std::string const &)*arg2); + } + catch(Ferris::NoSuchSubContext &_e) { + sv_setsv(GvSV(PL_errgv), SWIG_NewPointerObj((new Ferris::NoSuchSubContext(static_cast< const Ferris::NoSuchSubContext& >(_e))),SWIGTYPE_p_Ferris__NoSuchSubContext,SWIG_POINTER_OWN)); SWIG_fail ; + } + + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_SubContextCount) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextCollection_SubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_SubContextCount" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + result = (int)(arg1)->SubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_getSubContextCount) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextCollection_getSubContextCount(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_getSubContextCount" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + result = (int)(arg1)->getSubContextCount(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ContextCollection_empty) { + { + Ferris::ContextCollection *arg1 = (Ferris::ContextCollection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ContextCollection_empty(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__ContextCollection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContextCollection_empty" "', argument " "1"" of type '" "Ferris::ContextCollection *""'"); + } + arg1 = reinterpret_cast< Ferris::ContextCollection * >(argp1); + result = (bool)(arg1)->empty(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_MutableCollectionEvents) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_MutableCollectionEvents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MutableCollectionEvents" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_MedallionUpdated_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_MedallionUpdated_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_MedallionUpdated_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *) &(arg1)->getNamingEvent_MedallionUpdated_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_Ferris__fh_context_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Changed_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Changed_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Changed_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *) &(arg1)->getNamingEvent_Changed_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Deleted_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Deleted_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Deleted_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *) &(arg1)->getNamingEvent_Deleted_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Start_Execute_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Start_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Start_Execute_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *) &(arg1)->getNamingEvent_Start_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Stop_Execute_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Stop_Execute_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Stop_Execute_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *) &(arg1)->getNamingEvent_Stop_Execute_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Created_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Created_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Created_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *) &(arg1)->getNamingEvent_Created_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Moved_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Moved_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Moved_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *) &(arg1)->getNamingEvent_Moved_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Exists_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Exists_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Exists_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *) &(arg1)->getNamingEvent_Exists_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Start_Reading_Context_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Start_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Start_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *) &(arg1)->getNamingEvent_Start_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getNamingEvent_Stop_Reading_Context_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getNamingEvent_Stop_Reading_Context_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getNamingEvent_Stop_Reading_Context_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *) &(arg1)->getNamingEvent_Stop_Reading_Context_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MutableCollectionEvents_getContextEvent_Headers_Received_Sig) { + { + Ferris::MutableCollectionEvents *arg1 = (Ferris::MutableCollectionEvents *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MutableCollectionEvents_getContextEvent_Headers_Received_Sig(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__MutableCollectionEvents, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MutableCollectionEvents_getContextEvent_Headers_Received_Sig" "', argument " "1"" of type '" "Ferris::MutableCollectionEvents *""'"); + } + arg1 = reinterpret_cast< Ferris::MutableCollectionEvents * >(argp1); + result = (Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *) &(arg1)->getContextEvent_Headers_Received_Sig(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap___eq____SWIG_1) { + { + Ferris::ContextSetCompare *arg1 = 0 ; + Ferris::ContextSetCompare *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __eq__(a,b);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextSetCompare, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Ferris::ContextSetCompare const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "1"" of type '" "Ferris::ContextSetCompare const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextSetCompare * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextSetCompare, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__eq__" "', argument " "2"" of type '" "Ferris::ContextSetCompare const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Ferris::ContextSetCompare const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextSetCompare * >(argp2); + result = (bool)Ferris::operator ==((Ferris::ContextSetCompare const &)*arg1,(Ferris::ContextSetCompare const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___eq__) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextSetCompare, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__ContextSetCompare, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap___eq____SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap___eq____SWIG_1); return; + } + } + + croak("No matching function for overloaded '__eq__'"); + XSRETURN(0); +} + + +XS(_wrap___ne____SWIG_1) { + { + Ferris::ContextSetCompare *arg1 = 0 ; + Ferris::ContextSetCompare *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: __ne__(a,b);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__ContextSetCompare, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Ferris::ContextSetCompare const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "1"" of type '" "Ferris::ContextSetCompare const &""'"); + } + arg1 = reinterpret_cast< Ferris::ContextSetCompare * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__ContextSetCompare, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__ne__" "', argument " "2"" of type '" "Ferris::ContextSetCompare const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Ferris::ContextSetCompare const &""'"); + } + arg2 = reinterpret_cast< Ferris::ContextSetCompare * >(argp2); + result = (bool)Ferris::operator !=((Ferris::ContextSetCompare const &)*arg1,(Ferris::ContextSetCompare const &)*arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap___ne__) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__ContextIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__ContextSetCompare, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__ContextSetCompare, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap___ne____SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap___ne____SWIG_1); return; + } + } + + croak("No matching function for overloaded '__ne__'"); + XSRETURN(0); +} + + +XS(_wrap_ReverseSortStringOrder) { + { + std::string arg1 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ReverseSortStringOrder(s);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ReverseSortStringOrder" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Factory::ReverseSortStringOrder(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeSorter) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_sorter result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: MakeSorter(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeSorter" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeSorter" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::Factory::MakeSorter((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_sorter(static_cast< const Ferris::fh_sorter& >(result))), SWIGTYPE_p_Ferris__fh_sorter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeSortedContext__SWIG_0) { + { + Ferris::fh_context *arg1 = 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeSortedContext(ctx,s);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeSortedContext" "', argument " "1"" of type '" "Ferris::fh_context &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeSortedContext" "', argument " "1"" of type '" "Ferris::fh_context &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MakeSortedContext" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeSortedContext" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::Factory::MakeSortedContext(*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeSortedContext__SWIG_1) { + { + Ferris::fh_context *arg1 = 0 ; + Ferris::fh_sorter *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: MakeSortedContext(ctx,f);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MakeSortedContext" "', argument " "1"" of type '" "Ferris::fh_context &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeSortedContext" "', argument " "1"" of type '" "Ferris::fh_context &""'"); + } + arg1 = reinterpret_cast< Ferris::fh_context * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_sorter, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MakeSortedContext" "', argument " "2"" of type '" "Ferris::fh_sorter &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MakeSortedContext" "', argument " "2"" of type '" "Ferris::fh_sorter &""'"); + } + arg2 = reinterpret_cast< Ferris::fh_sorter * >(argp2); + result = Ferris::Factory::MakeSortedContext(*arg1,*arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_MakeSortedContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Ferris__fh_sorter, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ferris__fh_context, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeSortedContext__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MakeSortedContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'MakeSortedContext'"); + XSRETURN(0); +} + + +XS(_wrap_adjustEANameForSorting) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: adjustEANameForSorting(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adjustEANameForSorting" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "adjustEANameForSorting" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::adjustEANameForSorting((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_SL_SubCreate_alwaysThrow) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: SL_SubCreate_alwaysThrow(c,md);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SL_SubCreate_alwaysThrow" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SL_SubCreate_alwaysThrow" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SL_SubCreate_alwaysThrow" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SL_SubCreate_alwaysThrow" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::SL_SubCreate_alwaysThrow(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_SL_SubCreate_dir) { + { + Ferris::fh_context arg1 ; + Ferris::fh_context arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: SL_SubCreate_dir(c,md);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SL_SubCreate_dir" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SL_SubCreate_dir" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SL_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SL_SubCreate_dir" "', argument " "2"" of type '" "Ferris::fh_context""'"); + } else { + arg2 = *(reinterpret_cast< Ferris::fh_context * >(argp2)); + } + } + result = Ferris::SL_SubCreate_dir(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_isTrue) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isTrue(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isTrue" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isTrue" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (bool)Ferris::isTrue((std::string const &)*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_isFalse) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isFalse(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isFalse" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isFalse" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (bool)Ferris::isFalse((std::string const &)*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_isNumber) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: isNumber(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isNumber" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isNumber" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (bool)Ferris::isNumber((std::string const &)*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_getCreateHistory) { + { + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getCreateHistory();"); + } + result = Ferris::Factory::getCreateHistory(); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_EventPending) { + { + int argvi = 0; + gboolean result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: EventPending();"); + } + result = Ferris::Main::EventPending(); + ST(argvi) = SWIG_NewPointerObj((new gboolean(static_cast< const gboolean& >(result))), SWIGTYPE_p_gboolean, SWIG_POINTER_OWN | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_processEvent) { + { + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: processEvent();"); + } + Ferris::Main::processEvent(); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_processAllPendingEvents) { + { + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: processAllPendingEvents();"); + } + Ferris::Main::processAllPendingEvents(); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_mainLoop) { + { + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: mainLoop();"); + } + Ferris::Main::mainLoop(); + ST(argvi) = sv_newmortal(); + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_SingleShot) { + { + int argvi = 0; + Ferris::Util::SingleShot *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_SingleShot();"); + } + result = (Ferris::Util::SingleShot *)new Ferris::Util::SingleShot(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ferris__Util__SingleShot, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_SingleShot___call__) { + { + Ferris::Util::SingleShot *arg1 = (Ferris::Util::SingleShot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: SingleShot___call__(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Util__SingleShot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SingleShot___call__" "', argument " "1"" of type '" "Ferris::Util::SingleShot *""'"); + } + arg1 = reinterpret_cast< Ferris::Util::SingleShot * >(argp1); + result = (bool)(arg1)->operator ()(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_SingleShot_value) { + { + Ferris::Util::SingleShot *arg1 = (Ferris::Util::SingleShot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: SingleShot_value(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ferris__Util__SingleShot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SingleShot_value" "', argument " "1"" of type '" "Ferris::Util::SingleShot *""'"); + } + arg1 = reinterpret_cast< Ferris::Util::SingleShot * >(argp1); + result = (bool)(arg1)->value(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_getMimeName) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: getMimeName(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getMimeName" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getMimeName" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::getMimeName(arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_toContextIterator) { + { + Ferris::fh_context arg1 ; + void *argp1 ; + int res1 = 0 ; + int argvi = 0; + Ferris::Context::iterator result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: toContextIterator(c);"); + } + { + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ferris__fh_context, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "toContextIterator" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "toContextIterator" "', argument " "1"" of type '" "Ferris::fh_context""'"); + } else { + arg1 = *(reinterpret_cast< Ferris::fh_context * >(argp1)); + } + } + result = Ferris::toContextIterator(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::Context::iterator(static_cast< const Ferris::Context::iterator& >(result))), SWIGTYPE_p_Ferris__ContextIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_addEAToSet) { + { + std::set< std::string > *arg1 = 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: addEAToSet(theSet,commaSepEA);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__setT_std__string_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "addEAToSet" "', argument " "1"" of type '" "std::set< std::string > &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "addEAToSet" "', argument " "1"" of type '" "std::set< std::string > &""'"); + } + arg1 = reinterpret_cast< std::set< std::string > * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "addEAToSet" "', argument " "2"" of type '" "std::string const""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + Ferris::addEAToSet(*arg1,arg2); + ST(argvi) = sv_newmortal(); + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ExecuteQueryAgainstMyRDF) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ExecuteQueryAgainstMyRDF(sparql);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExecuteQueryAgainstMyRDF" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExecuteQueryAgainstMyRDF" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::ExecuteQueryAgainstMyRDF((std::string const &)*arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_getStaticLinkedRootContextNames) { + { + int argvi = 0; + Ferris::stringset_t *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: getStaticLinkedRootContextNames();"); + } + result = (Ferris::stringset_t *) &Ferris::ImplementationDetail::getStaticLinkedRootContextNames(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_std__string_t, 0 | 0); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_appendToStaticLinkedRootContextNames) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: appendToStaticLinkedRootContextNames(s);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "appendToStaticLinkedRootContextNames" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "appendToStaticLinkedRootContextNames" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (bool)Ferris::ImplementationDetail::appendToStaticLinkedRootContextNames((std::string const &)*arg1); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_ParseOnly_FERRIS_POPT_OPTIONS) { + { + std::string *arg1 = 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ParseOnly_FERRIS_POPT_OPTIONS(PROGRAM_NAME,argc,argv);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseOnly_FERRIS_POPT_OPTIONS" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParseOnly_FERRIS_POPT_OPTIONS" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParseOnly_FERRIS_POPT_OPTIONS" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_p_char, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParseOnly_FERRIS_POPT_OPTIONS" "', argument " "3"" of type '" "char const **""'"); + } + arg3 = reinterpret_cast< char ** >(argp3); + Ferris::ParseOnly_FERRIS_POPT_OPTIONS((std::string const &)*arg1,arg2,(char const **)arg3); + ST(argvi) = sv_newmortal(); + if (SWIG_IsNewObj(res1)) delete arg1; + + + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_tryToUseOutOfProcessMetadataServer) { + { + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: tryToUseOutOfProcessMetadataServer();"); + } + result = (bool)Ferris::tryToUseOutOfProcessMetadataServer(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_makeFerrisPluginPath__SWIG_0) { + { + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: makeFerrisPluginPath(dir,libname);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "makeFerrisPluginPath" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "makeFerrisPluginPath" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "makeFerrisPluginPath" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "makeFerrisPluginPath" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + result = Ferris::makeFerrisPluginPath((std::string const &)*arg1,(std::string const &)*arg2); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + SWIG_croak_null(); + } +} + + +XS(_wrap_makeFerrisPluginPath__SWIG_1) { + { + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + int argvi = 0; + std::string result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: makeFerrisPluginPath(dir);"); + } + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "makeFerrisPluginPath" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "makeFerrisPluginPath" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = Ferris::makeFerrisPluginPath((std::string const &)*arg1); + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ; + if (SWIG_IsNewObj(res1)) delete arg1; + XSRETURN(argvi); + fail: + if (SWIG_IsNewObj(res1)) delete arg1; + SWIG_croak_null(); + } +} + + +XS(_wrap_makeFerrisPluginPath) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_makeFerrisPluginPath__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_makeFerrisPluginPath__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'makeFerrisPluginPath'"); + XSRETURN(0); +} + + +XS(_wrap_acquireContext__SWIG_0) { + { + std::string arg1 ; + int arg2 ; + bool arg3 ; + int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: acquireContext(path,mode,isDir);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "acquireContext" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "acquireContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "acquireContext" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + result = Ferris::Shell::acquireContext(arg1,arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_acquireContext__SWIG_1) { + { + std::string arg1 ; + int arg2 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: acquireContext(path,mode);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "acquireContext" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "acquireContext" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = Ferris::Shell::acquireContext(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_acquireContext__SWIG_2) { + { + std::string arg1 ; + int argvi = 0; + Ferris::fh_context result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: acquireContext(path);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "acquireContext" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = Ferris::Shell::acquireContext(arg1); + ST(argvi) = SWIG_NewPointerObj((new Ferris::fh_context(static_cast< const Ferris::fh_context& >(result))), SWIGTYPE_p_Ferris__fh_context, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_acquireContext) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_acquireContext__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_acquireContext__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_acquireContext__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'acquireContext'"); + XSRETURN(0); +} + + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_Ferris__ColdEmblemTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *)(Ferris::Emblem *) ((Ferris::ColdEmblem *) x)); +} +static void *_p_Ferris__EmblemTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Emblem *) x)); +} +static void *_p_Ferris__TimesTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Times *) x)); +} +static void *_p_Ferris__AttributeCollectionTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *)(Ferris::Versioned *) ((Ferris::AttributeCollection *) x)); +} +static void *_p_Ferris__AttributeProxyTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::AttributeProxy *) x)); +} +static void *_p_Ferris__AI__AgentTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::AI::Agent *) x)); +} +static void *_p_Ferris__RunnerTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Runner *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (Ferris::EA_Atom_ReadWrite *)(Ferris::EA_Atom_ReadWrite_OpenModeCached *) ((Ferris::EA_Atom_ReadWrite_Contents *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_OpenModeCachedTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (Ferris::EA_Atom_ReadWrite *) ((Ferris::EA_Atom_ReadWrite_OpenModeCached *) x)); +} +static void *_p_Ferris__MedallionBeliefTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::MedallionBelief *) x)); +} +static void *_p_Ferris__PersonalityTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *)(Ferris::CacheHandlable *) ((Ferris::Personality *) x)); +} +static void *_p_Ferris__Time__BenchmarkTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Time::Benchmark *) x)); +} +static void *_p_Ferris__VersionedTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Versioned *) x)); +} +static void *_p_Ferris__EtagereTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::Etagere *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_PassedInStreamTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) ((Ferris::EA_Atom_ReadWrite_PassedInStream *) x)); +} +static void *_p_Ferris__CacheHandlableTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::CacheHandlable *) x)); +} +static void *_p_Ferris__HandlableTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *) ((Ferris::Handlable *) x)); +} +static void *_p_FerrisLoki__HandlableTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) ((FerrisLoki::Handlable *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWriteTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) ((Ferris::EA_Atom_ReadWrite *) x)); +} +static void *_p_Ferris__MedallionTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *)(Ferris::CacheHandlable *) ((Ferris::Medallion *) x)); +} +static void *_p_Ferris__ContextIteratorTo_p_sigc__trackable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((sigc::trackable *) (FerrisLoki::Handlable *)(Ferris::Handlable *) ((Ferris::ContextIterator *) x)); +} +static void *_p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__CanNotReadContext(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CanNotReadContext *) ((Ferris::CanNotReadContextPcctsParseFailed *) x)); +} +static void *_p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__CanNotReadContext(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CanNotReadContext *) ((Ferris::CanNotMonitorDirWithFAM *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisNotSupportedInThisContext(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateSubContextNotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisNotSupportedInThisContext(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateAttributeNotSupported *) x)); +} +static void *_p_Ferris__QuotaStorageFullTo_p_Ferris__StorageFull(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::StorageFull *) ((Ferris::QuotaStorageFull *) x)); +} +static void *_p_Ferris__AttributeCollectionTo_p_Ferris__Versioned(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Versioned *) ((Ferris::AttributeCollection *) x)); +} +static void *_p_Ferris__EA_Atom_ReadOnly_PassedInStreamTo_p_Ferris__EA_Atom_ReadOnly(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom_ReadOnly *) ((Ferris::EA_Atom_ReadOnly_PassedInStream *) x)); +} +static void *_p_Ferris__NoSuchUserTo_p_Ferris__NoSuchObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::NoSuchObject *) ((Ferris::NoSuchUser *) x)); +} +static void *_p_Ferris__NoSuchGroupTo_p_Ferris__NoSuchObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::NoSuchObject *) ((Ferris::NoSuchGroup *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_OpenModeCachedTo_p_Ferris__EA_Atom_ReadWrite(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom_ReadWrite *) ((Ferris::EA_Atom_ReadWrite_OpenModeCached *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_Ferris__EA_Atom_ReadWrite(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom_ReadWrite *) (Ferris::EA_Atom_ReadWrite_OpenModeCached *) ((Ferris::EA_Atom_ReadWrite_Contents *) x)); +} +static void *_p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__BackupException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::BackupException *) ((Ferris::BackupNameWouldBeTooLong *) x)); +} +static void *_p_Ferris__UnknownBackupModeTo_p_Ferris__BackupException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::BackupException *) ((Ferris::UnknownBackupMode *) x)); +} +static void *_p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisGLibCException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisGLibCException *) ((Ferris::FerrisStatException *) x)); +} +static void *_p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisGLibCException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisGLibCException *) ((Ferris::FerrisSetCWDException *) x)); +} +static void *_p_Ferris__UnspoortedBlockSizeTo_p_Ferris__FerrisStreamException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisStreamException *) ((Ferris::UnspoortedBlockSize *) x)); +} +static void *_p_Ferris__CreateFIFOTo_p_Ferris__FerrisStreamException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisStreamException *) ((Ferris::CreateFIFO *) x)); +} +static void *_p_Ferris__MalformedURLTo_p_Ferris__FerrisStreamException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisStreamException *) ((Ferris::MalformedURL *) x)); +} +static void *_p_Ferris__Db4KeyNotFoundTo_p_Ferris__Db4Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Db4Exception *) ((Ferris::Db4KeyNotFound *) x)); +} +static void *_p_Ferris__eetKeyNotFoundTo_p_Ferris__Db4Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Db4Exception *) ((Ferris::eetKeyNotFound *) x)); +} +static void *_p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__CompressionException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CompressionException *) ((Ferris::CompressionAlgoNotFoundException *) x)); +} +static void *_p_Ferris__FullTextIndexExceptionTo_p_Ferris__IndexException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::IndexException *) ((Ferris::FullTextIndexException *) x)); +} +static void *_p_Ferris__EAIndexExceptionTo_p_Ferris__IndexException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::IndexException *) ((Ferris::EAIndexException *) x)); +} +static void *_p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__SchemaException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::SchemaException *) ((Ferris::SchemaNotFoundException *) x)); +} +static void *_p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__EmblemException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EmblemException *) ((Ferris::EmblemNotFoundException *) x)); +} +static void *_p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__EmblemException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EmblemException *) ((Ferris::CanNotAddEmblemException *) x)); +} +static void *_p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__AgentException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::AgentException *) ((Ferris::AgentAlreadyExistsException *) x)); +} +static void *_p_Ferris__NoSuchAgentExceptionTo_p_Ferris__AgentException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::AgentException *) ((Ferris::NoSuchAgentException *) x)); +} +static void *_p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__AgentException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::AgentException *) ((Ferris::AgentOnlyHandlesOneEmblemException *) x)); +} +static void *_p_Ferris__DBusConnectionExceptionTo_p_Ferris__DBusException(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::DBusException *) ((Ferris::DBusConnectionException *) x)); +} +static void *_p_Ferris__XMLBaseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::XMLBase *) x)); +} +static void *_p_Ferris__RenameFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::RenameFailed *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdateFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::getIOStreamCloseUpdateFailed *) x)); +} +static void *_p_Ferris__CurlPerformFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlPerformFailed *) x)); +} +static void *_p_Ferris__FerrisImageSaveFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageSaveFailed *) x)); +} +static void *_p_Ferris__CopyFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CopyFailed *) x)); +} +static void *_p_Ferris__RemoveFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::RemoveFailed *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateAttributeFailed *) x)); +} +static void *_p_Ferris__CanNotReadContextPcctsParseFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CanNotReadContext *) ((Ferris::CanNotReadContextPcctsParseFailed *) x)); +} +static void *_p_Ferris__SubContextAlreadyInUseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::SubContextAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeAlreadyInUseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeNotWritableTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeNotWritable *) x)); +} +static void *_p_Ferris__BadSignatureTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::BadSignature *) x)); +} +static void *_p_Ferris__GPhoto2To_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::GPhoto2 *) x)); +} +static void *_p_Ferris__XMLFatalErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::XMLFatalError *) x)); +} +static void *_p_Ferris__FerrisInternalErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisInternalError *) x)); +} +static void *_p_Ferris__BadParamTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::BadParam *) x)); +} +static void *_p_Ferris__FerrisVFSExceptionBaseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *) ((Ferris::FerrisVFSExceptionBase *) x)); +} +static void *_p_Ferris__FerrisExceptionBaseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) ((Ferris::FerrisExceptionBase *) x)); +} +static void *_p_Ferris__CryptoBaseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CryptoBase *) x)); +} +static void *_p_Ferris__FerrisWaitTimedOutTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisWaitTimedOut *) x)); +} +static void *_p_Ferris__AccessDeniedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::AccessDenied *) x)); +} +static void *_p_Ferris__CanNotDeleteTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDelete *) x)); +} +static void *_p_Ferris__BackupNameWouldBeTooLongTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::BackupException *) ((Ferris::BackupNameWouldBeTooLong *) x)); +} +static void *_p_Ferris__CanNotMonitorDirWithFAMTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CanNotReadContext *) ((Ferris::CanNotMonitorDirWithFAM *) x)); +} +static void *_p_Ferris__CurlStateErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStateError *) x)); +} +static void *_p_Ferris__NoSuchGroupTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::NoSuchObject *) ((Ferris::NoSuchGroup *) x)); +} +static void *_p_Ferris__UnknownBackupModeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::BackupException *) ((Ferris::UnknownBackupMode *) x)); +} +static void *_p_Ferris__NoSuchContextClassTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchContextClass *) x)); +} +static void *_p_Ferris__FerrisParentNotSetErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisInternalError *) ((Ferris::FerrisParentNotSetError *) x)); +} +static void *_p_Ferris__GenericErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::GenericError *) x)); +} +static void *_p_Ferris__FileClipboardTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FileClipboard *) x)); +} +static void *_p_Ferris__FerrisCurlServerNameNotFoundTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCurlServerNameNotFound *) x)); +} +static void *_p_Ferris__FerrisSqlServerNameNotFoundTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisSqlServerNameNotFound *) x)); +} +static void *_p_Ferris__ObjectExistsTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::ObjectExists *) x)); +} +static void *_p_Ferris__ContextExistsTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::ObjectExists *) ((Ferris::ContextExists *) x)); +} +static void *_p_Ferris__Db4KeyNotFoundTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::Db4Exception *) ((Ferris::Db4KeyNotFound *) x)); +} +static void *_p_Ferris__eetKeyNotFoundTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::Db4Exception *) ((Ferris::eetKeyNotFound *) x)); +} +static void *_p_Ferris__DesktopFileKeyNotFoundTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::DesktopFileKeyNotFound *) x)); +} +static void *_p_Ferris__CursorExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CursorException *) x)); +} +static void *_p_Ferris__DVDReadExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::DVDReadException *) x)); +} +static void *_p_Ferris__BackupExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::BackupException *) x)); +} +static void *_p_Ferris__SocketOptionsExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::SocketOptionsException *) x)); +} +static void *_p_Ferris__FerrisSetCWDExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisGLibCException *) ((Ferris::FerrisSetCWDException *) x)); +} +static void *_p_Ferris__FerrisStatExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisGLibCException *) ((Ferris::FerrisStatException *) x)); +} +static void *_p_Ferris__FerrisGLibCExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisGLibCException *) x)); +} +static void *_p_Ferris__FerrisStreamExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *) ((Ferris::FerrisStreamException *) x)); +} +static void *_p_Ferris__UnknownConfigLocationTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::UnknownConfigLocation *) x)); +} +static void *_p_Ferris__Db4ExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::Db4Exception *) x)); +} +static void *_p_Ferris__eetExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::eetException *) x)); +} +static void *_p_Ferris__GdbmExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::GdbmException *) x)); +} +static void *_p_Ferris__tdbExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::tdbException *) x)); +} +static void *_p_Ferris__InvalidSortSpecificationTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidSortSpecification *) x)); +} +static void *_p_Ferris__LDAPExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::LDAPException *) x)); +} +static void *_p_Ferris__CompressionExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CompressionException *) x)); +} +static void *_p_Ferris__CompressionAlgoNotFoundExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CompressionException *) ((Ferris::CompressionAlgoNotFoundException *) x)); +} +static void *_p_Ferris__IndexExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::IndexException *) x)); +} +static void *_p_Ferris__FullTextIndexExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::IndexException *) ((Ferris::FullTextIndexException *) x)); +} +static void *_p_Ferris__EAIndexExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::IndexException *) ((Ferris::EAIndexException *) x)); +} +static void *_p_Ferris__SchemaExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::SchemaException *) x)); +} +static void *_p_Ferris__SchemaNotFoundExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::SchemaException *) ((Ferris::SchemaNotFoundException *) x)); +} +static void *_p_Ferris__MedallionExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::MedallionException *) x)); +} +static void *_p_Ferris__EtagereExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::EtagereException *) x)); +} +static void *_p_Ferris__EmblemExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::EmblemException *) x)); +} +static void *_p_Ferris__EmblemNotFoundExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::EmblemException *) ((Ferris::EmblemNotFoundException *) x)); +} +static void *_p_Ferris__CanNotAddEmblemExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::EmblemException *) ((Ferris::CanNotAddEmblemException *) x)); +} +static void *_p_Ferris__NoSuchPersonalityExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchPersonalityException *) x)); +} +static void *_p_Ferris__NoSuchBeliefExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchBeliefException *) x)); +} +static void *_p_Ferris__AgentExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::AgentException *) x)); +} +static void *_p_Ferris__AgentAlreadyExistsExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::AgentAlreadyExistsException *) x)); +} +static void *_p_Ferris__NoSuchAgentExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::NoSuchAgentException *) x)); +} +static void *_p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::AgentOnlyHandlesOneEmblemException *) x)); +} +static void *_p_Ferris__dbXMLExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::dbXMLException *) x)); +} +static void *_p_Ferris__KeylistExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::KeylistException *) x)); +} +static void *_p_Ferris__DBusExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::DBusException *) x)); +} +static void *_p_Ferris__DBusConnectionExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::DBusException *) ((Ferris::DBusConnectionException *) x)); +} +static void *_p_Ferris__WebPhotoExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::WebPhotoException *) x)); +} +static void *_p_Ferris__SQLiteExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::SQLiteException *) x)); +} +static void *_p_Ferris__FerrisHALExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisHALException *) x)); +} +static void *_p_Ferris__DTDCreationFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::DTDCreationFailed *) x)); +} +static void *_p_Ferris__CurlEasyInitFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlEasyInitFailed *) x)); +} +static void *_p_Ferris__CurlStaticInitFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStaticInitFailed *) x)); +} +static void *_p_Ferris__FerrisStreamLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisStreamLoadFailed *) x)); +} +static void *_p_Ferris__GModuleOpenFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::GModuleOpenFailed *) x)); +} +static void *_p_Ferris__FerrisImlib2ImageLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisImlib2ImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisGIMPImageLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisGIMPImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisJPEGImageLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisJPEGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisPNGImageLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisPNGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisImageLoadFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageLoadFailed *) x)); +} +static void *_p_Ferris__RootContextCreationFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::RootContextCreationFailed *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateSubContextFailed *) x)); +} +static void *_p_Ferris__GPGMEInitFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::GPGMEInitFailed *) x)); +} +static void *_p_Ferris__XMPPacketScanFailedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::XMPBase *) ((Ferris::XMPPacketScanFailed *) x)); +} +static void *_p_Ferris__RelativeTimeParsingTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::RelativeTimeParsing *) x)); +} +static void *_p_Ferris__BadlyFormedTimeStringTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::BadlyFormedTime *) ((Ferris::BadlyFormedTimeString *) x)); +} +static void *_p_Ferris__NoSuchUserTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::NoSuchObject *) ((Ferris::NoSuchUser *) x)); +} +static void *_p_Ferris__InvalidModeStringTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidModeString *) x)); +} +static void *_p_Ferris__XMPBaseTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::XMPBase *) x)); +} +static void *_p_Ferris__FerrisNotReadableAsContextTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisNotReadableAsContext *) x)); +} +static void *_p_Ferris__FerrisNotSupportedInThisContextTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *) ((Ferris::FerrisNotSupportedInThisContext *) x)); +} +static void *_p_Ferris__NoSuchSubContextTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchSubContext *) x)); +} +static void *_p_Ferris__CanNotReadContextTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotReadContext *) x)); +} +static void *_p_Ferris__NoOpenWithContextTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoOpenWithContext *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::getIOStreamCloseUpdateFailed *) ((Ferris::getIOStreamCloseUpdatePermissionDenied *) x)); +} +static void *_p_Ferris__QuotaStorageFullTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::StorageFull *) ((Ferris::QuotaStorageFull *) x)); +} +static void *_p_Ferris__StorageFullTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::StorageFull *) x)); +} +static void *_p_Ferris__ParseErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::ParseError *) x)); +} +static void *_p_Ferris__XMLParseErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::XMLParseError *) x)); +} +static void *_p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisInternalError *) ((Ferris::FerrisCanNotGetScriptNameError *) x)); +} +static void *_p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDereferenceDanglingSoftLink *) x)); +} +static void *_p_Ferris__ProgramSpawnTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::ProgramSpawn *) x)); +} +static void *_p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCanNotCreateLeafOfLeaf *) x)); +} +static void *_p_Ferris__NoSuchObjectTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchObject *) x)); +} +static void *_p_Ferris__CanNotGetStreamTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotGetStream *) x)); +} +static void *_p_Ferris__ContentNotModifiedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::ContentNotModified *) x)); +} +static void *_p_Ferris__BranchFileSystemTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::BranchFileSystem *) x)); +} +static void *_p_Ferris__NotSupportedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextNotSupportedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateSubContextNotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeNotSupportedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateAttributeNotSupported *) x)); +} +static void *_p_Ferris__SyntaxErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::SyntaxError *) x)); +} +static void *_p_Ferris__FFilterSyntaxErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::FFilterSyntaxError *) x)); +} +static void *_p_Ferris__FulltextQuerySyntaxErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::FulltextQuerySyntaxError *) x)); +} +static void *_p_Ferris__URLDecodeSyntaxErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::URLDecodeSyntaxError *) x)); +} +static void *_p_Ferris__OpenActionIsNotDefinedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::OpenActionIsNotDefined *) x)); +} +static void *_p_Ferris__FerrisOutOfMemoryTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisOutOfMemory *) x)); +} +static void *_p_Ferris__CreateFIFOTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisStreamException *) ((Ferris::CreateFIFO *) x)); +} +static void *_p_Ferris__ChildNotRunningTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::ChildNotRunning *) x)); +} +static void *_p_Ferris__UnspoortedBlockSizeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisStreamException *) ((Ferris::UnspoortedBlockSize *) x)); +} +static void *_p_Ferris__CanNotAddExternalAttributeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotAddExternalAttribute *) x)); +} +static void *_p_Ferris__NoSuchAttributeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchAttribute *) x)); +} +static void *_p_Ferris__MalformedURLTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisStreamException *) ((Ferris::MalformedURL *) x)); +} +static void *_p_Ferris__BadlyFormedTimeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((std::exception *) (Ferris::FerrisExceptionBase *)(Ferris::FerrisVFSExceptionBase *) ((Ferris::BadlyFormedTime *) x)); +} +static void *_p_Ferris__XMLBaseTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::XMLBase *) x)); +} +static void *_p_Ferris__RenameFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::RenameFailed *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdateFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::getIOStreamCloseUpdateFailed *) x)); +} +static void *_p_Ferris__CurlPerformFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlPerformFailed *) x)); +} +static void *_p_Ferris__CopyFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CopyFailed *) x)); +} +static void *_p_Ferris__RemoveFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::RemoveFailed *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateAttributeFailed *) x)); +} +static void *_p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CanNotReadContext *) ((Ferris::CanNotReadContextPcctsParseFailed *) x)); +} +static void *_p_Ferris__FerrisImageSaveFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageSaveFailed *) x)); +} +static void *_p_Ferris__SubContextAlreadyInUseTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::SubContextAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeAlreadyInUseTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeNotWritableTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeNotWritable *) x)); +} +static void *_p_Ferris__BadSignatureTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CryptoBase *) ((Ferris::BadSignature *) x)); +} +static void *_p_Ferris__GPhoto2To_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::GPhoto2 *) x)); +} +static void *_p_Ferris__XMLFatalErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::XMLBase *) ((Ferris::XMLFatalError *) x)); +} +static void *_p_Ferris__FerrisInternalErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisInternalError *) x)); +} +static void *_p_Ferris__BadParamTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::BadParam *) x)); +} +static void *_p_Ferris__CryptoBaseTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CryptoBase *) x)); +} +static void *_p_Ferris__FerrisWaitTimedOutTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisWaitTimedOut *) x)); +} +static void *_p_Ferris__AccessDeniedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::AccessDenied *) x)); +} +static void *_p_Ferris__CanNotDeleteTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDelete *) x)); +} +static void *_p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::BackupException *) ((Ferris::BackupNameWouldBeTooLong *) x)); +} +static void *_p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CanNotReadContext *) ((Ferris::CanNotMonitorDirWithFAM *) x)); +} +static void *_p_Ferris__CurlStateErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStateError *) x)); +} +static void *_p_Ferris__NoSuchGroupTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::NoSuchObject *) ((Ferris::NoSuchGroup *) x)); +} +static void *_p_Ferris__UnknownBackupModeTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::BackupException *) ((Ferris::UnknownBackupMode *) x)); +} +static void *_p_Ferris__NoSuchContextClassTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchContextClass *) x)); +} +static void *_p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisInternalError *) ((Ferris::FerrisParentNotSetError *) x)); +} +static void *_p_Ferris__GenericErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::GenericError *) x)); +} +static void *_p_Ferris__FileClipboardTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FileClipboard *) x)); +} +static void *_p_Ferris__eetKeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::Db4Exception *) ((Ferris::eetKeyNotFound *) x)); +} +static void *_p_Ferris__Db4KeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::Db4Exception *) ((Ferris::Db4KeyNotFound *) x)); +} +static void *_p_Ferris__FerrisCurlServerNameNotFoundTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCurlServerNameNotFound *) x)); +} +static void *_p_Ferris__FerrisSqlServerNameNotFoundTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisSqlServerNameNotFound *) x)); +} +static void *_p_Ferris__ContextExistsTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::ObjectExists *) ((Ferris::ContextExists *) x)); +} +static void *_p_Ferris__ObjectExistsTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::ObjectExists *) x)); +} +static void *_p_Ferris__DesktopFileKeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::DesktopFileKeyNotFound *) x)); +} +static void *_p_Ferris__tdbExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::tdbException *) x)); +} +static void *_p_Ferris__GdbmExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::GdbmException *) x)); +} +static void *_p_Ferris__eetExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::eetException *) x)); +} +static void *_p_Ferris__Db4ExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::Db4Exception *) x)); +} +static void *_p_Ferris__CursorExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CursorException *) x)); +} +static void *_p_Ferris__DVDReadExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::DVDReadException *) x)); +} +static void *_p_Ferris__BackupExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::BackupException *) x)); +} +static void *_p_Ferris__SocketOptionsExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::SocketOptionsException *) x)); +} +static void *_p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisGLibCException *) ((Ferris::FerrisSetCWDException *) x)); +} +static void *_p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisGLibCException *) ((Ferris::FerrisStatException *) x)); +} +static void *_p_Ferris__FerrisGLibCExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisGLibCException *) x)); +} +static void *_p_Ferris__UnknownConfigLocationTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::UnknownConfigLocation *) x)); +} +static void *_p_Ferris__InvalidSortSpecificationTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidSortSpecification *) x)); +} +static void *_p_Ferris__LDAPExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::LDAPException *) x)); +} +static void *_p_Ferris__CompressionExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CompressionException *) x)); +} +static void *_p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CompressionException *) ((Ferris::CompressionAlgoNotFoundException *) x)); +} +static void *_p_Ferris__IndexExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::IndexException *) x)); +} +static void *_p_Ferris__FullTextIndexExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::IndexException *) ((Ferris::FullTextIndexException *) x)); +} +static void *_p_Ferris__EAIndexExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::IndexException *) ((Ferris::EAIndexException *) x)); +} +static void *_p_Ferris__SchemaExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::SchemaException *) x)); +} +static void *_p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::SchemaException *) ((Ferris::SchemaNotFoundException *) x)); +} +static void *_p_Ferris__MedallionExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::MedallionException *) x)); +} +static void *_p_Ferris__EtagereExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::EtagereException *) x)); +} +static void *_p_Ferris__EmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::EmblemException *) x)); +} +static void *_p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::EmblemException *) ((Ferris::EmblemNotFoundException *) x)); +} +static void *_p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::EmblemException *) ((Ferris::CanNotAddEmblemException *) x)); +} +static void *_p_Ferris__NoSuchPersonalityExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchPersonalityException *) x)); +} +static void *_p_Ferris__NoSuchBeliefExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchBeliefException *) x)); +} +static void *_p_Ferris__AgentExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::AgentException *) x)); +} +static void *_p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::AgentException *) ((Ferris::AgentAlreadyExistsException *) x)); +} +static void *_p_Ferris__NoSuchAgentExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::AgentException *) ((Ferris::NoSuchAgentException *) x)); +} +static void *_p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::AgentException *) ((Ferris::AgentOnlyHandlesOneEmblemException *) x)); +} +static void *_p_Ferris__dbXMLExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::XMLBase *) ((Ferris::dbXMLException *) x)); +} +static void *_p_Ferris__KeylistExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CryptoBase *) ((Ferris::KeylistException *) x)); +} +static void *_p_Ferris__DBusExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::DBusException *) x)); +} +static void *_p_Ferris__DBusConnectionExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::DBusException *) ((Ferris::DBusConnectionException *) x)); +} +static void *_p_Ferris__WebPhotoExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::WebPhotoException *) x)); +} +static void *_p_Ferris__SQLiteExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::SQLiteException *) x)); +} +static void *_p_Ferris__FerrisHALExceptionTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisHALException *) x)); +} +static void *_p_Ferris__DTDCreationFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::DTDCreationFailed *) x)); +} +static void *_p_Ferris__CurlEasyInitFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlEasyInitFailed *) x)); +} +static void *_p_Ferris__CurlStaticInitFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStaticInitFailed *) x)); +} +static void *_p_Ferris__FerrisStreamLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisStreamLoadFailed *) x)); +} +static void *_p_Ferris__GModuleOpenFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::GModuleOpenFailed *) x)); +} +static void *_p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisImlib2ImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisGIMPImageLoadFailed *) x)); +} +static void *_p_Ferris__RootContextCreationFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::RootContextCreationFailed *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateSubContextFailed *) x)); +} +static void *_p_Ferris__FerrisImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisPNGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisJPEGImageLoadFailed *) x)); +} +static void *_p_Ferris__GPGMEInitFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::CryptoBase *) ((Ferris::GPGMEInitFailed *) x)); +} +static void *_p_Ferris__XMPPacketScanFailedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::XMPBase *) ((Ferris::XMPPacketScanFailed *) x)); +} +static void *_p_Ferris__RelativeTimeParsingTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::RelativeTimeParsing *) x)); +} +static void *_p_Ferris__BadlyFormedTimeStringTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::BadlyFormedTime *) ((Ferris::BadlyFormedTimeString *) x)); +} +static void *_p_Ferris__NoSuchUserTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::NoSuchObject *) ((Ferris::NoSuchUser *) x)); +} +static void *_p_Ferris__InvalidModeStringTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidModeString *) x)); +} +static void *_p_Ferris__XMPBaseTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::XMPBase *) x)); +} +static void *_p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::NotSupported *) ((Ferris::FerrisNotSupportedInThisContext *) x)); +} +static void *_p_Ferris__NoSuchSubContextTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchSubContext *) x)); +} +static void *_p_Ferris__CanNotReadContextTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotReadContext *) x)); +} +static void *_p_Ferris__FerrisNotReadableAsContextTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisNotReadableAsContext *) x)); +} +static void *_p_Ferris__NoOpenWithContextTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoOpenWithContext *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::getIOStreamCloseUpdateFailed *) ((Ferris::getIOStreamCloseUpdatePermissionDenied *) x)); +} +static void *_p_Ferris__QuotaStorageFullTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::StorageFull *) ((Ferris::QuotaStorageFull *) x)); +} +static void *_p_Ferris__StorageFullTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::StorageFull *) x)); +} +static void *_p_Ferris__ParseErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::ParseError *) x)); +} +static void *_p_Ferris__XMLParseErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::XMLBase *) ((Ferris::XMLParseError *) x)); +} +static void *_p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::FerrisInternalError *) ((Ferris::FerrisCanNotGetScriptNameError *) x)); +} +static void *_p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDereferenceDanglingSoftLink *) x)); +} +static void *_p_Ferris__ProgramSpawnTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::ProgramSpawn *) x)); +} +static void *_p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCanNotCreateLeafOfLeaf *) x)); +} +static void *_p_Ferris__NoSuchObjectTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchObject *) x)); +} +static void *_p_Ferris__CanNotGetStreamTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotGetStream *) x)); +} +static void *_p_Ferris__ContentNotModifiedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::ContentNotModified *) x)); +} +static void *_p_Ferris__BranchFileSystemTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::BranchFileSystem *) x)); +} +static void *_p_Ferris__NotSupportedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateSubContextNotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateAttributeNotSupported *) x)); +} +static void *_p_Ferris__SyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::SyntaxError *) x)); +} +static void *_p_Ferris__FFilterSyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::SyntaxError *) ((Ferris::FFilterSyntaxError *) x)); +} +static void *_p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::SyntaxError *) ((Ferris::FulltextQuerySyntaxError *) x)); +} +static void *_p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) (Ferris::SyntaxError *) ((Ferris::URLDecodeSyntaxError *) x)); +} +static void *_p_Ferris__OpenActionIsNotDefinedTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::OpenActionIsNotDefined *) x)); +} +static void *_p_Ferris__FerrisOutOfMemoryTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisOutOfMemory *) x)); +} +static void *_p_Ferris__ChildNotRunningTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::ChildNotRunning *) x)); +} +static void *_p_Ferris__CanNotAddExternalAttributeTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotAddExternalAttribute *) x)); +} +static void *_p_Ferris__NoSuchAttributeTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchAttribute *) x)); +} +static void *_p_Ferris__BadlyFormedTimeTo_p_Ferris__FerrisVFSExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisVFSExceptionBase *) ((Ferris::BadlyFormedTime *) x)); +} +static void *_p_Ferris__XMLBaseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::XMLBase *) x)); +} +static void *_p_Ferris__RenameFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::RenameFailed *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdateFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::getIOStreamCloseUpdateFailed *) x)); +} +static void *_p_Ferris__CurlPerformFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlPerformFailed *) x)); +} +static void *_p_Ferris__FerrisImageSaveFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageSaveFailed *) x)); +} +static void *_p_Ferris__CopyFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CopyFailed *) x)); +} +static void *_p_Ferris__RemoveFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::RemoveFailed *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateAttributeFailed *) x)); +} +static void *_p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CanNotReadContext *) ((Ferris::CanNotReadContextPcctsParseFailed *) x)); +} +static void *_p_Ferris__SubContextAlreadyInUseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::SubContextAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeAlreadyInUseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeAlreadyInUse *) x)); +} +static void *_p_Ferris__AttributeNotWritableTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::AttributeNotWritable *) x)); +} +static void *_p_Ferris__BadSignatureTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::BadSignature *) x)); +} +static void *_p_Ferris__GPhoto2To_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::GPhoto2 *) x)); +} +static void *_p_Ferris__XMLFatalErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::XMLFatalError *) x)); +} +static void *_p_Ferris__FerrisInternalErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisInternalError *) x)); +} +static void *_p_Ferris__BadParamTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::BadParam *) x)); +} +static void *_p_Ferris__FerrisVFSExceptionBaseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) ((Ferris::FerrisVFSExceptionBase *) x)); +} +static void *_p_Ferris__CryptoBaseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CryptoBase *) x)); +} +static void *_p_Ferris__FerrisWaitTimedOutTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisWaitTimedOut *) x)); +} +static void *_p_Ferris__AccessDeniedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::AccessDenied *) x)); +} +static void *_p_Ferris__CanNotDeleteTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDelete *) x)); +} +static void *_p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::BackupException *) ((Ferris::BackupNameWouldBeTooLong *) x)); +} +static void *_p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CanNotReadContext *) ((Ferris::CanNotMonitorDirWithFAM *) x)); +} +static void *_p_Ferris__CurlStateErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStateError *) x)); +} +static void *_p_Ferris__NoSuchGroupTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::NoSuchObject *) ((Ferris::NoSuchGroup *) x)); +} +static void *_p_Ferris__UnknownBackupModeTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::BackupException *) ((Ferris::UnknownBackupMode *) x)); +} +static void *_p_Ferris__NoSuchContextClassTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchContextClass *) x)); +} +static void *_p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisInternalError *) ((Ferris::FerrisParentNotSetError *) x)); +} +static void *_p_Ferris__GenericErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::GenericError *) x)); +} +static void *_p_Ferris__FileClipboardTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FileClipboard *) x)); +} +static void *_p_Ferris__FerrisCurlServerNameNotFoundTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCurlServerNameNotFound *) x)); +} +static void *_p_Ferris__FerrisSqlServerNameNotFoundTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisSqlServerNameNotFound *) x)); +} +static void *_p_Ferris__ObjectExistsTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::ObjectExists *) x)); +} +static void *_p_Ferris__ContextExistsTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::ObjectExists *) ((Ferris::ContextExists *) x)); +} +static void *_p_Ferris__Db4KeyNotFoundTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::Db4Exception *) ((Ferris::Db4KeyNotFound *) x)); +} +static void *_p_Ferris__eetKeyNotFoundTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::Db4Exception *) ((Ferris::eetKeyNotFound *) x)); +} +static void *_p_Ferris__DesktopFileKeyNotFoundTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::DesktopFileKeyNotFound *) x)); +} +static void *_p_Ferris__Db4ExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::Db4Exception *) x)); +} +static void *_p_Ferris__CursorExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CursorException *) x)); +} +static void *_p_Ferris__DVDReadExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::DVDReadException *) x)); +} +static void *_p_Ferris__BackupExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::BackupException *) x)); +} +static void *_p_Ferris__SocketOptionsExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::SocketOptionsException *) x)); +} +static void *_p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisGLibCException *) ((Ferris::FerrisSetCWDException *) x)); +} +static void *_p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisGLibCException *) ((Ferris::FerrisStatException *) x)); +} +static void *_p_Ferris__FerrisGLibCExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisGLibCException *) x)); +} +static void *_p_Ferris__FerrisStreamExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) ((Ferris::FerrisStreamException *) x)); +} +static void *_p_Ferris__UnknownConfigLocationTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::UnknownConfigLocation *) x)); +} +static void *_p_Ferris__eetExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::eetException *) x)); +} +static void *_p_Ferris__GdbmExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::GdbmException *) x)); +} +static void *_p_Ferris__tdbExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::tdbException *) x)); +} +static void *_p_Ferris__InvalidSortSpecificationTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidSortSpecification *) x)); +} +static void *_p_Ferris__LDAPExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::LDAPException *) x)); +} +static void *_p_Ferris__CompressionExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CompressionException *) x)); +} +static void *_p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CompressionException *) ((Ferris::CompressionAlgoNotFoundException *) x)); +} +static void *_p_Ferris__IndexExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::IndexException *) x)); +} +static void *_p_Ferris__FullTextIndexExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::IndexException *) ((Ferris::FullTextIndexException *) x)); +} +static void *_p_Ferris__EAIndexExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::IndexException *) ((Ferris::EAIndexException *) x)); +} +static void *_p_Ferris__SchemaExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::SchemaException *) x)); +} +static void *_p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::SchemaException *) ((Ferris::SchemaNotFoundException *) x)); +} +static void *_p_Ferris__MedallionExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::MedallionException *) x)); +} +static void *_p_Ferris__EtagereExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::EtagereException *) x)); +} +static void *_p_Ferris__EmblemExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::EmblemException *) x)); +} +static void *_p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::EmblemException *) ((Ferris::EmblemNotFoundException *) x)); +} +static void *_p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::EmblemException *) ((Ferris::CanNotAddEmblemException *) x)); +} +static void *_p_Ferris__NoSuchPersonalityExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchPersonalityException *) x)); +} +static void *_p_Ferris__NoSuchBeliefExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchBeliefException *) x)); +} +static void *_p_Ferris__AgentExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::AgentException *) x)); +} +static void *_p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::AgentAlreadyExistsException *) x)); +} +static void *_p_Ferris__NoSuchAgentExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::NoSuchAgentException *) x)); +} +static void *_p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::AgentException *) ((Ferris::AgentOnlyHandlesOneEmblemException *) x)); +} +static void *_p_Ferris__dbXMLExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::dbXMLException *) x)); +} +static void *_p_Ferris__KeylistExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::KeylistException *) x)); +} +static void *_p_Ferris__DBusExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::DBusException *) x)); +} +static void *_p_Ferris__DBusConnectionExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::DBusException *) ((Ferris::DBusConnectionException *) x)); +} +static void *_p_Ferris__WebPhotoExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::WebPhotoException *) x)); +} +static void *_p_Ferris__SQLiteExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::SQLiteException *) x)); +} +static void *_p_Ferris__FerrisHALExceptionTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisHALException *) x)); +} +static void *_p_Ferris__DTDCreationFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::DTDCreationFailed *) x)); +} +static void *_p_Ferris__CurlEasyInitFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlEasyInitFailed *) x)); +} +static void *_p_Ferris__CurlStaticInitFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CurlStaticInitFailed *) x)); +} +static void *_p_Ferris__FerrisStreamLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisStreamLoadFailed *) x)); +} +static void *_p_Ferris__GModuleOpenFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::GModuleOpenFailed *) x)); +} +static void *_p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisImlib2ImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisGIMPImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisJPEGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisPNGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisImageLoadFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisImageLoadFailed *) x)); +} +static void *_p_Ferris__RootContextCreationFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::RootContextCreationFailed *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCreateSubContextFailed *) x)); +} +static void *_p_Ferris__GPGMEInitFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::CryptoBase *) ((Ferris::GPGMEInitFailed *) x)); +} +static void *_p_Ferris__XMPPacketScanFailedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::XMPBase *) ((Ferris::XMPPacketScanFailed *) x)); +} +static void *_p_Ferris__RelativeTimeParsingTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::RelativeTimeParsing *) x)); +} +static void *_p_Ferris__BadlyFormedTimeStringTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::BadlyFormedTime *) ((Ferris::BadlyFormedTimeString *) x)); +} +static void *_p_Ferris__NoSuchUserTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::NoSuchObject *) ((Ferris::NoSuchUser *) x)); +} +static void *_p_Ferris__InvalidModeStringTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::InvalidModeString *) x)); +} +static void *_p_Ferris__XMPBaseTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::XMPBase *) x)); +} +static void *_p_Ferris__FerrisNotReadableAsContextTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisNotReadableAsContext *) x)); +} +static void *_p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *) ((Ferris::FerrisNotSupportedInThisContext *) x)); +} +static void *_p_Ferris__NoSuchSubContextTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchSubContext *) x)); +} +static void *_p_Ferris__CanNotReadContextTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotReadContext *) x)); +} +static void *_p_Ferris__NoOpenWithContextTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoOpenWithContext *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::getIOStreamCloseUpdateFailed *) ((Ferris::getIOStreamCloseUpdatePermissionDenied *) x)); +} +static void *_p_Ferris__QuotaStorageFullTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::StorageFull *) ((Ferris::QuotaStorageFull *) x)); +} +static void *_p_Ferris__StorageFullTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::StorageFull *) x)); +} +static void *_p_Ferris__ParseErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::ParseError *) x)); +} +static void *_p_Ferris__XMLParseErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::XMLBase *) ((Ferris::XMLParseError *) x)); +} +static void *_p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::FerrisInternalError *) ((Ferris::FerrisCanNotGetScriptNameError *) x)); +} +static void *_p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotDereferenceDanglingSoftLink *) x)); +} +static void *_p_Ferris__ProgramSpawnTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::ProgramSpawn *) x)); +} +static void *_p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisCanNotCreateLeafOfLeaf *) x)); +} +static void *_p_Ferris__NoSuchObjectTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchObject *) x)); +} +static void *_p_Ferris__CanNotGetStreamTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotGetStream *) x)); +} +static void *_p_Ferris__ContentNotModifiedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::ContentNotModified *) x)); +} +static void *_p_Ferris__BranchFileSystemTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::BranchFileSystem *) x)); +} +static void *_p_Ferris__NotSupportedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateSubContextNotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::NotSupported *)(Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateAttributeNotSupported *) x)); +} +static void *_p_Ferris__SyntaxErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::SyntaxError *) x)); +} +static void *_p_Ferris__FFilterSyntaxErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::FFilterSyntaxError *) x)); +} +static void *_p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::FulltextQuerySyntaxError *) x)); +} +static void *_p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *)(Ferris::SyntaxError *) ((Ferris::URLDecodeSyntaxError *) x)); +} +static void *_p_Ferris__OpenActionIsNotDefinedTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::OpenActionIsNotDefined *) x)); +} +static void *_p_Ferris__FerrisOutOfMemoryTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::FerrisOutOfMemory *) x)); +} +static void *_p_Ferris__CreateFIFOTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisStreamException *) ((Ferris::CreateFIFO *) x)); +} +static void *_p_Ferris__ChildNotRunningTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::ChildNotRunning *) x)); +} +static void *_p_Ferris__UnspoortedBlockSizeTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisStreamException *) ((Ferris::UnspoortedBlockSize *) x)); +} +static void *_p_Ferris__CanNotAddExternalAttributeTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::CanNotAddExternalAttribute *) x)); +} +static void *_p_Ferris__NoSuchAttributeTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::NoSuchAttribute *) x)); +} +static void *_p_Ferris__MalformedURLTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisStreamException *) ((Ferris::MalformedURL *) x)); +} +static void *_p_Ferris__BadlyFormedTimeTo_p_Ferris__FerrisExceptionBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisExceptionBase *) (Ferris::FerrisVFSExceptionBase *) ((Ferris::BadlyFormedTime *) x)); +} +static void *_p_Ferris__BadlyFormedTimeStringTo_p_Ferris__BadlyFormedTime(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::BadlyFormedTime *) ((Ferris::BadlyFormedTimeString *) x)); +} +static void *_p_Ferris__AttributeProxyTo_p_Ferris__Attribute(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Attribute *) ((Ferris::AttributeProxy *) x)); +} +static void *_p_Ferris__ContextTo_p_Ferris__Attribute(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Attribute *) ((Ferris::Context *) x)); +} +static void *_p_Ferris__XMPPacketScanFailedTo_p_Ferris__XMPBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::XMPBase *) ((Ferris::XMPPacketScanFailed *) x)); +} +static void *_p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__NotSupported(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::NotSupported *) (Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateSubContextNotSupported *) x)); +} +static void *_p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__NotSupported(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::NotSupported *) (Ferris::FerrisNotSupportedInThisContext *) ((Ferris::FerrisCreateAttributeNotSupported *) x)); +} +static void *_p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__NotSupported(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::NotSupported *) ((Ferris::FerrisNotSupportedInThisContext *) x)); +} +static void *_p_Ferris__EA_Atom_StaticTo_p_Ferris__EA_Atom(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom *) ((Ferris::EA_Atom_Static *) x)); +} +static void *_p_Ferris__EA_Atom_ReadOnlyTo_p_Ferris__EA_Atom(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom *) ((Ferris::EA_Atom_ReadOnly *) x)); +} +static void *_p_Ferris__EA_Atom_RDFCacheAttributeTo_p_Ferris__EA_Atom(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom *) ((Ferris::EA_Atom_RDFCacheAttribute *) x)); +} +static void *_p_Ferris__EA_Atom_ReadOnly_PassedInStreamTo_p_Ferris__EA_Atom(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom *) (Ferris::EA_Atom_ReadOnly *) ((Ferris::EA_Atom_ReadOnly_PassedInStream *) x)); +} +static void *_p_Ferris__FFilterSyntaxErrorTo_p_Ferris__SyntaxError(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::SyntaxError *) ((Ferris::FFilterSyntaxError *) x)); +} +static void *_p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__SyntaxError(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::SyntaxError *) ((Ferris::FulltextQuerySyntaxError *) x)); +} +static void *_p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__SyntaxError(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::SyntaxError *) ((Ferris::URLDecodeSyntaxError *) x)); +} +static void *_p_Ferris__ContextTo_p_Ferris__ContextCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::ContextCollection *) ((Ferris::Context *) x)); +} +static void *_p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisInternalError(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisInternalError *) ((Ferris::FerrisCanNotGetScriptNameError *) x)); +} +static void *_p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisInternalError(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisInternalError *) ((Ferris::FerrisParentNotSetError *) x)); +} +static void *_p_Ferris__ContextTo_p_Ferris__MutableCollectionEvents(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::MutableCollectionEvents *) ((Ferris::Context *) x)); +} +static void *_p_Ferris__GPGMEInitFailedTo_p_Ferris__CryptoBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CryptoBase *) ((Ferris::GPGMEInitFailed *) x)); +} +static void *_p_Ferris__BadSignatureTo_p_Ferris__CryptoBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CryptoBase *) ((Ferris::BadSignature *) x)); +} +static void *_p_Ferris__KeylistExceptionTo_p_Ferris__CryptoBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CryptoBase *) ((Ferris::KeylistException *) x)); +} +static void *_p_Ferris__dbXMLExceptionTo_p_Ferris__XMLBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::XMLBase *) ((Ferris::dbXMLException *) x)); +} +static void *_p_Ferris__XMLParseErrorTo_p_Ferris__XMLBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::XMLBase *) ((Ferris::XMLParseError *) x)); +} +static void *_p_Ferris__XMLFatalErrorTo_p_Ferris__XMLBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::XMLBase *) ((Ferris::XMLFatalError *) x)); +} +static void *_p_Ferris__PersonalityTo_p_Ferris__CacheHandlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CacheHandlable *) ((Ferris::Personality *) x)); +} +static void *_p_Ferris__MedallionTo_p_Ferris__CacheHandlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::CacheHandlable *) ((Ferris::Medallion *) x)); +} +static void *_p_Ferris__TimesTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Times *) x)); +} +static void *_p_Ferris__ColdEmblemTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *)(Ferris::Emblem *) ((Ferris::ColdEmblem *) x)); +} +static void *_p_Ferris__EmblemTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Emblem *) x)); +} +static void *_p_Ferris__AttributeCollectionTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *)(Ferris::Versioned *) ((Ferris::AttributeCollection *) x)); +} +static void *_p_Ferris__AttributeProxyTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::AttributeProxy *) x)); +} +static void *_p_Ferris__AI__AgentTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::AI::Agent *) x)); +} +static void *_p_Ferris__RunnerTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Runner *) x)); +} +static void *_p_Ferris__PersonalityTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *)(Ferris::CacheHandlable *) ((Ferris::Personality *) x)); +} +static void *_p_Ferris__MedallionBeliefTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::MedallionBelief *) x)); +} +static void *_p_Ferris__Time__BenchmarkTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Time::Benchmark *) x)); +} +static void *_p_Ferris__VersionedTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Versioned *) x)); +} +static void *_p_Ferris__EtagereTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::Etagere *) x)); +} +static void *_p_Ferris__CacheHandlableTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::CacheHandlable *) x)); +} +static void *_p_Ferris__HandlableTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) ((Ferris::Handlable *) x)); +} +static void *_p_Ferris__MedallionTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *)(Ferris::CacheHandlable *) ((Ferris::Medallion *) x)); +} +static void *_p_Ferris__ContextIteratorTo_p_FerrisLoki__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((FerrisLoki::Handlable *) (Ferris::Handlable *) ((Ferris::ContextIterator *) x)); +} +static void *_p_Ferris__TimesTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Times *) x)); +} +static void *_p_Ferris__ColdEmblemTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) (Ferris::Emblem *) ((Ferris::ColdEmblem *) x)); +} +static void *_p_Ferris__EmblemTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Emblem *) x)); +} +static void *_p_Ferris__AttributeCollectionTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) (Ferris::Versioned *) ((Ferris::AttributeCollection *) x)); +} +static void *_p_Ferris__AttributeProxyTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::AttributeProxy *) x)); +} +static void *_p_Ferris__AI__AgentTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::AI::Agent *) x)); +} +static void *_p_Ferris__RunnerTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Runner *) x)); +} +static void *_p_Ferris__PersonalityTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) (Ferris::CacheHandlable *) ((Ferris::Personality *) x)); +} +static void *_p_Ferris__MedallionBeliefTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::MedallionBelief *) x)); +} +static void *_p_Ferris__Time__BenchmarkTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Time::Benchmark *) x)); +} +static void *_p_Ferris__VersionedTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Versioned *) x)); +} +static void *_p_Ferris__EtagereTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::Etagere *) x)); +} +static void *_p_Ferris__CacheHandlableTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::CacheHandlable *) x)); +} +static void *_p_Ferris__MedallionTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) (Ferris::CacheHandlable *) ((Ferris::Medallion *) x)); +} +static void *_p_Ferris__ContextIteratorTo_p_Ferris__Handlable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Handlable *) ((Ferris::ContextIterator *) x)); +} +static void *_p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_Ferris__EA_Atom_ReadWrite_OpenModeCached(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::EA_Atom_ReadWrite_OpenModeCached *) ((Ferris::EA_Atom_ReadWrite_Contents *) x)); +} +static void *_p_Ferris__ColdEmblemTo_p_Ferris__Emblem(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::Emblem *) ((Ferris::ColdEmblem *) x)); +} +static void *_p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisPNGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisJPEGImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisGIMPImageLoadFailed *) x)); +} +static void *_p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::FerrisImageLoadFailed *) ((Ferris::FerrisImlib2ImageLoadFailed *) x)); +} +static void *_p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__getIOStreamCloseUpdateFailed(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::getIOStreamCloseUpdateFailed *) ((Ferris::getIOStreamCloseUpdatePermissionDenied *) x)); +} +static void *_p_Ferris__ContextExistsTo_p_Ferris__ObjectExists(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Ferris::ObjectExists *) ((Ferris::ContextExists *) x)); +} +static swig_type_info _swigt__p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t = {"_p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t", "CompositeTrimmer< Trimmer< PrefixTrimmerOps >,Trimmer< PostfixTrimmerOps > > *|PrePostTrimmer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ContextEvent_Headers_Received_Sig_t = {"_p_ContextEvent_Headers_Received_Sig_t", "ContextEvent_Headers_Received_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Fampp__FamppDirMonitorInitFailedException = {"_p_Fampp__FamppDirMonitorInitFailedException", "Fampp::FamppDirMonitorInitFailedException *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_FerrisLoki__FerrisSmallObjAllocator = {"_p_FerrisLoki__FerrisSmallObjAllocator", "FerrisLoki::FerrisSmallObjAllocator *", 0, 0, (void*)"libferrisperl::FerrisSmallObjAllocator", 0}; +static swig_type_info _swigt__p_FerrisLoki__Handlable = {"_p_FerrisLoki__Handlable", "FerrisLoki::Handlable *", 0, 0, (void*)"libferrisperl::Handlable", 0}; +static swig_type_info _swigt__p_Ferris__AI__Agent = {"_p_Ferris__AI__Agent", "Ferris::AI::Agent *", 0, 0, (void*)"libferrisperl::Agent", 0}; +static swig_type_info _swigt__p_Ferris__AccessDenied = {"_p_Ferris__AccessDenied", "Ferris::AccessDenied *", 0, 0, (void*)"libferrisperl::AccessDenied", 0}; +static swig_type_info _swigt__p_Ferris__AgentAlreadyExistsException = {"_p_Ferris__AgentAlreadyExistsException", "Ferris::AgentAlreadyExistsException *", 0, 0, (void*)"libferrisperl::AgentAlreadyExistsException", 0}; +static swig_type_info _swigt__p_Ferris__AgentException = {"_p_Ferris__AgentException", "Ferris::AgentException *", 0, 0, (void*)"libferrisperl::AgentException", 0}; +static swig_type_info _swigt__p_Ferris__AgentOnlyHandlesOneEmblemException = {"_p_Ferris__AgentOnlyHandlesOneEmblemException", "Ferris::AgentOnlyHandlesOneEmblemException *", 0, 0, (void*)"libferrisperl::AgentOnlyHandlesOneEmblemException", 0}; +static swig_type_info _swigt__p_Ferris__Attribute = {"_p_Ferris__Attribute", "Ferris::Attribute *", 0, 0, (void*)"libferrisperl::Attribute", 0}; +static swig_type_info _swigt__p_Ferris__AttributeAlreadyInUse = {"_p_Ferris__AttributeAlreadyInUse", "Ferris::AttributeAlreadyInUse *", 0, 0, (void*)"libferrisperl::AttributeAlreadyInUse", 0}; +static swig_type_info _swigt__p_Ferris__AttributeCollection = {"_p_Ferris__AttributeCollection", "Ferris::AttributeCollection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__AttributeNotWritable = {"_p_Ferris__AttributeNotWritable", "Ferris::AttributeNotWritable *", 0, 0, (void*)"libferrisperl::AttributeNotWritable", 0}; +static swig_type_info _swigt__p_Ferris__AttributeProxy = {"_p_Ferris__AttributeProxy", "Ferris::AttributeProxy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__BackupException = {"_p_Ferris__BackupException", "Ferris::BackupException *", 0, 0, (void*)"libferrisperl::BackupException", 0}; +static swig_type_info _swigt__p_Ferris__BackupNameWouldBeTooLong = {"_p_Ferris__BackupNameWouldBeTooLong", "Ferris::BackupNameWouldBeTooLong *", 0, 0, (void*)"libferrisperl::BackupNameWouldBeTooLong", 0}; +static swig_type_info _swigt__p_Ferris__BadParam = {"_p_Ferris__BadParam", "Ferris::BadParam *", 0, 0, (void*)"libferrisperl::BadParam", 0}; +static swig_type_info _swigt__p_Ferris__BadSignature = {"_p_Ferris__BadSignature", "Ferris::BadSignature *", 0, 0, (void*)"libferrisperl::BadSignature", 0}; +static swig_type_info _swigt__p_Ferris__BadlyFormedTime = {"_p_Ferris__BadlyFormedTime", "Ferris::BadlyFormedTime *", 0, 0, (void*)"libferrisperl::BadlyFormedTime", 0}; +static swig_type_info _swigt__p_Ferris__BadlyFormedTimeString = {"_p_Ferris__BadlyFormedTimeString", "Ferris::BadlyFormedTimeString *", 0, 0, (void*)"libferrisperl::BadlyFormedTimeString", 0}; +static swig_type_info _swigt__p_Ferris__BranchFileSystem = {"_p_Ferris__BranchFileSystem", "Ferris::BranchFileSystem *", 0, 0, (void*)"libferrisperl::BranchFileSystem", 0}; +static swig_type_info _swigt__p_Ferris__CacheHandlable = {"_p_Ferris__CacheHandlable", "Ferris::CacheHandlable *", 0, 0, (void*)"libferrisperl::CacheHandlable", 0}; +static swig_type_info _swigt__p_Ferris__CacheManager = {"_p_Ferris__CacheManager", "Ferris::CacheManager *", 0, 0, (void*)"libferrisperl::CacheManager", 0}; +static swig_type_info _swigt__p_Ferris__CanNotAddEmblemException = {"_p_Ferris__CanNotAddEmblemException", "Ferris::CanNotAddEmblemException *", 0, 0, (void*)"libferrisperl::CanNotAddEmblemException", 0}; +static swig_type_info _swigt__p_Ferris__CanNotAddExternalAttribute = {"_p_Ferris__CanNotAddExternalAttribute", "Ferris::CanNotAddExternalAttribute *", 0, 0, (void*)"libferrisperl::CanNotAddExternalAttribute", 0}; +static swig_type_info _swigt__p_Ferris__CanNotDelete = {"_p_Ferris__CanNotDelete", "Ferris::CanNotDelete *", 0, 0, (void*)"libferrisperl::CanNotDelete", 0}; +static swig_type_info _swigt__p_Ferris__CanNotDereferenceDanglingSoftLink = {"_p_Ferris__CanNotDereferenceDanglingSoftLink", "Ferris::CanNotDereferenceDanglingSoftLink *", 0, 0, (void*)"libferrisperl::CanNotDereferenceDanglingSoftLink", 0}; +static swig_type_info _swigt__p_Ferris__CanNotGetStream = {"_p_Ferris__CanNotGetStream", "Ferris::CanNotGetStream *", 0, 0, (void*)"libferrisperl::CanNotGetStream", 0}; +static swig_type_info _swigt__p_Ferris__CanNotMonitorDirWithFAM = {"_p_Ferris__CanNotMonitorDirWithFAM", "Ferris::CanNotMonitorDirWithFAM *", 0, 0, (void*)"libferrisperl::CanNotMonitorDirWithFAM", 0}; +static swig_type_info _swigt__p_Ferris__CanNotReadContext = {"_p_Ferris__CanNotReadContext", "Ferris::CanNotReadContext *", 0, 0, (void*)"libferrisperl::CanNotReadContext", 0}; +static swig_type_info _swigt__p_Ferris__CanNotReadContextPcctsParseFailed = {"_p_Ferris__CanNotReadContextPcctsParseFailed", "Ferris::CanNotReadContextPcctsParseFailed *", 0, 0, (void*)"libferrisperl::CanNotReadContextPcctsParseFailed", 0}; +static swig_type_info _swigt__p_Ferris__ChildNotRunning = {"_p_Ferris__ChildNotRunning", "Ferris::ChildNotRunning *", 0, 0, (void*)"libferrisperl::ChildNotRunning", 0}; +static swig_type_info _swigt__p_Ferris__ColdEmblem = {"_p_Ferris__ColdEmblem", "Ferris::ColdEmblem *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__CompressionAlgoNotFoundException = {"_p_Ferris__CompressionAlgoNotFoundException", "Ferris::CompressionAlgoNotFoundException *", 0, 0, (void*)"libferrisperl::CompressionAlgoNotFoundException", 0}; +static swig_type_info _swigt__p_Ferris__CompressionException = {"_p_Ferris__CompressionException", "Ferris::CompressionException *", 0, 0, (void*)"libferrisperl::CompressionException", 0}; +static swig_type_info _swigt__p_Ferris__ContentNotModified = {"_p_Ferris__ContentNotModified", "Ferris::ContentNotModified *", 0, 0, (void*)"libferrisperl::ContentNotModified", 0}; +static swig_type_info _swigt__p_Ferris__Context = {"_p_Ferris__Context", "Ferris::Context *|Ferris::Attribute::Parent_t", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__ContextCollection = {"_p_Ferris__ContextCollection", "Ferris::ContextCollection *", 0, 0, (void*)"libferrisperl::ContextCollection", 0}; +static swig_type_info _swigt__p_Ferris__ContextExists = {"_p_Ferris__ContextExists", "Ferris::ContextExists *", 0, 0, (void*)"libferrisperl::ContextExists", 0}; +static swig_type_info _swigt__p_Ferris__ContextIterator = {"_p_Ferris__ContextIterator", "Ferris::ContextIterator::_Self *|Ferris::ContextIterator *|Ferris::Context::iterator *", 0, 0, (void*)"libferrisperl::ContextIterator", 0}; +static swig_type_info _swigt__p_Ferris__ContextSetCompare = {"_p_Ferris__ContextSetCompare", "Ferris::ContextSetCompare *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__CopyFailed = {"_p_Ferris__CopyFailed", "Ferris::CopyFailed *", 0, 0, (void*)"libferrisperl::CopyFailed", 0}; +static swig_type_info _swigt__p_Ferris__CreateFIFO = {"_p_Ferris__CreateFIFO", "Ferris::CreateFIFO *", 0, 0, (void*)"libferrisperl::CreateFIFO", 0}; +static swig_type_info _swigt__p_Ferris__CreateMetaDataContext = {"_p_Ferris__CreateMetaDataContext", "Ferris::CreateMetaDataContext *|Ferris::f_mdcontext *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__CryptoBase = {"_p_Ferris__CryptoBase", "Ferris::CryptoBase *", 0, 0, (void*)"libferrisperl::CryptoBase", 0}; +static swig_type_info _swigt__p_Ferris__CurlEasyInitFailed = {"_p_Ferris__CurlEasyInitFailed", "Ferris::CurlEasyInitFailed *", 0, 0, (void*)"libferrisperl::CurlEasyInitFailed", 0}; +static swig_type_info _swigt__p_Ferris__CurlPerformFailed = {"_p_Ferris__CurlPerformFailed", "Ferris::CurlPerformFailed *", 0, 0, (void*)"libferrisperl::CurlPerformFailed", 0}; +static swig_type_info _swigt__p_Ferris__CurlStateError = {"_p_Ferris__CurlStateError", "Ferris::CurlStateError *", 0, 0, (void*)"libferrisperl::CurlStateError", 0}; +static swig_type_info _swigt__p_Ferris__CurlStaticInitFailed = {"_p_Ferris__CurlStaticInitFailed", "Ferris::CurlStaticInitFailed *", 0, 0, (void*)"libferrisperl::CurlStaticInitFailed", 0}; +static swig_type_info _swigt__p_Ferris__CursorException = {"_p_Ferris__CursorException", "Ferris::CursorException *", 0, 0, (void*)"libferrisperl::CursorException", 0}; +static swig_type_info _swigt__p_Ferris__DBusConnectionException = {"_p_Ferris__DBusConnectionException", "Ferris::DBusConnectionException *", 0, 0, (void*)"libferrisperl::DBusConnectionException", 0}; +static swig_type_info _swigt__p_Ferris__DBusException = {"_p_Ferris__DBusException", "Ferris::DBusException *", 0, 0, (void*)"libferrisperl::DBusException", 0}; +static swig_type_info _swigt__p_Ferris__DTDCreationFailed = {"_p_Ferris__DTDCreationFailed", "Ferris::DTDCreationFailed *", 0, 0, (void*)"libferrisperl::DTDCreationFailed", 0}; +static swig_type_info _swigt__p_Ferris__DVDReadException = {"_p_Ferris__DVDReadException", "Ferris::DVDReadException *", 0, 0, (void*)"libferrisperl::DVDReadException", 0}; +static swig_type_info _swigt__p_Ferris__Db4Exception = {"_p_Ferris__Db4Exception", "Ferris::Db4Exception *", 0, 0, (void*)"libferrisperl::Db4Exception", 0}; +static swig_type_info _swigt__p_Ferris__Db4KeyNotFound = {"_p_Ferris__Db4KeyNotFound", "Ferris::Db4KeyNotFound *", 0, 0, (void*)"libferrisperl::Db4KeyNotFound", 0}; +static swig_type_info _swigt__p_Ferris__DesktopFileKeyNotFound = {"_p_Ferris__DesktopFileKeyNotFound", "Ferris::DesktopFileKeyNotFound *", 0, 0, (void*)"libferrisperl::DesktopFileKeyNotFound", 0}; +static swig_type_info _swigt__p_Ferris__EAIndexException = {"_p_Ferris__EAIndexException", "Ferris::EAIndexException *", 0, 0, (void*)"libferrisperl::EAIndexException", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom = {"_p_Ferris__EA_Atom", "Ferris::EA_Atom *", 0, 0, (void*)"libferrisperl::EA_Atom", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_RDFCacheAttribute = {"_p_Ferris__EA_Atom_RDFCacheAttribute", "Ferris::EA_Atom_RDFCacheAttribute *", 0, 0, (void*)"libferrisperl::EA_Atom_RDFCacheAttribute", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadOnly = {"_p_Ferris__EA_Atom_ReadOnly", "Ferris::EA_Atom_ReadOnly *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadOnly", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadOnly_PassedInStream = {"_p_Ferris__EA_Atom_ReadOnly_PassedInStream", "Ferris::EA_Atom_ReadOnly_PassedInStream *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadOnly_PassedInStream", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite = {"_p_Ferris__EA_Atom_ReadWrite", "Ferris::EA_Atom_ReadWrite *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadWrite", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t = {"_p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t", "Ferris::EA_Atom_ReadWrite_PassedInStream::GetIStream_PassedInStream_Func_t *|Ferris::EA_Atom_ReadWrite_Base< Ferris::EA_Atom_ReadOnly_PassedInStream >::GetIStream_PassedInStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite_Contents = {"_p_Ferris__EA_Atom_ReadWrite_Contents", "Ferris::EA_Atom_ReadWrite_Contents *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadWrite_Contents", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite_OpenModeCached = {"_p_Ferris__EA_Atom_ReadWrite_OpenModeCached", "Ferris::EA_Atom_ReadWrite_OpenModeCached *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadWrite_OpenModeCached", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite_PassedInStream = {"_p_Ferris__EA_Atom_ReadWrite_PassedInStream", "Ferris::EA_Atom_ReadWrite_PassedInStream *", 0, 0, (void*)"libferrisperl::EA_Atom_ReadWrite_PassedInStream", 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t = {"_p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t", "Ferris::EA_Atom_ReadWrite::RWBase_t::GetIStream_Func_t *|Ferris::EA_Atom_ReadWrite::GetIStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t = {"_p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t", "Ferris::EA_Atom_ReadWrite::RWBase_t::IOStreamClosed_Func_t *|Ferris::EA_Atom_ReadWrite::IOStreamClosed_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__EA_Atom_Static = {"_p_Ferris__EA_Atom_Static", "Ferris::EA_Atom_Static *", 0, 0, (void*)"libferrisperl::EA_Atom_Static", 0}; +static swig_type_info _swigt__p_Ferris__Emblem = {"_p_Ferris__Emblem", "Ferris::Emblem *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__EmblemException = {"_p_Ferris__EmblemException", "Ferris::EmblemException *", 0, 0, (void*)"libferrisperl::EmblemException", 0}; +static swig_type_info _swigt__p_Ferris__EmblemNotFoundException = {"_p_Ferris__EmblemNotFoundException", "Ferris::EmblemNotFoundException *", 0, 0, (void*)"libferrisperl::EmblemNotFoundException", 0}; +static swig_type_info _swigt__p_Ferris__Etagere = {"_p_Ferris__Etagere", "Ferris::Etagere *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__EtagereException = {"_p_Ferris__EtagereException", "Ferris::EtagereException *", 0, 0, (void*)"libferrisperl::EtagereException", 0}; +static swig_type_info _swigt__p_Ferris__FCA__ConceptLattice = {"_p_Ferris__FCA__ConceptLattice", "Ferris::FCA::ConceptLattice *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__FCA__fh_conceptLattice = {"_p_Ferris__FCA__fh_conceptLattice", "Ferris::FCA::fh_conceptLattice *", 0, 0, (void*)"libferrisperl::ConceptLattice", 0}; +static swig_type_info _swigt__p_Ferris__FFilterSyntaxError = {"_p_Ferris__FFilterSyntaxError", "Ferris::FFilterSyntaxError *", 0, 0, (void*)"libferrisperl::FFilterSyntaxError", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf = {"_p_Ferris__FerrisCanNotCreateLeafOfLeaf", "Ferris::FerrisCanNotCreateLeafOfLeaf *", 0, 0, (void*)"libferrisperl::FerrisCanNotCreateLeafOfLeaf", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCanNotGetScriptNameError = {"_p_Ferris__FerrisCanNotGetScriptNameError", "Ferris::FerrisCanNotGetScriptNameError *", 0, 0, (void*)"libferrisperl::FerrisCanNotGetScriptNameError", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCreateAttributeFailed = {"_p_Ferris__FerrisCreateAttributeFailed", "Ferris::FerrisCreateAttributeFailed *", 0, 0, (void*)"libferrisperl::FerrisCreateAttributeFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCreateAttributeNotSupported = {"_p_Ferris__FerrisCreateAttributeNotSupported", "Ferris::FerrisCreateAttributeNotSupported *", 0, 0, (void*)"libferrisperl::FerrisCreateAttributeNotSupported", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCreateSubContextFailed = {"_p_Ferris__FerrisCreateSubContextFailed", "Ferris::FerrisCreateSubContextFailed *", 0, 0, (void*)"libferrisperl::FerrisCreateSubContextFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCreateSubContextNotSupported = {"_p_Ferris__FerrisCreateSubContextNotSupported", "Ferris::FerrisCreateSubContextNotSupported *", 0, 0, (void*)"libferrisperl::FerrisCreateSubContextNotSupported", 0}; +static swig_type_info _swigt__p_Ferris__FerrisCurlServerNameNotFound = {"_p_Ferris__FerrisCurlServerNameNotFound", "Ferris::FerrisCurlServerNameNotFound *", 0, 0, (void*)"libferrisperl::FerrisCurlServerNameNotFound", 0}; +static swig_type_info _swigt__p_Ferris__FerrisExceptionBase = {"_p_Ferris__FerrisExceptionBase", "Ferris::FerrisExceptionBase *", 0, 0, (void*)"libferrisperl::FerrisExceptionBase", 0}; +static swig_type_info _swigt__p_Ferris__FerrisException_CodeState = {"_p_Ferris__FerrisException_CodeState", "Ferris::FerrisException_CodeState *", 0, 0, (void*)"libferrisperl::FerrisException_CodeState", 0}; +static swig_type_info _swigt__p_Ferris__FerrisGIMPImageLoadFailed = {"_p_Ferris__FerrisGIMPImageLoadFailed", "Ferris::FerrisGIMPImageLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisGIMPImageLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisGLibCException = {"_p_Ferris__FerrisGLibCException", "Ferris::FerrisGLibCException *", 0, 0, (void*)"libferrisperl::FerrisGLibCException", 0}; +static swig_type_info _swigt__p_Ferris__FerrisHALException = {"_p_Ferris__FerrisHALException", "Ferris::FerrisHALException *", 0, 0, (void*)"libferrisperl::FerrisHALException", 0}; +static swig_type_info _swigt__p_Ferris__FerrisImageLoadFailed = {"_p_Ferris__FerrisImageLoadFailed", "Ferris::FerrisImageLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisImageLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisImageSaveFailed = {"_p_Ferris__FerrisImageSaveFailed", "Ferris::FerrisImageSaveFailed *", 0, 0, (void*)"libferrisperl::FerrisImageSaveFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisImlib2ImageLoadFailed = {"_p_Ferris__FerrisImlib2ImageLoadFailed", "Ferris::FerrisImlib2ImageLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisImlib2ImageLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisInternalError = {"_p_Ferris__FerrisInternalError", "Ferris::FerrisInternalError *", 0, 0, (void*)"libferrisperl::FerrisInternalError", 0}; +static swig_type_info _swigt__p_Ferris__FerrisJPEGImageLoadFailed = {"_p_Ferris__FerrisJPEGImageLoadFailed", "Ferris::FerrisJPEGImageLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisJPEGImageLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisNotReadableAsContext = {"_p_Ferris__FerrisNotReadableAsContext", "Ferris::FerrisNotReadableAsContext *", 0, 0, (void*)"libferrisperl::FerrisNotReadableAsContext", 0}; +static swig_type_info _swigt__p_Ferris__FerrisNotSupportedInThisContext = {"_p_Ferris__FerrisNotSupportedInThisContext", "Ferris::FerrisNotSupportedInThisContext *", 0, 0, (void*)"libferrisperl::FerrisNotSupportedInThisContext", 0}; +static swig_type_info _swigt__p_Ferris__FerrisOutOfMemory = {"_p_Ferris__FerrisOutOfMemory", "Ferris::FerrisOutOfMemory *", 0, 0, (void*)"libferrisperl::FerrisOutOfMemory", 0}; +static swig_type_info _swigt__p_Ferris__FerrisPNGImageLoadFailed = {"_p_Ferris__FerrisPNGImageLoadFailed", "Ferris::FerrisPNGImageLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisPNGImageLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisParentNotSetError = {"_p_Ferris__FerrisParentNotSetError", "Ferris::FerrisParentNotSetError *", 0, 0, (void*)"libferrisperl::FerrisParentNotSetError", 0}; +static swig_type_info _swigt__p_Ferris__FerrisSetCWDException = {"_p_Ferris__FerrisSetCWDException", "Ferris::FerrisSetCWDException *", 0, 0, (void*)"libferrisperl::FerrisSetCWDException", 0}; +static swig_type_info _swigt__p_Ferris__FerrisSqlServerNameNotFound = {"_p_Ferris__FerrisSqlServerNameNotFound", "Ferris::FerrisSqlServerNameNotFound *", 0, 0, (void*)"libferrisperl::FerrisSqlServerNameNotFound", 0}; +static swig_type_info _swigt__p_Ferris__FerrisStatException = {"_p_Ferris__FerrisStatException", "Ferris::FerrisStatException *", 0, 0, (void*)"libferrisperl::FerrisStatException", 0}; +static swig_type_info _swigt__p_Ferris__FerrisStreamException = {"_p_Ferris__FerrisStreamException", "Ferris::FerrisStreamException *", 0, 0, (void*)"libferrisperl::FerrisStreamException", 0}; +static swig_type_info _swigt__p_Ferris__FerrisStreamLoadFailed = {"_p_Ferris__FerrisStreamLoadFailed", "Ferris::FerrisStreamLoadFailed *", 0, 0, (void*)"libferrisperl::FerrisStreamLoadFailed", 0}; +static swig_type_info _swigt__p_Ferris__FerrisVFSExceptionBase = {"_p_Ferris__FerrisVFSExceptionBase", "Ferris::FerrisVFSExceptionBase *", 0, 0, (void*)"libferrisperl::FerrisVFSExceptionBase", 0}; +static swig_type_info _swigt__p_Ferris__FerrisWaitTimedOut = {"_p_Ferris__FerrisWaitTimedOut", "Ferris::FerrisWaitTimedOut *", 0, 0, (void*)"libferrisperl::FerrisWaitTimedOut", 0}; +static swig_type_info _swigt__p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t = {"_p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t", "Ferris::Ferris_Logging_ostream< char,std::char_traits< char > > *|Ferris::fhl_ostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::Ferris_fstream< char,std::char_traits< char >,std::allocator< char > > *|Ferris::f_fstream *|Ferris::fh_fstream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t = {"_p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t", "Ferris::Ferris_ififostream< char,std::char_traits< char > > *|Ferris::f_ififostream *|Ferris::fh_ififostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::f_ifstream *|Ferris::fh_ifstream *|Ferris::Ferris_ifstream< char,std::char_traits< char >,std::allocator< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t = {"_p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t", "Ferris::f_iostream *|Ferris::fh_iostream *|Ferris::Ferris_iostream< char,std::char_traits< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t = {"_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t", "Ferris::Ferris_istream< char,std::char_traits< char > > *|Ferris::f_istream *|Ferris::fh_istream *|Ferris::closeSignalStream_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::f_istringstream *|Ferris::fh_istringstream *|Ferris::Ferris_istringstream< char,std::char_traits< char >,std::allocator< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::f_ofstream *|Ferris::fh_ofstream *|Ferris::Ferris_ofstream< char,std::char_traits< char >,std::allocator< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t = {"_p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t", "Ferris::Ferris_ostream< char,std::char_traits< char > > *|Ferris::f_ostream *|Ferris::fh_ostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::f_ostringstream *|Ferris::fh_ostringstream *|Ferris::Ferris_ostringstream< char,std::char_traits< char >,std::allocator< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t = {"_p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t", "Ferris::f_stringstream *|Ferris::fh_stringstream *|Ferris::Ferris_stringstream< char,std::char_traits< char >,std::allocator< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__FileClipboard = {"_p_Ferris__FileClipboard", "Ferris::FileClipboard *", 0, 0, (void*)"libferrisperl::FileClipboard", 0}; +static swig_type_info _swigt__p_Ferris__FullTextIndexException = {"_p_Ferris__FullTextIndexException", "Ferris::FullTextIndexException *", 0, 0, (void*)"libferrisperl::FullTextIndexException", 0}; +static swig_type_info _swigt__p_Ferris__FulltextQuerySyntaxError = {"_p_Ferris__FulltextQuerySyntaxError", "Ferris::FulltextQuerySyntaxError *", 0, 0, (void*)"libferrisperl::FulltextQuerySyntaxError", 0}; +static swig_type_info _swigt__p_Ferris__GModuleOpenFailed = {"_p_Ferris__GModuleOpenFailed", "Ferris::GModuleOpenFailed *", 0, 0, (void*)"libferrisperl::GModuleOpenFailed", 0}; +static swig_type_info _swigt__p_Ferris__GPGMEInitFailed = {"_p_Ferris__GPGMEInitFailed", "Ferris::GPGMEInitFailed *", 0, 0, (void*)"libferrisperl::GPGMEInitFailed", 0}; +static swig_type_info _swigt__p_Ferris__GPhoto2 = {"_p_Ferris__GPhoto2", "Ferris::GPhoto2 *", 0, 0, (void*)"libferrisperl::GPhoto2", 0}; +static swig_type_info _swigt__p_Ferris__GdbmException = {"_p_Ferris__GdbmException", "Ferris::GdbmException *", 0, 0, (void*)"libferrisperl::GdbmException", 0}; +static swig_type_info _swigt__p_Ferris__GenericError = {"_p_Ferris__GenericError", "Ferris::GenericError *", 0, 0, (void*)"libferrisperl::GenericError", 0}; +static swig_type_info _swigt__p_Ferris__Handlable = {"_p_Ferris__Handlable", "Ferris::Handlable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__ImplicitIteratorUpdateLock = {"_p_Ferris__ImplicitIteratorUpdateLock", "Ferris::ImplicitIteratorUpdateLock *", 0, 0, (void*)"libferrisperl::ImplicitIteratorUpdateLock", 0}; +static swig_type_info _swigt__p_Ferris__IndexException = {"_p_Ferris__IndexException", "Ferris::IndexException *", 0, 0, (void*)"libferrisperl::IndexException", 0}; +static swig_type_info _swigt__p_Ferris__InvalidModeString = {"_p_Ferris__InvalidModeString", "Ferris::InvalidModeString *", 0, 0, (void*)"libferrisperl::InvalidModeString", 0}; +static swig_type_info _swigt__p_Ferris__InvalidSortSpecification = {"_p_Ferris__InvalidSortSpecification", "Ferris::InvalidSortSpecification *", 0, 0, (void*)"libferrisperl::InvalidSortSpecification", 0}; +static swig_type_info _swigt__p_Ferris__KeylistException = {"_p_Ferris__KeylistException", "Ferris::KeylistException *", 0, 0, (void*)"libferrisperl::KeylistException", 0}; +static swig_type_info _swigt__p_Ferris__LDAPException = {"_p_Ferris__LDAPException", "Ferris::LDAPException *", 0, 0, (void*)"libferrisperl::LDAPException", 0}; +static swig_type_info _swigt__p_Ferris__MalformedURL = {"_p_Ferris__MalformedURL", "Ferris::MalformedURL *", 0, 0, (void*)"libferrisperl::MalformedURL", 0}; +static swig_type_info _swigt__p_Ferris__Medallion = {"_p_Ferris__Medallion", "Ferris::Medallion *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__MedallionBelief = {"_p_Ferris__MedallionBelief", "Ferris::MedallionBelief *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__MedallionException = {"_p_Ferris__MedallionException", "Ferris::MedallionException *", 0, 0, (void*)"libferrisperl::MedallionException", 0}; +static swig_type_info _swigt__p_Ferris__MutableCollectionEvents = {"_p_Ferris__MutableCollectionEvents", "Ferris::MutableCollectionEvents *", 0, 0, (void*)"libferrisperl::MutableCollectionEvents", 0}; +static swig_type_info _swigt__p_Ferris__NoOpenWithContext = {"_p_Ferris__NoOpenWithContext", "Ferris::NoOpenWithContext *", 0, 0, (void*)"libferrisperl::NoOpenWithContext", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchAgentException = {"_p_Ferris__NoSuchAgentException", "Ferris::NoSuchAgentException *", 0, 0, (void*)"libferrisperl::NoSuchAgentException", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchAttribute = {"_p_Ferris__NoSuchAttribute", "Ferris::NoSuchAttribute *", 0, 0, (void*)"libferrisperl::NoSuchAttribute", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchBeliefException = {"_p_Ferris__NoSuchBeliefException", "Ferris::NoSuchBeliefException *", 0, 0, (void*)"libferrisperl::NoSuchBeliefException", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchContextClass = {"_p_Ferris__NoSuchContextClass", "Ferris::NoSuchContextClass *", 0, 0, (void*)"libferrisperl::NoSuchContextClass", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchGroup = {"_p_Ferris__NoSuchGroup", "Ferris::NoSuchGroup *", 0, 0, (void*)"libferrisperl::NoSuchGroup", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchObject = {"_p_Ferris__NoSuchObject", "Ferris::NoSuchObject *", 0, 0, (void*)"libferrisperl::NoSuchObject", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchPersonalityException = {"_p_Ferris__NoSuchPersonalityException", "Ferris::NoSuchPersonalityException *", 0, 0, (void*)"libferrisperl::NoSuchPersonalityException", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchSubContext = {"_p_Ferris__NoSuchSubContext", "Ferris::NoSuchSubContext *", 0, 0, (void*)"libferrisperl::NoSuchSubContext", 0}; +static swig_type_info _swigt__p_Ferris__NoSuchUser = {"_p_Ferris__NoSuchUser", "Ferris::NoSuchUser *", 0, 0, (void*)"libferrisperl::NoSuchUser", 0}; +static swig_type_info _swigt__p_Ferris__NotSupported = {"_p_Ferris__NotSupported", "Ferris::NotSupported *", 0, 0, (void*)"libferrisperl::NotSupported", 0}; +static swig_type_info _swigt__p_Ferris__ObjectExists = {"_p_Ferris__ObjectExists", "Ferris::ObjectExists *", 0, 0, (void*)"libferrisperl::ObjectExists", 0}; +static swig_type_info _swigt__p_Ferris__OpenActionIsNotDefined = {"_p_Ferris__OpenActionIsNotDefined", "Ferris::OpenActionIsNotDefined *", 0, 0, (void*)"libferrisperl::OpenActionIsNotDefined", 0}; +static swig_type_info _swigt__p_Ferris__ParseError = {"_p_Ferris__ParseError", "Ferris::ParseError *", 0, 0, (void*)"libferrisperl::ParseError", 0}; +static swig_type_info _swigt__p_Ferris__Personality = {"_p_Ferris__Personality", "Ferris::Personality *", 0, 0, (void*)"libferrisperl::Personality", 0}; +static swig_type_info _swigt__p_Ferris__PreprocessedSortString = {"_p_Ferris__PreprocessedSortString", "Ferris::PreprocessedSortString *|Ferris::f_sorter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__ProgramSpawn = {"_p_Ferris__ProgramSpawn", "Ferris::ProgramSpawn *", 0, 0, (void*)"libferrisperl::ProgramSpawn", 0}; +static swig_type_info _swigt__p_Ferris__QuotaStorageFull = {"_p_Ferris__QuotaStorageFull", "Ferris::QuotaStorageFull *", 0, 0, (void*)"libferrisperl::QuotaStorageFull", 0}; +static swig_type_info _swigt__p_Ferris__RegexCollection = {"_p_Ferris__RegexCollection", "Ferris::RegexCollection *", 0, 0, (void*)"libferrisperl::RegexCollection", 0}; +static swig_type_info _swigt__p_Ferris__RelativeTimeParsing = {"_p_Ferris__RelativeTimeParsing", "Ferris::RelativeTimeParsing *", 0, 0, (void*)"libferrisperl::RelativeTimeParsing", 0}; +static swig_type_info _swigt__p_Ferris__RemoveFailed = {"_p_Ferris__RemoveFailed", "Ferris::RemoveFailed *", 0, 0, (void*)"libferrisperl::RemoveFailed", 0}; +static swig_type_info _swigt__p_Ferris__RenameFailed = {"_p_Ferris__RenameFailed", "Ferris::RenameFailed *", 0, 0, (void*)"libferrisperl::RenameFailed", 0}; +static swig_type_info _swigt__p_Ferris__RootContextCreationFailed = {"_p_Ferris__RootContextCreationFailed", "Ferris::RootContextCreationFailed *", 0, 0, (void*)"libferrisperl::RootContextCreationFailed", 0}; +static swig_type_info _swigt__p_Ferris__RootContextFactory = {"_p_Ferris__RootContextFactory", "Ferris::RootContextFactory *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__Runner = {"_p_Ferris__Runner", "Ferris::Runner *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__SQLiteException = {"_p_Ferris__SQLiteException", "Ferris::SQLiteException *", 0, 0, (void*)"libferrisperl::SQLiteException", 0}; +static swig_type_info _swigt__p_Ferris__SchemaException = {"_p_Ferris__SchemaException", "Ferris::SchemaException *", 0, 0, (void*)"libferrisperl::SchemaException", 0}; +static swig_type_info _swigt__p_Ferris__SchemaNotFoundException = {"_p_Ferris__SchemaNotFoundException", "Ferris::SchemaNotFoundException *", 0, 0, (void*)"libferrisperl::SchemaNotFoundException", 0}; +static swig_type_info _swigt__p_Ferris__SocketOptionsException = {"_p_Ferris__SocketOptionsException", "Ferris::SocketOptionsException *", 0, 0, (void*)"libferrisperl::SocketOptionsException", 0}; +static swig_type_info _swigt__p_Ferris__StorageFull = {"_p_Ferris__StorageFull", "Ferris::StorageFull *", 0, 0, (void*)"libferrisperl::StorageFull", 0}; +static swig_type_info _swigt__p_Ferris__SubContextAlreadyInUse = {"_p_Ferris__SubContextAlreadyInUse", "Ferris::SubContextAlreadyInUse *", 0, 0, (void*)"libferrisperl::SubContextAlreadyInUse", 0}; +static swig_type_info _swigt__p_Ferris__SyntaxError = {"_p_Ferris__SyntaxError", "Ferris::SyntaxError *", 0, 0, (void*)"libferrisperl::SyntaxError", 0}; +static swig_type_info _swigt__p_Ferris__Time__Benchmark = {"_p_Ferris__Time__Benchmark", "Ferris::Time::Benchmark *", 0, 0, (void*)"libferrisperl::Benchmark", 0}; +static swig_type_info _swigt__p_Ferris__Times = {"_p_Ferris__Times", "Ferris::Times *", 0, 0, (void*)"libferrisperl::Times", 0}; +static swig_type_info _swigt__p_Ferris__URLDecodeSyntaxError = {"_p_Ferris__URLDecodeSyntaxError", "Ferris::URLDecodeSyntaxError *", 0, 0, (void*)"libferrisperl::URLDecodeSyntaxError", 0}; +static swig_type_info _swigt__p_Ferris__UnknownBackupMode = {"_p_Ferris__UnknownBackupMode", "Ferris::UnknownBackupMode *", 0, 0, (void*)"libferrisperl::UnknownBackupMode", 0}; +static swig_type_info _swigt__p_Ferris__UnknownConfigLocation = {"_p_Ferris__UnknownConfigLocation", "Ferris::UnknownConfigLocation *", 0, 0, (void*)"libferrisperl::UnknownConfigLocation", 0}; +static swig_type_info _swigt__p_Ferris__UnspoortedBlockSize = {"_p_Ferris__UnspoortedBlockSize", "Ferris::UnspoortedBlockSize *", 0, 0, (void*)"libferrisperl::UnspoortedBlockSize", 0}; +static swig_type_info _swigt__p_Ferris__Util__SingleShot = {"_p_Ferris__Util__SingleShot", "Ferris::Util::SingleShot *", 0, 0, (void*)"libferrisperl::SingleShot", 0}; +static swig_type_info _swigt__p_Ferris__Versioned = {"_p_Ferris__Versioned", "Ferris::Versioned *", 0, 0, (void*)"libferrisperl::Versioned", 0}; +static swig_type_info _swigt__p_Ferris__WebPhotoException = {"_p_Ferris__WebPhotoException", "Ferris::WebPhotoException *", 0, 0, (void*)"libferrisperl::WebPhotoException", 0}; +static swig_type_info _swigt__p_Ferris__XMLBase = {"_p_Ferris__XMLBase", "Ferris::XMLBase *", 0, 0, (void*)"libferrisperl::XMLBase", 0}; +static swig_type_info _swigt__p_Ferris__XMLFatalError = {"_p_Ferris__XMLFatalError", "Ferris::XMLFatalError *", 0, 0, (void*)"libferrisperl::XMLFatalError", 0}; +static swig_type_info _swigt__p_Ferris__XMLParseError = {"_p_Ferris__XMLParseError", "Ferris::XMLParseError *", 0, 0, (void*)"libferrisperl::XMLParseError", 0}; +static swig_type_info _swigt__p_Ferris__XMPBase = {"_p_Ferris__XMPBase", "Ferris::XMPBase *", 0, 0, (void*)"libferrisperl::XMPBase", 0}; +static swig_type_info _swigt__p_Ferris__XMPPacketScanFailed = {"_p_Ferris__XMPPacketScanFailed", "Ferris::XMPPacketScanFailed *", 0, 0, (void*)"libferrisperl::XMPPacketScanFailed", 0}; +static swig_type_info _swigt__p_Ferris__dbXMLException = {"_p_Ferris__dbXMLException", "Ferris::dbXMLException *", 0, 0, (void*)"libferrisperl::dbXMLException", 0}; +static swig_type_info _swigt__p_Ferris__eetException = {"_p_Ferris__eetException", "Ferris::eetException *", 0, 0, (void*)"libferrisperl::eetException", 0}; +static swig_type_info _swigt__p_Ferris__eetKeyNotFound = {"_p_Ferris__eetKeyNotFound", "Ferris::eetKeyNotFound *", 0, 0, (void*)"libferrisperl::eetKeyNotFound", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_fourk = {"_p_Ferris__ferris_basic_streambuf_fourk", "Ferris::ferris_basic_streambuf_fourk *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_fourk", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_onemeg = {"_p_Ferris__ferris_basic_streambuf_onemeg", "Ferris::ferris_basic_streambuf_onemeg *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_onemeg", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_quartk = {"_p_Ferris__ferris_basic_streambuf_quartk", "Ferris::ferris_basic_streambuf_quartk *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_quartk", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_sixteenbytes = {"_p_Ferris__ferris_basic_streambuf_sixteenbytes", "Ferris::ferris_basic_streambuf_sixteenbytes *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_sixteenbytes", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_sixteenk = {"_p_Ferris__ferris_basic_streambuf_sixteenk", "Ferris::ferris_basic_streambuf_sixteenk *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_sixteenk", 0}; +static swig_type_info _swigt__p_Ferris__ferris_basic_streambuf_virtual = {"_p_Ferris__ferris_basic_streambuf_virtual", "Ferris::ferris_basic_streambuf_virtual *", 0, 0, (void*)"libferrisperl::ferris_basic_streambuf_virtual", 0}; +static swig_type_info _swigt__p_Ferris__ferris_ios = {"_p_Ferris__ferris_ios", "Ferris::ferris_ios *", 0, 0, (void*)"libferrisperl::ferris_ios", 0}; +static swig_type_info _swigt__p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t = {"_p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t", "Ferris::ferris_streambuf< char,std::char_traits< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Ferris__fh_attrcol = {"_p_Ferris__fh_attrcol", "Ferris::fh_attrcol *", 0, 0, (void*)"libferrisperl::AttributeCollection", 0}; +static swig_type_info _swigt__p_Ferris__fh_attribute = {"_p_Ferris__fh_attribute", "Ferris::fh_attribute *", 0, 0, (void*)"libferrisperl::AttributeProxy", 0}; +static swig_type_info _swigt__p_Ferris__fh_cemblem = {"_p_Ferris__fh_cemblem", "Ferris::fh_cemblem *", 0, 0, (void*)"libferrisperl::ColdEmblem", 0}; +static swig_type_info _swigt__p_Ferris__fh_context = {"_p_Ferris__fh_context", "Ferris::fh_context *|Ferris::ContextIterator::pointer *|Ferris::ContextIterator::reference *", 0, 0, (void*)"libferrisperl::Context", 0}; +static swig_type_info _swigt__p_Ferris__fh_emblem = {"_p_Ferris__fh_emblem", "Ferris::fh_emblem *", 0, 0, (void*)"libferrisperl::Emblem", 0}; +static swig_type_info _swigt__p_Ferris__fh_emblem_less = {"_p_Ferris__fh_emblem_less", "Ferris::fh_emblem_less *", 0, 0, (void*)"libferrisperl::fh_emblem_less", 0}; +static swig_type_info _swigt__p_Ferris__fh_etagere = {"_p_Ferris__fh_etagere", "Ferris::fh_etagere *", 0, 0, (void*)"libferrisperl::Etagere", 0}; +static swig_type_info _swigt__p_Ferris__fh_medallion = {"_p_Ferris__fh_medallion", "Ferris::fh_medallion *", 0, 0, (void*)"libferrisperl::Medallion", 0}; +static swig_type_info _swigt__p_Ferris__fh_medallionBelief = {"_p_Ferris__fh_medallionBelief", "Ferris::fh_medallionBelief *", 0, 0, (void*)"libferrisperl::MedallionBelief", 0}; +static swig_type_info _swigt__p_Ferris__fh_runner = {"_p_Ferris__fh_runner", "Ferris::fh_runner *", 0, 0, (void*)"libferrisperl::Runner", 0}; +static swig_type_info _swigt__p_Ferris__fh_sorter = {"_p_Ferris__fh_sorter", "Ferris::fh_sorter *", 0, 0, (void*)"libferrisperl::PreprocessedSortString", 0}; +static swig_type_info _swigt__p_Ferris__getIOStreamCloseUpdateFailed = {"_p_Ferris__getIOStreamCloseUpdateFailed", "Ferris::getIOStreamCloseUpdateFailed *", 0, 0, (void*)"libferrisperl::getIOStreamCloseUpdateFailed", 0}; +static swig_type_info _swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied = {"_p_Ferris__getIOStreamCloseUpdatePermissionDenied", "Ferris::getIOStreamCloseUpdatePermissionDenied *", 0, 0, (void*)"libferrisperl::getIOStreamCloseUpdatePermissionDenied", 0}; +static swig_type_info _swigt__p_Ferris__giStreamPosRAII = {"_p_Ferris__giStreamPosRAII", "Ferris::giStreamPosRAII *", 0, 0, (void*)"libferrisperl::giStreamPosRAII", 0}; +static swig_type_info _swigt__p_Ferris__tdbException = {"_p_Ferris__tdbException", "Ferris::tdbException *", 0, 0, (void*)"libferrisperl::tdbException", 0}; +static swig_type_info _swigt__p_GSpawnFlags = {"_p_GSpawnFlags", "GSpawnFlags *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GenericCloseSignal_t = {"_p_GenericCloseSignal_t", "GenericCloseSignal_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GetIOStream_Func_t = {"_p_GetIOStream_Func_t", "GetIOStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GetIStream_Func_t = {"_p_GetIStream_Func_t", "GetIStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GetIStream_PassedInStream_Func_t = {"_p_GetIStream_PassedInStream_Func_t", "GetIStream_PassedInStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_IOStreamClosed_Func_t = {"_p_IOStreamClosed_Func_t", "IOStreamClosed_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__AllowConversion = {"_p_Loki__AllowConversion", "Loki::AllowConversion *", 0, 0, (void*)"libferrisperl::AllowConversion", 0}; +static swig_type_info _swigt__p_Loki__AssocVectorT_void_p_sigc__connection_t = {"_p_Loki__AssocVectorT_void_p_sigc__connection_t", "Ferris::Priv::conmap_t *|Loki::AssocVector< void *,sigc::connection > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__AssocVectorT_void_p_void_p_t = {"_p_Loki__AssocVectorT_void_p_void_p_t", "Loki::AssocVector< void *,void * > *|Ferris::Priv::m_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__DisallowConversion = {"_p_Loki__DisallowConversion", "Loki::DisallowConversion *", 0, 0, (void*)"libferrisperl::DisallowConversion", 0}; +static swig_type_info _swigt__p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t = {"_p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t", "Ferris::EA_Atom_ReadWrite::GetIOStream_Func_t *|Loki::Functor< Ferris::Ferris_iostream< char,std::char_traits< char > >,LOKI_TYPELIST_3 (Ferris::Context *,std::string const &,Ferris::EA_Atom *) > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t = {"_p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t", "Loki::Functor< Ferris::Ferris_istream< char,std::char_traits< char > >,LOKI_TYPELIST_3 (Ferris::Context *,std::string const &,Ferris::EA_Atom *) > *|Ferris::EA_Atom_ReadOnly::GetIStream_Func_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t = {"_p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t", "Ferris::Context::f_imageEAGenerator *|Loki::Functor< Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage >,LOKI_TYPELIST_1 (Ferris::fh_context const &) > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t = {"_p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t", "Loki::Functor< bool,LOKI_TYPELIST_1 (Ferris::fh_context const &) > *|Ferris::fh_matcher *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t = {"_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t", "Loki::Functor< void,LOKI_TYPELIST_1 (Ferris::fh_emblem const &) > *|Ferris::Etagere::f_emblemVisitor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t = {"_p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t", "Ferris::Runner::ChildSetupFunctor_t *|Loki::Functor< void,LOKI_TYPELIST_1 (Ferris::fh_runner) > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t = {"_p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t", "Ferris::EA_Atom_ReadWrite_PassedInStream::IOStreamClosed_Func_t *|Loki::Functor< void,LOKI_TYPELIST_4 (Ferris::Context *,std::string const &,Ferris::EA_Atom *,Ferris::Ferris_istream< char,std::char_traits< char > >) > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__NullPointerException = {"_p_Loki__NullPointerException", "Loki::NullPointerException *", 0, 0, (void*)"libferrisperl::NullPointerException", 0}; +static swig_type_info _swigt__p_Loki__Private__RefLinkedBase = {"_p_Loki__Private__RefLinkedBase", "Loki::Private::RefLinkedBase *", 0, 0, (void*)"libferrisperl::RefLinkedBase", 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::AI::Agent,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::AI::fh_agent *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_aiohandler *|Loki::SmartPtr< Ferris::AsyncIOHandler,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_mdcontext *|Loki::SmartPtr< Ferris::CreateMetaDataContext,::Ferris::FerrisExRefCountedContext,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::EAIndex::fh_db4treeidx *|Loki::SmartPtr< Ferris::EAIndex::EAIndexManagerDB4Tree,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::EAIndex::EAIndexManagerDB4,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::EAIndex::fh_db4idx *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::EAIndex::EAQuery,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::EAIndex::fh_eaquery *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::EAIndex::fh_fwdeaidx *|Loki::SmartPtr< Ferris::EAIndex::ForwardEAIndexInterface,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_FerrisSlaveProcess *|Loki::SmartPtr< Ferris::FerrisSlaveProcess,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_display_aggdata *|Loki::SmartPtr< Ferris::Ferrisls_aggregate_data,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_image *|Loki::SmartPtr< Ferris::Image,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::fh_personality *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_regex *|Loki::SmartPtr< Ferris::Regex,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::Semantic::SmushSet,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::Semantic::fh_SmushSet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::Semantic::TreeSmushing,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::Semantic::fh_TreeSmushing *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::Time::Benchmark,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::Time::fh_benchmark *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_times *|Loki::SmartPtr< Ferris::Times,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::fh_xstreamcol *|Loki::SmartPtr< Ferris::XMLMsgStreamCollector,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Ferris::redlandea::fh_SmushSet *|Loki::SmartPtr< Ferris::redlandea::SmushSet,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t = {"_p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t", "Loki::SmartPtr< Ferris::redlandea::TreeSmushing,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > *|Ferris::redlandea::fh_TreeSmushing *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t = {"_p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t", "Ferris::fh_rex *|Loki::SmartPtr< ::boost::regex,Loki::RefLinked,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,Loki::DefaultSPStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t = {"_p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t", "Loki::SmartPtr< char,Loki::DestructiveCopy,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,Loki::DefaultSPStorage > *|Ferris::fh_char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Changed = {"_p_NamingEvent_Changed", "NamingEvent_Changed *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Changed_Sig_t = {"_p_NamingEvent_Changed_Sig_t", "NamingEvent_Changed_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Created = {"_p_NamingEvent_Created", "NamingEvent_Created *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Created_Sig_t = {"_p_NamingEvent_Created_Sig_t", "NamingEvent_Created_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Deleted = {"_p_NamingEvent_Deleted", "NamingEvent_Deleted *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Deleted_Sig_t = {"_p_NamingEvent_Deleted_Sig_t", "NamingEvent_Deleted_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Exists = {"_p_NamingEvent_Exists", "NamingEvent_Exists *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Exists_Sig_t = {"_p_NamingEvent_Exists_Sig_t", "NamingEvent_Exists_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_MedallionUpdated_Sig_t = {"_p_NamingEvent_MedallionUpdated_Sig_t", "NamingEvent_MedallionUpdated_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Moved = {"_p_NamingEvent_Moved", "NamingEvent_Moved *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Moved_Sig_t = {"_p_NamingEvent_Moved_Sig_t", "NamingEvent_Moved_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Start_Execute = {"_p_NamingEvent_Start_Execute", "NamingEvent_Start_Execute *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Start_Execute_Sig_t = {"_p_NamingEvent_Start_Execute_Sig_t", "NamingEvent_Start_Execute_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Start_Reading_Context = {"_p_NamingEvent_Start_Reading_Context", "NamingEvent_Start_Reading_Context *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Start_Reading_Context_Sig_t = {"_p_NamingEvent_Start_Reading_Context_Sig_t", "NamingEvent_Start_Reading_Context_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Stop_Execute = {"_p_NamingEvent_Stop_Execute", "NamingEvent_Stop_Execute *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Stop_Execute_Sig_t = {"_p_NamingEvent_Stop_Execute_Sig_t", "NamingEvent_Stop_Execute_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Stop_Reading_Context = {"_p_NamingEvent_Stop_Reading_Context", "NamingEvent_Stop_Reading_Context *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NamingEvent_Stop_Reading_Context_Sig_t = {"_p_NamingEvent_Stop_Reading_Context_Sig_t", "NamingEvent_Stop_Reading_Context_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_OnlyInCacheSignal_t = {"_p_OnlyInCacheSignal_t", "OnlyInCacheSignal_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PostfixTrimmerOps = {"_p_PostfixTrimmerOps", "PostfixTrimmerOps *", 0, 0, (void*)"libferrisperl::PostfixTrimmerOps", 0}; +static swig_type_info _swigt__p_PrefixTrimmerOps = {"_p_PrefixTrimmerOps", "PrefixTrimmerOps *", 0, 0, (void*)"libferrisperl::PrefixTrimmerOps", 0}; +static swig_type_info _swigt__p_RWBase_t = {"_p_RWBase_t", "RWBase_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Runner_AsyncIOFunctor_t = {"_p_Runner_AsyncIOFunctor_t", "Runner_AsyncIOFunctor_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SubContextNames_t = {"_p_SubContextNames_t", "SubContextNames_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TrimmerBase = {"_p_TrimmerBase", "TrimmerBase *", 0, 0, (void*)"libferrisperl::TrimmerBase", 0}; +static swig_type_info _swigt__p_TrimmerT_PostfixTrimmerOps_t = {"_p_TrimmerT_PostfixTrimmerOps_t", "PostfixTrimmer *|Trimmer< PostfixTrimmerOps > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TrimmerT_PrefixTrimmerOps_t = {"_p_TrimmerT_PrefixTrimmerOps_t", "PrefixTrimmer *|Trimmer< PrefixTrimmerOps > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Version_t = {"_p_Version_t", "Version_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XSDBasic_t = {"_p_XSDBasic_t", "XSDBasic_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p__Base = {"_p__Base", "_Base *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p__Self = {"_p__Self", "_Self *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t = {"_p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t", "__gnu_cxx::stdio_filebuf< char,std::char_traits< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_fh_insideResolve = {"_p_fh_insideResolve", "fh_insideResolve *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_fh_ostream = {"_p_fh_ostream", "fh_ostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_freelist_t = {"_p_freelist_t", "freelist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gboolean = {"_p_gboolean", "gboolean *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gint = {"_p_gint", "gint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_guint32 = {"_p_guint32", "guint32 *|Ferris::Versioned::Version_t *|Ferris::emblemID_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_guint64 = {"_p_guint64", "guint64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_iterator_category = {"_p_iterator_category", "iterator_category *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_openmode = {"_p_openmode", "openmode *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_std__istringstream = {"_p_p_std__istringstream", "std::istringstream **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_std__ostringstream = {"_p_p_std__ostringstream", "std::ostringstream **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_std__stringstream = {"_p_p_std__stringstream", "std::stringstream **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pid_t = {"_p_pid_t", "pid_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pointer = {"_p_pointer", "pointer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_poptContext = {"_p_poptContext", "poptContext *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_poptOption = {"_p_poptOption", "::poptOption *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ref_count_t = {"_p_ref_count_t", "ref_count_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal1T_void_FerrisLoki__Handlable_p_t = {"_p_sigc__signal1T_void_FerrisLoki__Handlable_p_t", "FerrisLoki::Handlable::GenericCloseSignal_t *|sigc::signal1< void,FerrisLoki::Handlable * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal1T_void_Ferris__CacheHandlable_p_t = {"_p_sigc__signal1T_void_Ferris__CacheHandlable_p_t", "Ferris::CacheHandlable::OnlyInCacheSignal_t *|sigc::signal1< void,Ferris::CacheHandlable * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal1T_void_Ferris__fh_context_t = {"_p_sigc__signal1T_void_Ferris__fh_context_t", "sigc::signal1< void,Ferris::fh_context > *|Ferris::MutableCollectionEvents::NamingEvent_MedallionUpdated_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t = {"_p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t", "sigc::signal1< void,NamingEvent_Start_Reading_Context * > *|Ferris::MutableCollectionEvents::NamingEvent_Start_Reading_Context_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t = {"_p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t", "sigc::signal1< void,NamingEvent_Stop_Reading_Context * > *|Ferris::MutableCollectionEvents::NamingEvent_Stop_Reading_Context_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t = {"_p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t", "Ferris::closeSignal_t *|sigc::signal2< void,Ferris::closeSignalStream_t &,std::streamsize > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t = {"_p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t", "Ferris::MutableCollectionEvents::ContextEvent_Headers_Received_Sig_t *|sigc::signal2< void,Ferris::fh_context,Ferris::stringset_t const & > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t = {"_p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t", "Ferris::Emblem::AddedParent_Sig_t *|Ferris::Emblem::AddedChild_Sig_t *|Ferris::Emblem::RemovedParent_Sig_t *|Ferris::Emblem::RemovedChild_Sig_t *|sigc::signal2< void,Ferris::fh_emblem,Ferris::fh_emblem > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t = {"_p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t", "sigc::signal2< void,Ferris::fh_etagere,Ferris::fh_emblem > *|Ferris::Etagere::EmblemCreated_Sig_t *|Ferris::Etagere::AddedChild_Sig_t *|Ferris::Etagere::RemovedChild_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t = {"_p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t", "sigc::signal3< void,Ferris::fh_emblem,std::string,std::string > *|Ferris::Emblem::IconName_Changed_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t = {"_p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t", "sigc::signal3< void,NamingEvent_Changed *,std::string,std::string > *|Ferris::MutableCollectionEvents::NamingEvent_Changed_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t = {"_p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t", "sigc::signal3< void,NamingEvent_Deleted *,std::string,std::string > *|Ferris::MutableCollectionEvents::NamingEvent_Deleted_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t = {"_p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t", "sigc::signal3< void,NamingEvent_Moved *,std::string,std::string > *|Ferris::MutableCollectionEvents::NamingEvent_Moved_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t = {"_p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t", "Ferris::MutableCollectionEvents::NamingEvent_Start_Execute_Sig_t *|sigc::signal3< void,NamingEvent_Start_Execute *,std::string,std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t = {"_p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t", "Ferris::MutableCollectionEvents::NamingEvent_Stop_Execute_Sig_t *|sigc::signal3< void,NamingEvent_Stop_Execute *,std::string,std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t = {"_p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t", "sigc::signal4< void,Ferris::fh_context,Ferris::fh_context,int,int > *|Ferris::Factory::ConvertToCompressedChunkContextProgress_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t = {"_p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t", "Ferris::MutableCollectionEvents::NamingEvent_Created_Sig_t *|sigc::signal4< void,NamingEvent_Created *,Ferris::fh_context const &,std::string,std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t = {"_p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t", "sigc::signal4< void,NamingEvent_Exists *,Ferris::fh_context const &,std::string,std::string > *|Ferris::MutableCollectionEvents::NamingEvent_Exists_Sig_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_sigc__trackable = {"_p_sigc__trackable", "sigc::trackable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t = {"_p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t", "std::basic_ostream< wchar_t,std::char_traits< wchar_t > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__basic_streambufT_char_std__char_traitsT_char_t_t = {"_p_std__basic_streambufT_char_std__char_traitsT_char_t_t", "std::basic_streambuf< char,std::char_traits< char > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ios__openmode = {"_p_std__ios__openmode", "std::ios::openmode *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__iostream = {"_p_std__iostream", "std::iostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__istream = {"_p_std__istream", "std::istream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__istringstream = {"_p_std__istringstream", "std::istringstream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Ferris__fh_context_t = {"_p_std__listT_Ferris__fh_context_t", "std::list< Ferris::fh_context > *|Ferris::ctxlist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Ferris__fh_emblem_t = {"_p_std__listT_Ferris__fh_emblem_t", "std::list< Ferris::fh_emblem > *|Ferris::emblems_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Ferris__fh_sorter_t = {"_p_std__listT_Ferris__fh_sorter_t", "Ferris::fh_sorters *|std::list< Ferris::fh_sorter > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t = {"_p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t", "std::list< Loki::Functor< bool,LOKI_TYPELIST_1 (Ferris::fh_context const &) > > *|Ferris::fh_matchers *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t = {"_p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t", "std::list< Loki::SmartPtr< Ferris::Personality,FerrisLoki::FerrisExRefCounted,Loki::DisallowConversion,FerrisLoki::FerrisExSmartPointerChecker,FerrisLoki::FerrisExSmartPtrStorage > > *|std::list< Ferris::fh_personality > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_std__pairT_std__string_std__string_t_t = {"_p_std__listT_std__pairT_std__string_std__string_t_t", "std::list< std::pair< std::string,std::string > > *|Ferris::Factory::EndingList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_std__string_t = {"_p_std__listT_std__string_t", "Ferris::Context::SplitPath_t *|Ferris::ContextCollection::SubContextNames_t *|Ferris::AttributeCollection::AttributeNames_t *|std::list< std::string > *|Ferris::stringlist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t = {"_p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t", "Ferris::Factory::xsdtypemap_t *|std::map< enum Ferris::XSDBasic_t,Ferris::fh_context > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_int_t = {"_p_std__mapT_int_int_t", "Ferris::intmap_t *|std::map< int,int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_std__string_std__string_t = {"_p_std__mapT_std__string_std__string_t", "Ferris::stringmap_t *|Ferris::StringMap_t *|std::map< std::string,std::string > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostringstream = {"_p_std__ostringstream", "std::ostringstream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__out_of_range = {"_p_std__out_of_range", "std::out_of_range *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__pairT_std__string_std__string_t = {"_p_std__pairT_std__string_std__string_t", "Ferris::userpass_t *|std::pair< std::string,std::string > *|Ferris::stringpair_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__reverse_iteratorT_Ferris__ContextIterator_t = {"_p_std__reverse_iteratorT_Ferris__ContextIterator_t", "std::reverse_iterator< Ferris::ContextIterator > *|Ferris::Context::reverse_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t = {"_p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t", "std::set< Ferris::fh_emblem,Ferris::fh_emblem_less > *|Ferris::emblemset_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__setT_guint32_t = {"_p_std__setT_guint32_t", "std::set< guint32 > *|std::set< Ferris::emblemID_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__setT_std__string_t = {"_p_std__setT_std__string_t", "std::set< std::string > *|Ferris::stringset_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__streampos = {"_p_std__streampos", "std::streampos *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__streamsize = {"_p_std__streamsize", "std::streamsize *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__stringstream = {"_p_std__stringstream", "std::stringstream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< int > *", 0, 0, (void*)"libferrisperl::IntVector", 0}; +static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "Ferris::stringvec_t *|std::vector< std::string > *|Ferris::Runner::ArgArray_t *", 0, 0, (void*)"libferrisperl::StringVector", 0}; +static swig_type_info _swigt__p_std__wstring = {"_p_std__wstring", "std::wstring *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_tm = {"_p_tm", "tm *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *|FerrisLoki::Handlable::ref_count_t *|::Ferris::Handlable::ref_count_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t, + &_swigt__p_ContextEvent_Headers_Received_Sig_t, + &_swigt__p_Fampp__FamppDirMonitorInitFailedException, + &_swigt__p_FerrisLoki__FerrisSmallObjAllocator, + &_swigt__p_FerrisLoki__Handlable, + &_swigt__p_Ferris__AI__Agent, + &_swigt__p_Ferris__AccessDenied, + &_swigt__p_Ferris__AgentAlreadyExistsException, + &_swigt__p_Ferris__AgentException, + &_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, + &_swigt__p_Ferris__Attribute, + &_swigt__p_Ferris__AttributeAlreadyInUse, + &_swigt__p_Ferris__AttributeCollection, + &_swigt__p_Ferris__AttributeNotWritable, + &_swigt__p_Ferris__AttributeProxy, + &_swigt__p_Ferris__BackupException, + &_swigt__p_Ferris__BackupNameWouldBeTooLong, + &_swigt__p_Ferris__BadParam, + &_swigt__p_Ferris__BadSignature, + &_swigt__p_Ferris__BadlyFormedTime, + &_swigt__p_Ferris__BadlyFormedTimeString, + &_swigt__p_Ferris__BranchFileSystem, + &_swigt__p_Ferris__CacheHandlable, + &_swigt__p_Ferris__CacheManager, + &_swigt__p_Ferris__CanNotAddEmblemException, + &_swigt__p_Ferris__CanNotAddExternalAttribute, + &_swigt__p_Ferris__CanNotDelete, + &_swigt__p_Ferris__CanNotDereferenceDanglingSoftLink, + &_swigt__p_Ferris__CanNotGetStream, + &_swigt__p_Ferris__CanNotMonitorDirWithFAM, + &_swigt__p_Ferris__CanNotReadContext, + &_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, + &_swigt__p_Ferris__ChildNotRunning, + &_swigt__p_Ferris__ColdEmblem, + &_swigt__p_Ferris__CompressionAlgoNotFoundException, + &_swigt__p_Ferris__CompressionException, + &_swigt__p_Ferris__ContentNotModified, + &_swigt__p_Ferris__Context, + &_swigt__p_Ferris__ContextCollection, + &_swigt__p_Ferris__ContextExists, + &_swigt__p_Ferris__ContextIterator, + &_swigt__p_Ferris__ContextSetCompare, + &_swigt__p_Ferris__CopyFailed, + &_swigt__p_Ferris__CreateFIFO, + &_swigt__p_Ferris__CreateMetaDataContext, + &_swigt__p_Ferris__CryptoBase, + &_swigt__p_Ferris__CurlEasyInitFailed, + &_swigt__p_Ferris__CurlPerformFailed, + &_swigt__p_Ferris__CurlStateError, + &_swigt__p_Ferris__CurlStaticInitFailed, + &_swigt__p_Ferris__CursorException, + &_swigt__p_Ferris__DBusConnectionException, + &_swigt__p_Ferris__DBusException, + &_swigt__p_Ferris__DTDCreationFailed, + &_swigt__p_Ferris__DVDReadException, + &_swigt__p_Ferris__Db4Exception, + &_swigt__p_Ferris__Db4KeyNotFound, + &_swigt__p_Ferris__DesktopFileKeyNotFound, + &_swigt__p_Ferris__EAIndexException, + &_swigt__p_Ferris__EA_Atom, + &_swigt__p_Ferris__EA_Atom_RDFCacheAttribute, + &_swigt__p_Ferris__EA_Atom_ReadOnly, + &_swigt__p_Ferris__EA_Atom_ReadOnly_PassedInStream, + &_swigt__p_Ferris__EA_Atom_ReadWrite, + &_swigt__p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t, + &_swigt__p_Ferris__EA_Atom_ReadWrite_Contents, + &_swigt__p_Ferris__EA_Atom_ReadWrite_OpenModeCached, + &_swigt__p_Ferris__EA_Atom_ReadWrite_PassedInStream, + &_swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, + &_swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, + &_swigt__p_Ferris__EA_Atom_Static, + &_swigt__p_Ferris__Emblem, + &_swigt__p_Ferris__EmblemException, + &_swigt__p_Ferris__EmblemNotFoundException, + &_swigt__p_Ferris__Etagere, + &_swigt__p_Ferris__EtagereException, + &_swigt__p_Ferris__FCA__ConceptLattice, + &_swigt__p_Ferris__FCA__fh_conceptLattice, + &_swigt__p_Ferris__FFilterSyntaxError, + &_swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf, + &_swigt__p_Ferris__FerrisCanNotGetScriptNameError, + &_swigt__p_Ferris__FerrisCreateAttributeFailed, + &_swigt__p_Ferris__FerrisCreateAttributeNotSupported, + &_swigt__p_Ferris__FerrisCreateSubContextFailed, + &_swigt__p_Ferris__FerrisCreateSubContextNotSupported, + &_swigt__p_Ferris__FerrisCurlServerNameNotFound, + &_swigt__p_Ferris__FerrisExceptionBase, + &_swigt__p_Ferris__FerrisException_CodeState, + &_swigt__p_Ferris__FerrisGIMPImageLoadFailed, + &_swigt__p_Ferris__FerrisGLibCException, + &_swigt__p_Ferris__FerrisHALException, + &_swigt__p_Ferris__FerrisImageLoadFailed, + &_swigt__p_Ferris__FerrisImageSaveFailed, + &_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, + &_swigt__p_Ferris__FerrisInternalError, + &_swigt__p_Ferris__FerrisJPEGImageLoadFailed, + &_swigt__p_Ferris__FerrisNotReadableAsContext, + &_swigt__p_Ferris__FerrisNotSupportedInThisContext, + &_swigt__p_Ferris__FerrisOutOfMemory, + &_swigt__p_Ferris__FerrisPNGImageLoadFailed, + &_swigt__p_Ferris__FerrisParentNotSetError, + &_swigt__p_Ferris__FerrisSetCWDException, + &_swigt__p_Ferris__FerrisSqlServerNameNotFound, + &_swigt__p_Ferris__FerrisStatException, + &_swigt__p_Ferris__FerrisStreamException, + &_swigt__p_Ferris__FerrisStreamLoadFailed, + &_swigt__p_Ferris__FerrisVFSExceptionBase, + &_swigt__p_Ferris__FerrisWaitTimedOut, + &_swigt__p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + &_swigt__p_Ferris__FileClipboard, + &_swigt__p_Ferris__FullTextIndexException, + &_swigt__p_Ferris__FulltextQuerySyntaxError, + &_swigt__p_Ferris__GModuleOpenFailed, + &_swigt__p_Ferris__GPGMEInitFailed, + &_swigt__p_Ferris__GPhoto2, + &_swigt__p_Ferris__GdbmException, + &_swigt__p_Ferris__GenericError, + &_swigt__p_Ferris__Handlable, + &_swigt__p_Ferris__ImplicitIteratorUpdateLock, + &_swigt__p_Ferris__IndexException, + &_swigt__p_Ferris__InvalidModeString, + &_swigt__p_Ferris__InvalidSortSpecification, + &_swigt__p_Ferris__KeylistException, + &_swigt__p_Ferris__LDAPException, + &_swigt__p_Ferris__MalformedURL, + &_swigt__p_Ferris__Medallion, + &_swigt__p_Ferris__MedallionBelief, + &_swigt__p_Ferris__MedallionException, + &_swigt__p_Ferris__MutableCollectionEvents, + &_swigt__p_Ferris__NoOpenWithContext, + &_swigt__p_Ferris__NoSuchAgentException, + &_swigt__p_Ferris__NoSuchAttribute, + &_swigt__p_Ferris__NoSuchBeliefException, + &_swigt__p_Ferris__NoSuchContextClass, + &_swigt__p_Ferris__NoSuchGroup, + &_swigt__p_Ferris__NoSuchObject, + &_swigt__p_Ferris__NoSuchPersonalityException, + &_swigt__p_Ferris__NoSuchSubContext, + &_swigt__p_Ferris__NoSuchUser, + &_swigt__p_Ferris__NotSupported, + &_swigt__p_Ferris__ObjectExists, + &_swigt__p_Ferris__OpenActionIsNotDefined, + &_swigt__p_Ferris__ParseError, + &_swigt__p_Ferris__Personality, + &_swigt__p_Ferris__PreprocessedSortString, + &_swigt__p_Ferris__ProgramSpawn, + &_swigt__p_Ferris__QuotaStorageFull, + &_swigt__p_Ferris__RegexCollection, + &_swigt__p_Ferris__RelativeTimeParsing, + &_swigt__p_Ferris__RemoveFailed, + &_swigt__p_Ferris__RenameFailed, + &_swigt__p_Ferris__RootContextCreationFailed, + &_swigt__p_Ferris__RootContextFactory, + &_swigt__p_Ferris__Runner, + &_swigt__p_Ferris__SQLiteException, + &_swigt__p_Ferris__SchemaException, + &_swigt__p_Ferris__SchemaNotFoundException, + &_swigt__p_Ferris__SocketOptionsException, + &_swigt__p_Ferris__StorageFull, + &_swigt__p_Ferris__SubContextAlreadyInUse, + &_swigt__p_Ferris__SyntaxError, + &_swigt__p_Ferris__Time__Benchmark, + &_swigt__p_Ferris__Times, + &_swigt__p_Ferris__URLDecodeSyntaxError, + &_swigt__p_Ferris__UnknownBackupMode, + &_swigt__p_Ferris__UnknownConfigLocation, + &_swigt__p_Ferris__UnspoortedBlockSize, + &_swigt__p_Ferris__Util__SingleShot, + &_swigt__p_Ferris__Versioned, + &_swigt__p_Ferris__WebPhotoException, + &_swigt__p_Ferris__XMLBase, + &_swigt__p_Ferris__XMLFatalError, + &_swigt__p_Ferris__XMLParseError, + &_swigt__p_Ferris__XMPBase, + &_swigt__p_Ferris__XMPPacketScanFailed, + &_swigt__p_Ferris__dbXMLException, + &_swigt__p_Ferris__eetException, + &_swigt__p_Ferris__eetKeyNotFound, + &_swigt__p_Ferris__ferris_basic_streambuf_fourk, + &_swigt__p_Ferris__ferris_basic_streambuf_onemeg, + &_swigt__p_Ferris__ferris_basic_streambuf_quartk, + &_swigt__p_Ferris__ferris_basic_streambuf_sixteenbytes, + &_swigt__p_Ferris__ferris_basic_streambuf_sixteenk, + &_swigt__p_Ferris__ferris_basic_streambuf_virtual, + &_swigt__p_Ferris__ferris_ios, + &_swigt__p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t, + &_swigt__p_Ferris__fh_attrcol, + &_swigt__p_Ferris__fh_attribute, + &_swigt__p_Ferris__fh_cemblem, + &_swigt__p_Ferris__fh_context, + &_swigt__p_Ferris__fh_emblem, + &_swigt__p_Ferris__fh_emblem_less, + &_swigt__p_Ferris__fh_etagere, + &_swigt__p_Ferris__fh_medallion, + &_swigt__p_Ferris__fh_medallionBelief, + &_swigt__p_Ferris__fh_runner, + &_swigt__p_Ferris__fh_sorter, + &_swigt__p_Ferris__getIOStreamCloseUpdateFailed, + &_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, + &_swigt__p_Ferris__giStreamPosRAII, + &_swigt__p_Ferris__tdbException, + &_swigt__p_GSpawnFlags, + &_swigt__p_GenericCloseSignal_t, + &_swigt__p_GetIOStream_Func_t, + &_swigt__p_GetIStream_Func_t, + &_swigt__p_GetIStream_PassedInStream_Func_t, + &_swigt__p_IOStreamClosed_Func_t, + &_swigt__p_Loki__AllowConversion, + &_swigt__p_Loki__AssocVectorT_void_p_sigc__connection_t, + &_swigt__p_Loki__AssocVectorT_void_p_void_p_t, + &_swigt__p_Loki__DisallowConversion, + &_swigt__p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, + &_swigt__p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, + &_swigt__p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, + &_swigt__p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, + &_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t, + &_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t, + &_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t, + &_swigt__p_Loki__NullPointerException, + &_swigt__p_Loki__Private__RefLinkedBase, + &_swigt__p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + &_swigt__p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, + &_swigt__p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, + &_swigt__p_NamingEvent_Changed, + &_swigt__p_NamingEvent_Changed_Sig_t, + &_swigt__p_NamingEvent_Created, + &_swigt__p_NamingEvent_Created_Sig_t, + &_swigt__p_NamingEvent_Deleted, + &_swigt__p_NamingEvent_Deleted_Sig_t, + &_swigt__p_NamingEvent_Exists, + &_swigt__p_NamingEvent_Exists_Sig_t, + &_swigt__p_NamingEvent_MedallionUpdated_Sig_t, + &_swigt__p_NamingEvent_Moved, + &_swigt__p_NamingEvent_Moved_Sig_t, + &_swigt__p_NamingEvent_Start_Execute, + &_swigt__p_NamingEvent_Start_Execute_Sig_t, + &_swigt__p_NamingEvent_Start_Reading_Context, + &_swigt__p_NamingEvent_Start_Reading_Context_Sig_t, + &_swigt__p_NamingEvent_Stop_Execute, + &_swigt__p_NamingEvent_Stop_Execute_Sig_t, + &_swigt__p_NamingEvent_Stop_Reading_Context, + &_swigt__p_NamingEvent_Stop_Reading_Context_Sig_t, + &_swigt__p_OnlyInCacheSignal_t, + &_swigt__p_PostfixTrimmerOps, + &_swigt__p_PrefixTrimmerOps, + &_swigt__p_RWBase_t, + &_swigt__p_Runner_AsyncIOFunctor_t, + &_swigt__p_SubContextNames_t, + &_swigt__p_TrimmerBase, + &_swigt__p_TrimmerT_PostfixTrimmerOps_t, + &_swigt__p_TrimmerT_PrefixTrimmerOps_t, + &_swigt__p_Version_t, + &_swigt__p_XSDBasic_t, + &_swigt__p__Base, + &_swigt__p__Self, + &_swigt__p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t, + &_swigt__p_char, + &_swigt__p_difference_type, + &_swigt__p_fh_insideResolve, + &_swigt__p_fh_ostream, + &_swigt__p_freelist_t, + &_swigt__p_gboolean, + &_swigt__p_gint, + &_swigt__p_guint32, + &_swigt__p_guint64, + &_swigt__p_iterator_category, + &_swigt__p_openmode, + &_swigt__p_p_char, + &_swigt__p_p_std__istringstream, + &_swigt__p_p_std__ostringstream, + &_swigt__p_p_std__stringstream, + &_swigt__p_pid_t, + &_swigt__p_pointer, + &_swigt__p_poptContext, + &_swigt__p_poptOption, + &_swigt__p_ref_count_t, + &_swigt__p_reference, + &_swigt__p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, + &_swigt__p_sigc__signal1T_void_Ferris__CacheHandlable_p_t, + &_swigt__p_sigc__signal1T_void_Ferris__fh_context_t, + &_swigt__p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, + &_swigt__p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, + &_swigt__p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t, + &_swigt__p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, + &_swigt__p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, + &_swigt__p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, + &_swigt__p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, + &_swigt__p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, + &_swigt__p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, + &_swigt__p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, + &_swigt__p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, + &_swigt__p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, + &_swigt__p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, + &_swigt__p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, + &_swigt__p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, + &_swigt__p_sigc__trackable, + &_swigt__p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t, + &_swigt__p_std__basic_streambufT_char_std__char_traitsT_char_t_t, + &_swigt__p_std__exception, + &_swigt__p_std__ios__openmode, + &_swigt__p_std__iostream, + &_swigt__p_std__istream, + &_swigt__p_std__istringstream, + &_swigt__p_std__listT_Ferris__fh_context_t, + &_swigt__p_std__listT_Ferris__fh_emblem_t, + &_swigt__p_std__listT_Ferris__fh_sorter_t, + &_swigt__p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t, + &_swigt__p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, + &_swigt__p_std__listT_std__pairT_std__string_std__string_t_t, + &_swigt__p_std__listT_std__string_t, + &_swigt__p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t, + &_swigt__p_std__mapT_int_int_t, + &_swigt__p_std__mapT_std__string_std__string_t, + &_swigt__p_std__ostringstream, + &_swigt__p_std__out_of_range, + &_swigt__p_std__pairT_std__string_std__string_t, + &_swigt__p_std__reverse_iteratorT_Ferris__ContextIterator_t, + &_swigt__p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, + &_swigt__p_std__setT_guint32_t, + &_swigt__p_std__setT_std__string_t, + &_swigt__p_std__streampos, + &_swigt__p_std__streamsize, + &_swigt__p_std__string, + &_swigt__p_std__stringstream, + &_swigt__p_std__vectorT_int_t, + &_swigt__p_std__vectorT_std__string_t, + &_swigt__p_std__wstring, + &_swigt__p_time_t, + &_swigt__p_tm, + &_swigt__p_uint32_t, + &_swigt__p_value_type, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t[] = { {&_swigt__p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ContextEvent_Headers_Received_Sig_t[] = { {&_swigt__p_ContextEvent_Headers_Received_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Fampp__FamppDirMonitorInitFailedException[] = { {&_swigt__p_Fampp__FamppDirMonitorInitFailedException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FerrisLoki__FerrisSmallObjAllocator[] = { {&_swigt__p_FerrisLoki__FerrisSmallObjAllocator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FerrisLoki__Handlable[] = { {&_swigt__p_Ferris__ColdEmblem, _p_Ferris__ColdEmblemTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__AttributeCollection, _p_Ferris__AttributeCollectionTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Times, _p_Ferris__TimesTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__AttributeProxy, _p_Ferris__AttributeProxyTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__AI__Agent, _p_Ferris__AI__AgentTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Personality, _p_Ferris__PersonalityTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__MedallionBelief, _p_Ferris__MedallionBeliefTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Time__Benchmark, _p_Ferris__Time__BenchmarkTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Versioned, _p_Ferris__VersionedTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Etagere, _p_Ferris__EtagereTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Handlable, _p_Ferris__HandlableTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__CacheHandlable, _p_Ferris__CacheHandlableTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_FerrisLoki__Handlable, 0, 0, 0}, {&_swigt__p_Ferris__Emblem, _p_Ferris__EmblemTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Medallion, _p_Ferris__MedallionTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__Runner, _p_Ferris__RunnerTo_p_FerrisLoki__Handlable, 0, 0}, {&_swigt__p_Ferris__ContextIterator, _p_Ferris__ContextIteratorTo_p_FerrisLoki__Handlable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AI__Agent[] = { {&_swigt__p_Ferris__AI__Agent, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AccessDenied[] = { {&_swigt__p_Ferris__AccessDenied, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AgentAlreadyExistsException[] = { {&_swigt__p_Ferris__AgentAlreadyExistsException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AgentException[] = { {&_swigt__p_Ferris__AgentException, 0, 0, 0}, {&_swigt__p_Ferris__AgentAlreadyExistsException, _p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__AgentException, 0, 0}, {&_swigt__p_Ferris__NoSuchAgentException, _p_Ferris__NoSuchAgentExceptionTo_p_Ferris__AgentException, 0, 0}, {&_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, _p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__AgentException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AgentOnlyHandlesOneEmblemException[] = { {&_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Attribute[] = { {&_swigt__p_Ferris__AttributeProxy, _p_Ferris__AttributeProxyTo_p_Ferris__Attribute, 0, 0}, {&_swigt__p_Ferris__Attribute, 0, 0, 0}, {&_swigt__p_Ferris__Context, _p_Ferris__ContextTo_p_Ferris__Attribute, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AttributeAlreadyInUse[] = { {&_swigt__p_Ferris__AttributeAlreadyInUse, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AttributeCollection[] = { {&_swigt__p_Ferris__AttributeCollection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AttributeNotWritable[] = { {&_swigt__p_Ferris__AttributeNotWritable, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__AttributeProxy[] = { {&_swigt__p_Ferris__AttributeProxy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BackupException[] = { {&_swigt__p_Ferris__BackupNameWouldBeTooLong, _p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__BackupException, 0, 0}, {&_swigt__p_Ferris__BackupException, 0, 0, 0}, {&_swigt__p_Ferris__UnknownBackupMode, _p_Ferris__UnknownBackupModeTo_p_Ferris__BackupException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BackupNameWouldBeTooLong[] = { {&_swigt__p_Ferris__BackupNameWouldBeTooLong, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BadParam[] = { {&_swigt__p_Ferris__BadParam, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BadSignature[] = { {&_swigt__p_Ferris__BadSignature, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BadlyFormedTime[] = { {&_swigt__p_Ferris__BadlyFormedTime, 0, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTimeString, _p_Ferris__BadlyFormedTimeStringTo_p_Ferris__BadlyFormedTime, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BadlyFormedTimeString[] = { {&_swigt__p_Ferris__BadlyFormedTimeString, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__BranchFileSystem[] = { {&_swigt__p_Ferris__BranchFileSystem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CacheHandlable[] = { {&_swigt__p_Ferris__CacheHandlable, 0, 0, 0}, {&_swigt__p_Ferris__Personality, _p_Ferris__PersonalityTo_p_Ferris__CacheHandlable, 0, 0}, {&_swigt__p_Ferris__Medallion, _p_Ferris__MedallionTo_p_Ferris__CacheHandlable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CacheManager[] = { {&_swigt__p_Ferris__CacheManager, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotAddEmblemException[] = { {&_swigt__p_Ferris__CanNotAddEmblemException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotAddExternalAttribute[] = { {&_swigt__p_Ferris__CanNotAddExternalAttribute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotDelete[] = { {&_swigt__p_Ferris__CanNotDelete, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotDereferenceDanglingSoftLink[] = { {&_swigt__p_Ferris__CanNotDereferenceDanglingSoftLink, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotGetStream[] = { {&_swigt__p_Ferris__CanNotGetStream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotMonitorDirWithFAM[] = { {&_swigt__p_Ferris__CanNotMonitorDirWithFAM, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotReadContext[] = { {&_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, _p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__CanNotReadContext, 0, 0}, {&_swigt__p_Ferris__CanNotReadContext, 0, 0, 0}, {&_swigt__p_Ferris__CanNotMonitorDirWithFAM, _p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__CanNotReadContext, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CanNotReadContextPcctsParseFailed[] = { {&_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ChildNotRunning[] = { {&_swigt__p_Ferris__ChildNotRunning, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ColdEmblem[] = { {&_swigt__p_Ferris__ColdEmblem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CompressionAlgoNotFoundException[] = { {&_swigt__p_Ferris__CompressionAlgoNotFoundException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CompressionException[] = { {&_swigt__p_Ferris__CompressionException, 0, 0, 0}, {&_swigt__p_Ferris__CompressionAlgoNotFoundException, _p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__CompressionException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ContentNotModified[] = { {&_swigt__p_Ferris__ContentNotModified, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Context[] = { {&_swigt__p_Ferris__Context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ContextCollection[] = { {&_swigt__p_Ferris__Context, _p_Ferris__ContextTo_p_Ferris__ContextCollection, 0, 0}, {&_swigt__p_Ferris__ContextCollection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ContextExists[] = { {&_swigt__p_Ferris__ContextExists, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ContextIterator[] = { {&_swigt__p_Ferris__ContextIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ContextSetCompare[] = { {&_swigt__p_Ferris__ContextSetCompare, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CopyFailed[] = { {&_swigt__p_Ferris__CopyFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CreateFIFO[] = { {&_swigt__p_Ferris__CreateFIFO, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CreateMetaDataContext[] = { {&_swigt__p_Ferris__CreateMetaDataContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CryptoBase[] = { {&_swigt__p_Ferris__GPGMEInitFailed, _p_Ferris__GPGMEInitFailedTo_p_Ferris__CryptoBase, 0, 0}, {&_swigt__p_Ferris__BadSignature, _p_Ferris__BadSignatureTo_p_Ferris__CryptoBase, 0, 0}, {&_swigt__p_Ferris__KeylistException, _p_Ferris__KeylistExceptionTo_p_Ferris__CryptoBase, 0, 0}, {&_swigt__p_Ferris__CryptoBase, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CurlEasyInitFailed[] = { {&_swigt__p_Ferris__CurlEasyInitFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CurlPerformFailed[] = { {&_swigt__p_Ferris__CurlPerformFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CurlStateError[] = { {&_swigt__p_Ferris__CurlStateError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CurlStaticInitFailed[] = { {&_swigt__p_Ferris__CurlStaticInitFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__CursorException[] = { {&_swigt__p_Ferris__CursorException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__DBusConnectionException[] = { {&_swigt__p_Ferris__DBusConnectionException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__DBusException[] = { {&_swigt__p_Ferris__DBusException, 0, 0, 0}, {&_swigt__p_Ferris__DBusConnectionException, _p_Ferris__DBusConnectionExceptionTo_p_Ferris__DBusException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__DTDCreationFailed[] = { {&_swigt__p_Ferris__DTDCreationFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__DVDReadException[] = { {&_swigt__p_Ferris__DVDReadException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Db4Exception[] = { {&_swigt__p_Ferris__Db4Exception, 0, 0, 0}, {&_swigt__p_Ferris__Db4KeyNotFound, _p_Ferris__Db4KeyNotFoundTo_p_Ferris__Db4Exception, 0, 0}, {&_swigt__p_Ferris__eetKeyNotFound, _p_Ferris__eetKeyNotFoundTo_p_Ferris__Db4Exception, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Db4KeyNotFound[] = { {&_swigt__p_Ferris__Db4KeyNotFound, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__DesktopFileKeyNotFound[] = { {&_swigt__p_Ferris__DesktopFileKeyNotFound, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EAIndexException[] = { {&_swigt__p_Ferris__EAIndexException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom[] = { {&_swigt__p_Ferris__EA_Atom_Static, _p_Ferris__EA_Atom_StaticTo_p_Ferris__EA_Atom, 0, 0}, {&_swigt__p_Ferris__EA_Atom, 0, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadOnly, _p_Ferris__EA_Atom_ReadOnlyTo_p_Ferris__EA_Atom, 0, 0}, {&_swigt__p_Ferris__EA_Atom_RDFCacheAttribute, _p_Ferris__EA_Atom_RDFCacheAttributeTo_p_Ferris__EA_Atom, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadOnly_PassedInStream, _p_Ferris__EA_Atom_ReadOnly_PassedInStreamTo_p_Ferris__EA_Atom, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_RDFCacheAttribute[] = { {&_swigt__p_Ferris__EA_Atom_RDFCacheAttribute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadOnly[] = { {&_swigt__p_Ferris__EA_Atom_ReadOnly, 0, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadOnly_PassedInStream, _p_Ferris__EA_Atom_ReadOnly_PassedInStreamTo_p_Ferris__EA_Atom_ReadOnly, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadOnly_PassedInStream[] = { {&_swigt__p_Ferris__EA_Atom_ReadOnly_PassedInStream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite_OpenModeCached, _p_Ferris__EA_Atom_ReadWrite_OpenModeCachedTo_p_Ferris__EA_Atom_ReadWrite, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite, 0, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite_Contents, _p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_Ferris__EA_Atom_ReadWrite, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite_Contents[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite_Contents, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite_OpenModeCached[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite_Contents, _p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite_PassedInStream[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite_PassedInStream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t[] = { {&_swigt__p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EA_Atom_Static[] = { {&_swigt__p_Ferris__EA_Atom_Static, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Emblem[] = { {&_swigt__p_Ferris__Emblem, 0, 0, 0}, {&_swigt__p_Ferris__ColdEmblem, _p_Ferris__ColdEmblemTo_p_Ferris__Emblem, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EmblemException[] = { {&_swigt__p_Ferris__EmblemException, 0, 0, 0}, {&_swigt__p_Ferris__EmblemNotFoundException, _p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__EmblemException, 0, 0}, {&_swigt__p_Ferris__CanNotAddEmblemException, _p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__EmblemException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EmblemNotFoundException[] = { {&_swigt__p_Ferris__EmblemNotFoundException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Etagere[] = { {&_swigt__p_Ferris__Etagere, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__EtagereException[] = { {&_swigt__p_Ferris__EtagereException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FCA__ConceptLattice[] = { {&_swigt__p_Ferris__FCA__ConceptLattice, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FCA__fh_conceptLattice[] = { {&_swigt__p_Ferris__FCA__fh_conceptLattice, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FFilterSyntaxError[] = { {&_swigt__p_Ferris__FFilterSyntaxError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCanNotCreateLeafOfLeaf[] = { {&_swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCanNotGetScriptNameError[] = { {&_swigt__p_Ferris__FerrisCanNotGetScriptNameError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCreateAttributeFailed[] = { {&_swigt__p_Ferris__FerrisCreateAttributeFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCreateAttributeNotSupported[] = { {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCreateSubContextFailed[] = { {&_swigt__p_Ferris__FerrisCreateSubContextFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCreateSubContextNotSupported[] = { {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisCurlServerNameNotFound[] = { {&_swigt__p_Ferris__FerrisCurlServerNameNotFound, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisExceptionBase[] = { {&_swigt__p_Ferris__XMLBase, _p_Ferris__XMLBaseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__RenameFailed, _p_Ferris__RenameFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdateFailed, _p_Ferris__getIOStreamCloseUpdateFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlPerformFailed, _p_Ferris__CurlPerformFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImageSaveFailed, _p_Ferris__FerrisImageSaveFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CopyFailed, _p_Ferris__CopyFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__RemoveFailed, _p_Ferris__RemoveFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeFailed, _p_Ferris__FerrisCreateAttributeFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, _p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AttributeAlreadyInUse, _p_Ferris__AttributeAlreadyInUseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SubContextAlreadyInUse, _p_Ferris__SubContextAlreadyInUseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AttributeNotWritable, _p_Ferris__AttributeNotWritableTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadSignature, _p_Ferris__BadSignatureTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__GPhoto2, _p_Ferris__GPhoto2To_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMLFatalError, _p_Ferris__XMLFatalErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisInternalError, _p_Ferris__FerrisInternalErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadParam, _p_Ferris__BadParamTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisExceptionBase, 0, 0, 0}, {&_swigt__p_Ferris__FerrisVFSExceptionBase, _p_Ferris__FerrisVFSExceptionBaseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CryptoBase, _p_Ferris__CryptoBaseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisWaitTimedOut, _p_Ferris__FerrisWaitTimedOutTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AccessDenied, _p_Ferris__AccessDeniedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotDelete, _p_Ferris__CanNotDeleteTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BackupNameWouldBeTooLong, _p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotMonitorDirWithFAM, _p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlStateError, _p_Ferris__CurlStateErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchGroup, _p_Ferris__NoSuchGroupTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__UnknownBackupMode, _p_Ferris__UnknownBackupModeTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisParentNotSetError, _p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchContextClass, _p_Ferris__NoSuchContextClassTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__GenericError, _p_Ferris__GenericErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FileClipboard, _p_Ferris__FileClipboardTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCurlServerNameNotFound, _p_Ferris__FerrisCurlServerNameNotFoundTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__Db4KeyNotFound, _p_Ferris__Db4KeyNotFoundTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__eetKeyNotFound, _p_Ferris__eetKeyNotFoundTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisSqlServerNameNotFound, _p_Ferris__FerrisSqlServerNameNotFoundTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ContextExists, _p_Ferris__ContextExistsTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ObjectExists, _p_Ferris__ObjectExistsTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__DesktopFileKeyNotFound, _p_Ferris__DesktopFileKeyNotFoundTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__Db4Exception, _p_Ferris__Db4ExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CursorException, _p_Ferris__CursorExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__DVDReadException, _p_Ferris__DVDReadExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BackupException, _p_Ferris__BackupExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SocketOptionsException, _p_Ferris__SocketOptionsExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisSetCWDException, _p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisStatException, _p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisGLibCException, _p_Ferris__FerrisGLibCExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__LDAPException, _p_Ferris__LDAPExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CompressionException, _p_Ferris__CompressionExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CompressionAlgoNotFoundException, _p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__IndexException, _p_Ferris__IndexExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FullTextIndexException, _p_Ferris__FullTextIndexExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__EAIndexException, _p_Ferris__EAIndexExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SchemaException, _p_Ferris__SchemaExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SchemaNotFoundException, _p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__MedallionException, _p_Ferris__MedallionExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__EtagereException, _p_Ferris__EtagereExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__EmblemException, _p_Ferris__EmblemExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__EmblemNotFoundException, _p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotAddEmblemException, _p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchPersonalityException, _p_Ferris__NoSuchPersonalityExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchBeliefException, _p_Ferris__NoSuchBeliefExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentException, _p_Ferris__AgentExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentAlreadyExistsException, _p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchAgentException, _p_Ferris__NoSuchAgentExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, _p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__DBusException, _p_Ferris__DBusExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__DBusConnectionException, _p_Ferris__DBusConnectionExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__dbXMLException, _p_Ferris__dbXMLExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__KeylistException, _p_Ferris__KeylistExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__eetException, _p_Ferris__eetExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__GdbmException, _p_Ferris__GdbmExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__tdbException, _p_Ferris__tdbExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__InvalidSortSpecification, _p_Ferris__InvalidSortSpecificationTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__UnknownConfigLocation, _p_Ferris__UnknownConfigLocationTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__WebPhotoException, _p_Ferris__WebPhotoExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SQLiteException, _p_Ferris__SQLiteExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisHALException, _p_Ferris__FerrisHALExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisStreamException, _p_Ferris__FerrisStreamExceptionTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__GPGMEInitFailed, _p_Ferris__GPGMEInitFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__DTDCreationFailed, _p_Ferris__DTDCreationFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlEasyInitFailed, _p_Ferris__CurlEasyInitFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlStaticInitFailed, _p_Ferris__CurlStaticInitFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisStreamLoadFailed, _p_Ferris__FerrisStreamLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__GModuleOpenFailed, _p_Ferris__GModuleOpenFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, _p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisGIMPImageLoadFailed, _p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__RootContextCreationFailed, _p_Ferris__RootContextCreationFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextFailed, _p_Ferris__FerrisCreateSubContextFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImageLoadFailed, _p_Ferris__FerrisImageLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisPNGImageLoadFailed, _p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisJPEGImageLoadFailed, _p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMPPacketScanFailed, _p_Ferris__XMPPacketScanFailedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__RelativeTimeParsing, _p_Ferris__RelativeTimeParsingTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTimeString, _p_Ferris__BadlyFormedTimeStringTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchUser, _p_Ferris__NoSuchUserTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__InvalidModeString, _p_Ferris__InvalidModeStringTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMPBase, _p_Ferris__XMPBaseTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisNotSupportedInThisContext, _p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchSubContext, _p_Ferris__NoSuchSubContextTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotReadContext, _p_Ferris__CanNotReadContextTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisNotReadableAsContext, _p_Ferris__FerrisNotReadableAsContextTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoOpenWithContext, _p_Ferris__NoOpenWithContextTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, _p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMLParseError, _p_Ferris__XMLParseErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotGetScriptNameError, _p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__QuotaStorageFull, _p_Ferris__QuotaStorageFullTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__StorageFull, _p_Ferris__StorageFullTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ParseError, _p_Ferris__ParseErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotDereferenceDanglingSoftLink, _p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ProgramSpawn, _p_Ferris__ProgramSpawnTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf, _p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchObject, _p_Ferris__NoSuchObjectTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotGetStream, _p_Ferris__CanNotGetStreamTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ContentNotModified, _p_Ferris__ContentNotModifiedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BranchFileSystem, _p_Ferris__BranchFileSystemTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, _p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, _p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NotSupported, _p_Ferris__NotSupportedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__SyntaxError, _p_Ferris__SyntaxErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FFilterSyntaxError, _p_Ferris__FFilterSyntaxErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FulltextQuerySyntaxError, _p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__URLDecodeSyntaxError, _p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__OpenActionIsNotDefined, _p_Ferris__OpenActionIsNotDefinedTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisOutOfMemory, _p_Ferris__FerrisOutOfMemoryTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CreateFIFO, _p_Ferris__CreateFIFOTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__ChildNotRunning, _p_Ferris__ChildNotRunningTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotAddExternalAttribute, _p_Ferris__CanNotAddExternalAttributeTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchAttribute, _p_Ferris__NoSuchAttributeTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__UnspoortedBlockSize, _p_Ferris__UnspoortedBlockSizeTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTime, _p_Ferris__BadlyFormedTimeTo_p_Ferris__FerrisExceptionBase, 0, 0}, {&_swigt__p_Ferris__MalformedURL, _p_Ferris__MalformedURLTo_p_Ferris__FerrisExceptionBase, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisException_CodeState[] = { {&_swigt__p_Ferris__FerrisException_CodeState, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisGIMPImageLoadFailed[] = { {&_swigt__p_Ferris__FerrisGIMPImageLoadFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisGLibCException[] = { {&_swigt__p_Ferris__FerrisGLibCException, 0, 0, 0}, {&_swigt__p_Ferris__FerrisStatException, _p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisGLibCException, 0, 0}, {&_swigt__p_Ferris__FerrisSetCWDException, _p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisGLibCException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisHALException[] = { {&_swigt__p_Ferris__FerrisHALException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisImageLoadFailed[] = { {&_swigt__p_Ferris__FerrisImageLoadFailed, 0, 0, 0}, {&_swigt__p_Ferris__FerrisPNGImageLoadFailed, _p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed, 0, 0}, {&_swigt__p_Ferris__FerrisJPEGImageLoadFailed, _p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed, 0, 0}, {&_swigt__p_Ferris__FerrisGIMPImageLoadFailed, _p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed, 0, 0}, {&_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, _p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisImageLoadFailed, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisImageSaveFailed[] = { {&_swigt__p_Ferris__FerrisImageSaveFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisImlib2ImageLoadFailed[] = { {&_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisInternalError[] = { {&_swigt__p_Ferris__FerrisInternalError, 0, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotGetScriptNameError, _p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisInternalError, 0, 0}, {&_swigt__p_Ferris__FerrisParentNotSetError, _p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisInternalError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisJPEGImageLoadFailed[] = { {&_swigt__p_Ferris__FerrisJPEGImageLoadFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisNotReadableAsContext[] = { {&_swigt__p_Ferris__FerrisNotReadableAsContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisNotSupportedInThisContext[] = { {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, _p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisNotSupportedInThisContext, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, _p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisNotSupportedInThisContext, 0, 0}, {&_swigt__p_Ferris__FerrisNotSupportedInThisContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisOutOfMemory[] = { {&_swigt__p_Ferris__FerrisOutOfMemory, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisPNGImageLoadFailed[] = { {&_swigt__p_Ferris__FerrisPNGImageLoadFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisParentNotSetError[] = { {&_swigt__p_Ferris__FerrisParentNotSetError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisSetCWDException[] = { {&_swigt__p_Ferris__FerrisSetCWDException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisSqlServerNameNotFound[] = { {&_swigt__p_Ferris__FerrisSqlServerNameNotFound, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisStatException[] = { {&_swigt__p_Ferris__FerrisStatException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisStreamException[] = { {&_swigt__p_Ferris__UnspoortedBlockSize, _p_Ferris__UnspoortedBlockSizeTo_p_Ferris__FerrisStreamException, 0, 0}, {&_swigt__p_Ferris__FerrisStreamException, 0, 0, 0}, {&_swigt__p_Ferris__CreateFIFO, _p_Ferris__CreateFIFOTo_p_Ferris__FerrisStreamException, 0, 0}, {&_swigt__p_Ferris__MalformedURL, _p_Ferris__MalformedURLTo_p_Ferris__FerrisStreamException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisStreamLoadFailed[] = { {&_swigt__p_Ferris__FerrisStreamLoadFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisVFSExceptionBase[] = { {&_swigt__p_Ferris__XMLBase, _p_Ferris__XMLBaseTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__RenameFailed, _p_Ferris__RenameFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdateFailed, _p_Ferris__getIOStreamCloseUpdateFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlPerformFailed, _p_Ferris__CurlPerformFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CopyFailed, _p_Ferris__CopyFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__RemoveFailed, _p_Ferris__RemoveFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeFailed, _p_Ferris__FerrisCreateAttributeFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, _p_Ferris__CanNotReadContextPcctsParseFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImageSaveFailed, _p_Ferris__FerrisImageSaveFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AttributeAlreadyInUse, _p_Ferris__AttributeAlreadyInUseTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SubContextAlreadyInUse, _p_Ferris__SubContextAlreadyInUseTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AttributeNotWritable, _p_Ferris__AttributeNotWritableTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadSignature, _p_Ferris__BadSignatureTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__GPhoto2, _p_Ferris__GPhoto2To_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMLFatalError, _p_Ferris__XMLFatalErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisInternalError, _p_Ferris__FerrisInternalErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadParam, _p_Ferris__BadParamTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisVFSExceptionBase, 0, 0, 0}, {&_swigt__p_Ferris__CryptoBase, _p_Ferris__CryptoBaseTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisWaitTimedOut, _p_Ferris__FerrisWaitTimedOutTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AccessDenied, _p_Ferris__AccessDeniedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotDelete, _p_Ferris__CanNotDeleteTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BackupNameWouldBeTooLong, _p_Ferris__BackupNameWouldBeTooLongTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotMonitorDirWithFAM, _p_Ferris__CanNotMonitorDirWithFAMTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlStateError, _p_Ferris__CurlStateErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchGroup, _p_Ferris__NoSuchGroupTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisParentNotSetError, _p_Ferris__FerrisParentNotSetErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__UnknownBackupMode, _p_Ferris__UnknownBackupModeTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchContextClass, _p_Ferris__NoSuchContextClassTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__GenericError, _p_Ferris__GenericErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FileClipboard, _p_Ferris__FileClipboardTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCurlServerNameNotFound, _p_Ferris__FerrisCurlServerNameNotFoundTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__Db4KeyNotFound, _p_Ferris__Db4KeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__eetKeyNotFound, _p_Ferris__eetKeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisSqlServerNameNotFound, _p_Ferris__FerrisSqlServerNameNotFoundTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ContextExists, _p_Ferris__ContextExistsTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ObjectExists, _p_Ferris__ObjectExistsTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__DesktopFileKeyNotFound, _p_Ferris__DesktopFileKeyNotFoundTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__eetException, _p_Ferris__eetExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__Db4Exception, _p_Ferris__Db4ExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CursorException, _p_Ferris__CursorExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__DVDReadException, _p_Ferris__DVDReadExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BackupException, _p_Ferris__BackupExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SocketOptionsException, _p_Ferris__SocketOptionsExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisSetCWDException, _p_Ferris__FerrisSetCWDExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisStatException, _p_Ferris__FerrisStatExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisGLibCException, _p_Ferris__FerrisGLibCExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__LDAPException, _p_Ferris__LDAPExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CompressionException, _p_Ferris__CompressionExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CompressionAlgoNotFoundException, _p_Ferris__CompressionAlgoNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__IndexException, _p_Ferris__IndexExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FullTextIndexException, _p_Ferris__FullTextIndexExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__EAIndexException, _p_Ferris__EAIndexExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SchemaException, _p_Ferris__SchemaExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SchemaNotFoundException, _p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__MedallionException, _p_Ferris__MedallionExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__EtagereException, _p_Ferris__EtagereExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__EmblemException, _p_Ferris__EmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__EmblemNotFoundException, _p_Ferris__EmblemNotFoundExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotAddEmblemException, _p_Ferris__CanNotAddEmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchPersonalityException, _p_Ferris__NoSuchPersonalityExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchBeliefException, _p_Ferris__NoSuchBeliefExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentException, _p_Ferris__AgentExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentAlreadyExistsException, _p_Ferris__AgentAlreadyExistsExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchAgentException, _p_Ferris__NoSuchAgentExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, _p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__DBusException, _p_Ferris__DBusExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__DBusConnectionException, _p_Ferris__DBusConnectionExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__dbXMLException, _p_Ferris__dbXMLExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__KeylistException, _p_Ferris__KeylistExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__GdbmException, _p_Ferris__GdbmExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__tdbException, _p_Ferris__tdbExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__InvalidSortSpecification, _p_Ferris__InvalidSortSpecificationTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__UnknownConfigLocation, _p_Ferris__UnknownConfigLocationTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__WebPhotoException, _p_Ferris__WebPhotoExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SQLiteException, _p_Ferris__SQLiteExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisHALException, _p_Ferris__FerrisHALExceptionTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__GPGMEInitFailed, _p_Ferris__GPGMEInitFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__DTDCreationFailed, _p_Ferris__DTDCreationFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlEasyInitFailed, _p_Ferris__CurlEasyInitFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CurlStaticInitFailed, _p_Ferris__CurlStaticInitFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisStreamLoadFailed, _p_Ferris__FerrisStreamLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__GModuleOpenFailed, _p_Ferris__GModuleOpenFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, _p_Ferris__FerrisImlib2ImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisGIMPImageLoadFailed, _p_Ferris__FerrisGIMPImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__RootContextCreationFailed, _p_Ferris__RootContextCreationFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextFailed, _p_Ferris__FerrisCreateSubContextFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisImageLoadFailed, _p_Ferris__FerrisImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisPNGImageLoadFailed, _p_Ferris__FerrisPNGImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisJPEGImageLoadFailed, _p_Ferris__FerrisJPEGImageLoadFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMPPacketScanFailed, _p_Ferris__XMPPacketScanFailedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__RelativeTimeParsing, _p_Ferris__RelativeTimeParsingTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTimeString, _p_Ferris__BadlyFormedTimeStringTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchUser, _p_Ferris__NoSuchUserTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__InvalidModeString, _p_Ferris__InvalidModeStringTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMPBase, _p_Ferris__XMPBaseTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisNotSupportedInThisContext, _p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchSubContext, _p_Ferris__NoSuchSubContextTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotReadContext, _p_Ferris__CanNotReadContextTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisNotReadableAsContext, _p_Ferris__FerrisNotReadableAsContextTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoOpenWithContext, _p_Ferris__NoOpenWithContextTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, _p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__XMLParseError, _p_Ferris__XMLParseErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotGetScriptNameError, _p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__QuotaStorageFull, _p_Ferris__QuotaStorageFullTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__StorageFull, _p_Ferris__StorageFullTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ParseError, _p_Ferris__ParseErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotDereferenceDanglingSoftLink, _p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ProgramSpawn, _p_Ferris__ProgramSpawnTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf, _p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchObject, _p_Ferris__NoSuchObjectTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotGetStream, _p_Ferris__CanNotGetStreamTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ContentNotModified, _p_Ferris__ContentNotModifiedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BranchFileSystem, _p_Ferris__BranchFileSystemTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, _p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, _p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NotSupported, _p_Ferris__NotSupportedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__SyntaxError, _p_Ferris__SyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FFilterSyntaxError, _p_Ferris__FFilterSyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FulltextQuerySyntaxError, _p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__URLDecodeSyntaxError, _p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__OpenActionIsNotDefined, _p_Ferris__OpenActionIsNotDefinedTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__FerrisOutOfMemory, _p_Ferris__FerrisOutOfMemoryTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__ChildNotRunning, _p_Ferris__ChildNotRunningTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__CanNotAddExternalAttribute, _p_Ferris__CanNotAddExternalAttributeTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__NoSuchAttribute, _p_Ferris__NoSuchAttributeTo_p_Ferris__FerrisVFSExceptionBase, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTime, _p_Ferris__BadlyFormedTimeTo_p_Ferris__FerrisVFSExceptionBase, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FerrisWaitTimedOut[] = { {&_swigt__p_Ferris__FerrisWaitTimedOut, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t[] = { {&_swigt__p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FileClipboard[] = { {&_swigt__p_Ferris__FileClipboard, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FullTextIndexException[] = { {&_swigt__p_Ferris__FullTextIndexException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__FulltextQuerySyntaxError[] = { {&_swigt__p_Ferris__FulltextQuerySyntaxError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__GModuleOpenFailed[] = { {&_swigt__p_Ferris__GModuleOpenFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__GPGMEInitFailed[] = { {&_swigt__p_Ferris__GPGMEInitFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__GPhoto2[] = { {&_swigt__p_Ferris__GPhoto2, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__GdbmException[] = { {&_swigt__p_Ferris__GdbmException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__GenericError[] = { {&_swigt__p_Ferris__GenericError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Handlable[] = { {&_swigt__p_Ferris__ColdEmblem, _p_Ferris__ColdEmblemTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__AttributeCollection, _p_Ferris__AttributeCollectionTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Times, _p_Ferris__TimesTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__AttributeProxy, _p_Ferris__AttributeProxyTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__AI__Agent, _p_Ferris__AI__AgentTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Personality, _p_Ferris__PersonalityTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__MedallionBelief, _p_Ferris__MedallionBeliefTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Time__Benchmark, _p_Ferris__Time__BenchmarkTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Versioned, _p_Ferris__VersionedTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Etagere, _p_Ferris__EtagereTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__CacheHandlable, _p_Ferris__CacheHandlableTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Handlable, 0, 0, 0}, {&_swigt__p_Ferris__Emblem, _p_Ferris__EmblemTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Medallion, _p_Ferris__MedallionTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__Runner, _p_Ferris__RunnerTo_p_Ferris__Handlable, 0, 0}, {&_swigt__p_Ferris__ContextIterator, _p_Ferris__ContextIteratorTo_p_Ferris__Handlable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ImplicitIteratorUpdateLock[] = { {&_swigt__p_Ferris__ImplicitIteratorUpdateLock, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__IndexException[] = { {&_swigt__p_Ferris__IndexException, 0, 0, 0}, {&_swigt__p_Ferris__FullTextIndexException, _p_Ferris__FullTextIndexExceptionTo_p_Ferris__IndexException, 0, 0}, {&_swigt__p_Ferris__EAIndexException, _p_Ferris__EAIndexExceptionTo_p_Ferris__IndexException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__InvalidModeString[] = { {&_swigt__p_Ferris__InvalidModeString, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__InvalidSortSpecification[] = { {&_swigt__p_Ferris__InvalidSortSpecification, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__KeylistException[] = { {&_swigt__p_Ferris__KeylistException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__LDAPException[] = { {&_swigt__p_Ferris__LDAPException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__MalformedURL[] = { {&_swigt__p_Ferris__MalformedURL, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Medallion[] = { {&_swigt__p_Ferris__Medallion, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__MedallionBelief[] = { {&_swigt__p_Ferris__MedallionBelief, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__MedallionException[] = { {&_swigt__p_Ferris__MedallionException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__MutableCollectionEvents[] = { {&_swigt__p_Ferris__MutableCollectionEvents, 0, 0, 0}, {&_swigt__p_Ferris__Context, _p_Ferris__ContextTo_p_Ferris__MutableCollectionEvents, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoOpenWithContext[] = { {&_swigt__p_Ferris__NoOpenWithContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchAgentException[] = { {&_swigt__p_Ferris__NoSuchAgentException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchAttribute[] = { {&_swigt__p_Ferris__NoSuchAttribute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchBeliefException[] = { {&_swigt__p_Ferris__NoSuchBeliefException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchContextClass[] = { {&_swigt__p_Ferris__NoSuchContextClass, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchGroup[] = { {&_swigt__p_Ferris__NoSuchGroup, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchObject[] = { {&_swigt__p_Ferris__NoSuchUser, _p_Ferris__NoSuchUserTo_p_Ferris__NoSuchObject, 0, 0}, {&_swigt__p_Ferris__NoSuchObject, 0, 0, 0}, {&_swigt__p_Ferris__NoSuchGroup, _p_Ferris__NoSuchGroupTo_p_Ferris__NoSuchObject, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchPersonalityException[] = { {&_swigt__p_Ferris__NoSuchPersonalityException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchSubContext[] = { {&_swigt__p_Ferris__NoSuchSubContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NoSuchUser[] = { {&_swigt__p_Ferris__NoSuchUser, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__NotSupported[] = { {&_swigt__p_Ferris__NotSupported, 0, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, _p_Ferris__FerrisCreateSubContextNotSupportedTo_p_Ferris__NotSupported, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, _p_Ferris__FerrisCreateAttributeNotSupportedTo_p_Ferris__NotSupported, 0, 0}, {&_swigt__p_Ferris__FerrisNotSupportedInThisContext, _p_Ferris__FerrisNotSupportedInThisContextTo_p_Ferris__NotSupported, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ObjectExists[] = { {&_swigt__p_Ferris__ObjectExists, 0, 0, 0}, {&_swigt__p_Ferris__ContextExists, _p_Ferris__ContextExistsTo_p_Ferris__ObjectExists, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__OpenActionIsNotDefined[] = { {&_swigt__p_Ferris__OpenActionIsNotDefined, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ParseError[] = { {&_swigt__p_Ferris__ParseError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Personality[] = { {&_swigt__p_Ferris__Personality, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__PreprocessedSortString[] = { {&_swigt__p_Ferris__PreprocessedSortString, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ProgramSpawn[] = { {&_swigt__p_Ferris__ProgramSpawn, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__QuotaStorageFull[] = { {&_swigt__p_Ferris__QuotaStorageFull, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RegexCollection[] = { {&_swigt__p_Ferris__RegexCollection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RelativeTimeParsing[] = { {&_swigt__p_Ferris__RelativeTimeParsing, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RemoveFailed[] = { {&_swigt__p_Ferris__RemoveFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RenameFailed[] = { {&_swigt__p_Ferris__RenameFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RootContextCreationFailed[] = { {&_swigt__p_Ferris__RootContextCreationFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__RootContextFactory[] = { {&_swigt__p_Ferris__RootContextFactory, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Runner[] = { {&_swigt__p_Ferris__Runner, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SQLiteException[] = { {&_swigt__p_Ferris__SQLiteException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SchemaException[] = { {&_swigt__p_Ferris__SchemaException, 0, 0, 0}, {&_swigt__p_Ferris__SchemaNotFoundException, _p_Ferris__SchemaNotFoundExceptionTo_p_Ferris__SchemaException, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SchemaNotFoundException[] = { {&_swigt__p_Ferris__SchemaNotFoundException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SocketOptionsException[] = { {&_swigt__p_Ferris__SocketOptionsException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__StorageFull[] = { {&_swigt__p_Ferris__StorageFull, 0, 0, 0}, {&_swigt__p_Ferris__QuotaStorageFull, _p_Ferris__QuotaStorageFullTo_p_Ferris__StorageFull, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SubContextAlreadyInUse[] = { {&_swigt__p_Ferris__SubContextAlreadyInUse, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__SyntaxError[] = { {&_swigt__p_Ferris__SyntaxError, 0, 0, 0}, {&_swigt__p_Ferris__FFilterSyntaxError, _p_Ferris__FFilterSyntaxErrorTo_p_Ferris__SyntaxError, 0, 0}, {&_swigt__p_Ferris__FulltextQuerySyntaxError, _p_Ferris__FulltextQuerySyntaxErrorTo_p_Ferris__SyntaxError, 0, 0}, {&_swigt__p_Ferris__URLDecodeSyntaxError, _p_Ferris__URLDecodeSyntaxErrorTo_p_Ferris__SyntaxError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Time__Benchmark[] = { {&_swigt__p_Ferris__Time__Benchmark, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Times[] = { {&_swigt__p_Ferris__Times, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__URLDecodeSyntaxError[] = { {&_swigt__p_Ferris__URLDecodeSyntaxError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__UnknownBackupMode[] = { {&_swigt__p_Ferris__UnknownBackupMode, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__UnknownConfigLocation[] = { {&_swigt__p_Ferris__UnknownConfigLocation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__UnspoortedBlockSize[] = { {&_swigt__p_Ferris__UnspoortedBlockSize, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Util__SingleShot[] = { {&_swigt__p_Ferris__Util__SingleShot, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__Versioned[] = { {&_swigt__p_Ferris__Versioned, 0, 0, 0}, {&_swigt__p_Ferris__AttributeCollection, _p_Ferris__AttributeCollectionTo_p_Ferris__Versioned, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__WebPhotoException[] = { {&_swigt__p_Ferris__WebPhotoException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__XMLBase[] = { {&_swigt__p_Ferris__dbXMLException, _p_Ferris__dbXMLExceptionTo_p_Ferris__XMLBase, 0, 0}, {&_swigt__p_Ferris__XMLBase, 0, 0, 0}, {&_swigt__p_Ferris__XMLParseError, _p_Ferris__XMLParseErrorTo_p_Ferris__XMLBase, 0, 0}, {&_swigt__p_Ferris__XMLFatalError, _p_Ferris__XMLFatalErrorTo_p_Ferris__XMLBase, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__XMLFatalError[] = { {&_swigt__p_Ferris__XMLFatalError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__XMLParseError[] = { {&_swigt__p_Ferris__XMLParseError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__XMPBase[] = { {&_swigt__p_Ferris__XMPPacketScanFailed, _p_Ferris__XMPPacketScanFailedTo_p_Ferris__XMPBase, 0, 0}, {&_swigt__p_Ferris__XMPBase, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__XMPPacketScanFailed[] = { {&_swigt__p_Ferris__XMPPacketScanFailed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__dbXMLException[] = { {&_swigt__p_Ferris__dbXMLException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__eetException[] = { {&_swigt__p_Ferris__eetException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__eetKeyNotFound[] = { {&_swigt__p_Ferris__eetKeyNotFound, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_fourk[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_fourk, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_onemeg[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_onemeg, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_quartk[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_quartk, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_sixteenbytes[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_sixteenbytes, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_sixteenk[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_sixteenk, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_basic_streambuf_virtual[] = { {&_swigt__p_Ferris__ferris_basic_streambuf_virtual, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_ios[] = { {&_swigt__p_Ferris__ferris_ios, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_attrcol[] = { {&_swigt__p_Ferris__fh_attrcol, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_attribute[] = { {&_swigt__p_Ferris__fh_attribute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_cemblem[] = { {&_swigt__p_Ferris__fh_cemblem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_context[] = { {&_swigt__p_Ferris__fh_context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_emblem[] = { {&_swigt__p_Ferris__fh_emblem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_emblem_less[] = { {&_swigt__p_Ferris__fh_emblem_less, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_etagere[] = { {&_swigt__p_Ferris__fh_etagere, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_medallion[] = { {&_swigt__p_Ferris__fh_medallion, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_medallionBelief[] = { {&_swigt__p_Ferris__fh_medallionBelief, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_runner[] = { {&_swigt__p_Ferris__fh_runner, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__fh_sorter[] = { {&_swigt__p_Ferris__fh_sorter, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__getIOStreamCloseUpdateFailed[] = { {&_swigt__p_Ferris__getIOStreamCloseUpdateFailed, 0, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, _p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_Ferris__getIOStreamCloseUpdateFailed, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__getIOStreamCloseUpdatePermissionDenied[] = { {&_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__giStreamPosRAII[] = { {&_swigt__p_Ferris__giStreamPosRAII, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Ferris__tdbException[] = { {&_swigt__p_Ferris__tdbException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GSpawnFlags[] = { {&_swigt__p_GSpawnFlags, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GenericCloseSignal_t[] = { {&_swigt__p_GenericCloseSignal_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GetIOStream_Func_t[] = { {&_swigt__p_GetIOStream_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GetIStream_Func_t[] = { {&_swigt__p_GetIStream_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GetIStream_PassedInStream_Func_t[] = { {&_swigt__p_GetIStream_PassedInStream_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IOStreamClosed_Func_t[] = { {&_swigt__p_IOStreamClosed_Func_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__AllowConversion[] = { {&_swigt__p_Loki__AllowConversion, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__AssocVectorT_void_p_sigc__connection_t[] = { {&_swigt__p_Loki__AssocVectorT_void_p_sigc__connection_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__AssocVectorT_void_p_void_p_t[] = { {&_swigt__p_Loki__AssocVectorT_void_p_void_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__DisallowConversion[] = { {&_swigt__p_Loki__DisallowConversion, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t[] = { {&_swigt__p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t[] = { {&_swigt__p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t[] = { {&_swigt__p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t[] = { {&_swigt__p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t[] = { {&_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t[] = { {&_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t[] = { {&_swigt__p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__NullPointerException[] = { {&_swigt__p_Loki__NullPointerException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__Private__RefLinkedBase[] = { {&_swigt__p_Loki__Private__RefLinkedBase, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t[] = { {&_swigt__p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Changed[] = { {&_swigt__p_NamingEvent_Changed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Changed_Sig_t[] = { {&_swigt__p_NamingEvent_Changed_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Created[] = { {&_swigt__p_NamingEvent_Created, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Created_Sig_t[] = { {&_swigt__p_NamingEvent_Created_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Deleted[] = { {&_swigt__p_NamingEvent_Deleted, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Deleted_Sig_t[] = { {&_swigt__p_NamingEvent_Deleted_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Exists[] = { {&_swigt__p_NamingEvent_Exists, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Exists_Sig_t[] = { {&_swigt__p_NamingEvent_Exists_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_MedallionUpdated_Sig_t[] = { {&_swigt__p_NamingEvent_MedallionUpdated_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Moved[] = { {&_swigt__p_NamingEvent_Moved, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Moved_Sig_t[] = { {&_swigt__p_NamingEvent_Moved_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Start_Execute[] = { {&_swigt__p_NamingEvent_Start_Execute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Start_Execute_Sig_t[] = { {&_swigt__p_NamingEvent_Start_Execute_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Start_Reading_Context[] = { {&_swigt__p_NamingEvent_Start_Reading_Context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Start_Reading_Context_Sig_t[] = { {&_swigt__p_NamingEvent_Start_Reading_Context_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Stop_Execute[] = { {&_swigt__p_NamingEvent_Stop_Execute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Stop_Execute_Sig_t[] = { {&_swigt__p_NamingEvent_Stop_Execute_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Stop_Reading_Context[] = { {&_swigt__p_NamingEvent_Stop_Reading_Context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NamingEvent_Stop_Reading_Context_Sig_t[] = { {&_swigt__p_NamingEvent_Stop_Reading_Context_Sig_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_OnlyInCacheSignal_t[] = { {&_swigt__p_OnlyInCacheSignal_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PostfixTrimmerOps[] = { {&_swigt__p_PostfixTrimmerOps, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PrefixTrimmerOps[] = { {&_swigt__p_PrefixTrimmerOps, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_RWBase_t[] = { {&_swigt__p_RWBase_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Runner_AsyncIOFunctor_t[] = { {&_swigt__p_Runner_AsyncIOFunctor_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SubContextNames_t[] = { {&_swigt__p_SubContextNames_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TrimmerBase[] = { {&_swigt__p_TrimmerBase, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TrimmerT_PostfixTrimmerOps_t[] = { {&_swigt__p_TrimmerT_PostfixTrimmerOps_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TrimmerT_PrefixTrimmerOps_t[] = { {&_swigt__p_TrimmerT_PrefixTrimmerOps_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Version_t[] = { {&_swigt__p_Version_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XSDBasic_t[] = { {&_swigt__p_XSDBasic_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p__Base[] = { {&_swigt__p__Base, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p__Self[] = { {&_swigt__p__Self, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_fh_insideResolve[] = { {&_swigt__p_fh_insideResolve, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_fh_ostream[] = { {&_swigt__p_fh_ostream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_freelist_t[] = { {&_swigt__p_freelist_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gboolean[] = { {&_swigt__p_gboolean, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gint[] = { {&_swigt__p_gint, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_guint32[] = { {&_swigt__p_guint32, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_guint64[] = { {&_swigt__p_guint64, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_iterator_category[] = { {&_swigt__p_iterator_category, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_openmode[] = { {&_swigt__p_openmode, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_std__istringstream[] = { {&_swigt__p_p_std__istringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_std__ostringstream[] = { {&_swigt__p_p_std__ostringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_std__stringstream[] = { {&_swigt__p_p_std__stringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pid_t[] = { {&_swigt__p_pid_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pointer[] = { {&_swigt__p_pointer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_poptContext[] = { {&_swigt__p_poptContext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_poptOption[] = { {&_swigt__p_poptOption, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ref_count_t[] = { {&_swigt__p_ref_count_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal1T_void_FerrisLoki__Handlable_p_t[] = { {&_swigt__p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal1T_void_Ferris__CacheHandlable_p_t[] = { {&_swigt__p_sigc__signal1T_void_Ferris__CacheHandlable_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal1T_void_Ferris__fh_context_t[] = { {&_swigt__p_sigc__signal1T_void_Ferris__fh_context_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t[] = { {&_swigt__p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t[] = { {&_swigt__p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t[] = { {&_swigt__p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t[] = { {&_swigt__p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t[] = { {&_swigt__p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t[] = { {&_swigt__p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t[] = { {&_swigt__p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t[] = { {&_swigt__p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t[] = { {&_swigt__p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t[] = { {&_swigt__p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_sigc__trackable[] = { {&_swigt__p_Ferris__ColdEmblem, _p_Ferris__ColdEmblemTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__AttributeCollection, _p_Ferris__AttributeCollectionTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Times, _p_Ferris__TimesTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__AttributeProxy, _p_Ferris__AttributeProxyTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__AI__Agent, _p_Ferris__AI__AgentTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite_Contents, _p_Ferris__EA_Atom_ReadWrite_ContentsTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Personality, _p_Ferris__PersonalityTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite_OpenModeCached, _p_Ferris__EA_Atom_ReadWrite_OpenModeCachedTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__MedallionBelief, _p_Ferris__MedallionBeliefTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Time__Benchmark, _p_Ferris__Time__BenchmarkTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Versioned, _p_Ferris__VersionedTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Etagere, _p_Ferris__EtagereTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite_PassedInStream, _p_Ferris__EA_Atom_ReadWrite_PassedInStreamTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__CacheHandlable, _p_Ferris__CacheHandlableTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Handlable, _p_Ferris__HandlableTo_p_sigc__trackable, 0, 0}, {&_swigt__p_FerrisLoki__Handlable, _p_FerrisLoki__HandlableTo_p_sigc__trackable, 0, 0}, {&_swigt__p_sigc__trackable, 0, 0, 0}, {&_swigt__p_Ferris__EA_Atom_ReadWrite, _p_Ferris__EA_Atom_ReadWriteTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Emblem, _p_Ferris__EmblemTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Medallion, _p_Ferris__MedallionTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__Runner, _p_Ferris__RunnerTo_p_sigc__trackable, 0, 0}, {&_swigt__p_Ferris__ContextIterator, _p_Ferris__ContextIteratorTo_p_sigc__trackable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t[] = { {&_swigt__p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__basic_streambufT_char_std__char_traitsT_char_t_t[] = { {&_swigt__p_std__basic_streambufT_char_std__char_traitsT_char_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_Ferris__XMLBase, _p_Ferris__XMLBaseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__RenameFailed, _p_Ferris__RenameFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdateFailed, _p_Ferris__getIOStreamCloseUpdateFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CurlPerformFailed, _p_Ferris__CurlPerformFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisImageSaveFailed, _p_Ferris__FerrisImageSaveFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CopyFailed, _p_Ferris__CopyFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__RemoveFailed, _p_Ferris__RemoveFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeFailed, _p_Ferris__FerrisCreateAttributeFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotReadContextPcctsParseFailed, _p_Ferris__CanNotReadContextPcctsParseFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AttributeAlreadyInUse, _p_Ferris__AttributeAlreadyInUseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SubContextAlreadyInUse, _p_Ferris__SubContextAlreadyInUseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AttributeNotWritable, _p_Ferris__AttributeNotWritableTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BadSignature, _p_Ferris__BadSignatureTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__GPhoto2, _p_Ferris__GPhoto2To_p_std__exception, 0, 0}, {&_swigt__p_Ferris__XMLFatalError, _p_Ferris__XMLFatalErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisInternalError, _p_Ferris__FerrisInternalErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BadParam, _p_Ferris__BadParamTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisVFSExceptionBase, _p_Ferris__FerrisVFSExceptionBaseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CryptoBase, _p_Ferris__CryptoBaseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisExceptionBase, _p_Ferris__FerrisExceptionBaseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisWaitTimedOut, _p_Ferris__FerrisWaitTimedOutTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AccessDenied, _p_Ferris__AccessDeniedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotDelete, _p_Ferris__CanNotDeleteTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BackupNameWouldBeTooLong, _p_Ferris__BackupNameWouldBeTooLongTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotMonitorDirWithFAM, _p_Ferris__CanNotMonitorDirWithFAMTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CurlStateError, _p_Ferris__CurlStateErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchGroup, _p_Ferris__NoSuchGroupTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__UnknownBackupMode, _p_Ferris__UnknownBackupModeTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisParentNotSetError, _p_Ferris__FerrisParentNotSetErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchContextClass, _p_Ferris__NoSuchContextClassTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__GenericError, _p_Ferris__GenericErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FileClipboard, _p_Ferris__FileClipboardTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCurlServerNameNotFound, _p_Ferris__FerrisCurlServerNameNotFoundTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__Db4KeyNotFound, _p_Ferris__Db4KeyNotFoundTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__eetKeyNotFound, _p_Ferris__eetKeyNotFoundTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisSqlServerNameNotFound, _p_Ferris__FerrisSqlServerNameNotFoundTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ContextExists, _p_Ferris__ContextExistsTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ObjectExists, _p_Ferris__ObjectExistsTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__DesktopFileKeyNotFound, _p_Ferris__DesktopFileKeyNotFoundTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__Db4Exception, _p_Ferris__Db4ExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CursorException, _p_Ferris__CursorExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__DVDReadException, _p_Ferris__DVDReadExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BackupException, _p_Ferris__BackupExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SocketOptionsException, _p_Ferris__SocketOptionsExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisSetCWDException, _p_Ferris__FerrisSetCWDExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisStatException, _p_Ferris__FerrisStatExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisGLibCException, _p_Ferris__FerrisGLibCExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__LDAPException, _p_Ferris__LDAPExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CompressionException, _p_Ferris__CompressionExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CompressionAlgoNotFoundException, _p_Ferris__CompressionAlgoNotFoundExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__IndexException, _p_Ferris__IndexExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FullTextIndexException, _p_Ferris__FullTextIndexExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__EAIndexException, _p_Ferris__EAIndexExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SchemaException, _p_Ferris__SchemaExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SchemaNotFoundException, _p_Ferris__SchemaNotFoundExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__MedallionException, _p_Ferris__MedallionExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__EtagereException, _p_Ferris__EtagereExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__EmblemException, _p_Ferris__EmblemExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__EmblemNotFoundException, _p_Ferris__EmblemNotFoundExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotAddEmblemException, _p_Ferris__CanNotAddEmblemExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchPersonalityException, _p_Ferris__NoSuchPersonalityExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchBeliefException, _p_Ferris__NoSuchBeliefExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AgentException, _p_Ferris__AgentExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AgentAlreadyExistsException, _p_Ferris__AgentAlreadyExistsExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchAgentException, _p_Ferris__NoSuchAgentExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__AgentOnlyHandlesOneEmblemException, _p_Ferris__AgentOnlyHandlesOneEmblemExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__DBusException, _p_Ferris__DBusExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__DBusConnectionException, _p_Ferris__DBusConnectionExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__dbXMLException, _p_Ferris__dbXMLExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_Ferris__KeylistException, _p_Ferris__KeylistExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__eetException, _p_Ferris__eetExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__GdbmException, _p_Ferris__GdbmExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__tdbException, _p_Ferris__tdbExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__InvalidSortSpecification, _p_Ferris__InvalidSortSpecificationTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__UnknownConfigLocation, _p_Ferris__UnknownConfigLocationTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__WebPhotoException, _p_Ferris__WebPhotoExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SQLiteException, _p_Ferris__SQLiteExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisHALException, _p_Ferris__FerrisHALExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisStreamException, _p_Ferris__FerrisStreamExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__GPGMEInitFailed, _p_Ferris__GPGMEInitFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__DTDCreationFailed, _p_Ferris__DTDCreationFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CurlEasyInitFailed, _p_Ferris__CurlEasyInitFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CurlStaticInitFailed, _p_Ferris__CurlStaticInitFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisStreamLoadFailed, _p_Ferris__FerrisStreamLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__GModuleOpenFailed, _p_Ferris__GModuleOpenFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisImlib2ImageLoadFailed, _p_Ferris__FerrisImlib2ImageLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisGIMPImageLoadFailed, _p_Ferris__FerrisGIMPImageLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__RootContextCreationFailed, _p_Ferris__RootContextCreationFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextFailed, _p_Ferris__FerrisCreateSubContextFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisImageLoadFailed, _p_Ferris__FerrisImageLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisPNGImageLoadFailed, _p_Ferris__FerrisPNGImageLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisJPEGImageLoadFailed, _p_Ferris__FerrisJPEGImageLoadFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__XMPPacketScanFailed, _p_Ferris__XMPPacketScanFailedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__RelativeTimeParsing, _p_Ferris__RelativeTimeParsingTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTimeString, _p_Ferris__BadlyFormedTimeStringTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchUser, _p_Ferris__NoSuchUserTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__InvalidModeString, _p_Ferris__InvalidModeStringTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__XMPBase, _p_Ferris__XMPBaseTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisNotSupportedInThisContext, _p_Ferris__FerrisNotSupportedInThisContextTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchSubContext, _p_Ferris__NoSuchSubContextTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotReadContext, _p_Ferris__CanNotReadContextTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisNotReadableAsContext, _p_Ferris__FerrisNotReadableAsContextTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoOpenWithContext, _p_Ferris__NoOpenWithContextTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__getIOStreamCloseUpdatePermissionDenied, _p_Ferris__getIOStreamCloseUpdatePermissionDeniedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__XMLParseError, _p_Ferris__XMLParseErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotGetScriptNameError, _p_Ferris__FerrisCanNotGetScriptNameErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__QuotaStorageFull, _p_Ferris__QuotaStorageFullTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__StorageFull, _p_Ferris__StorageFullTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ParseError, _p_Ferris__ParseErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotDereferenceDanglingSoftLink, _p_Ferris__CanNotDereferenceDanglingSoftLinkTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ProgramSpawn, _p_Ferris__ProgramSpawnTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCanNotCreateLeafOfLeaf, _p_Ferris__FerrisCanNotCreateLeafOfLeafTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchObject, _p_Ferris__NoSuchObjectTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotGetStream, _p_Ferris__CanNotGetStreamTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ContentNotModified, _p_Ferris__ContentNotModifiedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BranchFileSystem, _p_Ferris__BranchFileSystemTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCreateSubContextNotSupported, _p_Ferris__FerrisCreateSubContextNotSupportedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisCreateAttributeNotSupported, _p_Ferris__FerrisCreateAttributeNotSupportedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NotSupported, _p_Ferris__NotSupportedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__SyntaxError, _p_Ferris__SyntaxErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FFilterSyntaxError, _p_Ferris__FFilterSyntaxErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FulltextQuerySyntaxError, _p_Ferris__FulltextQuerySyntaxErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__URLDecodeSyntaxError, _p_Ferris__URLDecodeSyntaxErrorTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__OpenActionIsNotDefined, _p_Ferris__OpenActionIsNotDefinedTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__FerrisOutOfMemory, _p_Ferris__FerrisOutOfMemoryTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CreateFIFO, _p_Ferris__CreateFIFOTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__ChildNotRunning, _p_Ferris__ChildNotRunningTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__CanNotAddExternalAttribute, _p_Ferris__CanNotAddExternalAttributeTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__NoSuchAttribute, _p_Ferris__NoSuchAttributeTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__UnspoortedBlockSize, _p_Ferris__UnspoortedBlockSizeTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__BadlyFormedTime, _p_Ferris__BadlyFormedTimeTo_p_std__exception, 0, 0}, {&_swigt__p_Ferris__MalformedURL, _p_Ferris__MalformedURLTo_p_std__exception, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ios__openmode[] = { {&_swigt__p_std__ios__openmode, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__iostream[] = { {&_swigt__p_std__iostream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__istream[] = { {&_swigt__p_std__istream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__istringstream[] = { {&_swigt__p_std__istringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Ferris__fh_context_t[] = { {&_swigt__p_std__listT_Ferris__fh_context_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Ferris__fh_emblem_t[] = { {&_swigt__p_std__listT_Ferris__fh_emblem_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Ferris__fh_sorter_t[] = { {&_swigt__p_std__listT_Ferris__fh_sorter_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t[] = { {&_swigt__p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t[] = { {&_swigt__p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_std__pairT_std__string_std__string_t_t[] = { {&_swigt__p_std__listT_std__pairT_std__string_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_std__string_t[] = { {&_swigt__p_std__listT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t[] = { {&_swigt__p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_int_t[] = { {&_swigt__p_std__mapT_int_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_std__string_std__string_t[] = { {&_swigt__p_std__mapT_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostringstream[] = { {&_swigt__p_std__ostringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__out_of_range[] = { {&_swigt__p_std__out_of_range, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__pairT_std__string_std__string_t[] = { {&_swigt__p_std__pairT_std__string_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__reverse_iteratorT_Ferris__ContextIterator_t[] = { {&_swigt__p_std__reverse_iteratorT_Ferris__ContextIterator_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t[] = { {&_swigt__p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__setT_guint32_t[] = { {&_swigt__p_std__setT_guint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__setT_std__string_t[] = { {&_swigt__p_std__setT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__streampos[] = { {&_swigt__p_std__streampos, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__streamsize[] = { {&_swigt__p_std__streamsize, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__stringstream[] = { {&_swigt__p_std__stringstream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_t[] = { {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = { {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__wstring[] = { {&_swigt__p_std__wstring, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_tm[] = { {&_swigt__p_tm, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_CompositeTrimmerT_TrimmerT_PrefixTrimmerOps_t_TrimmerT_PostfixTrimmerOps_t_t, + _swigc__p_ContextEvent_Headers_Received_Sig_t, + _swigc__p_Fampp__FamppDirMonitorInitFailedException, + _swigc__p_FerrisLoki__FerrisSmallObjAllocator, + _swigc__p_FerrisLoki__Handlable, + _swigc__p_Ferris__AI__Agent, + _swigc__p_Ferris__AccessDenied, + _swigc__p_Ferris__AgentAlreadyExistsException, + _swigc__p_Ferris__AgentException, + _swigc__p_Ferris__AgentOnlyHandlesOneEmblemException, + _swigc__p_Ferris__Attribute, + _swigc__p_Ferris__AttributeAlreadyInUse, + _swigc__p_Ferris__AttributeCollection, + _swigc__p_Ferris__AttributeNotWritable, + _swigc__p_Ferris__AttributeProxy, + _swigc__p_Ferris__BackupException, + _swigc__p_Ferris__BackupNameWouldBeTooLong, + _swigc__p_Ferris__BadParam, + _swigc__p_Ferris__BadSignature, + _swigc__p_Ferris__BadlyFormedTime, + _swigc__p_Ferris__BadlyFormedTimeString, + _swigc__p_Ferris__BranchFileSystem, + _swigc__p_Ferris__CacheHandlable, + _swigc__p_Ferris__CacheManager, + _swigc__p_Ferris__CanNotAddEmblemException, + _swigc__p_Ferris__CanNotAddExternalAttribute, + _swigc__p_Ferris__CanNotDelete, + _swigc__p_Ferris__CanNotDereferenceDanglingSoftLink, + _swigc__p_Ferris__CanNotGetStream, + _swigc__p_Ferris__CanNotMonitorDirWithFAM, + _swigc__p_Ferris__CanNotReadContext, + _swigc__p_Ferris__CanNotReadContextPcctsParseFailed, + _swigc__p_Ferris__ChildNotRunning, + _swigc__p_Ferris__ColdEmblem, + _swigc__p_Ferris__CompressionAlgoNotFoundException, + _swigc__p_Ferris__CompressionException, + _swigc__p_Ferris__ContentNotModified, + _swigc__p_Ferris__Context, + _swigc__p_Ferris__ContextCollection, + _swigc__p_Ferris__ContextExists, + _swigc__p_Ferris__ContextIterator, + _swigc__p_Ferris__ContextSetCompare, + _swigc__p_Ferris__CopyFailed, + _swigc__p_Ferris__CreateFIFO, + _swigc__p_Ferris__CreateMetaDataContext, + _swigc__p_Ferris__CryptoBase, + _swigc__p_Ferris__CurlEasyInitFailed, + _swigc__p_Ferris__CurlPerformFailed, + _swigc__p_Ferris__CurlStateError, + _swigc__p_Ferris__CurlStaticInitFailed, + _swigc__p_Ferris__CursorException, + _swigc__p_Ferris__DBusConnectionException, + _swigc__p_Ferris__DBusException, + _swigc__p_Ferris__DTDCreationFailed, + _swigc__p_Ferris__DVDReadException, + _swigc__p_Ferris__Db4Exception, + _swigc__p_Ferris__Db4KeyNotFound, + _swigc__p_Ferris__DesktopFileKeyNotFound, + _swigc__p_Ferris__EAIndexException, + _swigc__p_Ferris__EA_Atom, + _swigc__p_Ferris__EA_Atom_RDFCacheAttribute, + _swigc__p_Ferris__EA_Atom_ReadOnly, + _swigc__p_Ferris__EA_Atom_ReadOnly_PassedInStream, + _swigc__p_Ferris__EA_Atom_ReadWrite, + _swigc__p_Ferris__EA_Atom_ReadWrite_BaseT_Ferris__EA_Atom_ReadOnly_PassedInStream_t__GetIStream_PassedInStream_Func_t, + _swigc__p_Ferris__EA_Atom_ReadWrite_Contents, + _swigc__p_Ferris__EA_Atom_ReadWrite_OpenModeCached, + _swigc__p_Ferris__EA_Atom_ReadWrite_PassedInStream, + _swigc__p_Ferris__EA_Atom_ReadWrite__RWBase_t__GetIStream_Func_t, + _swigc__p_Ferris__EA_Atom_ReadWrite__RWBase_t__IOStreamClosed_Func_t, + _swigc__p_Ferris__EA_Atom_Static, + _swigc__p_Ferris__Emblem, + _swigc__p_Ferris__EmblemException, + _swigc__p_Ferris__EmblemNotFoundException, + _swigc__p_Ferris__Etagere, + _swigc__p_Ferris__EtagereException, + _swigc__p_Ferris__FCA__ConceptLattice, + _swigc__p_Ferris__FCA__fh_conceptLattice, + _swigc__p_Ferris__FFilterSyntaxError, + _swigc__p_Ferris__FerrisCanNotCreateLeafOfLeaf, + _swigc__p_Ferris__FerrisCanNotGetScriptNameError, + _swigc__p_Ferris__FerrisCreateAttributeFailed, + _swigc__p_Ferris__FerrisCreateAttributeNotSupported, + _swigc__p_Ferris__FerrisCreateSubContextFailed, + _swigc__p_Ferris__FerrisCreateSubContextNotSupported, + _swigc__p_Ferris__FerrisCurlServerNameNotFound, + _swigc__p_Ferris__FerrisExceptionBase, + _swigc__p_Ferris__FerrisException_CodeState, + _swigc__p_Ferris__FerrisGIMPImageLoadFailed, + _swigc__p_Ferris__FerrisGLibCException, + _swigc__p_Ferris__FerrisHALException, + _swigc__p_Ferris__FerrisImageLoadFailed, + _swigc__p_Ferris__FerrisImageSaveFailed, + _swigc__p_Ferris__FerrisImlib2ImageLoadFailed, + _swigc__p_Ferris__FerrisInternalError, + _swigc__p_Ferris__FerrisJPEGImageLoadFailed, + _swigc__p_Ferris__FerrisNotReadableAsContext, + _swigc__p_Ferris__FerrisNotSupportedInThisContext, + _swigc__p_Ferris__FerrisOutOfMemory, + _swigc__p_Ferris__FerrisPNGImageLoadFailed, + _swigc__p_Ferris__FerrisParentNotSetError, + _swigc__p_Ferris__FerrisSetCWDException, + _swigc__p_Ferris__FerrisSqlServerNameNotFound, + _swigc__p_Ferris__FerrisStatException, + _swigc__p_Ferris__FerrisStreamException, + _swigc__p_Ferris__FerrisStreamLoadFailed, + _swigc__p_Ferris__FerrisVFSExceptionBase, + _swigc__p_Ferris__FerrisWaitTimedOut, + _swigc__p_Ferris__Ferris_Logging_ostreamT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__Ferris_fstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__Ferris_ififostreamT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__Ferris_ifstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__Ferris_istringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__Ferris_ofstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__Ferris_ostreamT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__Ferris_ostringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__Ferris_stringstreamT_char_std__char_traitsT_char_t_std__allocatorT_char_t_t, + _swigc__p_Ferris__FileClipboard, + _swigc__p_Ferris__FullTextIndexException, + _swigc__p_Ferris__FulltextQuerySyntaxError, + _swigc__p_Ferris__GModuleOpenFailed, + _swigc__p_Ferris__GPGMEInitFailed, + _swigc__p_Ferris__GPhoto2, + _swigc__p_Ferris__GdbmException, + _swigc__p_Ferris__GenericError, + _swigc__p_Ferris__Handlable, + _swigc__p_Ferris__ImplicitIteratorUpdateLock, + _swigc__p_Ferris__IndexException, + _swigc__p_Ferris__InvalidModeString, + _swigc__p_Ferris__InvalidSortSpecification, + _swigc__p_Ferris__KeylistException, + _swigc__p_Ferris__LDAPException, + _swigc__p_Ferris__MalformedURL, + _swigc__p_Ferris__Medallion, + _swigc__p_Ferris__MedallionBelief, + _swigc__p_Ferris__MedallionException, + _swigc__p_Ferris__MutableCollectionEvents, + _swigc__p_Ferris__NoOpenWithContext, + _swigc__p_Ferris__NoSuchAgentException, + _swigc__p_Ferris__NoSuchAttribute, + _swigc__p_Ferris__NoSuchBeliefException, + _swigc__p_Ferris__NoSuchContextClass, + _swigc__p_Ferris__NoSuchGroup, + _swigc__p_Ferris__NoSuchObject, + _swigc__p_Ferris__NoSuchPersonalityException, + _swigc__p_Ferris__NoSuchSubContext, + _swigc__p_Ferris__NoSuchUser, + _swigc__p_Ferris__NotSupported, + _swigc__p_Ferris__ObjectExists, + _swigc__p_Ferris__OpenActionIsNotDefined, + _swigc__p_Ferris__ParseError, + _swigc__p_Ferris__Personality, + _swigc__p_Ferris__PreprocessedSortString, + _swigc__p_Ferris__ProgramSpawn, + _swigc__p_Ferris__QuotaStorageFull, + _swigc__p_Ferris__RegexCollection, + _swigc__p_Ferris__RelativeTimeParsing, + _swigc__p_Ferris__RemoveFailed, + _swigc__p_Ferris__RenameFailed, + _swigc__p_Ferris__RootContextCreationFailed, + _swigc__p_Ferris__RootContextFactory, + _swigc__p_Ferris__Runner, + _swigc__p_Ferris__SQLiteException, + _swigc__p_Ferris__SchemaException, + _swigc__p_Ferris__SchemaNotFoundException, + _swigc__p_Ferris__SocketOptionsException, + _swigc__p_Ferris__StorageFull, + _swigc__p_Ferris__SubContextAlreadyInUse, + _swigc__p_Ferris__SyntaxError, + _swigc__p_Ferris__Time__Benchmark, + _swigc__p_Ferris__Times, + _swigc__p_Ferris__URLDecodeSyntaxError, + _swigc__p_Ferris__UnknownBackupMode, + _swigc__p_Ferris__UnknownConfigLocation, + _swigc__p_Ferris__UnspoortedBlockSize, + _swigc__p_Ferris__Util__SingleShot, + _swigc__p_Ferris__Versioned, + _swigc__p_Ferris__WebPhotoException, + _swigc__p_Ferris__XMLBase, + _swigc__p_Ferris__XMLFatalError, + _swigc__p_Ferris__XMLParseError, + _swigc__p_Ferris__XMPBase, + _swigc__p_Ferris__XMPPacketScanFailed, + _swigc__p_Ferris__dbXMLException, + _swigc__p_Ferris__eetException, + _swigc__p_Ferris__eetKeyNotFound, + _swigc__p_Ferris__ferris_basic_streambuf_fourk, + _swigc__p_Ferris__ferris_basic_streambuf_onemeg, + _swigc__p_Ferris__ferris_basic_streambuf_quartk, + _swigc__p_Ferris__ferris_basic_streambuf_sixteenbytes, + _swigc__p_Ferris__ferris_basic_streambuf_sixteenk, + _swigc__p_Ferris__ferris_basic_streambuf_virtual, + _swigc__p_Ferris__ferris_ios, + _swigc__p_Ferris__ferris_streambufT_char_std__char_traitsT_char_t_t, + _swigc__p_Ferris__fh_attrcol, + _swigc__p_Ferris__fh_attribute, + _swigc__p_Ferris__fh_cemblem, + _swigc__p_Ferris__fh_context, + _swigc__p_Ferris__fh_emblem, + _swigc__p_Ferris__fh_emblem_less, + _swigc__p_Ferris__fh_etagere, + _swigc__p_Ferris__fh_medallion, + _swigc__p_Ferris__fh_medallionBelief, + _swigc__p_Ferris__fh_runner, + _swigc__p_Ferris__fh_sorter, + _swigc__p_Ferris__getIOStreamCloseUpdateFailed, + _swigc__p_Ferris__getIOStreamCloseUpdatePermissionDenied, + _swigc__p_Ferris__giStreamPosRAII, + _swigc__p_Ferris__tdbException, + _swigc__p_GSpawnFlags, + _swigc__p_GenericCloseSignal_t, + _swigc__p_GetIOStream_Func_t, + _swigc__p_GetIStream_Func_t, + _swigc__p_GetIStream_PassedInStream_Func_t, + _swigc__p_IOStreamClosed_Func_t, + _swigc__p_Loki__AllowConversion, + _swigc__p_Loki__AssocVectorT_void_p_sigc__connection_t, + _swigc__p_Loki__AssocVectorT_void_p_void_p_t, + _swigc__p_Loki__DisallowConversion, + _swigc__p_Loki__FunctorT_Ferris__Ferris_iostreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, + _swigc__p_Loki__FunctorT_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_t_LOKI_TYPELIST_3_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_pF_t, + _swigc__p_Loki__FunctorT_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, + _swigc__p_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t, + _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_emblem_const_RF_t, + _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_1_fFerris__fh_runnerF_t, + _swigc__p_Loki__FunctorT_void_LOKI_TYPELIST_4_fFerris__Context_p_std__string_const_R_Ferris__EA_Atom_p_Ferris__Ferris_istreamT_char_std__char_traitsT_char_t_tF_t, + _swigc__p_Loki__NullPointerException, + _swigc__p_Loki__Private__RefLinkedBase, + _swigc__p_Loki__SmartPtrT_Ferris__AI__Agent_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__AsyncIOHandler_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__CreateMetaDataContext___Ferris__FerrisExRefCountedContext_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4Tree_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAIndexManagerDB4_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__EAQuery_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__EAIndex__ForwardEAIndexInterface_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__FerrisSlaveProcess_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Ferrisls_aggregate_data_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Image_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Regex_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Semantic__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Semantic__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Time__Benchmark_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__Times_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__XMLMsgStreamCollector_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__redlandea__SmushSet_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_Ferris__redlandea__TreeSmushing_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t, + _swigc__p_Loki__SmartPtrT_boost__regex_Loki__RefLinked_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, + _swigc__p_Loki__SmartPtrT_char_Loki__DestructiveCopy_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_Loki__DefaultSPStorage_t, + _swigc__p_NamingEvent_Changed, + _swigc__p_NamingEvent_Changed_Sig_t, + _swigc__p_NamingEvent_Created, + _swigc__p_NamingEvent_Created_Sig_t, + _swigc__p_NamingEvent_Deleted, + _swigc__p_NamingEvent_Deleted_Sig_t, + _swigc__p_NamingEvent_Exists, + _swigc__p_NamingEvent_Exists_Sig_t, + _swigc__p_NamingEvent_MedallionUpdated_Sig_t, + _swigc__p_NamingEvent_Moved, + _swigc__p_NamingEvent_Moved_Sig_t, + _swigc__p_NamingEvent_Start_Execute, + _swigc__p_NamingEvent_Start_Execute_Sig_t, + _swigc__p_NamingEvent_Start_Reading_Context, + _swigc__p_NamingEvent_Start_Reading_Context_Sig_t, + _swigc__p_NamingEvent_Stop_Execute, + _swigc__p_NamingEvent_Stop_Execute_Sig_t, + _swigc__p_NamingEvent_Stop_Reading_Context, + _swigc__p_NamingEvent_Stop_Reading_Context_Sig_t, + _swigc__p_OnlyInCacheSignal_t, + _swigc__p_PostfixTrimmerOps, + _swigc__p_PrefixTrimmerOps, + _swigc__p_RWBase_t, + _swigc__p_Runner_AsyncIOFunctor_t, + _swigc__p_SubContextNames_t, + _swigc__p_TrimmerBase, + _swigc__p_TrimmerT_PostfixTrimmerOps_t, + _swigc__p_TrimmerT_PrefixTrimmerOps_t, + _swigc__p_Version_t, + _swigc__p_XSDBasic_t, + _swigc__p__Base, + _swigc__p__Self, + _swigc__p___gnu_cxx__stdio_filebufT_char_std__char_traitsT_char_t_t, + _swigc__p_char, + _swigc__p_difference_type, + _swigc__p_fh_insideResolve, + _swigc__p_fh_ostream, + _swigc__p_freelist_t, + _swigc__p_gboolean, + _swigc__p_gint, + _swigc__p_guint32, + _swigc__p_guint64, + _swigc__p_iterator_category, + _swigc__p_openmode, + _swigc__p_p_char, + _swigc__p_p_std__istringstream, + _swigc__p_p_std__ostringstream, + _swigc__p_p_std__stringstream, + _swigc__p_pid_t, + _swigc__p_pointer, + _swigc__p_poptContext, + _swigc__p_poptOption, + _swigc__p_ref_count_t, + _swigc__p_reference, + _swigc__p_sigc__signal1T_void_FerrisLoki__Handlable_p_t, + _swigc__p_sigc__signal1T_void_Ferris__CacheHandlable_p_t, + _swigc__p_sigc__signal1T_void_Ferris__fh_context_t, + _swigc__p_sigc__signal1T_void_NamingEvent_Start_Reading_Context_p_t, + _swigc__p_sigc__signal1T_void_NamingEvent_Stop_Reading_Context_p_t, + _swigc__p_sigc__signal2T_void_Ferris__closeSignalStream_t_R_std__streamsize_t, + _swigc__p_sigc__signal2T_void_Ferris__fh_context_Ferris__stringset_t_const_R_t, + _swigc__p_sigc__signal2T_void_Ferris__fh_emblem_Ferris__fh_emblem_t, + _swigc__p_sigc__signal2T_void_Ferris__fh_etagere_Ferris__fh_emblem_t, + _swigc__p_sigc__signal3T_void_Ferris__fh_emblem_std__string_std__string_t, + _swigc__p_sigc__signal3T_void_NamingEvent_Changed_p_std__string_std__string_t, + _swigc__p_sigc__signal3T_void_NamingEvent_Deleted_p_std__string_std__string_t, + _swigc__p_sigc__signal3T_void_NamingEvent_Moved_p_std__string_std__string_t, + _swigc__p_sigc__signal3T_void_NamingEvent_Start_Execute_p_std__string_std__string_t, + _swigc__p_sigc__signal3T_void_NamingEvent_Stop_Execute_p_std__string_std__string_t, + _swigc__p_sigc__signal4T_void_Ferris__fh_context_Ferris__fh_context_int_int_t, + _swigc__p_sigc__signal4T_void_NamingEvent_Created_p_Ferris__fh_context_const_R_std__string_std__string_t, + _swigc__p_sigc__signal4T_void_NamingEvent_Exists_p_Ferris__fh_context_const_R_std__string_std__string_t, + _swigc__p_sigc__trackable, + _swigc__p_std__basic_ostreamT_wchar_t_std__char_traitsT_wchar_t_t_t, + _swigc__p_std__basic_streambufT_char_std__char_traitsT_char_t_t, + _swigc__p_std__exception, + _swigc__p_std__ios__openmode, + _swigc__p_std__iostream, + _swigc__p_std__istream, + _swigc__p_std__istringstream, + _swigc__p_std__listT_Ferris__fh_context_t, + _swigc__p_std__listT_Ferris__fh_emblem_t, + _swigc__p_std__listT_Ferris__fh_sorter_t, + _swigc__p_std__listT_Loki__FunctorT_bool_LOKI_TYPELIST_1_fFerris__fh_context_const_RF_t_t, + _swigc__p_std__listT_Loki__SmartPtrT_Ferris__Personality_FerrisLoki__FerrisExRefCounted_Loki__DisallowConversion_FerrisLoki__FerrisExSmartPointerChecker_FerrisLoki__FerrisExSmartPtrStorage_t_t, + _swigc__p_std__listT_std__pairT_std__string_std__string_t_t, + _swigc__p_std__listT_std__string_t, + _swigc__p_std__mapT_Ferris__XSDBasic_t_Ferris__fh_context_t, + _swigc__p_std__mapT_int_int_t, + _swigc__p_std__mapT_std__string_std__string_t, + _swigc__p_std__ostringstream, + _swigc__p_std__out_of_range, + _swigc__p_std__pairT_std__string_std__string_t, + _swigc__p_std__reverse_iteratorT_Ferris__ContextIterator_t, + _swigc__p_std__setT_Ferris__fh_emblem_Ferris__fh_emblem_less_t, + _swigc__p_std__setT_guint32_t, + _swigc__p_std__setT_std__string_t, + _swigc__p_std__streampos, + _swigc__p_std__streamsize, + _swigc__p_std__string, + _swigc__p_std__stringstream, + _swigc__p_std__vectorT_int_t, + _swigc__p_std__vectorT_std__string_t, + _swigc__p_std__wstring, + _swigc__p_time_t, + _swigc__p_tm, + _swigc__p_uint32_t, + _swigc__p_value_type, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_constant_info swig_constants[] = { +{0,0,0,0,0,0} +}; +#ifdef __cplusplus +} +#endif +static swig_variable_info swig_variables[] = { + { "libferrisperlc::NullTM", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_NullTM_get,&SWIGTYPE_p_tm }, + { "libferrisperlc::SCHEMA_DEFAULT_DISPLAY_WIDTH", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_SCHEMA_DEFAULT_DISPLAY_WIDTH_get,0 }, + { "libferrisperlc::SCHEMA_DEFAULT_DISPLAY_PRECISION", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_SCHEMA_DEFAULT_DISPLAY_PRECISION_get,0 }, + { "libferrisperlc::SCHEMA_JUSTIFICATION", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_SCHEMA_JUSTIFICATION_get,0 }, + { "libferrisperlc::SCHEMA_DEFAULTSORT", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_SCHEMA_DEFAULTSORT_get,0 }, + { "libferrisperlc::cursor_object_always_remake", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_cursor_object_always_remake_get,0 }, + { "libferrisperlc::cursor_object_list_size", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_cursor_object_list_size_get,0 }, + { "libferrisperlc::MAX_REF_COUNT", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_MAX_REF_COUNT_get,&SWIGTYPE_p_uint32_t }, +{0,0,0,0} +}; +static swig_command_info swig_commands[] = { +{"libferrisperlc::new_RefLinkedBase", _wrap_new_RefLinkedBase}, +{"libferrisperlc::RefLinkedBase_Release", _wrap_RefLinkedBase_Release}, +{"libferrisperlc::RefLinkedBase_Swap", _wrap_RefLinkedBase_Swap}, +{"libferrisperlc::delete_RefLinkedBase", _wrap_delete_RefLinkedBase}, +{"libferrisperlc::AllowConversion_Swap", _wrap_AllowConversion_Swap}, +{"libferrisperlc::new_AllowConversion", _wrap_new_AllowConversion}, +{"libferrisperlc::delete_AllowConversion", _wrap_delete_AllowConversion}, +{"libferrisperlc::new_DisallowConversion", _wrap_new_DisallowConversion}, +{"libferrisperlc::DisallowConversion_Swap", _wrap_DisallowConversion_Swap}, +{"libferrisperlc::delete_DisallowConversion", _wrap_delete_DisallowConversion}, +{"libferrisperlc::new_NullPointerException", _wrap_new_NullPointerException}, +{"libferrisperlc::NullPointerException_what", _wrap_NullPointerException_what}, +{"libferrisperlc::delete_NullPointerException", _wrap_delete_NullPointerException}, +{"libferrisperlc::new_IntVector", _wrap_new_IntVector}, +{"libferrisperlc::IntVector_size", _wrap_IntVector_size}, +{"libferrisperlc::IntVector_empty", _wrap_IntVector_empty}, +{"libferrisperlc::IntVector_clear", _wrap_IntVector_clear}, +{"libferrisperlc::IntVector_push", _wrap_IntVector_push}, +{"libferrisperlc::IntVector_pop", _wrap_IntVector_pop}, +{"libferrisperlc::IntVector_get", _wrap_IntVector_get}, +{"libferrisperlc::IntVector_set", _wrap_IntVector_set}, +{"libferrisperlc::delete_IntVector", _wrap_delete_IntVector}, +{"libferrisperlc::new_StringVector", _wrap_new_StringVector}, +{"libferrisperlc::StringVector_size", _wrap_StringVector_size}, +{"libferrisperlc::StringVector_empty", _wrap_StringVector_empty}, +{"libferrisperlc::StringVector_clear", _wrap_StringVector_clear}, +{"libferrisperlc::StringVector_push", _wrap_StringVector_push}, +{"libferrisperlc::StringVector_pop", _wrap_StringVector_pop}, +{"libferrisperlc::StringVector_get", _wrap_StringVector_get}, +{"libferrisperlc::StringVector_set", _wrap_StringVector_set}, +{"libferrisperlc::delete_StringVector", _wrap_delete_StringVector}, +{"libferrisperlc::Handlable_private_AboutToBeDeleted", _wrap_Handlable_private_AboutToBeDeleted}, +{"libferrisperlc::new_Handlable", _wrap_new_Handlable}, +{"libferrisperlc::delete_Handlable", _wrap_delete_Handlable}, +{"libferrisperlc::Handlable_AddRef", _wrap_Handlable_AddRef}, +{"libferrisperlc::Handlable_Release", _wrap_Handlable_Release}, +{"libferrisperlc::Handlable_getReferenceCount", _wrap_Handlable_getReferenceCount}, +{"libferrisperlc::Handlable_getGenericCloseSig", _wrap_Handlable_getGenericCloseSig}, +{"libferrisperlc::new_FerrisSmallObjAllocator", _wrap_new_FerrisSmallObjAllocator}, +{"libferrisperlc::FerrisSmallObjAllocator_Allocate", _wrap_FerrisSmallObjAllocator_Allocate}, +{"libferrisperlc::delete_FerrisSmallObjAllocator", _wrap_delete_FerrisSmallObjAllocator}, +{"libferrisperlc::new_FerrisException_CodeState", _wrap_new_FerrisException_CodeState}, +{"libferrisperlc::FerrisException_CodeState_getFileName", _wrap_FerrisException_CodeState_getFileName}, +{"libferrisperlc::FerrisException_CodeState_getFunctionName", _wrap_FerrisException_CodeState_getFunctionName}, +{"libferrisperlc::FerrisException_CodeState_getLineNumber", _wrap_FerrisException_CodeState_getLineNumber}, +{"libferrisperlc::delete_FerrisException_CodeState", _wrap_delete_FerrisException_CodeState}, +{"libferrisperlc::new_FerrisExceptionBase", _wrap_new_FerrisExceptionBase}, +{"libferrisperlc::delete_FerrisExceptionBase", _wrap_delete_FerrisExceptionBase}, +{"libferrisperlc::FerrisExceptionBase_whats", _wrap_FerrisExceptionBase_whats}, +{"libferrisperlc::FerrisExceptionBase_what", _wrap_FerrisExceptionBase_what}, +{"libferrisperlc::new_FerrisStreamException", _wrap_new_FerrisStreamException}, +{"libferrisperlc::delete_FerrisStreamException", _wrap_delete_FerrisStreamException}, +{"libferrisperlc::StreamThrowFromErrno", _wrap_StreamThrowFromErrno}, +{"libferrisperlc::new_UnspoortedBlockSize", _wrap_new_UnspoortedBlockSize}, +{"libferrisperlc::delete_UnspoortedBlockSize", _wrap_delete_UnspoortedBlockSize}, +{"libferrisperlc::new_MalformedURL", _wrap_new_MalformedURL}, +{"libferrisperlc::delete_MalformedURL", _wrap_delete_MalformedURL}, +{"libferrisperlc::new_CreateFIFO", _wrap_new_CreateFIFO}, +{"libferrisperlc::delete_CreateFIFO", _wrap_delete_CreateFIFO}, +{"libferrisperlc::ferris_g_get_home_dir", _wrap_ferris_g_get_home_dir}, +{"libferrisperlc::errnum_to_string", _wrap_errnum_to_string}, +{"libferrisperlc::ferris_ios_maskOffFerrisOptions", _wrap_ferris_ios_maskOffFerrisOptions}, +{"libferrisperlc::new_ferris_ios", _wrap_new_ferris_ios}, +{"libferrisperlc::delete_ferris_ios", _wrap_delete_ferris_ios}, +{"libferrisperlc::CleanupURL", _wrap_CleanupURL}, +{"libferrisperlc::new_ferris_basic_streambuf_onemeg", _wrap_new_ferris_basic_streambuf_onemeg}, +{"libferrisperlc::delete_ferris_basic_streambuf_onemeg", _wrap_delete_ferris_basic_streambuf_onemeg}, +{"libferrisperlc::new_ferris_basic_streambuf_sixteenk", _wrap_new_ferris_basic_streambuf_sixteenk}, +{"libferrisperlc::delete_ferris_basic_streambuf_sixteenk", _wrap_delete_ferris_basic_streambuf_sixteenk}, +{"libferrisperlc::new_ferris_basic_streambuf_fourk", _wrap_new_ferris_basic_streambuf_fourk}, +{"libferrisperlc::delete_ferris_basic_streambuf_fourk", _wrap_delete_ferris_basic_streambuf_fourk}, +{"libferrisperlc::new_ferris_basic_streambuf_quartk", _wrap_new_ferris_basic_streambuf_quartk}, +{"libferrisperlc::delete_ferris_basic_streambuf_quartk", _wrap_delete_ferris_basic_streambuf_quartk}, +{"libferrisperlc::new_ferris_basic_streambuf_sixteenbytes", _wrap_new_ferris_basic_streambuf_sixteenbytes}, +{"libferrisperlc::delete_ferris_basic_streambuf_sixteenbytes", _wrap_delete_ferris_basic_streambuf_sixteenbytes}, +{"libferrisperlc::delete_ferris_basic_streambuf_virtual", _wrap_delete_ferris_basic_streambuf_virtual}, +{"libferrisperlc::connectStreamBufferClosedSignal", _wrap_connectStreamBufferClosedSignal}, +{"libferrisperlc::getClosedSignal", _wrap_getClosedSignal}, +{"libferrisperlc::modifyFileBufferForExtendedFlags", _wrap_modifyFileBufferForExtendedFlags}, +{"libferrisperlc::toint", _wrap_toint}, +{"libferrisperlc::todouble", _wrap_todouble}, +{"libferrisperlc::StreamToString", _wrap_StreamToString}, +{"libferrisperlc::getFirstLine", _wrap_getFirstLine}, +{"libferrisperlc::ends_with", _wrap_ends_with}, +{"libferrisperlc::starts_with", _wrap_starts_with}, +{"libferrisperlc::cmp_nocase", _wrap_cmp_nocase}, +{"libferrisperlc::MakeLimitingIStream", _wrap_MakeLimitingIStream}, +{"libferrisperlc::MakeProxyStream", _wrap_MakeProxyStream}, +{"libferrisperlc::MakeTeeStream", _wrap_MakeTeeStream}, +{"libferrisperlc::MakeTeeIOStream", _wrap_MakeTeeIOStream}, +{"libferrisperlc::fcin", _wrap_fcin}, +{"libferrisperlc::fcout", _wrap_fcout}, +{"libferrisperlc::fcerr", _wrap_fcerr}, +{"libferrisperlc::fcnull", _wrap_fcnull}, +{"libferrisperlc::MakeFdIStream", _wrap_MakeFdIStream}, +{"libferrisperlc::MakeFdOStream", _wrap_MakeFdOStream}, +{"libferrisperlc::MakeFdIOStream", _wrap_MakeFdIOStream}, +{"libferrisperlc::MakeHoleyOStream", _wrap_MakeHoleyOStream}, +{"libferrisperlc::MakeMemoryIStream", _wrap_MakeMemoryIStream}, +{"libferrisperlc::MakeMemoryIOStream", _wrap_MakeMemoryIOStream}, +{"libferrisperlc::MakeReadOnlyIOStream", _wrap_MakeReadOnlyIOStream}, +{"libferrisperlc::MakeMMapIStream", _wrap_MakeMMapIStream}, +{"libferrisperlc::MakeMMapIOStream", _wrap_MakeMMapIOStream}, +{"libferrisperlc::MakeFIFO", _wrap_MakeFIFO}, +{"libferrisperlc::Context___deref__", _wrap_Context___deref__}, +{"libferrisperlc::Context_getContextClassStatelessEANames", _wrap_Context_getContextClassStatelessEANames}, +{"libferrisperlc::Context_isDir", _wrap_Context_isDir}, +{"libferrisperlc::Context_getDirName", _wrap_Context_getDirName}, +{"libferrisperlc::Context_getParent", _wrap_Context_getParent}, +{"libferrisperlc::Context_isParentBound", _wrap_Context_isParentBound}, +{"libferrisperlc::Context_getRecommendedEA", _wrap_Context_getRecommendedEA}, +{"libferrisperlc::Context_getHasSubContextsGuess", _wrap_Context_getHasSubContextsGuess}, +{"libferrisperlc::Context_getHaveReadDir", _wrap_Context_getHaveReadDir}, +{"libferrisperlc::Context_toAttribute", _wrap_Context_toAttribute}, +{"libferrisperlc::Context_getSchema", _wrap_Context_getSchema}, +{"libferrisperlc::Context_getSchemaOrDefault", _wrap_Context_getSchemaOrDefault}, +{"libferrisperlc::Context_begin", _wrap_Context_begin}, +{"libferrisperlc::Context_end", _wrap_Context_end}, +{"libferrisperlc::Context_rbegin", _wrap_Context_rbegin}, +{"libferrisperlc::Context_rend", _wrap_Context_rend}, +{"libferrisperlc::Context_find", _wrap_Context_find}, +{"libferrisperlc::Context_monsterName", _wrap_Context_monsterName}, +{"libferrisperlc::Context_getIsNativeContext", _wrap_Context_getIsNativeContext}, +{"libferrisperlc::Context_setHasDynamicAttributes", _wrap_Context_setHasDynamicAttributes}, +{"libferrisperlc::Context_setAttribute", _wrap_Context_setAttribute}, +{"libferrisperlc::Context_getSubContextAttributesWithSameNameHaveSameSchema", _wrap_Context_getSubContextAttributesWithSameNameHaveSameSchema}, +{"libferrisperlc::Context_dumpOutItems", _wrap_Context_dumpOutItems}, +{"libferrisperlc::Context_getOverMountContext", _wrap_Context_getOverMountContext}, +{"libferrisperlc::Context_remove", _wrap_Context_remove}, +{"libferrisperlc::Context_rename", _wrap_Context_rename}, +{"libferrisperlc::Context_copyTo", _wrap_Context_copyTo}, +{"libferrisperlc::Context_createAttribute", _wrap_Context_createAttribute}, +{"libferrisperlc::Context_acquireAttribute", _wrap_Context_acquireAttribute}, +{"libferrisperlc::Context_getCreateSubContextSchema", _wrap_Context_getCreateSubContextSchema}, +{"libferrisperlc::Context_createSubContext", _wrap_Context_createSubContext}, +{"libferrisperlc::Context_getRelativeContext", _wrap_Context_getRelativeContext}, +{"libferrisperlc::Context_getSubContextNames", _wrap_Context_getSubContextNames}, +{"libferrisperlc::Context_getSubContext", _wrap_Context_getSubContext}, +{"libferrisperlc::Context_priv_isSubContextBound", _wrap_Context_priv_isSubContextBound}, +{"libferrisperlc::Context_isSubContextBound", _wrap_Context_isSubContextBound}, +{"libferrisperlc::Context_read", _wrap_Context_read}, +{"libferrisperlc::Context_guessSize", _wrap_Context_guessSize}, +{"libferrisperlc::Context_hasSubContexts", _wrap_Context_hasSubContexts}, +{"libferrisperlc::Context_SubContextCount", _wrap_Context_SubContextCount}, +{"libferrisperlc::Context_AddRef", _wrap_Context_AddRef}, +{"libferrisperlc::Context_Release", _wrap_Context_Release}, +{"libferrisperlc::Context_all_attributes_have_single_ref_count", _wrap_Context_all_attributes_have_single_ref_count}, +{"libferrisperlc::Context_isAttributeBound", _wrap_Context_isAttributeBound}, +{"libferrisperlc::Context_getAttribute", _wrap_Context_getAttribute}, +{"libferrisperlc::Context_getAttributeCount", _wrap_Context_getAttributeCount}, +{"libferrisperlc::Context_getAttributeRootEmblem", _wrap_Context_getAttributeRootEmblem}, +{"libferrisperlc::Context_Emit_Changed", _wrap_Context_Emit_Changed}, +{"libferrisperlc::Context_Emit_Deleted", _wrap_Context_Emit_Deleted}, +{"libferrisperlc::Context_Emit_Start_Execute", _wrap_Context_Emit_Start_Execute}, +{"libferrisperlc::Context_Emit_Stop_Execute", _wrap_Context_Emit_Stop_Execute}, +{"libferrisperlc::Context_Emit_Created", _wrap_Context_Emit_Created}, +{"libferrisperlc::Context_Emit_Moved", _wrap_Context_Emit_Moved}, +{"libferrisperlc::Context_Emit_Exists", _wrap_Context_Emit_Exists}, +{"libferrisperlc::Context_Emit_Start_Reading_Context", _wrap_Context_Emit_Start_Reading_Context}, +{"libferrisperlc::Context_Emit_Stop_Reading_Context", _wrap_Context_Emit_Stop_Reading_Context}, +{"libferrisperlc::Context_getURL", _wrap_Context_getURL}, +{"libferrisperlc::Context_SubCreate_file", _wrap_Context_SubCreate_file}, +{"libferrisperlc::Context_dumpRefDebugData", _wrap_Context_dumpRefDebugData}, +{"libferrisperlc::Context_splitPath", _wrap_Context_splitPath}, +{"libferrisperlc::Context_unSplitPath", _wrap_Context_unSplitPath}, +{"libferrisperlc::Context_getMimeType", _wrap_Context_getMimeType}, +{"libferrisperlc::Context_getFileType", _wrap_Context_getFileType}, +{"libferrisperlc::Context_getMedallion", _wrap_Context_getMedallion}, +{"libferrisperlc::Context_hasMedallion", _wrap_Context_hasMedallion}, +{"libferrisperlc::Context_getNamespacePrefixes", _wrap_Context_getNamespacePrefixes}, +{"libferrisperlc::Context_getBranchFileSystem", _wrap_Context_getBranchFileSystem}, +{"libferrisperlc::Context_getNameExtension", _wrap_Context_getNameExtension}, +{"libferrisperlc::Context_getImage", _wrap_Context_getImage}, +{"libferrisperlc::Context_getImageOrNULL", _wrap_Context_getImageOrNULL}, +{"libferrisperlc::Context_priv_getImage", _wrap_Context_priv_getImage}, +{"libferrisperlc::Context_taintImage", _wrap_Context_taintImage}, +{"libferrisperlc::Context_RegisterImageEAGeneratorModule", _wrap_Context_RegisterImageEAGeneratorModule}, +{"libferrisperlc::Context_UnrollRegisteredImageEAGeneratorModule", _wrap_Context_UnrollRegisteredImageEAGeneratorModule}, +{"libferrisperlc::Context_isCompressedContext", _wrap_Context_isCompressedContext}, +{"libferrisperlc::Context_addHandlableToBeReleasedWithContext", _wrap_Context_addHandlableToBeReleasedWithContext}, +{"libferrisperlc::Context_SubCreate_dir", _wrap_Context_SubCreate_dir}, +{"libferrisperlc::Context_dumpTree", _wrap_Context_dumpTree}, +{"libferrisperlc::Context_getLastPartOfName", _wrap_Context_getLastPartOfName}, +{"libferrisperlc::Context_appendToPath", _wrap_Context_appendToPath}, +{"libferrisperlc::Context_getIStream", _wrap_Context_getIStream}, +{"libferrisperlc::Context_getLocalIStream", _wrap_Context_getLocalIStream}, +{"libferrisperlc::Context_getIOStream", _wrap_Context_getIOStream}, +{"libferrisperlc::Context_checkOpenModeSupported", _wrap_Context_checkOpenModeSupported}, +{"libferrisperlc::Context_getSupportedOpenModes", _wrap_Context_getSupportedOpenModes}, +{"libferrisperlc::Context_getDirPath", _wrap_Context_getDirPath}, +{"libferrisperlc::Context_getSubContextCount", _wrap_Context_getSubContextCount}, +{"libferrisperlc::Context_empty", _wrap_Context_empty}, +{"libferrisperlc::Context_getNamingEvent_MedallionUpdated_Sig", _wrap_Context_getNamingEvent_MedallionUpdated_Sig}, +{"libferrisperlc::Context_getNamingEvent_Changed_Sig", _wrap_Context_getNamingEvent_Changed_Sig}, +{"libferrisperlc::Context_getNamingEvent_Deleted_Sig", _wrap_Context_getNamingEvent_Deleted_Sig}, +{"libferrisperlc::Context_getNamingEvent_Start_Execute_Sig", _wrap_Context_getNamingEvent_Start_Execute_Sig}, +{"libferrisperlc::Context_getNamingEvent_Stop_Execute_Sig", _wrap_Context_getNamingEvent_Stop_Execute_Sig}, +{"libferrisperlc::Context_getNamingEvent_Created_Sig", _wrap_Context_getNamingEvent_Created_Sig}, +{"libferrisperlc::Context_getNamingEvent_Moved_Sig", _wrap_Context_getNamingEvent_Moved_Sig}, +{"libferrisperlc::Context_getNamingEvent_Exists_Sig", _wrap_Context_getNamingEvent_Exists_Sig}, +{"libferrisperlc::Context_getNamingEvent_Start_Reading_Context_Sig", _wrap_Context_getNamingEvent_Start_Reading_Context_Sig}, +{"libferrisperlc::Context_getNamingEvent_Stop_Reading_Context_Sig", _wrap_Context_getNamingEvent_Stop_Reading_Context_Sig}, +{"libferrisperlc::Context_getContextEvent_Headers_Received_Sig", _wrap_Context_getContextEvent_Headers_Received_Sig}, +{"libferrisperlc::AttributeProxy___deref__", _wrap_AttributeProxy___deref__}, +{"libferrisperlc::AttributeProxy_AddRef", _wrap_AttributeProxy_AddRef}, +{"libferrisperlc::AttributeProxy_Release", _wrap_AttributeProxy_Release}, +{"libferrisperlc::AttributeProxy_getIStream", _wrap_AttributeProxy_getIStream}, +{"libferrisperlc::AttributeProxy_getLocalIStream", _wrap_AttributeProxy_getLocalIStream}, +{"libferrisperlc::AttributeProxy_getIOStream", _wrap_AttributeProxy_getIOStream}, +{"libferrisperlc::AttributeProxy_getDirName", _wrap_AttributeProxy_getDirName}, +{"libferrisperlc::AttributeProxy_getDirPath", _wrap_AttributeProxy_getDirPath}, +{"libferrisperlc::AttributeProxy_checkOpenModeSupported", _wrap_AttributeProxy_checkOpenModeSupported}, +{"libferrisperlc::AttributeProxy_getSupportedOpenModes", _wrap_AttributeProxy_getSupportedOpenModes}, +{"libferrisperlc::AttributeProxy_getLastPartOfName", _wrap_AttributeProxy_getLastPartOfName}, +{"libferrisperlc::AttributeProxy_appendToPath", _wrap_AttributeProxy_appendToPath}, +{"libferrisperlc::AttributeProxy_getParent", _wrap_AttributeProxy_getParent}, +{"libferrisperlc::AttributeProxy_isParentBound", _wrap_AttributeProxy_isParentBound}, +{"libferrisperlc::AttributeProxy_copyTo", _wrap_AttributeProxy_copyTo}, +{"libferrisperlc::AttributeProxy_private_AboutToBeDeleted", _wrap_AttributeProxy_private_AboutToBeDeleted}, +{"libferrisperlc::AttributeProxy_getReferenceCount", _wrap_AttributeProxy_getReferenceCount}, +{"libferrisperlc::AttributeProxy_getGenericCloseSig", _wrap_AttributeProxy_getGenericCloseSig}, +{"libferrisperlc::AttributeCollection___deref__", _wrap_AttributeCollection___deref__}, +{"libferrisperlc::AttributeCollection_getIsNativeContext", _wrap_AttributeCollection_getIsNativeContext}, +{"libferrisperlc::AttributeCollection_getAttribute", _wrap_AttributeCollection_getAttribute}, +{"libferrisperlc::AttributeCollection_getAttributeNames", _wrap_AttributeCollection_getAttributeNames}, +{"libferrisperlc::AttributeCollection_getAttributeCount", _wrap_AttributeCollection_getAttributeCount}, +{"libferrisperlc::AttributeCollection_isAttributeBound", _wrap_AttributeCollection_isAttributeBound}, +{"libferrisperlc::AttributeCollection_dumpAttributeNames", _wrap_AttributeCollection_dumpAttributeNames}, +{"libferrisperlc::AttributeCollection_addAttribute", _wrap_AttributeCollection_addAttribute}, +{"libferrisperlc::AttributeCollection_setAttribute", _wrap_AttributeCollection_setAttribute}, +{"libferrisperlc::AttributeCollection_expandEAName", _wrap_AttributeCollection_expandEAName}, +{"libferrisperlc::AttributeCollection_setNamespace", _wrap_AttributeCollection_setNamespace}, +{"libferrisperlc::AttributeCollection_resolveNamespace", _wrap_AttributeCollection_resolveNamespace}, +{"libferrisperlc::AttributeCollection_removeNamespace", _wrap_AttributeCollection_removeNamespace}, +{"libferrisperlc::AttributeCollection_getNamespacePrefixes", _wrap_AttributeCollection_getNamespacePrefixes}, +{"libferrisperlc::AttributeCollection_isStatelessAttributeBound", _wrap_AttributeCollection_isStatelessAttributeBound}, +{"libferrisperlc::AttributeCollection_unsetAttribute", _wrap_AttributeCollection_unsetAttribute}, +{"libferrisperlc::AttributeCollection_getMTime", _wrap_AttributeCollection_getMTime}, +{"libferrisperlc::AttributeCollection_getRDFCacheMTime", _wrap_AttributeCollection_getRDFCacheMTime}, +{"libferrisperlc::AttributeCollection_getVersion", _wrap_AttributeCollection_getVersion}, +{"libferrisperlc::AttributeCollection_private_AboutToBeDeleted", _wrap_AttributeCollection_private_AboutToBeDeleted}, +{"libferrisperlc::AttributeCollection_AddRef", _wrap_AttributeCollection_AddRef}, +{"libferrisperlc::AttributeCollection_Release", _wrap_AttributeCollection_Release}, +{"libferrisperlc::AttributeCollection_getReferenceCount", _wrap_AttributeCollection_getReferenceCount}, +{"libferrisperlc::AttributeCollection_getGenericCloseSig", _wrap_AttributeCollection_getGenericCloseSig}, +{"libferrisperlc::Runner___deref__", _wrap_Runner___deref__}, +{"libferrisperlc::Runner_operator_assignment", _wrap_Runner_operator_assignment}, +{"libferrisperlc::Runner_setCommandLine", _wrap_Runner_setCommandLine}, +{"libferrisperlc::Runner_pushCommandLineArg", _wrap_Runner_pushCommandLineArg}, +{"libferrisperlc::Runner_getArgv", _wrap_Runner_getArgv}, +{"libferrisperlc::Runner_getEnvp", _wrap_Runner_getEnvp}, +{"libferrisperlc::Runner_argvPushPath", _wrap_Runner_argvPushPath}, +{"libferrisperlc::Runner_setSpawnFlags", _wrap_Runner_setSpawnFlags}, +{"libferrisperlc::Runner_getSpawnFlags", _wrap_Runner_getSpawnFlags}, +{"libferrisperlc::Runner_setWorkingDir", _wrap_Runner_setWorkingDir}, +{"libferrisperlc::Runner_getStdIn", _wrap_Runner_getStdIn}, +{"libferrisperlc::Runner_getStdOut", _wrap_Runner_getStdOut}, +{"libferrisperlc::Runner_getStdErr", _wrap_Runner_getStdErr}, +{"libferrisperlc::Runner_getStdInFd", _wrap_Runner_getStdInFd}, +{"libferrisperlc::Runner_getStdOutFd", _wrap_Runner_getStdOutFd}, +{"libferrisperlc::Runner_getStdErrFd", _wrap_Runner_getStdErrFd}, +{"libferrisperlc::Runner_getChildProcessID", _wrap_Runner_getChildProcessID}, +{"libferrisperlc::Runner_signalChild", _wrap_Runner_signalChild}, +{"libferrisperlc::Runner_killChild", _wrap_Runner_killChild}, +{"libferrisperlc::Runner_getExitStatus", _wrap_Runner_getExitStatus}, +{"libferrisperlc::Runner_closeChildStdOut", _wrap_Runner_closeChildStdOut}, +{"libferrisperlc::Runner_closeChildStdErr", _wrap_Runner_closeChildStdErr}, +{"libferrisperlc::Runner_closeChildStdIn", _wrap_Runner_closeChildStdIn}, +{"libferrisperlc::Runner_setConnect_ChildStdOut_To_ParentStdOut", _wrap_Runner_setConnect_ChildStdOut_To_ParentStdOut}, +{"libferrisperlc::Runner_setConnect_ChildStdErr_To_ParentStdErr", _wrap_Runner_setConnect_ChildStdErr_To_ParentStdErr}, +{"libferrisperlc::Runner_setExitStatus", _wrap_Runner_setExitStatus}, +{"libferrisperlc::Runner_setConnectStdIn", _wrap_Runner_setConnectStdIn}, +{"libferrisperlc::Runner_setWaitTimeOut", _wrap_Runner_setWaitTimeOut}, +{"libferrisperlc::Runner_setInheritENV", _wrap_Runner_setInheritENV}, +{"libferrisperlc::Runner_getErrorString", _wrap_Runner_getErrorString}, +{"libferrisperlc::Runner___call__", _wrap_Runner___call__}, +{"libferrisperlc::Runner_Run", _wrap_Runner_Run}, +{"libferrisperlc::Runner_RunWithStdoutAsReadablePipe", _wrap_Runner_RunWithStdoutAsReadablePipe}, +{"libferrisperlc::Runner_getDescription", _wrap_Runner_getDescription}, +{"libferrisperlc::Runner_setChildSetupFunctor", _wrap_Runner_setChildSetupFunctor}, +{"libferrisperlc::Runner_executeAndReturnStdOut", _wrap_Runner_executeAndReturnStdOut}, +{"libferrisperlc::Runner_private_AboutToBeDeleted", _wrap_Runner_private_AboutToBeDeleted}, +{"libferrisperlc::Runner_AddRef", _wrap_Runner_AddRef}, +{"libferrisperlc::Runner_Release", _wrap_Runner_Release}, +{"libferrisperlc::Runner_getReferenceCount", _wrap_Runner_getReferenceCount}, +{"libferrisperlc::Runner_getGenericCloseSig", _wrap_Runner_getGenericCloseSig}, +{"libferrisperlc::PreprocessedSortString___deref__", _wrap_PreprocessedSortString___deref__}, +{"libferrisperlc::Emblem___deref__", _wrap_Emblem___deref__}, +{"libferrisperlc::Emblem_getID", _wrap_Emblem_getID}, +{"libferrisperlc::Emblem_getParents", _wrap_Emblem_getParents}, +{"libferrisperlc::Emblem_getChildren", _wrap_Emblem_getChildren}, +{"libferrisperlc::Emblem_hasChildren", _wrap_Emblem_hasChildren}, +{"libferrisperlc::Emblem_forceUpdateParentsAndChildrenIDs", _wrap_Emblem_forceUpdateParentsAndChildrenIDs}, +{"libferrisperlc::Emblem_getUpset", _wrap_Emblem_getUpset}, +{"libferrisperlc::Emblem_getDownset", _wrap_Emblem_getDownset}, +{"libferrisperlc::Emblem_getPossibleParents", _wrap_Emblem_getPossibleParents}, +{"libferrisperlc::Emblem_getPossibleChildren", _wrap_Emblem_getPossibleChildren}, +{"libferrisperlc::Emblem_hasParent", _wrap_Emblem_hasParent}, +{"libferrisperlc::Emblem_hasChild", _wrap_Emblem_hasChild}, +{"libferrisperlc::Emblem_obtainChild", _wrap_Emblem_obtainChild}, +{"libferrisperlc::Emblem_obtainChild_EAOrdering", _wrap_Emblem_obtainChild_EAOrdering}, +{"libferrisperlc::Emblem_findChild", _wrap_Emblem_findChild}, +{"libferrisperlc::Emblem_getName", _wrap_Emblem_getName}, +{"libferrisperlc::Emblem_getUniqueName", _wrap_Emblem_getUniqueName}, +{"libferrisperlc::Emblem_getIconName", _wrap_Emblem_getIconName}, +{"libferrisperlc::Emblem_getMenuSizedIconName", _wrap_Emblem_getMenuSizedIconName}, +{"libferrisperlc::Emblem_getDescription", _wrap_Emblem_getDescription}, +{"libferrisperlc::Emblem_setName", _wrap_Emblem_setName}, +{"libferrisperlc::Emblem_setIconName", _wrap_Emblem_setIconName}, +{"libferrisperlc::Emblem_setMenuSizedIconName", _wrap_Emblem_setMenuSizedIconName}, +{"libferrisperlc::Emblem_setDescription", _wrap_Emblem_setDescription}, +{"libferrisperlc::Emblem_getDigitalLatitude", _wrap_Emblem_getDigitalLatitude}, +{"libferrisperlc::Emblem_getDigitalLongitude", _wrap_Emblem_getDigitalLongitude}, +{"libferrisperlc::Emblem_getZoomRange", _wrap_Emblem_getZoomRange}, +{"libferrisperlc::Emblem_setDigitalLatitude", _wrap_Emblem_setDigitalLatitude}, +{"libferrisperlc::Emblem_setDigitalLongitude", _wrap_Emblem_setDigitalLongitude}, +{"libferrisperlc::Emblem_setZoomRange", _wrap_Emblem_setZoomRange}, +{"libferrisperlc::Emblem_getLimitedViewPriority", _wrap_Emblem_getLimitedViewPriority}, +{"libferrisperlc::Emblem_setLimitedViewPriority", _wrap_Emblem_setLimitedViewPriority}, +{"libferrisperlc::Emblem_getIconName_Changed_Sig", _wrap_Emblem_getIconName_Changed_Sig}, +{"libferrisperlc::Emblem_getMenuSizedIconName_Changed_Sig", _wrap_Emblem_getMenuSizedIconName_Changed_Sig}, +{"libferrisperlc::Emblem_getAddedParent_Sig", _wrap_Emblem_getAddedParent_Sig}, +{"libferrisperlc::Emblem_getAddedChild_Sig", _wrap_Emblem_getAddedChild_Sig}, +{"libferrisperlc::Emblem_getRemovedParent_Sig", _wrap_Emblem_getRemovedParent_Sig}, +{"libferrisperlc::Emblem_getRemovedChild_Sig", _wrap_Emblem_getRemovedChild_Sig}, +{"libferrisperlc::Emblem_dumpTo", _wrap_Emblem_dumpTo}, +{"libferrisperlc::Emblem_isTransitiveChildOfEAOrderingRootEmblem", _wrap_Emblem_isTransitiveChildOfEAOrderingRootEmblem}, +{"libferrisperlc::Emblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem", _wrap_Emblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem}, +{"libferrisperlc::Emblem_private_AboutToBeDeleted", _wrap_Emblem_private_AboutToBeDeleted}, +{"libferrisperlc::Emblem_AddRef", _wrap_Emblem_AddRef}, +{"libferrisperlc::Emblem_Release", _wrap_Emblem_Release}, +{"libferrisperlc::Emblem_getReferenceCount", _wrap_Emblem_getReferenceCount}, +{"libferrisperlc::Emblem_getGenericCloseSig", _wrap_Emblem_getGenericCloseSig}, +{"libferrisperlc::ColdEmblem___deref__", _wrap_ColdEmblem___deref__}, +{"libferrisperlc::ColdEmblem_getID", _wrap_ColdEmblem_getID}, +{"libferrisperlc::ColdEmblem_getParents", _wrap_ColdEmblem_getParents}, +{"libferrisperlc::ColdEmblem_getChildren", _wrap_ColdEmblem_getChildren}, +{"libferrisperlc::ColdEmblem_hasChildren", _wrap_ColdEmblem_hasChildren}, +{"libferrisperlc::ColdEmblem_forceUpdateParentsAndChildrenIDs", _wrap_ColdEmblem_forceUpdateParentsAndChildrenIDs}, +{"libferrisperlc::ColdEmblem_getUpset", _wrap_ColdEmblem_getUpset}, +{"libferrisperlc::ColdEmblem_getDownset", _wrap_ColdEmblem_getDownset}, +{"libferrisperlc::ColdEmblem_getPossibleParents", _wrap_ColdEmblem_getPossibleParents}, +{"libferrisperlc::ColdEmblem_getPossibleChildren", _wrap_ColdEmblem_getPossibleChildren}, +{"libferrisperlc::ColdEmblem_hasParent", _wrap_ColdEmblem_hasParent}, +{"libferrisperlc::ColdEmblem_hasChild", _wrap_ColdEmblem_hasChild}, +{"libferrisperlc::ColdEmblem_obtainChild", _wrap_ColdEmblem_obtainChild}, +{"libferrisperlc::ColdEmblem_obtainChild_EAOrdering", _wrap_ColdEmblem_obtainChild_EAOrdering}, +{"libferrisperlc::ColdEmblem_findChild", _wrap_ColdEmblem_findChild}, +{"libferrisperlc::ColdEmblem_getName", _wrap_ColdEmblem_getName}, +{"libferrisperlc::ColdEmblem_getUniqueName", _wrap_ColdEmblem_getUniqueName}, +{"libferrisperlc::ColdEmblem_getIconName", _wrap_ColdEmblem_getIconName}, +{"libferrisperlc::ColdEmblem_getMenuSizedIconName", _wrap_ColdEmblem_getMenuSizedIconName}, +{"libferrisperlc::ColdEmblem_getDescription", _wrap_ColdEmblem_getDescription}, +{"libferrisperlc::ColdEmblem_setName", _wrap_ColdEmblem_setName}, +{"libferrisperlc::ColdEmblem_setIconName", _wrap_ColdEmblem_setIconName}, +{"libferrisperlc::ColdEmblem_setMenuSizedIconName", _wrap_ColdEmblem_setMenuSizedIconName}, +{"libferrisperlc::ColdEmblem_setDescription", _wrap_ColdEmblem_setDescription}, +{"libferrisperlc::ColdEmblem_getDigitalLatitude", _wrap_ColdEmblem_getDigitalLatitude}, +{"libferrisperlc::ColdEmblem_getDigitalLongitude", _wrap_ColdEmblem_getDigitalLongitude}, +{"libferrisperlc::ColdEmblem_getZoomRange", _wrap_ColdEmblem_getZoomRange}, +{"libferrisperlc::ColdEmblem_setDigitalLatitude", _wrap_ColdEmblem_setDigitalLatitude}, +{"libferrisperlc::ColdEmblem_setDigitalLongitude", _wrap_ColdEmblem_setDigitalLongitude}, +{"libferrisperlc::ColdEmblem_setZoomRange", _wrap_ColdEmblem_setZoomRange}, +{"libferrisperlc::ColdEmblem_getLimitedViewPriority", _wrap_ColdEmblem_getLimitedViewPriority}, +{"libferrisperlc::ColdEmblem_setLimitedViewPriority", _wrap_ColdEmblem_setLimitedViewPriority}, +{"libferrisperlc::ColdEmblem_getIconName_Changed_Sig", _wrap_ColdEmblem_getIconName_Changed_Sig}, +{"libferrisperlc::ColdEmblem_getMenuSizedIconName_Changed_Sig", _wrap_ColdEmblem_getMenuSizedIconName_Changed_Sig}, +{"libferrisperlc::ColdEmblem_getAddedParent_Sig", _wrap_ColdEmblem_getAddedParent_Sig}, +{"libferrisperlc::ColdEmblem_getAddedChild_Sig", _wrap_ColdEmblem_getAddedChild_Sig}, +{"libferrisperlc::ColdEmblem_getRemovedParent_Sig", _wrap_ColdEmblem_getRemovedParent_Sig}, +{"libferrisperlc::ColdEmblem_getRemovedChild_Sig", _wrap_ColdEmblem_getRemovedChild_Sig}, +{"libferrisperlc::ColdEmblem_dumpTo", _wrap_ColdEmblem_dumpTo}, +{"libferrisperlc::ColdEmblem_isTransitiveChildOfEAOrderingRootEmblem", _wrap_ColdEmblem_isTransitiveChildOfEAOrderingRootEmblem}, +{"libferrisperlc::ColdEmblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem", _wrap_ColdEmblem_forceUpdateTransitiveChildOfEAOrderingRootEmblem}, +{"libferrisperlc::ColdEmblem_private_AboutToBeDeleted", _wrap_ColdEmblem_private_AboutToBeDeleted}, +{"libferrisperlc::ColdEmblem_AddRef", _wrap_ColdEmblem_AddRef}, +{"libferrisperlc::ColdEmblem_Release", _wrap_ColdEmblem_Release}, +{"libferrisperlc::ColdEmblem_getReferenceCount", _wrap_ColdEmblem_getReferenceCount}, +{"libferrisperlc::ColdEmblem_getGenericCloseSig", _wrap_ColdEmblem_getGenericCloseSig}, +{"libferrisperlc::Etagere___deref__", _wrap_Etagere___deref__}, +{"libferrisperlc::Etagere_sync", _wrap_Etagere_sync}, +{"libferrisperlc::Etagere_getAllEmblemsWithName", _wrap_Etagere_getAllEmblemsWithName}, +{"libferrisperlc::Etagere_obtainEmblemByName", _wrap_Etagere_obtainEmblemByName}, +{"libferrisperlc::Etagere_getEmblemByName", _wrap_Etagere_getEmblemByName}, +{"libferrisperlc::Etagere_getEmblemByUniqueName", _wrap_Etagere_getEmblemByUniqueName}, +{"libferrisperlc::Etagere_getEmblemByID", _wrap_Etagere_getEmblemByID}, +{"libferrisperlc::Etagere_getAllEmblems", _wrap_Etagere_getAllEmblems}, +{"libferrisperlc::Etagere_getAllEmblemsUniqueName", _wrap_Etagere_getAllEmblemsUniqueName}, +{"libferrisperlc::Etagere_visitAllEmblems", _wrap_Etagere_visitAllEmblems}, +{"libferrisperlc::Etagere_getOntologyID", _wrap_Etagere_getOntologyID}, +{"libferrisperlc::Etagere_getLowestEmblemPriorityToShow", _wrap_Etagere_getLowestEmblemPriorityToShow}, +{"libferrisperlc::Etagere_setLowestEmblemPriorityToShow", _wrap_Etagere_setLowestEmblemPriorityToShow}, +{"libferrisperlc::Etagere_erase", _wrap_Etagere_erase}, +{"libferrisperlc::Etagere_dumpTo", _wrap_Etagere_dumpTo}, +{"libferrisperlc::Etagere_createColdEmblem", _wrap_Etagere_createColdEmblem}, +{"libferrisperlc::Etagere_createColdEmblem_EAOrdering", _wrap_Etagere_createColdEmblem_EAOrdering}, +{"libferrisperlc::Etagere_getBasePath", _wrap_Etagere_getBasePath}, +{"libferrisperlc::Etagere_getDBPath", _wrap_Etagere_getDBPath}, +{"libferrisperlc::Etagere_getBoostSerializePath", _wrap_Etagere_getBoostSerializePath}, +{"libferrisperlc::Etagere_getBoostSerializePathTxt", _wrap_Etagere_getBoostSerializePathTxt}, +{"libferrisperlc::Etagere_getEmblemCreated_Sig", _wrap_Etagere_getEmblemCreated_Sig}, +{"libferrisperlc::Etagere_getAddedChild_Sig", _wrap_Etagere_getAddedChild_Sig}, +{"libferrisperlc::Etagere_getRemovedChild_Sig", _wrap_Etagere_getRemovedChild_Sig}, +{"libferrisperlc::Etagere_OnOutOfProcNewEmblemNotification", _wrap_Etagere_OnOutOfProcNewEmblemNotification}, +{"libferrisperlc::Etagere_private_AboutToBeDeleted", _wrap_Etagere_private_AboutToBeDeleted}, +{"libferrisperlc::Etagere_AddRef", _wrap_Etagere_AddRef}, +{"libferrisperlc::Etagere_Release", _wrap_Etagere_Release}, +{"libferrisperlc::Etagere_getReferenceCount", _wrap_Etagere_getReferenceCount}, +{"libferrisperlc::Etagere_getGenericCloseSig", _wrap_Etagere_getGenericCloseSig}, +{"libferrisperlc::Medallion___deref__", _wrap_Medallion___deref__}, +{"libferrisperlc::Medallion_addEmblem", _wrap_Medallion_addEmblem}, +{"libferrisperlc::Medallion_retractEmblem", _wrap_Medallion_retractEmblem}, +{"libferrisperlc::Medallion_removeEmblem", _wrap_Medallion_removeEmblem}, +{"libferrisperlc::Medallion_hasEmblem", _wrap_Medallion_hasEmblem}, +{"libferrisperlc::Medallion_hasRetractedEmblem", _wrap_Medallion_hasRetractedEmblem}, +{"libferrisperlc::Medallion_ensureEmblem", _wrap_Medallion_ensureEmblem}, +{"libferrisperlc::Medallion_getFuzzyBelief", _wrap_Medallion_getFuzzyBelief}, +{"libferrisperlc::Medallion_getListOfPersonalitiesWhoHaveOpinion", _wrap_Medallion_getListOfPersonalitiesWhoHaveOpinion}, +{"libferrisperlc::Medallion_getBelief", _wrap_Medallion_getBelief}, +{"libferrisperlc::Medallion_hasBelief", _wrap_Medallion_hasBelief}, +{"libferrisperlc::Medallion_sync", _wrap_Medallion_sync}, +{"libferrisperlc::Medallion_getMostSpecificEmblems", _wrap_Medallion_getMostSpecificEmblems}, +{"libferrisperlc::Medallion_getAllEmblems", _wrap_Medallion_getAllEmblems}, +{"libferrisperlc::Medallion_reload", _wrap_Medallion_reload}, +{"libferrisperlc::Medallion_getOnlyInCacheSignal", _wrap_Medallion_getOnlyInCacheSignal}, +{"libferrisperlc::Medallion_AddRef", _wrap_Medallion_AddRef}, +{"libferrisperlc::Medallion_Release", _wrap_Medallion_Release}, +{"libferrisperlc::Medallion_private_AboutToBeDeleted", _wrap_Medallion_private_AboutToBeDeleted}, +{"libferrisperlc::Medallion_getReferenceCount", _wrap_Medallion_getReferenceCount}, +{"libferrisperlc::Medallion_getGenericCloseSig", _wrap_Medallion_getGenericCloseSig}, +{"libferrisperlc::MedallionBelief___deref__", _wrap_MedallionBelief___deref__}, +{"libferrisperlc::MedallionBelief_getMedallion", _wrap_MedallionBelief_getMedallion}, +{"libferrisperlc::MedallionBelief_getEmblem", _wrap_MedallionBelief_getEmblem}, +{"libferrisperlc::MedallionBelief_getPersonality", _wrap_MedallionBelief_getPersonality}, +{"libferrisperlc::MedallionBelief_getTimes", _wrap_MedallionBelief_getTimes}, +{"libferrisperlc::MedallionBelief_getSureness", _wrap_MedallionBelief_getSureness}, +{"libferrisperlc::MedallionBelief_clampJudgementSureness", _wrap_MedallionBelief_clampJudgementSureness}, +{"libferrisperlc::MedallionBelief_private_AboutToBeDeleted", _wrap_MedallionBelief_private_AboutToBeDeleted}, +{"libferrisperlc::MedallionBelief_AddRef", _wrap_MedallionBelief_AddRef}, +{"libferrisperlc::MedallionBelief_Release", _wrap_MedallionBelief_Release}, +{"libferrisperlc::MedallionBelief_getReferenceCount", _wrap_MedallionBelief_getReferenceCount}, +{"libferrisperlc::MedallionBelief_getGenericCloseSig", _wrap_MedallionBelief_getGenericCloseSig}, +{"libferrisperlc::ConceptLattice___deref__", _wrap_ConceptLattice___deref__}, +{"libferrisperlc::new_RegexCollection", _wrap_new_RegexCollection}, +{"libferrisperlc::delete_RegexCollection", _wrap_delete_RegexCollection}, +{"libferrisperlc::RegexCollection_append", _wrap_RegexCollection_append}, +{"libferrisperlc::new_FerrisVFSExceptionBase", _wrap_new_FerrisVFSExceptionBase}, +{"libferrisperlc::delete_FerrisVFSExceptionBase", _wrap_delete_FerrisVFSExceptionBase}, +{"libferrisperlc::FerrisVFSExceptionBase_whats", _wrap_FerrisVFSExceptionBase_whats}, +{"libferrisperlc::new_FerrisGLibCException", _wrap_new_FerrisGLibCException}, +{"libferrisperlc::new_FerrisStatException", _wrap_new_FerrisStatException}, +{"libferrisperlc::new_FerrisSetCWDException", _wrap_new_FerrisSetCWDException}, +{"libferrisperlc::new_CanNotGetStream", _wrap_new_CanNotGetStream}, +{"libferrisperlc::new_NotSupported", _wrap_new_NotSupported}, +{"libferrisperlc::new_FerrisNotSupportedInThisContext", _wrap_new_FerrisNotSupportedInThisContext}, +{"libferrisperlc::new_RootContextCreationFailed", _wrap_new_RootContextCreationFailed}, +{"libferrisperlc::new_CanNotDelete", _wrap_new_CanNotDelete}, +{"libferrisperlc::new_NoSuchObject", _wrap_new_NoSuchObject}, +{"libferrisperlc::new_NoSuchUser", _wrap_new_NoSuchUser}, +{"libferrisperlc::new_NoSuchGroup", _wrap_new_NoSuchGroup}, +{"libferrisperlc::new_ObjectExists", _wrap_new_ObjectExists}, +{"libferrisperlc::new_ContextExists", _wrap_new_ContextExists}, +{"libferrisperlc::new_CopyFailed", _wrap_new_CopyFailed}, +{"libferrisperlc::new_RemoveFailed", _wrap_new_RemoveFailed}, +{"libferrisperlc::new_AttributeNotWritable", _wrap_new_AttributeNotWritable}, +{"libferrisperlc::new_SubContextAlreadyInUse", _wrap_new_SubContextAlreadyInUse}, +{"libferrisperlc::new_AttributeAlreadyInUse", _wrap_new_AttributeAlreadyInUse}, +{"libferrisperlc::new_FerrisCreateSubContextFailed", _wrap_new_FerrisCreateSubContextFailed}, +{"libferrisperlc::new_FerrisCreateSubContextNotSupported", _wrap_new_FerrisCreateSubContextNotSupported}, +{"libferrisperlc::new_FerrisCreateAttributeFailed", _wrap_new_FerrisCreateAttributeFailed}, +{"libferrisperlc::new_FerrisCreateAttributeNotSupported", _wrap_new_FerrisCreateAttributeNotSupported}, +{"libferrisperlc::new_NoSuchSubContext", _wrap_new_NoSuchSubContext}, +{"libferrisperlc::new_NoSuchAttribute", _wrap_new_NoSuchAttribute}, +{"libferrisperlc::new_NoSuchContextClass", _wrap_new_NoSuchContextClass}, +{"libferrisperlc::new_CanNotReadContext", _wrap_new_CanNotReadContext}, +{"libferrisperlc::new_CanNotReadContextPcctsParseFailed", _wrap_new_CanNotReadContextPcctsParseFailed}, +{"libferrisperlc::delete_CanNotReadContextPcctsParseFailed", _wrap_delete_CanNotReadContextPcctsParseFailed}, +{"libferrisperlc::CanNotReadContextPcctsParseFailed_getSyntaxErrorList", _wrap_CanNotReadContextPcctsParseFailed_getSyntaxErrorList}, +{"libferrisperlc::new_CanNotDereferenceDanglingSoftLink", _wrap_new_CanNotDereferenceDanglingSoftLink}, +{"libferrisperlc::new_CanNotMonitorDirWithFAM", _wrap_new_CanNotMonitorDirWithFAM}, +{"libferrisperlc::new_FerrisNotReadableAsContext", _wrap_new_FerrisNotReadableAsContext}, +{"libferrisperlc::new_FerrisImageSaveFailed", _wrap_new_FerrisImageSaveFailed}, +{"libferrisperlc::new_FerrisImageLoadFailed", _wrap_new_FerrisImageLoadFailed}, +{"libferrisperlc::new_FerrisPNGImageLoadFailed", _wrap_new_FerrisPNGImageLoadFailed}, +{"libferrisperlc::new_FerrisJPEGImageLoadFailed", _wrap_new_FerrisJPEGImageLoadFailed}, +{"libferrisperlc::new_FerrisGIMPImageLoadFailed", _wrap_new_FerrisGIMPImageLoadFailed}, +{"libferrisperlc::new_FerrisImlib2ImageLoadFailed", _wrap_new_FerrisImlib2ImageLoadFailed}, +{"libferrisperlc::new_FerrisWaitTimedOut", _wrap_new_FerrisWaitTimedOut}, +{"libferrisperlc::new_FerrisSqlServerNameNotFound", _wrap_new_FerrisSqlServerNameNotFound}, +{"libferrisperlc::new_GModuleOpenFailed", _wrap_new_GModuleOpenFailed}, +{"libferrisperlc::new_FerrisStreamLoadFailed", _wrap_new_FerrisStreamLoadFailed}, +{"libferrisperlc::new_FerrisCanNotCreateLeafOfLeaf", _wrap_new_FerrisCanNotCreateLeafOfLeaf}, +{"libferrisperlc::new_FerrisOutOfMemory", _wrap_new_FerrisOutOfMemory}, +{"libferrisperlc::new_CanNotAddExternalAttribute", _wrap_new_CanNotAddExternalAttribute}, +{"libferrisperlc::new_CurlStaticInitFailed", _wrap_new_CurlStaticInitFailed}, +{"libferrisperlc::new_CurlEasyInitFailed", _wrap_new_CurlEasyInitFailed}, +{"libferrisperlc::CurlPerformFailed_getResultCode", _wrap_CurlPerformFailed_getResultCode}, +{"libferrisperlc::new_CurlPerformFailed", _wrap_new_CurlPerformFailed}, +{"libferrisperlc::new_CurlStateError", _wrap_new_CurlStateError}, +{"libferrisperlc::new_FerrisCurlServerNameNotFound", _wrap_new_FerrisCurlServerNameNotFound}, +{"libferrisperlc::new_getIOStreamCloseUpdateFailed", _wrap_new_getIOStreamCloseUpdateFailed}, +{"libferrisperlc::new_getIOStreamCloseUpdatePermissionDenied", _wrap_new_getIOStreamCloseUpdatePermissionDenied}, +{"libferrisperlc::new_DTDCreationFailed", _wrap_new_DTDCreationFailed}, +{"libferrisperlc::new_UnknownConfigLocation", _wrap_new_UnknownConfigLocation}, +{"libferrisperlc::new_RenameFailed", _wrap_new_RenameFailed}, +{"libferrisperlc::new_AccessDenied", _wrap_new_AccessDenied}, +{"libferrisperlc::new_GenericError", _wrap_new_GenericError}, +{"libferrisperlc::new_BadlyFormedTime", _wrap_new_BadlyFormedTime}, +{"libferrisperlc::new_BadlyFormedTimeString", _wrap_new_BadlyFormedTimeString}, +{"libferrisperlc::new_SocketOptionsException", _wrap_new_SocketOptionsException}, +{"libferrisperlc::new_BackupException", _wrap_new_BackupException}, +{"libferrisperlc::new_UnknownBackupMode", _wrap_new_UnknownBackupMode}, +{"libferrisperlc::new_BackupNameWouldBeTooLong", _wrap_new_BackupNameWouldBeTooLong}, +{"libferrisperlc::new_DVDReadException", _wrap_new_DVDReadException}, +{"libferrisperlc::new_StorageFull", _wrap_new_StorageFull}, +{"libferrisperlc::new_QuotaStorageFull", _wrap_new_QuotaStorageFull}, +{"libferrisperlc::new_FileClipboard", _wrap_new_FileClipboard}, +{"libferrisperlc::new_CursorException", _wrap_new_CursorException}, +{"libferrisperlc::new_ParseError", _wrap_new_ParseError}, +{"libferrisperlc::new_ProgramSpawn", _wrap_new_ProgramSpawn}, +{"libferrisperlc::new_Db4Exception", _wrap_new_Db4Exception}, +{"libferrisperlc::Db4Exception_get_errno", _wrap_Db4Exception_get_errno}, +{"libferrisperlc::new_eetException", _wrap_new_eetException}, +{"libferrisperlc::new_GdbmException", _wrap_new_GdbmException}, +{"libferrisperlc::new_tdbException", _wrap_new_tdbException}, +{"libferrisperlc::new_Db4KeyNotFound", _wrap_new_Db4KeyNotFound}, +{"libferrisperlc::new_eetKeyNotFound", _wrap_new_eetKeyNotFound}, +{"libferrisperlc::new_InvalidSortSpecification", _wrap_new_InvalidSortSpecification}, +{"libferrisperlc::new_ContentNotModified", _wrap_new_ContentNotModified}, +{"libferrisperlc::new_ChildNotRunning", _wrap_new_ChildNotRunning}, +{"libferrisperlc::new_InvalidModeString", _wrap_new_InvalidModeString}, +{"libferrisperlc::new_LDAPException", _wrap_new_LDAPException}, +{"libferrisperlc::new_CompressionException", _wrap_new_CompressionException}, +{"libferrisperlc::new_CompressionAlgoNotFoundException", _wrap_new_CompressionAlgoNotFoundException}, +{"libferrisperlc::new_IndexException", _wrap_new_IndexException}, +{"libferrisperlc::new_FullTextIndexException", _wrap_new_FullTextIndexException}, +{"libferrisperlc::new_EAIndexException", _wrap_new_EAIndexException}, +{"libferrisperlc::new_BadParam", _wrap_new_BadParam}, +{"libferrisperlc::new_SchemaException", _wrap_new_SchemaException}, +{"libferrisperlc::new_SchemaNotFoundException", _wrap_new_SchemaNotFoundException}, +{"libferrisperlc::new_MedallionException", _wrap_new_MedallionException}, +{"libferrisperlc::new_EtagereException", _wrap_new_EtagereException}, +{"libferrisperlc::new_EmblemException", _wrap_new_EmblemException}, +{"libferrisperlc::new_EmblemNotFoundException", _wrap_new_EmblemNotFoundException}, +{"libferrisperlc::new_CanNotAddEmblemException", _wrap_new_CanNotAddEmblemException}, +{"libferrisperlc::new_NoSuchPersonalityException", _wrap_new_NoSuchPersonalityException}, +{"libferrisperlc::new_NoSuchBeliefException", _wrap_new_NoSuchBeliefException}, +{"libferrisperlc::new_AgentException", _wrap_new_AgentException}, +{"libferrisperlc::new_AgentAlreadyExistsException", _wrap_new_AgentAlreadyExistsException}, +{"libferrisperlc::new_NoSuchAgentException", _wrap_new_NoSuchAgentException}, +{"libferrisperlc::new_AgentOnlyHandlesOneEmblemException", _wrap_new_AgentOnlyHandlesOneEmblemException}, +{"libferrisperlc::new_XMLBase", _wrap_new_XMLBase}, +{"libferrisperlc::new_XMLParseError", _wrap_new_XMLParseError}, +{"libferrisperlc::new_XMLFatalError", _wrap_new_XMLFatalError}, +{"libferrisperlc::new_dbXMLException", _wrap_new_dbXMLException}, +{"libferrisperlc::new_BranchFileSystem", _wrap_new_BranchFileSystem}, +{"libferrisperlc::new_RelativeTimeParsing", _wrap_new_RelativeTimeParsing}, +{"libferrisperlc::new_CryptoBase", _wrap_new_CryptoBase}, +{"libferrisperlc::new_GPGMEInitFailed", _wrap_new_GPGMEInitFailed}, +{"libferrisperlc::new_BadSignature", _wrap_new_BadSignature}, +{"libferrisperlc::new_KeylistException", _wrap_new_KeylistException}, +{"libferrisperlc::new_XMPBase", _wrap_new_XMPBase}, +{"libferrisperlc::new_XMPPacketScanFailed", _wrap_new_XMPPacketScanFailed}, +{"libferrisperlc::new_GPhoto2", _wrap_new_GPhoto2}, +{"libferrisperlc::new_NoOpenWithContext", _wrap_new_NoOpenWithContext}, +{"libferrisperlc::new_OpenActionIsNotDefined", _wrap_new_OpenActionIsNotDefined}, +{"libferrisperlc::new_DBusException", _wrap_new_DBusException}, +{"libferrisperlc::new_DBusConnectionException", _wrap_new_DBusConnectionException}, +{"libferrisperlc::new_WebPhotoException", _wrap_new_WebPhotoException}, +{"libferrisperlc::new_SQLiteException", _wrap_new_SQLiteException}, +{"libferrisperlc::new_FerrisHALException", _wrap_new_FerrisHALException}, +{"libferrisperlc::new_SyntaxError", _wrap_new_SyntaxError}, +{"libferrisperlc::new_FFilterSyntaxError", _wrap_new_FFilterSyntaxError}, +{"libferrisperlc::delete_FFilterSyntaxError", _wrap_delete_FFilterSyntaxError}, +{"libferrisperlc::FFilterSyntaxError_whats", _wrap_FFilterSyntaxError_whats}, +{"libferrisperlc::new_FulltextQuerySyntaxError", _wrap_new_FulltextQuerySyntaxError}, +{"libferrisperlc::new_URLDecodeSyntaxError", _wrap_new_URLDecodeSyntaxError}, +{"libferrisperlc::new_FerrisInternalError", _wrap_new_FerrisInternalError}, +{"libferrisperlc::new_FerrisParentNotSetError", _wrap_new_FerrisParentNotSetError}, +{"libferrisperlc::new_FerrisCanNotGetScriptNameError", _wrap_new_FerrisCanNotGetScriptNameError}, +{"libferrisperlc::ThrowFromErrno", _wrap_ThrowFromErrno}, +{"libferrisperlc::CacheHandlable_getOnlyInCacheSignal", _wrap_CacheHandlable_getOnlyInCacheSignal}, +{"libferrisperlc::new_CacheHandlable", _wrap_new_CacheHandlable}, +{"libferrisperlc::CacheHandlable_AddRef", _wrap_CacheHandlable_AddRef}, +{"libferrisperlc::CacheHandlable_Release", _wrap_CacheHandlable_Release}, +{"libferrisperlc::CacheHandlable_sync", _wrap_CacheHandlable_sync}, +{"libferrisperlc::new_Versioned", _wrap_new_Versioned}, +{"libferrisperlc::Versioned_getVersion", _wrap_Versioned_getVersion}, +{"libferrisperlc::AdjustForOpenMode_Opening", _wrap_AdjustForOpenMode_Opening}, +{"libferrisperlc::AdjustForOpenMode_Closing", _wrap_AdjustForOpenMode_Closing}, +{"libferrisperlc::Attribute_getLastPartOfName", _wrap_Attribute_getLastPartOfName}, +{"libferrisperlc::Attribute_appendToPath", _wrap_Attribute_appendToPath}, +{"libferrisperlc::new_Attribute", _wrap_new_Attribute}, +{"libferrisperlc::delete_Attribute", _wrap_delete_Attribute}, +{"libferrisperlc::Attribute_getIStream", _wrap_Attribute_getIStream}, +{"libferrisperlc::Attribute_getLocalIStream", _wrap_Attribute_getLocalIStream}, +{"libferrisperlc::Attribute_getIOStream", _wrap_Attribute_getIOStream}, +{"libferrisperlc::Attribute_checkOpenModeSupported", _wrap_Attribute_checkOpenModeSupported}, +{"libferrisperlc::Attribute_getSupportedOpenModes", _wrap_Attribute_getSupportedOpenModes}, +{"libferrisperlc::Attribute_getParent", _wrap_Attribute_getParent}, +{"libferrisperlc::Attribute_isParentBound", _wrap_Attribute_isParentBound}, +{"libferrisperlc::Attribute_getDirName", _wrap_Attribute_getDirName}, +{"libferrisperlc::Attribute_getDirPath", _wrap_Attribute_getDirPath}, +{"libferrisperlc::Attribute_copyTo", _wrap_Attribute_copyTo}, +{"libferrisperlc::delete_EA_Atom", _wrap_delete_EA_Atom}, +{"libferrisperlc::EA_Atom_getIStream", _wrap_EA_Atom_getIStream}, +{"libferrisperlc::EA_Atom_getIOStream", _wrap_EA_Atom_getIOStream}, +{"libferrisperlc::EA_Atom_checkOpenModeSupported", _wrap_EA_Atom_checkOpenModeSupported}, +{"libferrisperlc::EA_Atom_getSupportedOpenModes", _wrap_EA_Atom_getSupportedOpenModes}, +{"libferrisperlc::EA_Atom_havePassedInSteamRead", _wrap_EA_Atom_havePassedInSteamRead}, +{"libferrisperlc::EA_Atom_ReadOnly_getIStream", _wrap_EA_Atom_ReadOnly_getIStream}, +{"libferrisperlc::EA_Atom_ReadOnly_PassedInStream_getIStream", _wrap_EA_Atom_ReadOnly_PassedInStream_getIStream}, +{"libferrisperlc::EA_Atom_ReadOnly_PassedInStream_havePassedInSteamRead", _wrap_EA_Atom_ReadOnly_PassedInStream_havePassedInSteamRead}, +{"libferrisperlc::new_EA_Atom_ReadWrite", _wrap_new_EA_Atom_ReadWrite}, +{"libferrisperlc::EA_Atom_ReadWrite_priv_getIOStream", _wrap_EA_Atom_ReadWrite_priv_getIOStream}, +{"libferrisperlc::EA_Atom_ReadWrite_getIOStream", _wrap_EA_Atom_ReadWrite_getIOStream}, +{"libferrisperlc::new_EA_Atom_ReadWrite_PassedInStream", _wrap_new_EA_Atom_ReadWrite_PassedInStream}, +{"libferrisperlc::EA_Atom_ReadWrite_PassedInStream_priv_getIOStream", _wrap_EA_Atom_ReadWrite_PassedInStream_priv_getIOStream}, +{"libferrisperlc::new_EA_Atom_ReadWrite_OpenModeCached", _wrap_new_EA_Atom_ReadWrite_OpenModeCached}, +{"libferrisperlc::EA_Atom_ReadWrite_OpenModeCached_getOpenMode", _wrap_EA_Atom_ReadWrite_OpenModeCached_getOpenMode}, +{"libferrisperlc::EA_Atom_ReadWrite_OpenModeCached_getIStream", _wrap_EA_Atom_ReadWrite_OpenModeCached_getIStream}, +{"libferrisperlc::EA_Atom_ReadWrite_OpenModeCached_getIOStream", _wrap_EA_Atom_ReadWrite_OpenModeCached_getIOStream}, +{"libferrisperlc::new_EA_Atom_ReadWrite_Contents", _wrap_new_EA_Atom_ReadWrite_Contents}, +{"libferrisperlc::EA_Atom_ReadWrite_Contents_getIOStream", _wrap_EA_Atom_ReadWrite_Contents_getIOStream}, +{"libferrisperlc::EA_Atom_ReadWrite_Contents_nullclosed", _wrap_EA_Atom_ReadWrite_Contents_nullclosed}, +{"libferrisperlc::EA_Atom_Static_getIStream", _wrap_EA_Atom_Static_getIStream}, +{"libferrisperlc::EA_Atom_RDFCacheAttribute_getIStream", _wrap_EA_Atom_RDFCacheAttribute_getIStream}, +{"libferrisperlc::EA_Atom_RDFCacheAttribute_getIOStream", _wrap_EA_Atom_RDFCacheAttribute_getIOStream}, +{"libferrisperlc::EA_Atom_RDFCacheAttribute_getSupportedOpenModes", _wrap_EA_Atom_RDFCacheAttribute_getSupportedOpenModes}, +{"libferrisperlc::remove_prefix", _wrap_remove_prefix}, +{"libferrisperlc::remove_postfix", _wrap_remove_postfix}, +{"libferrisperlc::tostr", _wrap_tostr}, +{"libferrisperlc::split", _wrap_split}, +{"libferrisperlc::toupperstring", _wrap_toupperstring}, +{"libferrisperlc::tolowerstring", _wrap_tolowerstring}, +{"libferrisperlc::attemptToAbsoluteURL", _wrap_attemptToAbsoluteURL}, +{"libferrisperlc::__lshift__", _wrap___lshift__}, +{"libferrisperlc::getline", _wrap_getline}, +{"libferrisperlc::wstring_to_utf8", _wrap_wstring_to_utf8}, +{"libferrisperlc::utf8_to_wstring", _wrap_utf8_to_wstring}, +{"libferrisperlc::iso8859_to_utf8", _wrap_iso8859_to_utf8}, +{"libferrisperlc::convert_url_to_utf8", _wrap_convert_url_to_utf8}, +{"libferrisperlc::convert_basename_to_utf8", _wrap_convert_basename_to_utf8}, +{"libferrisperlc::URLDecode", _wrap_URLDecode}, +{"libferrisperlc::EscapeStringAsRegex", _wrap_EscapeStringAsRegex}, +{"libferrisperlc::replace_all", _wrap_replace_all}, +{"libferrisperlc::convertByteString", _wrap_convertByteString}, +{"libferrisperlc::ParseKeyValueString", _wrap_ParseKeyValueString}, +{"libferrisperlc::CreateKeyValueString", _wrap_CreateKeyValueString}, +{"libferrisperlc::parseSeperatedList", _wrap_parseSeperatedList}, +{"libferrisperlc::createSeperatedList", _wrap_createSeperatedList}, +{"libferrisperlc::parseCommaSeperatedList", _wrap_parseCommaSeperatedList}, +{"libferrisperlc::createCommaSeperatedList", _wrap_createCommaSeperatedList}, +{"libferrisperlc::parseNullSeperatedList", _wrap_parseNullSeperatedList}, +{"libferrisperlc::createNullSeperatedList", _wrap_createNullSeperatedList}, +{"libferrisperlc::makeUUID", _wrap_makeUUID}, +{"libferrisperlc::__add__", _wrap___add__}, +{"libferrisperlc::toTime", _wrap_toTime}, +{"libferrisperlc::toXMLDateTime", _wrap_toXMLDateTime}, +{"libferrisperlc::ParseTimeString", _wrap_ParseTimeString}, +{"libferrisperlc::ParseSimpleIntervalString", _wrap_ParseSimpleIntervalString}, +{"libferrisperlc::FreshenTime", _wrap_FreshenTime}, +{"libferrisperlc::getTime", _wrap_getTime}, +{"libferrisperlc::Sleep", _wrap_Sleep}, +{"libferrisperlc::setDefaultTimeFormat", _wrap_setDefaultTimeFormat}, +{"libferrisperlc::getDefaultTimeFormat", _wrap_getDefaultTimeFormat}, +{"libferrisperlc::toTimeString", _wrap_toTimeString}, +{"libferrisperlc::toHMSString", _wrap_toHMSString}, +{"libferrisperlc::ParseRelativeTimeString", _wrap_ParseRelativeTimeString}, +{"libferrisperlc::new_Benchmark", _wrap_new_Benchmark}, +{"libferrisperlc::delete_Benchmark", _wrap_delete_Benchmark}, +{"libferrisperlc::Benchmark_start", _wrap_Benchmark_start}, +{"libferrisperlc::Benchmark_stop", _wrap_Benchmark_stop}, +{"libferrisperlc::Benchmark_print", _wrap_Benchmark_print}, +{"libferrisperlc::Benchmark_getElapsedTime", _wrap_Benchmark_getElapsedTime}, +{"libferrisperlc::Benchmark_setOutputStream", _wrap_Benchmark_setOutputStream}, +{"libferrisperlc::pread", _wrap_pread}, +{"libferrisperlc::preadio", _wrap_preadio}, +{"libferrisperlc::readline", _wrap_readline}, +{"libferrisperlc::pwrite", _wrap_pwrite}, +{"libferrisperlc::ferriswrite", _wrap_ferriswrite}, +{"libferrisperlc::fsync", _wrap_fsync}, +{"libferrisperlc::tellgi", _wrap_tellgi}, +{"libferrisperlc::tellgio", _wrap_tellgio}, +{"libferrisperlc::tellp", _wrap_tellp}, +{"libferrisperlc::seekgio", _wrap_seekgio}, +{"libferrisperlc::seekp", _wrap_seekp}, +{"libferrisperlc::goodi", _wrap_goodi}, +{"libferrisperlc::goodio", _wrap_goodio}, +{"libferrisperlc::eofi", _wrap_eofi}, +{"libferrisperlc::eofio", _wrap_eofio}, +{"libferrisperlc::get_ios_in", _wrap_get_ios_in}, +{"libferrisperlc::get_ios_out", _wrap_get_ios_out}, +{"libferrisperlc::get_ios_trunc", _wrap_get_ios_trunc}, +{"libferrisperlc::get_ios_ate", _wrap_get_ios_ate}, +{"libferrisperlc::get_ios_app", _wrap_get_ios_app}, +{"libferrisperlc::get_ios_beg", _wrap_get_ios_beg}, +{"libferrisperlc::get_ios_cur", _wrap_get_ios_cur}, +{"libferrisperlc::get_ios_end", _wrap_get_ios_end}, +{"libferrisperlc::fireCloseSig", _wrap_fireCloseSig}, +{"libferrisperlc::getAgentNames", _wrap_getAgentNames}, +{"libferrisperlc::getAgent", _wrap_getAgent}, +{"libferrisperlc::getCompleteAgent", _wrap_getCompleteAgent}, +{"libferrisperlc::eraseAgent", _wrap_eraseAgent}, +{"libferrisperlc::getBinaryAgentImplemenationNames", _wrap_getBinaryAgentImplemenationNames}, +{"libferrisperlc::createBinaryAgent", _wrap_createBinaryAgent}, +{"libferrisperlc::Agent_getUUID", _wrap_Agent_getUUID}, +{"libferrisperlc::Agent_getName", _wrap_Agent_getName}, +{"libferrisperlc::Agent_setName", _wrap_Agent_setName}, +{"libferrisperlc::Agent_getEmblem", _wrap_Agent_getEmblem}, +{"libferrisperlc::Agent_setEmblem", _wrap_Agent_setEmblem}, +{"libferrisperlc::Agent_allowsManyEmblems", _wrap_Agent_allowsManyEmblems}, +{"libferrisperlc::Agent_getEmblems", _wrap_Agent_getEmblems}, +{"libferrisperlc::Agent_setEmblems", _wrap_Agent_setEmblems}, +{"libferrisperlc::Agent_getPersonality", _wrap_Agent_getPersonality}, +{"libferrisperlc::Agent_setPersonality", _wrap_Agent_setPersonality}, +{"libferrisperlc::Agent_getAgentImplemenationName", _wrap_Agent_getAgentImplemenationName}, +{"libferrisperlc::Agent_setAgentImplemenationName", _wrap_Agent_setAgentImplemenationName}, +{"libferrisperlc::Agent_getStateDir", _wrap_Agent_getStateDir}, +{"libferrisperlc::Agent_setStateDir", _wrap_Agent_setStateDir}, +{"libferrisperlc::Agent_getAlternateImplementationNames", _wrap_Agent_getAlternateImplementationNames}, +{"libferrisperlc::Agent_addTrainingExample", _wrap_Agent_addTrainingExample}, +{"libferrisperlc::Agent_train", _wrap_Agent_train}, +{"libferrisperlc::Agent_classify", _wrap_Agent_classify}, +{"libferrisperlc::fh_emblem_less___call__", _wrap_fh_emblem_less___call__}, +{"libferrisperlc::contains", _wrap_contains}, +{"libferrisperlc::setSkipLoadingEmblems", _wrap_setSkipLoadingEmblems}, +{"libferrisperlc::link", _wrap_link}, +{"libferrisperlc::unlink", _wrap_unlink}, +{"libferrisperlc::UseGetNextID", _wrap_UseGetNextID}, +{"libferrisperlc::UseGetNextID_EAOrdering", _wrap_UseGetNextID_EAOrdering}, +{"libferrisperlc::setDefaultEtagere", _wrap_setDefaultEtagere}, +{"libferrisperlc::getEtagere", _wrap_getEtagere}, +{"libferrisperlc::makeEtagere", _wrap_makeEtagere}, +{"libferrisperlc::new_Times", _wrap_new_Times}, +{"libferrisperlc::Times_setATime", _wrap_Times_setATime}, +{"libferrisperlc::Times_setMTime", _wrap_Times_setMTime}, +{"libferrisperlc::Times_touchATime", _wrap_Times_touchATime}, +{"libferrisperlc::Times_touchMTime", _wrap_Times_touchMTime}, +{"libferrisperlc::Times_getATime", _wrap_Times_getATime}, +{"libferrisperlc::Times_getMTime", _wrap_Times_getMTime}, +{"libferrisperlc::emblemListToEAQuery", _wrap_emblemListToEAQuery}, +{"libferrisperlc::DRangeToKiloMeters", _wrap_DRangeToKiloMeters}, +{"libferrisperlc::KiloMetersToDRange", _wrap_KiloMetersToDRange}, +{"libferrisperlc::getEmblemsNear", _wrap_getEmblemsNear}, +{"libferrisperlc::delete_Personality", _wrap_delete_Personality}, +{"libferrisperlc::Personality_getName", _wrap_Personality_getName}, +{"libferrisperlc::Personality_getID", _wrap_Personality_getID}, +{"libferrisperlc::getCurrentUserPersonality", _wrap_getCurrentUserPersonality}, +{"libferrisperlc::getGenericClassifierAgentPersonality", _wrap_getGenericClassifierAgentPersonality}, +{"libferrisperlc::createPersonality", _wrap_createPersonality}, +{"libferrisperlc::obtainPersonality", _wrap_obtainPersonality}, +{"libferrisperlc::findPersonality", _wrap_findPersonality}, +{"libferrisperlc::findAllPersonalities", _wrap_findAllPersonalities}, +{"libferrisperlc::isXFS", _wrap_isXFS}, +{"libferrisperlc::PrefixTrimmerOps_match", _wrap_PrefixTrimmerOps_match}, +{"libferrisperlc::PrefixTrimmerOps_trim", _wrap_PrefixTrimmerOps_trim}, +{"libferrisperlc::PostfixTrimmerOps_match", _wrap_PostfixTrimmerOps_match}, +{"libferrisperlc::PostfixTrimmerOps_trim", _wrap_PostfixTrimmerOps_trim}, +{"libferrisperlc::delete_TrimmerBase", _wrap_delete_TrimmerBase}, +{"libferrisperlc::TrimmerBase_push_back", _wrap_TrimmerBase_push_back}, +{"libferrisperlc::TrimmerBase_clear", _wrap_TrimmerBase_clear}, +{"libferrisperlc::TrimmerBase___call__", _wrap_TrimmerBase___call__}, +{"libferrisperlc::new_giStreamPosRAII", _wrap_new_giStreamPosRAII}, +{"libferrisperlc::isCompressedContext", _wrap_isCompressedContext}, +{"libferrisperlc::getNullConvertToCompressedChunkContextProgress_Sig", _wrap_getNullConvertToCompressedChunkContextProgress_Sig}, +{"libferrisperlc::getCompressedChunkIOStream", _wrap_getCompressedChunkIOStream}, +{"libferrisperlc::ConvertToCompressedChunkContext", _wrap_ConvertToCompressedChunkContext}, +{"libferrisperlc::ConvertFromCompressedChunkContext", _wrap_ConvertFromCompressedChunkContext}, +{"libferrisperlc::getSchemaDefaultSortList", _wrap_getSchemaDefaultSortList}, +{"libferrisperlc::getSchemaDefaultSort", _wrap_getSchemaDefaultSort}, +{"libferrisperlc::maskOffXSDMeta", _wrap_maskOffXSDMeta}, +{"libferrisperlc::attachStatelessSchema", _wrap_attachStatelessSchema}, +{"libferrisperlc::attachGenericSchema", _wrap_attachGenericSchema}, +{"libferrisperlc::getSchemaJustification", _wrap_getSchemaJustification}, +{"libferrisperlc::getSchemaDisplayWidth", _wrap_getSchemaDisplayWidth}, +{"libferrisperlc::getSchemaDisplayPrecision", _wrap_getSchemaDisplayPrecision}, +{"libferrisperlc::getSchemaType", _wrap_getSchemaType}, +{"libferrisperlc::getSchemaURLForType", _wrap_getSchemaURLForType}, +{"libferrisperlc::makeBasicTypeMap", _wrap_makeBasicTypeMap}, +{"libferrisperlc::attachStreamCollector", _wrap_attachStreamCollector}, +{"libferrisperlc::stringvec_to_CSTRvec", _wrap_stringvec_to_CSTRvec}, +{"libferrisperlc::Resolve", _wrap_Resolve}, +{"libferrisperlc::getExpandShellGlobsPopTable", _wrap_getExpandShellGlobsPopTable}, +{"libferrisperlc::expandShellGlobs", _wrap_expandShellGlobs}, +{"libferrisperlc::new_DesktopFileKeyNotFound", _wrap_new_DesktopFileKeyNotFound}, +{"libferrisperlc::importDesktopFileTo", _wrap_importDesktopFileTo}, +{"libferrisperlc::importDesktopFile", _wrap_importDesktopFile}, +{"libferrisperlc::getFileClipboard", _wrap_getFileClipboard}, +{"libferrisperlc::Clear", _wrap_Clear}, +{"libferrisperlc::Cut", _wrap_Cut}, +{"libferrisperlc::Copy", _wrap_Copy}, +{"libferrisperlc::Link", _wrap_Link}, +{"libferrisperlc::Paste", _wrap_Paste}, +{"libferrisperlc::Undo", _wrap_Undo}, +{"libferrisperlc::Redo", _wrap_Redo}, +{"libferrisperlc::getMimeHistory", _wrap_getMimeHistory}, +{"libferrisperlc::setUseSloth", _wrap_setUseSloth}, +{"libferrisperlc::setUseAutoClose", _wrap_setUseAutoClose}, +{"libferrisperlc::setCursorOption", _wrap_setCursorOption}, +{"libferrisperlc::getCursor", _wrap_getCursor}, +{"libferrisperlc::cursorNext", _wrap_cursorNext}, +{"libferrisperlc::cursorPrev", _wrap_cursorPrev}, +{"libferrisperlc::cursorOffset", _wrap_cursorOffset}, +{"libferrisperlc::cursorSet", _wrap_cursorSet}, +{"libferrisperlc::InitOpenSSL", _wrap_InitOpenSSL}, +{"libferrisperlc::digest", _wrap_digest}, +{"libferrisperlc::base64encode", _wrap_base64encode}, +{"libferrisperlc::MakeDigestStream", _wrap_MakeDigestStream}, +{"libferrisperlc::new_ImplicitIteratorUpdateLock", _wrap_new_ImplicitIteratorUpdateLock}, +{"libferrisperlc::delete_ImplicitIteratorUpdateLock", _wrap_delete_ImplicitIteratorUpdateLock}, +{"libferrisperlc::ImplicitIteratorUpdateLock_isTaken", _wrap_ImplicitIteratorUpdateLock_isTaken}, +{"libferrisperlc::delete_ContextIterator", _wrap_delete_ContextIterator}, +{"libferrisperlc::new_ContextIterator", _wrap_new_ContextIterator}, +{"libferrisperlc::ContextIterator_operator_assignment", _wrap_ContextIterator_operator_assignment}, +{"libferrisperlc::ContextIterator___ref__", _wrap_ContextIterator___ref__}, +{"libferrisperlc::ContextIterator___deref__", _wrap_ContextIterator___deref__}, +{"libferrisperlc::ContextIterator_operator_atindex", _wrap_ContextIterator_operator_atindex}, +{"libferrisperlc::ContextIterator___plusplus__", _wrap_ContextIterator___plusplus__}, +{"libferrisperlc::ContextIterator___minmin__", _wrap_ContextIterator___minmin__}, +{"libferrisperlc::ContextIterator___add__", _wrap_ContextIterator___add__}, +{"libferrisperlc::ContextIterator___iadd__", _wrap_ContextIterator___iadd__}, +{"libferrisperlc::ContextIterator___sub__", _wrap_ContextIterator___sub__}, +{"libferrisperlc::ContextIterator___isub__", _wrap_ContextIterator___isub__}, +{"libferrisperlc::ContextIterator_getContextClassStatelessEANames", _wrap_ContextIterator_getContextClassStatelessEANames}, +{"libferrisperlc::ContextIterator_isDir", _wrap_ContextIterator_isDir}, +{"libferrisperlc::ContextIterator_getDirName", _wrap_ContextIterator_getDirName}, +{"libferrisperlc::ContextIterator_getParent", _wrap_ContextIterator_getParent}, +{"libferrisperlc::ContextIterator_isParentBound", _wrap_ContextIterator_isParentBound}, +{"libferrisperlc::ContextIterator_getRecommendedEA", _wrap_ContextIterator_getRecommendedEA}, +{"libferrisperlc::ContextIterator_getHasSubContextsGuess", _wrap_ContextIterator_getHasSubContextsGuess}, +{"libferrisperlc::ContextIterator_getHaveReadDir", _wrap_ContextIterator_getHaveReadDir}, +{"libferrisperlc::ContextIterator_toAttribute", _wrap_ContextIterator_toAttribute}, +{"libferrisperlc::ContextIterator_getSchema", _wrap_ContextIterator_getSchema}, +{"libferrisperlc::ContextIterator_getSchemaOrDefault", _wrap_ContextIterator_getSchemaOrDefault}, +{"libferrisperlc::ContextIterator_begin", _wrap_ContextIterator_begin}, +{"libferrisperlc::ContextIterator_end", _wrap_ContextIterator_end}, +{"libferrisperlc::ContextIterator_rbegin", _wrap_ContextIterator_rbegin}, +{"libferrisperlc::ContextIterator_rend", _wrap_ContextIterator_rend}, +{"libferrisperlc::ContextIterator_find", _wrap_ContextIterator_find}, +{"libferrisperlc::ContextIterator_monsterName", _wrap_ContextIterator_monsterName}, +{"libferrisperlc::ContextIterator_getIsNativeContext", _wrap_ContextIterator_getIsNativeContext}, +{"libferrisperlc::ContextIterator_setHasDynamicAttributes", _wrap_ContextIterator_setHasDynamicAttributes}, +{"libferrisperlc::ContextIterator_setAttribute", _wrap_ContextIterator_setAttribute}, +{"libferrisperlc::ContextIterator_getSubContextAttributesWithSameNameHaveSameSchema", _wrap_ContextIterator_getSubContextAttributesWithSameNameHaveSameSchema}, +{"libferrisperlc::ContextIterator_dumpOutItems", _wrap_ContextIterator_dumpOutItems}, +{"libferrisperlc::ContextIterator_getOverMountContext", _wrap_ContextIterator_getOverMountContext}, +{"libferrisperlc::ContextIterator_remove", _wrap_ContextIterator_remove}, +{"libferrisperlc::ContextIterator_rename", _wrap_ContextIterator_rename}, +{"libferrisperlc::ContextIterator_copyTo", _wrap_ContextIterator_copyTo}, +{"libferrisperlc::ContextIterator_createAttribute", _wrap_ContextIterator_createAttribute}, +{"libferrisperlc::ContextIterator_acquireAttribute", _wrap_ContextIterator_acquireAttribute}, +{"libferrisperlc::ContextIterator_getCreateSubContextSchema", _wrap_ContextIterator_getCreateSubContextSchema}, +{"libferrisperlc::ContextIterator_createSubContext", _wrap_ContextIterator_createSubContext}, +{"libferrisperlc::ContextIterator_getRelativeContext", _wrap_ContextIterator_getRelativeContext}, +{"libferrisperlc::ContextIterator_getSubContextNames", _wrap_ContextIterator_getSubContextNames}, +{"libferrisperlc::ContextIterator_getSubContext", _wrap_ContextIterator_getSubContext}, +{"libferrisperlc::ContextIterator_priv_isSubContextBound", _wrap_ContextIterator_priv_isSubContextBound}, +{"libferrisperlc::ContextIterator_isSubContextBound", _wrap_ContextIterator_isSubContextBound}, +{"libferrisperlc::ContextIterator_read", _wrap_ContextIterator_read}, +{"libferrisperlc::ContextIterator_guessSize", _wrap_ContextIterator_guessSize}, +{"libferrisperlc::ContextIterator_hasSubContexts", _wrap_ContextIterator_hasSubContexts}, +{"libferrisperlc::ContextIterator_SubContextCount", _wrap_ContextIterator_SubContextCount}, +{"libferrisperlc::ContextIterator_all_attributes_have_single_ref_count", _wrap_ContextIterator_all_attributes_have_single_ref_count}, +{"libferrisperlc::ContextIterator_isAttributeBound", _wrap_ContextIterator_isAttributeBound}, +{"libferrisperlc::ContextIterator_getAttribute", _wrap_ContextIterator_getAttribute}, +{"libferrisperlc::ContextIterator_getAttributeCount", _wrap_ContextIterator_getAttributeCount}, +{"libferrisperlc::ContextIterator_getAttributeRootEmblem", _wrap_ContextIterator_getAttributeRootEmblem}, +{"libferrisperlc::ContextIterator_Emit_Changed", _wrap_ContextIterator_Emit_Changed}, +{"libferrisperlc::ContextIterator_Emit_Deleted", _wrap_ContextIterator_Emit_Deleted}, +{"libferrisperlc::ContextIterator_Emit_Start_Execute", _wrap_ContextIterator_Emit_Start_Execute}, +{"libferrisperlc::ContextIterator_Emit_Stop_Execute", _wrap_ContextIterator_Emit_Stop_Execute}, +{"libferrisperlc::ContextIterator_Emit_Created", _wrap_ContextIterator_Emit_Created}, +{"libferrisperlc::ContextIterator_Emit_Moved", _wrap_ContextIterator_Emit_Moved}, +{"libferrisperlc::ContextIterator_Emit_Exists", _wrap_ContextIterator_Emit_Exists}, +{"libferrisperlc::ContextIterator_Emit_Start_Reading_Context", _wrap_ContextIterator_Emit_Start_Reading_Context}, +{"libferrisperlc::ContextIterator_Emit_Stop_Reading_Context", _wrap_ContextIterator_Emit_Stop_Reading_Context}, +{"libferrisperlc::ContextIterator_getURL", _wrap_ContextIterator_getURL}, +{"libferrisperlc::ContextIterator_SubCreate_file", _wrap_ContextIterator_SubCreate_file}, +{"libferrisperlc::ContextIterator_dumpRefDebugData", _wrap_ContextIterator_dumpRefDebugData}, +{"libferrisperlc::ContextIterator_splitPath", _wrap_ContextIterator_splitPath}, +{"libferrisperlc::ContextIterator_unSplitPath", _wrap_ContextIterator_unSplitPath}, +{"libferrisperlc::ContextIterator_getMimeType", _wrap_ContextIterator_getMimeType}, +{"libferrisperlc::ContextIterator_getFileType", _wrap_ContextIterator_getFileType}, +{"libferrisperlc::ContextIterator_getMedallion", _wrap_ContextIterator_getMedallion}, +{"libferrisperlc::ContextIterator_hasMedallion", _wrap_ContextIterator_hasMedallion}, +{"libferrisperlc::ContextIterator_getNamespacePrefixes", _wrap_ContextIterator_getNamespacePrefixes}, +{"libferrisperlc::ContextIterator_getBranchFileSystem", _wrap_ContextIterator_getBranchFileSystem}, +{"libferrisperlc::ContextIterator_getNameExtension", _wrap_ContextIterator_getNameExtension}, +{"libferrisperlc::ContextIterator_getImage", _wrap_ContextIterator_getImage}, +{"libferrisperlc::ContextIterator_getImageOrNULL", _wrap_ContextIterator_getImageOrNULL}, +{"libferrisperlc::ContextIterator_priv_getImage", _wrap_ContextIterator_priv_getImage}, +{"libferrisperlc::ContextIterator_taintImage", _wrap_ContextIterator_taintImage}, +{"libferrisperlc::ContextIterator_RegisterImageEAGeneratorModule", _wrap_ContextIterator_RegisterImageEAGeneratorModule}, +{"libferrisperlc::ContextIterator_UnrollRegisteredImageEAGeneratorModule", _wrap_ContextIterator_UnrollRegisteredImageEAGeneratorModule}, +{"libferrisperlc::ContextIterator_isCompressedContext", _wrap_ContextIterator_isCompressedContext}, +{"libferrisperlc::ContextIterator_addHandlableToBeReleasedWithContext", _wrap_ContextIterator_addHandlableToBeReleasedWithContext}, +{"libferrisperlc::ContextIterator_SubCreate_dir", _wrap_ContextIterator_SubCreate_dir}, +{"libferrisperlc::ContextIterator_dumpTree", _wrap_ContextIterator_dumpTree}, +{"libferrisperlc::ContextIterator_getLastPartOfName", _wrap_ContextIterator_getLastPartOfName}, +{"libferrisperlc::ContextIterator_appendToPath", _wrap_ContextIterator_appendToPath}, +{"libferrisperlc::ContextIterator_getIStream", _wrap_ContextIterator_getIStream}, +{"libferrisperlc::ContextIterator_getLocalIStream", _wrap_ContextIterator_getLocalIStream}, +{"libferrisperlc::ContextIterator_getIOStream", _wrap_ContextIterator_getIOStream}, +{"libferrisperlc::ContextIterator_checkOpenModeSupported", _wrap_ContextIterator_checkOpenModeSupported}, +{"libferrisperlc::ContextIterator_getSupportedOpenModes", _wrap_ContextIterator_getSupportedOpenModes}, +{"libferrisperlc::ContextIterator_getDirPath", _wrap_ContextIterator_getDirPath}, +{"libferrisperlc::ContextIterator_getSubContextCount", _wrap_ContextIterator_getSubContextCount}, +{"libferrisperlc::ContextIterator_empty", _wrap_ContextIterator_empty}, +{"libferrisperlc::ContextIterator_getNamingEvent_MedallionUpdated_Sig", _wrap_ContextIterator_getNamingEvent_MedallionUpdated_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Changed_Sig", _wrap_ContextIterator_getNamingEvent_Changed_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Deleted_Sig", _wrap_ContextIterator_getNamingEvent_Deleted_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Start_Execute_Sig", _wrap_ContextIterator_getNamingEvent_Start_Execute_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Stop_Execute_Sig", _wrap_ContextIterator_getNamingEvent_Stop_Execute_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Created_Sig", _wrap_ContextIterator_getNamingEvent_Created_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Moved_Sig", _wrap_ContextIterator_getNamingEvent_Moved_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Exists_Sig", _wrap_ContextIterator_getNamingEvent_Exists_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Start_Reading_Context_Sig", _wrap_ContextIterator_getNamingEvent_Start_Reading_Context_Sig}, +{"libferrisperlc::ContextIterator_getNamingEvent_Stop_Reading_Context_Sig", _wrap_ContextIterator_getNamingEvent_Stop_Reading_Context_Sig}, +{"libferrisperlc::ContextIterator_getContextEvent_Headers_Received_Sig", _wrap_ContextIterator_getContextEvent_Headers_Received_Sig}, +{"libferrisperlc::__sub__", _wrap___sub__}, +{"libferrisperlc::__lt__", _wrap___lt__}, +{"libferrisperlc::__gt__", _wrap___gt__}, +{"libferrisperlc::__le__", _wrap___le__}, +{"libferrisperlc::__ge__", _wrap___ge__}, +{"libferrisperlc::getIOErrorDescription", _wrap_getIOErrorDescription}, +{"libferrisperlc::haveIOError", _wrap_haveIOError}, +{"libferrisperlc::saveFile", _wrap_saveFile}, +{"libferrisperlc::getStrAttr", _wrap_getStrAttr}, +{"libferrisperlc::setChild", _wrap_setChild}, +{"libferrisperlc::setStrAttr", _wrap_setStrAttr}, +{"libferrisperlc::getTimeAttr", _wrap_getTimeAttr}, +{"libferrisperlc::getStrSubCtx", _wrap_getStrSubCtx}, +{"libferrisperlc::new_CacheManager", _wrap_new_CacheManager}, +{"libferrisperlc::delete_CacheManager", _wrap_delete_CacheManager}, +{"libferrisperlc::CacheManager_dumpFreeListTo", _wrap_CacheManager_dumpFreeListTo}, +{"libferrisperlc::CacheManager_cleanUp", _wrap_CacheManager_cleanUp}, +{"libferrisperlc::CacheManager_shouldAutoCleanUp", _wrap_CacheManager_shouldAutoCleanUp}, +{"libferrisperlc::CacheManager_insideCleanupCall", _wrap_CacheManager_insideCleanupCall}, +{"libferrisperlc::CacheManager_cleanUp_only_CreateMetaDataContext", _wrap_CacheManager_cleanUp_only_CreateMetaDataContext}, +{"libferrisperlc::getCacheManager", _wrap_getCacheManager}, +{"libferrisperlc::DEBUG_dumpcl", _wrap_DEBUG_dumpcl}, +{"libferrisperlc::DEBUG_dumpcl_to_file", _wrap_DEBUG_dumpcl_to_file}, +{"libferrisperlc::delete_ContextCollection", _wrap_delete_ContextCollection}, +{"libferrisperlc::ContextCollection_getSubContextNames", _wrap_ContextCollection_getSubContextNames}, +{"libferrisperlc::ContextCollection_isSubContextBound", _wrap_ContextCollection_isSubContextBound}, +{"libferrisperlc::ContextCollection_getSubContext", _wrap_ContextCollection_getSubContext}, +{"libferrisperlc::ContextCollection_SubContextCount", _wrap_ContextCollection_SubContextCount}, +{"libferrisperlc::ContextCollection_getSubContextCount", _wrap_ContextCollection_getSubContextCount}, +{"libferrisperlc::ContextCollection_empty", _wrap_ContextCollection_empty}, +{"libferrisperlc::delete_MutableCollectionEvents", _wrap_delete_MutableCollectionEvents}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_MedallionUpdated_Sig", _wrap_MutableCollectionEvents_getNamingEvent_MedallionUpdated_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Changed_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Changed_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Deleted_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Deleted_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Start_Execute_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Start_Execute_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Stop_Execute_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Stop_Execute_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Created_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Created_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Moved_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Moved_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Exists_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Exists_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Start_Reading_Context_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Start_Reading_Context_Sig}, +{"libferrisperlc::MutableCollectionEvents_getNamingEvent_Stop_Reading_Context_Sig", _wrap_MutableCollectionEvents_getNamingEvent_Stop_Reading_Context_Sig}, +{"libferrisperlc::MutableCollectionEvents_getContextEvent_Headers_Received_Sig", _wrap_MutableCollectionEvents_getContextEvent_Headers_Received_Sig}, +{"libferrisperlc::__eq__", _wrap___eq__}, +{"libferrisperlc::__ne__", _wrap___ne__}, +{"libferrisperlc::ReverseSortStringOrder", _wrap_ReverseSortStringOrder}, +{"libferrisperlc::MakeSorter", _wrap_MakeSorter}, +{"libferrisperlc::MakeSortedContext", _wrap_MakeSortedContext}, +{"libferrisperlc::adjustEANameForSorting", _wrap_adjustEANameForSorting}, +{"libferrisperlc::SL_SubCreate_alwaysThrow", _wrap_SL_SubCreate_alwaysThrow}, +{"libferrisperlc::SL_SubCreate_dir", _wrap_SL_SubCreate_dir}, +{"libferrisperlc::isTrue", _wrap_isTrue}, +{"libferrisperlc::isFalse", _wrap_isFalse}, +{"libferrisperlc::isNumber", _wrap_isNumber}, +{"libferrisperlc::getCreateHistory", _wrap_getCreateHistory}, +{"libferrisperlc::EventPending", _wrap_EventPending}, +{"libferrisperlc::processEvent", _wrap_processEvent}, +{"libferrisperlc::processAllPendingEvents", _wrap_processAllPendingEvents}, +{"libferrisperlc::mainLoop", _wrap_mainLoop}, +{"libferrisperlc::new_SingleShot", _wrap_new_SingleShot}, +{"libferrisperlc::SingleShot___call__", _wrap_SingleShot___call__}, +{"libferrisperlc::SingleShot_value", _wrap_SingleShot_value}, +{"libferrisperlc::getMimeName", _wrap_getMimeName}, +{"libferrisperlc::toContextIterator", _wrap_toContextIterator}, +{"libferrisperlc::addEAToSet", _wrap_addEAToSet}, +{"libferrisperlc::ExecuteQueryAgainstMyRDF", _wrap_ExecuteQueryAgainstMyRDF}, +{"libferrisperlc::getStaticLinkedRootContextNames", _wrap_getStaticLinkedRootContextNames}, +{"libferrisperlc::appendToStaticLinkedRootContextNames", _wrap_appendToStaticLinkedRootContextNames}, +{"libferrisperlc::ParseOnly_FERRIS_POPT_OPTIONS", _wrap_ParseOnly_FERRIS_POPT_OPTIONS}, +{"libferrisperlc::tryToUseOutOfProcessMetadataServer", _wrap_tryToUseOutOfProcessMetadataServer}, +{"libferrisperlc::makeFerrisPluginPath", _wrap_makeFerrisPluginPath}, +{"libferrisperlc::acquireContext", _wrap_acquireContext}, +{0,0} +}; +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" +#endif + +XS(SWIG_init) { + dXSARGS; + int i; + + SWIG_InitializeModule(0); + + /* Install commands */ + for (i = 0; swig_commands[i].name; i++) { + newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); + } + + /* Install variables */ + for (i = 0; swig_variables[i].name; i++) { + SV *sv; + sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); + if (swig_variables[i].type) { + SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); + } else { + sv_setiv(sv,(IV) 0); + } + swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); + } + + /* Install constant */ + for (i = 0; swig_constants[i].type; i++) { + SV *sv; + sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); + switch(swig_constants[i].type) { + case SWIG_INT: + sv_setiv(sv, (IV) swig_constants[i].lvalue); + break; + case SWIG_FLOAT: + sv_setnv(sv, (double) swig_constants[i].dvalue); + break; + case SWIG_STRING: + sv_setpv(sv, (char *) swig_constants[i].pvalue); + break; + case SWIG_POINTER: + SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); + break; + case SWIG_BINARY: + SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); + break; + default: + break; + } + SvREADONLY_on(sv); + } + + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "RefLinkedBase_destructiveCopy", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(Loki::Private::RefLinkedBase::destructiveCopy))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Loki__Private__RefLinkedBase, (void*) "libferrisperl::RefLinkedBase"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "AllowConversion_allow", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(Loki::AllowConversion::allow))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Loki__AllowConversion, (void*) "libferrisperl::AllowConversion"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "DisallowConversion_allow", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(Loki::DisallowConversion::allow))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Loki__DisallowConversion, (void*) "libferrisperl::DisallowConversion"); + SWIG_TypeClientData(SWIGTYPE_p_Loki__NullPointerException, (void*) "libferrisperl::NullPointerException"); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_int_t, (void*) "libferrisperl::IntVector"); + SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__string_t, (void*) "libferrisperl::StringVector"); + SWIG_TypeClientData(SWIGTYPE_p_FerrisLoki__Handlable, (void*) "libferrisperl::Handlable"); + SWIG_TypeClientData(SWIGTYPE_p_FerrisLoki__FerrisSmallObjAllocator, (void*) "libferrisperl::FerrisSmallObjAllocator"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "__PRETTY_FUNCTION__", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_FromCharPtr("")); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisException_CodeState, (void*) "libferrisperl::FerrisException_CodeState"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisExceptionBase, (void*) "libferrisperl::FerrisExceptionBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisStreamException, (void*) "libferrisperl::FerrisStreamException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__UnspoortedBlockSize, (void*) "libferrisperl::UnspoortedBlockSize"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__MalformedURL, (void*) "libferrisperl::MalformedURL"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CreateFIFO, (void*) "libferrisperl::CreateFIFO"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "ferris_ios_o_nouncrypt", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(Ferris::ferris_ios::o_nouncrypt))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_ios, (void*) "libferrisperl::ferris_ios"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_onemeg, (void*) "libferrisperl::ferris_basic_streambuf_onemeg"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenk, (void*) "libferrisperl::ferris_basic_streambuf_sixteenk"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_fourk, (void*) "libferrisperl::ferris_basic_streambuf_fourk"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_quartk, (void*) "libferrisperl::ferris_basic_streambuf_quartk"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_sixteenbytes, (void*) "libferrisperl::ferris_basic_streambuf_sixteenbytes"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ferris_basic_streambuf_virtual, (void*) "libferrisperl::ferris_basic_streambuf_virtual"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_context, (void*) "libferrisperl::Context"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_attribute, (void*) "libferrisperl::AttributeProxy"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_attrcol, (void*) "libferrisperl::AttributeCollection"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_runner, (void*) "libferrisperl::Runner"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_sorter, (void*) "libferrisperl::PreprocessedSortString"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_emblem, (void*) "libferrisperl::Emblem"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_cemblem, (void*) "libferrisperl::ColdEmblem"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_etagere, (void*) "libferrisperl::Etagere"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_medallion, (void*) "libferrisperl::Medallion"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_medallionBelief, (void*) "libferrisperl::MedallionBelief"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FCA__fh_conceptLattice, (void*) "libferrisperl::ConceptLattice"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__RegexCollection, (void*) "libferrisperl::RegexCollection"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "STEM_J_B_LOVINS_68", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FullTextIndex::STEM_J_B_LOVINS_68))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "STEM_PORTER", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FullTextIndex::STEM_PORTER))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "STEM_NONE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FullTextIndex::STEM_NONE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisVFSExceptionBase, (void*) "libferrisperl::FerrisVFSExceptionBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisGLibCException, (void*) "libferrisperl::FerrisGLibCException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisStatException, (void*) "libferrisperl::FerrisStatException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisSetCWDException, (void*) "libferrisperl::FerrisSetCWDException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotGetStream, (void*) "libferrisperl::CanNotGetStream"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NotSupported, (void*) "libferrisperl::NotSupported"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisNotSupportedInThisContext, (void*) "libferrisperl::FerrisNotSupportedInThisContext"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__RootContextCreationFailed, (void*) "libferrisperl::RootContextCreationFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotDelete, (void*) "libferrisperl::CanNotDelete"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchObject, (void*) "libferrisperl::NoSuchObject"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchUser, (void*) "libferrisperl::NoSuchUser"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchGroup, (void*) "libferrisperl::NoSuchGroup"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ObjectExists, (void*) "libferrisperl::ObjectExists"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ContextExists, (void*) "libferrisperl::ContextExists"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CopyFailed, (void*) "libferrisperl::CopyFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__RemoveFailed, (void*) "libferrisperl::RemoveFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AttributeNotWritable, (void*) "libferrisperl::AttributeNotWritable"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SubContextAlreadyInUse, (void*) "libferrisperl::SubContextAlreadyInUse"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AttributeAlreadyInUse, (void*) "libferrisperl::AttributeAlreadyInUse"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCreateSubContextFailed, (void*) "libferrisperl::FerrisCreateSubContextFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCreateSubContextNotSupported, (void*) "libferrisperl::FerrisCreateSubContextNotSupported"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCreateAttributeFailed, (void*) "libferrisperl::FerrisCreateAttributeFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCreateAttributeNotSupported, (void*) "libferrisperl::FerrisCreateAttributeNotSupported"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchSubContext, (void*) "libferrisperl::NoSuchSubContext"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchAttribute, (void*) "libferrisperl::NoSuchAttribute"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchContextClass, (void*) "libferrisperl::NoSuchContextClass"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotReadContext, (void*) "libferrisperl::CanNotReadContext"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotReadContextPcctsParseFailed, (void*) "libferrisperl::CanNotReadContextPcctsParseFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotDereferenceDanglingSoftLink, (void*) "libferrisperl::CanNotDereferenceDanglingSoftLink"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotMonitorDirWithFAM, (void*) "libferrisperl::CanNotMonitorDirWithFAM"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisNotReadableAsContext, (void*) "libferrisperl::FerrisNotReadableAsContext"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisImageSaveFailed, (void*) "libferrisperl::FerrisImageSaveFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisImageLoadFailed, (void*) "libferrisperl::FerrisImageLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisPNGImageLoadFailed, (void*) "libferrisperl::FerrisPNGImageLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisJPEGImageLoadFailed, (void*) "libferrisperl::FerrisJPEGImageLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisGIMPImageLoadFailed, (void*) "libferrisperl::FerrisGIMPImageLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisImlib2ImageLoadFailed, (void*) "libferrisperl::FerrisImlib2ImageLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisWaitTimedOut, (void*) "libferrisperl::FerrisWaitTimedOut"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisSqlServerNameNotFound, (void*) "libferrisperl::FerrisSqlServerNameNotFound"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__GModuleOpenFailed, (void*) "libferrisperl::GModuleOpenFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisStreamLoadFailed, (void*) "libferrisperl::FerrisStreamLoadFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCanNotCreateLeafOfLeaf, (void*) "libferrisperl::FerrisCanNotCreateLeafOfLeaf"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisOutOfMemory, (void*) "libferrisperl::FerrisOutOfMemory"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotAddExternalAttribute, (void*) "libferrisperl::CanNotAddExternalAttribute"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CurlStaticInitFailed, (void*) "libferrisperl::CurlStaticInitFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CurlEasyInitFailed, (void*) "libferrisperl::CurlEasyInitFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CurlPerformFailed, (void*) "libferrisperl::CurlPerformFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CurlStateError, (void*) "libferrisperl::CurlStateError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCurlServerNameNotFound, (void*) "libferrisperl::FerrisCurlServerNameNotFound"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__getIOStreamCloseUpdateFailed, (void*) "libferrisperl::getIOStreamCloseUpdateFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__getIOStreamCloseUpdatePermissionDenied, (void*) "libferrisperl::getIOStreamCloseUpdatePermissionDenied"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__DTDCreationFailed, (void*) "libferrisperl::DTDCreationFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__UnknownConfigLocation, (void*) "libferrisperl::UnknownConfigLocation"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__RenameFailed, (void*) "libferrisperl::RenameFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AccessDenied, (void*) "libferrisperl::AccessDenied"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__GenericError, (void*) "libferrisperl::GenericError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BadlyFormedTime, (void*) "libferrisperl::BadlyFormedTime"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BadlyFormedTimeString, (void*) "libferrisperl::BadlyFormedTimeString"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SocketOptionsException, (void*) "libferrisperl::SocketOptionsException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BackupException, (void*) "libferrisperl::BackupException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__UnknownBackupMode, (void*) "libferrisperl::UnknownBackupMode"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BackupNameWouldBeTooLong, (void*) "libferrisperl::BackupNameWouldBeTooLong"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__DVDReadException, (void*) "libferrisperl::DVDReadException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__StorageFull, (void*) "libferrisperl::StorageFull"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__QuotaStorageFull, (void*) "libferrisperl::QuotaStorageFull"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FileClipboard, (void*) "libferrisperl::FileClipboard"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CursorException, (void*) "libferrisperl::CursorException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ParseError, (void*) "libferrisperl::ParseError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ProgramSpawn, (void*) "libferrisperl::ProgramSpawn"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Db4Exception, (void*) "libferrisperl::Db4Exception"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__eetException, (void*) "libferrisperl::eetException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__GdbmException, (void*) "libferrisperl::GdbmException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__tdbException, (void*) "libferrisperl::tdbException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Db4KeyNotFound, (void*) "libferrisperl::Db4KeyNotFound"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__eetKeyNotFound, (void*) "libferrisperl::eetKeyNotFound"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__InvalidSortSpecification, (void*) "libferrisperl::InvalidSortSpecification"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ContentNotModified, (void*) "libferrisperl::ContentNotModified"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ChildNotRunning, (void*) "libferrisperl::ChildNotRunning"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__InvalidModeString, (void*) "libferrisperl::InvalidModeString"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__LDAPException, (void*) "libferrisperl::LDAPException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CompressionException, (void*) "libferrisperl::CompressionException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CompressionAlgoNotFoundException, (void*) "libferrisperl::CompressionAlgoNotFoundException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__IndexException, (void*) "libferrisperl::IndexException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FullTextIndexException, (void*) "libferrisperl::FullTextIndexException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EAIndexException, (void*) "libferrisperl::EAIndexException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BadParam, (void*) "libferrisperl::BadParam"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SchemaException, (void*) "libferrisperl::SchemaException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SchemaNotFoundException, (void*) "libferrisperl::SchemaNotFoundException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__MedallionException, (void*) "libferrisperl::MedallionException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EtagereException, (void*) "libferrisperl::EtagereException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EmblemException, (void*) "libferrisperl::EmblemException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EmblemNotFoundException, (void*) "libferrisperl::EmblemNotFoundException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CanNotAddEmblemException, (void*) "libferrisperl::CanNotAddEmblemException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchPersonalityException, (void*) "libferrisperl::NoSuchPersonalityException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchBeliefException, (void*) "libferrisperl::NoSuchBeliefException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AgentException, (void*) "libferrisperl::AgentException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AgentAlreadyExistsException, (void*) "libferrisperl::AgentAlreadyExistsException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoSuchAgentException, (void*) "libferrisperl::NoSuchAgentException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AgentOnlyHandlesOneEmblemException, (void*) "libferrisperl::AgentOnlyHandlesOneEmblemException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__XMLBase, (void*) "libferrisperl::XMLBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__XMLParseError, (void*) "libferrisperl::XMLParseError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__XMLFatalError, (void*) "libferrisperl::XMLFatalError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__dbXMLException, (void*) "libferrisperl::dbXMLException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BranchFileSystem, (void*) "libferrisperl::BranchFileSystem"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__RelativeTimeParsing, (void*) "libferrisperl::RelativeTimeParsing"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CryptoBase, (void*) "libferrisperl::CryptoBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__GPGMEInitFailed, (void*) "libferrisperl::GPGMEInitFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__BadSignature, (void*) "libferrisperl::BadSignature"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__KeylistException, (void*) "libferrisperl::KeylistException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__XMPBase, (void*) "libferrisperl::XMPBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__XMPPacketScanFailed, (void*) "libferrisperl::XMPPacketScanFailed"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__GPhoto2, (void*) "libferrisperl::GPhoto2"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__NoOpenWithContext, (void*) "libferrisperl::NoOpenWithContext"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__OpenActionIsNotDefined, (void*) "libferrisperl::OpenActionIsNotDefined"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__DBusException, (void*) "libferrisperl::DBusException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__DBusConnectionException, (void*) "libferrisperl::DBusConnectionException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__WebPhotoException, (void*) "libferrisperl::WebPhotoException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SQLiteException, (void*) "libferrisperl::SQLiteException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisHALException, (void*) "libferrisperl::FerrisHALException"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__SyntaxError, (void*) "libferrisperl::SyntaxError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FFilterSyntaxError, (void*) "libferrisperl::FFilterSyntaxError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FulltextQuerySyntaxError, (void*) "libferrisperl::FulltextQuerySyntaxError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__URLDecodeSyntaxError, (void*) "libferrisperl::URLDecodeSyntaxError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisInternalError, (void*) "libferrisperl::FerrisInternalError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisParentNotSetError, (void*) "libferrisperl::FerrisParentNotSetError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__FerrisCanNotGetScriptNameError, (void*) "libferrisperl::FerrisCanNotGetScriptNameError"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CacheHandlable, (void*) "libferrisperl::CacheHandlable"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Versioned, (void*) "libferrisperl::Versioned"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Attribute, (void*) "libferrisperl::Attribute"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom, (void*) "libferrisperl::EA_Atom"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadOnly, (void*) "libferrisperl::EA_Atom_ReadOnly"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadOnly_PassedInStream, (void*) "libferrisperl::EA_Atom_ReadOnly_PassedInStream"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadWrite, (void*) "libferrisperl::EA_Atom_ReadWrite"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_PassedInStream, (void*) "libferrisperl::EA_Atom_ReadWrite_PassedInStream"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_OpenModeCached, (void*) "libferrisperl::EA_Atom_ReadWrite_OpenModeCached"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_ReadWrite_Contents, (void*) "libferrisperl::EA_Atom_ReadWrite_Contents"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_Static, (void*) "libferrisperl::EA_Atom_Static"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__EA_Atom_RDFCacheAttribute, (void*) "libferrisperl::EA_Atom_RDFCacheAttribute"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Time__Benchmark, (void*) "libferrisperl::Benchmark"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__AI__Agent, (void*) "libferrisperl::Agent"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__fh_emblem_less, (void*) "libferrisperl::fh_emblem_less"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Times, (void*) "libferrisperl::Times"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Personality, (void*) "libferrisperl::Personality"); + SWIG_TypeClientData(SWIGTYPE_p_PrefixTrimmerOps, (void*) "libferrisperl::PrefixTrimmerOps"); + SWIG_TypeClientData(SWIGTYPE_p_PostfixTrimmerOps, (void*) "libferrisperl::PostfixTrimmerOps"); + SWIG_TypeClientData(SWIGTYPE_p_TrimmerBase, (void*) "libferrisperl::TrimmerBase"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__giStreamPosRAII, (void*) "libferrisperl::giStreamPosRAII"); + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "COMPRESS_INVALID", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::Factory::COMPRESS_INVALID))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "COMPRESS_NONE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::Factory::COMPRESS_NONE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "COMPRESS_GZIP", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::Factory::COMPRESS_GZIP))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "COMPRESS_BZIP2", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::Factory::COMPRESS_BZIP2))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_UNKNOWN))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_SCHEMA", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_SCHEMA))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_BOOL", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_BOOL))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_FLOAT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_FLOAT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_DOUBLE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_DOUBLE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_STRING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_STRING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_INT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_INT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "XSD_BASIC_INTEGER", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::XSD_BASIC_INTEGER))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_MODE_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_MODE_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UNIXEPOCH_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UNIXEPOCH_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_INODE_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_INODE_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_MIMETYPE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_MIMETYPE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_GID_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_GID_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UID_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UID_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_USERNAME", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_USERNAME))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_GROUPNAME", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_GROUPNAME))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_PID", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_PID))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_FILESIZE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_FILESIZE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_URL", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_URL))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_URL_IMPLICIT_RESOLVE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_URL_IMPLICIT_RESOLVE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_MACHINE_NAME", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_MACHINE_NAME))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_FSID_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_FSID_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_INT32", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_INT32))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UINT32", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UINT32))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_LONG", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_LONG))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_BINARY", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_BINARY))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_BINARY_RGBA32", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_BINARY_RGBA32))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_BINARY_NATIVE_EA", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_BINARY_NATIVE_EA))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_BINARY_PGMPIPE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_BINARY_PGMPIPE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_BINARY_A52PIPE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_BINARY_A52PIPE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EANAMES", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EANAMES))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_DIGEST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_DIGEST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_XMLDOCSTRING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_XMLDOCSTRING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_PIXELCOUNT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_PIXELCOUNT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_WIDTH_PIXELS", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_WIDTH_PIXELS))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_HEIGHT_PIXELS", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_HEIGHT_PIXELS))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_PRIMARY_KEY", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_PRIMARY_KEY))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_PRIMARY_KEY_REAL", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_PRIMARY_KEY_REAL))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_PRIMARY_KEY_VIRTUAL", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_PRIMARY_KEY_VIRTUAL))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_FTX_RANK", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_FTX_RANK))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_FFILTER", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_FFILTER))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_STR_IP4ADDR", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_STR_IP4ADDR))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_IP4PORT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_IP4PORT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_DISTINGUISHED_PERSON", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_DISTINGUISHED_PERSON))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_CIPHER_NAME", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_CIPHER_NAME))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_CIPHER_VERSION", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_CIPHER_VERSION))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_CIPHER_NAME_LIST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_CIPHER_NAME_LIST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_CIPHER_BITS", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_CIPHER_BITS))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_STRINGLIST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_STRINGLIST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_URLLIST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_URLLIST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UNIXEPOCH_STRING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UNIXEPOCH_STRING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_INTLIST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_INTLIST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_VERSION", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_VERSION))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_USER_COMMENT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_USER_COMMENT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_COPYRIGHT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_COPYRIGHT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_FLASH", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_FLASH))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_EXPOSURE_PROGRAM", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_EXPOSURE_PROGRAM))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UNIT_NAME_LENGTH", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UNIT_NAME_LENGTH))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_DATETIME_STRING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_DATETIME_STRING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_ENUMERATED_STRING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_ENUMERATED_STRING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_SENSING_METHOD", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_SENSING_METHOD))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_ORIENTATION", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_ORIENTATION))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_METERING_MODE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_METERING_MODE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_YCBCR_POSITIONING", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_YCBCR_POSITIONING))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_COMPRESSION", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_COMPRESSION))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_EXIF_LIGHT_SOURCE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_EXIF_LIGHT_SOURCE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_MODE_STRING_T", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_MODE_STRING_T))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_LATLONG", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_LATLONG))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_LATITUDE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_LATITUDE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_LONGITUDE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_LONGITUDE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_XLIST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_XLIST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_UINT64", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_UINT64))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXD_INT64", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXD_INT64))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXDC_READONLY", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXDC_READONLY))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXDC_IS_GENERATED", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXDC_IS_GENERATED))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "FXDC_IS_STATELESS", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::FXDC_IS_STATELESS))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "RESOLVE_CLOSEST", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::RESOLVE_CLOSEST))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "RESOLVE_PARENT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::RESOLVE_PARENT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "RESOLVE_EXACT", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::RESOLVE_EXACT))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "ENABLE_ATTRIBUTE_RESOLUTION", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::ENABLE_ATTRIBUTE_RESOLUTION))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "RESOLVEEX_UNROLL_LINKS", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Ferris::RESOLVEEX_UNROLL_LINKS))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Ferris__DesktopFileKeyNotFound, (void*) "libferrisperl::DesktopFileKeyNotFound"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ImplicitIteratorUpdateLock, (void*) "libferrisperl::ImplicitIteratorUpdateLock"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ContextIterator, (void*) "libferrisperl::ContextIterator"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__CacheManager, (void*) "libferrisperl::CacheManager"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__ContextCollection, (void*) "libferrisperl::ContextCollection"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__MutableCollectionEvents, (void*) "libferrisperl::MutableCollectionEvents"); + SWIG_TypeClientData(SWIGTYPE_p_Ferris__Util__SingleShot, (void*) "libferrisperl::SingleShot"); + ST(0) = &PL_sv_yes; + XSRETURN(1); +} + diff --git a/Ferris/libferrispython.i b/Ferris/libferrispython.i new file mode 100644 index 0000000..1d839e9 --- /dev/null +++ b/Ferris/libferrispython.i @@ -0,0 +1,49 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrispython.i,v 1.1 2005/07/04 08:57:30 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +/* libferris.i */ +%module libferrispython + +%include "typemaps.i" +%include std_list.i + +// +// python only +// +%rename(outout) Ferris::Time::Benchmark::print; + +%rename(operator_plusplus) operator++(); +%rename(operator_plusplusint) operator++(int); +%rename(operator_minusminus) operator--(); +%rename(operator_minusminusint) operator--(int); +%rename(operator_atindex) operator[]; + +%include "libferris.i" diff --git a/Ferris/libferrispython_wrap.cpp b/Ferris/libferrispython_wrap.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Ferris/libferrisxmlshared.cpp b/Ferris/libferrisxmlshared.cpp new file mode 100644 index 0000000..57f0dc6 --- /dev/null +++ b/Ferris/libferrisxmlshared.cpp @@ -0,0 +1,997 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisxmlshared.cpp,v 1.15 2010/11/12 21:30:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + using namespace std; + + /********************/ + /********************/ + /********************/ + + const std::string XMLBaseContext::dcURI = "http://purl.org/dc/elements/1.1/"; + const std::string XMLBaseContext::dcPrefix = "dc"; + + XMLBaseContext::XMLBaseContext( Context* parent, const std::string& rdn ) + : + _Base( parent, rdn ), + m_doc( 0 ), + m_publicID_attributeCreated( false ), + m_systemID_attributeCreated( false ), + m_element( 0 ) + { + } + + XMLBaseContext::~XMLBaseContext() + { + if( m_doc ) + { + LG_DOM_D << "~XMLBaseContext() dom:" << toVoid(GetImpl(m_doc)) << endl; + } + + + } + + fh_istream + XMLBaseContext::getFerrisAsXMLDocument( Context* c, const std::string& rdn, EA_Atom* atom ) + { +// fh_stringstream ret = tostream( getDocument() ); + fh_stringstream ret = tostream( *getElement() ); + return ret; + +// Factory::ensureXMLPlatformInitialized(); + +// DOMImplementation *impl = Factory::getDefaultDOMImpl(); +// fh_domdoc doc = impl->createDocument( 0, X("context"), 0 ); +// DOMElement* root = doc->getDocumentElement(); + +// typedef AttributeCollection::AttributeNames_t::iterator I; +// AttributeCollection::AttributeNames_t an; +// c->getAttributeNames( an ); + +// for( I ai = an.begin(); ai != an.end(); ++ai ) +// { +// string k = *ai; +// if( k == "content" ) +// continue; +// if( k == "as-xml" ) +// continue; +// if( k == "as-rdf" ) +// continue; + +// try +// { +// string v = getStrAttr( c, k, "", true, true ); + +// DOMElement* e = doc->createElement( X("keyval") ); +// root->appendChild( e ); +// ::Ferris::setAttribute( e, "key", k ); +// // setAttribute( e, "value", v ); +// DOMText* payload = doc->createTextNode( X(v.c_str())); +// e->appendChild( payload ); +// } +// catch( exception& e ) +// { +// } +// } + +// fh_stringstream retss = tostream( doc ); +// return retss; + + } + + void + XMLBaseContext::WrapDOMTree( DOMNode* node, + fh_xmlbc parent, + string new_node_name, + RootContextFactory* rf ) + throw( RootContextCreationFailed ) + { + LG_XML_D << "WrapDOMTree path : " << getDirPath() << endl; + LG_XML_D << "WrapDOMTree newname: " << new_node_name << endl; + + const XMLCh* Name = node->getNodeName(); + const XMLCh* Value = node->getNodeValue(); + unsigned long NameLen = XMLString::stringLen( Name ); + unsigned long ValueLen = XMLString::stringLen( Value ); + + switch (node->getNodeType()) + { + case DOMNode::TEXT_NODE: + { + DOMText* x = (DOMText*)node; + + LG_XML_D + << "DOMNode::TEXT_NODE: Name :" << tostr( Name ) << endl + << "DOMNode::TEXT_NODE: value:" << tostr( Value ) << endl + << "DOMNode::TEXT_NODE: valueLen:" << tostr( Value ).length() << endl; +// fh_xmlbc c = (XMLBaseContext*)CreateContext( parent, parent->monsterName(tostr(Name)) ); +// parent->Insert( c ); + LG_XML_D << "DOMNode::TEXT_NODE: parent:" << parent->getDirName() << endl + << "DOMNode::TEXT_NODE: parent:" << parent->getDirPath() << endl; + + if( !x->isIgnorableWhitespace() ) + { +// fh_xmlbc c = parent->ensureCreated( new_node_name ); +// c->FileContents = tostr( Value ); + +// parent->FileContents = tostr( Value ); +// cerr << "Just set text node contents to:" <FileContents<getFirstChild(); + while( child != 0 ) + { + WrapDOMTree( child, parent, tostr(Name), rf ); + child = child->getNextSibling(); + } + break; + } + + + case DOMNode::ELEMENT_NODE: + { + string element_rdn = tostr(Name); + DOMNamedNodeMap* attributes = node->getAttributes(); + + if( !tostr(node->getLocalName()).empty() ) + element_rdn = tostr(node->getLocalName()); + + LG_XML_D << "DOMNode::ELEMENT_NODE: Name:" << element_rdn << endl + << " local:" << tostr(node->getLocalName()) << endl + << " nsURI:" << tostr(node->getNamespaceURI()) << endl + << " nsPRE:" << tostr(node->getPrefix()) << endl +// << "DOMNode::ELEMENT_NODE: Value:" << tostr(Value) << endl + << "DOMNode::ELEMENT_NODE: attr size:" << attributes->getLength() << endl; + + m_attrs.clear(); + if( !tostr(node->getNamespaceURI()).empty() ) + m_attrs[ "ferris-element-namespace-uri" ] = tostr(node->getNamespaceURI()); + + int attrCount = attributes->getLength(); + for (int i = 0; i < attrCount; i++) + { + DOMNode* attribute = attributes->item(i); + const string& n = tostr(attribute->getNodeName()); + const string& v = tostr(attribute->getNodeValue()); + m_attrs[ n ] = v; + + LG_XML_D << "DOMNode forall(attrs) node_name:" << tostr(attribute->getNodeName()) << endl + << " local:" << tostr(attribute->getLocalName()) << endl + << " nsURI:" << tostr(attribute->getNamespaceURI()) << endl + << " nsPRE:" << tostr(attribute->getPrefix()) << endl; + } + + typedef m_attributesThatCanNameNode_t::iterator I; + for( I i = getAttributesThatCanNameNode().begin(); + i != getAttributesThatCanNameNode().end(); + i++ ) + { + if( m_attrs.find( *i ) != m_attrs.end() ) + { + if( !m_attrs[*i].empty() ) + { + LG_XML_D << "Renaming node:" << element_rdn + << " to:" << m_attrs[*i] + << endl; + element_rdn = m_attrs[*i]; +// sleep(4); + break; + } + } + } + + fh_xmlbc xmlctx = parent->ensureCreated( parent->monsterName(element_rdn), (DOMElement*)node ); +// xmlctx->setElement( (DOMElement*)node ); + + if( xmlctx->getDirName() != element_rdn ) + { + string rdn = xmlctx->getDirName(); + string elementNum = rdn.substr( element_rdn.length() + 2 ); + xmlctx->addAttribute( "libferris-element-name", element_rdn ); + xmlctx->addAttribute( "libferris-element-number", elementNum ); + } + else + { + xmlctx->addAttribute( "libferris-element-name", element_rdn ); + xmlctx->addAttribute( "libferris-element-number", "0" ); + } + + + for( m_attrs_t::iterator iter = m_attrs.begin(); + iter != m_attrs.end(); + iter++ ) + { + const string& n = iter->first; + const string& v = iter->second; + LG_XML_D << "ATTR NAME1:" << n << " VALUE:" << v << endl; +// xmlctx->setStaticEA( n, v ); + xmlctx->addAttribute( n, + xmlctx, &_Self::getEA, + xmlctx, &_Self::getEA, + xmlctx, &_Self::EAUpdated, + XSD_UNKNOWN ); + LG_XML_D << "ATTR NAME2:" << n << " VALUE:" << v << endl; + } + if( m_attrs.find( "url" ) != m_attrs.end() ) + { + string n = "ferris-xml-url"; + xmlctx->m_attrs[ n ] = m_attrs["url"]; + xmlctx->addAttribute( n, + xmlctx, &_Self::getEA, + xmlctx, &_Self::getEA, + xmlctx, &_Self::EAUpdated, + XSD_BASIC_STRING ); + + LG_DOM_D << "setup() c:" << xmlctx->getURL() + << " e:" << toVoid(xmlctx->getElement()) + << " c->v:" << xmlctx->m_attrs["ferris-xml-url"] + << endl; + + } + + + xmlctx->addAttribute( "libferris-tree-as-xml", + xmlctx, &_Self::getFerrisAsXMLDocument ); + + + for( DOMNode* child = node->getFirstChild(); + child != 0; + child = child->getNextSibling()) + { + WrapDOMTree( child, xmlctx, element_rdn, rf ); + } + + +// /* +// * If the element has a text component then add that as the content +// * if this context. +// */ +// for( DOMNode* child = node.getFirstChild(); +// child != 0; +// child = child.getNextSibling()) +// { +// if( child.getNodeType() == TEXT_NODE ) +// { +// DOMText* x = (DOMText*)child; +// if( !x.isIgnorableWhitespace() ) +// { + +// } +// break; +// } +// } + + break; + } + + case DOMNode::ENTITY_REFERENCE_NODE: + { + LG_XML_D << "DOMNode::ENTITY_REFERENCE_NODE: Value:" << tostr(Name) << endl + << "DOMNode::ENTITY_REFERENCE_NODE: Value:" << tostr(Value) << endl; + DOMNode* child; + break; + } + + + case DOMNode::CDATA_SECTION_NODE: + { + LG_XML_D << "DOMNode::CDATA_SECTION_NODE: Value:" << tostr(Value) << endl; + +// *gFormatter << XMLFormatter::NoEscapes << gStartCDATA +// << nodeValue << gEndCDATA; + break; + } + + + case DOMNode::COMMENT_NODE: + { + LG_XML_D << "DOMNode::COMMENT_NODE: Value:" << tostr(Value) << endl; + +// *gFormatter << XMLFormatter::NoEscapes << gStartComment +// << nodeValue << gEndComment; + break; + } + + + case DOMNode::DOCUMENT_TYPE_NODE: + { + DOMDocumentType* x = (DOMDocumentType*)node; + LG_XML_D << "DOMNode::DOCUMENT_TYPE_NODE: Value:" << tostr(Value) << endl; + + if( x->getPublicId() ) + parent->setPublicID( tostr(x->getPublicId()) ); + if( x->getSystemId() ) + parent->setSystemID( tostr(x->getSystemId()) ); + if( x->getInternalSubset() ) + parent->m_internalSubset = tostr( x->getInternalSubset() ); + + parent->addAttribute( "internal-subset", + parent, &XMLBaseContext::getInternalSubsetStream, + XSD_BASIC_STRING, + true ); + break; + } + + + case DOMNode::ENTITY_NODE: + { + DOMEntity* x = (DOMEntity*)node; + LG_XML_D << "DOMNode::ENTITY_NODE: Value:" << tostr(Value) << endl; + + if( x->getPublicId() ) + parent->setPublicID( tostr(x->getPublicId()) ); + if( x->getSystemId() ) + parent->setSystemID( tostr(x->getSystemId()) ); + if( x->getNotationName() ) + parent->m_notationName = tostr( x->getNotationName() ); + + parent->addAttribute( "notation-name", + parent, &XMLBaseContext::getNotationNameStream, + XSD_BASIC_STRING, + true ); + break; + } + + +// case DOMNode::XML_DECL_NODE: +// { +// DOM_XMLDecl& x = (DOM_XMLDecl&)node; +// LG_XML_D << "DOMNode::XML_DECL_NODE: Value:" << tostr(Value) << endl; + +// parent->Version = tostr( x.getVersion() ); +// if( tostr(x.getEncoding()).length() ) +// { +// parent->Encoding = tostr( x.getEncoding() ); +// } +// parent->StandAlone = tostr( x.getStandalone() ); + +// parent->setStaticEA( "version", parent->Version ); +// parent->setStaticEA( "encoding", parent->Encoding ); +// parent->setStaticEA( "stand-alone", parent->StandAlone ); +// break; +// } + + + default: + LG_XML_D << "Unrecognized node type = " + << (long)node->getNodeType() << endl; + } + } + + + /********************/ + /********************/ + /********************/ + +// void +// handleBadDeclaration( fh_stringstream& ret ) +// { +// string s; +// getline( ret, s ); +// LG_XML_D << "first line:" << s << endl; +// if( starts_with( s, "<" )) +// { +// LG_XML_D << "BAD first line:" << s << endl; +// fh_stringstream ss; +// ss << "\n"; +// ss << "<"; + +// ss << s.substr( strlen("<") ) << endl; +// copy( istreambuf_iterator(ret), +// istreambuf_iterator(), +// ostreambuf_iterator(ss)); +// ss.clear(); +// ss.seekg(0); +// ss.clear(); +// LG_XML_D << "BAD first line NEW STREAM sz:" << tostr(ss).size() << endl; +// LG_XML_D << "BAD first line NEW STREAM doc:" << tostr(ss) << endl; +// ret = ss; +// } + +// ret.clear(); +// ret.seekg(0); +// ret.clear(); +// } + + + fh_stringstream + XMLBaseContext::real_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + exception) + { + fh_stringstream ss; + +// if( m & ios_base::trunc ) +// { +// return ss; +// } +// cerr << "XMLBaseContext::real_getIOStream() is base:" << ( getBaseContext() == this ) << endl; + + if( getBaseContext() == this ) + { + LG_XML_D << "XMLBaseContext::real_getIOStream() this==base doc:" << toVoid(getDocument()) << endl; + fh_stringstream ret = tostream( getDocument() ); + LG_XML_D << "XMLBaseContext::real_getIOStream(end) url:" << getURL() + << " sz:" << tostr(ret).size() << endl; + LG_XML_D << "DOCUMENT:" << tostr(ret) << "---END-OF-DOC---" << endl; +// handleBadDeclaration( ret ); +// LG_XML_D << "XMLBaseContext::real_getIOStream(end) url:" << getURL() +// << " sz:" << tostr(ret).size() << endl; +// LG_XML_D << "DOCUMENT:" << tostr(ret) << "---END-OF-DOC---" << endl; + return ret; + } + else + { + LG_XML_D << "XMLBaseContext::real_getIOStream() this!=base" << endl; + + DOMElement* element = getElement(); + + LG_XML_D << "element:" << element << endl; + if( element->getNodeName() ) + LG_XML_D << "element name:" << tostr(element->getNodeName()) << endl; + + // This doesn't count when path only contains one item +// if( getDocument()->getDocumentElement() == element ) +// { +// cerr << "Serious bug..." << endl; +// cerr << "XMLBaseContext::real_getIOStream() is base:" << ( getBaseContext() == this ) << endl; +// cerr << "XMLBaseContext::real_getIOStream() url:" << ( getURL() ) << endl; +// cerr << "XMLBaseContext::real_getIOStream() root:" << ( getDocument()->getDocumentElement() ) << endl; +// cerr << "XMLBaseContext::real_getIOStream() element:" << ( getElement() ) << endl; +// cerr << "XMLBaseContext::real_getIOStream() element-name:" << ( ::Ferris::getAttribute( getElement(), "name" ) ) << endl; +// cerr << "XMLBaseContext::real_getIOStream() element-url:" << ( ::Ferris::getAttribute( getElement(), "url" ) ) << endl; +// { +// int i=0; +// for( DOMNode* child = getElement()->getFirstChild(); +// child != 0; child = child->getNextSibling()) +// ++i; + +// cerr << "XMLBaseContext::real_getIOStream() children:" << ( i ) << endl; + +// } +// } + + + LG_XML_D << "XMLBaseContext::real_getIOStream() url:" << getURL() << " start walk..." << endl; + for( DOMNode* child = element->getFirstChild(); child != 0; child = child->getNextSibling()) + { + LG_XML_D << "XMLBaseContext::real_getIOStream() nodetype:" << child->getNodeType() + << " name:" << tostr(child->getNodeName()) + << endl; +// if( tostr(child->getNodeName()) == "text:p" ) +// { +// for( DOMNode* c2 = child->getFirstChild(); c2 != 0; c2 = c2->getNextSibling()) +// { +// LG_XML_D << "XMLBaseContext::real_getIOStream() c2.nodetype:" << c2->getNodeType() +// << " c2.name:" << tostr(c2->getNodeName()) +// << endl; +// if( c2->getNodeType() == DOMNode::TEXT_NODE ) +// { +// LG_XML_D << "text content:" << tostr(c2->getNodeValue()) << endl; +// } +// } +// } + + if( child->getNodeType() == DOMNode::TEXT_NODE ) + { +// if( !XMLString::isWSCollapsed( child->getNodeValue() ) ) + { + LG_XML_D << "XMLBaseContext::real_getIOStream() url:" << getURL() << " text child:" + << tostr(child->getNodeValue()) << ":" << endl; + ss << tostr(child->getNodeValue()); + } + } + } + LG_XML_D << "XMLBaseContext::real_getIOStream() url:" << getURL() << " end walk..." << endl; + } + ss.clear(); + ss.seekp( 0 ); + LG_XML_D << "XMLBaseContext::real_getIOStream(end) url:" << getURL() << " sz:" << tostr(ss).size() << endl; + return ss; + + +// f_stringstream ret(FileContents); +// return ss; + } + + fh_istream + XMLBaseContext::priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception) + { + LG_XSLTFS_D << "XMLBaseContext::priv_getIStream() this:" << toVoid(this) + << " url:" << getURL() << endl; + LG_XML_D << "XMLBaseContext::priv_getIStream() this:" << toVoid(this) + << " url:" << getURL() << endl; + fh_stringstream ret = real_getIOStream( m ); + LG_XML_D << "XMLBaseContext::priv_getIStream() ret.sz:" << tostr(ret).size() + << " ret:" << tostr(ret) << "---END-OF-DOC---" << endl; +// { +// ofstream o("/tmp/dump111111"); +// o << tostr(ret); +// o << flush; +// } + + return ret; + } + + + + void + XMLBaseContext::OnStreamClosed( fh_istream& ss, std::streamsize tellp, ferris_ios::openmode m ) + { + LG_XML_D << "OnStreamClosed() url:" << getURL() << endl; + LG_XML_D << "OnStreamClosed() ferris_ios::openmode:" << (long)m << endl; + LG_XML_D << "OnStreamClosed() ferris_ios::openmode::out:" << (long)std::ios::out << endl; + LG_XML_D << "OnStreamClosed() ferris_ios::openmode::is-out:" << (long)(m & std::ios::out) << endl; + if( !(m & std::ios::out) ) + return; + + AdjustForOpenMode_Closing( ss, m, tellp ); + const string s = StreamToString(ss); + LG_XML_D << "OnStreamClosed() len:" << s.length() << " s:" << s << " tellp:" << tellp << endl; + + +// FileContents = s; + +// cerr << "XMLBaseContext::OnStreamClosed() len:" << s.length() +// << " looking for txt node" << endl; + +// /* PURE DEBUG */ +// { +// DOMNodeList* nl = getElement()->getChildNodes(); +// cerr << "child count:" << nl->getLength(); + +// cerr << " name :" << tostr( getElement()->getNodeName() ) << endl; +// cerr << " value:" << tostr( getElement()->getNodeValue() ) << endl; +// } + + if( getBaseContext() == this ) + { + LG_XML_D << "XMLBaseContext::OnStreamClosed() newdoc:" << s << endl; + + fh_stringstream tmp; + tmp << s; + m_doc = Factory::StreamToDOM( tmp ); + clearContext(); + WrapDOMTree( GetImpl(m_doc), this, "", 0 ); + } + else + { +// { +// fh_stringstream ss = tostream( getBaseContext()->m_doc ); +// LG_XSLTFS_D << "dom before changes.:" << tostr(ss) << endl; +// } + + DOMElement* element = getElement(); + XML::removeAllTextChildren( element ); + + LG_XML_D << "OnStreamClosed() removed text children" << endl; + + if( !s.empty() ) + { + DOMText* t = getDocument()->createTextNode( X(s.c_str()) ); + element->appendChild( t ); + LG_XML_D << "OnStreamClosed() added text child for s:" << s << endl; + syncTree(); + if( shouldPerformFullJournaling() ) + Factory::getPluginOutOfProcNotificationEngine().signalContextChanged( this, s ); + + LG_XML_D << "OnStreamClosed() completed changes child for s:" << s << endl; +// { +// fh_stringstream ss = tostream( getBaseContext()->m_doc ); +// LG_XSLTFS_D << "dom after changes.:" << tostr(ss) << endl; +// } + + return; + } + + +// bool setValue = false; +// for( DOMNode* child = element->getFirstChild(); +// child != 0; child = child->getNextSibling()) +// { +// if( child->getNodeType() == DOMNode::TEXT_NODE ) +// { +// DOMText* x = (DOMText*)child; + +// if( setValue ) +// { +// if( !XMLString::isAllWhiteSpace( child->getNodeValue() ) ) +// { +// x->setData( X("") ); +// } +// } +// else +// { +// x->setData( X(s.c_str()) ); +// setValue = true; +// } +// cerr << "OnStreamClosed(setting existing node) len:" << s.length() << " s:" << s +// << " setValue:" << setValue << endl; + +// } +// } +// cerr << "OnStreamClosed(maybe add?) len:" << s.length() << " s:" << s +// << " setValue:" << setValue << endl; + +// if( !setValue ) +// { +// DOMText* t = getDocument()->createTextNode( X(s.c_str()) ); +// element->appendChild( t ); +// } + } + + + syncTree(); + } + + + fh_iostream + XMLBaseContext::priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception) + { + LG_XML_D << "XMLBaseContext::priv_getIOStream()" << endl; +// BackTrace(); + fh_stringstream ret = real_getIOStream( m ); + ret->getCloseSig().connect( bind( sigc::mem_fun(*this, &_Self::OnStreamClosed ), m )); + return ret; + } + + /********************/ + /********************/ + /********************/ + + void + XMLBaseContext::priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ) + { + m["dir"] = SubContextCreator(xmlbase_SubCreate_element, + " \n" + " \n" + " \n" + " \n" + " \n"); + m["element"] = SubContextCreator(xmlbase_SubCreate_element, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + m["file"] = SubContextCreator(xmlbase_SubCreate_element, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + m["ea"] = SubContextCreator( xmlbase_SubCreate_attribute, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + + m["attribute"] = SubContextCreator( xmlbase_SubCreate_attribute, + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + } + + fh_context + XMLBaseContext::xmlbase_SubCreate_element( fh_context c, fh_context md ) + { + LG_XML_D << "SL_xml_SubCreate_element() c:" << c->getURL() << endl; + + if( fh_xmlbc xmlc = dynamic_cast(GetImpl(c))) + { + string rdn = getStrSubCtx( md, "name", "" ); + string content = getStrSubCtx( md, "content", "" ); + + LG_XML_D << "SL_xml_SubCreate_element() c:" << c->getURL() + << " rdn:" << rdn + << endl; + + DOMElement* pe = xmlc->getElement(); + if( !pe ) + { + if( xmlc->getBaseContext() == GetImpl(c) ) + { + fh_stringstream ss; + ss << "Can not create more than one root element in an XML document!" + << "URL:" << c->getURL() + << " child-name:" << rdn + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + fh_stringstream ss; + ss << "Parent element has no XML node!" + << "URL:" << c->getURL() + << " child-name:" << rdn + << endl; + Throw_FerrisCreateSubContextFailed( tostr(ss), GetImpl(c) ); + } + DOMElement* ne = xmlc->getDocument()->createElement( X(rdn.c_str()) ); + pe->appendChild( ne ); + if( content.length() ) + { + DOMText* t = xmlc->getDocument()->createTextNode( X( content.c_str() ) ); + ne->appendChild( t ); + } +// cerr << "TESTING1!. v:" << ::Ferris::getAttribute( ne, rdn ) << endl; + + fh_xmlbc ret = xmlc->ensureCreated( rdn, ne ); +// ret->setElement( ne ); +// ret->FileContents = content; + + + + xmlc->syncTree(); + + + LG_XML_D << "SL_xml_SubCreate_element() fire context created:" << ret->getURL() << endl; + if( xmlc->shouldPerformFullJournaling() ) + Factory::getPluginOutOfProcNotificationEngine().signalContextCreated( ret, content ); + + return ret; + } + + fh_stringstream ss; + ss << "Attempt to create XML element failed!" + << " url:" << c->getURL() + << endl; + LG_XML_D << tostr(ss); + Throw_FerrisCreateSubContextNotSupported( tostr(ss), GetImpl(c) ); + } + + bool + XMLBaseContext::shouldPerformFullJournaling() + { + return false; + } + + void + XMLBaseContext::addNewAttribute( const std::string& prefix, + const std::string& rdn, + XSDBasic_t sct ) + { + addAttribute( rdn, + this, &_Self::getEA, + this, &_Self::getEA, + this, &_Self::EAUpdated, + sct ); + } + + fh_context + XMLBaseContext::xmlbase_SubCreate_attribute( fh_context c, fh_context md ) + { + LG_XML_D << "SL_xml_SubCreate_attribute() c:" << c->getURL() << endl; + + if( fh_xmlbc xmlc = dynamic_cast(GetImpl(c))) + { + string rdn = getStrSubCtx( md, "name", "" ); + string v = getStrSubCtx( md, "value", "", true ); + string namespaceURI = getStrSubCtx( md, "namespace", "" ); + + LG_XML_D << "SL_xml_SubCreate_attribute() c:" << c->getURL() + << " rdn:" << rdn + << " v:" << v + << endl; + + DOMElement* e = xmlc->getElement(); + if( !e ) + { + LG_ATTR_D << "no element... cc:" << xmlc->getCC() + << " this:" << dynamic_cast(GetImpl(c)) + << " cc.url:" << xmlc->getCC()->getURL() + << endl; + + if( xmlc->getCC() != dynamic_cast(GetImpl(c)) ) + { + Shell::createEA( xmlc->getCC(), rdn, v, true ); + return c; + } + + stringstream ss; + ss << "Can not create attribute on context c:" << c->getURL() << " EA:" << rdn << endl; + Throw_FerrisCreateAttributeFailed( ss.str(), 0 ); + } + + ::Ferris::setAttributeNS( e, namespaceURI, rdn, v ); +// cerr << "SL_xml_SubCreate_attribute(2) c:" << c->getURL() +// << " rdn:" << rdn +// << " v:" << v +// << endl; + + xmlc->addNewAttribute( namespaceURI, + rdn, + XSD_BASIC_STRING ); +// xmlc->addAttribute( rdn, +// xmlc, &_Self::getEA, +// xmlc, &_Self::getEA, +// xmlc, &_Self::EAUpdated, +// XSD_BASIC_STRING ); +// cerr << "SL_xml_SubCreate_attribute(3) c:" << c->getURL() +// << " rdn:" << rdn +// << " v:" << v +// << endl; + + xmlc->syncTree(); + +// cerr << "SL_xml_SubCreate_attribute(4) c:" << c->getURL() +// << " rdn:" << rdn +// << " v:" << v +// << endl; + + if( xmlc->shouldPerformFullJournaling() ) + Factory::getPluginOutOfProcNotificationEngine().signalEACreated( c, rdn ); + } + + return c; + } + + /********************/ + /********************/ + /********************/ + + + + fh_iostream + XMLBaseContext::getEA( Context* _c, const std::string& rdn, EA_Atom* atom ) + { + + if( _Self* c = dynamic_cast<_Self*>( _c )) + { + DOMElement* e = c->getElement(); + + LG_DOM_D << "getEA(0) doc:" << getDocument() << endl; + LG_DOM_D << "getEA(1) c:" << c->getURL() + << " rdn:" << rdn + << " e:" << toVoid(e) + << endl; + LG_DOM_D << "getEA(2) c:" << c->getURL() + << " e:" << toVoid(e) + << " e-owner-doc:" << e->getOwnerDocument() + << endl; + + if( rdn == "ferris-xml-url" ) + { + LG_DOM_D << "getEA(3) c:" << c->getURL() + << " e:" << toVoid(e) + << " e-owner-doc:" << e->getOwnerDocument() + << endl; + + if( XMLBaseContext* pc = dynamic_cast(c)) + { + LG_DOM_D << "getEA(4) c:" << c->getURL() + << " e:" << toVoid(e) + << " c->v:" << pc->m_attrs["ferris-xml-url"] + << endl; + fh_stringstream ss; + ss << pc->m_attrs["ferris-xml-url"]; + return ss; + } + + +// if( isParentBound() ) +// { +// if( XMLBaseContext* pc = dynamic_cast(c->getParent())) +// { +// LG_DOM_D << "getEA(5) c:" << c->getURL() +// << " e:" << toVoid(e) +// << " pc->v:" << pc->m_attrs["ferris-xml-url"] +// << endl; + +// fh_stringstream ss; +// ss << pc->m_attrs["ferris-xml-url"]; +// return ss; +// } +// } + } + + fh_stringstream ss; + ss << ::Ferris::getAttribute( e, rdn ); + return ss; + } + } + + + void + XMLBaseContext::EAUpdated( Context* _c, const std::string& rdn, EA_Atom* atom, fh_istream iss ) + { + LG_XML_D << "EAUpdated(1) c:" << _c->getURL() << endl; + + if( _Self* c = dynamic_cast<_Self*>( _c )) + { + DOMElement* e = c->getElement(); + + LG_DOM_D << "EAUpdated(1) c:" << c->getURL() + << " e:" << toVoid(e) + << " rdn:" << rdn << endl; + + std::string v = StreamToString( iss ); + ::Ferris::setAttribute( e, rdn, v ); + + LG_DOM_D << "EAUpdated(2) c:" << c->getURL() + << " e:" << toVoid(e) + << " rdn:" << rdn + << " v:" << v + << endl; + + c->syncTree(); + + LG_DOM_D << "EAUpdated(3) c:" << c->getURL() + << " e:" << toVoid(e) + << endl; + } + } + + +}; + diff --git a/Ferris/libferrisxmlshared.hh b/Ferris/libferrisxmlshared.hh new file mode 100644 index 0000000..0fdacd2 --- /dev/null +++ b/Ferris/libferrisxmlshared.hh @@ -0,0 +1,477 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisxmlshared.hh,v 1.10 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_XML_SHARED_H_ +#define _ALREADY_INCLUDED_FERRIS_XML_SHARED_H_ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define STRING_OR_EMPTY( x ) (x) ? (x) : (XMLCh*)""; +#define X(str) XStr(str).unicodeForm() + +namespace Ferris +{ + using namespace std; + using namespace XERCES_CPP_NAMESPACE; + + class XMLBaseContext; + FERRIS_CTX_SMARTPTR( XMLBaseContext, fh_xmlbc ); + class XMLContext; + + + /** + * Base context for all things that expose a Xerces DOM. + * Current examples are mounting XML and mounting dbxml. + * + * This class handles converting rename/create/remove/read/write + * from libferris style interaction to xerces-c DOM interaction. + * + * Sublcasses only really have to handle: + * 1) create new context objects with ensureCreated() + * 2) somehow generate an xerces-c DOM and pass it to WrapDOMTree() + * 3) somehow save entire DOM to disk when priv_syncTree() is called. + */ + class FERRISEXP_EXPORT XMLBaseContext + : + public RecommendedEACollectingContext + { + typedef XMLBaseContext _Self; + typedef RecommendedEACollectingContext _Base; + friend class XMLContext; + + Context* priv_CreateContext( Context* parent, std::string rdn ) = 0; + + /** + * This is only valid in the base context. access it only via getDocument() + */ + fh_domdoc m_doc; + + bool m_publicID_attributeCreated; + bool m_systemID_attributeCreated; + + std::string m_publicID; + std::string m_systemID; + std::string m_internalSubset; + std::string m_notationName; + + typedef std::map< std::string, std::string, Nocase> m_attrs_t; + m_attrs_t m_attrs; + + DOMElement* m_element; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void setPublicID( const std::string& s ) + { + m_publicID = s; + + if( !m_publicID_attributeCreated ) + { + m_publicID_attributeCreated = true; + addAttribute( "public-id", + this, + &_Self::getPublicIDStream, + XSD_BASIC_STRING, + true ); + } + } + + void setSystemID( const std::string& s ) + { + m_systemID = s; + + if( !m_systemID_attributeCreated ) + { + m_systemID_attributeCreated = true; + addAttribute( "system-id", + this, + &_Self::getSystemIDStream, + XSD_BASIC_STRING, + true ); + } + } + + + std::string getPublicID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return m_publicID; + } + + fh_istream getPublicIDStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << m_publicID; + return ss; + } + + std::string getSystemID( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return m_systemID; + } + + fh_istream getSystemIDStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << m_systemID; + return ss; + } + + std::string getInternalSubset( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return m_internalSubset; + } + + fh_istream getInternalSubsetStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << m_internalSubset; + return ss; + } + + std::string getNotationName( Context* c, const std::string& rdn, EA_Atom* atom ) + { + return m_notationName; + } + + fh_istream getNotationNameStream( Context* c, const std::string& rdn, EA_Atom* atom ) + { + fh_stringstream ss; + ss << m_notationName; + return ss; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + typedef std::list< std::string > m_attributesThatCanNameNode_t; + + /** + * Get a list of which attribute an element can have that can give a + * name for this node in the filesystem + */ + virtual m_attributesThatCanNameNode_t& + getAttributesThatCanNameNode() + { + static m_attributesThatCanNameNode_t ret; + + if( ret.empty() ) + { + ret.push_back( "title" ); + ret.push_back( "name" ); + ret.push_back( "rdn" ); + ret.push_back( "dn" ); + ret.push_back( "id" ); + } + + return ret; + } + + void OnStreamClosed( fh_istream& ss, std::streamsize tellp, ferris_ios::openmode m ); + virtual fh_stringstream real_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + std::exception); + virtual fh_istream priv_getIStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + CanNotGetStream, + std::exception); + virtual fh_iostream priv_getIOStream( ferris_ios::openmode m ) + throw (FerrisParentNotSetError, + AttributeNotWritable, + CanNotGetStream, + std::exception); + + virtual bool supportsRemove() + { + return true; + } + + virtual void priv_remove( fh_context c_ctx ) + { + std::string olddn = c_ctx->getDirName(); + + XMLBaseContext* c = dynamic_cast( (GetImpl(c_ctx) ) ); + if( !c ) + { + fh_stringstream ss; + ss << "Attempt to remove a non xml context from XML file! url:" << c_ctx->getURL(); + Throw_CanNotDelete( tostr(ss), GetImpl(c_ctx) ); + } + std::string url = c->getURL(); + LG_XML_D << "remove() url:" << url << endl; + + try + { + DOMElement* parent = this->getElement(); + DOMElement* child = c->getElement(); + parent->removeChild( child ); + } + catch (const XMLException& e) + { + std::ostringstream ss; + ss << "Can not delete child:" << url + << " reason:" << tostr(e.getMessage()) << endl; + Throw_CanNotDelete( tostr(ss), 0 ); + } + + syncTree(); + + if( shouldPerformFullJournaling() ) + Factory::getPluginOutOfProcNotificationEngine().signalContextDeleted( this, olddn ); + } + + void priv_FillCreateSubContextSchemaParts( CreateSubContextSchemaPart_t& m ); + static fh_context xmlbase_SubCreate_element( fh_context c, fh_context md ); + static fh_context xmlbase_SubCreate_attribute( fh_context c, fh_context md ); + + protected: + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** Methods that subclasses must override for the module to work ***************/ + /********************************************************************************/ + + /** + * When something has changed in the DOM this method is called so that the + * module can write the DOM back to disk. This method is only ever called + * on the base of the XML tree which should also be the context that owns + * the DOMDocument. + */ + virtual void priv_syncTree( bool force = false ) = 0; + + /** + * When WrapDOMTree() and other methods discover or create + * an element in the DOM the subclass must create a new instance + * of itself. The rdn is always the relative name for the new context + * and can only ever be a direct child of the Context it is called on. + * See libxml.cpp for an example of it. + * + * @param rdn name for new child context. + */ + virtual fh_xmlbc ensureCreated( const std::string& rdn, DOMElement* e ) = 0; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /*** Methods that subclasses may override for the module to work ****************/ + /********************************************************************************/ + + /** + * Should this XML tree perform full metadata+data journaling across processes? + */ + virtual bool shouldPerformFullJournaling(); + + /** + * Called to attach the read/write handlers for a new attribute which the user + * created. This gives subclasses the ability to put the attribute into a custom + * namespaceURI in the storage. + */ + virtual void addNewAttribute( const std::string& prefix, + const std::string& rdn, + XSDBasic_t sct = XSD_UNKNOWN ); + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static const std::string dcURI; + static const std::string dcPrefix; + + XMLBaseContext( Context* parent, const std::string& rdn ); + + public: + virtual ~XMLBaseContext(); + Context* getCC() + { + return _Base::getCoveredContext(); + } + + + protected: + /** + * The main method for this class. Takes a top level DOM and creates wrappers + * for all of that DOMs elements and attributes for the ferris world. + */ + void WrapDOMTree( DOMNode* node, + fh_xmlbc parent, + std::string new_node_name, + RootContextFactory* rf ) + throw( RootContextCreationFailed ); + + /** + * call priv_syncTree() on the base context + */ + void syncTree( bool force = false ) + { + if( getBaseContext() != this ) + { + getBaseContext()->syncTree( force ); + return; + } + LG_DOM_D << "syncTree() doc:" << getDocument() << endl; + priv_syncTree( force ); + } + + + XMLBaseContext* getBaseContext() + { + XMLBaseContext* c = dynamic_cast( this ); + + while( c && c->isParentBound() ) + { + Context* p = c->getParent()->getOverMountContext(); + if(XMLBaseContext* nextc = dynamic_cast( p )) + { + c = nextc; + } + else + { + return c; + } + } + return c; + } + + + std::string xmlFileName() + { + XMLBaseContext* c = getBaseContext(); + std::string s = c->getDirPath(); + return s; + } + + public: + fh_domdoc getDocument() + { +// cerr << "xmlbase::getDoc() base:" << toVoid( getBaseContext() ) << endl; +// cerr << " m_doc:" << getBaseContext()->m_doc << endl; + if( !getBaseContext()->m_doc ) + getBaseContext()->read(); +// cerr << " m_doc2:" << getBaseContext()->m_doc << endl; + + return getBaseContext()->m_doc; + } + + protected: + void setDocument( fh_domdoc d ) + { + getBaseContext()->m_doc = d; + } + + void setElement( DOMElement* e ) + { + m_element = e; + } + + DOMElement* getElement() + { + return m_element; + } + + + + /** + * FIXME: for this to be able to be stateless then each child of XMLBaseContext + * has to inherit us through a StatelessHolder context. + */ + void setStaticEA( const std::string& k, const std::string& v ) + { + try + { + LG_XML_D << "adding to :" << getDirPath() + << " attr k:" << k << " v:" << v + << endl; + + addAttribute( k, v, XSD_BASIC_STRING, true ); + } + catch(...) + {} + } + + + fh_iostream getEA( Context* _c, const std::string& rdn, EA_Atom* atom ); + void EAUpdated( Context* _c, const std::string& rdn, EA_Atom* atom, fh_istream iss ); + + + + fh_istream getFerrisAsXMLDocument( Context* _c, const std::string& rdn, EA_Atom* atom ); + + + virtual void priv_read() + { + updateMetaData(); + LG_XML_D << "XMLBaseContext::priv_read() path :" << getDirPath() << endl; + emitExistsEventForEachItemRAII _raii1( this ); +// EnsureStartReadingIsFired(); +// emitExistsEventForEachItem(); +// EnsureStopReadingIsFired(); + } + + + virtual bool getSubContextAttributesWithSameNameHaveSameSchema() + { + return false; + } + + virtual ferris_ios::openmode getSupportedOpenModes() + { +// cerr << "xbase::getSupportedOpenModes()" << endl; + return ios::in | ios::out | ios::binary | ios::ate | ios::trunc; + } + + }; + + + +}; +#endif diff --git a/Ferris/mocimpls.cpp b/Ferris/mocimpls.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Ferris/perl_std_list.i b/Ferris/perl_std_list.i new file mode 100644 index 0000000..7ee7c91 --- /dev/null +++ b/Ferris/perl_std_list.i @@ -0,0 +1,299 @@ +// +// SWIG typemaps for std::vector types +// Luigi Ballabio +// May 7, 2002 +// Chris Seatory +// August 5, 2002 +// +// Copy and paste job from std_vector to make use of std::list instead. +// +// Perl implementation + +%include exception.i + +// containers + +// methods which can raise are caused to throw an IndexError +%exception std::list::get { + try { + $action + } catch (std::out_of_range& e) { + SWIG_exception(SWIG_IndexError,const_cast(e.what())); + } +} + +%exception std::list::set { + try { + $action + } catch (std::out_of_range& e) { + SWIG_exception(SWIG_IndexError,const_cast(e.what())); + } +} + +%exception std::list::pop { + try { + $action + } catch (std::out_of_range& e) { + SWIG_exception(SWIG_IndexError,const_cast(e.what())); + } +} + + +// ------------------------------------------------------------------------ +// std::list +// +// The aim of all that follows would be to integrate std::list with +// Perl as much as possible, namely, to allow the user to pass and +// be returned Perl lists. +// const declarations are used to guess the intent of the function being +// exported; therefore, the following rationale is applied: +// +// -- f(std::list), f(const std::list&), f(const std::list*): +// the parameter being read-only, either a Perl sequence or a +// previously wrapped std::list can be passed. +// -- f(std::list&), f(std::list*): +// the parameter must be modified; therefore, only a wrapped std::list +// can be passed. +// -- std::list f(): +// the list is returned by copy; therefore, a Perl sequence of T:s +// is returned which is most easily used in other Perl functions +// -- std::list& f(), std::list* f(), const std::list& f(), +// const std::list* f(): +// the list is returned by reference; therefore, a wrapped std::list +// is returned +// ------------------------------------------------------------------------ + +%{ +#include +#include +#include +%} + +// exported class + +namespace std { + + template class list { + %typemap(in) list (std::list* v) { + if (SvROK($input)) { + AV *av = (AV *)SvRV($input); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument $argnum of $symname. " + "Expected an array of " #T); + SV **tv; + I32 len = av_len(av) + 1; + T* obj; + for (int i=0; i& (std::list temp, + std::list* v), + const list* (std::list temp, + std::list* v) { + if (SvROK($input)) { + AV *av = (AV *)SvRV($input); + if (SvTYPE(av) != SVt_PVAV) + SWIG_croak("Type error in argument $argnum of $symname. " + "Expected an array of " #T); + SV **tv; + I32 len = av_len(av) + 1; + T* obj; + for (int i=0; i { + int len = $1.size(); + SV **svs = new SV*[len]; + for (unsigned int i=0; i { + /* native sequence? */ + if (SvROK($input)) { + AV *av = (AV *)SvRV($input); + if (SvTYPE(av) == SVt_PVAV) { + SV **tv; + I32 len = av_len(av) + 1; + if (len == 0) { + /* an empty sequence can be of any type */ + $1 = 1; + } else { + /* check the first element only */ + T* obj; + tv = av_fetch(av, 0, 0); + if (SWIG_ConvertPtr(*tv, (void **)&obj, + $descriptor(T *),0) != -1) + $1 = 1; + else + $1 = 0; + } + } + } else { + /* wrapped list? */ + std::list* v; + if (SWIG_ConvertPtr($input,(void **) &v, + $1_&descriptor,0) != -1) + $1 = 1; + else + $1 = 0; + } + } + %typecheck(SWIG_TYPECHECK_VECTOR) const list&, + const list* { + /* native sequence? */ + if (SvROK($input)) { + AV *av = (AV *)SvRV($input); + if (SvTYPE(av) == SVt_PVAV) { + SV **tv; + I32 len = av_len(av) + 1; + if (len == 0) { + /* an empty sequence can be of any type */ + $1 = 1; + } else { + /* check the first element only */ + T* obj; + tv = av_fetch(av, 0, 0); + if (SWIG_ConvertPtr(*tv, (void **)&obj, + $descriptor(T *),0) != -1) + $1 = 1; + else + $1 = 0; + } + } + } else { + /* wrapped list? */ + std::list* v; + if (SWIG_ConvertPtr($input,(void **) &v, + $1_descriptor,0) != -1) + $1 = 1; + else + $1 = 0; + } + } + public: + list(unsigned int size = 0); + unsigned int size() const; + bool empty() const; + void clear(); + %rename(push) push_back; + void push_back(const T& x); + %extend { + T pop() { + if (self->size() == 0) + throw std::out_of_range("pop from empty list"); + T x = self->back(); + self->pop_back(); + return x; + } + T& get(int i) { + int size = int(self->size()); + if (i>=0 && isize()); + if (i>=0 && i class list { + // add specialized typemaps here + public: + list(); + list(unsigned int size, const T& value=T()); + list(const list &); + + unsigned int size() const; + bool empty() const; + void clear(); + %rename(push) push_back; + void push_back(T x); + %extend { + T pop() { + if (self->size() == 0) + throw std::out_of_range("pop from empty list"); + T x = self->back(); + self->pop_back(); + return x; + } + T get(int i) { + int size = int(self->size()); + if (i>=0 && isize()); + if (i>=0 && i. + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: timber.cpp,v 1.2 2010/09/24 21:31:02 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + namespace Factory + { + fh_timber& + getNullTimber() + { + static fh_timber s; + s.setIgnoreLogging( true ); + return s; + } + }; +}; diff --git a/Ferris/timber.hh b/Ferris/timber.hh new file mode 100644 index 0000000..91caff9 --- /dev/null +++ b/Ferris/timber.hh @@ -0,0 +1,436 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: timber.hh,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_TIMBER_H_ +#define _ALREADY_INCLUDED_TIMBER_H_ + +#include +#include +#include + +#include + +namespace Ferris +{ + + +template< + typename _CharT, + typename _Traits = std::char_traits < _CharT >, + typename _Alloc = std::allocator < _CharT > + > +class ferris_timberbuf + : + public ferris_streambuf<_CharT, _Traits>, + public std::basic_streambuf<_CharT, _Traits> +{ + + typedef std::basic_streambuf<_CharT, _Traits> sb; + + // Disallow copy/assign + ferris_timberbuf( const ferris_timberbuf& ); + ferris_timberbuf& operator=( const ferris_timberbuf& ); + +public: + + typedef std::char_traits<_CharT> traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::char_type char_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef ferris_streambuf<_CharT, _Traits> _Base; + typedef ferris_timberbuf<_CharT, _Traits, _Alloc> _Self; + typedef std::basic_string<_CharT, _Traits, _Alloc> _String; + + + enum Priority_t { + PRI_EMERG = 1<<1, + PRI_ALERT = 1<<2, + PRI_CRIT = 1<<3, + PRI_ERR = 1<<4, + PRI_WARNING = 1<<5, + PRI_NOTICE = 1<<6, + PRI_INFO = 1<<7, + PRI_DEBUG = 1<<8 + }; + + enum Facility_t { + FAC_KERN = 1<<1, + FAC_USER = 1<<2, + FAC_MAIL = 1<<3, + FAC_DAEMON = 1<<4, + FAC_AUTH = 1<<5, + FAC_SYSLOG = 1<<6, + FAC_LPR = 1<<7, + FAC_NEWS = 1<<8, + FAC_UUCP = 1<<9, + FAC_CRON = 1<<10, + FAC_AUTHPRIV= 1<<11, + FAC_FTP = 1<<12, + + FAC_L0 = 1<<13, + FAC_L1 = 1<<14, + FAC_L2 = 1<<15, + FAC_L3 = 1<<16, + FAC_L4 = 1<<17, + FAC_L5 = 1<<18, + FAC_L6 = 1<<19, + FAC_L7 = 1<<20, + }; + + enum Option_t { + OPT_CONS = 1<<1, + OPT_NDELAY = 1<<2, + OPT_PERROR = 1<<3, + OPT_PID = 1<<4 + }; + + + + explicit + ferris_timberbuf( const std::string& ident, + int ops = OPT_PID, + Facility_t f=FAC_USER, + Priority_t p=PRI_WARNING ) + : + Ident(ident), + Options(ops), + offset(0), + ignoreLogging( false ) + { +// cerr << "ferris_timberbuf() this:" << (void*)this << endl; + + int syslog_fac = 0; + int syslog_ops = 0; + + setFaculty( f ); + setPriority( p ); + + switch( Option_t(ops) ) + { + case OPT_CONS: syslog_ops |= LOG_CONS; break; + case OPT_NDELAY: syslog_ops |= LOG_NDELAY; break; + case OPT_PERROR: syslog_ops |= LOG_PERROR; break; + case OPT_PID: syslog_ops |= LOG_PID; break; + } + + switch( getFaculty() ) + { + case FAC_KERN: syslog_fac |= LOG_KERN; break; + case FAC_USER: syslog_fac |= LOG_USER; break; + case FAC_MAIL: syslog_fac |= LOG_MAIL; break; + case FAC_DAEMON: syslog_fac |= LOG_DAEMON; break; + case FAC_AUTH: syslog_fac |= LOG_AUTH; break; + case FAC_SYSLOG: syslog_fac |= LOG_SYSLOG; break; + case FAC_LPR: syslog_fac |= LOG_LPR; break; + case FAC_NEWS: syslog_fac |= LOG_NEWS; break; + case FAC_UUCP: syslog_fac |= LOG_UUCP; break; + case FAC_CRON: syslog_fac |= LOG_CRON; break; + case FAC_AUTHPRIV: syslog_fac |= LOG_AUTHPRIV; break; + case FAC_FTP: syslog_fac |= LOG_FTP; break; + case FAC_L0: syslog_fac |= LOG_LOCAL0; break; + case FAC_L1: syslog_fac |= LOG_LOCAL1; break; + case FAC_L2: syslog_fac |= LOG_LOCAL2; break; + case FAC_L3: syslog_fac |= LOG_LOCAL3; break; + case FAC_L4: syslog_fac |= LOG_LOCAL4; break; + case FAC_L5: syslog_fac |= LOG_LOCAL5; break; + case FAC_L6: syslog_fac |= LOG_LOCAL6; break; + case FAC_L7: syslog_fac |= LOG_LOCAL7; break; + } + + openlog( Ident.c_str(), syslog_ops, syslog_fac); + + } + + virtual ~ferris_timberbuf() + { +// cerr << "ferris_timberbuf() this:" << (void*)this << endl; + + overflow(0); + closelog(); + } + + + const Facility_t getFaculty() const + { + return Faculty; + } + + const Priority_t getPriority() const + { + return Priority; + } + + void setFaculty( Facility_t x ) + { + Faculty = x; + } + + void setPriority( Priority_t x ) + { + Priority = x; + } + +private: + + + Facility_t Faculty; + Priority_t Priority; + std::string Ident; + int Options; + fh_stringstream ss; + int offset; + bool ignoreLogging; + + int + getSysLogPriority() const + { + int r = 0; + + if( getPriority() & PRI_EMERG ) r |= LOG_EMERG; + if( getPriority() & PRI_ALERT ) r |= LOG_ALERT; + if( getPriority() & PRI_CRIT ) r |= LOG_CRIT; + if( getPriority() & PRI_ERR ) r |= LOG_ERR; + if( getPriority() & PRI_WARNING) r |= LOG_WARNING; + if( getPriority() & PRI_NOTICE ) r |= LOG_NOTICE; + if( getPriority() & PRI_INFO ) r |= LOG_INFO; + if( getPriority() & PRI_DEBUG ) r |= LOG_DEBUG; + + return r; + } + +protected: + + int overflow(int c) + { +// cerr << "timber overflow(c) c:" << (char)c << endl; + if(c == '\n' || !c) + { + if( ! offset ) return c; + + offset = 0; + + ss << std::endl; + ss.seekg(0); + + std::string s=""; + std::getline( ss, s ); +// cerr << "timber overflow(c) flushing s:" << s << std::endl; +// cerr << "timber overflow(c) tostr() :" << tostr(ss) << std::endl; + + if( !ignoreLogging && s.length() ) + { + syslog( getSysLogPriority(), " %s", s.c_str()); + } + + ss.clear(); + ss.seekp(0); + } + else + { +// cerr << "timber overflow(c) putting c:" << (char)c << std::endl; + ss << (char)c; + ++offset; + } + return c; + } + +public: + + void setIgnoreLogging( bool v ) + { + ignoreLogging = v; + } +}; + +template< + typename _CharT, + typename _Traits = std::char_traits<_CharT>, + typename _Alloc = std::allocator < _CharT > + > +class ferris_timber + : + public Ferris_iostream<_CharT, _Traits> +{ + + typedef ferris_timberbuf<_CharT, _Traits, _Alloc> ss_impl_t; + FERRIS_SMARTPTR( ss_impl_t, ss_t ); + ss_t ss; + typedef Ferris_commonstream<_CharT, _Traits> _CS; + +public: + + typedef char char_type; + typedef std::char_traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef emptystream_methods< char_type, traits_type > delegating_methods; + typedef ferris_timber< _CharT, _Traits, _Alloc> _Self; + typedef ss_impl_t _SBufT; + + typedef typename ss_impl_t::Facility_t Facility_t; + typedef typename ss_impl_t::Priority_t Priority_t; + typedef typename ss_impl_t::Option_t Option_t; + + explicit ferris_timber( const char* ident = "libferris.so", + int ops = _SBufT::OPT_PID, + Facility_t f = _SBufT::FAC_USER, + Priority_t p = _SBufT::PRI_WARNING) + : + ss( new ss_impl_t( ident, ops, f, p ) ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + +// cerr << "ferris_timber( ctor ) " +// << " this:" << hex << (void*)this +// << " sb:" << hex << (void*)sb +// << " sh:" << hex << toVoid(sh) +// << " rdbuf:" << hex << (void*)Ferris_commonstream< _CharT, _Traits >::rdbuf() +// << std::endl; + + } + + + ferris_timber( const ferris_timber& rhs ) + : + ss( rhs.ss ) + { + setsbT( GetImpl(ss) ); + init( rdbuf() ); + +// cerr << "ferris_timber( & ) " +// << " rhs:" << hex << (void*)&rhs +// << " this:" << hex << (void*)this +// << " sb:" << hex << (void*)sb +// << " sh:" << hex << toVoid(sh) +// << " rdbuf:" << hex << (void*)Ferris_commonstream< _CharT, _Traits >::rdbuf() +// << std::endl; + } + + ferris_timber& operator=( const ferris_timber& rhs ) + { + setsb( &rhs ); + init( _CS::sb ); + +// cerr << "ferris_timber( = ) " +// << " rhs:" << hex << (void*)&rhs +// << " this:" << hex << (void*)this +// << " sb:" << hex << (void*)sb +// << " sh:" << hex << toVoid(sh) +// << " rdbuf:" << hex << (void*)Ferris_commonstream< _CharT, _Traits >::rdbuf() +// << std::endl; + + this->exceptions( std::ios_base::goodbit ); + clear( rhs.rdstate() ); + copyfmt( rhs ); + return *this; + } + + + virtual ~ferris_timber() + { +// cerr << "ferris_timber( ctor ) " +// << " this:" << hex << (void*)this +// << " sb:" << hex << (void*)sb +// << " sh:" << hex << toVoid(sh) +// << " rdbuf:" << hex << (void*)Ferris_commonstream< _CharT, _Traits >::rdbuf() +// << std::endl; + + } + + + _Self* operator->() + { + return this; + } + + ss_impl_t* + rdbuf() const + { + return GetImpl(ss); + } + + enum + { + stream_readable = true, + stream_writable = false + }; + + + const Facility_t getFaculty() const + { + return rdbuf()->getFaculty(); + } + + const Priority_t getPriority() const + { + return rdbuf()->getPriority(); + } + + void setFaculty( Facility_t x ) + { + rdbuf()->setFaculty( x ); + } + + void setPriority( Priority_t x ) + { + rdbuf()->setPriority( x ); + } + + /** + * enable or disable null logging. + */ + void setIgnoreLogging( bool v ) + { + rdbuf()->setIgnoreLogging( v ); + } + + +}; + + +typedef ferris_timber Timber; +typedef ferris_timber f_timber; +typedef ferris_timber fh_timber; + +namespace Factory +{ + FERRISEXP_API fh_timber& getNullTimber(); +}; + + +}; + + +#endif // #ifndef _ALREADY_INCLUDED_TIMBER_H_ + diff --git a/Ferris/xfsutil.cpp b/Ferris/xfsutil.cpp new file mode 100644 index 0000000..94a8e29 --- /dev/null +++ b/Ferris/xfsutil.cpp @@ -0,0 +1,101 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: xfsutil.cpp,v 1.3 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifdef FERRIS_HAVE_XFSPROGS +#include +#include +#endif +#include +#include +#include +#include +#include + +namespace Ferris +{ + + bool isXFS( int fd ) + { +#ifndef FERRIS_HAVE_XFSPROGS + return false; +#else + struct statfs buf; + + fstatfs(fd, &buf); + if (buf.f_type == XFS_SUPER_MAGIC) + { + return true; + } + return false; +#endif + } + + bool isXFS( fh_context c ) + { +#ifndef FERRIS_HAVE_XFSPROGS + return false; +#else + const std::string s = c->getDirPath(); + return isXFS( s ); +#endif + } + + bool isXFS( const std::string& s ) + { +#ifndef FERRIS_HAVE_XFSPROGS + return false; +#else + FerrisURL fu = FerrisURL::fromString( s ); + + LG_NATIVE_D << " isXFS s:" << s + << " scheme:" << fu.getScheme() + << endl; + + if( fu.getScheme() != "file" ) + { + LG_NATIVE_D << "isXFS s:" << s + << " not using a file scheme: " << fu.getScheme() + << endl; + return false; + } + + int fd = open( s.c_str(), O_RDONLY); + if (fd < 0) + { + return false; + } + + bool ret = isXFS( fd ); + LG_NATIVE_D << " isXFS() s:" << s << " ret:" << ret << endl; + close(fd); + return ret; +#endif + } + +}; diff --git a/Ferris/xfsutil.hh b/Ferris/xfsutil.hh new file mode 100644 index 0000000..74e618d --- /dev/null +++ b/Ferris/xfsutil.hh @@ -0,0 +1,40 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2001 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: xfsutil.hh,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +namespace Ferris +{ + FERRISEXP_API bool isXFS( int fd ); + FERRISEXP_API bool isXFS( fh_context c ); + FERRISEXP_API bool isXFS( const std::string& s ); +}; diff --git a/FerrisGCJ/FerrisGCJ.cpp b/FerrisGCJ/FerrisGCJ.cpp new file mode 100644 index 0000000..e13b0cd --- /dev/null +++ b/FerrisGCJ/FerrisGCJ.cpp @@ -0,0 +1,77 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGCJ.cpp,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + std::string tostr( jstring jstr ) + { + jsize s = JvGetStringUTFLength ( jstr ); + std::string ret; + ret.resize( s ); + JvGetStringUTFRegion( jstr, 0, s, (char*)ret.data() ); + return ret; + } + + namespace Java + { + template <> + ::java::lang::String* tojstr( const std::string& v ) + { + return JvNewStringLatin1( v.c_str() ); + } + template <> + ::java::lang::String* tojstr( std::string v ) + { + return JvNewStringLatin1( v.c_str() ); + } + template <> + ::java::lang::String* tojstr( const char* v ) + { + return JvNewStringLatin1( v ); + } + }; + namespace Factory + { + void ensureJVMCreated() + { + static bool v = true; + + if( v ) + { + v = false; + + JvCreateJavaVM(NULL); + JvAttachCurrentThread(NULL, NULL); + JvInitClass(&System::class$); + } + } + }; +}; diff --git a/FerrisGCJ/FerrisGCJ_private.hh b/FerrisGCJ/FerrisGCJ_private.hh new file mode 100644 index 0000000..977d8f4 --- /dev/null +++ b/FerrisGCJ/FerrisGCJ_private.hh @@ -0,0 +1,73 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisGCJ_private.hh,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_GCJ_H_ +#define _ALREADY_INCLUDED_FERRIS_GCJ_H_ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +namespace Ferris +{ + using namespace ::java::lang; + + std::string tostr( jstring jstr ); + + namespace Java + { + template + ::java::lang::String* tojstr( T v ) + { + return tojstr( tostr( v ) ); + } + template <> + ::java::lang::String* tojstr( const std::string& v ); + template <> + ::java::lang::String* tojstr( std::string v ); + template <> + ::java::lang::String* tojstr( const char* v ); + }; + namespace Factory + { + void ensureJVMCreated(); + }; +}; + +#endif diff --git a/FerrisGCJ/Makefile.am b/FerrisGCJ/Makefile.am new file mode 100644 index 0000000..a0f6c5b --- /dev/null +++ b/FerrisGCJ/Makefile.am @@ -0,0 +1,44 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @GCJ_CFLAGS@ \ + @CFLAGS@ + +COMMON_GCJFLAGS = --encoding=ISO-8859-1 -Wno-deprecated +#BUILT_SOURCES = MyAnalyzer.h +#%.h: %.java +# $(GCJ) -C $(COMMON_GCJFLAGS) $(AM_GCJFLAGS) $(GCJFLAGS) $< +# gcjh --classpath `pwd` `echo $< | sed "s/.java//g"`; + +################################################################### +################################################################### +################################################################### + +lib_LTLIBRARIES = libferrisgcj.la + +ferrisincludedir=$(includedir)/Ferris +ferrisinclude_HEADERS = +libferrisgcj_la_SOURCES = FerrisGCJ.cpp FerrisGCJ_private.hh + +libferrisgcj_la_LIBADD = @GCJ_LIBS@ + + +libferrisgcj_la_LDFLAGS = \ + @GLIB_LIBS@ \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + + +########################################################################## +########################################################################## +########################################################################## + diff --git a/FerrisGCJ/Makefile.in b/FerrisGCJ/Makefile.in new file mode 100644 index 0000000..08c9064 --- /dev/null +++ b/FerrisGCJ/Makefile.in @@ -0,0 +1,1056 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = FerrisGCJ +DIST_COMMON = $(ferrisinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(ferrisincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libferrisgcj_la_DEPENDENCIES = +am_libferrisgcj_la_OBJECTS = FerrisGCJ.lo +libferrisgcj_la_OBJECTS = $(am_libferrisgcj_la_OBJECTS) +libferrisgcj_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libferrisgcj_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferrisgcj_la_SOURCES) +DIST_SOURCES = $(libferrisgcj_la_SOURCES) +HEADERS = $(ferrisinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @GCJ_CFLAGS@ \ + @CFLAGS@ + +COMMON_GCJFLAGS = --encoding=ISO-8859-1 -Wno-deprecated +#BUILT_SOURCES = MyAnalyzer.h +#%.h: %.java +# $(GCJ) -C $(COMMON_GCJFLAGS) $(AM_GCJFLAGS) $(GCJFLAGS) $< +# gcjh --classpath `pwd` `echo $< | sed "s/.java//g"`; + +################################################################### +################################################################### +################################################################### +lib_LTLIBRARIES = libferrisgcj.la +ferrisincludedir = $(includedir)/Ferris +ferrisinclude_HEADERS = +libferrisgcj_la_SOURCES = FerrisGCJ.cpp FerrisGCJ_private.hh +libferrisgcj_la_LIBADD = @GCJ_LIBS@ +libferrisgcj_la_LDFLAGS = \ + @GLIB_LIBS@ \ + -version-info @LIBFERRIS_LT_CURRENT@:@LIBFERRIS_LT_REVISION@:@LIBFERRIS_LT_AGE@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu FerrisGCJ/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu FerrisGCJ/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferrisgcj.la: $(libferrisgcj_la_OBJECTS) $(libferrisgcj_la_DEPENDENCIES) + $(libferrisgcj_la_LINK) -rpath $(libdir) $(libferrisgcj_la_OBJECTS) $(libferrisgcj_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisGCJ.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ferrisincludeHEADERS: $(ferrisinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(ferrisincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ferrisincludedir)" + @list='$(ferrisinclude_HEADERS)'; test -n "$(ferrisincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ferrisincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(ferrisincludedir)" || exit $$?; \ + done + +uninstall-ferrisincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(ferrisinclude_HEADERS)'; test -n "$(ferrisincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ferrisincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ferrisincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ferrisincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-ferrisincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-ferrisincludeHEADERS uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am \ + install-ferrisincludeHEADERS install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-ferrisincludeHEADERS \ + uninstall-libLTLIBRARIES + + +########################################################################## +########################################################################## +########################################################################## + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/FerrisGlue/ImageMagickNamespaceGlue.cpp b/FerrisGlue/ImageMagickNamespaceGlue.cpp new file mode 100644 index 0000000..2848746 --- /dev/null +++ b/FerrisGlue/ImageMagickNamespaceGlue.cpp @@ -0,0 +1,56 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ImageMagickNamespaceGlue.cpp,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +//#include +#include "ImageMagickNamespaceGlue.hh" +#ifdef HAVE_MAGICK + +#ifdef _STLP_STRING +#error "Using STLPort std::string during compilation" +#endif + +namespace Ferris +{ + Magick::Image& readImage( Magick::Image& im, const char* filepath_CSTR ) + { +// fh_context theContext = Resolve( filepath_CSTR ); +// fh_istream iss = theContext->getIStream(); +// string iss_str = StreamToString( iss ); +// Magick::Blob inBlob( iss_str.data(), iss_str.length() ); +// im.read( inBlob ); + +// std::string s = filepath_CSTR; + im.read( filepath_CSTR ); + return im; + } +}; +#endif + + diff --git a/FerrisGlue/ImageMagickNamespaceGlue.hh b/FerrisGlue/ImageMagickNamespaceGlue.hh new file mode 100644 index 0000000..4b44a96 --- /dev/null +++ b/FerrisGlue/ImageMagickNamespaceGlue.hh @@ -0,0 +1,49 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ImageMagickNamespaceGlue.hh,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_IMAGEMAGICK_NAMESPACE_GLUE_H_ +#define _ALREADY_INCLUDED_FERRIS_IMAGEMAGICK_NAMESPACE_GLUE_H_ + +#include +#ifdef HAVE_MAGICK +#include + +namespace Ferris +{ + /** + * This whole directory is for glue code. This method allows an + * image to be loaded from a native path using the read( string ) + * method of ImageMagick++ which may be compiled to use the + * native compilers std::string instead of STLport::string. + */ + Magick::Image& readImage( Magick::Image& im, const char* filepath_CSTR ); +}; + +#endif +#endif diff --git a/FerrisGlue/Makefile.am b/FerrisGlue/Makefile.am new file mode 100644 index 0000000..74e6d71 --- /dev/null +++ b/FerrisGlue/Makefile.am @@ -0,0 +1,7 @@ +INCLUDES = @MAGICK_CFLAGS@ +CXXFLAGS = +AM_CXXFLAGS = + +noinst_LTLIBRARIES = libImageMagickNamespaceGlue.la +libImageMagickNamespaceGlue_la_SOURCES = ImageMagickNamespaceGlue.hh ImageMagickNamespaceGlue.cpp +libImageMagickNamespaceGlue_la_LIBS = @MAGICK_LIBS@ diff --git a/FerrisGlue/Makefile.in b/FerrisGlue/Makefile.in new file mode 100644 index 0000000..7fee980 --- /dev/null +++ b/FerrisGlue/Makefile.in @@ -0,0 +1,948 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = FerrisGlue +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libImageMagickNamespaceGlue_la_LIBADD = +am_libImageMagickNamespaceGlue_la_OBJECTS = \ + ImageMagickNamespaceGlue.lo +libImageMagickNamespaceGlue_la_OBJECTS = \ + $(am_libImageMagickNamespaceGlue_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libImageMagickNamespaceGlue_la_SOURCES) +DIST_SOURCES = $(libImageMagickNamespaceGlue_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = @MAGICK_CFLAGS@ +AM_CXXFLAGS = +noinst_LTLIBRARIES = libImageMagickNamespaceGlue.la +libImageMagickNamespaceGlue_la_SOURCES = ImageMagickNamespaceGlue.hh ImageMagickNamespaceGlue.cpp +libImageMagickNamespaceGlue_la_LIBS = @MAGICK_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu FerrisGlue/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu FerrisGlue/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libImageMagickNamespaceGlue.la: $(libImageMagickNamespaceGlue_la_OBJECTS) $(libImageMagickNamespaceGlue_la_DEPENDENCIES) + $(CXXLINK) $(libImageMagickNamespaceGlue_la_OBJECTS) $(libImageMagickNamespaceGlue_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImageMagickNamespaceGlue.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/FerrisQtGui/All.hh b/FerrisQtGui/All.hh new file mode 100644 index 0000000..e69de29 diff --git a/FerrisQtGui/FerrisFileSystemModel.cpp b/FerrisQtGui/FerrisFileSystemModel.cpp new file mode 100644 index 0000000..9cdd9e2 --- /dev/null +++ b/FerrisQtGui/FerrisFileSystemModel.cpp @@ -0,0 +1,272 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FerrisFileSystemModel.hh" +#include + +#define DEBUG LG_FERRISQTGUI_D + +static const char* const treeicon_pixbuf_cn = "treeicon-pixbuf"; +static const char* const emblems_pixbuf_cn = "emblem:emblems-pixbuf"; + +namespace Ferris +{ + using std::endl; + using std::string; + using std::exception; + + void + FerrisFileSystemModel::updateColumnNames() const + { + if( !isBound( m_root ) ) + { + DEBUG << "updateColumnNames(returning) m_root not set." << endl; + return; + } + + if( !m_columnNames.empty() ) + { + DEBUG << "updateColumnNames() m_columnNames already populated." << endl; + return; + } + + if( !m_staticColumnNames.empty() ) + { + DEBUG << "updateColumnNames() using a static column name list.." << endl; + m_columnNames = m_staticColumnNames; + return; + } + + DEBUG << "updateColumnNames(starting)" << endl; + DEBUG << "updateColumnNames() m_root:" << m_root->getURL() << endl; + + fh_context rc = m_root; + try + { + std::set< std::string > unionset; + + DEBUG << "updateColumnNames(getting ea-names)" << endl; + addEAToSet( unionset, getStrAttr( rc, "ea-names", "" )); + DEBUG << "updateColumnNames(getting ea-names-union-view)" << endl; + addEAToSet( unionset, getStrAttr( rc, "recommended-ea-union-view", "" )); + DEBUG << "updateColumnNames(getting fixed additions)" << endl; + addEAToSet( unionset, getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_K, + CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_DEFAULT )); + unionset.insert( treeicon_pixbuf_cn ); + unionset.insert( emblems_pixbuf_cn ); + m_columnNames.clear(); + m_columnNames.reserve( unionset.size() ); + copy( unionset.begin(), unionset.end(), back_inserter( m_columnNames )); + } + catch( exception& e ) + { + DEBUG << "error adding column data for ctx:" << rc->getURL() << endl; + } + + DEBUG << "UpdateColumnNames() m_columnNames.size:" << m_columnNames.size() << endl; + } + + QVariant::Type + FerrisFileSystemModel::getColumnType( int index ) const + { + // FIXME + + return QVariant::String; + } + + std::string + FerrisFileSystemModel::getColumnName( int index ) const + { + return m_columnNames[index]; + } + + int + FerrisFileSystemModel::getColumnNumber( const std::string& s ) + { + updateColumnNames(); + columnNames_t an = m_columnNames; + int i=0; + + for( columnNames_t::const_iterator iter = an.begin(); iter != an.end(); ++iter, ++i ) + { + if( *iter == s ) + { + return i; + } + } + + DEBUG << "getColumnNumber() HAS FAILED TO FIND COLUMN:" << s << endl; + for( columnNames_t::const_iterator iter = an.begin(); iter != an.end(); ++iter, ++i ) + { + DEBUG << " iter: " << *iter << endl; + } + + return -1; + } + + fh_context + FerrisFileSystemModel::toContext( const QModelIndex& index ) const + { + int r = index.row(); + if( r > rowCount() ) + { + DEBUG << "row is too large. r:" << r << endl; + return 0; + } + + Context::iterator ci = m_root->begin(); + std::advance( ci, r ); + return *ci; + } + + + + FerrisFileSystemModel::FerrisFileSystemModel() + : + m_root(0) + { + } + + FerrisFileSystemModel::~FerrisFileSystemModel() + { + } + + QModelIndex + FerrisFileSystemModel::setRootPath( const QString & newPath ) + { + beginResetModel(); + + m_root = Resolve( tostr(newPath) ); + m_root->read(); + + endResetModel(); + + } + QModelIndex FerrisFileSystemModel::setRootPath( const std::string& newPath ) + { + QString s = newPath.c_str(); + return setRootPath( s ); + } + + + + int + FerrisFileSystemModel::rowCount( const QModelIndex & parent ) const + { + if( !m_root ) + return 0; + + return m_root->getSubContextCount(); + } + + + + int + FerrisFileSystemModel::columnCount( const QModelIndex & parent ) const + { + if( !m_root ) + return 0; + + updateColumnNames(); + return m_columnNames.size(); + + } + + QVariant + FerrisFileSystemModel::data( const QModelIndex & index, int role ) const + { + // FIXME + DEBUG << "data() role:" << role << " row:" << index.row() << " col:" << index.column() << endl; + + if( role == Qt::DisplayRole ) + { + if( fh_context c = toContext( index ) ) + { + std::string eaname = getColumnName( index.column() ); + QVariant ret; + + std::string v = getStrAttr( c, eaname, "", true, false ); + fh_context schema = c->getSchema( eaname ); + string schema_url = schema->getURL(); + + DEBUG << "eaname:" << eaname << " schema:" << schema->getURL() << endl; + + if( ends_with( schema_url, "schema.xml/xsd/attributes/decimal/integer/long/fs/time" )) + { + QDateTime qv; + qv.setTime_t( toType(v) ); + ret = qv; + } + else if( contains( schema_url, "schema.xml/xsd/attributes/decimal/integer" )) + { + qlonglong qv = ::Ferris::toType(v); + ret = qv; + } + else + { + QString qv = v.c_str(); + ret = qv; + } + + return ret; + } + } + + return QVariant(); + } + + QVariant + FerrisFileSystemModel::headerData( int section, Qt::Orientation orientation, int role ) const + { + if( orientation == Qt::Horizontal ) + { + if( role == Qt::DisplayRole ) + { + std::string cn = getColumnName( section ); + QString qcn = cn.c_str(); + return qcn; + } + } + if( orientation == Qt::Vertical ) + { + if( role == Qt::DisplayRole ) + { + std::string cn = tostr( section ); + QString qcn = cn.c_str(); + return qcn; + } + } + + return QVariant(); + } + +}; + +#include "FerrisFileSystemModel_moc.cpp" diff --git a/FerrisQtGui/FerrisFileSystemModel.hh b/FerrisQtGui/FerrisFileSystemModel.hh new file mode 100644 index 0000000..9e431c2 --- /dev/null +++ b/FerrisQtGui/FerrisFileSystemModel.hh @@ -0,0 +1,83 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISQTGUI_FERRISFILESYSTEMMODEL_H_ +#define _ALREADY_INCLUDED_FERRISQTGUI_FERRISFILESYSTEMMODEL_H_ + +#include +#include + +#include + +#include "Ferris/FerrisQt_private.hh" + +namespace Ferris +{ + class FERRISEXP_API FerrisFileSystemModel + : + public QAbstractTableModel + { + Q_OBJECT; + + fh_context m_root; + typedef std::vector< std::string > columnNames_t; + mutable columnNames_t m_columnNames; + columnNames_t m_staticColumnNames; + + protected: + + void updateColumnNames() const; + + public: + + int getColumnNumber( const std::string& s ); + virtual QVariant::Type getColumnType( int index ) const; + std::string getColumnName( int index ) const; + fh_context toContext( const QModelIndex& index ) const; + + QModelIndex setRootPath( const QString& newPath ); + QModelIndex setRootPath( const std::string& newPath ); + + + FerrisFileSystemModel(); + virtual ~FerrisFileSystemModel(); + + virtual int rowCount( const QModelIndex & parent = QModelIndex() ) const; + virtual int columnCount( const QModelIndex & parent = QModelIndex() ) const; + virtual QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const; + virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; + + // virtual bool setData( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ); + // virtual Qt::ItemFlags flags( const QModelIndex & index ) const; + + }; + +}; + +#endif diff --git a/FerrisQtGui/FerrisQtGui.cpp b/FerrisQtGui/FerrisQtGui.cpp new file mode 100644 index 0000000..e69de29 diff --git a/FerrisQtGui/FerrisQtGui.hh b/FerrisQtGui/FerrisQtGui.hh new file mode 100644 index 0000000..e69de29 diff --git a/FerrisQtGui/FerrisSortFilterProxyModel.cpp b/FerrisQtGui/FerrisSortFilterProxyModel.cpp new file mode 100644 index 0000000..099d8a1 --- /dev/null +++ b/FerrisQtGui/FerrisSortFilterProxyModel.cpp @@ -0,0 +1,77 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FerrisSortFilterProxyModel.hh" + +#define DEBUG LG_FERRISQTGUI_D + +namespace Ferris +{ + using std::endl; + using std::string; + using std::exception; + + FerrisSortFilterProxyModel::FerrisSortFilterProxyModel( QObject* parent ) + : QSortFilterProxyModel( parent ) + , m(0) + { + } + + FerrisSortFilterProxyModel::~FerrisSortFilterProxyModel() + { + } + + + void + FerrisSortFilterProxyModel::sort( int column, Qt::SortOrder order ) + { + if( m ) + { + std::string cn = m->getColumnName( column ); + std::string n = adjustEANameForSorting( cn ); + if( cn != n ) + { + column = m->getColumnNumber( n ); + } + } + + _Base::sort( column, order ); + } + + void + FerrisSortFilterProxyModel::setSourceModel( QAbstractItemModel * sourceModel ) + { + m = dynamic_cast( sourceModel ); + _Base::setSourceModel( sourceModel ); + } + + +}; + +#include "FerrisSortFilterProxyModel_moc.cpp" diff --git a/FerrisQtGui/FerrisSortFilterProxyModel.hh b/FerrisQtGui/FerrisSortFilterProxyModel.hh new file mode 100644 index 0000000..c0ba0df --- /dev/null +++ b/FerrisQtGui/FerrisSortFilterProxyModel.hh @@ -0,0 +1,61 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISQTGUI_FERRISSORTFILTERPROXYMODEL_H_ +#define _ALREADY_INCLUDED_FERRISQTGUI_FERRISSORTFILTERPROXYMODEL_H_ + +#include +#include + +#include + +#include "Ferris/FerrisQt_private.hh" +#include "FerrisFileSystemModel.hh" + +namespace Ferris +{ + class FERRISEXP_API FerrisSortFilterProxyModel + : + public QSortFilterProxyModel + { + Q_OBJECT; + typedef QSortFilterProxyModel _Base; + + FerrisFileSystemModel* m; + + public: + FerrisSortFilterProxyModel( QObject * parent = 0 ); + virtual ~FerrisSortFilterProxyModel(); + + virtual void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ); + virtual void setSourceModel( QAbstractItemModel * sourceModel ); + }; +}; + +#endif diff --git a/FerrisQtGui/Makefile.am b/FerrisQtGui/Makefile.am new file mode 100644 index 0000000..fa84f38 --- /dev/null +++ b/FerrisQtGui/Makefile.am @@ -0,0 +1,65 @@ + +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @QTGUI_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @CFLAGS@ + +lib_LTLIBRARIES = libferrisqtgui.la + +EXTRA_DIST = $(srcdir)/*.qml + +################################################################### +################################################################### +################################################################### + +%_moc.cpp: %.hh + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +%_moc_impl.cpp: %.cpp + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +mocimpls.cpp: FerrisFileSystemModel_moc.cpp FerrisSortFilterProxyModel_moc.cpp modeltest_moc_impl.cpp + touch mocimpls.cpp + + +ferrisqtguiincludedir=$(includedir)/Ferrisqtgui +libferrisqtgui_la_LDFLAGS = @QTGUI_LIBS@ + +ferrisqtguiinclude_HEADERS = \ + All.hh \ + FerrisFileSystemModel.hh \ + FerrisSortFilterProxyModel.hh \ + FerrisQtGui.hh + +libferrisqtgui_la_SOURCES = \ + mocimpls.cpp \ + FerrisFileSystemModel.cpp \ + FerrisSortFilterProxyModel.cpp \ + FerrisQtGui.cpp + + +################################################################### +################################################################### +################################################################### + +noinst_PROGRAMS = modeltest # modeltestqml + +modeltest_SOURCES = modeltest.cpp FerrisFileSystemModel.hh +modeltest_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISQTGUI_LA@ +modeltest_LDFLAGS = @QT_LIBS@ @QTGUI_LIBS@ + +modeltestqml_SOURCES = modeltestqml.cpp FerrisFileSystemModel.hh +modeltestqml_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISQTGUI_LA@ +modeltestqml_LDFLAGS = @QT_LIBS@ @QTGUI_LIBS@ + + diff --git a/FerrisQtGui/Makefile.in b/FerrisQtGui/Makefile.in new file mode 100644 index 0000000..e89a969 --- /dev/null +++ b/FerrisQtGui/Makefile.in @@ -0,0 +1,1095 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = modeltest$(EXEEXT) +subdir = FerrisQtGui +DIST_COMMON = $(ferrisqtguiinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(ferrisqtguiincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libferrisqtgui_la_LIBADD = +am_libferrisqtgui_la_OBJECTS = mocimpls.lo FerrisFileSystemModel.lo \ + FerrisSortFilterProxyModel.lo FerrisQtGui.lo +libferrisqtgui_la_OBJECTS = $(am_libferrisqtgui_la_OBJECTS) +libferrisqtgui_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libferrisqtgui_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(noinst_PROGRAMS) +am_modeltest_OBJECTS = modeltest.$(OBJEXT) +modeltest_OBJECTS = $(am_modeltest_OBJECTS) +modeltest_DEPENDENCIES = +modeltest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(modeltest_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferrisqtgui_la_SOURCES) $(modeltest_SOURCES) +DIST_SOURCES = $(libferrisqtgui_la_SOURCES) $(modeltest_SOURCES) +HEADERS = $(ferrisqtguiinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @QTGUI_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @CFLAGS@ + +lib_LTLIBRARIES = libferrisqtgui.la +EXTRA_DIST = $(srcdir)/*.qml +ferrisqtguiincludedir = $(includedir)/Ferrisqtgui +libferrisqtgui_la_LDFLAGS = @QTGUI_LIBS@ +ferrisqtguiinclude_HEADERS = \ + All.hh \ + FerrisFileSystemModel.hh \ + FerrisSortFilterProxyModel.hh \ + FerrisQtGui.hh + +libferrisqtgui_la_SOURCES = \ + mocimpls.cpp \ + FerrisFileSystemModel.cpp \ + FerrisSortFilterProxyModel.cpp \ + FerrisQtGui.cpp + +modeltest_SOURCES = modeltest.cpp FerrisFileSystemModel.hh +modeltest_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISQTGUI_LA@ +modeltest_LDFLAGS = @QT_LIBS@ @QTGUI_LIBS@ +modeltestqml_SOURCES = modeltestqml.cpp FerrisFileSystemModel.hh +modeltestqml_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISQTGUI_LA@ +modeltestqml_LDFLAGS = @QT_LIBS@ @QTGUI_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu FerrisQtGui/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu FerrisQtGui/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferrisqtgui.la: $(libferrisqtgui_la_OBJECTS) $(libferrisqtgui_la_DEPENDENCIES) + $(libferrisqtgui_la_LINK) -rpath $(libdir) $(libferrisqtgui_la_OBJECTS) $(libferrisqtgui_la_LIBADD) $(LIBS) + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +modeltest$(EXEEXT): $(modeltest_OBJECTS) $(modeltest_DEPENDENCIES) + @rm -f modeltest$(EXEEXT) + $(modeltest_LINK) $(modeltest_OBJECTS) $(modeltest_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisFileSystemModel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisQtGui.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisSortFilterProxyModel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mocimpls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modeltest.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ferrisqtguiincludeHEADERS: $(ferrisqtguiinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(ferrisqtguiincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ferrisqtguiincludedir)" + @list='$(ferrisqtguiinclude_HEADERS)'; test -n "$(ferrisqtguiincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ferrisqtguiincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(ferrisqtguiincludedir)" || exit $$?; \ + done + +uninstall-ferrisqtguiincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(ferrisqtguiinclude_HEADERS)'; test -n "$(ferrisqtguiincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ferrisqtguiincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ferrisqtguiincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ferrisqtguiincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-ferrisqtguiincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-ferrisqtguiincludeHEADERS \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-ferrisqtguiincludeHEADERS install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am \ + uninstall-ferrisqtguiincludeHEADERS uninstall-libLTLIBRARIES + + +################################################################### +################################################################### +################################################################### + +%_moc.cpp: %.hh + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +%_moc_impl.cpp: %.cpp + moc-qt4 $(DEFINES) $(INCPATH) $< -o $@ + +mocimpls.cpp: FerrisFileSystemModel_moc.cpp FerrisSortFilterProxyModel_moc.cpp modeltest_moc_impl.cpp + touch mocimpls.cpp + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/FerrisQtGui/mocimpls.cpp b/FerrisQtGui/mocimpls.cpp new file mode 100644 index 0000000..e69de29 diff --git a/FerrisQtGui/modeltest.cpp b/FerrisQtGui/modeltest.cpp new file mode 100644 index 0000000..0f985bb --- /dev/null +++ b/FerrisQtGui/modeltest.cpp @@ -0,0 +1,130 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisWebServices_private.hh,v 1.4 2010/11/15 21:30:33 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "FerrisFileSystemModel.hh" +#include "FerrisSortFilterProxyModel.hh" + +#include +#include + +#include +#include +#include + +using Ferris::FerrisFileSystemModel; +using Ferris::FerrisSortFilterProxyModel; + +std::string ROOTPATH = "/tmp/qtmodel"; + +class ApplicationWindow: public QMainWindow +{ + Q_OBJECT; + FerrisFileSystemModel* m; + QTableView* v; + QSortFilterProxyModel* p; + +public: + ApplicationWindow() + { + m = new FerrisFileSystemModel(); + m->setRootPath( ROOTPATH ); + v = new QTableView( this ); + +// v->setModel(m); + v->setSortingEnabled(true); +// QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this); + QSortFilterProxyModel *proxyModel = new FerrisSortFilterProxyModel( this ); + p = proxyModel; + proxyModel->setSourceModel( m ); + v->setModel( proxyModel ); + + for( int i = m->columnCount(); i>=0; i-- ) + v->setColumnHidden( i, true ); + v->setColumnHidden( m->getColumnNumber("name"), false ); + v->setColumnHidden( m->getColumnNumber("size-human-readable"), false ); + v->setColumnHidden( m->getColumnNumber("size"), false ); + v->setColumnHidden( m->getColumnNumber("mtime-display"), false ); + v->setColumnHidden( m->getColumnNumber("mtime"), false ); +// v->setColumnHidden( m->getColumnNumber("sha1"), false ); + + + v->setFocus(); + setCentralWidget( v ); + + QTimer::singleShot(3000, this, SLOT(timer())); + } + + void read( const std::string& url ) + { + m->setRootPath( url ); + } + + ~ApplicationWindow() + { + } + + +protected: +// void closeEvent( QCloseEvent* ); + +private slots: + void timer() + { +// read( "/tmp/qtmodel" ); + } + + // void newDoc(); + // void load(); + // void load( const char *fileName ); + // void save(); + // void saveAs(); + // void print(); + + // void about(); + // void aboutQt(); + +private: + QToolBar *fileTools; + QString filename; +}; + +int main( int argc, char** argv ) +{ + QApplication a( argc, argv ); + + if( argc > 1 ) + ROOTPATH = argv[1]; + + ApplicationWindow * mw = new ApplicationWindow(); + mw->show(); + a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) ); + return a.exec(); +} + +#include "modeltest_moc_impl.cpp" diff --git a/FerrisQtGui/modeltestqml.qml b/FerrisQtGui/modeltestqml.qml new file mode 100644 index 0000000..e69de29 diff --git a/FerrisUI/All.hh b/FerrisUI/All.hh new file mode 100644 index 0000000..9efae65 --- /dev/null +++ b/FerrisUI/All.hh @@ -0,0 +1,50 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: All.hh,v 1.2 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_ALL_H_ +#define _ALREADY_INCLUDED_FERRISUI_ALL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace FerrisUI +{ +}; +#endif + diff --git a/FerrisUI/ContextPropertiesEditor.cpp b/FerrisUI/ContextPropertiesEditor.cpp new file mode 100644 index 0000000..9ed95d6 --- /dev/null +++ b/FerrisUI/ContextPropertiesEditor.cpp @@ -0,0 +1,937 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextPropertiesEditor.cpp,v 1.6 2010/09/24 21:31:03 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "ContextPropertiesEditor.hh" + +#include +#include +#include +#include +#include + +#include + +#include "config.h" + +namespace FerrisUI +{ + static const char* GOBJ_GROUP_ID_K = "GOBJ_GROUP_ID_K"; + static const char* GOBJ_INDICATOR_IMG_K = "GOBJ_INDICATOR_IMG_K"; + + static string ICON_NO_EXPLICIT = "icons://unknown.png"; + + + static string getMimeIcon( string m ) + { + fh_stringstream ss; + ss << "mime://" << m; + fh_context c = Resolve( tostr(ss) ); + return resolveToIconPath( getStrAttr( c, "ferris-iconname", "" ) ); + } + + ContextPropertiesEditor::ContextPropertiesEditor() + : + m_context( 0 ), + m_userWidget( 0 ), + m_manuallySetting( false ), + m_showURL( false ), + m_explicitIcon( 0 ), + m_thumbIcon( 0 ) +// m_recalc_du_sh( 0 ), +// m_du_sh( 0 ), +// m_du_sh_runner( 0 ) + { + } + + void + ContextPropertiesEditor::setShowURL( bool v ) + { + m_showURL = v; + } + + static void cpe_mode_toggled( GtkToggleButton *togglebutton, gpointer user_data ) + { + ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; + cpe->mode_toggled( togglebutton ); + } + + void + ContextPropertiesEditor::mode_toggled( GtkToggleButton *togglebutton ) + { + if( m_manuallySetting ) + return; + + try + { + string modestr = getStrAttr( m_context, "mode", "-1" ); + if( modestr == "-1" ) + { + fh_stringstream ss; + ss << "Can not get file mode for context:" << endl + << m_context->getURL() + << "so a change can not be made to permissions."; + FerrisUI::RunErrorDialog( tostr(ss) ); + } + + int mode = toType( modestr ); + + LG_GTKFERRIS_D << "original mode:" << mode << endl; + +#define TBCOMP( a, b ) (((GtkWidget*)a) == ((GtkWidget*)b)) + if( TBCOMP( togglebutton, m_owner_read )) mode ^= S_IRUSR; + if( TBCOMP( togglebutton, m_owner_write )) mode ^= S_IWUSR; + if( TBCOMP( togglebutton, m_owner_exec )) mode ^= S_IXUSR; + + if( TBCOMP( togglebutton, m_group_read )) mode ^= S_IRGRP; + if( TBCOMP( togglebutton, m_group_write )) mode ^= S_IWGRP; + if( TBCOMP( togglebutton, m_group_exec )) mode ^= S_IXGRP; + + if( TBCOMP( togglebutton, m_other_read )) mode ^= S_IROTH; + if( TBCOMP( togglebutton, m_other_write )) mode ^= S_IWOTH; + if( TBCOMP( togglebutton, m_other_exec )) mode ^= S_IXOTH; +#undef TBCOMP + + LG_GTKFERRIS_D << "new mode:" << mode << endl; + + fh_attribute a = m_context->getAttribute("mode"); + fh_iostream ss = a->getIOStream( ios::trunc ); + ss << mode; + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Can not set file mode for context:" << endl + << m_context->getURL() + << "so a change can not be made to permissions." + << "e:" << e.what(); + FerrisUI::RunErrorDialog( tostr(ss) ); + } + updateProtectionLabels(); + } + + static void cpe_time_activated( GtkEntry *entry, gpointer user_data ) + { + ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; + cpe->time_activated( entry ); + } + + static bool isValidTimeString( const std::string& s ) + { + bool validTime = isTrue(s); + + if( !validTime ) + { + try + { + struct tm tm = Time::ParseTimeString( s, Time::getDefaultTimeFormat() ); + validTime = true; + } + catch( BadlyFormedTimeString& e ) + { + LG_GTKFERRIS_D << "isValidTimeString() failing time:" << s << endl; + validTime = false; + } + } + + return validTime; + } + + void + ContextPropertiesEditor::updateTime( GtkEntry *entry, + const std::string& eaname, + const std::string& val ) + { + if( m_manuallySetting ) + return; + + LG_GTKFERRIS_D << "updateTime() eaname:" << eaname << " value:" << val << endl; + + GtkImage* indicator = (GtkImage*) + g_object_get_data( G_OBJECT(entry), GOBJ_INDICATOR_IMG_K ); + + if( !isValidTimeString( val ) ) + { + gtk_image_set_from_stock( indicator, GTK_STOCK_NO, GTK_ICON_SIZE_MENU ); + return; + } + gtk_image_set_from_stock( indicator, GTK_STOCK_YES, GTK_ICON_SIZE_MENU ); + + try + { + fh_attribute a = m_context->getAttribute( eaname ); + fh_iostream ss = a->getIOStream( ios::trunc ); + ss << val; + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Can not update time value for " << eaname + << "e:" << e.what(); + FerrisUI::RunErrorDialog( tostr(ss) ); + } + gtk_label_set_label( m_ctime, + getStrAttr( m_context, "ctime-display", "" ).c_str()); + } + + + string + ContextPropertiesEditor::getTimeEAName( GtkEntry* entry ) + { + string eaname = ""; +#define TWCOMP( a, b ) (((GtkWidget*)a) == ((GtkWidget*)b)) + if( TWCOMP( entry, m_atime )) eaname = "atime-display"; + if( TWCOMP( entry, m_mtime )) eaname = "mtime-display"; +#undef TWCOMP + return eaname; + } + + void + ContextPropertiesEditor::time_activated( GtkEntry *entry ) + { + if( m_manuallySetting ) + return; + + string eaname = getTimeEAName( entry ); + if( !eaname.length() ) + return; + + string val = tostr(entry); + updateTime( entry, eaname, val ); + } + + static void cpe_time_changed( GtkEditable* editable, gpointer user_data ) + { + ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; + cpe->time_changed( editable ); + } + + void + ContextPropertiesEditor::time_changed( GtkEditable* editable ) + { + LG_GTKFERRIS_D << "time_changed()" << endl; + + if( m_manuallySetting ) + return; + + string eaname = getTimeEAName( GTK_ENTRY(editable) ); + if( !eaname.length() ) + return; + + string val = tostr( GTK_ENTRY(editable) ); + updateTime( GTK_ENTRY(editable), eaname, val ); + } + + + + GtkWidget* + ContextPropertiesEditor::makeProtectionCheckBox() + { + GtkWidget* w = gtk_check_button_new(); + g_signal_connect_data( G_OBJECT( w ), "toggled", + G_CALLBACK (cpe_mode_toggled), this, 0, GConnectFlags(0)); + return w; + } + + + GtkMenu* + makeGroupsMenu( GtkMenu* menu ) + { + GtkMenuShell* m = GTK_MENU_SHELL(menu); + const int maxGroups = 100; + gid_t grouplist[ maxGroups + 1 ]; + int numGroups = 0; + GtkWidget* w; + + numGroups = getgroups( maxGroups, grouplist ); + + for( int i=0; igr_name, "" ); + w = gtk_menu_item_new_with_label( gr->gr_name ); + + gtk_menu_shell_append( m, w ); + g_object_set_data( G_OBJECT(w), GOBJ_GROUP_ID_K, (void*)grouplist[ i ] ); + } + + return menu; + } + + void + ContextPropertiesEditor::updateGroupWidget() + { + GtkMenu* menu = m_group->getMenu(); + if( menu ) + gtk_widget_destroy( GTK_WIDGET( menu )); + + menu = GTK_MENU( gtk_menu_new() ); + makeGroupsMenu( menu ); + m_group->setMenu( menu ); + + if( isBound( m_context )) + m_group->setLabel( getStrAttr( m_context, "group-owner-name", "" )); + } + + + bool + ContextPropertiesEditor::OnChangeGroup( + FerrisOptionMenu* fopm, + string oldLabel, + string newLabel ) + { + if( m_manuallySetting ) + return false; + + try + { + fh_attribute a = m_context->getAttribute( "group-owner-name" ); + fh_iostream ss = a->getIOStream( ios::trunc ); + ss << newLabel; + } + catch( exception& e ) + { + updateGroupWidget(); + + fh_stringstream ss; + ss << "Can not change the group of:" + << m_context->getURL() + << "e:" << e.what(); + FerrisUI::RunErrorDialog( tostr(ss) ); + return true; + } + return false; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + enum + { + TARGET_FERRIS_URL_LIST = 0, + TARGET_STRING + }; + + static GtkTargetEntry row_targets[] = { + { "text/ferris-url-list", 0, TARGET_FERRIS_URL_LIST }, + { "STRING", 0, TARGET_STRING }, + { "text/plain", 0, TARGET_STRING }, + { "text/uri-list", 0, TARGET_STRING }, + }; + + static void + cpe_mimeicon_drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time, + gpointer udata) + { + ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)udata; + cpe->mimeicon_drag_data_received( widget, context, x, y, data, info, time ); + } + + void + ContextPropertiesEditor::mimeicon_drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time ) + { + bool drag_finished = false; + + if ((data->length < 0) || (data->format != 8)) + { + gtk_drag_finish (context, FALSE, FALSE, time); + return; + } + + LG_GTKFERRIS_D << "mimeicon_drag_data_received()" << endl; + + try + { + + if( TARGET_FERRIS_URL_LIST == info && m_context ) + { + string s; + fh_stringstream ss; + ss << ((char*)data->data); + gtk_drag_finish (context, TRUE, FALSE, time); + drag_finished = true; + + if( GTK_WIDGET(widget) == GTK_WIDGET(m_explicitIcon) ) + { + string newIconPath = ""; + if( getline( ss, s )) + { + fh_context iconc = Resolve( s ); + newIconPath = iconc->getDirPath(); + LG_GTKFERRIS_D << "setting icon to:" << iconc->getDirPath() << endl; + LG_GTKFERRIS_D << " for context:" << m_context->getURL() << endl; + + setStrAttr( m_context, "ferris-iconname", iconc->getDirPath(), true, true ); + } + if( !newIconPath.empty() ) + gtk_image_set_from_file( m_explicitIcon, newIconPath.c_str()); + } + else if( GTK_WIDGET(widget) == GTK_WIDGET(m_mimetypeIcon) ) + { + string mimetype = getMimeName( m_context ); + + if( getline( ss, s )) + { + LG_GTKFERRIS_D << "mimeicon_drag_data_received()" + << " new image name:" << s + << endl; + fh_context iconc = Resolve( s ); + + fh_stringstream ss; + ss << "mime://" << mimetype; + fh_context c = Shell::acquireContext( tostr(ss) ); + + setStrAttr( c, "ferris-iconname", iconc->getDirPath(), true ); + } + gtk_image_set_from_file( m_mimetypeIcon, getMimeIcon(mimetype).c_str()); + } + } + else + { + fh_stringstream ss; + ss << "Got info:" << info << " data:" << ((char*)data->data) << endl; + RunInfoDialog( tostr(ss) ); + } + } + catch( exception& e ) + { + if( !drag_finished ) + { + drag_finished = true; + gtk_drag_finish (context, TRUE, FALSE, time); + } + + fh_stringstream ss; + ss << "Failed to set icon\n" + << "reason:" << e.what() << endl; +// cerr << tostr(ss); + FerrisUI::RunErrorDialog( tostr(ss) ); + } + + if( !drag_finished ) + gtk_drag_finish (context, TRUE, FALSE, time); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// static void recalc_du_sh_cb( GtkButton *button, gpointer user_data ) +// { +// ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; +// cpe->recalc_du_sh( button ); +// } + +// static gboolean +// recalc_du_sh_complete_cb( GIOChannel *source, +// GIOCondition condition, +// gpointer user_data ) +// { +// ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; +// return cpe->recalc_du_sh_complete( source, condition ); +// } + +// gboolean +// ContextPropertiesEditor::recalc_du_sh_complete( GIOChannel *source, +// GIOCondition condition ) +// { +// string s; +// getline( m_du_sh_fromChildss, s ); +// //m_du_sh_fromChildss >> s; +// LG_GTKFERRIS_D << "ContextPropertiesEditor::recalc_du_sh_complete() s:" << s << endl; +// gtk_label_set_label( m_du_sh, s.c_str() ); + +// // +// // Drain input +// // +// fh_stringstream ss; +// std::copy( std::istreambuf_iterator(m_du_sh_fromChildss), +// std::istreambuf_iterator(), +// std::ostreambuf_iterator(ss)); + + +// return 0; // dont call again +// } + +// void +// ContextPropertiesEditor::recalc_du_sh( GtkButton *button ) +// { +// fh_stringstream ss; +// fh_runner r = new Runner(); +// m_du_sh_runner = r; + +// // ss << " bash -c 'du -sh " << Shell::quote(m_context->getDirPath()) << " '"; +// // ss << "du -sh " << Shell::quote(m_context->getDirPath()); +// // LG_GTKFERRIS_D << "ContextPropertiesEditor::recalc_du_sh() cmd:" << tostr(ss) << endl; +// // r->setCommandLine( tostr(ss) ); + +// r->getArgv().push_back( "du" ); +// r->getArgv().push_back( "-s" ); +// r->getArgv().push_back( "-h" ); +// r->getArgv().push_back( "-s" ); +// r->getArgv().push_back( m_context->getDirPath() ); + +// r->setSpawnFlags( +// GSpawnFlags( +// G_SPAWN_SEARCH_PATH | +// G_SPAWN_FILE_AND_ARGV_ZERO | +// G_SPAWN_STDERR_TO_DEV_NULL | +// r->getSpawnFlags())); +// r->Run(); +// m_du_sh_fromChildss = r->getStdOut(); + +// // +// // We need to attach a callback for when data is available from the +// // child. +// // +// guint result; +// GIOChannel *channel; +// GIOCondition cond = GIOCondition(G_IO_IN | G_IO_ERR | G_IO_PRI); + +// channel = g_io_channel_unix_new( r->getStdOutFd() ); +// result = g_io_add_watch( channel, cond, recalc_du_sh_complete_cb, this ); +// g_io_channel_unref (channel); + +// gtk_label_set_label( m_du_sh, "working..." ); +// } + +// static gint du_sh_button_release_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data) +// { +// ContextPropertiesEditor* cpe = (ContextPropertiesEditor*)user_data; +// cpe->du_sh_button_release( widget, event ); +// } + +// gint +// ContextPropertiesEditor::du_sh_button_release( GtkWidget *widget, GdkEvent *event ) +// { +// GdkEventButton *event_button; + +// g_return_val_if_fail (widget != NULL, FALSE); +// g_return_val_if_fail (event != NULL, FALSE); + +// if (event->type == GDK_BUTTON_PRESS) +// { +// } +// if( event->type == GDK_BUTTON_RELEASE ) +// { +// event_button = (GdkEventButton *) event; + +// if (event_button->button == 3 && m_du_sh_runner ) +// { +// m_du_sh_runner->killChild(); +// gtk_label_set_label( m_du_sh, "killed." ); +// } +// } +// return FALSE; +// } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_runner + ContextPropertiesEditor::getRunner_du_sh( fh_SubprocessButtonAndLabel sp, fh_runner ) + { + if( !m_context ) + return 0; + + fh_runner rr = new Runner(); + + rr->getArgv().push_back( "du" ); + rr->getArgv().push_back( "-s" ); + rr->getArgv().push_back( "-h" ); + rr->getArgv().push_back( "-s" ); + rr->getArgv().push_back( m_context->getDirPath() ); + + rr->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | + G_SPAWN_STDERR_TO_DEV_NULL | + rr->getSpawnFlags())); + + return rr; + } + + + void + ContextPropertiesEditor::ensureWidgetsCreated() + { + if( m_userWidget ) + return; + + int r=0; + GtkWidget* lab; + GtkWidget* w; + GtkWidget* b; + FerrisOptionMenu* fopm; + GtkWidget* menubar; + GtkMenu* menu; + GtkMenuItem* mi; + GtkWidget* vbx; + + m_userWidget = vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + + + m_table = gtk_table_new ( 18, 4, false ); + + r=0; + w = gtk_label_new(""); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + + if( m_showURL ) + { + ++r; + w = gtk_label_new("url"); + m_url = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + } + + ++r; + w = gtk_label_new("Type icon"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + w = gtk_image_new_from_file( resolveToIconPath("icons://unknown.png").c_str()); + m_mimetypeIcon = GTK_IMAGE( w ); + /* Drop Target */ + gtk_drag_dest_set ( GTK_WIDGET(w), + GTK_DEST_DEFAULT_ALL, + row_targets, + G_N_ELEMENTS (row_targets), + GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE)); + gtk_signal_connect( GTK_OBJECT(w), "drag_data_received", + GTK_SIGNAL_FUNC( cpe_mimeicon_drag_data_received ), this ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + w = gtk_label_new(""); + m_mimetype = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + + + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + ++r; + w = gtk_label_new("Explicit icon"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + w = gtk_image_new_from_file( resolveToIconPath( ICON_NO_EXPLICIT ).c_str()); + m_explicitIcon = GTK_IMAGE( w ); + /* Drop Target */ + gtk_drag_dest_set ( GTK_WIDGET(w), + GTK_DEST_DEFAULT_ALL, + row_targets, + G_N_ELEMENTS (row_targets), + GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE)); + gtk_signal_connect( GTK_OBJECT(w), "drag_data_received", + GTK_SIGNAL_FUNC( cpe_mimeicon_drag_data_received ), this ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + + +#ifdef HAVE_LIBEXIF + ++r; + w = gtk_label_new("stored thumbnail"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + w = gtk_image_new_from_file( resolveToIconPath( ICON_NO_EXPLICIT ).c_str() ); + m_thumbIcon = GTK_IMAGE( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); +#endif + + ++r; + w = gtk_label_new(""); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 4, r, r+1 ); + + + ++r; + w = gtk_label_new("Owner"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_label_new("X"); + m_owner = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 4, r, r+1 ); + + ++r; + w = gtk_label_new("Group"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + + m_group = fopm = new FerrisOptionMenu(""); + updateGroupWidget(); + fopm->getLabelChangeSig().connect( sigc::mem_fun( *this, + &ContextPropertiesEditor::OnChangeGroup )); + gtk_table_attach_defaults(GTK_TABLE( m_table ), fopm->getWidget(), 1, 4, r, r+1 ); + + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + + ++r; + w = gtk_label_new("Read"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 2, r, r+1 ); + w = gtk_label_new("Write"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 2, 3, r, r+1 ); + w = gtk_label_new("Exec"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + w = gtk_label_new("Owner:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + m_owner_read = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 2, r, r+1 ); + m_owner_write = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 2, 3, r, r+1 ); + m_owner_exec = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + w = gtk_label_new("Group:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + m_group_read = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 2, r, r+1 ); + m_group_write = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 2, 3, r, r+1 ); + m_group_exec = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + w = gtk_label_new("Other:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + m_other_read = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 2, r, r+1 ); + m_other_write = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 2, 3, r, r+1 ); + m_other_exec = w = makeProtectionCheckBox(); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + + ++r; + w = gtk_label_new("protection:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_label_new("X"); + m_protection_ls_text = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 4, r, r+1 ); + + ++r; + w = gtk_label_new("octal:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_label_new("X"); + m_protection_ls_octal = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 4, r, r+1 ); + + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + + ++r; + w = gtk_label_new("atime:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_entry_new(); + m_atime = GTK_ENTRY( w ); + g_signal_connect_data( G_OBJECT( w ), "changed", + G_CALLBACK( cpe_time_changed ), this, + 0, GConnectFlags(0)); + g_signal_connect_data( G_OBJECT( w ), "activate", + G_CALLBACK( cpe_time_activated ), this, + 0, GConnectFlags(0)); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 3, r, r+1 ); + w = gtk_image_new_from_stock( GTK_STOCK_YES, GTK_ICON_SIZE_MENU ); + m_atime_is_valid = GTK_IMAGE( w ); + g_object_set_data( G_OBJECT(m_atime), GOBJ_INDICATOR_IMG_K, w ); + + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + w = gtk_label_new("mtime:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_entry_new(); + m_mtime = GTK_ENTRY( w ); + g_signal_connect_data( G_OBJECT( w ), "changed", + G_CALLBACK( cpe_time_changed ), this, + 0, GConnectFlags(0)); + g_signal_connect_data( G_OBJECT( w ), "activate", + G_CALLBACK( cpe_time_activated ), this, + 0, GConnectFlags(0)); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 3, r, r+1 ); + w = gtk_image_new_from_stock( GTK_STOCK_YES, GTK_ICON_SIZE_MENU ); + m_mtime_is_valid = GTK_IMAGE( w ); + g_object_set_data( G_OBJECT(m_mtime), GOBJ_INDICATOR_IMG_K, w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 3, 4, r, r+1 ); + + ++r; + w = gtk_label_new("ctime:"); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); + w = gtk_label_new(""); + m_ctime = GTK_LABEL( w ); + gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 4, r, r+1 ); + + ++r; + gtk_table_attach_defaults(GTK_TABLE(m_table), gtk_hseparator_new(), 0, 4, r, r+1 ); + + + ++r; + { + m_du_sh = new SubprocessButtonAndLabel( 0, "size" ); + m_du_sh->getUpdateRunnerSig().connect( sigc::mem_fun( *this, &_Self::getRunner_du_sh) ); + m_du_sh->setReplaceRegex( "(\\S+)\\s.*" ); + m_du_sh->setReplaceRegexFormat( "$1" ); + + gtk_table_attach_defaults(GTK_TABLE(m_table), m_du_sh->getButton(), 0, 1, r, r+1 ); + gtk_table_attach_defaults(GTK_TABLE(m_table), m_du_sh->getLabel(), 1, 4, r, r+1 ); + } + +// ++r; +// w = gtk_button_new_with_label("size"); +// m_recalc_du_sh = GTK_BUTTON( w ); +// gtk_signal_connect(GTK_OBJECT (w), "clicked", +// GTK_SIGNAL_FUNC(recalc_du_sh_cb), this ); +// gtk_signal_connect(GTK_OBJECT(w), "button_release_event", +// GTK_SIGNAL_FUNC (du_sh_button_release_cb), this ); +// gtk_widget_add_events( GTK_WIDGET( w ), +// GdkEventMask( GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK )); + +// gtk_table_attach_defaults(GTK_TABLE(m_table), w, 0, 1, r, r+1 ); +// w = gtk_label_new("..."); +// m_du_sh = GTK_LABEL( w ); +// gtk_table_attach_defaults(GTK_TABLE(m_table), w, 1, 4, r, r+1 ); + + + + gtk_box_pack_start(GTK_BOX(vbx), GTK_WIDGET(m_table), 0, 0, 0 ); + } + + void + ContextPropertiesEditor::updateProtectionLabels() + { + fh_context c = m_context; + + gtk_label_set_label( m_protection_ls_text, getStrAttr( c, "protection-ls", "" ).c_str()); + fh_stringstream ss; + ss << oct << toint(getStrAttr( c, "mode", "0" )); + gtk_label_set_label( m_protection_ls_octal, tostr(ss).c_str()); + } + + void + ContextPropertiesEditor::setContext( fh_context c ) + { + m_context = c; + + /* Set all the widgets to the data from the new context */ + m_manuallySetting = true; + + + LG_GTKFERRIS_D << "ContextPropertiesEditor::setContext() c:" << c->getURL() << endl; + string mimetype = getMimeName( c ); + + if( m_showURL ) + { + gtk_label_set_label( m_url, c->getURL().c_str() ); + } + gtk_label_set_label( m_mimetype, mimetype.c_str()); + gtk_image_set_from_file( m_mimetypeIcon, getMimeIcon(mimetype).c_str()); + if( m_explicitIcon ) + { + try + { + string iconpath = getStrAttr( c, "ferris-iconname", ICON_NO_EXPLICIT ); + iconpath = resolveToIconPath( iconpath ); + gtk_image_set_from_file( m_explicitIcon, iconpath.c_str() ); + LG_GTKFERRIS_D << "iconpath:" << iconpath << endl; + } + catch(...) + {} + } + if( m_thumbIcon ) + { + setImageFromExifThumb( m_thumbIcon, c ); + } + + + gtk_label_set_label( m_owner, getStrAttr( c, "user-owner-name", "" ).c_str()); + m_group->setLabel( getStrAttr( c, "group-owner-name", "" )); + + togButtonSet( m_owner_read, getStrAttr( c, "user-readable","" )); + togButtonSet( m_owner_write, getStrAttr( c, "user-writable","" )); + togButtonSet( m_owner_exec, getStrAttr( c, "user-executable","" )); + + togButtonSet( m_group_read, getStrAttr( c, "group-readable","" )); + togButtonSet( m_group_write, getStrAttr( c, "group-writable","" )); + togButtonSet( m_group_exec, getStrAttr( c, "group-executable","" )); + + togButtonSet( m_other_read, getStrAttr( c, "other-readable","" )); + togButtonSet( m_other_write, getStrAttr( c, "other-writable","" )); + togButtonSet( m_other_exec, getStrAttr( c, "other-executable","" )); + + updateProtectionLabels(); + + gtk_entry_set_text ( m_atime, getStrAttr( c, "atime-display", "" ).c_str()); + gtk_label_set_label( m_ctime, getStrAttr( c, "ctime-display", "" ).c_str()); + gtk_entry_set_text ( m_mtime, getStrAttr( c, "mtime-display", "" ).c_str()); + + if( isTrue( getStrAttr( c, "is-file", "0" ))) + { + m_du_sh->setToFinalState( getStrAttr( c, "size-human-readable", "error" ) ); +// gtk_label_set_label( m_du_sh, getStrAttr( c, "size-human-readable", "error" ).c_str() ); + } + + m_manuallySetting = false; + } + + fh_context + ContextPropertiesEditor::getContext() + { + return m_context; + } + + GtkWidget* + ContextPropertiesEditor::getWidget() + { + ensureWidgetsCreated(); + return m_userWidget; + } + + + + +}; diff --git a/FerrisUI/ContextPropertiesEditor.hh b/FerrisUI/ContextPropertiesEditor.hh new file mode 100644 index 0000000..1eeb6e6 --- /dev/null +++ b/FerrisUI/ContextPropertiesEditor.hh @@ -0,0 +1,185 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ContextPropertiesEditor.hh,v 1.4 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_CONTEXT_PROPERTIES_EDITOR_H_ +#define _ALREADY_INCLUDED_FERRISUI_CONTEXT_PROPERTIES_EDITOR_H_ + +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FerrisUI; + +namespace FerrisUI +{ + + class FERRISEXP_API ContextPropertiesEditor + : + public sigc::trackable + { + typedef ContextPropertiesEditor _Self; + + /** + * Context being edited + */ + fh_context m_context; + + /** + * Main top level widget that is returned to the user in getWidget() + */ + GtkWidget* m_userWidget; + + /** + * Signal handlers should ignore updates to data if this is true. It allows + * setContext() to setup the GUI and have the event handlers no try to + * change the context's data from the data that the widgets have just been + * set to in setContext() + */ + bool m_manuallySetting; + +// GtkWidget* m_menu; + + GtkWidget* m_table; + GtkLabel* m_url; + GtkLabel* m_mimetype; + GtkImage* m_mimetypeIcon; + GtkImage* m_explicitIcon; + GtkImage* m_thumbIcon; + + GtkLabel* m_owner; + FerrisOptionMenu* m_group; + GtkWidget* m_owner_read; + GtkWidget* m_owner_write; + GtkWidget* m_owner_exec; + + GtkWidget* m_group_read; + GtkWidget* m_group_write; + GtkWidget* m_group_exec; + + GtkWidget* m_other_read; + GtkWidget* m_other_write; + GtkWidget* m_other_exec; + + GtkLabel* m_protection_ls_text; + GtkLabel* m_protection_ls_octal; + + GtkEntry* m_atime; + GtkImage* m_atime_is_valid; + GtkLabel* m_ctime; + GtkEntry* m_mtime; + GtkImage* m_mtime_is_valid; + + fh_SubprocessButtonAndLabel m_du_sh; +// fh_runner m_du_sh_runner; +// fh_istream m_du_sh_fromChildss; +// GtkButton* m_recalc_du_sh; +// GtkLabel* m_du_sh; + + GtkWidget* makeProtectionCheckBox(); + /** + * If m_userWidget==0 then this method will create the gtk widgets, otherwise + * it does nothing + */ + void ensureWidgetsCreated(); + + /** + * Read the data from the context and update the widgets for protection + * (used for when the r/w/x checkboxes are toggled + */ + void updateProtectionLabels(); + + /** + * Modify the top menu based on what is selected + */ + void updateMenuShell(); + + /** + * Updates the group widget from the data of the m_context + */ + void updateGroupWidget(); + + /** + * if true then the url is shown with the rest of the data + */ + bool m_showURL; + + public: + + ContextPropertiesEditor(); + + void setContext( fh_context c ); + fh_context getContext(); + + GtkWidget* getWidget(); + + void setShowURL( bool v ); + + + + void mode_toggled( GtkToggleButton *togglebutton ); + + string getTimeEAName( GtkEntry* entry ); + void updateTime( GtkEntry *entry, + const std::string& eaname, + const std::string& val ); + void time_activated( GtkEntry *entry ); + void time_changed( GtkEditable* editable ); + + bool OnChangeGroup( FerrisOptionMenu* fopm, string oldLabel, string newLabel ); + + void mimeicon_drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time ); + + +// void recalc_du_sh( GtkButton *button ); +// gboolean recalc_du_sh_complete( GIOChannel *source, GIOCondition condition ); +// gint du_sh_button_release( GtkWidget *widget, GdkEvent *event ); + + fh_runner getRunner_du_sh( fh_SubprocessButtonAndLabel sp, fh_runner ); + + }; +}; +#endif diff --git a/FerrisUI/EditSQLColumns.cpp b/FerrisUI/EditSQLColumns.cpp new file mode 100644 index 0000000..4c71283 --- /dev/null +++ b/FerrisUI/EditSQLColumns.cpp @@ -0,0 +1,309 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EditSQLColumns.cpp,v 1.3 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; +using namespace Ferris; + +namespace FerrisUI +{ + static const char* const GOBJ_CELLID_K = "GOBJ_CELLID_K"; + + void EditSQLColumns_add_cb( GtkButton *button, gpointer user_data ) + { + EditSQLColumns* esl = (EditSQLColumns*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + + GtkTreeIter iter = esl->appendNewBlankItem(); + + GtkTreePath* path = gtk_tree_model_get_path( tm, &iter ); + GtkTreeViewColumn* col = gtk_tree_view_get_column( tv, EditSQLColumns::C_COLUMN_NAME ); + gtk_tree_view_set_cursor( tv, path, col, true ); + gtk_tree_path_free( path ); + } + + void EditSQLColumns_del_cb( GtkButton *button, gpointer user_data ) + { + EditSQLColumns* esl = (EditSQLColumns*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + list_gtktreeiter_t deliters = getIterList( w_treeview, true ); + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection ( tv ); + gtk_tree_selection_unselect_all( selection ); + + for( list_gtktreeiter_t::iterator iter = deliters.begin(); iter != deliters.end(); ++iter ) + { + gtk_tree_store_remove( ts, &(*iter) ); + } + } + + void EditSQLColumns_clear_cb( GtkButton *button, gpointer user_data ) + { + EditSQLColumns* esl = (EditSQLColumns*)user_data; + esl->clear(); + } + + + void EditSQLColumns_edited_cb ( GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data ) + { + EditSQLColumns* esl = (EditSQLColumns*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + gint cidx = GPOINTER_TO_INT(g_object_get_data( G_OBJECT( cell ), GOBJ_CELLID_K )); + cerr << "EditSQLColumns_edited_cb() cidx:" << cidx << " new_text:" << new_text << endl; + GtkTreeModel *model = GTK_TREE_MODEL (w_treemodel); + GtkTreeIter iter; + GtkTreePath *path = gtk_tree_path_new_from_string (path_string); + gtk_tree_model_get_iter (model, &iter, path); + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, cidx, new_text, -1); + gtk_tree_path_free (path); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + EditSQLColumns::EditSQLColumns() + : + w_treemodel( 0 ), + w_treeview( 0 ), + w_baseWidget( 0 ), + m_columnNameLabel( "column" ), + m_columnTypeLabel( "sql type" ), + m_descriptionLabel( "" ) + { + for( int i=0; i < C_COLUMN_COUNT; ++i ) + w_cols[ i ] = 0; + } + + EditSQLColumns::~EditSQLColumns() + { + } + + void + EditSQLColumns::setDescriptionLabel( const std::string& s ) + { + m_descriptionLabel = s; + } + + + stringmap_t + EditSQLColumns::getStringMap() + { + stringmap_t ret; + + list_gtktreeiter_t giters = getIterList( w_treeview ); + cerr << "giters.sz:" << giters.size() << endl; + + for( list_gtktreeiter_t::iterator iter = giters.begin(); + iter != giters.end(); ++iter ) + { + GtkTreeIter giter = *iter; + cerr << "sl:" << treestr( &giter, w_treeview, C_COLUMN_NAME ) << endl; + ret.insert( + make_pair( + treestr( &giter, w_treeview, C_COLUMN_NAME ), + treestr( &giter, w_treeview, C_COLUMN_TYPE ) + ) + ); + } + return ret; + } + + void + EditSQLColumns::setStringMap( const stringmap_t& sm ) + { + clear(); + + for( stringmap_t::const_iterator mi = sm.begin(); mi != sm.end(); ++mi ) + { + GtkTreeIter treeiter; + +// cerr << "setStringMap() first:" << mi->first +// << " second:" << mi->second +// << endl; + + gtk_tree_store_append( w_treemodel, &treeiter, NULL ); + gtk_tree_store_set( w_treemodel, &treeiter, + C_COLUMN_NAME, mi->first.c_str(), + C_COLUMN_TYPE, mi->second.c_str(), + -1 ); + } + } + + void + EditSQLColumns::clear() + { + if( w_treemodel ) + gtk_tree_store_clear( w_treemodel ); + } + + GtkTreeIter + EditSQLColumns::appendNewBlankItem() + { + GtkTreeIter iter; + const char* d = ""; + gtk_tree_store_append( w_treemodel, &iter, NULL ); + gtk_tree_store_set( w_treemodel, &iter, + EditSQLColumns::C_COLUMN_NAME, "new", + EditSQLColumns::C_COLUMN_TYPE, "int", + -1 ); + return iter; + } + + GtkWidget* + EditSQLColumns::getWidget() + { + if( w_baseWidget ) + return w_baseWidget; + + GtkWidget* page = w_baseWidget = gtk_table_new ( 1, 1, false ); + + int colcount = 1; + int r=0; + int c=0; + GtkWidget* b; + GtkWidget* lab; + GtkToolbar* tb = GTK_TOOLBAR(gtk_toolbar_new()); + GtkWidget* vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + GtkWidget* hbx = GTK_WIDGET(gtk_hbox_new(0,0)); + + if( !m_descriptionLabel.empty() ) + { + lab = gtk_label_new( m_descriptionLabel.c_str() ); + gtk_box_pack_start(GTK_BOX(vbx), lab, 0, 0, 0 ); + } + + b = gtk_toolbar_append_item( tb, "New", + "create a new string", "", + gtk_image_new_from_stock( + GTK_STOCK_NEW, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditSQLColumns_add_cb), + this ); + b = gtk_toolbar_append_item( tb, "Delete", + "delete selected string(s)", "", + gtk_image_new_from_stock( + GTK_STOCK_DELETE, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditSQLColumns_del_cb), + this ); + b = gtk_toolbar_append_item( tb, "Clear", + "clear all items", "", + gtk_image_new_from_stock( + GTK_STOCK_CLEAR, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditSQLColumns_clear_cb), + this ); + + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( tb )); + gtk_box_pack_start(GTK_BOX(vbx), hbx, 0, 0, 0 ); + gtk_table_attach_defaults(GTK_TABLE(page), GTK_WIDGET(vbx), c, c+colcount, r, r+1 ); + ++r; c=0; + + w_treemodel = gtk_tree_store_new( C_COLUMN_COUNT, G_TYPE_STRING, G_TYPE_STRING ); + w_treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL( w_treemodel )); +// gtk_box_pack_start(GTK_BOX(vbx), GTK_WIDGET(w_treeview), 1, 1, 0 ); + GtkWidget* sw; + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_container_add( GTK_CONTAINER( sw ), GTK_WIDGET( w_treeview )); +// gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), GTK_WIDGET( vbx )); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start(GTK_BOX(vbx), GTK_WIDGET(sw), 1, 1, 0 ); +// gtk_table_attach(GTK_TABLE(page), sw, c, c+colcount, r, r+1, +// GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), +// GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), +// 0, 0 ); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (w_treeview), TRUE); + GObject *selection; + selection = G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (w_treeview))); + gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection), GTK_SELECTION_MULTIPLE); + gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_search_column(GTK_TREE_VIEW (w_treeview), C_COLUMN_NAME ); + + /* Setup view */ + GtkCellRenderer* ren; + int col = 0; + + + col = C_COLUMN_NAME; + ren = gtk_cell_renderer_text_new (); + g_object_set_data( G_OBJECT( ren ), GOBJ_CELLID_K, GINT_TO_POINTER(col) ); + g_object_set(ren, "editable", 1, 0 ); + g_signal_connect_data( G_OBJECT( ren ), "edited", + G_CALLBACK (EditSQLColumns_edited_cb), + (gpointer)this, 0, + GConnectFlags(0)); + w_cols[ col ] = gtk_tree_view_column_new_with_attributes( + m_columnNameLabel.c_str(), ren, + "text", col, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ col ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ col ], col ); + + + col = C_COLUMN_TYPE; + ren = gtk_cell_renderer_text_new (); + g_object_set_data( G_OBJECT( ren ), GOBJ_CELLID_K, GINT_TO_POINTER(col) ); + g_object_set(ren, "editable", 1, 0 ); + g_signal_connect_data( G_OBJECT( ren ), "edited", + G_CALLBACK (EditSQLColumns_edited_cb), + (gpointer)this, 0, + GConnectFlags(0)); + w_cols[ col ] = gtk_tree_view_column_new_with_attributes( + m_columnTypeLabel.c_str(), ren, + "text", col, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ col ] ); + + return w_baseWidget; + } + + +}; + diff --git a/FerrisUI/EditSQLColumns.hh b/FerrisUI/EditSQLColumns.hh new file mode 100644 index 0000000..e20d183 --- /dev/null +++ b/FerrisUI/EditSQLColumns.hh @@ -0,0 +1,117 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EditSQLColumns.hh,v 1.2 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_EDIT_SQL_COLUMNS_H_ +#define _ALREADY_INCLUDED_FERRISUI_EDIT_SQL_COLUMNS_H_ + +#include + +#include + +#include + +#include + +namespace FerrisUI +{ + class FERRISEXP_API EditSQLColumns + : + public Ferris::Handlable + { + friend void EditSQLColumns_add_cb( GtkButton *button, gpointer user_data ); + friend void EditSQLColumns_del_cb( GtkButton *button, gpointer user_data ); + friend void EditSQLColumns_clear_cb( GtkButton *button, gpointer user_data ); + friend void EditSQLColumns_edited_cb( GtkCellRendererText *cell, + gchar *path_string, + gchar *new_text, + gpointer user_data ); + + + protected: + + enum { + C_COLUMN_NAME=0, + C_COLUMN_TYPE=1, + C_COLUMN_COUNT=2 + }; + GtkTreeStore* w_treemodel; + GtkWidget* w_treeview; + GtkTreeViewColumn* w_cols[ C_COLUMN_COUNT ]; + GtkWidget* w_baseWidget; + + std::string m_columnNameLabel; + std::string m_columnTypeLabel; + std::string m_descriptionLabel; + + public: + + EditSQLColumns(); + virtual ~EditSQLColumns(); + + /** + * Set the description string for this string list + * call before getWidget() + */ + void setDescriptionLabel( const std::string& s ); + + /** + * Get the current contents of the string list + * call AFTER getWidget() + */ + Ferris::stringmap_t getStringMap(); + + /** + * set the content of the string list + * call AFTER getWidget() + */ + void setStringMap( const Ferris::stringmap_t& sm ); + + /** + * Get the GTK+ view for this string editing component. + */ + GtkWidget* getWidget(); + + /** + * clear the stringlist + * call AFTER getWidget() + */ + void clear(); + + /** + * add a new blank item + * call AFTER getWidget() + */ + GtkTreeIter appendNewBlankItem(); + + }; + + FERRIS_SMARTPTR( EditSQLColumns, fh_editsqlcolumns ); + +}; +#endif diff --git a/FerrisUI/EditStringList.cpp b/FerrisUI/EditStringList.cpp new file mode 100644 index 0000000..c0c3dff --- /dev/null +++ b/FerrisUI/EditStringList.cpp @@ -0,0 +1,279 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EditStringList.cpp,v 1.2 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; +using namespace Ferris; + +namespace FerrisUI +{ + void EditStringList_add_cb( GtkButton *button, gpointer user_data ) + { + EditStringList* esl = (EditStringList*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + + GtkTreeIter iter = esl->appendNewBlankItem(); + + GtkTreePath* path = gtk_tree_model_get_path( tm, &iter ); + GtkTreeViewColumn* col = gtk_tree_view_get_column( tv, EditStringList::C_STRING_COLUMN ); + gtk_tree_view_set_cursor( tv, path, col, true ); + gtk_tree_path_free( path ); + } + + void EditStringList_del_cb( GtkButton *button, gpointer user_data ) + { + EditStringList* esl = (EditStringList*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + list_gtktreeiter_t deliters = getIterList( w_treeview, true ); + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection ( tv ); + gtk_tree_selection_unselect_all( selection ); + + for( list_gtktreeiter_t::iterator iter = deliters.begin(); iter != deliters.end(); ++iter ) + { + gtk_tree_store_remove( ts, &(*iter) ); + } + } + + void EditStringList_clear_cb( GtkButton *button, gpointer user_data ) + { + EditStringList* esl = (EditStringList*)user_data; + esl->clear(); + } + + + void EditStringList_edited_cb (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data) + { + EditStringList* esl = (EditStringList*)user_data; + GtkTreeStore* w_treemodel = esl->w_treemodel; + GtkWidget* w_treeview = esl->w_treeview; + + int cidx = (int)EditStringList::C_STRING_COLUMN; + GtkTreeModel *model = GTK_TREE_MODEL (w_treemodel); + GtkTreeIter iter; + GtkTreePath *path = gtk_tree_path_new_from_string (path_string); + gtk_tree_model_get_iter (model, &iter, path); + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, cidx, new_text, -1); + gtk_tree_path_free (path); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + EditStringList::EditStringList() + : + w_treemodel( 0 ), + w_treeview( 0 ), + w_baseWidget( 0 ), + m_columnLabel( "string" ), + m_descriptionLabel( "" ) + { + for( int i=0; i < C_COLUMN_COUNT; ++i ) + w_cols[ i ] = 0; + } + + EditStringList::~EditStringList() + { + } + + void + EditStringList::setDescriptionLabel( const std::string& s ) + { + m_descriptionLabel = s; + } + + + void + EditStringList::setColumnLabel( const std::string& s ) + { + m_columnLabel = s; + } + + stringlist_t + EditStringList::getStringList() + { + stringlist_t sl; + list_gtktreeiter_t giters = getIterList( w_treeview ); + cerr << "giters.sz:" << giters.size() << endl; + + for( list_gtktreeiter_t::iterator iter = giters.begin(); iter != giters.end(); ++iter ) + { + GtkTreeIter giter = *iter; + cerr << "sl:" << treestr( &giter, w_treeview, C_STRING_COLUMN ) << endl; + sl.push_back( treestr( &giter, w_treeview, C_STRING_COLUMN ) ); + } + return sl; + } + + void + EditStringList::setStringList( const stringlist_t& sl ) + { + clear(); + + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + GtkTreeIter treeiter; + gtk_tree_store_append( w_treemodel, &treeiter, NULL ); + gtk_tree_store_set( w_treemodel, &treeiter, + C_STRING_COLUMN, si->c_str(), + -1 ); + } + } + + void + EditStringList::clear() + { + if( w_treemodel ) + gtk_tree_store_clear( w_treemodel ); + } + + GtkTreeIter + EditStringList::appendNewBlankItem() + { + GtkTreeIter iter; + const char* d = ""; + gtk_tree_store_append( w_treemodel, &iter, NULL ); + gtk_tree_store_set( w_treemodel, &iter, + EditStringList::C_STRING_COLUMN, d, + -1 ); + return iter; + } + + GtkWidget* + EditStringList::getWidget() + { + if( w_baseWidget ) + return w_baseWidget; + + GtkWidget* page = w_baseWidget = gtk_table_new ( 1, 1, false ); + + int colcount = 1; + int r=0; + int c=0; + GtkWidget* b; + GtkWidget* lab; + GtkToolbar* tb = GTK_TOOLBAR(gtk_toolbar_new()); + GtkWidget* vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + GtkWidget* hbx = GTK_WIDGET(gtk_hbox_new(0,0)); + + if( !m_descriptionLabel.empty() ) + { + lab = gtk_label_new( m_descriptionLabel.c_str() ); + gtk_box_pack_start(GTK_BOX(vbx), lab, 0, 0, 0 ); + } + + b = gtk_toolbar_append_item( tb, "New", + "create a new string", "", + gtk_image_new_from_stock( + GTK_STOCK_NEW, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditStringList_add_cb), + this ); + b = gtk_toolbar_append_item( tb, "Delete", + "delete selected string(s)", "", + gtk_image_new_from_stock( + GTK_STOCK_DELETE, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditStringList_del_cb), + this ); + b = gtk_toolbar_append_item( tb, "Clear", + "clear all items", "", + gtk_image_new_from_stock( + GTK_STOCK_CLEAR, + GTK_ICON_SIZE_LARGE_TOOLBAR ), + GTK_SIGNAL_FUNC(EditStringList_clear_cb), + this ); + + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( tb )); + gtk_box_pack_start(GTK_BOX(vbx), hbx, 0, 0, 0 ); + gtk_table_attach_defaults(GTK_TABLE(page), GTK_WIDGET(vbx), c, c+colcount, r, r+1 ); + ++r; c=0; + + w_treemodel = gtk_tree_store_new( C_COLUMN_COUNT, G_TYPE_STRING ); + w_treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL( w_treemodel )); +// gtk_box_pack_start(GTK_BOX(vbx), GTK_WIDGET(w_treeview), 1, 1, 0 ); + GtkWidget* sw; + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_container_add( GTK_CONTAINER( sw ), GTK_WIDGET( w_treeview )); +// gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), GTK_WIDGET( vbx )); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start(GTK_BOX(vbx), GTK_WIDGET(sw), 1, 1, 0 ); +// gtk_table_attach(GTK_TABLE(page), sw, c, c+colcount, r, r+1, +// GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), +// GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), +// 0, 0 ); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (w_treeview), TRUE); + GObject *selection; + selection = G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (w_treeview))); + gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection), GTK_SELECTION_MULTIPLE); + gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_search_column(GTK_TREE_VIEW (w_treeview), C_STRING_COLUMN ); + + /* Setup view */ + GtkCellRenderer* ren; + ren = gtk_cell_renderer_text_new (); + g_object_set(ren, "editable", 1, 0 ); + g_signal_connect_data( G_OBJECT( ren ), "edited", + G_CALLBACK (EditStringList_edited_cb), + (gpointer)this, 0, + GConnectFlags(0)); + + w_cols[ C_STRING_COLUMN ] = + gtk_tree_view_column_new_with_attributes( m_columnLabel.c_str(), ren, + "text", C_STRING_COLUMN, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), + w_cols[ C_STRING_COLUMN ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ C_STRING_COLUMN ], + C_STRING_COLUMN ); + + return w_baseWidget; + } + + +}; + diff --git a/FerrisUI/EditStringList.hh b/FerrisUI/EditStringList.hh new file mode 100644 index 0000000..39d95af --- /dev/null +++ b/FerrisUI/EditStringList.hh @@ -0,0 +1,118 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: EditStringList.hh,v 1.2 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_EDIT_STRING_LIST_H_ +#define _ALREADY_INCLUDED_FERRISUI_EDIT_STRING_LIST_H_ + +#include + +#include + +#include + +#include + +namespace FerrisUI +{ + class FERRISEXP_API EditStringList + : + public Ferris::Handlable + { + friend void EditStringList_add_cb( GtkButton *button, gpointer user_data ); + friend void EditStringList_del_cb( GtkButton *button, gpointer user_data ); + friend void EditStringList_clear_cb( GtkButton *button, gpointer user_data ); + friend void EditStringList_edited_cb (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer udata); + + protected: + + enum { + C_STRING_COLUMN=0, + C_COLUMN_COUNT + }; + GtkTreeStore* w_treemodel; + GtkWidget* w_treeview; + GtkTreeViewColumn* w_cols[C_COLUMN_COUNT]; + GtkWidget* w_baseWidget; + + std::string m_columnLabel; + std::string m_descriptionLabel; + + public: + + EditStringList(); + virtual ~EditStringList(); + + /** + * Set the description string for this string list + * call before getWidget() + */ + void setDescriptionLabel( const std::string& s ); + + /** + * set the name for the column header + * call before getWidget() + */ + void setColumnLabel( const std::string& s ); + + /** + * Get the current contents of the string list + * call AFTER getWidget() + */ + Ferris::stringlist_t getStringList(); + + /** + * set the content of the string list + * call AFTER getWidget() + */ + void setStringList( const Ferris::stringlist_t& sl ); + + /** + * Get the GTK+ view for this string editing component. + */ + GtkWidget* getWidget(); + + /** + * clear the stringlist + * call AFTER getWidget() + */ + void clear(); + + /** + * add a new blank item + * call AFTER getWidget() + */ + GtkTreeIter appendNewBlankItem(); + + }; + + FERRIS_SMARTPTR( EditStringList, fh_editstringlist ); + +}; +#endif diff --git a/FerrisUI/FerrisCopyUI.cpp b/FerrisUI/FerrisCopyUI.cpp new file mode 100644 index 0000000..a3d66c7 --- /dev/null +++ b/FerrisUI/FerrisCopyUI.cpp @@ -0,0 +1,430 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cp + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCopyUI.cpp,v 1.5 2010/09/24 21:31:04 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +namespace FerrisUI +{ + static int alarmed = 0; + + static void sig_alarm( int signo ) + { + alarmed = 1; + return; + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + FerrisCopy_FileCompareWindow::FerrisCopy_FileCompareWindow( + GTK_TreeWalkClient* twc, + FerrisCopy* fc ) + : + twc( twc ), fc( fc ) + { + } + + bool + FerrisCopy_FileCompareWindow::perform( fh_context src, fh_context dst ) + { + if( isContextInList( AlwaysPermitMatchers, dst ) ) + { + return true; + } + + if( isContextInList( AlwaysDenyMatchers, dst ) ) + { + return false; + } + + twc->showMainWindow( true ); + createMainWindow( "Replace?" ); + populateList( src, dst ); + return processMainWindow(); + } + + + + void + FerrisCopy_FileCompareWindow::dialog_yes( GtkButton *button ) + { + m_result = true; + m_looping = false; + } + + void + FerrisCopy_FileCompareWindow::dialog_auto_yes( GtkButton *button ) + { + const MatchData_t& endlist = getMatchingDests(); + if( endlist.empty() ) + { + fh_stringstream ss; + ss << "By not selecting a predicate you are wishing to copy all files" + << nl << " Automatically copy all?"; + if( !RunQuestionDialog( tostr(ss), GTK_WIDGET(m_win) ) ) + { + return; + } + fc->setInteractive( false ); + fc->setForceOverWrite( true ); + } + else + { + fh_matcher m = Ferris::Factory::ComposeEqualsMatcher( endlist ); + AlwaysPermitMatchers.push_back( m ); + } + m_result = true; + m_looping = false; + } + + + void + FerrisCopy_FileCompareWindow::dialog_auto_no( GtkButton *button ) + { + const MatchData_t& endlist = getMatchingDests(); + if( endlist.empty() ) + { + fh_stringstream ss; + ss << "You must highlight atleast one row of the auto column"; + RunInfoDialog( tostr(ss), GTK_WIDGET(m_win) ); + return; + } + else + { + fh_matcher m = Ferris::Factory::ComposeEqualsMatcher( endlist ); + AlwaysDenyMatchers.push_back( m ); + } + + m_result = false; + m_looping = false; + } + + void + FerrisCopy_FileCompareWindow::dialog_no( GtkButton *button ) + { + m_result = false; + m_looping = false; + } + + + void + FerrisCopy_FileCompareWindow::processAllPendingEvents() + { + twc->processAllPendingEvents(); + } + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + FerrisCopy_SignalHandler::FerrisCopy_SignalHandler( + GTK_TreeWalkClient* twc, + FerrisCopy* fc ) + : + twc( twc ), fc( fc ), + fcwin( twc, fc ), + alwaysPreserveExisting( false ), + alarmsPerSecond(4) + { + attach(); + } + + void + FerrisCopy_SignalHandler::attach() + { + fc->getCopyStartSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyStart )); + fc->getCopyPorgressSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyProgress )); + fc->getCopyEndSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyEnd )); + fc->getCopyVerboseSignal().connect( sigc::mem_fun( *this, &_Self::OnCopyVerbose )); + fc->getSkippingContextSignal().connect( sigc::mem_fun( *this, &_Self::OnSkippingContext )); + fc->getAskReplaceContextSignal().connect( sigc::mem_fun( *this,&_Self::OnAskReplaceContext)); + fc->getAskReplaceAttributeSignal().connect( sigc::mem_fun( *this,&_Self::OnAskReplaceAttribute)); + } + + + void + FerrisCopy_SignalHandler::OnCopyStart( FerrisCopy& thisobj, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + gtk_progress_bar_set_fraction( twc->m_progress, 0.0 ); + gtk_progress_bar_set_text( twc->m_progress, "0" ); + twc->updateStartTime(); + twc->processAllPendingEvents(); + gettimeofday( &ocopytv, 0 ); + ocopysz = 0; + copyAlarmCount = 0; + } + + void + FerrisCopy_SignalHandler::OnCopyProgress( FerrisCopy& cp, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + gdouble perc = CurrentPosition; + perc /= FinalSize; + + if( alarmed ) + { + if( GtkProgressBar* p = twc->m_progress ) + { + gtk_progress_bar_set_fraction( p, perc ); + fh_stringstream ss; + ss << Util::convertByteString(CurrentPosition) + << " / " + << Util::convertByteString(FinalSize) + << flush; + gtk_progress_bar_set_text( p, tostr(ss).c_str() ); + } + updateOverallProgress( cp ); + + + ++copyAlarmCount; + + if( !( copyAlarmCount % (alarmsPerSecond*3) )) + { + std::streamsize sizedelta = (CurrentPosition - ocopysz); + struct timeval ncopytv; + gettimeofday( &ncopytv, 0 ); + double secdelta = ncopytv.tv_sec - ocopytv.tv_sec; + double ntimed = ncopytv.tv_usec / 1000000.0 + secdelta; + double otimed = ocopytv.tv_usec / 1000000.0; + double timedelta = ntimed - otimed; + double CPS = sizedelta / timedelta; + +// cerr << " sizedelta:" << sizedelta +// << " ns:" << ncopytv.tv_sec << " nus:" << ncopytv.tv_usec +// << " os:" << ocopytv.tv_sec << " ous:" << ocopytv.tv_usec +// << " ntimed:" << ntimed +// << " otimed:" << otimed +// << " timedelta:" << timedelta +// << " CPS:" << CPS +// << endl; + + gtk_label_set_text( GTK_LABEL(twc->m_speedlab), + Util::convertByteString( (guint64)CPS ).c_str() ); + + ocopysz = CurrentPosition; + ocopytv = ncopytv; + } + + + if( !( copyAlarmCount % (alarmsPerSecond) )) + { + twc->updateElapsedTime(); + } + + twc->processAllPendingEvents(); + restartTimer(); + } + } + + void + FerrisCopy_SignalHandler::OnCopyEnd( FerrisCopy& cp, + std::streamsize CurrentPosition, + std::streamsize BlockSize, + std::streamsize FinalSize ) + { + gtk_label_set_text( GTK_LABEL(twc->m_srclab), "" ); + gtk_label_set_text( GTK_LABEL(twc->m_dstlab), "" ); + gtk_label_set_text( GTK_LABEL(twc->m_speedlab), "" ); + gtk_progress_bar_set_fraction( twc->m_progress, 1.0 ); + gtk_progress_bar_set_text( twc->m_progress, "100%" ); + updateOverallProgress( cp ); + } + + void + FerrisCopy_SignalHandler::updateOverallProgress( FerrisCopy& cp ) + { + if( GtkProgressBar* p = twc->m_overall_progress ) + { + gtk_progress_bar_set_fraction( p, cp.getTotalPercentageOfBytesCopied() ); + fh_stringstream ss; + ss << Util::convertByteString(cp.getTotalBytesCopied()) + << " / " + << Util::convertByteString(cp.getTotalBytesToCopy()) + << flush; +// cerr << "updateOverallProgress() total:" << cp.getTotalBytesToCopy() +// << " done:" << cp.getTotalBytesCopied() +// << " remaining:" << (cp.getTotalBytesToCopy()-cp.getTotalBytesCopied()) +// << endl; + gtk_progress_bar_set_text( p, tostr(ss).c_str() ); + } + } + + void + FerrisCopy_SignalHandler::restartTimer() + { + Util::SingleShot virgin; + + if( virgin() ) + { + if( signal( SIGALRM, sig_alarm ) == SIG_ERR ) + { + cerr << "Can not attach sigalarm" << endl; + } + } + + alarmed = 0; + struct itimerval t; + t.it_interval.tv_sec = 0; + t.it_interval.tv_usec = 0; + t.it_value.tv_sec = 0; + t.it_value.tv_usec = 1000000/alarmsPerSecond; + setitimer( ITIMER_REAL, &t, 0 ); + } + + void + FerrisCopy_SignalHandler::OnCopyVerbose( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + string srcDescription, + string dstDescription ) + { + gtk_label_set_text( GTK_LABEL(twc->m_srclab), srcDescription.c_str() ); + gtk_label_set_text( GTK_LABEL(twc->m_dstlab), dstDescription.c_str() ); + twc->processAllPendingEvents(); + } + + void + FerrisCopy_SignalHandler::OnSkippingContext( FerrisCopy& thisobj, + string srcDescription, + string reason ) + { + GtkTreeIter iter; + gtk_tree_store_append( twc->m_skipmodel, &iter, 0 ); + gtk_tree_store_set( twc->m_skipmodel, &iter, + GTK_TreeWalkClient::SKIP_REASON, reason.c_str(), + GTK_TreeWalkClient::SKIP_DESC, srcDescription.c_str(), + -1 ); + } + + bool + FerrisCopy_SignalHandler::OnAskReplaceContext( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + string srcDescription, + string dstDescription ) + { + if( alwaysPreserveExisting ) + { + return false; + } + + fc->hadUserInteraction = true; + gtk_label_set_text( GTK_LABEL(twc->m_srclab), srcDescription.c_str() ); + gtk_label_set_text( GTK_LABEL(twc->m_dstlab), dstDescription.c_str() ); + return fcwin.perform( src, dst ); + } + + bool + FerrisCopy_SignalHandler::OnAskReplaceAttribute( FerrisCopy& thisobj, + fh_context src, + fh_context dst, + string srcDescription, + string dstDescription, + fh_attribute dstattr ) + { + if( alwaysPreserveExisting ) + { + return false; + } + + fc->hadUserInteraction = true; + fh_stringstream msgss; + msgss << "Replace " << dstDescription; + GtkWidget* d = gtk_message_dialog_new + ( 0, + GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_NONE, + tostr(msgss).c_str(), + 0 ); + + enum + { + RESP_SMALLEST = 1, + RESP_ALWAYS = 1, + RESP_NO, + RESP_PRESERVE, + RESP_STOP, + RESP_YES, + RESP_SIZE + }; + gtk_dialog_add_buttons( GTK_DIALOG(d), + "_always", RESP_ALWAYS, + "_no", RESP_NO, + "_preserve all existing", RESP_PRESERVE, + "_stop everything", RESP_STOP, + "_yes", RESP_YES, + 0 ); + gtk_widget_show_all( d ); + gint rc = -1; + while( rc < RESP_SMALLEST || rc > RESP_SIZE ) + { + rc = gtk_dialog_run (GTK_DIALOG (d)); + } + gtk_widget_destroy( d ); + + switch( rc ) + { + case RESP_ALWAYS: + fc->setInteractive( false ); + return true; + case RESP_NO: + return false; + + case RESP_PRESERVE: + alwaysPreserveExisting = true; + return false; + + case RESP_STOP: + cout << "User requested to stop" << endl; + exit(0); + + case RESP_YES: + return true; + } + + return false; + } + + +}; diff --git a/FerrisUI/FerrisCopyUI.hh b/FerrisUI/FerrisCopyUI.hh new file mode 100644 index 0000000..fe64aa8 --- /dev/null +++ b/FerrisUI/FerrisCopyUI.hh @@ -0,0 +1,121 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cp + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisCopyUI.hh,v 1.4 2011/06/18 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_COPY_UI_H_ +#define _ALREADY_INCLUDED_FERRIS_COPY_UI_H_ + +#include + +#include + +#include +#include + + +namespace FerrisUI +{ + using namespace Ferris; + + class FERRISEXP_API FerrisCopy_FileCompareWindow + : + public FileCompareWindow + { + typedef FerrisCopy_FileCompareWindow _Self; + typedef FileCompareWindow _Base; + + GTK_TreeWalkClient* twc; + FerrisCopy* fc; + + protected: + virtual void dialog_yes( GtkButton *button ); + virtual void dialog_auto_yes( GtkButton *button ); + virtual void dialog_auto_no( GtkButton *button ); + virtual void dialog_no( GtkButton *button ); + + public: + virtual void processAllPendingEvents(); + FerrisCopy_FileCompareWindow( GTK_TreeWalkClient* twc, FerrisCopy* fc ); + bool perform( fh_context src, fh_context dst ); + + }; + + + /** + * Attaches to a FerrisCopy object's signals and updates a + * TreeWalkerClient with data from those signals. + */ + class FERRISEXP_API FerrisCopy_SignalHandler + : + public Handlable + { + typedef FerrisCopy_SignalHandler _Self; + + int alarmsPerSecond; + bool alwaysPreserveExisting; + + FerrisCopy_FileCompareWindow fcwin; + friend class FerrisMove_GTK; + + std::streamsize ocopysz; + struct timeval ocopytv; + int copyAlarmCount; + GTK_TreeWalkClient* twc; + FerrisCopy* fc; + + void attach(); + + void updateOverallProgress( FerrisCopy& cp ); + + public: + + FerrisCopy_SignalHandler( GTK_TreeWalkClient* twc, FerrisCopy* fc ); + + void restartTimer(); + + void OnCopyStart( FerrisCopy& thisobj, std::streamsize CurrentPosition, + std::streamsize BlockSize, std::streamsize FinalSize ); + void OnCopyProgress( FerrisCopy& thisobj, std::streamsize CurrentPosition, + std::streamsize BlockSize, std::streamsize FinalSize ); + void OnCopyEnd( FerrisCopy& thisobj, std::streamsize CurrentPosition, + std::streamsize BlockSize, std::streamsize FinalSize ); + + void OnCopyVerbose( FerrisCopy& thisobj, fh_context src, fh_context dst, + std::string srcDescription, std::string dstDescription ); + void OnSkippingContext( FerrisCopy& thisobj, std::string srcDescription, + std::string reason ); + bool OnAskReplaceContext( FerrisCopy& thisobj, fh_context src, fh_context dst, + std::string srcDescription, std::string dstDescription ); + bool OnAskReplaceAttribute( FerrisCopy& thisobj, fh_context src, fh_context dst, + std::string srcDescription, std::string dstDescription, + fh_attribute dstattr ); + }; + + +}; +#endif diff --git a/FerrisUI/FerrisOptionMenu.cpp b/FerrisUI/FerrisOptionMenu.cpp new file mode 100644 index 0000000..39d18fe --- /dev/null +++ b/FerrisUI/FerrisOptionMenu.cpp @@ -0,0 +1,311 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Ferris UI + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisOptionMenu.cpp,v 1.2 2010/09/24 21:31:05 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "GtkFerris.hh" +#include "FerrisOptionMenu.hh" + +using namespace std; + +namespace FerrisUI +{ + static const char* GOBJ_MENU_K = "GOBJ_MENU_K"; + static const char* GOBJ_BASE_K = "GOBJ_BASE_K"; + + static gint fopm_menu_button(GtkWidget *widget, GdkEvent *event, gpointer user_data ) + { + FerrisOptionMenu* fopm = (FerrisOptionMenu*)user_data; + return fopm->menu_button( widget, event ); + } + + static void fopm_menu_activate( GtkMenuItem *menuitem, gpointer user_data ) + { + FerrisOptionMenu* fopm = (FerrisOptionMenu*)user_data; + return fopm->menu_activate( menuitem ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FerrisOptionMenu::FerrisOptionMenu( const std::string& label, + const std::string& iconpath ) + : + m_label( label ), + m_iconpath( iconpath ), + m_menu( 0 ), + m_userwidget( 0 ), + MaxButtonTextLength( -1 ), + MaxMenuElementsPerContext( 30 ), + m_button( 0 ) + { + setLabel( label ); + } + + void + FerrisOptionMenu::menu_activate( GtkMenuItem *menuitem ) + { + GtkWidget* button = GTK_WIDGET(g_object_get_data( G_OBJECT(menuitem), GOBJ_BASE_K )); + + setLabel( tostr(menuitem) ); + } + + void + FerrisOptionMenu::setLabel( const std::string& s ) + { + if( getLabelChangeSig().emit( this, m_label, s ) ) + return; + + m_label = s; + string l = s; + if( MaxButtonTextLength > 0 ) + l = s.substr( 0, MaxButtonTextLength ); + + if( m_button ) + gtk_button_set_label( GTK_BUTTON(m_button), l.c_str() ); + } + + + + gint + FerrisOptionMenu::menu_button(GtkWidget *widget, GdkEvent *event ) + { + GtkMenu *menu; + GdkEventButton *event_button; + + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + if( event->type == GDK_BUTTON_PRESS ) + { + event_button = (GdkEventButton *) event; + + if (event_button->button == 1 || event_button->button == 3 ) + { + GtkMenu* menu = GTK_MENU(g_object_get_data( G_OBJECT(widget), GOBJ_MENU_K )); + showPopup( menu ); + return true; + } + } + return false; + } + + void + FerrisOptionMenu::ensureWidgetsCreated() + { + GtkWidget* lab; + GtkWidget* w; + GtkWidget* b; + + if( m_userwidget ) + return; + + m_userwidget = gtk_table_new ( 1, 2, false ); + m_button = b = gtk_button_new_with_label( m_label.c_str() ); + + gtk_signal_connect(GTK_OBJECT(b), "button_release_event", + GTK_SIGNAL_FUNC (fopm_menu_button), this ); + gtk_signal_connect(GTK_OBJECT(b), "button_press_event", + GTK_SIGNAL_FUNC (fopm_menu_button), this ); + + g_object_set_data( G_OBJECT(m_button), GOBJ_MENU_K, (void*)m_menu ); + gtk_widget_show_all( b ); + + m_image = b = GTK_WIDGET( gtk_image_new_from_stock( + GTK_STOCK_GO_DOWN, + GTK_ICON_SIZE_MENU )); + gtk_signal_connect(GTK_OBJECT(b), "button_release_event", + GTK_SIGNAL_FUNC (fopm_menu_button), this ); + gtk_signal_connect(GTK_OBJECT(b), "button_press_event", + GTK_SIGNAL_FUNC (fopm_menu_button), this ); + g_object_set_data( G_OBJECT(m_image), GOBJ_MENU_K, (void*)m_menu ); + + gtk_table_attach(GTK_TABLE(m_userwidget), GTK_WIDGET( m_button ), + 0, 1, 0, 1, + GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), + GtkAttachOptions(GTK_EXPAND | GTK_SHRINK | GTK_FILL), + 0, 0 ); + gtk_table_attach(GTK_TABLE(m_userwidget), GTK_WIDGET( m_image ), + 1, 2, 0, 1, + GtkAttachOptions(0), + GtkAttachOptions(0), + 0, 0 ); + gtk_widget_show_all( m_userwidget ); + } + + + GtkWidget* FerrisOptionMenu::getWidget() + { + ensureWidgetsCreated(); + + return m_userwidget; + } + + void + FerrisOptionMenu::setVisible( bool v ) + { + ensureWidgetsCreated(); + + if( v ) gtk_widget_show_all( m_userwidget ); + else gtk_widget_hide_all( m_userwidget ); + } + + bool + FerrisOptionMenu::getVisible() + { + if( !m_userwidget ) + return false; + + gboolean v = false; + g_object_get( G_OBJECT(m_button), "visible", &v, 0 ); + return v; + } + + void + FerrisOptionMenu::setMaxButtonTextLength( int v ) + { + MaxButtonTextLength = v; + } + + void + FerrisOptionMenu::setMenu( GtkWidget* menu ) + { + setMenu( GTK_MENU(menu) ); + } + + void forea_set_base_k( GtkWidget *widget, gpointer data) + { + g_object_set_data( G_OBJECT(widget), GOBJ_BASE_K, data ); + } + + void forea_hookup_activate( GtkWidget *widget, gpointer data ) + { + g_signal_connect_data( G_OBJECT( widget ), "activate", + G_CALLBACK (fopm_menu_activate), data, + 0, GConnectFlags(0)); + } + + + + void + FerrisOptionMenu::setMenu( GtkMenu* menu ) + { + m_menu = GTK_WIDGET(menu); + + ensureWidgetsCreated(); + + g_object_set_data( G_OBJECT(m_button), GOBJ_MENU_K, (void*)m_menu ); + g_object_set_data( G_OBJECT(m_image), GOBJ_MENU_K, (void*)m_menu ); + gtk_container_foreach( GTK_CONTAINER(m_menu), + GtkCallback(forea_set_base_k), + m_menu ); + gtk_container_foreach( GTK_CONTAINER(m_menu), + GtkCallback(forea_hookup_activate), + this ); + + /* Break up the menu into submenus if there are too many elements */ + GList* gl; + gl = gtk_container_get_children( GTK_CONTAINER( m_menu ) ); + + if( g_list_length(gl) > MaxMenuElementsPerContext ) + { + typedef list GtkMenuItemList_t; + GtkMenuItemList_t menuItemList; + GtkMenuItemList_t newTopLevelMenuItems; + + while( true ) + { + for( int i=0; idata ); + + menuItemList.push_back( mi ); + gtk_container_remove( GTK_CONTAINER( m_menu ), GTK_WIDGET(mi) ); + gl = g_list_next( gl ); + } + + if( !menuItemList.empty() ) + { + int maxlen = MaxButtonTextLength > 0 ? MaxButtonTextLength : string::npos; + + fh_stringstream labelss; + labelss << tostr( menuItemList.front() ).substr(0,maxlen) + << " - " + << tostr( menuItemList.back() ).substr(0,maxlen); + GtkMenuItem* w; + w = GTK_MENU_ITEM(gtk_menu_item_new_with_label( tostr(labelss).c_str() )); + newTopLevelMenuItems.push_back( w ); + + GtkWidget* submenu = gtk_menu_new(); + gtk_menu_item_set_submenu( GTK_MENU_ITEM(w), submenu ); + + for( GtkMenuItemList_t::iterator iter = menuItemList.begin(); + iter != menuItemList.end(); ++iter ) + { + gtk_menu_shell_append( GTK_MENU_SHELL(submenu), GTK_WIDGET(*iter) ); + } + menuItemList.clear(); + } + + if( !gl ) + break; + } + + for( GtkMenuItemList_t::iterator iter = newTopLevelMenuItems.begin(); + iter != newTopLevelMenuItems.end(); ++iter ) + { + gtk_menu_shell_append( GTK_MENU_SHELL(m_menu), GTK_WIDGET(*iter) ); + } + } + } + + GtkMenu* FerrisOptionMenu::getMenu() + { + return GTK_MENU(m_menu); + } + + + std::string + FerrisOptionMenu::getString() + { + return m_label; + + // NOTE: the gtk button may be showing a substr() of what the value is +// gchararray l; +// g_object_get( G_OBJECT(m_button), "label", &l, 0 ); +// return l; + } + + + + std::string tostr( FerrisOptionMenu* opm ) + { + return opm->getString(); + } + +}; diff --git a/FerrisUI/FerrisOptionMenu.hh b/FerrisUI/FerrisOptionMenu.hh new file mode 100644 index 0000000..b41f9bf --- /dev/null +++ b/FerrisUI/FerrisOptionMenu.hh @@ -0,0 +1,107 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Ferris UI + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisOptionMenu.hh,v 1.3 2010/09/24 21:31:05 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_OPTIONMENU_H_ +#define _ALREADY_INCLUDED_FERRISUI_OPTIONMENU_H_ + +#include + +#include +#include + +#include +#include + +namespace FerrisUI +{ + + class FERRISEXP_API FerrisOptionMenu + { + GtkWidget* m_userwidget; + GtkWidget* m_button; + GtkWidget* m_image; + GtkWidget* m_menu; + + std::string m_label; + std::string m_iconpath; + + int MaxButtonTextLength; + int MaxMenuElementsPerContext; + + void ensureWidgetsCreated(); + + + public: + + FerrisOptionMenu( const std::string& label, + const std::string& iconpath = GTK_STOCK_GO_DOWN ); + + GtkWidget* getWidget(); + void setVisible( bool v ); + bool getVisible(); + + void setMaxButtonTextLength( int v ); + + void setLabel( const std::string& s ); + + void setMenu( GtkWidget* menu ); + void setMenu( GtkMenu* menu ); + GtkMenu* getMenu(); + + std::string getString(); + + void menu_activate( GtkMenuItem *menuitem ); + gint menu_button(GtkWidget *widget, GdkEvent *event ); + + + /** + * Monitor the users desire to change the value of the optionmenu. Whenever + * the value is about to be changed this signal is fired, allowing clients + * to veto the update. + * + * If any signal handler returns true, then the change is not performed. + * + * Args are this, old label value, new label value (==getLabel() during handler) + */ + typedef sigc::signal3< bool, + FerrisOptionMenu*, + std::string, + std::string > LabelChangeSig_t; + LabelChangeSig_t& getLabelChangeSig() + { + return LabelChangeSig; + } + protected: + LabelChangeSig_t LabelChangeSig; + + }; + + FERRISEXP_API std::string tostr( FerrisOptionMenu* opm ); +}; +#endif diff --git a/FerrisUI/FerrisRemoveUI.cpp b/FerrisUI/FerrisRemoveUI.cpp new file mode 100644 index 0000000..9317719 --- /dev/null +++ b/FerrisUI/FerrisRemoveUI.cpp @@ -0,0 +1,196 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris remove + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRemoveUI.cpp,v 1.5 2011/06/18 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; + +namespace FerrisUI +{ + + FerrisRm_FileCompareWindow::FerrisRm_FileCompareWindow( + GTK_TreeWalkClient* twc, + FerrisRm* frm ) + : + twc( twc ), frm( frm ) + { + } + + bool + FerrisRm_FileCompareWindow::perform( fh_context target ) + { + if( isContextInList( AlwaysPermitMatchers, target ) ) + { + return true; + } + + if( isContextInList( AlwaysDenyMatchers, target ) ) + { + return false; + } + + twc->showMainWindow( frm->getSloth(), true ); + createMainWindow( "Remove?" ); + populateList( target ); + return processMainWindow(); + } + + + + void + FerrisRm_FileCompareWindow::dialog_yes( GtkButton *button ) + { + m_result = true; + m_looping = false; + } + + void + FerrisRm_FileCompareWindow::dialog_auto_yes( GtkButton *button ) + { + const MatchData_t& endlist = getMatchingDests(); + if( endlist.empty() ) + { + fh_stringstream ss; + ss << "By not selecting a predicate you are wishing to remove all files" + << nl << " Automatically remove all?"; + if( !RunQuestionDialog( tostr(ss), GTK_WIDGET(m_win) ) ) + { + return; + } + frm->setInteractive( false ); + frm->setForce( true ); + } + else + { + fh_matcher m = Ferris::Factory::ComposeEqualsMatcher( endlist ); +// cerr << "AlwaysPermitMatchers original size:" << AlwaysPermitMatchers.size() << endl; + AlwaysPermitMatchers.push_back( m ); +// cerr << "AlwaysPermitMatchers new size:" << AlwaysPermitMatchers.size() << endl; + } + m_result = true; + m_looping = false; + } + + + void + FerrisRm_FileCompareWindow::dialog_auto_no( GtkButton *button ) + { + const MatchData_t& endlist = getMatchingDests(); + if( endlist.empty() ) + { + fh_stringstream ss; + ss << "You must highlight atleast one row of the auto column"; + RunInfoDialog( tostr(ss), GTK_WIDGET(m_win) ); + return; + } + else + { + fh_matcher m = Ferris::Factory::ComposeEqualsMatcher( endlist ); + AlwaysDenyMatchers.push_back( m ); + } + + m_result = false; + m_looping = false; + } + + void + FerrisRm_FileCompareWindow::dialog_no( GtkButton *button ) + { + m_result = false; + m_looping = false; + } + + + void + FerrisRm_FileCompareWindow::processAllPendingEvents() + { + twc->processAllPendingEvents(); +// while (gtk_events_pending ()) +// gtk_main_iteration (); + +// if( gtk_window_is_closed ) +// { +// throw Quit_Requested(); +// } + } + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + + void + FerrisRm_SignalHandler::attach() + { + frm->getRemoveVerboseSignal().connect( sigc::mem_fun( *this, &_Self::OnRemoveVerbose )); + frm->getSkippingSignal().connect( sigc::mem_fun( *this, &_Self::OnSkipping )); + frm->getAskRemoveSignal().connect( sigc::mem_fun( *this, &_Self::OnAskRemove )); + } + + FerrisRm_SignalHandler::FerrisRm_SignalHandler( GTK_TreeWalkClient* twc, FerrisRm* frm ) + : + twc( twc ), frm( frm ), + fcwin( twc, frm ) + { + attach(); + } + + void + FerrisRm_SignalHandler::OnRemoveVerbose( FerrisRm& thisref, + fh_context target, + std::string desc ) + { +// cerr << "OnRemoveVerbose() desc:" << desc << endl; + gtk_label_set_text( GTK_LABEL(twc->m_currentObjectLab), desc.c_str() ); + twc->processAllPendingEvents(); + } + + void + FerrisRm_SignalHandler::OnSkipping( FerrisRm& thisref, + std::string desc, + std::string reason ) + { + twc->addToSkipped( desc, reason ); + } + + bool + FerrisRm_SignalHandler::OnAskRemove( FerrisRm& thisref, + fh_context target, + std::string desc ) + { + gtk_label_set_text( GTK_LABEL(twc->m_currentObjectLab), desc.c_str() ); + frm->hadUserInteraction = true; + return fcwin.perform( target ); + } + + + +}; + diff --git a/FerrisUI/FerrisRemoveUI.hh b/FerrisUI/FerrisRemoveUI.hh new file mode 100644 index 0000000..d1d1e05 --- /dev/null +++ b/FerrisUI/FerrisRemoveUI.hh @@ -0,0 +1,95 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris remove + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FerrisRemoveUI.hh,v 1.2 2010/09/24 21:31:05 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_REMOVE_UI_H_ +#define _ALREADY_INCLUDED_FERRIS_REMOVE_UI_H_ + +#include + +#include +#include + +namespace FerrisUI +{ + using namespace Ferris; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API FerrisRm_FileCompareWindow + : + public FileCompareWindow + { + typedef FerrisRm_FileCompareWindow _Self; + typedef FileCompareWindow _Base; + + FerrisRm* frm; + GTK_TreeWalkClient* twc; + + protected: + virtual void dialog_yes( GtkButton *button ); + virtual void dialog_auto_yes( GtkButton *button ); + virtual void dialog_auto_no( GtkButton *button ); + virtual void dialog_no( GtkButton *button ); + + public: + virtual void processAllPendingEvents(); + FerrisRm_FileCompareWindow( GTK_TreeWalkClient* twc, FerrisRm* frm ); + bool perform( fh_context target ); + + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API FerrisRm_SignalHandler + : + public Handlable + { + typedef FerrisRm_SignalHandler _Self; + + FerrisRm_FileCompareWindow fcwin; + GTK_TreeWalkClient* twc; + FerrisRm* frm; + + void attach(); + + public: + + FerrisRm_SignalHandler( GTK_TreeWalkClient* twc, FerrisRm* frm ); + void OnRemoveVerbose( FerrisRm& thisref, fh_context target, std::string desc ); + void OnSkipping( FerrisRm& thisref, std::string desc, std::string reason ); + bool OnAskRemove( FerrisRm& thisref, fh_context target, std::string desc ); + + }; + +}; +#endif diff --git a/FerrisUI/GtkFerris.cpp b/FerrisUI/GtkFerris.cpp new file mode 100644 index 0000000..1418449 --- /dev/null +++ b/FerrisUI/GtkFerris.cpp @@ -0,0 +1,2111 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: GtkFerris.cpp,v 1.14 2010/09/24 21:31:05 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace std; +using namespace Ferris; + + +namespace FerrisUI +{ + void forea_destroy( GtkWidget *widget, gpointer data ) + { + gtk_container_remove( GTK_CONTAINER(data), widget ); + gtk_widget_destroy( widget ); + } + + std::string tostr( GtkMenuItem* menu_item ) + { + if (GTK_BIN (menu_item)->child) + { + GtkWidget *child = GTK_BIN (menu_item)->child; + + /* do stuff with child */ + if (GTK_IS_LABEL (child)) + { + gchar *text; + gtk_label_get (GTK_LABEL (child), &text); + return text; + } + } + return ""; + } + + std::string tostr( GtkEntry* e ) + { + const char* c = gtk_entry_get_text( e ); + if( !c ) + return ""; + return c; + } + + std::string tostr( GtkTextView* tv ) + { + GtkTextIter startiter; + GtkTextIter enditer; + GtkTextBuffer* buffy = gtk_text_view_get_buffer( tv ); + + gtk_text_buffer_get_start_iter( buffy, &startiter ); + gtk_text_buffer_get_end_iter( buffy, &enditer ); + + gchar* cstr = gtk_text_buffer_get_text( buffy, &startiter, &enditer, false ); + string ret = cstr; + free(cstr); + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static + void collect_cb_fe( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer udata) + { + list_gtktreeiter_t* x = (list_gtktreeiter_t*)udata; + x->push_back( *iter ); + } + + static + gboolean collectall_cb_fe( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer udata) + { + list_gtktreeiter_t* x = (list_gtktreeiter_t*)udata; + x->push_back( *iter ); + return 0; + } + + list_gtktreeiter_t getIterList( GtkWidget* w_treeview, bool useSelection ) + { + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + list_gtktreeiter_t giters; + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + GtkTreeSelection *selection; + + if( useSelection ) + { + selection = gtk_tree_view_get_selection ( tv ); + gtk_tree_selection_selected_foreach( + selection, GtkTreeSelectionForeachFunc(collect_cb_fe), &giters ); + } + else + { + gtk_tree_model_foreach( w_treemodel, + GtkTreeModelForeachFunc(collectall_cb_fe), + &giters ); + } + return giters; + } + + std::string + treestr( GtkTreeIter iter, GtkWidget* w_treeview, int col ) + { + return treestr( &iter, w_treeview, col ); + } + + + string + treestr( GtkTreeIter *iter, GtkWidget* w_treeview, int col ) + { + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + const char* cstr = g_value_get_string(&value); + string ret = cstr ? cstr : ""; + g_value_unset ( &value ); + + return ret; + } + + string + treestr( void* tm_void, GtkTreeIter *iter, int col ) + { + GtkTreeModel* tm = GTK_TREE_MODEL(tm_void); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + const char* ret_CSTR = g_value_get_string(&value); + string ret = ""; + if( ret_CSTR ) + ret = ret_CSTR; + g_value_unset ( &value ); + + return ret; + } + bool + treebool( void* tm_void, GtkTreeIter *iter, int col ) + { + GtkTreeModel* tm = GTK_TREE_MODEL(tm_void); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + bool ret = g_value_get_boolean(&value); + g_value_unset ( &value ); + return ret; + } + long + treeint( void* tm_void, GtkTreeIter *iter, int col ) + { + GtkTreeModel* tm = GTK_TREE_MODEL(tm_void); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + long ret = g_value_get_int(&value); + g_value_unset ( &value ); + return ret; + } + + + int + treeint( GtkTreeIter *iter, GtkWidget* w_treeview, int col ) + { + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + int ret = g_value_get_int(&value); + g_value_unset ( &value ); + + return ret; + } + + bool + treebool( GtkTreeIter *iter, GtkWidget* w_treeview, int col ) + { + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + bool ret = g_value_get_boolean(&value); + g_value_unset ( &value ); + + return ret; + } + + gpointer + treeptr( GtkTreeIter *iter, GtkWidget* w_treeview, int col ) + { + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + GtkTreeModel* tm = GTK_TREE_MODEL(w_treemodel); + GtkTreeStore* ts = GTK_TREE_STORE(w_treemodel); + + GValue value; + memset( &value, 0, sizeof(value)); + gtk_tree_model_get_value( tm, iter, col, &value ); + gpointer ret = g_value_get_pointer(&value); + g_value_unset ( &value ); + + return ret; + } + + void clearSelection( GtkTreeView* w_treeview ) + { + GtkTreeView* tv = GTK_TREE_VIEW(w_treeview); + GtkTreeModel* w_treemodel = gtk_tree_view_get_model( GTK_TREE_VIEW(w_treeview) ); + GtkTreeSelection *selection = gtk_tree_view_get_selection ( tv ); + gtk_tree_selection_unselect_all( selection ); + } + + + + bool tryToEnsureSomethingIsSelected( GtkWidget* tree, GdkEvent *event ) + { + list_gtktreeiter_t giters = getIterList( tree, true ); + if( giters.empty() ) + { + if (event->type == GDK_BUTTON_PRESS) + { + GdkEventButton *evbutton = (GdkEventButton *) event; + + GtkTreeIter iter; + GtkTreePath *path = 0; + bool exists = gtk_tree_view_get_path_at_pos ( + GTK_TREE_VIEW(tree), + static_cast(evbutton->x), + static_cast(evbutton->y), + &path, 0, 0, 0 ); + if( !exists ) + return false; + + gtk_tree_view_set_cursor( GTK_TREE_VIEW(tree), path, 0, 0 ); + gtk_tree_path_free (path); + } + } + return true; + } + + static void + getEmblemListViewPixbuf_AddEmblem( fh_emblem em, map< fh_emblem, GdkPixbuf* >& cache ) + { + static const int desired_width = 24; + static const int desired_height = 24; + static const GdkInterpType interp_type = GDK_INTERP_HYPER; + + static string unknown_iconname = resolveToIconPath( "icons://unknown.png" ); + static GdkPixbuf* unknown_pb = 0; + if( !unknown_pb ) + { + GdkPixbuf* pb = gdk_pixbuf_new_from_file( unknown_iconname.c_str(), 0 ); + GdkPixbuf* scaled = gdk_pixbuf_scale_simple( pb, + desired_width, + desired_height, + interp_type ); + gdk_pixbuf_unref( pb ); + unknown_pb = scaled; + } + + + cache[ em ] = 0; + string iconname = resolveToIconPath( em->getIconName() ); + if( !iconname.empty() ) + { + if( iconname == unknown_iconname ) + { + cache[ em ] = unknown_pb; + } + else + { + LG_GTKFERRIS_D << "creating pixbuf for emblem icon:" << iconname << endl; + GdkPixbuf* pb = gdk_pixbuf_new_from_file( iconname.c_str(), 0 ); + GdkPixbuf* scaled = gdk_pixbuf_scale_simple( pb, + desired_width, + desired_height, + interp_type ); + cache[ em ] = scaled; + gdk_pixbuf_unref( pb ); + } + } + + } + + static void + getEmblemListViewPixbuf_Update( fh_etagere et, + fh_emblem em, + map< fh_emblem, GdkPixbuf* >* cache ) + { + getEmblemListViewPixbuf_AddEmblem( em, *cache ); + } + + GdkPixbuf* getEmblemListViewPixbuf( fh_emblem em ) + { + typedef map< fh_emblem, GdkPixbuf* > emblemPixbufs_t; + static emblemPixbufs_t emblemPixbufs; + + if( emblemPixbufs.empty() ) + { +// cerr << "getEmblemListViewPixbuf() adding all icons to cache" << endl; + fh_etagere et = Factory::getEtagere(); + emblems_t el = et->getAllEmblems(); + for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) + { + fh_emblem em = *ei; + getEmblemListViewPixbuf_AddEmblem( em, emblemPixbufs ); + } + } + + fh_etagere et = Factory::getEtagere(); + et->getEmblemCreated_Sig().connect( + bind( + sigc::ptr_fun( getEmblemListViewPixbuf_Update ), &emblemPixbufs )); + + return emblemPixbufs[ em ]; + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void showPopup( GtkMenu *menu ) + { + gtk_container_foreach( GTK_CONTAINER(menu), + GtkCallback(gtk_widget_show_all), + 0 ); + gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, 0 ); + } + + + void togButtonSet( GtkWidget* w, const std::string& s ) + { + return togButtonSet( w, isTrue( s )); + } + + void togButtonSet( GtkWidget* w, bool v ) + { + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( w ), v ); + } + + +// static void qdia_clicked( GtkDialog *dialog, gint response_id, gpointer ud ) +// { +// gint32* userdata = (guint32*)ud; +// *userdata = response_id; +// } + + void RunInfoDialog( const std::string& msg, GtkWidget* win ) + { + GtkWidget* d = gtk_message_dialog_new + ( GTK_WINDOW(win), + GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + msg.c_str(), + 0 ); + + gtk_widget_show_all( d ); + gtk_dialog_run (GTK_DIALOG (d)); + gtk_widget_destroy( d ); + } + + + bool RunQuestionDialog( const std::string& msg, GtkWidget* win ) + { + gint32 userdata = 0; + + GtkWidget* d = gtk_message_dialog_new + ( GTK_WINDOW(win), + GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + msg.c_str(), + 0 ); + +// g_signal_connect_data( G_OBJECT( d ), +// "response", +// G_CALLBACK (qdia_clicked), +// &userdata, +// 0, GConnectFlags(0)); + + gtk_widget_show_all( d ); + + gint result = gtk_dialog_run (GTK_DIALOG (d)); + switch (result) + { + case GTK_RESPONSE_ACCEPT: + case GTK_RESPONSE_OK: + case GTK_RESPONSE_YES: + case GTK_RESPONSE_APPLY: + userdata = 1; + break; + + case GTK_RESPONSE_REJECT: + case GTK_RESPONSE_DELETE_EVENT: + case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_CLOSE: + case GTK_RESPONSE_NO: + userdata = 0; + break; + } + +// Ferris::Main::mainLoop(); + gtk_widget_destroy( d ); + return userdata; + } + + void RunErrorDialog( const std::string& msg, GtkWidget* win ) + { + GtkWidget* d = gtk_message_dialog_new + ( GTK_WINDOW(win), + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + msg.c_str(), + 0 ); + + gtk_widget_show_all( d ); + gtk_dialog_run (GTK_DIALOG (d)); + gtk_widget_destroy( d ); + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + void dialog_yes( GtkButton *button, gpointer udata ) + { + FileCompareWindow* g = (FileCompareWindow*)udata; + g->dialog_yes( button ); + } + + void dialog_auto_yes( GtkButton *button, gpointer udata ) + { + FileCompareWindow* g = (FileCompareWindow*)udata; + g->dialog_auto_yes( button ); + } + void dialog_auto_no( GtkButton *button, gpointer udata ) + { + FileCompareWindow* g = (FileCompareWindow*)udata; + g->dialog_auto_no( button ); + } + + void dialog_no( GtkButton *button, gpointer udata ) + { + FileCompareWindow* g = (FileCompareWindow*)udata; + g->dialog_no( button ); + } + + void dialog_auto_toggled(GtkCellRendererToggle *cell, gchar *path_string, gpointer udata) + { + FileCompareWindow* g = (FileCompareWindow*)udata; + g->dialog_auto_toggled( cell, path_string ); + } + + FileCompareWindow::MatchersList_t& + FileCompareWindow::getAlwaysPermitMatchers() + { + return AlwaysPermitMatchers; + } + + FileCompareWindow::MatchersList_t& + FileCompareWindow::getAlwaysDenyMatchers() + { + return AlwaysDenyMatchers; + } + + + FileCompareWindow::DisplayEAList_t + FileCompareWindow::getEAList() + { + DisplayEAList_t ret; + ret.push_back( "url" ); + ret.push_back( "size-human-readable" ); + ret.push_back( "dontfollow-size-human-readable" ); + ret.push_back( "mtime-display" ); + ret.push_back( "ctime-display" ); + ret.push_back( "atime-display" ); + ret.push_back( "user-owner-name" ); + ret.push_back( "group-owner-name" ); + ret.push_back( "readable" ); + ret.push_back( "writable" ); + ret.push_back( "runable" ); + ret.push_back( "is-image-object" ); + ret.push_back( "is-animation-object" ); + ret.push_back( "is-audio-object" ); + ret.push_back( "is-source-object" ); + ret.push_back( "protection-ls" ); + ret.push_back( "realpath" ); + ret.push_back( "filesystem-filetype" ); + ret.push_back( "dontfollow-filesystem-filetype" ); + ret.push_back( "mimetype" ); + ret.push_back( "filetype" ); + return ret; + } + + FileCompareWindow::MatchData_t + FileCompareWindow::getMatchingDests() + { + GtkTreeIter giter; + GtkTreeModel* model = GTK_TREE_MODEL( m_rptmodel ); + MatchData_t MatchData; + + if (!gtk_tree_model_get_iter_first (model, &giter)) + { + cerr << "error getting list data" << endl; + return MatchData; + } + + while( true ) + { + char* desc; + char* dst; + int dst_ticked; + + gtk_tree_model_get( model, &giter, + RPT_DESC, &desc, + RPT_TARGET, &dst, + RPT_TARGETAUTO, &dst_ticked, + -1); + + if( dst_ticked ) + { +// cerr << "adding desc:" << desc << " dst:" << dst << " to matchers" << endl; + MatchData.push_back( make_pair( string(desc), string(dst) )); + } + + if(!(gtk_tree_model_iter_next (model, &giter))) + break; + } + + return MatchData; + } + + + void + FileCompareWindow::addMatchersTo( MatchersList_t& matchersList ) + { + const MatchData_t& endlist = getMatchingDests(); + if( !endlist.empty() ) + { + fh_matcher m = ::Ferris::Factory::ComposeEqualsMatcher( endlist ); + matchersList.push_back( m ); + } + } + + bool + FileCompareWindow::isContextInList( MatchersList_t& matchersList, fh_context c ) + { +// cerr << "matchersList.size():" << matchersList.size() << " c.url:" << c->getURL() << endl; + + if( !matchersList.empty() ) + { + for( MatchersList_t::iterator iter = matchersList.begin(); + iter != matchersList.end(); ++iter ) + { + fh_matcher m = *iter; + if( m( c ) ) + { + return true; + } + } + } + return false; + } + + void + FileCompareWindow::dialog_yes( GtkButton *button ) + { + m_result = true; + m_looping = false; + } + + void + FileCompareWindow::dialog_auto_yes( GtkButton *button ) + { + addMatchersTo( AlwaysPermitMatchers ); + m_result = true; + m_looping = false; + } + + void + FileCompareWindow::dialog_auto_no( GtkButton *button ) + { + addMatchersTo( AlwaysDenyMatchers ); + m_result = false; + m_looping = false; + } + + void + FileCompareWindow::dialog_no( GtkButton *button ) + { + m_result = false; + m_looping = false; + } + + void + FileCompareWindow::dialog_auto_toggled(GtkCellRendererToggle *cell, gchar *path_string ) + { + GtkTreeModel* model = GTK_TREE_MODEL( m_rptmodel ); + GtkTreeIter iter; + GtkTreePath *path = gtk_tree_path_new_from_string (path_string); + gboolean value; + + gtk_tree_model_get_iter (model, &iter, path); + gtk_tree_model_get (model, &iter, RPT_TARGETAUTO, &value, -1); + + value = !value; + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, RPT_TARGETAUTO, value, -1); + + gtk_tree_path_free (path); + } + + + void + FileCompareWindow::populateList( fh_context src, fh_context dst ) + { + DisplayEAList_t DisplayEAList = getEAList(); + for( DisplayEAList_t::iterator iter = DisplayEAList.begin(); + iter != DisplayEAList.end(); ++iter ) + { + fh_context target = src; + GtkTreeIter giter; + string s = ""; + string d = ""; + + if( isBound( dst ) ) + { + s = getStrAttr( src, *iter, "" ); + d = getStrAttr( dst, *iter, "" ); + } + else + { + GtkTreeViewColumn* col = 0; + + col = gtk_tree_view_get_column( GTK_TREE_VIEW(m_rptview), RPT_TARGET ); + gtk_tree_view_column_set_title( col, "target" ); + col = gtk_tree_view_get_column( GTK_TREE_VIEW(m_rptview), RPT_SRC ); + gtk_tree_view_column_set_visible( col, false ); + + d = getStrAttr( target, *iter, "" ); + } + + gtk_tree_store_append( m_rptmodel, &giter, 0 ); + gtk_tree_store_set( m_rptmodel, &giter, + RPT_DESC, iter->c_str(), + RPT_SRC, s.c_str(), + RPT_DST, d.c_str(), + RPT_DSTAUTO, 0, + -1 ); + } + } + + + void + FileCompareWindow::createMainWindow( const std::string& title ) + { + m_win = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); + gtk_window_set_title( GTK_WINDOW(m_win), title.c_str() ); + gtk_window_set_default_size (GTK_WINDOW (m_win), 800, 490); + + GtkWidget* vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + GtkWidget* hbx = GTK_WIDGET(gtk_hbox_new(0,0)); + + GtkTreeViewColumn* column; + GtkCellRenderer* cell_renderer; + + m_rptmodel = gtk_tree_store_new (RPT_N_COLUMNS, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_BOOLEAN ); + + m_rptview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (m_rptmodel)); + cell_renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes ("desc", + cell_renderer, + "text", RPT_DESC, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_rptview), column); + gtk_tree_view_column_set_sizing ( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); + column = gtk_tree_view_column_new_with_attributes ("src", + cell_renderer, + "text", RPT_SRC, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_rptview), column); + gtk_tree_view_column_set_sizing ( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); + column = gtk_tree_view_column_new_with_attributes ("dst", + cell_renderer, + "text", RPT_DST, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_rptview), column); + gtk_tree_view_column_set_sizing ( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); + + cell_renderer = gtk_cell_renderer_toggle_new (); + g_object_set(cell_renderer, + "xalign", 0.0, + "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, + 0 ); + column = gtk_tree_view_column_new_with_attributes ("auto", + cell_renderer, + "active", RPT_TARGETAUTO, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_rptview), column); + gtk_tree_view_column_set_sizing ( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); + g_signal_connect_data( G_OBJECT( cell_renderer ), "toggled", + G_CALLBACK ( FerrisUI::dialog_auto_toggled ), this, + 0, GConnectFlags(0)); + + + GtkWidget* sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(sw), + GTK_WIDGET( m_rptview )); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + gtk_box_pack_start(GTK_BOX(vbx), sw, 1, 1, 0 ); + + /******************************************************************************/ + GtkWidget* b; + + b = gtk_button_new_from_stock( GTK_STOCK_YES ); + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( b )); + gtk_signal_connect(GTK_OBJECT (b), "clicked", + GTK_SIGNAL_FUNC( FerrisUI::dialog_yes ), this ); + + b = gtk_button_new_with_label( "auto yes" ); + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( b )); + gtk_signal_connect(GTK_OBJECT (b), "clicked", + GTK_SIGNAL_FUNC( FerrisUI::dialog_auto_yes ), this ); + + b = gtk_button_new_with_label( "auto no" ); + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( b )); + gtk_signal_connect(GTK_OBJECT (b), "clicked", + GTK_SIGNAL_FUNC( FerrisUI::dialog_auto_no ), this ); + + b = gtk_button_new_from_stock( GTK_STOCK_NO ); + gtk_container_add(GTK_CONTAINER(hbx), GTK_WIDGET( b )); + gtk_signal_connect(GTK_OBJECT (b), "clicked", + GTK_SIGNAL_FUNC( FerrisUI::dialog_no ), this ); + + /******************************************************************************/ + + gtk_box_pack_start(GTK_BOX(vbx), hbx, 0, 0, 0 ); + gtk_container_add(GTK_CONTAINER(m_win), GTK_WIDGET( vbx ) ); + + } + + void + FileCompareWindow::processAllPendingEvents() + { + while (gtk_events_pending ()) + gtk_main_iteration (); + } + + bool + FileCompareWindow::processMainWindow() + { + gtk_widget_show_all( GTK_WIDGET(m_win) ); + + m_result = false; + m_looping = true; + + while( m_looping ) + { + processAllPendingEvents(); + g_usleep(50); + } + gtk_widget_destroy ( GTK_WIDGET(m_win) ); + return m_result; + } + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + gboolean GTK_TreeWalkClient__window_closing( + GtkObject *object, + gpointer udata) + { + typedef GTK_TreeWalkClient::gtk_window_is_closed_t d_t; + d_t* d = (d_t*)udata; + *d = 1; + return 0; + } + + GTK_TreeWalkClient::GTK_TreeWalkClient() + : + gtk_window_is_closed( false ), + m_win( 0 ), + m_treemodel( FactoryUI::CreateTreeModel() ), + m_starttimelab( 0 ), + m_elapsedtimelab( 0 ), + m_srclab( 0 ), + m_dstlab( 0 ), + m_targetlab( 0 ), + m_speedlab( 0 ), + m_progress( 0 ), + m_overall_progress( 0 ), + m_currentObjectLab( 0 ), + m_running( true ), + m_highestSeenContextID( 0 ), + m_performing( false ) + { + m_totalagg.reset(); + } + + GTK_TreeWalkClient::~GTK_TreeWalkClient() + { + } + + bool + GTK_TreeWalkClient::shouldPrecacheSourceSize() + { + return false; + } + + + Ferrisls_aggregate_t + GTK_TreeWalkClient::getTotalAggregateData( fh_context src ) + { + Ferrisls ls; + fh_display_aggdata d = createDisplayAggregateData( &ls ); + + if( isTrue( getStrAttr( src, "is-dir", "0" ))) + d->ShowAttributes( src ); + ls.setURL( src->getURL() ); + ls(); + + const Ferrisls_aggregate_t& data = d->getData( AGGDATA_RECURSIVE ); + return data; + } + + void + GTK_TreeWalkClient::OnDropped( const ctxlist_t& clist ) + { + cerr << "OnDropped(top)" << endl; + for( ctxlist_t::const_iterator ci = clist.begin(); ci != clist.end(); ++ci ) + { + cerr << "dropped ctx:" << (*ci)->getURL() << endl; + } + cerr << "OnDropped(bot)" << endl; + + for( ctxlist_t::const_iterator ci = clist.begin(); ci != clist.end(); ++ci ) + { + fh_context ctx = *ci; + m_treemodel->getRootContext()->createSubContext( "", ctx ); + if( m_performing ) + { + m_totalagg = m_totalagg + getTotalAggregateData( ctx ); + guint64 sz = m_totalagg.sizeFilesOnly; + LG_COPY_D << "total bytes in source:" << Util::convertByteString(sz) << endl; + updateProgressForAggregateData( m_totalagg, true ); + } + } + + if( !m_performing ) + { + performActionForAllRemainingSources(); + } + + + cerr << "selection-dump(top)" << endl; + for( Context::iterator ci = m_treemodel->getRootContext()->begin(); ci != m_treemodel->getRootContext()->end(); ++ci ) + { + cerr << "sel ctx:" << (*ci)->getURL() << endl; + cerr << "ID:" << getStrAttr( *ci, "selection-added-order-id", "" ) << endl; + } + cerr << "selection-dump(bot)" << endl; + } + + ctxlist_t + GTK_TreeWalkClient::getAllRemainingSrcsContextList() + { + ctxlist_t ret; + GtkTreeIter giter; + GtkTreeModel* m = m_treemodel->getGtkModel(); + + if( gtk_tree_model_get_iter_first (m, &giter) ) + { + while( true ) + { + fh_context c = m_treemodel->toContext( &giter ); + + guint64 cid = toType(getStrAttr( c, "selection-added-order-id", "" )); + if( cid > m_highestSeenContextID ) + ret.push_back( c ); + + if( !gtk_tree_model_iter_next( m, &giter )) + break; + } + } + return ret; + } + + void + GTK_TreeWalkClient::performActionForSource( fh_context c ) + { + } + + void + GTK_TreeWalkClient::updateProgressForAggregateData( const Ferrisls_aggregate_t& agg, + bool added ) + { + } + + + void + GTK_TreeWalkClient::performActionForAllRemainingSources() + { + Util::ValueRestorer< bool > x( m_performing, true ); + + GtkTreeIter giter; + GtkTreeModel* m = m_treemodel->getGtkModel(); + + ctxlist_t clist = getAllRemainingSrcsContextList(); + +// { +// cerr << "copyAllRemainingSources(dump start)" << endl; +// for( ctxlist_t::iterator ci = clist.begin(); ci != clist.end(); ++ci ) +// { +// fh_context src = *ci; +// cerr << "src:" << src->getURL() << endl; +// } +// cerr << "copyAllRemainingSources(dump end)" << endl; +// } + + + if( shouldPrecacheSourceSize() ) + { + m_totalagg.reset(); + + for( ctxlist_t::iterator ci = clist.begin(); ci != clist.end(); ++ci ) + { + fh_context src = *ci; + LG_COPY_D << "Precaching the size and other metadata for the src:" << src->getURL() << endl; + + m_totalagg = m_totalagg + getTotalAggregateData( src ); + } + + guint64 sz = m_totalagg.sizeFilesOnly; + LG_COPY_D << "total bytes in source:" << Util::convertByteString(sz) << endl; + updateProgressForAggregateData( m_totalagg, false ); + } + + // + // Actually copy the data. + // + for( ctxlist_t::iterator ci = clist.begin(); ci != clist.end(); ++ci ) + { + fh_context c = *ci; + + performActionForSource( c ); + + m_highestSeenContextID = max( + m_highestSeenContextID, + toType(getStrAttr( c, "selection-added-order-id", "" ))); + } + + // + // Process any thing that was dropped while we were copying. + // + clist = getAllRemainingSrcsContextList(); + if( !clist.empty() ) + { + performActionForAllRemainingSources(); + } + + } + + + + enum + { + TARGET_FERRIS_URL_LIST = 0, + TARGET_STRING + }; + + static GtkTargetEntry row_targets[] = { + { (gchar*)"text/ferris-url-list", 0, TARGET_FERRIS_URL_LIST }, + { (gchar*)"STRING", 0, TARGET_STRING }, + { (gchar*)"text/plain", 0, TARGET_STRING }, + { (gchar*)"text/uri-list", 0, TARGET_STRING }, + }; + + static void + twc_drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time, + gpointer udata) + { + GTK_TreeWalkClient* twc = (GTK_TreeWalkClient*)udata; + twc->drag_data_received( widget, context, x, y, data, info, time ); + } + + void + GTK_TreeWalkClient::drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time ) + { + bool drag_finished = false; + + if ((data->length < 0) || (data->format != 8)) + { + gtk_drag_finish (context, FALSE, FALSE, time); + return; + } + + LG_GTKFERRIS_D << "drag_data_received()" << endl; + + try + { + if( TARGET_FERRIS_URL_LIST == info || TARGET_STRING == info ) + { + string s; + fh_stringstream ss; + ss << ((char*)data->data); + gtk_drag_finish (context, TRUE, FALSE, time); + drag_finished = true; + + ctxlist_t dropped; + while( getline( ss, s ) && !s.empty() ) + { + try + { + fh_context c = Resolve( s ); + dropped.push_back(c); + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Error:" << e.what(); + RunErrorDialog( tostr(ss) ); + } + } + OnDropped( dropped ); + } + else + { + fh_stringstream ss; + ss << "Got info:" << info << " data:" << ((char*)data->data) << endl; + RunInfoDialog( tostr(ss) ); + } + } + catch( exception& e ) + { + if( !drag_finished ) + { + drag_finished = true; + gtk_drag_finish (context, TRUE, FALSE, time); + } + + fh_stringstream ss; + ss << "Failed to set icon\n" + << "reason:" << e.what() << endl; +// cerr << tostr(ss); + FerrisUI::RunErrorDialog( tostr(ss) ); + } + + if( !drag_finished ) + gtk_drag_finish (context, TRUE, FALSE, time); + + } + + + + + void + GTK_TreeWalkClient::makeMainWindow( const std::string& title ) + { + m_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_signal_connect(GTK_OBJECT (m_win), "destroy", + GTK_SIGNAL_FUNC(GTK_TreeWalkClient__window_closing), + >k_window_is_closed ); + + gtk_window_set_default_size (GTK_WINDOW (m_win), 700, 400); + gtk_window_set_title( GTK_WINDOW(m_win), title.c_str() ); + + m_treeview = gtk_tree_view_new(); + + gtk_drag_dest_set ( GTK_WIDGET(m_treeview), + GTK_DEST_DEFAULT_ALL, + row_targets, + G_N_ELEMENTS (row_targets), + GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE)); + gtk_signal_connect( GTK_OBJECT(m_treeview), "drag_data_received", + GTK_SIGNAL_FUNC( twc_drag_data_received ), this ); + + + gtk_tree_view_set_model( GTK_TREE_VIEW(m_treeview), m_treemodel->getGtkModel()); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (m_treeview), TRUE); + GObject *selection; + selection = G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (m_treeview))); + gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection), GTK_SELECTION_MULTIPLE); + gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW (m_treeview), false ); + gtk_tree_view_set_expander_column ( GTK_TREE_VIEW(m_treeview), 0 ); + gtk_tree_view_columns_autosize(GTK_TREE_VIEW (m_treeview)); + + m_scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_add_with_viewport( + GTK_SCROLLED_WINDOW(m_scrolledwindow), + GTK_WIDGET(m_treeview)); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_scrolledwindow), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + GtkWidget* vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + GtkWidget* hbx = GTK_WIDGET(gtk_hbox_new(0,0)); + + int r = -1; + GtkWidget* lab; + GtkWidget* table = gtk_table_new ( 1, 3, false ); + gtk_table_set_col_spacing( GTK_TABLE(table), + 1, + gtk_table_get_default_col_spacing( GTK_TABLE( table)) + 10 ); + + addBodyElements( table, r ); + resizeBodyElements( table, -1 ); + + gtk_box_pack_start(GTK_BOX(vbx), m_scrolledwindow, 1, 1, 0 ); + gtk_box_pack_start(GTK_BOX(vbx), table, 0, 0, 0 ); + gtk_box_pack_start(GTK_BOX(vbx), hbx, 0, 0, 0 ); + + m_notebook = GTK_NOTEBOOK(gtk_notebook_new()); + gtk_notebook_append_page( m_notebook, vbx, gtk_label_new( "general" )); + + addOtherPages(); + gtk_container_add(GTK_CONTAINER(m_win), GTK_WIDGET(m_notebook) ); + } + + void + GTK_TreeWalkClient::showMainWindow( bool Sloth, bool force ) + { + if( force || !Sloth ) + { + gtk_widget_show_all(m_win); + } + } + + void + GTK_TreeWalkClient::processAllPendingEvents() + { + while (gtk_events_pending ()) + gtk_main_iteration (); + + if( gtk_window_is_closed ) + { + throw Quit_Requested(); + } + } + + void + GTK_TreeWalkClient::runMainWindow( bool Sloth ) + { + if( m_srclab ) gtk_label_set_text( GTK_LABEL(m_srclab), "" ); + if( m_dstlab ) gtk_label_set_text( GTK_LABEL(m_dstlab), "" ); + if( m_targetlab) gtk_label_set_text( GTK_LABEL(m_targetlab), "" ); + if( m_speedlab ) gtk_label_set_text( GTK_LABEL(m_speedlab), "" ); + if( m_progress ) + { + gtk_progress_bar_set_fraction( m_progress, 1.0 ); + gtk_progress_bar_set_text( m_progress, "Done." ); + } + if( m_overall_progress ) + { + gtk_progress_bar_set_fraction( m_overall_progress, 1.0 ); + gtk_progress_bar_set_text( m_overall_progress, "Done." ); + } + gtk_widget_set_sensitive( m_playpausebut, false ); + + updateElapsedTime(); + gboolean vis = 0; + g_object_get( m_win, "visible", &vis, 0 ); + if( vis ) + while( !gtk_window_is_closed ) + { + processAllPendingEvents(); + g_usleep(50); + } + } + + void + GTK_TreeWalkClient::updateStartTime() + { + actionstart_tt = Time::getTime(); + gtk_label_set_text( GTK_LABEL(m_starttimelab), + Time::toTimeString( actionstart_tt ).c_str() ); + } + + + void + GTK_TreeWalkClient::updateElapsedTime() + { + fh_stringstream ss; + double timedelta = difftime( Time::getTime(), actionstart_tt ); + double mod = 3600; + if( timedelta >= mod ) + { + double n = fmod( timedelta, mod ); + ss << ((timedelta - n)/mod) << ":"; + timedelta = n; + } + mod = 60; + if( timedelta >= mod ) + { + double n = fmod( timedelta, mod ); + ss << ((timedelta - n)/mod) << ":"; + timedelta = n; + } + ss << timedelta; + + gtk_label_set_text( GTK_LABEL(m_elapsedtimelab), tostr(ss).c_str() ); + } + + void + GTK_TreeWalkClient::resizeBodyElements( GtkWidget* table, int rowCount ) + { + if( !rowCount ) + return; + + guint rows = 0; + guint columns = 2; + + g_object_get( G_OBJECT(table), + "n-rows", &rows, + "n-columns", &columns, + 0 ); + rows += rowCount; + gtk_table_resize( GTK_TABLE(table), rows, columns ); + } + + /** + * Add a label that is to be as small as possible + */ + void + GTK_TreeWalkClient::addSmallLabel( GtkWidget* table, GtkWidget* lab, int c, int r ) + { + gtk_misc_set_alignment( GTK_MISC( lab ), 1.0, 0.5 ); +// gtk_table_attach_defaults(GTK_TABLE(table), lab, 0, 1, r, r+1 ); + gtk_table_attach(GTK_TABLE(table), lab, c, c+1, r, r+1, + GtkAttachOptions(GTK_FILL), GtkAttachOptions(0), 0, 0 ); + } + + /** + * Add a label that is to expand to take up the rest of the X area + */ + void + GTK_TreeWalkClient::addLargeLabel( GtkWidget* table, GtkWidget* lab, int c, int r ) + { + gtk_misc_set_alignment( GTK_MISC( lab ), 0.0, 0.5 ); + gtk_table_attach(GTK_TABLE(table), lab, 1, 2, r, r+1, + GtkAttachOptions(GTK_FILL|GTK_SHRINK|GTK_EXPAND), GtkAttachOptions(0), 5, 0 ); + } + + + void + GTK_TreeWalkClient::addSeparatorRow( GtkWidget* table, int& r, const char* label ) + { + resizeBodyElements( table, 1 ); + ++r; + + GtkWidget* lab = gtk_label_new( label ); + addSmallLabel( table, lab, 0, r ); + + lab = gtk_hseparator_new(); +// addLargeLabel( table, lab, 1, r ); +// gtk_misc_set_alignment( GTK_MISC( lab ), 0.0, 0.5 ); + gtk_table_attach(GTK_TABLE(table), lab, 1, 2, r, r+1, + GtkAttachOptions(GTK_FILL|GTK_SHRINK|GTK_EXPAND), GtkAttachOptions(0), 5, 0 ); + } + + void + GTK_TreeWalkClient::setSourceLabel( const std::string& s ) + { + gtk_label_set_text( GTK_LABEL(m_srclab), s.c_str() ); + } + + void + GTK_TreeWalkClient::setDestinationLabel( const std::string& s ) + { + gtk_label_set_text( GTK_LABEL(m_dstlab), s.c_str() ); + } + + + void + GTK_TreeWalkClient::addSourceRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Src:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_srclab = gtk_label_new(""); + gtk_label_set_ellipsize( GTK_LABEL(lab), PANGO_ELLIPSIZE_START ); + addLargeLabel( table, lab, 1, r ); + } + + void + GTK_TreeWalkClient::addDestinationRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Dst:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_dstlab = gtk_label_new(""); + gtk_label_set_ellipsize( GTK_LABEL(lab), PANGO_ELLIPSIZE_START ); + addLargeLabel( table, lab, 1, r ); + } + + void + GTK_TreeWalkClient::addTarget( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Target:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_targetlab = gtk_label_new(""); + addLargeLabel( table, lab, 1, r ); + } + + void + GTK_TreeWalkClient::addCurrent( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Current:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_currentObjectLab = gtk_label_new(""); + addLargeLabel( table, lab, 1, r ); + } + + void + GTK_TreeWalkClient::addSpeedRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Speed:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_speedlab = gtk_label_new(""); + addLargeLabel( table, lab, 1, r ); + } + + void + GTK_TreeWalkClient::addProgressRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + m_progress = GTK_PROGRESS_BAR(gtk_progress_bar_new()); + gtk_progress_bar_set_orientation( m_progress, GTK_PROGRESS_LEFT_TO_RIGHT ); + gtk_progress_bar_set_text( m_progress, "Init." ); + gtk_progress_set_percentage( GTK_PROGRESS(m_progress), 0 ); + gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(m_progress), 0, 3, r, r+1 ); + } + + void + GTK_TreeWalkClient::setProgress( double current, double total ) + { + double v = total ? current / total : 0; + stringstream ss; + ss << current << " / " << total; + setProgress( v, ss.str() ); + } + + + void + GTK_TreeWalkClient::setProgress( double v, const std::string& s ) + { + if( GtkProgressBar* p = m_progress ) + { + gtk_progress_bar_set_fraction( p, v ); + gtk_progress_bar_set_text( p, s.c_str() ); + } + } + + void + GTK_TreeWalkClient::setOverallProgress( double v, const std::string& s ) + { + if( GtkProgressBar* p = m_overall_progress ) + { + gtk_progress_bar_set_fraction( p, v ); + gtk_progress_bar_set_text( p, s.c_str() ); + } + } + + void + GTK_TreeWalkClient::setOverallProgress( double current, double total ) + { + double v = total ? current / total : 0; + stringstream ss; + ss << current << " / " << total; + setOverallProgress( v, ss.str() ); + } + + + + void + GTK_TreeWalkClient::addOverallProgressRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + m_overall_progress = GTK_PROGRESS_BAR(gtk_progress_bar_new()); + gtk_progress_bar_set_orientation( m_overall_progress, GTK_PROGRESS_LEFT_TO_RIGHT ); + gtk_progress_bar_set_text( m_overall_progress, "x" ); + gtk_progress_set_percentage( GTK_PROGRESS(m_overall_progress), 0 ); + gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(m_overall_progress), 0, 3, r, r+1 ); + } + + void + GTK_TreeWalkClient::addStartTimeRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Started:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_starttimelab = gtk_label_new(""); + addLargeLabel( table, lab, 1, r ); + updateStartTime(); + } + + void + GTK_TreeWalkClient::addElapsedTimeRow( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 1 ); + ++r; + GtkWidget* lab = gtk_label_new( "Elapsed:" ); + addSmallLabel( table, lab, 0, r ); + + lab = m_elapsedtimelab = gtk_label_new(""); + addLargeLabel( table, lab, 1, r ); + } + + void play_pause_button_cb( GtkButton *button, gpointer udata ) + { + GTK_TreeWalkClient* c = (GTK_TreeWalkClient*)udata; + c->play_pause_button( button ); + } + + void + GTK_TreeWalkClient::play_pause_button( GtkButton *button ) + { + if( m_running ) + if( !tryToPause() ) + return; + if( !m_running ) + if( !tryToPlay() ) + return; + + m_running = !m_running; + if( m_running ) + gtk_button_set_label( GTK_BUTTON(m_playpausebut), "playing"); + else + gtk_button_set_label( GTK_BUTTON(m_playpausebut), "paused"); + } + + + /** + * Add process control buttons. + * This includes a play/pause toggle. Note that the default handling of play/pause + * is to nest a gtk main loop, so the subclass doesn't normally have to do anything + * to handle play/pause provided that it can recover from a pause of any time happening + * (eg. network related stuff should recover using TCP/IP, though it might be a nice + * thing to notify the peer of a pause explicitly) + */ + void + GTK_TreeWalkClient::addVCRControls( GtkWidget* table ) + { + guint rows = 0; + g_object_get( G_OBJECT(table), "n-rows", &rows, 0 ); + + GtkWidget* vbx = GTK_WIDGET(gtk_vbox_new(0,0)); + GtkWidget* b; + + + b = m_playpausebut = makeImageButton( "icons://Button-Pause.png" ); + gtk_signal_connect(GTK_OBJECT (b), "clicked", + GTK_SIGNAL_FUNC( FerrisUI::play_pause_button_cb ), this ); + + gtk_box_pack_start(GTK_BOX(vbx), b, 0, 0, 0 ); + gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(vbx), 2, 3, 0, rows, + GtkAttachOptions(GTK_FILL), GtkAttachOptions(0), 0, 0 ); + } + + bool + GTK_TreeWalkClient::tryToPlay() + { + m_running = true; + setImageButton( m_playpausebut, "icons://Button-Pause.png" ); + gtk_main_quit(); + return false; + } + + bool + GTK_TreeWalkClient::tryToPause() + { + m_running = false; + setImageButton( m_playpausebut, "icons://Button-Play.png" ); + gtk_main(); + return false; + } + + void + GTK_TreeWalkClient::setWindowTitle( const std::string& title ) + { + gtk_window_set_title( GTK_WINDOW(m_win), title.c_str() ); + } + + void + GTK_TreeWalkClient::addBodyElements( GtkWidget* table, int& r ) + { + resizeBodyElements( table, 0 ); + addStartTimeRow( table, r ); + addElapsedTimeRow( table, r ); + } + + void + GTK_TreeWalkClient::addSkippingPage() + { + GtkWidget* skippage = GTK_WIDGET(gtk_hbox_new(0,0)); + + GtkTreeViewColumn* column; + GtkCellRenderer* cell_renderer; + + m_skipmodel = gtk_tree_store_new (SKIP_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); + m_skipview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (m_skipmodel)); + cell_renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes ("reason", + cell_renderer, + "text", SKIP_REASON, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_skipview), column); + + column = gtk_tree_view_column_new_with_attributes ("skipped", + cell_renderer, + "text", SKIP_DESC, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (m_skipview), column); + + GtkWidget* sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(sw), + GTK_WIDGET( m_skipview )); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + gtk_container_add(GTK_CONTAINER(skippage), GTK_WIDGET( sw )); + gtk_notebook_append_page( m_notebook, skippage, gtk_label_new( "skipped" )); + } + + bool + GTK_TreeWalkClient::getShouldRunMainLoop( bool AutoClose, bool hadUserInteraction ) + { + if( AutoClose && !getNumberOfSkipped() && !hadUserInteraction ) + { + return false; + } + return true; + } + + + void + GTK_TreeWalkClient::addOtherPages() + { + addSkippingPage(); + } + + void + GTK_TreeWalkClient::addToSkipped( + const std::string& desc, + const std::string& reason ) + { + GtkTreeIter iter; + gtk_tree_store_append( m_skipmodel, &iter, 0 ); + gtk_tree_store_set( m_skipmodel, &iter, + SKIP_REASON, reason.c_str(), + SKIP_DESC, desc.c_str(), + -1 ); + } + + static gboolean + count_f( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) + { + guint32* count = (guint32*)data; + *count = *count + 1; + } + + int + GTK_TreeWalkClient::getNumberOfSkipped() + { + guint32 count = 0; + + gtk_tree_model_foreach( GTK_TREE_MODEL(m_skipmodel), + GtkTreeModelForeachFunc(count_f), + gpointer( &count )); + return count; + } + + + + void + GTK_TreeWalkClient::makeDefaultColumnViews() + { + makeColumnView( "size-human-readable" ); + makeColumnView( "mtime-display" ); + makeColumnView( "url" ); + } + + void + GTK_TreeWalkClient::makeColumnView( const std::string& cn ) + { + int colnum = m_treemodel->getColumnNumber( cn ); + + LG_GTKFERRIS_D << "GTK_TreeWalkClient::makeColumnView() " + << " cn:" << cn + << " colnum:" << colnum + << endl; + + if( colnum != -1 ) + { + GtkCellRenderer* r = gtk_ferris_cell_renderer_text_new (); + g_object_set(r, "editable", 0, 0 ); + + GtkTreeViewColumn* c = gtk_tree_view_column_new_with_attributes( + cn.c_str(), GTK_CELL_RENDERER( r ), NULL); + + gtk_tree_view_column_set_attributes( c, r, "text", colnum, 0 ); + gtk_tree_view_append_column( GTK_TREE_VIEW( m_treeview ), c ); + gtk_tree_view_column_set_reorderable( c, 1 ); + gtk_tree_view_column_set_clickable( c, 1 ); + gtk_cell_renderer_text_set_fixed_height_from_font( + GTK_CELL_RENDERER_TEXT(r), 1 ); + + if( cn == "url" ) + { + gtk_tree_view_column_set_sizing ( c, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); + gtk_tree_view_column_set_resizable( c, true ); + } + else + { + GtkFerrisCellRendererText* ren = GTK_FERRIS_CELL_RENDERER_TEXT(r); + + if( cn == "size-human-readable" ) + { + gtk_cell_renderer_text_set_fixed_size_string( ren, "123456Mb" ); + } + else if( cn == "protection-ls" ) + { + gtk_cell_renderer_text_set_fixed_size_string( ren, "-rwxrwxrwx" ); + } + else if( cn == "mtime-display" ) + { + gtk_cell_renderer_text_set_fixed_size_string( ren, "00 MMM 00 00:00 " ); + } + } + } + else + { + cerr << "Attempt to add column:" << cn << " failed because model does" + << " not know about the column" + << endl; + } + } + + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + +}; + + + +namespace Ferris +{ + +gint +GtkProgressBinder_updater(gpointer data) +{ + GtkProgressBinder* binder = (GtkProgressBinder*)data; + + gtk_progress_set_value( GTK_PROGRESS( binder->w ), binder->items_read ); + +// cerr << "GtkProgressBinder_updater()\n\n"; + + + return 1; +} + + + + + +GtkProgressBinder::GtkProgressBinder( + GtkProgress* _w, + fh_context _ctx, + guint32 _interval, + int _update_gui + ) + : + w(_w), ctx(_ctx), interval(_interval), update_gui(_update_gui) +{ + int size = ctx->guessSize(); +// cerr << "size:" << size << endl; +// sleep(2); + + gtk_progress_configure( GTK_PROGRESS(w), 0, 0, size ); + + ctx->getNamingEvent_Start_Reading_Context_Sig().connect( + sigc::mem_fun( *this, &GtkProgressBinder::read_start )); + + ctx->getNamingEvent_Stop_Reading_Context_Sig().connect( + sigc::mem_fun( *this, &GtkProgressBinder::read_stop )); + + conn = ctx->getNamingEvent_Exists_Sig().connect( + sigc::mem_fun( *this, &GtkProgressBinder::naming_exists )); + + +} + +void +GtkProgressBinder::read_start( NamingEvent_Start_Reading_Context* e ) +{ + timer = gtk_timeout_add( interval, GtkProgressBinder_updater, this); + items_read=0; +} + + +void +GtkProgressBinder::read_stop( NamingEvent_Stop_Reading_Context* e ) +{ + gtk_timeout_remove( timer ); + gtk_progress_set_value( GTK_PROGRESS( w ), items_read ); +} + + + +void +GtkProgressBinder::naming_exists(NamingEvent_Exists* e, + const fh_context& subc, + string o, string n) +{ +// static int c = 0; +// cerr << "naming_exists! c:" << c << " chunk_size:" << chunk_size << endl; + + ++items_read; +// if(!(c % chunk_size )) +// { +// cerr << "!!!!!!!!! SETTING VALUE! " << endl; + +// if( update_gui ) +// { +// cerr << "GUI UPDATE" << endl << endl; + +// while (gtk_events_pending()) +// gtk_main_iteration(); +// } + +// } + +} + + +}; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +namespace FerrisUI +{ + + static string getRealPrefix( const std::string& path ) + { + fh_context c = Resolve( path ); + return c->getDirPath(); + } + + static string tryRemovePrefix( const std::string& path, const std::string& prefix ) + { + string ret = path; + + if( starts_with( path, prefix ) ) + { + ret = getRealPrefix( prefix ) + "/" + path.substr( prefix.length() ); + } + return ret; + } + + + string resolveToIconPath( string iconpath ) + { + if( starts_with( iconpath, "gtk-" ) ) + return iconpath; + + iconpath = tryRemovePrefix( iconpath, "icons://" ); + iconpath = tryRemovePrefix( iconpath, "gnomeicons://" ); + + if( !iconpath.empty() ) + iconpath = CleanupURL( iconpath ); + +// if( starts_with( iconpath, "icons://" ) || +// starts_with( iconpath, "gnomeicons://" )) +// { +// try +// { +// fh_context c = Resolve( iconpath ); +// iconpath = c->getDirPath(); +// cerr << "makeMenuItem adjustedicon:" << iconpath << endl; +// } +// catch(...) +// { +// iconpath = ""; +// } +// } + if( starts_with( iconpath, "file:" )) + { + iconpath = iconpath.substr( 5 ); + } + + + return iconpath; + } + + GtkWidget* makeImageButton( const std::string& s ) + { + GtkWidget* b = gtk_button_new(); + gtk_container_add( + GTK_CONTAINER(b), + gtk_image_new_from_file( + resolveToIconPath( s ).c_str() )); + return GTK_WIDGET(b); + } + + GtkWidget* + setImageButton( GtkWidget* w, const std::string& s ) + { + GtkWidget* c = gtk_bin_get_child( GTK_BIN(w) ); + if( GTK_IS_IMAGE( c ) ) + { + gtk_image_set_from_file( GTK_IMAGE( c ), + resolveToIconPath( s ).c_str() ); + } + return GTK_WIDGET(w); + } + + /************************************************/ + /************************************************/ + + struct RGBAtoPixbuf_Data + // : + // public Loki::SmallObject<> + { + int w; + int h; + RGBAtoPixbufFree_f f; + + RGBAtoPixbuf_Data( int w, int h, const RGBAtoPixbufFree_f& f ) + : + w(w), h(h), f(f) + { + } + }; + + static void RGBAtoPixbuf_GdkPixbufDestroyNotify(guchar *pixels, gpointer data) + { + RGBAtoPixbuf_Data* d = (RGBAtoPixbuf_Data*)data; + + d->f( d->w, d->h, pixels ); + delete d; + } + + void RGBAtoPixbuf_null( int w, int h, gpointer data ) + { + } + void RGBAtoPixbuf_free( int w, int h, gpointer data ) + { + free( data ); + } + void RGBAtoPixbuf_delarray( int w, int h, gpointer data ) + { + unsigned char* dp = (unsigned char*)data; + delete [] dp; + } + + GdkPixbuf* RGBAtoPixbuf( int w, int h, gpointer data, + RGBAtoPixbufFree_f f ) + { + GdkColorspace colorspace = GDK_COLORSPACE_RGB; + gboolean has_alpha = 1; + int bits_per_sample = 8; + int rowstride = w * 4; + RGBAtoPixbuf_Data* d = new RGBAtoPixbuf_Data( w, h, f ); + + { + guint8* d = (guint8*)data; + gint64 wh = w*h*4; + +// EPEG_ARGB +// EPEG_RGBA + for( guint64 i = 0; i < wh; i+=4 ) + { + swap( d[ i + 0 ], d[ i + 2 ] ); + } + } + + GdkPixbuf* ret = gdk_pixbuf_new_from_data( + (const guchar *)data, + colorspace, + has_alpha, + bits_per_sample, + w, + h, + rowstride, + RGBAtoPixbuf_GdkPixbufDestroyNotify, d ); + + return ret; + } + + GtkImage* RGBAtoImage( GtkImage* im, int w, int h, gpointer data, + RGBAtoPixbufFree_f f ) + { + GdkPixbuf* pb = RGBAtoPixbuf( w, h, data, f ); + cerr << "RGBAtoImage() im:" << toVoid(im) + << " w:" << w << " h:" << h + << " data:" << toVoid( data ) + << " pb:" << toVoid( pb ) + << endl; + gtk_image_set_from_pixbuf( im, pb ); + gdk_pixbuf_unref( pb ); + } + + GtkImage* setImageFromRGBAAttribute( GtkImage* im, + fh_context c, + const std::string& rdn_width, + const std::string& rdn_height, + const std::string& rdn_rgba32 ) + { + bool hadError = false; + int width = -1; + int height = -1; + unsigned char* data = 0; + try + { + width = toint( getStrAttr( c, rdn_width, "-1" )); + height = toint( getStrAttr( c, rdn_height, "-1" )); + + cerr << "setImageFromRGBAAttribute() c:" << c->getURL() + << " width:" << width + << " height:" << height + << endl; + + if( width < 0 || height < 0 ) + hadError = true; + else + { + cerr << "setImageFromRGBAAttribute() c:" << c->getURL() + << " rdn_rgba32:" << rdn_rgba32 + << endl; + + fh_attribute a = c->getAttribute( rdn_rgba32 ); + fh_istream iss = a->getIStream(); + const int datasz = width * height * 4; + cerr << "setImageFromRGBAAttribute() c:" << c->getURL() + << " datasz:" << datasz + << endl; + + data = new unsigned char[ datasz + 1 ]; + if( !data ) + { + cerr << "setImageFromRGBAAttribute(e) c:" << c->getURL() + << " datasz:" << datasz + << endl; + hadError = true; + } + else + { + cerr << "setImageFromRGBAAttribute() c:" << c->getURL() + << " reading data..." + << endl; + + iss.read( (char*)data, datasz ); + + cerr << "setImageFromRGBAAttribute() c:" << c->getURL() + << " read:" << iss.gcount() + << endl; + if( iss.gcount() != datasz ) + { + cerr << "setImageFromRGBAAttribute(e) c:" << c->getURL() + << " iss.gcount():" << iss.gcount() + << endl; + hadError = true; + } + else + { + RGBAtoImage( im, width, height, data ); + } + } + } + } + catch( exception& e ) + { + cerr << "setImageFromRGBAAttribute(e) c:" << c->getURL() + << " e:" << e.what() + << endl; + + hadError = true; + } + + cerr << "setImageFromRGBAAttribute(ending) c:" << c->getURL() + << " hadError:" << hadError + << endl; + + if( hadError || width == -1 || height == -1 ) + { + cerr << "setImageFromRGBAAttribute(hadError) c:" << c->getURL() + << " w:" << width + << " h:" << height + << endl; + + if( data ) + delete [] data; + gtk_image_set_from_stock( im, + GTK_STOCK_MISSING_IMAGE, + GTK_ICON_SIZE_BUTTON); + return im; + } + return im; + } + + GtkImage* setImageFromExifThumb( GtkImage* im, fh_context c ) + { + return setImageFromRGBAAttribute( im, c, + "exif:thumbnail-width", + "exif:thumbnail-height", + "exif:thumbnail-rgba-32bpp" ); + } + + + /************************************************/ + /************************************************/ + +}; diff --git a/FerrisUI/GtkFerris.hh b/FerrisUI/GtkFerris.hh new file mode 100644 index 0000000..9bae550 --- /dev/null +++ b/FerrisUI/GtkFerris.hh @@ -0,0 +1,454 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: GtkFerris.hh,v 1.12 2011/06/18 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_GTK_FERRIS_H_ +#define _ALREADY_INCLUDED_GTK_FERRIS_H_ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace Ferris; + +namespace FerrisUI +{ + FERRISEXP_API void forea_destroy( GtkWidget *widget, gpointer data ); + FERRISEXP_API std::string tostr( GtkMenuItem* menu_item ); + FERRISEXP_API std::string tostr( GtkTextView* tv ); + FERRISEXP_API std::string tostr( GtkEntry* e ); + FERRISEXP_API void showPopup( GtkMenu *menu ); + /** + * Set a GTK2 toggle button to the isTrue() value of 's' + */ + FERRISEXP_API void togButtonSet( GtkWidget* w, const std::string& s ); + /** + * Set a GTK2 toggle button to v + */ + FERRISEXP_API void togButtonSet( GtkWidget* w, bool v ); + + + + /** + * Resolve out any icons:// prefixes and return a native kernel path + */ + FERRISEXP_API std::string resolveToIconPath( std::string iconpath ); + + /** + * Make an image button using a given icon URL + * @see setImageButton() + */ + FERRISEXP_API GtkWidget* makeImageButton( const std::string& s ); + + /** + * Change the image displayed in this image button + * @see makeImageButton() + */ + FERRISEXP_API GtkWidget* setImageButton( GtkWidget* w, const std::string& s ); + + /************************************************/ + /************************************************/ + + /** + * Functor that is called when the GTK2 pixbuf is unref()ed for + * the last time. args are + * @param width + * @param height + * @param dataptr + */ + typedef Loki::Functor< void, LOKI_TYPELIST_3( int, int, gpointer ) > RGBAtoPixbufFree_f; + FERRISEXP_API void RGBAtoPixbuf_null( int w, int h, gpointer data ); + FERRISEXP_API void RGBAtoPixbuf_free( int w, int h, gpointer data ); + FERRISEXP_API void RGBAtoPixbuf_delarray( int w, int h, gpointer data ); + + /** + * Create a pixbuf from the 32bit RGBA data at 'data' which has the + * width and height given. The passed functor will be called when + * the pixbuf has its last reference removed so that the 'data' + * can be freed in whatever way it should be. + */ + FERRISEXP_API GdkPixbuf* RGBAtoPixbuf( int w, int h, gpointer data, + RGBAtoPixbufFree_f f = RGBAtoPixbuf_delarray ); + /** + * Set the GTK2 image object to a pixbuf created in a + * similar way to RGBAtoPixbuf() from w,h,data + */ + FERRISEXP_API GtkImage* RGBAtoImage( GtkImage* im, int w, int h, gpointer data, + RGBAtoPixbufFree_f f = RGBAtoPixbuf_delarray ); + + /** + * Set the GTK2 image object to the image data contained in the + * given context's attributes. The EA for the context should + * have width, height, and rgba32 bit image data in them. + */ + FERRISEXP_API GtkImage* setImageFromRGBAAttribute( GtkImage* im, + fh_context c, + const std::string& rdn_width, + const std::string& rdn_height, + const std::string& rdn_rgba32 ); + + /** + * Convenience function that calls setImageFromRGBAAttribute() + * with the correct EA names for the EXIF thumbnail in TIFF + * and JPEG/EXIF images. + */ + FERRISEXP_API GtkImage* setImageFromExifThumb( GtkImage* im, fh_context c ); + + + + + + /************************************************/ + /************************************************/ + + // + // handy stuff for dealing with gtktree model/views + // + typedef std::list< GtkTreeIter > list_gtktreeiter_t; + /** + * Get an STL list of all the selected GtkTreeIter* items in the view + * if useSelection is false then all of the GtkTreeIter* in the view are returned. + */ + FERRISEXP_API list_gtktreeiter_t getIterList( GtkWidget* w_treeview, bool useSelection = false ); + FERRISEXP_API std::string treestr( GtkTreeIter iter, GtkWidget* w_treeview, int col ); + FERRISEXP_API std::string treestr( GtkTreeIter *iter, GtkWidget* w_treeview, int col ); + FERRISEXP_API std::string treestr( void* tm_void, GtkTreeIter *iter, int col ); + FERRISEXP_API bool treebool( void* tm_void, GtkTreeIter *iter, int col ); + FERRISEXP_API long treeint( void* tm_void, GtkTreeIter *iter, int col ); + + + FERRISEXP_API int treeint( GtkTreeIter *iter, GtkWidget* w_treeview, int col ); + FERRISEXP_API bool treebool( GtkTreeIter *iter, GtkWidget* w_treeview, int col ); + FERRISEXP_API gpointer treeptr( GtkTreeIter *iter, GtkWidget* w_treeview, int col ); + + FERRISEXP_API void clearSelection( GtkTreeView* w_treeview ); + + /** + * Try to make sure at least one item is selected in the tree. If nothing + * is currently selected then the item under the mouse event at 'event' + * will be selected. If nothing was or could be selected then false is returned. + */ + FERRISEXP_API bool tryToEnsureSomethingIsSelected( GtkWidget* treeview, GdkEvent *event ); + + /** + * Get a pixbuf that is suitable for viewing inline in a tree/list widget + * This may be a scaled version of the emblem's icon if that icon is too + * large for normal tree display. + * + * This function is mainly used internally at this point. + */ + FERRISEXP_API GdkPixbuf* getEmblemListViewPixbuf( fh_emblem em ); + + + + FERRISEXP_API void RunInfoDialog( const std::string& msg, GtkWidget* win = 0 ); + FERRISEXP_API bool RunQuestionDialog( const std::string& msg, GtkWidget* win = 0 ); + FERRISEXP_API void RunErrorDialog( const std::string& msg, GtkWidget* win = 0 ); + + + class FERRISEXP_API FileCompareWindow + { + public: + typedef std::vector MatchersList_t; + MatchersList_t& getAlwaysPermitMatchers(); + MatchersList_t& getAlwaysDenyMatchers(); + + void addMatchersTo( MatchersList_t& matchersList ); + bool isContextInList( MatchersList_t& matchersList, fh_context c ); + void populateList( fh_context src, fh_context dst = 0 ); + void createMainWindow( const std::string& title = "" ); + virtual void processAllPendingEvents(); + bool processMainWindow(); + + protected: + + enum { + RPT_DESC = 0, + RPT_SRC = 1, + RPT_DST = 2, + RPT_TARGET = 2, + RPT_DSTAUTO = 3, + RPT_TARGETAUTO = 3, + RPT_N_COLUMNS = 4 + }; + GtkTreeStore* m_rptmodel; + GtkWidget* m_rptview; + GtkWindow* m_win; + bool m_result; + bool m_looping; + typedef ::Ferris::Factory::EndingList MatchData_t; + MatchersList_t AlwaysPermitMatchers; + MatchersList_t AlwaysDenyMatchers; + + typedef std::list< std::string > DisplayEAList_t; + + MatchData_t getMatchingDests(); + virtual void dialog_yes( GtkButton *button ); + virtual void dialog_auto_yes( GtkButton *button ); + virtual void dialog_auto_no( GtkButton *button ); + virtual void dialog_no( GtkButton *button ); + void dialog_auto_toggled(GtkCellRendererToggle *cell, gchar *path_string ); + + private: + DisplayEAList_t getEAList(); + + friend void dialog_yes( GtkButton *button, gpointer udata ); + friend void dialog_auto_yes( GtkButton *button, gpointer udata ); + friend void dialog_auto_no( GtkButton *button, gpointer udata ); + friend void dialog_no( GtkButton *button, gpointer udata ); + friend void dialog_auto_toggled(GtkCellRendererToggle *cell, + gchar *path_string, gpointer udata); + + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + + class FERRISEXP_API Quit_Requested + { + }; + + + template + void populateModelWithSelection( fh_ftreemodel m, Iter b, Iter e ) + { + fh_context selfactory = Resolve( "selectionfactory://" ); + fh_context selection = selfactory->createSubContext( "" ); + + for( ; b != e ; ++b ) + { + std::string SrcName = *b; + + fh_context ctx = Resolve( SrcName ); +// std::cerr << "Adding ctx:" << ctx->getURL() +// << " to selection:" << selection->getURL() +// << " selfactory:" << selfactory->getURL() +// << std::endl; + selection->createSubContext( "", ctx ); + } + + m->setURL( selection ); + m->read(); + } + + + class FERRISEXP_API GTK_TreeWalkClient + { + typedef GTK_TreeWalkClient _Self; + friend gboolean GTK_TreeWalkClient__window_closing (GtkObject *object, gpointer udata); + + protected: + + guint64 m_highestSeenContextID; + bool m_performing; + Ferrisls_aggregate_t m_totalagg; + + virtual bool shouldPrecacheSourceSize(); + + Ferrisls_aggregate_t getTotalAggregateData( fh_context src ); + ctxlist_t getAllRemainingSrcsContextList(); + virtual void OnDropped( const ctxlist_t& clist ); + virtual void performActionForSource( fh_context c ); + virtual void updateProgressForAggregateData( const Ferrisls_aggregate_t& agg, + bool added ); + + + public: + + GTK_TreeWalkClient(); + ~GTK_TreeWalkClient(); + + void performActionForAllRemainingSources(); + + void makeMainWindow( const std::string& title = "" ); + void showMainWindow( bool Sloth, bool force = false ); + void processAllPendingEvents(); + void runMainWindow( bool Sloth ); + + void makeColumnView( const std::string& cn ); + void makeDefaultColumnViews(); + + void addToSkipped( const std::string& desc, const std::string& reason ); + int getNumberOfSkipped(); + + /** + * only returns false if the user has selected AutoClose and there are no + * skipped items and there was no explicit user interaction taken. + */ + bool getShouldRunMainLoop( bool AutoClose, bool hadUserInteraction ); + + void updateStartTime(); + void updateElapsedTime(); + + + GtkWidget* m_win; + fh_ftreemodel m_treemodel; + GtkWidget* m_treeview; + GtkWidget* m_scrolledwindow; + GtkWidget* m_targetlab; + GtkProgressBar* m_progress; + GtkProgressBar* m_overall_progress; + GtkWidget* m_srclab; + GtkWidget* m_dstlab; + GtkWidget* m_speedlab; + GtkWidget* m_currentObjectLab; + GtkWidget* m_starttimelab; + GtkWidget* m_elapsedtimelab; + GtkWidget* m_playpausebut; + GtkNotebook* m_notebook; + enum { + SKIP_REASON, + SKIP_DESC, + SKIP_N_COLUMNS + }; + GtkTreeStore* m_skipmodel; + GtkWidget* m_skipview; + + time_t actionstart_tt; + + bool m_running; + + void play_pause_button( GtkButton *button ); + + /** + * calls OnDropped() with a list< fh_context > to make it easy for subclasses + */ + virtual void drag_data_received( + GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *data, + guint info, + guint time ); + + protected: + + typedef gint32 gtk_window_is_closed_t; + gtk_window_is_closed_t gtk_window_is_closed; + + void resizeBodyElements( GtkWidget* table, int rowCount = 0 ); + void addSeparatorRow( GtkWidget* table, int& r, const char* label ); + virtual void addSourceRow( GtkWidget* table, int& r ); + virtual void addDestinationRow( GtkWidget* table, int& r ); + virtual void addTarget( GtkWidget* table, int& r ); + virtual void addCurrent( GtkWidget* table, int& r ); + virtual void addSpeedRow( GtkWidget* table, int& r ); + virtual void addProgressRow( GtkWidget* table, int& r ); + virtual void addOverallProgressRow( GtkWidget* table, int& r ); + virtual void addStartTimeRow( GtkWidget* table, int& r ); + virtual void addElapsedTimeRow( GtkWidget* table, int& r ); + virtual void addBodyElements( GtkWidget* table, int& r ); + virtual void addSkippingPage(); + virtual void addOtherPages(); + virtual void addVCRControls( GtkWidget* table ); + + virtual void setSourceLabel( const std::string& s ); + virtual void setDestinationLabel( const std::string& s ); + virtual void setProgress( double v, const std::string& s ); + virtual void setProgress( double current, double total ); + virtual void setOverallProgress( double v, const std::string& s ); + virtual void setOverallProgress( double current, double total ); + + + /** + * tryToPlay() / tryToPause() are called when the VCR controls are clicked + * to play/pause the process. If either function returns false then it is + * assumed that an error occured and has already been flagged to the user. + * On a false return the GUI indicators are not changed to any new state. + */ + virtual bool tryToPlay(); + virtual bool tryToPause(); + + void setWindowTitle( const std::string& s ); + + private: + + void addSmallLabel( GtkWidget* table, GtkWidget* lab, int c, int r ); + void addLargeLabel( GtkWidget* table, GtkWidget* lab, int c, int r ); + + }; + + /******************************************************************************/ + /******************************************************************************/ + /******************************************************************************/ + +}; + + +namespace Ferris +{ + + +class FERRISEXP_API GtkProgressBinder : public sigc::trackable +{ +private: + + GtkProgress* w; + fh_context ctx; + sigc::connection conn; + guint32 interval; + int update_gui; + guint timer; + guint32 items_read; + + friend gint GtkProgressBinder_updater(gpointer data); + + +public: + + + GtkProgressBinder( + GtkProgress* _w, + fh_context _ctx, + guint32 _interval=250, + int _update_gui=1 + ); + + void read_start( NamingEvent_Start_Reading_Context* e ); + void read_stop( NamingEvent_Stop_Reading_Context* e ); + void naming_exists(NamingEvent_Exists* e, + const fh_context& subc, + std::string o, std::string n); + +}; + +}; +#endif diff --git a/FerrisUI/GtkFerris_private.hh b/FerrisUI/GtkFerris_private.hh new file mode 100644 index 0000000..e1e847a --- /dev/null +++ b/FerrisUI/GtkFerris_private.hh @@ -0,0 +1,43 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris context tree store driver for reading and putting into a + gtkferristreestore + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: GtkFerris_private.hh,v 1.3 2011/06/18 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_PRIVATE_H__ +#define __GTK_FERRIS_PRIVATE_H__ + +#include + +#include +#include +#include + +namespace FerrisUI +{ +}; +#endif diff --git a/FerrisUI/Makefile.am b/FerrisUI/Makefile.am new file mode 100644 index 0000000..3e9218a --- /dev/null +++ b/FerrisUI/Makefile.am @@ -0,0 +1,68 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GTK_CFLAGS@ \ + -I/usr/local/witme-file-3.35/include \ + @FAMPP2_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @CFLAGS@ + +lib_LTLIBRARIES = libferrisui.la + +################################################################### +################################################################### +################################################################### + +ferrisuiincludedir=$(includedir)/FerrisUI +ferrisuiinclude_HEADERS = \ + All.hh \ + GtkFerris.hh \ + gtkferriscellrenderertext.hh \ + gtkferristreestore.hh \ + TreeStoreDriver.hh \ + FerrisCopyUI.hh \ + FerrisRemoveUI.hh \ + FerrisOptionMenu.hh \ + ContextPropertiesEditor.hh \ + UAsyncIO.hh \ + EditStringList.hh \ + Menus.hh \ + MedallionEditor.hh \ + EditSQLColumns.hh \ + SubprocessButtonAndLabel.hh + +libferrisui_la_SOURCES = \ + GtkFerris.cpp \ + gtkferriscellrenderertext.cpp \ + gtkferristreestore.cpp \ + TreeStoreDriver.cpp \ + FerrisCopyUI.cpp \ + FerrisRemoveUI.cpp \ + GtkFerris_private.hh \ + FerrisOptionMenu.cpp \ + ContextPropertiesEditor.cpp \ + UAsyncIO.cpp \ + EditStringList.cpp \ + Menus.cpp \ + MedallionEditor.cpp \ + gtkcellrendererprogress.c gtkcellrendererprogress.h \ + EditSQLColumns.cpp \ + SubprocessButtonAndLabel.cpp + +#libferrisui_la_LIBADD = #$(top_builddir)/src/libferris.la +libferrisui_la_LDFLAGS = @GTK_LIBS@ + +################################################################### +################################################################### +################################################################### + diff --git a/FerrisUI/Makefile.in b/FerrisUI/Makefile.in new file mode 100644 index 0000000..ff0aca9 --- /dev/null +++ b/FerrisUI/Makefile.in @@ -0,0 +1,1126 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = FerrisUI +DIST_COMMON = $(ferrisuiinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(ferrisuiincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libferrisui_la_LIBADD = +am_libferrisui_la_OBJECTS = GtkFerris.lo gtkferriscellrenderertext.lo \ + gtkferristreestore.lo TreeStoreDriver.lo FerrisCopyUI.lo \ + FerrisRemoveUI.lo FerrisOptionMenu.lo \ + ContextPropertiesEditor.lo UAsyncIO.lo EditStringList.lo \ + Menus.lo MedallionEditor.lo gtkcellrendererprogress.lo \ + EditSQLColumns.lo SubprocessButtonAndLabel.lo +libferrisui_la_OBJECTS = $(am_libferrisui_la_OBJECTS) +libferrisui_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libferrisui_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferrisui_la_SOURCES) +DIST_SOURCES = $(libferrisui_la_SOURCES) +HEADERS = $(ferrisuiinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @GTK_CFLAGS@ \ + -I/usr/local/witme-file-3.35/include \ + @FAMPP2_CFLAGS@ \ + -DBUILDING_LIBFERRIS \ + @CFLAGS@ + +lib_LTLIBRARIES = libferrisui.la + +################################################################### +################################################################### +################################################################### +ferrisuiincludedir = $(includedir)/FerrisUI +ferrisuiinclude_HEADERS = \ + All.hh \ + GtkFerris.hh \ + gtkferriscellrenderertext.hh \ + gtkferristreestore.hh \ + TreeStoreDriver.hh \ + FerrisCopyUI.hh \ + FerrisRemoveUI.hh \ + FerrisOptionMenu.hh \ + ContextPropertiesEditor.hh \ + UAsyncIO.hh \ + EditStringList.hh \ + Menus.hh \ + MedallionEditor.hh \ + EditSQLColumns.hh \ + SubprocessButtonAndLabel.hh + +libferrisui_la_SOURCES = \ + GtkFerris.cpp \ + gtkferriscellrenderertext.cpp \ + gtkferristreestore.cpp \ + TreeStoreDriver.cpp \ + FerrisCopyUI.cpp \ + FerrisRemoveUI.cpp \ + GtkFerris_private.hh \ + FerrisOptionMenu.cpp \ + ContextPropertiesEditor.cpp \ + UAsyncIO.cpp \ + EditStringList.cpp \ + Menus.cpp \ + MedallionEditor.cpp \ + gtkcellrendererprogress.c gtkcellrendererprogress.h \ + EditSQLColumns.cpp \ + SubprocessButtonAndLabel.cpp + + +#libferrisui_la_LIBADD = #$(top_builddir)/src/libferris.la +libferrisui_la_LDFLAGS = @GTK_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu FerrisUI/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu FerrisUI/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferrisui.la: $(libferrisui_la_OBJECTS) $(libferrisui_la_DEPENDENCIES) + $(libferrisui_la_LINK) -rpath $(libdir) $(libferrisui_la_OBJECTS) $(libferrisui_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ContextPropertiesEditor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EditSQLColumns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EditStringList.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisCopyUI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisOptionMenu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FerrisRemoveUI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GtkFerris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MedallionEditor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Menus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SubprocessButtonAndLabel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TreeStoreDriver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UAsyncIO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcellrendererprogress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkferriscellrenderertext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkferristreestore.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ferrisuiincludeHEADERS: $(ferrisuiinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(ferrisuiincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ferrisuiincludedir)" + @list='$(ferrisuiinclude_HEADERS)'; test -n "$(ferrisuiincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ferrisuiincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(ferrisuiincludedir)" || exit $$?; \ + done + +uninstall-ferrisuiincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(ferrisuiinclude_HEADERS)'; test -n "$(ferrisuiincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(ferrisuiincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(ferrisuiincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ferrisuiincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-ferrisuiincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-ferrisuiincludeHEADERS \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am \ + install-ferrisuiincludeHEADERS install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-ferrisuiincludeHEADERS \ + uninstall-libLTLIBRARIES + + +################################################################### +################################################################### +################################################################### + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/FerrisUI/MedallionEditor.cpp b/FerrisUI/MedallionEditor.cpp new file mode 100644 index 0000000..69fdbdd --- /dev/null +++ b/FerrisUI/MedallionEditor.cpp @@ -0,0 +1,628 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MedallionEditor.cpp,v 1.9 2010/09/24 21:31:05 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; + +namespace FerrisUI +{ + emblemID_t + MedallionEditor::getCurrentSelectedEmblemID( GtkTreeIter *iter ) + { + emblemID_t ret = 0; + string s = treestr( iter, w_treeview, C_EMBLEM_ID_COLUMN ); + if( !s.empty() ) + ret = toType( s ); + return ret; + } + + emblemID_t + MedallionEditor::getCurrentSelectedEmblemID() + { + emblemID_t ret = 0; + + list_gtktreeiter_t gl = getIterList( w_treeview, true ); + if( !gl.empty() ) + { + string s = treestr( &gl.front(), w_treeview, C_EMBLEM_ID_COLUMN ); + if( !s.empty() ) + ret = toType( s ); + } + return ret; + } + + void + MedallionEditor::update_all_emblems_in_partial_order_rec( GtkTreeModel* model, GtkTreeIter* iter, + fh_medallion med, fh_emblem em, emblemID_t eid ) + { + while( true ) + { + if( eid == getCurrentSelectedEmblemID( iter ) ) + { + string name = em->getName(); + string desc = em->getDescription(); + double fuzzy = med->getFuzzyBelief( em ); + bool isAsserted = med->hasEmblem( em ); + bool isRetracted = med->hasRetractedEmblem( em ); + + gtk_tree_store_set( GTK_TREE_STORE(model), iter, + C_ASSERT_COLUMN, isAsserted, + C_RETRACT_COLUMN, isRetracted, + C_EMBLEM_DESC_COLUMN, desc.c_str(), + C_EMBLEM_FUZZY_COLUMN, fuzzy, + -1 ); +// gtk_tree_store_set (GTK_TREE_STORE (model), iter, cidx, value, -1); + } + + GtkTreeIter childiter; + if( gtk_tree_model_iter_children( model, &childiter, iter ) ) + { + update_all_emblems_in_partial_order_rec( model, &childiter, med, em, eid ); + } + + if( !gtk_tree_model_iter_next( model, iter )) + break; + } + } + + void + MedallionEditor::update_all_emblems_in_partial_order( GtkTreeModel* model, fh_medallion med, fh_emblem em ) + { + // Not gtk_store_set all the GTK tree model rows which represent + // the same emblem in the partial order. + GtkTreeIter giter; + if( gtk_tree_model_get_iter_first( model, &giter ) ) + { + update_all_emblems_in_partial_order_rec( model, &giter, med, em, em->getID() ); + } + } + + void emblem_assert_toggled_cb( GtkCellRendererToggle *cell, + gchar *path_string, + gpointer user_data) + { + MedallionEditor* me = (MedallionEditor*)user_data; + me->emblem_assert_toggled( cell, path_string ); + } + + void + MedallionEditor::emblem_assert_toggled( GtkCellRendererToggle *cell, gchar *path_string ) + { + try + { + + int cidx = (int)C_ASSERT_COLUMN; + +// cerr << "MedEditor::emblem_toggled() this:" << toVoid( this ) << endl; + + GtkTreeIter iter; + GtkTreeModel* model = GTK_TREE_MODEL (w_treemodel); + GtkTreePath* path = gtk_tree_path_new_from_string (path_string); + gboolean value; + + gtk_tree_model_get_iter (model, &iter, path); + gtk_tree_model_get (model, &iter, cidx, &value, -1); + value = !value; + + // update the medallion to reflect this change + emblemID_t eid = getCurrentSelectedEmblemID( &iter ); + if( eid ) + { + Util::ValueRestorer valrest( m_userMedallionUpdateHandled, true ); + + fh_emblem em = m_et->getEmblemByID( eid ); + fh_medallion med = m_ctx->getMedallion(); + +// cerr << "MedEditor::emblem_toggled() emid:" << eid +// << " emblem:" << em->getName() +// << " value:" << value +// << endl; + +// med->ensureEmblem( em, value ); + if( value ) + med->addEmblem( em ); + if( !value ) + med->removeEmblem( em ); + + // set GTK+ view + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, cidx, value, -1); + update_all_emblems_in_partial_order( model, med, em ); + med->sync(); +// cerr << "Synced" << endl; + } + gtk_tree_path_free (path); + } + catch( exception& e ) + { + stringstream ss; + ss << "Error:" << e.what() << endl; + RunErrorDialog( ss.str(), 0 ); + } + } + + void emblem_retract_toggled_cb( GtkCellRendererToggle *cell, + gchar *path_string, + gpointer user_data) + { + MedallionEditor* me = (MedallionEditor*)user_data; + me->emblem_retract_toggled( cell, path_string ); + } + + void + MedallionEditor::emblem_retract_toggled( GtkCellRendererToggle *cell, gchar *path_string ) + { + try + { + + int cidx = (int)C_RETRACT_COLUMN; + +// cerr << "MedEditor::emblem_toggled() this:" << toVoid( this ) << endl; + + GtkTreeIter iter; + GtkTreeModel* model = GTK_TREE_MODEL (w_treemodel); + GtkTreePath* path = gtk_tree_path_new_from_string (path_string); + gboolean value; + + gtk_tree_model_get_iter (model, &iter, path); + gtk_tree_model_get (model, &iter, cidx, &value, -1); + value = !value; + + // update the medallion to reflect this change + emblemID_t eid = getCurrentSelectedEmblemID( &iter ); + if( eid ) + { + Util::ValueRestorer valrest( m_userMedallionUpdateHandled, true ); + + fh_emblem em = m_et->getEmblemByID( eid ); + fh_medallion med = m_ctx->getMedallion(); + +// cerr << "MedEditor::emblem_toggled() emid:" << eid +// << " emblem:" << em->getName() +// << " value:" << value +// << endl; + +// med->ensureEmblem( em, value ); + if( value ) + med->retractEmblem( em ); + if( !value ) + med->removeEmblem( em ); + + // set GTK+ view + gtk_tree_store_set (GTK_TREE_STORE (model), &iter, cidx, value, -1); + update_all_emblems_in_partial_order( model, med, em ); + med->sync(); + } + gtk_tree_path_free (path); + } + catch( exception& e ) + { + stringstream ss; + ss << "Error:" << e.what() << endl; + RunErrorDialog( ss.str(), 0 ); + } + } + + + MedallionEditor::MedallionEditor() + : + m_ctx( 0 ), + m_et( Factory::getEtagere() ), + m_showDesc( false ), + m_showFuzzyHints( true ), + w_treemodel( 0 ), + w_treeview( 0 ), + w_baseWidget( 0 ), + m_userMedallionUpdateHandled( false ) + { + } + + MedallionEditor::~MedallionEditor() + { + } + + + void + MedallionEditor::setShowDescription( bool v ) + { + m_showDesc = v; + } + + void + MedallionEditor::setShowFuzzyHints( bool v ) + { + m_showFuzzyHints = v; + } + + struct TreeExpander + { + typedef list< GtkTreePath* > paths_t; + paths_t paths; + GtkTreePath* m_focusPath; + GtkTreeViewColumn* m_focusColumn; + + static void rememberExpanded_cb( GtkTreeView *tree_view, + GtkTreePath *path, + gpointer user_data) + { + TreeExpander* thisp = (TreeExpander*)user_data; + thisp->rememberExpanded( path ); + } + void rememberExpanded( GtkTreePath *path ) + { + paths.push_back( gtk_tree_path_copy( path )); + } + GtkWidget* w_treeview; + TreeExpander( GtkWidget* w_treeview ) + : + w_treeview( w_treeview ), + m_focusPath( 0 ), + m_focusColumn( 0 ) + { + gtk_tree_view_get_cursor( GTK_TREE_VIEW( w_treeview ), &m_focusPath, &m_focusColumn ); + gtk_tree_view_map_expanded_rows( GTK_TREE_VIEW( w_treeview ), rememberExpanded_cb, this ); + } + ~TreeExpander() + { + for( paths_t::const_iterator pi = paths.begin(); pi != paths.end(); ) + { + GtkTreePath* path = *pi; + gtk_tree_view_expand_to_path( GTK_TREE_VIEW( w_treeview ), path ); + ++pi; + gtk_tree_path_free( path ); + } + gtk_tree_view_set_cursor( GTK_TREE_VIEW( w_treeview ), m_focusPath, m_focusColumn, false ); + gtk_tree_path_free( m_focusPath ); + } + }; + + + + + void + MedallionEditor::setContext( fh_context c ) + { + Time::Benchmark bm1("+++setContext(1)"); + TreeExpander treeexpander( w_treeview ); + clear(); + + m_ctxConnection.disconnect(); + m_ctx = c; + m_ctxConnection = m_ctx->getNamingEvent_MedallionUpdated_Sig() + .connect( sigc::mem_fun( *this, &_Self::OnMedallionUpdated )); + + Time::Benchmark bm2("+++setContext(2)"); + update_model(); + } + + fh_context + MedallionEditor::getContext() + { + return m_ctx; + } + + void + MedallionEditor::OnMedallionUpdated( fh_context c ) + { + cerr << "MedallionEditor::OnMedallionUpdated(1)" + << " c:" << c->getURL() + << " m_ctx:" << m_ctx->getURL() + << endl; + + if( m_userMedallionUpdateHandled ) + return; + + if( c == m_ctx && w_baseWidget ) + { + TreeExpander treeexpander( w_treeview ); + clear(); + update_model(); + } + } + + void + MedallionEditor::clear() + { + if( w_treemodel ) + gtk_tree_store_clear( w_treemodel ); + } + + + + void + MedallionEditor::update_model( fh_medallion& med, GtkTreeIter* piter, fh_emblem em ) + { + Util::ValueRestorer valrest( m_userMedallionUpdateHandled, true ); + + string name = em->getName(); + string icon = em->getIconName(); + string desc = em->getDescription(); + double fuzzy = med->getFuzzyBelief( em ); + bool isAsserted = med->hasEmblem( em ); + bool isRetracted = med->hasRetractedEmblem( em ); + + GtkTreeIter treeiter; + gtk_tree_store_append( w_treemodel, &treeiter, piter ); + gtk_tree_store_set( w_treemodel, &treeiter, + C_ASSERT_COLUMN, isAsserted, + C_RETRACT_COLUMN, isRetracted, + C_EMBLEM_ID_COLUMN, Ferris::tostr(em->getID()).c_str(), + C_EMBLEM_NAME_COLUMN, name.c_str(), + C_EMBLEM_ICON_COLUMN, getEmblemListViewPixbuf( em ), + C_EMBLEM_DESC_COLUMN, desc.c_str(), + C_EMBLEM_FUZZY_COLUMN, fuzzy, + -1 ); + + emblems_t el = em->getChildren(); + if( !el.empty() ) + { +// cerr << "MedallionEditor::update_model(rec) el.sz:" << el.size() << endl; + + fh_emblem de = getDummyTreeModelEmblem(); + update_model( med, &treeiter, de ); + } + +// emblems_t::iterator _end = el.end(); +// for( emblems_t::iterator ei = el.begin(); ei != _end; ++ei ) +// { +// fh_emblem child = *ei; +// update_model( med, &treeiter, child ); +// } + } + + + void on_gtk_row_expanded_cb ( GtkTreeView *treeview, + GtkTreeIter *arg1, + GtkTreePath *arg2, + gpointer user_data) + { + MedallionEditor* me = (MedallionEditor*)user_data; + me->on_gtk_row_expanded( treeview, arg1, arg2 ); + } + void MedallionEditor::on_gtk_row_expanded ( GtkTreeView *treeview, + GtkTreeIter *piter, + GtkTreePath *ppath ) + { +// cerr << "on_gtk_row_expanded()" << endl; + + GtkTreeIter child_iter; + gboolean rc = gtk_tree_model_iter_nth_child( GTK_TREE_MODEL(w_treemodel), + &child_iter, + piter, + 0 ); + + emblemID_t first_child_eid = getCurrentSelectedEmblemID( &child_iter ); + fh_emblem de = getDummyTreeModelEmblem(); + + if( first_child_eid == de->getID() ) + { + fh_medallion med = m_ctx->getMedallion(); + + emblemID_t eid = getCurrentSelectedEmblemID( piter ); + fh_emblem pem = m_et->getEmblemByID( eid ); + emblems_t el = pem->getChildren(); + + emblems_t::iterator _end = el.end(); + for( emblems_t::iterator ei = el.begin(); ei != _end; ++ei ) + { + fh_emblem child = *ei; + update_model( med, piter, child ); + } + gtk_tree_store_remove( GTK_TREE_STORE(w_treemodel), &child_iter ); + } + } + + + void + MedallionEditor::update_model() + { + if( !m_ctx ) + return; + if( !w_baseWidget ) + return; + + + emblems_t all = m_et->getAllEmblems(); + fh_medallion med = m_ctx->getMedallion(); + + for( emblems_t::const_iterator ei = all.begin(); ei!=all.end(); ++ei ) + { + fh_emblem em = *ei; +// cerr << "MedallionEditor::update_model(em iter) em:" << em->getID() << endl; + + if( em->getParents().empty() ) + { + update_model( med, NULL, em ); + } + } + } + + void + MedallionEditor::OnEmblemCreated( fh_etagere, fh_emblem em ) + { + fh_medallion med = m_ctx->getMedallion(); + + TreeExpander treeexpander( w_treeview ); + clear(); + update_model(); + } + + + + + GtkWidget* + MedallionEditor::getWidget() + { + if( w_baseWidget ) + return w_baseWidget; + + GtkWidget* page = w_baseWidget = gtk_table_new ( 1, 1, false ); + int colcount = 1; + int r=0; + int c=0; + GtkWidget* b; + GtkWidget* lab; + + w_treemodel = gtk_tree_store_new( C_COLUMN_COUNT, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_STRING, G_TYPE_STRING, + GDK_TYPE_PIXBUF, G_TYPE_STRING, + G_TYPE_DOUBLE ); + + w_treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL( w_treemodel )); + g_signal_connect_data( G_OBJECT( w_treeview ), "row-expanded", + G_CALLBACK (on_gtk_row_expanded_cb), (gpointer)this, + 0, GConnectFlags(0)); + + GtkWidget* sw; + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_container_add( GTK_CONTAINER( sw ), GTK_WIDGET( w_treeview )); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); +// gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(sw), 1, 1, 0 ); + gtk_table_attach_defaults(GTK_TABLE(page), sw, c+0, c+1, r, r+1 ); + + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (w_treeview), TRUE); + GObject *selection; + selection = G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (w_treeview))); + gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection), GTK_SELECTION_SINGLE); + gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW (w_treeview), true ); + gtk_tree_view_set_search_column(GTK_TREE_VIEW (w_treeview), C_EMBLEM_NAME_COLUMN ); + + + /* Setup view */ + GtkCellRenderer* ren; + int colnum = 0; + + colnum = C_ASSERT_COLUMN; + ren = gtk_cell_renderer_toggle_new(); + g_object_set(ren, "editable", 1, 0 ); + g_signal_connect_data( G_OBJECT( ren ), "toggled", + G_CALLBACK (emblem_assert_toggled_cb), (gpointer)this, + 0, GConnectFlags(0)); + + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "Y", ren, + "active", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + + + colnum = C_RETRACT_COLUMN; + ren = gtk_cell_renderer_toggle_new(); + g_object_set(ren, "editable", 1, 0 ); + g_signal_connect_data( G_OBJECT( ren ), "toggled", + G_CALLBACK (emblem_retract_toggled_cb), (gpointer)this, + 0, GConnectFlags(0)); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "N", ren, + "active", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + + + colnum = C_EMBLEM_ID_COLUMN; + ren = gtk_cell_renderer_text_new (); + g_object_set(ren, "editable", 0, 0 ); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "id", ren, + "text", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + + + colnum = C_EMBLEM_ICON_COLUMN; + ren = gtk_cell_renderer_pixbuf_new(); + g_object_set (G_OBJECT (ren), + "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, + NULL); + g_signal_connect_data( G_OBJECT( ren ), "toggled", + G_CALLBACK (emblem_assert_toggled_cb), this, + 0, GConnectFlags(0)); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "icon", ren, + "pixbuf", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + + if( m_showFuzzyHints ) + { + colnum = C_EMBLEM_FUZZY_COLUMN; + ren = gtk_cell_renderer_progress_new(); + g_object_set(ren, "editable", 0, 0 ); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( + "belief", ren, + "percentage", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + } + + colnum = C_EMBLEM_NAME_COLUMN; + ren = gtk_cell_renderer_text_new (); + g_object_set(ren, "editable", 0, 0 ); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "emblem", ren, + "text", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + gtk_tree_sortable_set_sort_column_id( GTK_TREE_SORTABLE( w_treemodel ), + colnum, GTK_SORT_ASCENDING ); + + + if( m_showDesc ) + { + colnum = C_EMBLEM_DESC_COLUMN; + ren = gtk_cell_renderer_text_new (); + g_object_set(ren, "editable", 0, 0 ); + w_cols[ colnum ] = gtk_tree_view_column_new_with_attributes( "description", ren, + "text", colnum, + NULL); + gtk_tree_view_append_column( GTK_TREE_VIEW( w_treeview ), w_cols[ colnum ] ); + gtk_tree_view_column_set_sort_column_id( w_cols[ colnum ], colnum ); + } + + update_model(); + m_et->getEmblemCreated_Sig().connect( sigc::mem_fun( *this, &_Self::OnEmblemCreated )); + + + return w_baseWidget; + } + + + + +}; diff --git a/FerrisUI/MedallionEditor.hh b/FerrisUI/MedallionEditor.hh new file mode 100644 index 0000000..6bd3f0f --- /dev/null +++ b/FerrisUI/MedallionEditor.hh @@ -0,0 +1,131 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001-2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: MedallionEditor.hh,v 1.5 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_MEDALLION_EDITOR_H_ +#define _ALREADY_INCLUDED_FERRISUI_MEDALLION_EDITOR_H_ + +#include +#include +#include +#include + +namespace FerrisUI +{ + using namespace Ferris; + + + class MedallionEditor; + FERRIS_SMARTPTR( MedallionEditor, fh_medallionEditor ); + + class FERRISEXP_API MedallionEditor + : + public Handlable + { + typedef MedallionEditor _Self; + + fh_context m_ctx; + fh_etagere m_et; + bool m_showDesc; + bool m_showFuzzyHints; + bool m_userMedallionUpdateHandled; + + enum { + C_ASSERT_COLUMN=0, + C_RETRACT_COLUMN, + C_EMBLEM_ID_COLUMN, + C_EMBLEM_NAME_COLUMN, + C_EMBLEM_ICON_COLUMN, + C_EMBLEM_DESC_COLUMN, + C_EMBLEM_FUZZY_COLUMN, + C_COLUMN_COUNT + }; + GtkTreeStore* w_treemodel; + GtkWidget* w_treeview; + GtkTreeViewColumn* w_cols[C_COLUMN_COUNT]; + GtkWidget* w_baseWidget; + + sigc::connection m_ctxConnection; + + void update_model( fh_medallion& med, GtkTreeIter* piter, fh_emblem parent_em ); + void update_all_emblems_in_partial_order_rec( GtkTreeModel* model, GtkTreeIter* iter, + fh_medallion med, fh_emblem em, emblemID_t eid ); + void update_all_emblems_in_partial_order( GtkTreeModel* model, fh_medallion med, fh_emblem em ); + + + public: + + MedallionEditor(); + virtual ~MedallionEditor(); + + + /** + * Show the description of the emblem too. Default false + * set before calling getWidget() + */ + void setShowDescription( bool v ); + + /** + * Show the result of getFuzzyBelief for each emblem too. + * Default true. Set before calling getWidget() + */ + void setShowFuzzyHints( bool v ); + + /** + * set the context we are editing + */ + void setContext( fh_context c ); + fh_context getContext(); + + GtkWidget* getWidget(); + + /*********************************************************/ + /*** the following should be considered private **********/ + /*********************************************************/ + emblemID_t getCurrentSelectedEmblemID(); + emblemID_t getCurrentSelectedEmblemID( GtkTreeIter *iter ); + + void clear(); + void update_model(); + + void OnMedallionUpdated( fh_context c ); + void OnEmblemCreated( fh_etagere, fh_emblem em ); + + /*********************************************************/ + /*** signal handlers *************************************/ + /*********************************************************/ + void emblem_assert_toggled( GtkCellRendererToggle *cell, gchar *path_string ); + void emblem_retract_toggled( GtkCellRendererToggle *cell, gchar *path_string ); + + void on_gtk_row_expanded ( GtkTreeView *treeview, + GtkTreeIter *arg1, + GtkTreePath *arg2 ); + + }; +}; +#endif diff --git a/FerrisUI/Menus.cpp b/FerrisUI/Menus.cpp new file mode 100644 index 0000000..6b9f6df --- /dev/null +++ b/FerrisUI/Menus.cpp @@ -0,0 +1,767 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Menus.cpp,v 1.7 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "Menus.hh" +#include "GtkFerris.hh" + +using namespace std; + +namespace FerrisUI +{ + string getMenuItemLabelString( GtkMenuItem* m ) + { + string ret = ""; + GtkWidget* ch = gtk_bin_get_child( GTK_BIN(m) ); + GtkLabel*l = GTK_LABEL( ch ); + if( l ) + { + if( const gchar* lt = gtk_label_get_text( l ) ) + ret = lt; + } + return ret; + } + bool isMenuItemUsed( GtkMenuShell* m, const string& label ) + { + bool ret = false; + + GList* gl = gtk_container_get_children( GTK_CONTAINER(m) ); + while( gl ) + { + GtkWidget* subitem = GTK_WIDGET(gl->data); + +// cerr << "isMenuItemUsed() label:" << label +// << " mi.label:" << getMenuItemLabelString( GTK_MENU_ITEM( subitem ) ) +// << endl; + + if( starts_with( getMenuItemLabelString( GTK_MENU_ITEM( subitem ) ), label ) + || starts_with( getMenuItemLabelString( GTK_MENU_ITEM( subitem ) ), (string)"< " + label ) + ) + return true; + gl = g_list_next( gl ); + } + return ret; + } + + + bool hasParentMenuItem( GtkMenuItem* m ) + { + GtkWidget* par = GTK_WIDGET(m); + g_object_get( m, "parent", &par, 0 ); + par = gtk_menu_get_attach_widget( GTK_MENU(par) ); + return GTK_IS_MENU_ITEM( par ); + } + + GtkMenuItem* getParentMenuItem( GtkMenuItem* m ) + { + GtkWidget* par = GTK_WIDGET(m); + g_object_get( m, "parent", &par, 0 ); + par = gtk_menu_get_attach_widget( GTK_MENU(par) ); + return GTK_MENU_ITEM( par ); + } + + GtkMenuItem* getRootMenuItem( GtkMenuItem* mi ) + { + GtkMenuItem* t = getParentMenuItem( mi ); + if( !t ) + return mi; + return getRootMenuItem( t ); + } + + string makeMenuPath( GtkMenuItem* mi, GtkWidget* rootm ) + { + string path = tostr( mi ); + if( gtk_menu_item_get_submenu( mi ) == (GtkWidget*)rootm ) + path = ""; + + while( gtk_menu_item_get_submenu( mi ) != (GtkWidget*)rootm && + hasParentMenuItem( mi ) ) + { + mi = getParentMenuItem( mi ); + if( gtk_menu_item_get_submenu( mi ) == (GtkWidget*)rootm ) + break; + + path = tostr( mi ) + "/" + path; + } + return path; + } + + GtkWidget* makeStockMenuItem( const gchar *stock_id ) + { + return gtk_image_menu_item_new_from_stock( stock_id, 0 ); + } + + + GtkWidget* makeMenuItem( const std::string& label, + std::string iconpath, + bool isCheckedMenuItem ) + { + GtkWidget* child; + if( isCheckedMenuItem ) + { + child = gtk_check_menu_item_new_with_label( label.c_str() ); + } + else + { + child = gtk_image_menu_item_new_with_label( label.c_str() ); + } + + + if( !iconpath.empty() ) + { + iconpath = resolveToIconPath( iconpath ); + + GtkWidget* imagewid = 0; + if( starts_with( iconpath, "gtk-" )) + { + imagewid = gtk_image_new_from_stock( iconpath.c_str(), GTK_ICON_SIZE_MENU ); + } + else + { + imagewid = gtk_image_new_from_file( iconpath.c_str() ); + } + + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(child), + imagewid ); + } + + return child; + } + GtkWidget* makeNonCheckedMenuItem( const std::string& label, + std::string iconpath ) + { + return makeMenuItem( label, iconpath ); + } + GtkWidget* makeCheckedMenuItem( const std::string& label, std::string iconpath ) + { + return makeMenuItem( label, iconpath, true ); + } + + + + + GtkWidget* + makeSubMenu( GtkWidget* m, + const std::string& labstr, + bool PutInSubMenu, + const std::string& iconpath ) + { + GtkWidget* child; + + if( PutInSubMenu ) + { + GtkWidget* menu = m; + + child = makeMenuItem( labstr, iconpath ); + gtk_menu_shell_append( GTK_MENU_SHELL(menu), child ); + m = gtk_menu_new(); + gtk_menu_item_set_submenu( GTK_MENU_ITEM(child), m ); + } + return m; + } + + GtkWidget* createMenuItem( GtkWidget* m, + GCallback cb, + const std::string& label, + const std::string& icon, + gpointer user_data ) + { + GtkWidget* child; + + child = makeMenuItem( label, icon ); + g_signal_connect_data( G_OBJECT( child ), "activate", + G_CALLBACK (cb), user_data, + 0, GConnectFlags(0)); + gtk_menu_shell_append( GTK_MENU_SHELL(m), child ); + return child; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static gboolean DropReference_cb(GtkObject *object, gpointer udata) + { + Handlable* h = (Handlable*)udata; + h->Release(); + return 0; + } + + /** + * bump the reference count of the handlable and have it drop again + * when the GTK object is destroyed. + */ + static void BindHandlableToGObject( void* o, Handlable* h ) + { + h->AddRef(); + gtk_signal_connect(GTK_OBJECT (o), "destroy", + GTK_SIGNAL_FUNC(DropReference_cb), h ); + } + + /********************************************************************************/ + /********************************************************************************/ + + const char* const GOBJ_MFFS_CONTEXT_K = "GOBJ_MFFS_CONTEXT_K"; + const char* const GOBJ_MFFS_THIS_K = "GOBJ_MFFS_THIS_K"; + const char* const GOBJ_MFFS_MENULOADED_K = "GOBJ_MFFS_MENULOADED_K"; + + static void leafCallback_null( MenuFromFilesystem*, fh_context c, GtkMenuItem* ) + { + if( !c ) + cerr << "Error leaf callback not set and NO CONTEXT PARAM GIVEN" << endl; + else + cerr << "Warning leaf callback not set. c:" << c->getURL() << endl; + } + + static void internalCallback_null( MenuFromFilesystem*, fh_context c, GtkMenuItem* ) + { + } + + static void + lazy_make_menu_from_filesystem_cb( GtkWidget* topmenu, gpointer user_data ) + { + try + { + GtkMenuItem *menuitem = GTK_MENU_ITEM( + gtk_menu_get_attach_widget( GTK_MENU(topmenu) )); + + if( g_object_get_data( G_OBJECT(menuitem), GOBJ_MFFS_MENULOADED_K ) ) + return; + + GtkMenuItem* m = menuitem; + GtkWidget* subm = gtk_menu_item_get_submenu( m ); + Context* c = (Context*)g_object_get_data( G_OBJECT(m), GOBJ_MFFS_CONTEXT_K ); + MenuFromFilesystem* selfp = (MenuFromFilesystem*)g_object_get_data( G_OBJECT(m), GOBJ_MFFS_THIS_K ); + cerr << "lazy_make_menu_from_filesystem_cb() c:" << c->getURL() << endl; + cerr << "lazy_make_menu_from_filesystem_cb() self:" << toVoid(selfp) << endl; + cerr << "lazy_make_menu_from_filesystem_cb() udata:" << toVoid(user_data) << endl; + cerr << "lazy_make_menu_from_filesystem_cb() subm:" << toVoid(subm) << endl; + + selfp->makeOneLevelOfMenu( subm, c ); + gtk_widget_show_all( subm ); + gtk_menu_item_set_submenu( menuitem, subm ); + + g_object_set_data( G_OBJECT(menuitem), GOBJ_MFFS_MENULOADED_K, (void*)1 ); + g_object_set_data( G_OBJECT(subm), GOBJ_MFFS_MENULOADED_K, (void*)1 ); + } + catch( exception& e ) + { + fh_stringstream ss; + ss << "Problem lazy loading filesystem menu\n" << e.what(); + cerr << tostr(ss); + FerrisUI::RunErrorDialog( tostr(ss) ); + } + } + + static void + MenuFromFilesystem_callLeafFunctor( GtkMenuItem *menuitem, gpointer user_data ) + { + MenuFromFilesystem* selfp = (MenuFromFilesystem*)user_data; + selfp->callLeafFunctor( menuitem ); + } + + static void + MenuFromFilesystem_callInternalFunctor( GtkMenuItem *menuitem, gpointer user_data ) + { + MenuFromFilesystem* selfp = (MenuFromFilesystem*)user_data; + selfp->callInternalFunctor( menuitem ); + } + + MenuFromFilesystem::MenuFromFilesystem( fh_context c ) + : + m_ctx( c ), + m_topmenu( 0 ), + m_leafCallback( leafCallback_null ), + m_InternalCallback( internalCallback_null ), + m_haveInternalCallback( false ), + m_useSubMenu( false ), + m_root_label( "" ), + m_root_iconpath( "" ) + { + } + + MenuFromFilesystem::MenuFromFilesystem( void* menu, + fh_context c, + const Callback_t& f, + const std::string& label, + const std::string& iconpath ) + : + m_ctx( c ), + m_topmenu( 0 ), + m_leafCallback( leafCallback_null ), + m_InternalCallback( internalCallback_null ), + m_haveInternalCallback( false ), + m_useSubMenu( false ), + m_root_label( "" ), + m_root_iconpath( "" ) + { + setMenuToAttachTo( GTK_WIDGET( menu ) ); + setAttachInSubMenu( label, iconpath ); + setLeafCallback( f ); + } + + + void + MenuFromFilesystem::setAttachChildrenDirectly( bool v ) + { + m_useSubMenu = v; + } + + void + MenuFromFilesystem::setup( void* menu, + fh_context c, + const Callback_t& f, + const std::string& label, + const std::string& iconpath ) + { + m_ctx = c; + setMenuToAttachTo( GTK_WIDGET( menu ) ); + setAttachInSubMenu( label, iconpath ); + setLeafCallback( f ); + } + + void + MenuFromFilesystem::setup( void* menu, + fh_context c, + const Callback_t& internal, + const Callback_t& leaf, + const std::string& label, + const std::string& iconpath ) + { + m_ctx = c; + setMenuToAttachTo( GTK_WIDGET( menu ) ); + setAttachInSubMenu( label, iconpath ); + setInternalCallback( internal ); + setLeafCallback( leaf ); + } + + + + + MenuFromFilesystem::~MenuFromFilesystem() + { + cerr << "~MenuFromFilesystem() ---------------------------------------" << endl; + } + + bool + MenuFromFilesystem::shouldVetoContext( fh_context c ) + { + return false; + } + + bool + MenuFromFilesystem::isLeaf( fh_context c ) + { + try + { + c->read(); + cerr << "MenuFromFilesystem::isLeaf(2) c:" << c->getURL() + << " ret:" << !c->hasSubContexts() + << endl; + return !c->hasSubContexts(); + } + catch( exception& e ) + { + LG_GTKFERRIS_D << "isLeaf() for c:" << c->getURL() + << " got error:" << e.what() << endl; + } + return true; + } + + + GtkWidget* + MenuFromFilesystem::makeLeafMenuItem( fh_context c, + const std::string& label, + std::string iconpath, + bool isInternalLeaf ) + { + return makeMenuItem( label, iconpath ); + } + + GtkWidget* + MenuFromFilesystem::makeInternalMenuItem( fh_context c, + const std::string& label, + std::string iconpath ) + { + return makeMenuItem( label, iconpath ); + } + + void + MenuFromFilesystem::setMenuToAttachTo( GtkWidget* m ) + { + m_topmenu = GTK_WIDGET( m ); + } + + void + MenuFromFilesystem::setMenuToAttachTo( GtkMenu* m ) + { + m_topmenu = GTK_WIDGET( m ); + } + + + void + MenuFromFilesystem::setLeafCallback( const Callback_t& f ) + { + m_leafCallback = f; + } + + void + MenuFromFilesystem::setInternalCallback( const Callback_t& f ) + { + m_InternalCallback = f; + m_haveInternalCallback = true; + } + + + void + MenuFromFilesystem::setAttachInSubMenu( const std::string& label, const std::string& iconpath ) + { + m_useSubMenu = true; + m_root_label = label; + m_root_iconpath = iconpath; + } + + + void + MenuFromFilesystem::setup_menuobject( void* o, fh_context c ) + { + g_object_set_data( G_OBJECT(o), GOBJ_MFFS_CONTEXT_K, GetImpl(c) ); + g_object_set_data( G_OBJECT(o), GOBJ_MFFS_THIS_K, this ); + } + + void + MenuFromFilesystem::callLeafFunctor( GtkMenuItem *menuitem ) + { + fh_context c = (Context*)g_object_get_data( G_OBJECT(menuitem), GOBJ_MFFS_CONTEXT_K ); + cerr << "callLeafFunctor() this:" << toVoid(this) << endl; + cerr << "callLeafFunctor() c:" << toVoid(GetImpl(c)) << endl; + cerr << "callLeafFunctor() c:" << c->getURL() << endl; + m_leafCallback( this, c, menuitem ); + } + + void + MenuFromFilesystem::callInternalFunctor( GtkMenuItem *menuitem ) + { + fh_context c = (Context*)g_object_get_data( G_OBJECT(menuitem), GOBJ_MFFS_CONTEXT_K ); + cerr << "callInternalFunctor() this:" << toVoid(this) << endl; + cerr << "callInternalFunctor() c:" << toVoid(GetImpl(c)) << endl; + cerr << "callInternalFunctor() c:" << c->getURL() << endl; + m_InternalCallback( this, c, menuitem ); + } + + void + MenuFromFilesystem::makeOneLevelOfMenu( GtkWidget* m, fh_context dir ) + { + GtkWidget* child; + int i=0; + + LG_GTKFERRIS_D << "makeOneLevelOfMenu() m:" << toVoid(m) << " dir:" << dir->getURL() << endl; + + bool first = m_haveInternalCallback; + for( Context::iterator ci = dir->begin(); ci != dir->end(); ++ci ) + { + if( first ) + { + first = false; + + string label = "< " + dir->getDirName() + " >"; + if( !isMenuItemUsed( GTK_MENU_SHELL(m), dir->getDirName() ) ) + { + string iconpath = getStrAttr( dir, "ferris-iconname", "" ); + GtkWidget* child = makeLeafMenuItem( dir, label, iconpath, true ); + + if( child ) + { + gtk_menu_shell_append( GTK_MENU_SHELL(m), child ); + g_signal_connect_data( G_OBJECT( child ), "activate", + G_CALLBACK (MenuFromFilesystem_callInternalFunctor), this, + 0, GConnectFlags(0)); + BindHandlableToGObject( child, GetImpl(dir) ); + setup_menuobject( child, dir ); + } + } + } + + fh_context c = *ci; + string label = c->getDirName(); + + if( shouldVetoContext( c ) ) + continue; + + if( !isMenuItemUsed( GTK_MENU_SHELL(m), label ) ) + { + string iconpath = getStrAttr( c, "ferris-iconname", "" ); + iconpath = resolveToIconPath( iconpath ); + + LG_GTKFERRIS_D << "makeOneLevelOfMenu(iter) m:" << m + << " label:" << label + << " icon:" << iconpath + << " c:" << c->getURL() + << endl; + + if( isLeaf( c ) ) + { + LG_GTKFERRIS_D << "makeOneLevelOfMenu(leaf) m:" << m + << " label:" << label + << " icon:" << iconpath + << endl; + + // Add this leaf node + child = makeLeafMenuItem( c, label, iconpath ); + + if( child ) + { + cerr << "Attaching leaf. this:" << toVoid(this) << endl; + gtk_menu_shell_append( GTK_MENU_SHELL(m), child ); + g_signal_connect_data( G_OBJECT( child ), "activate", + G_CALLBACK (MenuFromFilesystem_callLeafFunctor), this, + 0, GConnectFlags(0)); + BindHandlableToGObject( child, GetImpl(c) ); + setup_menuobject( child, c ); + } + } + else + { + LG_GTKFERRIS_D << "makeOneLevelOfMenu(internal) m:" << m + << " label:" << label + << " icon:" << iconpath + << endl; + + // Make a submenu for directories + makeInternalMenuItem( m, c, label, iconpath ); + } + } + } + } + + void + MenuFromFilesystem::makeInternalMenuItem( GtkWidget* m, fh_context c, + const std::string& submenulabel, + const std::string& submenuicon ) + { + GtkWidget* child; + int i=0; + + cerr << "makeInternalMenuItem(). this:" << toVoid(this) << endl; + + GtkWidget* menu = m; + child = makeInternalMenuItem( c, submenulabel, submenuicon ); + gtk_menu_shell_append( GTK_MENU_SHELL(menu), child ); + menu = gtk_menu_new(); + gtk_menu_item_set_submenu( GTK_MENU_ITEM(child), menu ); + + g_signal_connect_data( G_OBJECT( menu ), "show", + G_CALLBACK (lazy_make_menu_from_filesystem_cb), this, + 0, GConnectFlags(0)); + + BindHandlableToGObject( menu, GetImpl(c) ); + setup_menuobject( child, c ); + setup_menuobject( menu, c ); + } + + void + MenuFromFilesystem::perform() + { + LG_GTKFERRIS_D << "MenuFromFilesystem::perform() m_useSubMenu:" << m_useSubMenu << endl; + + if( m_useSubMenu ) + { + makeInternalMenuItem( m_topmenu, m_ctx, m_root_label, m_root_iconpath ); + } + else + { + makeOneLevelOfMenu( m_topmenu, m_ctx ); + } + } + + + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// static const char* const GOBJ_CONTEXT_K = "GOBJ_CONTEXT_K"; +// static const char* const GOBJ_ROOTAPPW_K = "GOBJ_ROOTAPPW_K"; +// static const char* const GOBJ_MENUCB_K = "GOBJ_MENUCB_K"; +// static const char* const GOBJ_MENUD_K = "GOBJ_MENUD_K"; +// static const char* const GOBJ_MENULOADED_K = "GOBJ_MENULOADED_K"; +// static const char* const GOBJ_LEAFMAKER_K = "GOBJ_LEAFMAKER_K"; + +// static void setup_menuobject( void* o, fh_context c, GtkWidget* menu, +// GCallback menu_cb, gpointer menu_cb_userdata, +// makeLeafMenuItem_f leafMaker ) +// { +// g_object_set_data( G_OBJECT(o), GOBJ_CONTEXT_K, GetImpl(c) ); +// g_object_set_data( G_OBJECT(o), GOBJ_ROOTAPPW_K, menu ); +// g_object_set_data( G_OBJECT(o), GOBJ_MENUCB_K, (void*)menu_cb ); +// g_object_set_data( G_OBJECT(o), GOBJ_MENUD_K, (void*)menu_cb_userdata ); +// g_object_set_data( G_OBJECT(o), GOBJ_LEAFMAKER_K, (void*)leafMaker ); +// } + +// fh_context +// getContextFromFilesystemMenu( GtkMenuItem* mi ) +// { +// Context* c = (Context*)g_object_get_data( G_OBJECT(mi), GOBJ_CONTEXT_K ); +// return c; +// } + + +// static void +// lazy_make_menu_from_filesystem_cb( GtkWidget* topmenu, gpointer user_data ) +// { +// try +// { +// GtkMenuItem *menuitem = GTK_MENU_ITEM( +// gtk_menu_get_attach_widget( GTK_MENU(topmenu) )); + +// if( g_object_get_data( G_OBJECT(menuitem), GOBJ_MENULOADED_K ) ) +// return; + +// GtkMenuItem* m = menuitem; +// GtkWidget* subm = gtk_menu_item_get_submenu( m ); +// GtkWidget* rootm = (GtkWidget*)g_object_get_data( G_OBJECT(m), GOBJ_ROOTAPPW_K ); +// GCallback menu_cb = (GCallback) g_object_get_data( G_OBJECT(m), GOBJ_MENUCB_K ); +// gpointer menu_cb_d = (gpointer) g_object_get_data( G_OBJECT(m), GOBJ_MENUD_K ); +// Context* c = (Context*)g_object_get_data( G_OBJECT(m), GOBJ_CONTEXT_K ); +// makeLeafMenuItem_f leafMaker = (makeLeafMenuItem_f)g_object_get_data(G_OBJECT(m), GOBJ_LEAFMAKER_K ); + +// makeMenuFromFilesystem( subm, c, menu_cb, menu_cb_d, leafMaker ); +// gtk_widget_show_all( subm ); +// gtk_menu_item_set_submenu( menuitem, subm ); + +// g_object_set_data( G_OBJECT(menuitem), GOBJ_MENULOADED_K, (void*)1 ); +// g_object_set_data( G_OBJECT(subm), GOBJ_MENULOADED_K, (void*)1 ); +// } +// catch( exception& e ) +// { +// fh_stringstream ss; +// ss << "Problem lazy loading filesystem menu\n" << e.what(); +// cerr << tostr(ss); +// FerrisUI::RunErrorDialog( tostr(ss) ); +// } +// } + +// void makeMenuFromFilesystem( GtkWidget* m, +// fh_context dir, +// GCallback menu_cb, +// gpointer menu_cb_userdata, +// makeLeafMenuItem_f leafMaker ) +// { +// GtkWidget* child; +// int i=0; + +// cerr << "makeMenuFromFilesystem() m:" << m << " dir:" << dir->getURL() << endl; + +// for( Context::iterator ci = dir->begin(); ci != dir->end(); ++ci ) +// { +// fh_context c = *ci; +// string label = c->getDirName(); +// string iconpath = getStrAttr( c, "ferris-iconname", "" ); +// iconpath = resolveToIconPath( iconpath ); + +// cerr << "makeMenuFromFilesystem() m:" << m +// << " label:" << label +// << " icon:" << iconpath +// << endl; + +// c->read(); +// if( c->hasSubContexts() ) +// { +// // Make a submenu for directories + +// makeMenuFromFilesystem( m, c, menu_cb, menu_cb_userdata, label, iconpath, leafMaker ); +// // private_makeLazyAppsMenu( m, root_of_apps_menu, c, menu_cb, tobj ); +// } +// else +// { +// // Add this leaf node +// child = leafMaker( label, iconpath ); +// // child = makeMenuItem( label, iconpath ); + +// if( child ) +// { +// gtk_menu_shell_append( GTK_MENU_SHELL(m), child ); +// g_signal_connect_data( G_OBJECT( child ), "activate", +// G_CALLBACK (menu_cb), menu_cb_userdata, +// 0, GConnectFlags(0)); +// BindHandlableToGObject( child, GetImpl(c) ); +// setup_menuobject( child, c, m, menu_cb, menu_cb_userdata, leafMaker ); +// } +// } +// } +// } + + +// void makeMenuFromFilesystem( GtkWidget* m, +// fh_context c, +// GCallback menu_cb, +// gpointer menu_cb_userdata, +// const std::string& submenulabel, +// const std::string& submenuicon, +// makeLeafMenuItem_f leafMaker ) +// { +// GtkWidget* child; +// int i=0; + +// GtkWidget* menu = m; +// child = makeMenuItem( submenulabel, "" ); +// gtk_menu_shell_append( GTK_MENU_SHELL(menu), child ); +// menu = gtk_menu_new(); +// gtk_menu_item_set_submenu( GTK_MENU_ITEM(child), menu ); + +// g_signal_connect_data( G_OBJECT( menu ), "show", +// G_CALLBACK (lazy_make_menu_from_filesystem_cb), 0, +// 0, GConnectFlags(0)); + +// BindHandlableToGObject( menu, GetImpl(c) ); +// setup_menuobject( child, c, menu, menu_cb, menu_cb_userdata, leafMaker ); +// setup_menuobject( menu, c, menu, menu_cb, menu_cb_userdata, leafMaker ); +// } +// void makeMenuFromFilesystem( GtkMenu* m, +// fh_context c, +// GCallback menu_cb, +// gpointer menu_cb_userdata, +// const std::string& submenulabel, +// const std::string& submenuicon, +// makeLeafMenuItem_f leafMaker ) +// { +// makeMenuFromFilesystem( GTK_WIDGET(m), +// c, menu_cb, menu_cb_userdata, +// submenulabel, submenuicon, +// leafMaker ); +// } + + + + +}; diff --git a/FerrisUI/Menus.hh b/FerrisUI/Menus.hh new file mode 100644 index 0000000..732914d --- /dev/null +++ b/FerrisUI/Menus.hh @@ -0,0 +1,351 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: Menus.hh,v 1.6 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRISUI_MENUS_H_ +#define _ALREADY_INCLUDED_FERRISUI_MENUS_H_ + +#include +#include +#include + +namespace FerrisUI +{ + using namespace Ferris; + + /** + * Does the given menu item have a parent + * or is it a top level menu item + */ + FERRISEXP_API bool hasParentMenuItem( GtkMenuItem* m ); + + /** + * Get the parent menuitem of the menuitem if it exists + * or 0 otherwise + */ + FERRISEXP_API GtkMenuItem* getParentMenuItem( GtkMenuItem* m ); + + FERRISEXP_API GtkMenuItem* getRootMenuItem( GtkMenuItem* mi ); + + /** + * Trace out a path from mi back to rootm. + * the string path will be of the form + * something/else/mi + */ + FERRISEXP_API std::string makeMenuPath( GtkMenuItem* mi, GtkWidget* rootm ); + + /** + * Make a menuitem from a given stock icon name + */ + FERRISEXP_API GtkWidget* makeStockMenuItem( const gchar *stock_id ); + + /** + * Create a menu item with the given label and icon. + * note that icons paths can include ~/ and icons:// + * type ferris URLs. + * + * @param isCheckedMenuItem set to true if the menuitem should be a checked item + * instead of a normal one. + */ + FERRISEXP_API GtkWidget* makeMenuItem( const std::string& label, + std::string iconpath, + bool isCheckedMenuItem = false ); + + /** + * If PutInSubMenu is true then create a submenu with the + * given label and icon and place it into m and return + * the newly created menu + */ + FERRISEXP_API GtkWidget* makeSubMenu( GtkWidget* m, + const std::string& label, + bool PutInSubMenu, + const std::string& iconpath ); + + /** + * Make a new menu item with optional icon and attach it to the menu + * and callback + */ + FERRISEXP_API GtkWidget* createMenuItem( GtkWidget* m, + GCallback cb, + const std::string& label, + const std::string& icon, + gpointer user_data ); + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + class MenuFromFilesystem; + FERRIS_SMARTPTR( MenuFromFilesystem, fh_mffs ); + + + + /** + * Create a GTK+ menu from a filesystem. This allows one to veto the creation + * of many menuitems and give a projection of the filesystem at runtime based + * on external information to this class. + */ + class FERRISEXP_API MenuFromFilesystem + : + public Handlable + { + typedef MenuFromFilesystem _Self; + + fh_context m_ctx; + GtkWidget* m_topmenu; + + bool m_useSubMenu; + std::string m_root_label; + std::string m_root_iconpath; + + void setup_menuobject( void* o, fh_context c ); + + protected: + + /** + * test to see if this context should have a submenu or be a leaf in + * the menu. + * by default if the context has children then it has a submenu + */ + virtual bool isLeaf( fh_context c ); + + /** + * If the context should not appear in the menu then a subclass + * can return true here and it will be ignored. + */ + virtual bool shouldVetoContext( fh_context c ); + + /** + * Make a leaf menuitem widget. All attaching and callbacks are added for + * you by the caller. You must set the icon/label from the args and return + * the widget. If you wish to not display this context then return 0. + * + * @param isInternalLeaf is true when this is a leaf menu item representing + * the selection of an internal menu item. + */ + virtual GtkWidget* makeLeafMenuItem( fh_context c, + const std::string& label, + std::string iconpath, + bool isInternalLeaf = false ); + + /** + * Make a leaf menuitem widget. All attaching and callbacks are added for + * you by the caller. You must set the icon/label from the args and return + * the widget. If you wish to not display this context then return 0. + */ + virtual GtkWidget* makeInternalMenuItem( fh_context c, const std::string& label, std::string iconpath ); + + public: + + typedef Loki::Functor< void, LOKI_TYPELIST_3( MenuFromFilesystem*, fh_context, GtkMenuItem* ) > Callback_t; + + /** + * Make a menu filesystem. Set c to the base of the menu tree. + */ + MenuFromFilesystem( fh_context c = 0 ); + virtual ~MenuFromFilesystem(); + + /** + * Build a full menu maker in one call + */ + MenuFromFilesystem( void* menu, + fh_context c, + const Callback_t& f, + const std::string& label = "", + const std::string& iconpath = "" ); + + /** + * One call setup, args are the same for constructor but + * this call is available for object reuse. + */ + void setup( void* menu, + fh_context c, + const Callback_t& f, + const std::string& label = "", + const std::string& iconpath = "" ); + void setup( void* menu, + fh_context c, + const Callback_t& internal, + const Callback_t& leaf, + const std::string& label, + const std::string& iconpath = "" ); + + /** + * Place begin() to end() into the menu itself instead of making a submenu + * for the root context. + */ + void setAttachChildrenDirectly( bool v ); + + /** + * This is the menu we will generate a menu tree for. + */ + void setMenuToAttachTo( GtkWidget* m ); + void setMenuToAttachTo( GtkMenu* m ); + + /** + * Set the callback functor that is made when a leaf + * menu item is selected. + */ + void setLeafCallback( const Callback_t& f ); + + /** + * When the menu is created, attach children of the root into a submenu + * instead of right into the given menu + * @param label the label for the top level menuitem that the submenu + * will be attached to. If not given then the roots getDirName() will be + * used. + * @param iconpath icon for the menuitem at root. + */ + void setAttachInSubMenu( const std::string& label = "", const std::string& iconpath = "" ); + + + /** + * Create the menu and attach it to the menu set with setMenuToAttachTo() + */ + void perform(); + + + /********************************************************************************/ + /********************************************************************************/ + /*** INTERNAL USE ONLY **********************************************************/ + /********************************************************************************/ + void callLeafFunctor( GtkMenuItem *menuitem ); + void callInternalFunctor( GtkMenuItem *menuitem ); + + /** + * Creates a new menuitem in 'm' with the given label/icon to display + * the contents of 'c' when it is shown + */ + void makeInternalMenuItem( GtkWidget* m, fh_context c, + const std::string& submenulabel, + const std::string& submenuicon ); + + /** + * Make a single level of menu placing items from dir into m + */ + void makeOneLevelOfMenu( GtkWidget* m, fh_context dir ); + + + private: + Callback_t m_leafCallback; + bool m_haveInternalCallback; + Callback_t m_InternalCallback; + + public: + + /** + * Set the callback functor that is made when an internal + * menu item is selected. + */ + void setInternalCallback( const Callback_t& f ); + + + }; + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +// /** +// * Callbacks attached to menus created with makeMenuFromFilesystem() +// * can get at the context for the menuitem that was activated using +// * this function. +// */ +// fh_context +// getContextFromFilesystemMenu( GtkMenuItem* mi ); + + +// typedef GtkWidget* (*makeLeafMenuItem_f)( const std::string& label, +// std::string iconpath ); +// GtkWidget* makeNonCheckedMenuItem( const std::string& label, std::string iconpath ); +// GtkWidget* makeCheckedMenuItem( const std::string& label, std::string iconpath ); + + +// /** +// * Create a menu in a lazy way (ie only create it as its explored). +// * +// * This is slightly different from the overloaded version in that it +// * dumps each child of 'c' right into the menushell 'm'. See the overloaded +// * version for more info +// * +// * @param m a menu shell to add to +// * @param c is the filesystem to show +// * @param menu_cb is the activation function for menu selection +// * @param menu_cb_userdata is passed to menu_cb +// * @param leafMaker a function pointer that takes the menuitem label string and +// * iconpath and returns a GtkMenuItem or one of its subtypes +// * see makeNonCheckedMenuItem() and makeCheckedMenuItem() +// * NOTE: the leafMaker can return 0 if this menuitem should be skipped +// */ +// void makeMenuFromFilesystem( GtkWidget* m, +// fh_context c, +// GCallback menu_cb, +// gpointer menu_cb_userdata = 0, +// makeLeafMenuItem_f leafMaker = makeNonCheckedMenuItem ); + +// /** +// * Create a menu in a lazy way (ie only create it as its explored). +// * +// * This creates a new entry in the menushell 'm' for the context 'c' itself +// * using the given icon and label. When leaf nodes in the menu structure are +// * activated then menu_cb() will be called with menu_cb_userdata as an arg. +// * menu_cb() will not be called for directories. +// * +// * @param m a menu shell to add to +// * @param c is the filesystem to show +// * @param menu_cb is the activation function for menu selection +// * @param menu_cb_userdata is passed to menu_cb +// * @param submenulabel if not an empty string is the name of a submenu +// * that this menu will be placed in instead of the top level menu 'm' +// * @param leafMaker a function pointer that takes the menuitem label string and +// * iconpath and returns a GtkMenuItem or one of its subtypes +// * see makeNonCheckedMenuItem() and makeCheckedMenuItem() +// * NOTE: the leafMaker can return 0 if this menuitem should be skipped +// */ +// void makeMenuFromFilesystem( GtkWidget* m, +// fh_context c, +// GCallback menu_cb, +// gpointer menu_cb_userdata, +// const std::string& submenulabel, +// const std::string& submenuicon, +// makeLeafMenuItem_f leafMaker = makeNonCheckedMenuItem ); +// void makeMenuFromFilesystem( GtkMenu* m, +// fh_context c, +// GCallback menu_cb, +// gpointer menu_cb_userdata, +// const std::string& submenulabel, +// const std::string& submenuicon, +// makeLeafMenuItem_f leafMaker = makeNonCheckedMenuItem ); + +}; + +#endif + diff --git a/FerrisUI/SubprocessButtonAndLabel.cpp b/FerrisUI/SubprocessButtonAndLabel.cpp new file mode 100644 index 0000000..28f3ad0 --- /dev/null +++ b/FerrisUI/SubprocessButtonAndLabel.cpp @@ -0,0 +1,314 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SubprocessButtonAndLabel.cpp,v 1.2 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; + +namespace Ferris +{ + SubprocessButtonAndLabel::SubprocessButtonAndLabel( const std::string& buttonLabel ) + : + m_runner( 0 ), + m_state( STATE_INITIAL ), + m_buttonLabel( buttonLabel ), + m_initialLabel( "..." ), + m_workingLabel( "Working..." ), + m_killedLabel( "Killed." ), + m_widget( 0 ), + m_label( 0 ), + m_button( 0 ), + m_eventSource( 0 ) + { + } + + SubprocessButtonAndLabel::SubprocessButtonAndLabel( fh_runner r, const std::string& buttonLabel ) + : + m_runner( r ), + m_state( STATE_INITIAL ), + m_buttonLabel( buttonLabel ), + m_initialLabel( "..." ), + m_workingLabel( "Working..." ), + m_killedLabel( "Killed." ), + m_widget( 0 ), + m_label( 0 ), + m_button( 0 ), + m_eventSource( 0 ) + { + } + + void + SubprocessButtonAndLabel::setInitialLabel( const std::string& s ) + { + m_initialLabel = s; + } + + void + SubprocessButtonAndLabel::setWorkingLabel( const std::string& s ) + { + m_workingLabel = s; + } + + void + SubprocessButtonAndLabel::setKilledLabel( const std::string& s ) + { + m_killedLabel = s; + } + + void + SubprocessButtonAndLabel::resetToInitialState() + { + m_state = STATE_INITIAL; + gtk_label_set_label( m_label, m_initialLabel.c_str() ); + } + + void + SubprocessButtonAndLabel::setToFinalState( const std::string& s ) + { + m_state = STATE_COMPLETE; + gtk_label_set_label( m_label, s.c_str() ); + } + + + GtkWidget* + SubprocessButtonAndLabel::getWidget() + { + m_widget = gtk_table_new ( 1, 2, false ); + + int r = 0; + gtk_table_attach_defaults(GTK_TABLE(m_widget), getButton(), 0, 1, r, r+1 ); + gtk_table_attach_defaults(GTK_TABLE(m_widget), getLabel(), 1, 2, r, r+1 ); + + return m_widget; + } + + GtkWidget* + SubprocessButtonAndLabel::getLabel() + { + if( !m_label ) + { + m_label = GTK_LABEL(gtk_label_new( m_initialLabel.c_str() )); + } + return GTK_WIDGET(m_label); + } + + void + SubprocessButtonAndLabel::killChild() + { + if( m_runner ) + m_runner->killChild(); + gtk_label_set_label( m_label, m_killedLabel.c_str() ); + m_state = STATE_INITIAL; + } + + SubprocessButtonAndLabel::UpdateRunnerSig_t& + SubprocessButtonAndLabel::getUpdateRunnerSig() + { + return UpdateRunnerSig; + } + + void + SubprocessButtonAndLabel::setReplaceRegex( const std::string& s ) + { + m_replaceRegex = s; + } + + void + SubprocessButtonAndLabel::setReplaceRegexFormat( const std::string& s ) + { + m_replaceRegexFormat = s; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + static gboolean + complete_cb( GIOChannel *source, + GIOCondition condition, + gpointer user_data ) + { + SubprocessButtonAndLabel* obj = (SubprocessButtonAndLabel*)user_data; + return obj->complete( source, condition ); + } + + gboolean + SubprocessButtonAndLabel::complete( GIOChannel *source, + GIOCondition condition ) + { + string s; + + if( !m_replaceRegex.empty() ) + { + fh_stringstream ss; + std::copy( std::istreambuf_iterator(m_fromChildss), + std::istreambuf_iterator(), + std::ostreambuf_iterator(ss)); + + cerr << "m_replaceRegex:" << m_replaceRegex << endl; + cerr << "m_replaceRegexFormat:" << m_replaceRegexFormat << endl; + + boost::regex rx = toregex( m_replaceRegex ); + s = regex_replace( tostr(ss), rx, m_replaceRegexFormat, + boost::match_default | boost::format_first_only ); +// boost::format_first_only ); +// boost::format_no_copy | boost::format_first_only ); + } + else + { + getline( m_fromChildss, s ); + LG_GTKFERRIS_D << "SubprocessButtonAndLabel::complete() s:" << s << endl; + + // + // Drain input + // + fh_stringstream ss; + std::copy( std::istreambuf_iterator(m_fromChildss), + std::istreambuf_iterator(), + std::ostreambuf_iterator(ss)); + } + + gtk_label_set_label( m_label, s.c_str() ); + m_state = STATE_COMPLETE; + + return 0; // dont call again + } + + + static void clicked_cb( GtkButton *button, gpointer user_data ) + { + SubprocessButtonAndLabel* obj = (SubprocessButtonAndLabel*)user_data; + obj->clicked( button ); + } + + void + SubprocessButtonAndLabel::clicked( GtkButton *button ) + { + if( m_state == STATE_RUNNING ) + { + killChild(); + return; + } + fh_stringstream ss; + + if( m_eventSource ) + { + g_source_remove( m_eventSource ); + m_eventSource = 0; + } + + m_runner = getUpdateRunnerSig().emit( this, m_runner ); + if( !m_runner ) + { + gtk_label_set_label( m_label, "internal error" ); + m_state = STATE_ERROR; + return; + } + m_runner->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | +// G_SPAWN_FILE_AND_ARGV_ZERO | + G_SPAWN_STDERR_TO_DEV_NULL | + m_runner->getSpawnFlags())); + m_runner->Run(); + m_fromChildss = m_runner->getStdOut(); + LG_GTKFERRIS_D << "SubprocessButtonAndLabel::running proc" << endl; + + // + // We need to attach a callback for when data is available from the + // child. + // + guint result; + GIOChannel* channel; + GIOCondition cond = GIOCondition(G_IO_IN | G_IO_ERR | G_IO_PRI); + + channel = g_io_channel_unix_new( m_runner->getStdOutFd() ); + m_eventSource = g_io_add_watch( channel, cond, complete_cb, this ); + g_io_channel_unref (channel); + + gtk_label_set_label( m_label, m_workingLabel.c_str() ); + m_state = STATE_RUNNING; + } + + static gint button_release_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data) + { + SubprocessButtonAndLabel* obj = (SubprocessButtonAndLabel*)user_data; + obj->button_release( widget, event ); + } + + gint + SubprocessButtonAndLabel::button_release(GtkWidget *widget, GdkEvent *event ) + { + GdkEventButton *event_button; + + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + if (event->type == GDK_BUTTON_PRESS) + { + } + if( event->type == GDK_BUTTON_RELEASE ) + { + event_button = (GdkEventButton *) event; + + if (event_button->button == 3 && m_state == STATE_RUNNING ) + { + killChild(); + } + } + return FALSE; + } + + + + GtkWidget* + SubprocessButtonAndLabel::getButton() + { + if( !m_button ) + { + GtkWidget* w = gtk_button_new_with_label( m_buttonLabel.c_str() ); + m_button = GTK_BUTTON( w ); + gtk_signal_connect(GTK_OBJECT (w), "clicked", + GTK_SIGNAL_FUNC(clicked_cb), this ); + gtk_signal_connect(GTK_OBJECT(w), "button_release_event", + GTK_SIGNAL_FUNC (button_release_cb), this ); + gtk_widget_add_events( GTK_WIDGET( w ), + GdkEventMask( GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK )); + + } + + return GTK_WIDGET(m_button); + } + + + + +}; diff --git a/FerrisUI/SubprocessButtonAndLabel.hh b/FerrisUI/SubprocessButtonAndLabel.hh new file mode 100644 index 0000000..1ff60b4 --- /dev/null +++ b/FerrisUI/SubprocessButtonAndLabel.hh @@ -0,0 +1,106 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: SubprocessButtonAndLabel.hh,v 1.3 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_GTK_FERRIS_SUBPROCBUTTON_H_ +#define _ALREADY_INCLUDED_GTK_FERRIS_SUBPROCBUTTON_H_ + +#include + +namespace Ferris +{ + class SubprocessButtonAndLabel; + FERRIS_SMARTPTR( SubprocessButtonAndLabel, fh_SubprocessButtonAndLabel ); + + class FERRISEXP_API SubprocessButtonAndLabel + : + public Handlable + { + fh_runner m_runner; + fh_istream m_fromChildss; + guint m_eventSource; + + std::string m_replaceRegex; + std::string m_replaceRegexFormat; + std::string m_buttonLabel; + std::string m_initialLabel; + std::string m_workingLabel; + std::string m_killedLabel; + GtkWidget* m_widget; + GtkLabel* m_label; + GtkButton* m_button; + + enum + { + STATE_INITIAL = 1, + STATE_RUNNING = 2, + STATE_COMPLETE = 3, + STATE_ERROR = 4 + }; + int m_state; + + void killChild(); + + + public: + SubprocessButtonAndLabel( const std::string& buttonLabel ); + SubprocessButtonAndLabel( fh_runner r, const std::string& buttonLabel ); + void setReplaceRegex( const std::string& s ); + void setReplaceRegexFormat( const std::string& s ); + void setInitialLabel( const std::string& s ); + void setWorkingLabel( const std::string& s ); + void setKilledLabel( const std::string& s ); + void resetToInitialState(); + void setToFinalState( const std::string& s ); + GtkWidget* getWidget(); + GtkWidget* getLabel(); + GtkWidget* getButton(); + + typedef sigc::signal2< fh_runner, + fh_SubprocessButtonAndLabel, + fh_runner > UpdateRunnerSig_t; + UpdateRunnerSig_t& getUpdateRunnerSig(); + + + + /****************************************/ + /****************************************/ + /** Dont use the below ****************/ + /****************************************/ + /****************************************/ + + gboolean complete( GIOChannel *source, GIOCondition condition ); + void clicked( GtkButton *button ); + gint button_release(GtkWidget *widget, GdkEvent *event ); + private: + UpdateRunnerSig_t UpdateRunnerSig; + + }; + +}; +#endif diff --git a/FerrisUI/TreeStoreDriver.cpp b/FerrisUI/TreeStoreDriver.cpp new file mode 100644 index 0000000..e6555e6 --- /dev/null +++ b/FerrisUI/TreeStoreDriver.cpp @@ -0,0 +1,253 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris context tree store driver for reading and putting into a + gtkferristreestore + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: TreeStoreDriver.cpp,v 1.2 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +// #include +// #include + +// namespace FerrisUI +// { + + + +// // TreeStoreDriver::TreeStoreDriver( GtkFerrisTreeStore* _t ) +// // : +// // t(_t), +// // m_contextsDone(0), +// // m_subContextCountGuess(0), +// // ls( new Ferrisls() ) +// // { +// // setTree( _t ); + +// // ls->setDisplay( this ); + +// // ls->getDiskReadStarted_Sig().connect( slot( this, &_Self::DiskReadStarted)); +// // ls->getDiskReadProgress_Sig().connect( slot( this, &_Self::DiskReadProgress)); +// // ls->getDiskReadDone_Sig().connect( slot( this, &_Self::DiskReadDone)); +// // ls->getFilterStarted_Sig().connect( slot( this, &_Self::FilterStarted)); +// // ls->getSortStarted_Sig().connect( slot( this, &_Self::SortStarted)); +// // ls->getContextPropergationStarted_Sig().connect( +// // slot( this, &_Self::ContextPropergationStarted)); + +// // setMonitorCreate( true ); +// // setMonitorDelete( true ); +// // setMonitorChanged( true ); +// // } + +// // void +// // TreeStoreDriver::setTree( GtkFerrisTreeStore* _t ) +// // { +// // t = _t; +// // if( t ) +// // t->d = this; +// // } + +// // Ferrisls& +// // TreeStoreDriver::getFerrisls() +// // { +// // Ferrisls* p = GetImpl(ls); +// // return *p; +// // } + +// void +// TreeStoreDriver::EnteringContext( fh_context ctx ) +// { +// m_subContextCountGuess = ctx->guessSize(); +// m_contextsDone = 0; +// if( !m_subContextCountGuess ) +// m_subContextCountGuess = 1; + +// getEnteringContextSig().emit( ctx ); +// } + +// void +// TreeStoreDriver::workComplete() +// { +// getWorkCompleteSig().emit(); +// } + +// void +// TreeStoreDriver::ShowAttributes( fh_context ctx ) +// { +// // cerr << "TreeStoreDriver::ShowAttributes url:" << ctx->getURL() << endl; +// add( t, ctx ); +// getShowAttributesSig().emit( ctx, m_contextsDone, m_subContextCountGuess ); + +// ++m_contextsDone; +// if( m_contextsDone % 20 == 0 ) +// { +// getShowAttributesUpdateGUISig().emit( ctx, m_contextsDone, m_subContextCountGuess ); +// } +// } + +// void +// TreeStoreDriver::DiskReadStarted( Ferrisls& ls, fh_context ) +// { +// // cerr << "gtk ferris tree diskReadStarted() t:" << (void*)t << endl; +// } + + +// void +// TreeStoreDriver::ContextPropergationStarted( Ferrisls& ls, fh_context c ) +// { +// // cerr << "ContextPropergationStarted() c:" << c->getDirPath() << endl; + +// // AddAllNewEANames( t, c ); + +// // if( !isBound( t->rootCtx ) ) +// // { +// // gtk_ferris_tree_store_set_root_context( t, c ); +// // gint NumberOfColumns = t->columnNames.size(); +// // cerr << "NumberOfColumns:" << NumberOfColumns << endl; +// // } +// } + +// void +// TreeStoreDriver::DiskReadProgress( Ferrisls& ls, fh_context, long fnum ) +// { + +// } + +// void +// TreeStoreDriver::DiskReadDone( Ferrisls& ls, fh_context ) +// { +// } + +// void +// TreeStoreDriver::FilterStarted( Ferrisls& ls ) +// { +// } + +// void +// TreeStoreDriver::SortStarted( Ferrisls& ls ) +// { +// } + +// // void +// // TreeStoreDriver::OnExists ( NamingEvent_Exists* ev, std::string olddn, std::string newdn ) +// // { +// // fh_context c = ev->getSource(); +// // fh_context newc = c->getSubContext(newdn); + +// // // if( !isBound( t->rootCtx ) ) +// // // { +// // // gtk_ferris_tree_store_set_root_context( t, c ); +// // // } + + +// // // cerr << "TreeStoreDriver::OnExists c:" << c->getURL() << endl; +// // // cerr << "TreeStoreDriver::OnExists newc:" << newc->getURL() << endl; + +// // ShowAttributes( newc ); +// // // AttachSignals( newc ); + +// // } + +// // void +// // TreeStoreDriver::OnSubContextCreated( NamingEvent_Created* ev, +// // std::string olddn, std::string newdn ) +// // { +// // fh_context c = ev->getSource(); +// // fh_context newc = c->getSubContext(newdn); +// // add( t, newc ); +// // } + +// // void +// // TreeStoreDriver::OnCreated( NamingEvent_Created* ev, std::string olddn, std::string newdn ) +// // { +// // fh_context c = ev->getSource(); +// // fh_context newc = c->getSubContext(newdn); + +// // cout << "TreeStoreDriver::OnCreated newc" << newc->getURL() << endl; + +// // ShowAttributes( newc ); +// // // AttachSignals( newc ); +// // } + +// // void +// // TreeStoreDriver::OnChanged( NamingEvent_Changed* ev, std::string olddn, std::string newdn ) +// // { +// // fh_context c = ev->getSource(); +// // cout << "+++++ Changed c:" << c->getURL() +// // << " olddn:" << olddn +// // << endl; + +// // GtkTreeIter iter = getIterForContext( t, c ); +// // cerr << "TreeStoreDriver::OnChanged 2." << endl; +// // GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL (t), &iter ); +// // cerr << "TreeStoreDriver::OnChanged 3." << endl; +// // g_return_if_fail( path ); + +// // cerr << "TreeStoreDriver::OnChanged has_child:" +// // << gtk_tree_model_iter_has_child( GTK_TREE_MODEL(t), &iter ) +// // << " strattr:" << toint( getStrAttr( c, "has-subcontexts-guess", "x" )) +// // << endl; +// // cerr << "TreeStoreDriver::OnChanged 4." << endl; + +// // // GtkTreeIter tmp; +// // // gboolean rc = gtk_tree_model_iter_children( GTK_TREE_MODEL(t), +// // // &tmp, +// // // &iter ); +// // // cerr << "TreeStoreDriver::OnChanged rc:" << rc << endl; +// // // if( rc ) +// // // cerr << "TreeStoreDriver::OnChanged child:" +// // // << toContext( t, &tmp )->getURL() << endl; + + +// // // gboolean gtk_tree_store_iter_has_child( GTK_TREE_MODEL (t), &iter ); + +// // // GtkTreeIter *iter ) + +// // gtk_tree_model_row_has_child_toggled( GTK_TREE_MODEL (t), path, &iter ); + + +// // gtk_tree_model_row_changed( GTK_TREE_MODEL (t), path, &iter ); +// // gtk_tree_path_free( path ); +// // } + +// // void +// // TreeStoreDriver::OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ) +// // { +// // fh_context rc = ev->getSource(); +// // fh_context c = rc->getSubContext(olddn); +// // cout << "TreeStoreDriver::OnDeleted() c:" << c->getURL() << endl; + +// // GtkTreeIter iter = getIterForContext( t, c ); +// // GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL (t), &iter ); +// // g_return_if_fail( path ); + +// // cerr << "gtk_path being removed:" << tostr(path) << endl; +// // gtk_tree_model_row_deleted( GTK_TREE_MODEL (t), path ); +// // gtk_tree_path_free( path ); +// // } + + + +// }; diff --git a/FerrisUI/TreeStoreDriver.hh b/FerrisUI/TreeStoreDriver.hh new file mode 100644 index 0000000..ad3e8d8 --- /dev/null +++ b/FerrisUI/TreeStoreDriver.hh @@ -0,0 +1,130 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris context tree store driver for reading and putting into a + gtkferristreestore + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: TreeStoreDriver.hh,v 1.2 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_TREE_STORE_DRIVER_H__ +#define __GTK_FERRIS_TREE_STORE_DRIVER_H__ + +#include + +#include +#include +#include + +#include +// #include + +// #include + +// #include + +// #include + +// namespace FerrisUI +// { +// struct SubContextMonitoringConnections +// { +// }; + + +// class TreeStoreDriver +// : +// public Ferrisls_long_display +// { +// typedef Ferrisls_long_display _Base; +// typedef TreeStoreDriver _Self; + +// protected: + +// fh_ls ls; +// GtkFerrisTreeStore* t; + +// virtual void EnteringContext(fh_context ctx); +// virtual void workComplete(); +// virtual void ShowAttributes( fh_context ctx ); +// long m_contextsDone; +// long m_subContextCountGuess; + +// public: + +// TreeStoreDriver( GtkFerrisTreeStore* _t = 0 ); +// void setTree( GtkFerrisTreeStore* _t ); + +// Ferrisls& getFerrisls(); + +// typedef SigC::Signal3< void, fh_context, long, long > ShowAttributesUpdateGUISig_t; +// typedef SigC::Signal0< void > WorkCompleteSig_t; +// typedef SigC::Signal1< void, fh_context > EnteringContextSig_t; +// typedef SigC::Signal3< void, fh_context, long, long > ShowAttributesSig_t; + +// ShowAttributesUpdateGUISig_t ShowAttributesUpdateGUISig; +// ShowAttributesUpdateGUISig_t& getShowAttributesUpdateGUISig(); + +// WorkCompleteSig_t WorkCompleteSig; +// WorkCompleteSig_t& getWorkCompleteSig(); + +// EnteringContextSig_t EnteringContextSig; +// EnteringContextSig_t& getEnteringContextSig(); + +// ShowAttributesSig_t ShowAttributesSig; +// ShowAttributesSig_t& getShowAttributesSig(); + +// void DiskReadStarted( Ferrisls& ls, fh_context ); +// void ContextPropergationStarted( Ferrisls& ls, fh_context c ); +// void DiskReadProgress( Ferrisls& ls, fh_context, long fnum ); +// void DiskReadDone( Ferrisls& ls, fh_context ); +// void FilterStarted( Ferrisls& ls ); +// void SortStarted( Ferrisls& ls ); + +// virtual void OnExists ( NamingEvent_Exists* ev, std::string olddn, std::string newdn ); +// virtual void OnCreated( NamingEvent_Created* ev, std::string olddn, std::string newdn ); +// virtual void OnChanged( NamingEvent_Changed* ev, std::string olddn, std::string newdn ); +// virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + +// void OnSubContextCreated( NamingEvent_Created* ev, std::string olddn, std::string newdn ); + +// void StartMonitoringSubContext( fh_context c ); +// void StopMonitoringSubContext( fh_context c ); + +// struct SignalCollection +// { +// SigC::Connection ExistsConnection; +// SigC::Connection CreatedConnection; +// SigC::Connection ChangedConnection; +// SigC::Connection DeletedConnection; +// }; +// typedef std::map< fh_context, SignalCollection > SigCol_t; +// SigCol_t SigCol; +// }; + + +// }; + + +#endif diff --git a/FerrisUI/UAsyncIO.cpp b/FerrisUI/UAsyncIO.cpp new file mode 100644 index 0000000..6affec0 --- /dev/null +++ b/FerrisUI/UAsyncIO.cpp @@ -0,0 +1,53 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: UAsyncIO.cpp,v 1.2 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "GtkFerris.hh" + +using namespace std; + +namespace FerrisUI +{ + namespace Factory + { + fh_sstreamcol MakeGTKStringStreamCol( GtkProgressBar* w ) + { + return new GTK_StringStreamCollector( w ); + } + + fh_fstreamcol MakeGTKFileStreamCol( GtkProgressBar* w, + const std::string& s, + std::ios_base::openmode m ) + { + fh_fstream ss( s, m ); + return new GTK_FileStreamCollector( w, ss ); + } + + }; + +}; diff --git a/FerrisUI/UAsyncIO.hh b/FerrisUI/UAsyncIO.hh new file mode 100644 index 0000000..74b4d6b --- /dev/null +++ b/FerrisUI/UAsyncIO.hh @@ -0,0 +1,101 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: UAsyncIO.hh,v 1.2 2010/09/24 21:31:06 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_UASYNCIO_H_ +#define _ALREADY_INCLUDED_FERRIS_UASYNCIO_H_ + +#include + +#include +#include +#include + +namespace Ferris +{ + + + template + class FERRISEXP_API GTK_StreamCollector + : + public StreamCollector< StreamClass > + { + typedef GTK_StreamCollector< StreamClass > _Self; + typedef StreamCollector< StreamClass > _Base; + + GtkProgressBar* w_progress; + + public: + + GTK_StreamCollector( GtkProgressBar* w, StreamClass oss = StreamClass() ) + : + _Base( oss ), + w_progress( w ) + {} + + virtual fh_istream io_cb( fh_istream iss ) + { + iss = _Base::io_cb( iss ); + + if( this->m_totalsz > 0 ) + { + double d = this->m_donesz; + d /= this->m_totalsz; + gtk_progress_set_percentage( GTK_PROGRESS(w_progress), d ); + } + + if( this->w_progress ) + { + fh_stringstream ss; + ss << this->m_donesz << " / " << this->m_totalsz; + gtk_progress_bar_set_text( GTK_PROGRESS_BAR(w_progress), tostr(ss).c_str() ); + } + + return iss; + } + }; + + typedef GTK_StreamCollector< fh_stringstream > GTK_StringStreamCollector; + FERRIS_SMARTPTR( GTK_StringStreamCollector, fh_gtk_sstreamcol ); + + typedef GTK_StreamCollector< fh_fstream > GTK_FileStreamCollector; + FERRIS_SMARTPTR( GTK_FileStreamCollector, fh_gtk_fstreamcol ); + + namespace Factory + { + FERRISEXP_API fh_sstreamcol MakeGTKStringStreamCol( GtkProgressBar* w ); + FERRISEXP_API fh_fstreamcol MakeGTKFileStreamCol( + GtkProgressBar* w, + const std::string& s, + std::ios_base::openmode m = std::ios_base::out ); + }; + + +}; +#endif + diff --git a/FerrisUI/gtkcellrendererprogress.c b/FerrisUI/gtkcellrendererprogress.c new file mode 100644 index 0000000..52c2467 --- /dev/null +++ b/FerrisUI/gtkcellrendererprogress.c @@ -0,0 +1,343 @@ +/** + * Changed a little from the code in gaim 0.68 to handle natively + * the -100 to +100 range I throw at it. + */ + +/* gtkcellrendererprogress.c + * Copyright (C) 2002, Sean Egan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This is taken largely from GtkCellRenderer[Text|Pixbuf|Toggle] by + * Jonathon Blandford for RedHat, Inc. + */ + +#include "gtkcellrendererprogress.h" + +static void gtk_cell_renderer_progress_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); +static void gtk_cell_renderer_progress_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gtk_cell_renderer_progress_init (GtkCellRendererProgress *cellprogress); +static void gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *class); +static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, + GtkWidget *widget, + GdkRectangle *cell_area, + gint *x_offset, + gint *y_offset, + gint *width, + gint *height); +static void gtk_cell_renderer_progress_render (GtkCellRenderer *cell, + GdkWindow *window, + GtkWidget *widget, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GdkRectangle *expose_area, + guint flags); +#if 0 +static gboolean gtk_cell_renderer_progress_activate (GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + guint flags); +#endif +static void gtk_cell_renderer_progress_finalize (GObject *gobject); + +enum { + LAST_SIGNAL +}; + +enum { + PROP_0, + + PROP_PERCENTAGE, + PROP_TEXT, + PROP_SHOW_TEXT +}; + +static gpointer parent_class; +/* static guint progress_cell_renderer_signals [LAST_SIGNAL]; */ + +GType gtk_cell_renderer_progress_get_type (void) +{ + static GType cell_progress_type = 0; + + if (!cell_progress_type) + { + static const GTypeInfo cell_progress_info = + { + sizeof (GtkCellRendererProgressClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_cell_renderer_progress_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkCellRendererProgress), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_cell_renderer_progress_init, + }; + + cell_progress_type = + g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererProgress", + &cell_progress_info, 0); + } + + return cell_progress_type; +} + + +static void gtk_cell_renderer_progress_init (GtkCellRendererProgress *cellprogress) +{ + GTK_CELL_RENDERER(cellprogress)->mode = GTK_CELL_RENDERER_MODE_INERT; + GTK_CELL_RENDERER(cellprogress)->xpad = 2; + GTK_CELL_RENDERER(cellprogress)->ypad = 2; +} + +static void gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS(class); + GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class); + + parent_class = g_type_class_peek_parent (class); + object_class->finalize = gtk_cell_renderer_progress_finalize; + + object_class->get_property = gtk_cell_renderer_progress_get_property; + object_class->set_property = gtk_cell_renderer_progress_set_property; + + cell_class->get_size = gtk_cell_renderer_progress_get_size; + cell_class->render = gtk_cell_renderer_progress_render; + + g_object_class_install_property (object_class, + PROP_PERCENTAGE, + g_param_spec_double ("percentage", + "Percentage", + "The fractional progress to display", + -100, 100, 0, + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_TEXT, + g_param_spec_string ("text", + "Text", + "Text to overlay over progress bar", + NULL, + G_PARAM_READWRITE)); + g_object_class_install_property(object_class, + PROP_SHOW_TEXT, + g_param_spec_string("text_set", + "Text set", + "Whether to overlay text on the progress bar", + FALSE, + G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + + + +static void gtk_cell_renderer_progress_finalize (GObject *object) +{ +/* + GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS(object); +*/ + + (* G_OBJECT_CLASS (parent_class)->finalize) (object); +} + +static void gtk_cell_renderer_progress_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *psec) +{ + GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS(object); + + switch (param_id) + { + case PROP_PERCENTAGE: + g_value_set_double(value, cellprogress->progress); + break; + case PROP_TEXT: + g_value_set_string(value, cellprogress->text); + break; + case PROP_SHOW_TEXT: + g_value_set_boolean(value, cellprogress->text_set); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, psec); + break; + } +} + +static void gtk_cell_renderer_progress_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (object); + + switch (param_id) + { + case PROP_PERCENTAGE: + cellprogress->progress = g_value_get_double(value); + break; + case PROP_TEXT: + if (cellprogress->text) + g_free(cellprogress->text); + cellprogress->text = g_strdup(g_value_get_string(value)); + g_object_notify(object, "text"); + break; + case PROP_SHOW_TEXT: + cellprogress->text_set = g_value_get_boolean(value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec); + break; + } +} + +GtkCellRenderer *gtk_cell_renderer_progress_new(void) +{ + return g_object_new(GTK_TYPE_CELL_RENDERER_PROGRESS, NULL); +} + +static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, + GtkWidget *widget, + GdkRectangle *cell_area, + gint *x_offset, + gint *y_offset, + gint *width, + gint *height) +{ + gint calc_width; + gint calc_height; + + calc_width = (gint) cell->xpad * 2 + 50; + calc_height = (gint) cell->ypad * 2 + 10; + + if (width) + *width = calc_width; + + if (height) + *height = calc_height; + + if (cell_area) + { + if (x_offset) + { + *x_offset = cell->xalign * (cell_area->width - calc_width); + *x_offset = MAX (*x_offset, 0); + } + if (y_offset) + { + *y_offset = cell->yalign * (cell_area->height - calc_height); + *y_offset = MAX (*y_offset, 0); + } + } +} + + +static void gtk_cell_renderer_progress_render (GtkCellRenderer *cell, + GdkWindow *window, + GtkWidget *widget, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GdkRectangle *expose_area, + guint flags) +{ + GtkCellRendererProgress *cellprogress = (GtkCellRendererProgress *) cell; + + gint width, height; + gint x_offset, y_offset; + GtkStateType state; + + gtk_cell_renderer_progress_get_size (cell, widget, cell_area, + &x_offset, &y_offset, + &width, &height); + + + if (GTK_WIDGET_HAS_FOCUS (widget)) + state = GTK_STATE_ACTIVE; + else + state = GTK_STATE_NORMAL; + + width -= cell->xpad*2; + height -= cell->ypad*2; + + gtk_paint_box (widget->style, + window, + GTK_STATE_NORMAL, GTK_SHADOW_IN, + NULL, widget, "trough", + cell_area->x + x_offset + cell->xpad, + cell_area->y + y_offset + cell->ypad, + width - 1, height - 1); + + int leftToRight = 0; + double zeroToOne = cellprogress->progress / 100.0; + + int maxBrightness = 40000; + + GdkColor c; + c.pixel = 0; + c.red = 0; + c.green = maxBrightness * fabs(zeroToOne); + c.blue = 0; + + if( zeroToOne < 0 ) + { + c.blue = c.red; + c.red = c.green; + c.green = c.blue; + c.blue = 0; + zeroToOne *= -1; + leftToRight = width - (width * zeroToOne); + } + if( zeroToOne > 1 ) + zeroToOne = 1; + +// gtk_widget_modify_bg( widget, state, &c ); +// printf("zeroToOne:%f\n", zeroToOne ); + + if( zeroToOne > 0.05 ) + { + GdkGC *gc = gdk_gc_new (window); + gdk_gc_set_rgb_fg_color (gc, &c); + + gdk_draw_rectangle (window, + gc, + TRUE, + cell_area->x + x_offset + cell->xpad + leftToRight, + cell_area->y + y_offset + cell->ypad, + width * zeroToOne, + height - 1); + + g_object_unref (gc); + +/* gtk_paint_box (widget->style, */ +/* window, */ +/* state, GTK_SHADOW_OUT, */ +/* NULL, widget, "bar", */ +/* cell_area->x + x_offset + cell->xpad + leftToRight, */ +/* cell_area->y + y_offset + cell->ypad, */ +/* width * zeroToOne, */ +/* height - 1); */ + } + +} diff --git a/FerrisUI/gtkcellrendererprogress.h b/FerrisUI/gtkcellrendererprogress.h new file mode 100644 index 0000000..7808054 --- /dev/null +++ b/FerrisUI/gtkcellrendererprogress.h @@ -0,0 +1,65 @@ +/** + * Changed a little from the code in gaim 0.68 to handle natively + * the -100 to +100 range I throw at it. + */ + +/* gtkcellrendererprogress.h + * Copyright (C) 2002, Sean Egan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __GTK_CELL_RENDERER_PROGRESS_H__ +#define __GTK_CELL_RENDERER_PROGRESS_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GTK_TYPE_CELL_RENDERER_PROGRESS (gtk_cell_renderer_progress_get_type()) +#define GTK_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgress)) +#define GTK_CELL_RENDERER_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass)) +#define GTK_IS_CELL_PROGRESS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS)) +#define GTK_IS_CELL_PROGRESS_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS)) +#define GTK_CELL_RENDERER_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass)) + +typedef struct _GtkCellRendererProgress GtkCellRendererProgress; +typedef struct _GtkCellRendererProgressClass GtkCellRendererProgressClass; + + struct _GtkCellRendererProgress { + GtkCellRenderer parent; + + gdouble progress; + gchar *text; + gboolean text_set; + }; + + struct _GtkCellRendererProgressClass { + GtkCellRendererClass parent_class; + }; + + GType gtk_cell_renderer_progress_get_type (void); + GtkCellRenderer *gtk_cell_renderer_progress_new (void); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_CELL_RENDERER_PROGRESS_H__ */ diff --git a/FerrisUI/gtkferriscellrenderertext.cpp b/FerrisUI/gtkferriscellrenderertext.cpp new file mode 100644 index 0000000..6f90cb7 --- /dev/null +++ b/FerrisUI/gtkferriscellrenderertext.cpp @@ -0,0 +1,389 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cell renderer + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: gtkferriscellrenderertext.cpp,v 1.3 2010/09/24 21:31:07 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include +//#include + +#include +using namespace Ferris; +using namespace std; + + +static void gtk_ferris_cell_renderer_text_init (GtkFerrisCellRendererText *celltext); +static void gtk_ferris_cell_renderer_text_class_init (GtkFerrisCellRendererTextClass *c); +static void gtk_ferris_cell_renderer_text_finalize (GObject *object); + + +static GtkCellEditable *gtk_ferris_cell_renderer_text_start_editing ( + GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GtkCellRendererState flags); + +enum { + ONEDIT, + LAST_SIGNAL +}; + +GtkCellEditable* (*parent_start_editing) + (GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GtkCellRendererState flags); + +static gpointer parent_class; +static guint ferris_cell_renderer_signals [LAST_SIGNAL]; + + +void +gtkf_marshal_VOID__STRING_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__STRING_POINTER callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + (char*) g_value_get_string (param_values + 1), + (gpointer)g_value_get_pointer(param_values + 2), + data2); +} + + +void +monkeyiq_gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell, + gint width, + gint height) +{ + g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); + + if ((width != cell->width) || (height != cell->height)) + { + g_object_freeze_notify (G_OBJECT (cell)); + + if (width != cell->width) + { + cell->width = width; + g_object_notify (G_OBJECT (cell), "width"); + } + + if (height != cell->height) + { + cell->height = height; + g_object_notify (G_OBJECT (cell), "height"); + } + + g_object_thaw_notify (G_OBJECT (cell)); + } +} + +static void +gtk_ferris_cell_renderer_text_get_size (GtkCellRenderer *cell, + GtkWidget *widget, + GdkRectangle *cell_area, + gint *x_offset, + gint *y_offset, + gint *width, + gint *height) +{ + GtkFerrisCellRendererText* fcell = (GtkFerrisCellRendererText*)cell; + GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT(cell); + +// cerr << "gtk_ferris_cell_renderer_text_get_size(top)" +// << " calc_fixed_size:" << fcell->calc_fixed_size +// << " width:" << (width!=0) << " height:" << (height!=0) +// << endl; + + PangoRectangle rect; + PangoLayout *layout; + + if( fcell->calc_fixed_size ) + { + PangoContext* context; + PangoFontMetrics* metrics; + PangoFontDescription* font_desc; + gint row_width; + gint row_height; + + font_desc = pango_font_description_copy (widget->style->font_desc); + pango_font_description_merge (font_desc, celltext->font, TRUE); + + if (celltext->scale_set) + { + pango_font_description_set_size( + font_desc, + (gint)(celltext->font_scale * pango_font_description_get_size (font_desc))); + } + + context = gtk_widget_get_pango_context (widget); + + metrics = pango_context_get_metrics (context, + font_desc, + pango_context_get_language (context)); + + row_height = + pango_font_metrics_get_ascent (metrics) + + pango_font_metrics_get_descent (metrics); + + row_width = + pango_font_metrics_get_approximate_char_width(metrics) + * strlen( fcell->calc_fixed_template ); + + pango_font_metrics_unref (metrics); + +// cerr << "gtk_ferris_cell_renderer_text_get_size() XXXOURSZ " +// << " rw:" << PANGO_PIXELS(row_width) +// << " rh:" << PANGO_PIXELS(row_height) << endl; + + monkeyiq_gtk_cell_renderer_set_fixed_size( + cell, + 2*cell->xpad + PANGO_PIXELS (row_width), + 2*cell->ypad + celltext->fixed_height_rows * PANGO_PIXELS (row_height)); + + if (height) + { + *height = cell->height; + height = 0; + } + if( width ) + { + *width = cell->width; + width = 0; + } + + return; + } + +// cerr << "gtk_ferris_cell_renderer_text_get_size(fall)" +// << " FALL THROUGH GET_SIZE " +// << " calc_fixed_size:" << fcell->calc_fixed_size +// << " width:" << (width!=0) << " height:" << (height!=0) +// << endl; + + GtkFerrisCellRendererTextClass* cl = GTK_FERRIS_CELL_RENDERER_TEXT_GET_CLASS(cell); + cl->old_get_size( cell, widget, cell_area, x_offset, y_offset, width, height ); + +// char* tmp = ""; +// if( height ) tmp = " XXXCELLHEIGHT "; +// cerr << "gtk_ferris_cell_renderer_text_get_size(end)" +// << " FALL THROUGH GET_SIZE " +// << tmp +// << " calc_fixed_size:" << fcell->calc_fixed_size +// << " width:" << (width ? *width : -1) +// << " height:" << (height ? *height : -1) +// << endl; + +} + + + +#define GTK_FERRIS_CELL_RENDERER_TEXT_PATH "gtk-ferris-cell-renderer-text-path" + +GtkType +gtk_ferris_cell_renderer_text_get_type (void) +{ + static GtkType cell_text_type = 0; + + if (!cell_text_type) + { + static const GTypeInfo cell_text_info = + { + sizeof (GtkFerrisCellRendererTextClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_ferris_cell_renderer_text_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkFerrisCellRendererText), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_ferris_cell_renderer_text_init, + }; + + cell_text_type = g_type_register_static( + GTK_TYPE_CELL_RENDERER_TEXT, + "GtkFerrisCellRendererText", + &cell_text_info, GTypeFlags(0)); + } + + return cell_text_type; +} + +static void +gtk_ferris_cell_renderer_text_init (GtkFerrisCellRendererText *renderer) +{ + renderer->calc_fixed_template = 0; +} + +static void +gtk_ferris_cell_renderer_text_class_init (GtkFerrisCellRendererTextClass *c) +{ + GObjectClass *object_class = G_OBJECT_CLASS (c); + GtkFerrisCellRendererTextClass *fcell_class = GTK_FERRIS_CELL_RENDERER_TEXT_CLASS(c); + parent_class = g_type_class_peek_parent (c); + GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (c); + + object_class->finalize = gtk_ferris_cell_renderer_text_finalize; + + parent_start_editing = cell_class->start_editing; + cell_class->start_editing = gtk_ferris_cell_renderer_text_start_editing; + + fcell_class->old_get_size = cell_class->get_size; + cell_class->get_size = gtk_ferris_cell_renderer_text_get_size; + + ferris_cell_renderer_signals [ONEDIT] = + gtk_signal_new ("onedit", + GTK_RUN_LAST, + GTK_CLASS_TYPE (object_class), + GTK_SIGNAL_OFFSET (GtkFerrisCellRendererTextClass, onedit), + gtkf_marshal_VOID__STRING_POINTER, + GTK_TYPE_NONE, 2, + G_TYPE_STRING, G_TYPE_POINTER ); +} + +static void +gtk_ferris_cell_renderer_text_finalize (GObject *object) +{ + GtkFerrisCellRendererText *celltext = GTK_FERRIS_CELL_RENDERER_TEXT (object); + GtkFerrisCellRendererText *renderer = GTK_FERRIS_CELL_RENDERER_TEXT( object ); + + if( renderer->calc_fixed_template ) + g_free( renderer->calc_fixed_template ); + + (* G_OBJECT_CLASS (parent_class)->finalize) (object); +} + + + +GtkCellRenderer * +gtk_ferris_cell_renderer_text_new (void) +{ +// cerr << "gtk_ferris_cell_renderer_text_new (void)" << endl; + return GTK_CELL_RENDERER(g_object_new (gtk_ferris_cell_renderer_text_get_type (), NULL)); +} + +static GtkCellEditable * +gtk_ferris_cell_renderer_text_start_editing (GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GtkCellRendererState flags) +{ + GtkFerrisCellRendererText *celltext; + GtkWidget *entry; + guint32 ve = 0; + + gtk_signal_emit (GTK_OBJECT (cell), + ferris_cell_renderer_signals[ONEDIT], + path, &ve ); + + LG_GTKFERRIS_D << "gtk_ferris_cell_renderer_text_start_editing()" + << " veto:" << ve + << endl; + + if( ve ) + { + return 0; + } + + return parent_start_editing( + cell, event, widget, path, background_area, cell_area, flags ); +} + + + +/** + * gtk_cell_renderer_text_set_fixed_size_string: + * @renderer: A #GtkFerrisCellRendererText + * @template_string: template to use for finding the absolute cell size or 0 + * + * Sets the size of the renderer to explicitly be determined by the "font", "x_pad" + * and "y_pad" property set on it. Further changes in these properties do not + * affect the cell size, so they must be accompanied by a subsequent call to this + * function. Using this function is unflexible, and should really only be used + * if calculating the size of a cell is too slow (ie, a massive number of cells + * displayed) or if the cells of a column follow a rigid template and there are many + * cells. If @template_string is 0 then the fixed size is unset, and + * the cell size is determined by the properties again. + **/ +void +gtk_cell_renderer_text_set_fixed_size_string( GtkFerrisCellRendererText *renderer, + const gchar* template_string ) +{ + g_return_if_fail (GTK_IS_FERRIS_CELL_RENDERER_TEXT (renderer)); + + if( !template_string ) + { + if( renderer->calc_fixed_template ) + g_free( renderer->calc_fixed_template ); + renderer->calc_fixed_template = 0; + renderer->calc_fixed_size = false; + + gtk_cell_renderer_set_fixed_size (GTK_CELL_RENDERER (renderer), -1, -1); + } + else + { + renderer->calc_fixed_size = true; + renderer->calc_fixed_template = g_strdup( template_string ); + } +} diff --git a/FerrisUI/gtkferriscellrenderertext.hh b/FerrisUI/gtkferriscellrenderertext.hh new file mode 100644 index 0000000..0910a23 --- /dev/null +++ b/FerrisUI/gtkferriscellrenderertext.hh @@ -0,0 +1,85 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cell renderer + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: gtkferriscellrenderertext.hh,v 1.2 2010/09/24 21:31:07 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_CELL_RENDERER_TEXT_H__ +#define __GTK_FERRIS_CELL_RENDERER_TEXT_H__ + +#include +#include +#include + +extern "C" { + + +#define GTK_TYPE_FERRIS_CELL_RENDERER_TEXT (gtk_ferris_cell_renderer_text_get_type ()) +#define GTK_FERRIS_CELL_RENDERER_TEXT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FERRIS_CELL_RENDERER_TEXT, GtkFerrisCellRendererText)) +#define GTK_FERRIS_CELL_RENDERER_TEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FERRIS_CELL_RENDERER_TEXT, GtkFerrisCellRendererTextClass)) +#define GTK_IS_FERRIS_CELL_RENDERER_TEXT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FERRIS_CELL_RENDERER_TEXT)) +#define GTK_IS_FERRIS_CELL_RENDERER_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GTK_TYPE_FERRIS_CELL_RENDERER_TEXT)) +#define GTK_FERRIS_CELL_RENDERER_TEXT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FERRIS_CELL_RENDERER_TEXT, GtkFerrisCellRendererTextClass)) + +typedef struct _GtkFerrisCellRendererText GtkFerrisCellRendererText; +typedef struct _GtkFerrisCellRendererTextClass GtkFerrisCellRendererTextClass; + +struct FERRISEXP_API _GtkFerrisCellRendererText +{ + GtkCellRendererText parent; + + gboolean calc_fixed_size; + gchar* calc_fixed_template; +}; + +struct FERRISEXP_API _GtkFerrisCellRendererTextClass +{ + GtkCellRendererTextClass parent_class; + + void (* onedit) (GtkFerrisCellRendererText *cell_renderer_text, + gchar *path, + gpointer shouldveto ); + + void (* old_get_size)(GtkCellRenderer *cell, + GtkWidget *widget, + GdkRectangle *cell_area, + gint *x_offset, + gint *y_offset, + gint *width, + gint *height); + + +}; + + FERRISEXP_API GtkType gtk_ferris_cell_renderer_text_get_type (void); + FERRISEXP_API GtkCellRenderer *gtk_ferris_cell_renderer_text_new (void); + + FERRISEXP_API void + gtk_cell_renderer_text_set_fixed_size_string( GtkFerrisCellRendererText *renderer, + const gchar* template_string ); + +} +#endif diff --git a/FerrisUI/gtkferristreestore.cpp b/FerrisUI/gtkferristreestore.cpp new file mode 100644 index 0000000..32c5c61 --- /dev/null +++ b/FerrisUI/gtkferristreestore.cpp @@ -0,0 +1,3441 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris context tree store + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: gtkferristreestore.cpp,v 1.18 2010/09/24 21:31:07 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +// +// called for every cell that needs to be rendered +// +// gtk_ferris_tree_store_get_n_columns +// gtk_ferris_tree_store_get_value col:69 + +// Called for each row in a redisplay +// +// gtk_ferris_tree_store_iter_next c:file:///tmp/ft/2 +// gtk_ferris_tree_store_get_path c:file:///tmp/ft/2 + + +#include +#include + +#include +#include "GtkFerris.hh" +#include + +#include +#include +#include +#include + +#include +#include "Ferris/FerrisStdHashMap.hh" +#include + +#include +#include + +#include + +// #ifdef LG_GTKFERRIS_D +// #undef LG_GTKFERRIS_D +// #define LG_GTKFERRIS_D cerr +// #endif + +using namespace std; +using namespace Ferris; + +//#define DISABLE_SUBTREE_SUPPORT +//#define GTK_SUBTREE_IS_BUGGY + +const char* const treeicon_pixbuf_cn = "treeicon-pixbuf"; +const char* const emblems_pixbuf_cn = "emblem:emblems-pixbuf"; +const char* const ferris_iconname_pixbuf_cn = "ferris-iconname-pixbuf"; + +/********************************************************************************/ +/********************************************************************************/ +/** DECLARATIONS **************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static Context* +deepestDelegate( Context* c ) +{ + Context* ret = c; + + if( ChainedViewContext* d = dynamic_cast(c) ) + { + while( d && isBound( d->getDelegate() )) + { + ret = GetImpl(d->getDelegate()); + d = dynamic_cast( GetImpl(d->getDelegate())); + } + } + return ret; + +// while( isBound( d->getDelegate() )) +// { +// if( ChainedViewContext* t = dynamic_cast( GetImpl(d->getDelegate()))) +// d = t; +// else +// return d; +// } +// return d; +} + +string tostr( GtkTreePath* path ); + + +typedef struct _GtkFerrisTreeStore GtkFerrisTreeStore; +typedef struct _GtkFerrisTreeStoreClass GtkFerrisTreeStoreClass; +namespace FerrisUI +{ + class FerrisTreeModel_Impl; +}; + +#define GTK_TYPE_FERRIS_TREE_STORE (gtk_ferris_tree_store_get_type ()) +#define GTK_FERRIS_TREE_STORE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FERRIS_TREE_STORE, GtkFerrisTreeStore)) +#define GTK_FERRIS_TREE_STORE_CLASS(klass) \ +(GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FERRIS_TREE_STORE, GtkFerrisTreeStoreClass)) + +#define GTK_IS_FERRIS_TREE_STORE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FERRIS_TREE_STORE)) + +#define GTK_IS_FERRIS_TREE_STORE_CLASS(klass) \ +(GTK_CHECK_CLASS_TYPE ((obj), GTK_TYPE_FERRIS_TREE_STORE)) + +#define GTK_FERRIS_TREE_STORE_GET_CLASS(obj) \ +(GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FERRIS_TREE_STORE, GtkFerrisTreeStoreClass)) + + +struct _GtkFerrisTreeStore +{ + GObject parent; + + FerrisUI::FerrisTreeModel_Impl* d; + + gint32 ColumnCount; + gint stamp; + + gpointer root; + gpointer last; +}; + +struct _GtkFerrisTreeStoreClass +{ + GObjectClass parent_class; +}; + + +GtkType gtk_ferris_tree_store_get_type (void); +GtkFerrisTreeStore* gtk_ferris_tree_store_new(); + +namespace FerrisUI +{ + + int mydistance( Context::iterator iter, Context::iterator e ) + { + int count = 0; + for( ; iter != e ; ++iter ) + { + ++count; + } + return count; + } + + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////// + + + bool isColumnFixedSize( const std::string& cn ) + { + static set fixedNames; + static Util::SingleShot virgin; + if( virgin() ) + { + fixedNames.insert("size"); + fixedNames.insert("size-human-readable"); + fixedNames.insert("mtime-display"); + fixedNames.insert("protection-ls"); + fixedNames.insert("protection-raw"); + + fixedNames.insert("emblem:emblems-pixbuf"); + fixedNames.insert("treeicon-pixbuf"); + } + + return( fixedNames.end() != fixedNames.find( cn ) ); + } + + + struct myhash + { + size_t operator()( Context* x) const + { + return (size_t)x; + } + }; + + + typedef vector< fh_context > contexts_t; + typedef std::vector< std::string > columnNames_t; + typedef map< Context*, Context::iterator > ContextIterators_t; +// typedef hash_map< Context*, Context::iterator, myhash > ContextIterators_t; +// typedef vector< Context::iterator > ContextIterators_t; + + /** + * The GTK object uses this object quite a bit. Basically we have this nice C++ front + * that is created with CreateTreeModel() and which can have properly constructed instance + * data etc. + */ + class FERRISEXP_DLLLOCAL FerrisTreeModel_Impl + : + public FerrisTreeModel + { + typedef FerrisTreeModel _Base; + typedef FerrisTreeModel_Impl _Self; + + /** + * If m_root is not bound, set it to the given context + */ + void setRoot( fh_context c ); + + /** + * Clear the gtk model of all items emitting events so that all views + * think there are no items in the model + */ + void clear(); + void clear( fh_context c ); + + + /** + * Create the underlying GTK object and setup pointers. + * NOTE that the class itself cant use this to change the GTK model object + * because all views using the old model would need to be reset too + */ + void createGtkModel(); + + /** + * Populate the model with data from the given context + * called from read(), updateViewForFiltering() and updateViewForSorting() to update + * what is shown and the ordering + */ + void populateModelFromContext( fh_context c, bool isRoot ); + + + public: + FerrisTreeModel_Impl(); + ~FerrisTreeModel_Impl(); + + virtual void setURL( fh_context c ); + virtual void setURL( const std::string& s ); + virtual std::string getURL(); + virtual fh_context getRootContext(); + virtual void read( bool force = false ); + void read( fh_context c, bool isRoot, bool force ); + + virtual GtkTreeModel* getGtkModel(); + + virtual void EnsureMonitoringSubContextCreationEvents( fh_context c, bool force = false ); + virtual void StartMonitoringSubContext( fh_context c ); + virtual void StopMonitoringSubContext( fh_context c ); + + virtual void OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + virtual void OnMedallionUpdated( fh_context c ); + virtual void OnChanged( NamingEvent_Changed* ev, std::string olddn, std::string newdn ); + virtual void OnDeleted( NamingEvent_Deleted* ev, std::string olddn, std::string newdn ); + virtual void OnMoved( NamingEvent_Moved* ev, std::string olddn, std::string newdn ); + + /** + * Used to propergate events about disk reading progress + */ + void OnExistsDiskRead( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ); + + + /** + * Add the given context to the tree in its correct location + */ + void add( Context::iterator ci, GtkTreeIter* iter, GtkTreePath* path ); + void add( Context::iterator ci ); + void add( fh_context c ); + + /** + * Convert a Gtk tree iterator to a Context::iterator + */ + Context::iterator TreeIterToContext( GtkTreeIter *iter ); + + /** + * Get a Gtk tree iterator for a Context/Context::iterator + */ + void ContextToTreeIter( GtkTreeIter *iter, Context::iterator ci, bool checkExistsInContextIterators ); + void ContextToTreeIter( GtkTreeIter *iter, Context::iterator ci ); + void ContextToTreeIter( GtkTreeIter *iter, fh_context c ); + GtkTreeIter toTreeIter( Context::iterator ci ); + GtkTreeIter toTreeIter( fh_context c ); + + + /** + * Check to see if m_columnNames needs updating, and if so update the collection + */ + void UpdateColumnNames(); + + /** + * Add new columns for any EA that is in 'c' but is not already a column in the model + */ + void AddAllNewEANames( fh_context c ); + + /** + * Get the type of a column based on its name/index + */ + virtual GType getColumnType( const string& cn ); + virtual GType getColumnType( int index ); + + /** + * Get the name of the column at the given index + */ + const string& getColumnName( int index ); + + /** + * Get the context for a given location in the tree + */ + fh_context toContext( GtkTreeIter *iter ); + fh_context toContext( gchar* path_string ); + fh_context toContext( GtkTreePath* path ); + + + + /** + * Lookup the number of a column by its name. + * + * @param tree_model This + * @param s The name of the column to find the index of. + * + * @return the index from 0 up where the column with name 's' can be found at, + * or -1 if no column with the name 's' is being shown. + */ + gint getColumnNumber( const std::string& s ); + + + /** + * Set this to check if a directory has children and only display a triangle + * opener if there are children + */ + bool m_checkDirsForChildren; + virtual void setCheckDirsForChildren( bool v ) + { + m_checkDirsForChildren = v; + } + + + /** + * Check if there exists one or more subdirs from each context and only dislay + * a triangle for contexts who have subdirs. + */ + bool m_checkForExistsSubDir; + virtual void setCheckForExistsSubDir( bool v ) + { + m_checkForExistsSubDir = v; + } + + /** + * Set the number of contexts that are to be read between emission of + * getAddingContextSig() signal. Normal GtkTreeView use should leave + * the default (somewhere around 100 at the moment) but other views + * that are just using the model for its data house can set to emit + * for each context + */ + int m_addingContextSignalModulas; + virtual void setAddingContextSignalModulas( int m ) + { + m_addingContextSignalModulas = m; + } + + + + + /** + * Root context node of the view + */ + fh_context m_root; + + /** + * When the root node has changed this flag is set to true so that + * the schema for stateless attributes can be consulted and have its + * result cached. + */ + bool m_root_hasChanged_RecheckStatelessSchemas; + + /** + * when m_root_hasChanged_RecheckStatelessSchemas is set to true + * then setup the cache of the type for each column in the view + * and on later calls to getColumnType() check the cache for the type + * before assuming a string type. + */ + typedef map< string, GType > m_columnTypeMap_t; + m_columnTypeMap_t m_columnTypeMap; + + + /** + * Filtered context view + */ + fh_context m_filteredContext; + + /** + * Sorted context view of the view + */ + fh_context m_sortedContext; + + /** + * Gets the deepest context wrapper for the view. + * They are always wrapped like this, + * native + * filtered + * sorted + */ + fh_context getViewContext(); + + std::string m_sortingString; + std::string getSortingString(); + void setSortingString( const std::string& s, bool revalidate = true ); + + /** + * Called after setSortingString() to update the current view. + */ + void updateViewForSorting(); + + /** + * Very much like what sorting has + */ + std::string m_filterString; + virtual std::string getFilterString(); + virtual void setFilterString( const std::string& s, bool revalidate = true ); + void updateViewForFiltering(); + + + /** + * Only monitor the root context one time or none. + */ + bool m_areMonitoringRoot; + + /** + * Names of all the current columns, this can be more than just getSubContextNames() + * because we add columns for [sub]children in the tree. ie. columnNames is the + * union of all getSubContextNames() for all nodes viewed. + */ + columnNames_t m_columnNames; + + /** + * If the client wants m_columnNames to remain a static collection then they + * can set this to be that collection. Methods which update m_columnNames + * will make sure it is either empty or contains a copy of m_staticColumnNames + */ + columnNames_t m_staticColumnNames; + void setStaticColumnNames( const std::vector< std::string >& v ) + { + m_staticColumnNames = v; + } + + void + appendColumnName( const std::string& s ) + { + if( !m_staticColumnNames.empty() ) + ensure_back( m_staticColumnNames, s ); + + ensure_back( m_columnNames, s ); + } + + + + + /** + * Because GtkTreeIter doesn't let us keep any data we want, only 3x pointers + * we keep a cache here and use GtkTreeIter->user_data = &ContextIterators[?]; + */ + ContextIterators_t m_ContextIterators; + + /** + * URL of the root context + */ + string m_url; + + /** + * The GTK object for this model + */ + GtkFerrisTreeStore* m_gtkModel; + + + /** + * If true then get_value() returns dummy data + */ + int m_viewIsBootstrappingNCols; + + /** + * Playing with setting this in read() to the number of times to ignore + * get_value() + */ + guint32 m_bootstrapcount; + + /* SEE .hh file */ + virtual void setViewIsBootstrappingNCols( int ncols ) + { + m_viewIsBootstrappingNCols = ncols; + } + + private: + + /** + * A cache to allow clear() to be called many times sequentially without + * causing ill effects. + */ + bool m_cleared; + + /** + * For read operations this tracks how many contexts have been read + */ + gint m_contextsDone; + + /** + * For read operations this tracks what the estimated size is + */ + gint m_subContextCountGuess; + + FerrisTreeModel_Impl( const FerrisTreeModel_Impl& ); + FerrisTreeModel_Impl operator=( const FerrisTreeModel_Impl& ); + + struct SignalCollection + { + SignalCollection() + : + ref_count(0) + {} + + int ref_count; + sigc::connection ExistsConnection; +// sigc::connection CreatedConnection; + sigc::connection ChangedConnection; + sigc::connection MedallionUpdatedConnection; + sigc::connection DeletedConnection; + sigc::connection MovedConnection; + }; + struct SignalCollectionCreation + { + SignalCollectionCreation() + : + ref_count(0) + {} + + int ref_count; + sigc::connection CreatedConnection; + }; + + struct ContextCompare : private less + { + typedef less _Base; + + bool operator()( const fh_context& c1, + const fh_context& c2 ) const + { + { + Context* cc1 = GetImpl( c1 ); + Context* cc2 = GetImpl( c2 ); + return cc1 < cc2; + } +// return _Base::operator()( c1->getURL(), c2->getURL() ); + } + }; + + typedef std::map< fh_context, SignalCollection, ContextCompare > SigCol_t; + SigCol_t SigCol; + typedef std::map< fh_context, SignalCollectionCreation, ContextCompare > SigColCreation_t; + SigColCreation_t SigColCreation; + + /** + * For filtered/sorted contexts we keep/use the deepest delegates only + * to avoid having two fh_context pointers which are for the same file + * but compare literally as pointers differently + */ + fh_context SignalCollection_findDeepest( fh_context c ) + { + if( ChainedViewContext* cvc = dynamic_cast(GetImpl(c))) + return deepestDelegate( cvc ); + return c; + } + SignalCollection& getSignalCollection( fh_context c ) + { + return SigCol[ SignalCollection_findDeepest(c) ]; + } + SigCol_t::iterator findSignalCollection( fh_context c ) + { + return SigCol.find( SignalCollection_findDeepest(c) ); + } + SignalCollectionCreation& getSignalCollectionCreation( fh_context c ) + { + return SigColCreation[ SignalCollection_findDeepest(c) ]; + } + SigColCreation_t::iterator findSignalCollectionCreation( fh_context c ) + { + return SigColCreation.find( SignalCollection_findDeepest(c) ); + } + + +// SignalCollection& getSignalCollection( fh_context c ) +// { +// return SigCol[ c->getURL() ]; +// } +// SigCol_t::iterator findSignalCollection( fh_context c ) +// { +// return SigCol.find( c->getURL() ); +// } + }; +}; + + +#define G_NODE(node) ((GNode *)node) +#define VALID_ITER(iter, tree_store) \ +(iter!= NULL && tree_store->stamp == iter->stamp && iter->user_data) + +static GObjectClass *parent_class = NULL; +using namespace FerrisUI; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +string tostr( GtkTreePath* path ) +{ + if( !path ) + { + return ""; + } + + char* p = gtk_tree_path_to_string( path ); + string ret = p; + g_free(p); + return ret; +} + +static void +InvalidateIter( GtkTreeIter *iter ) +{ + if( iter ) + { + iter->user_data = 0; + iter->user_data2 = 0; + iter->user_data3 = 0; + iter->stamp = 0; + } +} + +static void +InvalidateIter( GtkTreeIter& iter ) +{ + InvalidateIter( &iter ); +} + +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + +static GtkTreeModelFlags +gtk_ferris_tree_store_get_flags (GtkTreeModel *tree_model) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), GtkTreeModelFlags(0)); +// return GtkTreeModelFlags(0); + return GtkTreeModelFlags(GTK_TREE_MODEL_ITERS_PERSIST); +} + + +static void +gtk_ferris_tree_store_finalize (GObject *object) +{ + GtkFerrisTreeStore *t = GTK_FERRIS_TREE_STORE( object ); + (*parent_class->finalize) (object); +} + + +static void +gtk_ferris_tree_store_class_init (GtkFerrisTreeStoreClass *c) +{ + parent_class = (GObjectClass*)g_type_class_peek_parent(c); + GObjectClass *object_class = (GObjectClass *)c; + + object_class->finalize = gtk_ferris_tree_store_finalize; +} + +static void +gtk_ferris_tree_store_init (GtkFerrisTreeStore *tree_store) +{ + GtkFerrisTreeStore *t = GTK_FERRIS_TREE_STORE (tree_store); + + tree_store->ColumnCount = 0; + tree_store->root = g_node_new (NULL); + for( tree_store->stamp = 0; !tree_store->stamp; ) + { + tree_store->stamp = g_random_int (); + } +} + + +GtkFerrisTreeStore* +gtk_ferris_tree_store_new() +{ + GtkFerrisTreeStore* retval = + GTK_FERRIS_TREE_STORE( + g_object_new(GTK_TYPE_FERRIS_TREE_STORE, NULL)); + + return retval; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static gboolean +gtk_ferris_tree_store_drag_data_get( GtkTreeDragSource *drag_source, + GtkTreePath *path, + GtkSelectionData *selection_data ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (drag_source), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (drag_source); + FerrisTreeModel_Impl* d = t->d; + + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_drag_data_get() path:" << tostr(path) << endl; + + /* Note that we don't need to handle the GTK_TREE_MODEL_ROW + * target, because the default handler does it for us, but + * we do anyway for the convenience of someone maybe overriding the + * default handler. + */ + + if (gtk_tree_set_row_drag_data (selection_data, + GTK_TREE_MODEL (drag_source), + path)) + { + return TRUE; + } + else + { +// if( info == TARGET_ROOTWIN ) +// g_print ("I was dropped on the rootwin\n"); +// else + + char dummydata[100]; + strcpy( dummydata, "I'm the sample" ); + + if( selection_data->target == gdk_atom_intern ("STRING", FALSE) || + selection_data->target == gdk_atom_intern ("text/plain", FALSE) ) + { +// gtk_selection_data_set( selection_data, +// selection_data->target, +// 8, +// (guchar*)dummydata, strlen(dummydata)+1 ); + + fh_context c = d->toContext( path ); + gtk_selection_data_set( selection_data, + selection_data->target, + 8, + (guchar*)c->getURL().c_str(), + c->getURL().length() + 1 ); + } + } + + return FALSE; +} + +static gboolean +gtk_ferris_tree_store_drag_data_delete( GtkTreeDragSource *drag_source, + GtkTreePath *path ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (drag_source), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (drag_source); + FerrisTreeModel_Impl* d = t->d; + GtkTreeIter iter; + + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (drag_source), + &iter, + path)) + { + LG_GTKFERRIS_D << " drag_del() path:" << tostr(path) << endl; + gtk_tree_model_row_deleted( d->getGtkModel(), path ); + +// gtk_tree_store_remove (GTK_TREE_STORE (drag_source), +// &iter); + return TRUE; + } + else + { + return FALSE; + } +} + +static void +gtk_ferris_tree_store_drag_source_init (GtkTreeDragSourceIface *iface) +{ + iface->drag_data_delete = gtk_ferris_tree_store_drag_data_delete; + iface->drag_data_get = gtk_ferris_tree_store_drag_data_get; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static gint +gtk_ferris_tree_store_get_n_columns (GtkTreeModel *tree_model) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_n_columns" << endl; + d->UpdateColumnNames(); + return d->m_columnNames.size(); +} + +static GType +gtk_ferris_tree_store_get_column_type (GtkTreeModel *tree_model, + gint index) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_column_type index:" << index << endl; + return d->getColumnType( index ); +} + +static gboolean +gtk_ferris_tree_store_get_iter( GtkTreeModel *tree_model, + GtkTreeIter *iter, + GtkTreePath *path ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() path:" << tostr(path) << endl; + + InvalidateIter( iter ); + + gint *indices = gtk_tree_path_get_indices( path ); + gint depth = gtk_tree_path_get_depth( path ); + gint i; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() depth:" << depth + << " index[0]:" << indices[0] + << endl; + + g_return_val_if_fail (depth > 0, FALSE); + + if( !isBound( d->getViewContext() ) ) + { + stringstream ss; + ss << "gtk_ferris_tree_store_get_iter path:" << tostr(path) + << " root context is not bound!" << endl; + LG_GTKFERRIS_D << tostr(ss) << endl; + return false; + } + + /* + * Try to make the usual cases that little bit faster + */ + if( depth==1 && indices[0] == 0 ) + { + if( !d->getViewContext()->hasSubContexts() ) + return false; + + d->ContextToTreeIter( iter, d->getViewContext()->begin() ); + return true; + } + + + + fh_context parentc = d->getViewContext(); + Context::iterator ci = parentc->begin(); + if( ci == parentc->end() ) + return false; + + for (i = 0; i < depth; ++i ) + { + gint index = indices[i]; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() path:" << tostr(path) + << " i:" << i + << " index:" << index + << " subc:" << parentc->SubContextCount() + << endl; + + if( index < 0 || index >= parentc->SubContextCount() ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() path:" << tostr(path) + << " out-of-range!" + << " index:" << index + << " child-count:" << parentc->SubContextCount() + << endl; + return false; + } + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() path:" << tostr(path) + << " index:" << index + << " distance:" << distance( ci, parentc->end() ) +// << " mydistance:" << mydistance( ci, parentc->end() ) + << endl; + + ci = parentc->begin(); + if( ci == parentc->end() ) + return false; + if( distance( ci, parentc->end() ) < index ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_iter() index:" << index + << " is too large!" + << endl; + return false; + } + + + ci += index; + parentc = *ci; + } + + d->ContextToTreeIter( iter, ci ); + return true; +} + +fh_context getRootContext( fh_context c ) +{ + while( c->isParentBound() ) + { + c = c->getParent(); + } + return c; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +static GtkTreePath* +gtk_ferris_tree_store_get_path( GtkTreeModel *tree_model, + GtkTreeIter *iter ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + g_return_val_if_fail (iter != NULL, NULL); + g_return_val_if_fail (VALID_ITER (iter, t), FALSE); + + GtkTreePath *ret = 0; + string path; + + Context::iterator ci = d->TreeIterToContext( iter ); + if( !isBound( *ci ) ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path() called with an unbound gtk iter" + << endl; + g_on_error_query(0); + return 0; + } + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(top) ci:" << (*ci)->getURL() + << endl; +// (*ci)->dumpRefDebugData( Factory::fcerr() ); + + while( ci->isParentBound() ) + { + /* + * Walk from the iter context up to the root node appending :offset for + * each level we walk up + */ + fh_context p = ci->getParent(); + int offset=0; + string rdn = ci->getDirName(); + +// if( d->m_sortedContext && p->getURL() == d->m_sortedContext->getURL() ) +// p = d->m_sortedContext; + + LG_GTKFERRIS_D << "get_path() ci:" << (*ci)->getURL() + << " rdn:" << rdn + << " p:" << p->getURL() + << " viewp:" << d->getViewContext()->getURL() + << endl; + +// /* PURE DEBUG */ +// cerr << "--ci-------------=============-------------------" << endl; +// (*ci)->dumpOutItems(); +// cerr << "--p-------------=============-------------------" << endl; +// p->dumpOutItems(); +// cerr << "--d->view-------------=============-------------------" << endl; +// d->getViewContext()->dumpOutItems(); +// cerr << "--done-------------=============-------------------" << endl; + +// /* PURE DEBUG */ +// for( Context::iterator ti = p->begin(); ti != p->end(); ++ti ) +// { +// cerr << "get_path() eq:" << (ti == ci) +// << " *eq:" << (*ti == *ci) +// << " ti:" << (*ti)->getURL() +// << endl; +// if( (*ti)->getDirName() == "play" ) +// (*ti)->dumpOutItems(); +// } +// for( Context::iterator ti = d->getViewContext()->begin(); +// ti != d->getViewContext()->end(); ++ti ) +// { +// cerr << "get_path(2) eq:" << (ti == ci) +// << " *eq:" << (*ti == *ci) +// << " ti:" << (*ti)->getURL() +// << endl; +// (*ti)->dumpOutItems(); +// } + +// cerr << "get_path. testing an inline version of distance()" << endl; +// { +// int n = 0; +// Context::iterator first = p->begin(); +// Context::iterator last = ci; + +// Context::iterator it = first; +// while( it != last ) +// { +// cerr << "get_path(3) iter:" << toVoid( GetImpl( *it ) ) +// << " eq:" << (it == last) +// << " *eq:" << (*it == *last) +// << " ti:" << (*it)->getURL() +// << endl; + +// ++it; ++n; +// } +// } + +// /* PURE DEBUG */ +// if( distance( p->begin(), ci ) < 0 ) +// { +// cerr << "gtk_get_path() negative distance() p.begin():" << (*p->begin())->getURL() << endl; +// cerr << "gtk_get_path() negative distance() ci:" << (*ci)->getURL() << endl; +// cerr << "gtk_get_path() negative distance(), in order traversal of parent follows." << endl; +// for( Context::iterator ti = p->begin(); ti != p->end(); ++ti ) +// { +// cerr << "get_path(5) ti:" << toVoid( GetImpl( *ti ) ) +// << " ti:" << (*ti)->getURL() +// << endl; +// } +// } + + +// /* PURE DEBUG */ +// cerr << "gtk_ferris_tree_store_get_path() parent size:" << p->SubContextCount() << endl; +// Context::iterator founditer = p->find( rdn ); +// if( founditer == p->end() ) +// { +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path() " +// << " founditer == p->end() " +// << endl; +// g_on_error_query(0); +// return 0; +// } +// { +// int i=0; +// for( Context::iterator it = p->begin(); it != p->end(); ++it, ++i ) +// { +// if( (*it)->getDirName() == (*ci)->getDirName() ) +// { +// cerr << "Found ci in the collection. i:" << i +// << endl; +// } +// } +// cerr << "testing for distance now" << endl; +// Context::iterator bi = p->begin(); +// i = distance( bi, ci ); +// cerr << "testing for distance now 2" << endl; + +// } + + offset = distance( p->begin(), ci ); +// offset = 0; +// Context::iterator tmpiter = p->begin(); +// while( (*tmpiter)->getDirName() != (*ci)->getDirName() && tmpiter != p->end() ) +// { +// ++offset; +// ++tmpiter; +// } + + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(offset) ci:" << (*ci)->getURL() + << " offset:" << offset + << " end-offset:" << (distance( p->begin(), p->end())) + << endl; +// { +// for( Context::iterator dci = p->begin(); dci != p->end(); ++dci ) +// { +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(dump) dci:" << (*dci)->getURL() << endl; +// } + +// if( d->m_sortedContext ) +// { +// LG_GTKFERRIS_D << "------------------------------" << endl; +// int o2 = distance( d->m_sortedContext->begin(), ci ); +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(offset) ci:" << (*ci)->getURL() +// << " o2:" << o2 +// << endl; +// { +// Context::iterator dci = d->m_sortedContext->begin(); +// int o3 = 0; +// while( dci != ci && dci != d->m_sortedContext->end() ) +// { +// ++dci; +// ++o3; +// } +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(offset) ci:" << (*ci)->getURL() +// << " o3:" << o3 +// << endl; + +// } +// { +// Context::iterator dci = p->begin(); +// int o4 = 0; +// while( dci != ci && dci != p->end() ) +// { +// ++dci; +// ++o4; +// } +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(offset) ci:" << (*ci)->getURL() +// << " o4:" << o4 +// << endl; + +// } + +// for( Context::iterator dci = d->m_sortedContext->begin(); dci != d->m_sortedContext->end(); ++dci ) +// { +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(dump) dci:" << (*dci)->getURL() << endl; +// } +// LG_GTKFERRIS_D << "------------------------------" << endl; +// } + +// } + + + + + +// { +// offset = 0; +// Context::iterator iter = p->begin(); +// Context::iterator end = p->end(); + +// for( offset = 0; iter != end; ++iter ) +// { +// if( *iter == *ci ) +// break; +// ++offset; +// } +// if( iter == end ) +// { +// cerr << "ERROR: can't find context iterator for object in the tree!" << endl; +// BackTrace(); +// } +// } + + +// { +// fh_context tc = Resolve( d->getViewContext()->getURL() ); + +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path() " << endl +// << " p.url:" << p->getURL() << endl +// << " vc.url:" << d->getViewContext()->getURL() << endl +// << " vc.rr(url):" << tc->getURL() << endl +// << " ci.url:" << (*ci)->getURL() << endl +// << endl; +// } + + + if( path.length() ) + { + path = ":" + path; + } + path = tostr( offset ) + path; + + if( p->getURL() == d->getViewContext()->getURL() + || (*ci)->getURL() == d->getViewContext()->getURL() ) + { + break; + } + + + // Handle VirtualSoftLinks properly + if( ChainedViewContext* dc = + dynamic_cast( GetImpl(d->getViewContext()) )) + { +// if( GetImpl( p ) == GetImpl( dc->getDelegate() ) ) + if( GetImpl( p ) == deepestDelegate( dc ) ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path() is VirtualSoftLink...." + << " path:" << path + << " p:" << p->getURL() + << " given:" << (*d->TreeIterToContext( iter ))->getURL() + << " m_root:" << d->getViewContext()->getURL() + << endl; + break; + } + } + + if( !p->isParentBound() ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path() !p->isParentBound() " + << " path:" << path + << " p:" << p->getURL() + << " given:" << (*d->TreeIterToContext( iter ))->getURL() + << " m_root:" << d->getViewContext()->getURL() + << endl; + cerr << "gtk_ferris_tree_store_get_path() !p->isParentBound() " + << " path:" << path + << " p:" << p->getURL() + << " given:" << (*d->TreeIterToContext( iter ))->getURL() + << " m_root:" << d->getViewContext()->getURL() + << endl; + BackTrace(); + g_on_error_query(0); + } + + ci = toContextIterator( p ); + } + +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(dump start)" << endl; +// for( Context::iterator i = (*ci)->getParent()->begin(); +// i != (*ci)->getParent()->end(); ++i ) +// { +// LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(dump i):" << (*i)->getURL() << endl; +// } + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_path(RET) ci:" << (*ci)->getURL() + << " returning path string:" << path + << endl; + + return path.length() + ? gtk_tree_path_new_from_string( path.c_str() ) + : 0; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +/** + * get the pixbuf that describes this context's type + */ +static GdkPixbuf* +getTreeIconPixbuf( fh_context c, const std::string& n ) +{ + typedef map< string, GdkPixbuf* > cache_t; + static cache_t cache; + + LG_GTKFERRIS_D << "getTreeIconPixbuf() n:" << n << " c:" << c->getURL() << endl; + LG_GTKFERRIS_D << "rdn:" << n.substr( 0, n.length() - strlen("-pixbuf") ) << endl; + + string iconpath = getStrAttr( c, + n.substr( 0, n.length() - strlen("-pixbuf") ), + "icons://ferris-mu-file.png" ); +// cerr << "getTreeIconPixbuf() c:" << c->getURL() << " n:" << n << " icon:" << iconpath << endl; + LG_GTKFERRIS_D << " icon:" << iconpath << endl; + + cache_t::iterator iter = cache.find( iconpath ); + if( iter == cache.end() ) + { + GdkPixbuf* pb = gdk_pixbuf_new_from_file( resolveToIconPath( iconpath ).c_str(), 0 ); + iter = cache.insert( make_pair( iconpath, pb ) ).first; + } + + return iter->second; +} + + +struct ltem +{ + bool operator()( const emblems_t& e1, const emblems_t& e2) const + { + int e1sz = e1.size(); + int e2sz = e2.size(); + + if( e1sz != e2sz ) + return e1sz < e2sz; + + emblems_t::const_iterator iter1 = e1.begin(); + emblems_t::const_iterator iter2 = e2.begin(); + + for( ; iter1 != e2.end(); ++iter1, ++iter2 ) + { + string u1 = (*iter1)->getUniqueName(); + string u2 = (*iter2)->getUniqueName(); + if( u1 != u2 ) + return u1 < u2; + } + return 0; + } +}; + + +static GdkPixbuf* +getFerrisIconNamePixbuf( fh_context c ) +{ + static const int desired_width = 64; + static const int desired_height = 64; + static const GdkInterpType interp_type = GDK_INTERP_HYPER; + typedef map< string, GdkPixbuf* > cache_t; + static cache_t cache; + + cerr << "getFerrisIconNamePixbuf() c:" << c->getURL() << endl; + string iconpath = getStrAttr( c, "ferris-iconname", "icons://ferris-mu-file.png" ); + if( ends_with( iconpath, ".edj" )) + iconpath = iconpath.substr( 0, iconpath.length() - 4 ) + ".png"; + cerr << " icon:" << iconpath << endl; + + cache_t::iterator iter = cache.find( iconpath ); + if( iter == cache.end() ) + { + GdkPixbuf* pb = gdk_pixbuf_new_from_file( resolveToIconPath( iconpath ).c_str(), 0 ); + GdkPixbuf* scaled = gdk_pixbuf_scale_simple( pb, + desired_width, + desired_height, + interp_type ); + gdk_pixbuf_unref( pb ); + pb = scaled; + + iter = cache.insert( make_pair( iconpath, pb ) ).first; + } + + return iter->second; +} + + +/** + * Create a composition of all the emblems that this context has + * the emblem pixbufs are aggressively cached so that showing + * contexts should still be acceptably fast. + */ +static GdkPixbuf* +getEmblemsCompositionPixbuf( fh_context c ) +{ + static const int desired_width = 24; + static const int desired_height = 24; + static const GdkInterpType interp_type = GDK_INTERP_HYPER; + +// typedef map< fh_emblem, GdkPixbuf* > emblemPixbufs_t; +// emblemPixbufs_t emblemPixbufs; + +// if( emblemPixbufs.empty() ) +// { +// fh_etagere et = Factory::getEtagere(); +// emblems_t el = et->getAllEmblems(); +// for( emblems_t::iterator ei = el.begin(); ei != el.end(); ++ei ) +// { +// fh_emblem em = *ei; +// string iconname = resolveToIconPath( em->getIconName() ); +// GdkPixbuf* pb = gdk_pixbuf_new_from_file( iconname.c_str(), 0 ); + +// GdkPixbuf* scaled = gdk_pixbuf_scale_simple( pb, +// desired_width, +// desired_height, +// interp_type ); +// emblemPixbufs.insert( make_pair( em, scaled ) ); +// gdk_pixbuf_unref( pb ); +// } +// } + + // FIXME: medallionCache is useless at current. + typedef map< emblems_t, GdkPixbuf*, ltem > medallionCache_t; + medallionCache_t medallionCache; + +// cerr << "getEmblemsCompositionPixbuf(top) c:" << c->getURL() +// << " get-ea-med:" << getStrAttr( c, "emblem:has-medallion", "foo" ) +// << " has-medallion:" << c->hasMedallion() +// << endl; + + if( !c->hasMedallion() ) + { + return 0; + } + + emblems_t specificEmblems = c->getMedallion()->getMostSpecificEmblems(); + medallionCache_t::iterator miter = medallionCache.find( specificEmblems ); + if( medallionCache.end() != miter ) + { + return miter->second; + } + + if( specificEmblems.empty() ) + return 0; + + LG_GTKFERRIS_D << "getEmblemsCompositionPixbuf(2) c:" << c->getURL() + << " specificEmblems.sz:" << specificEmblems.size() << endl; + // + // we need to create a new horizontal composition of emblems + // and add that to the cache. + // + GdkPixbuf* pb = gdk_pixbuf_new( GDK_COLORSPACE_RGB, 1, 8, + specificEmblems.size() * desired_width, + desired_height ); + + int x_grid_offset = 0; + for( emblems_t::iterator ei = specificEmblems.begin(); ei != specificEmblems.end(); ++ei ) + { + fh_emblem em = *ei; +// GdkPixbuf* em_pixbuf = emblemPixbufs[em]; + GdkPixbuf* em_pixbuf = getEmblemListViewPixbuf( em ); + + if( em_pixbuf ) + { + gdk_pixbuf_copy_area( em_pixbuf, 0, 0, desired_width, desired_height, + pb, x_grid_offset * desired_width, 0 ); + ++x_grid_offset; + } + } + + medallionCache[ specificEmblems ] = pb; + return pb; +} + + + +static void +gtk_ferris_tree_store_get_value( GtkTreeModel *tree_model, + GtkTreeIter *iter, + gint column, + GValue *value ) +{ + g_return_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model)); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + g_return_if_fail (iter != NULL); + g_return_if_fail (VALID_ITER (iter, t)); + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_value( c:" << column << " )" << endl; + if( column < 0 || column > d->m_columnNames.size() ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_value( c:" << column << " )" + << " column number out of range." + << " size:" << d->m_columnNames.size() + << endl; + g_value_init( value, G_TYPE_STRING ); + return; + } + + const string& cn = d->getColumnName( column ); + GType gt = d->getColumnType( cn ); + + if( isColumnFixedSize( cn ) && d->m_bootstrapcount > 0 ) + { + --d->m_bootstrapcount; + LG_GTKFERRIS_D << "++++ get_value() short cut m_bootstrapcount:" << d->m_bootstrapcount << endl; + + switch( gt ) + { + case G_TYPE_STRING: + g_value_init( value, G_TYPE_STRING ); + g_value_set_string( value, "" ); + return; + case G_TYPE_BOOLEAN: + g_value_init( value, G_TYPE_BOOLEAN ); + g_value_set_boolean( value, 0 ); + return; + case G_TYPE_OBJECT: + { + static string medallion_dummyIcon = "icons://ferris-mu-medallion-max-size-filler.png"; + static GdkPixbuf* medallion_pb = gdk_pixbuf_new_from_file( resolveToIconPath( medallion_dummyIcon ).c_str(), 0 ); + static string treeicon_dummyIcon = "icons://ferris-mu-treeicon-max-size-filler.png"; + static GdkPixbuf* treeicon_pb = gdk_pixbuf_new_from_file( resolveToIconPath( treeicon_dummyIcon ).c_str(), 0 ); + + GdkPixbuf* pb = medallion_pb; + if( cn == "treeicon-pixbuf" ) + pb = treeicon_pb; + + g_value_init( value, G_TYPE_OBJECT ); + g_value_set_object( value, pb ); + return; + } + } + } + + fh_context ctx = d->toContext( iter ); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_value() cn:" << cn << " gt:" << gt << endl; + LG_GTKFERRIS_D << "gtk_ferris_tree_store_get_value() ctx:" << ctx->getDirPath() << endl; + + if( gt == G_TYPE_OBJECT ) + { + g_value_init( value, G_TYPE_OBJECT ); + + if( cn == emblems_pixbuf_cn ) + { + g_value_set_object( value, getEmblemsCompositionPixbuf( ctx ) ); + } + else if( cn == ferris_iconname_pixbuf_cn ) + { + g_value_set_object( value, getFerrisIconNamePixbuf( ctx )); + } + else + { + g_value_set_object( value, getTreeIconPixbuf( ctx, cn )); + } + return; + } + + + string s = getStrAttr( ctx, cn, "" ); + + switch( gt ) + { + case G_TYPE_STRING: + g_value_init( value, G_TYPE_STRING ); + g_value_set_string( value, s.c_str() ); + return; + case G_TYPE_BOOLEAN: + g_value_init( value, G_TYPE_BOOLEAN ); + g_value_set_boolean( value, isTrue(s) ); + return; + } +} + +/* + * Perform a lookup to get the gtk path from the current iterator + * (should be fast) and then increment the path and lookup the + * context from the new path and give that back to them. + * + * Note that using Context::items directly is not a good idea because + * other facades might have sorted/filtered the view and they don't + * always keep context::items in that order. + */ +static gboolean +gtk_ferris_tree_store_iter_next( GtkTreeModel *tree_model, GtkTreeIter *iter ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + g_return_val_if_fail (VALID_ITER (iter, t), FALSE); + +// Time::Benchmark bm( "tree_store_iter_next" ); + + Context::iterator ci = d->TreeIterToContext( iter ); + fh_context oldc = *ci; + ++ci; + + LG_GTKFERRIS_D << "iter_next(called)" +// << " n_children:" << gtk_tree_model_iter_n_children( tree_model, 0 ) + << endl; + + if( ci == oldc->getParent()->end() ) + { + LG_GTKFERRIS_D << "iter_next() found end node" + << " last:" << oldc->getURL() + << endl; +// for( Context::iterator ci = oldc->getParent()->begin(); +// ci != oldc->getParent()->end(); ++ci ) +// { +// LG_GTKFERRIS_D << " ci:" << (*ci)->getURL() << endl; +// } + InvalidateIter( iter ); + return false; + } + else + { + d->EnsureMonitoringSubContextCreationEvents( *ci ); + } + + + LG_GTKFERRIS_D << "iter_next()" + << " last:" << oldc->getURL() + << " new:" << (*ci)->getURL() + << endl; + + d->ContextToTreeIter( iter, ci ); + return true; +} + + +/* + * Note that we don't want to use context::items because it might not + * be sorted as we expect + */ +static gboolean +gtk_ferris_tree_store_iter_children( GtkTreeModel *tree_model, + GtkTreeIter *iter, + GtkTreeIter *parent ) +{ + try + { + + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + g_return_val_if_fail (VALID_ITER (parent, t), FALSE); + InvalidateIter( iter ); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children()" << endl; + +#ifdef DISABLE_SUBTREE_SUPPORT + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children(no subtree support)" << endl; + /* FIXME: DEBUG SHORT RETURN */ + return false; +#endif + + + fh_context p = d->toContext( parent ); + bool originallyHadReadDir = p->getHaveReadDir(); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children() p:" << toVoid(p) + << " p:" << p->getURL() << endl; + if( d->m_root ) + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children() root:" << toVoid(d->m_root) + << " m_root:" << d->m_root->getURL() << endl; + + if( !originallyHadReadDir ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children()" + << " originallyHadReadDir:" << originallyHadReadDir + << " p:" << p->getURL() + << endl; + d->read( p, false, false ); + + /* + * We need to monitor all directory nodes in case they go to/from + * having zero files in them + */ + for( Context::iterator i = p->begin(); i != p->end(); ++i ) + { + fh_context c = *i; + + if( toint(getStrAttr( c, "is-dir", "0" ))) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children()" + << " start monitoring subcontext" + << " c:" << c->getURL() + << endl; + d->StartMonitoringSubContext( c ); + } + } + } + + + Context::iterator childi = p->begin(); + if( childi == p->end() ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children() p:" << p->getURL() + << " has no child" << endl; + + /* Force the subcontext count guess to return 0 */ + p->read( true ); + GtkTreePath* path = gtk_tree_model_get_path( GTK_TREE_MODEL (t), parent ); + gtk_tree_model_row_has_child_toggled( GTK_TREE_MODEL (t), + path, + parent ); + gtk_tree_path_free( path ); + + return false; + } + + if( !originallyHadReadDir ) + d->AddAllNewEANames( *childi ); + + d->EnsureMonitoringSubContextCreationEvents( *childi ); + + d->ContextToTreeIter( iter, childi ); + return true; + } + catch( exception& e ) + { + stringstream ss; + ss << "Error:" << e.what() << endl; + RunErrorDialog( ss.str(), 0 ); + return false; + } +} + +static gboolean +gtk_ferris_tree_store_iter_has_child( GtkTreeModel *tree_model, + GtkTreeIter *iter ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + +#ifdef DISABLE_SUBTREE_SUPPORT + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children(no subtree support)" << endl; + /* FIXME: DEBUG SHORT RETURN */ + return false; +#endif + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_has_child()" << endl; + try + { + g_return_val_if_fail (VALID_ITER (iter, t), FALSE); + + fh_context iterc = d->toContext( iter ); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_has_child() " + << " iter:" << iterc->getDirPath() + << " m_checkDirsForChildren:" << d->m_checkDirsForChildren + << " haschild:" + << toint( getStrAttr( iterc, "has-subcontexts-guess", "1" )) + << endl; + + if( d->m_checkDirsForChildren ) + { + return iterc->begin() != iterc->end(); + } + + if( d->m_checkForExistsSubDir ) + { + LG_GTKFERRIS_D << "tree_store_iter_has_child() c:" << iterc->getURL() + << " hasSub:" << toint( getStrAttr( iterc, "exists-subdir", "1" )) + << endl; + return toint( getStrAttr( iterc, "exists-subdir", "1" )); + } + return toint( getStrAttr( iterc, "has-subcontexts-guess", "1" )); + } + catch(...) + { + } + + LG_GTKFERRIS_D << "has_child() e" << endl; + return FALSE; +} + +static gint +gtk_ferris_tree_store_iter_n_children( GtkTreeModel *tree_model, + GtkTreeIter *iter ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + +#ifdef DISABLE_SUBTREE_SUPPORT + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_children(no subtree support)" << endl; + /* FIXME: DEBUG SHORT RETURN */ + return 0; +#endif + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_n_children()" << endl; + + fh_context iterc = 0; + if( !iter ) + { + return isBound( d->getViewContext() ); + } + else + { + g_return_val_if_fail (VALID_ITER (iter, t), 0); + iterc = d->toContext( iter ); + } + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_n_children()" + << " iterc:" << iterc->getDirPath() + << endl; + try + { + int ret = distance( iterc->begin(), iterc->end() ); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_n_children() ret:" << ret << endl; + return ret; + } + catch(...) + { + return 0; + } +} + +static gboolean +gtk_ferris_tree_store_iter_nth_child( GtkTreeModel *tree_model, + GtkTreeIter *iter, + GtkTreeIter *parent, + gint n ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_nth_child( n:" << n << " )" << endl; + + InvalidateIter( iter ); + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_nth_child() " + << " n:" << n + << endl; + if( VALID_ITER (parent, t) ) + { + LG_GTKFERRIS_D << " parent:" << d->toContext( parent )->getURL() << endl; + } + + + if( !parent ) + { + LG_GTKFERRIS_D << " no parent, getting" + << " nth:" << n << " child" + << " root:" << d->getViewContext()->getURL() + << endl; + + Context::iterator ci = d->getViewContext()->begin(); + +// /////////////////////////////////////////////// +// // PURE DEBUG +// { +// LG_GTKFERRIS_D << "MANUAL distance finding..." << endl; +// Context::iterator iter = d->getViewContext()->begin(); +// Context::iterator e = d->getViewContext()->end(); +// int count = 0; +// for( ; iter != e ; ++iter ) +// { +// LG_GTKFERRIS_D << "iter:" << (*iter)->getURL() << endl; +// ++count; +// } +// LG_GTKFERRIS_D << "MANUAL distance from ci to end() is:" << count +// << " n is:" << n +// << endl; +// } + +// LG_GTKFERRIS_D << "distance from ci to end() is:" << distance( ci, d->getViewContext()->end() ) +// << " n is:" << n +// << endl; + + /* + * even though n is a 0 based index, we can't include the end() + * element + */ + if( ( !n && !d->getViewContext()->hasSubContexts() ) || + distance( ci, d->getViewContext()->end() ) < (n+1) ) + { + LG_GTKFERRIS_D << "Desired element is past the end of the collection!" + << "distance from begin() to end() is:" + << distance( ci, d->getViewContext()->end() ) + << " n is:" << n + << endl; + return FALSE; + } + + if( n ) + ci += n; + d->ContextToTreeIter( iter, ci ); + + if( ci == d->getViewContext()->end() ) + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_nth_child(ret) " + << " n:" << n + << " ERROR!!!! returning end()" + << endl; + } + else + { + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_nth_child(ret) " + << " n:" << n + << " returning:" << (*ci)->getURL() + << endl; + } + + return TRUE; + } + + if(!VALID_ITER (parent, t)) + { + cerr << "gtk_ferris_tree_store_iter_nth_child() failing. " + << " parent:" << (void*)parent + << " stamp:" << parent->stamp + << " treestamp:" << t->stamp + << " userdata:" << parent->user_data + << endl; + + g_on_error_stack_trace(NULL); + } + g_return_val_if_fail (VALID_ITER (parent, t), FALSE); + + iter->stamp = 0; + fh_context parentc = d->toContext( parent ); + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_nth_child() " + << " parentc:" << parentc->getDirPath() + << endl; + + if( distance( parentc->begin(), parentc->end() ) < n ) + return false; + + Context::iterator ci = parentc->begin(); + ci += n; + d->ContextToTreeIter( iter, ci ); + return true; +} + +static gboolean +gtk_ferris_tree_store_iter_parent( GtkTreeModel *tree_model, + GtkTreeIter *iter, + GtkTreeIter *child ) +{ + g_return_val_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model), 0); + GtkFerrisTreeStore* t = GTK_FERRIS_TREE_STORE (tree_model); + FerrisTreeModel_Impl* d = t->d; + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_parent()" << endl; + g_return_val_if_fail (VALID_ITER (child, t), FALSE); + fh_context childc = d->toContext( child ); + + InvalidateIter( iter ); + + if( childc->isParentBound() ) + { + d->ContextToTreeIter( iter, childc->getParent()); + return TRUE; + } + + LG_GTKFERRIS_D << "gtk_ferris_tree_store_iter_parent() failing iter:" << (void*)iter << endl; + return FALSE; +} + + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static void +gtk_ferris_tree_store_tree_model_init (GtkTreeModelIface *iface) +{ + iface->get_flags = gtk_ferris_tree_store_get_flags; + iface->get_n_columns = gtk_ferris_tree_store_get_n_columns; + iface->get_column_type = gtk_ferris_tree_store_get_column_type; + iface->get_iter = gtk_ferris_tree_store_get_iter; + iface->get_path = gtk_ferris_tree_store_get_path; + iface->get_value = gtk_ferris_tree_store_get_value; + iface->iter_next = gtk_ferris_tree_store_iter_next; + iface->iter_children = gtk_ferris_tree_store_iter_children; + iface->iter_has_child = gtk_ferris_tree_store_iter_has_child; + iface->iter_n_children = gtk_ferris_tree_store_iter_n_children; + iface->iter_nth_child = gtk_ferris_tree_store_iter_nth_child; + iface->iter_parent = gtk_ferris_tree_store_iter_parent; +} + +GtkType +gtk_ferris_tree_store_get_type (void) +{ + static GType tree_store_type = 0; + + if (!tree_store_type) + { + static const GTypeInfo tree_store_info = + { + sizeof (GtkFerrisTreeStoreClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_ferris_tree_store_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkFerrisTreeStore), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_ferris_tree_store_init + }; + + static const GInterfaceInfo tree_model_info = + { + (GInterfaceInitFunc) gtk_ferris_tree_store_tree_model_init, + NULL, NULL + }; + + static const GInterfaceInfo drag_source_info = + { + (GInterfaceInitFunc) gtk_ferris_tree_store_drag_source_init, + NULL, + NULL + }; + + + tree_store_type = g_type_register_static ( + G_TYPE_OBJECT, "GtkFerrisTreeStore", + &tree_store_info, GTypeFlags(0)); + + g_type_add_interface_static( tree_store_type, GTK_TYPE_TREE_MODEL, &tree_model_info); +// g_type_add_interface_static( tree_store_type, GTK_TYPE_TREE_DRAG_SOURCE, &drag_source_info); + + } + + return tree_store_type; +} + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +namespace FerrisUI +{ + +// void +// updateCell( GtkFerrisTreeStore *tree_model, +// gchar* path_string, +// gint colnum, +// string cellname, +// string newval ) +// { +// g_return_if_fail (GTK_IS_FERRIS_TREE_STORE (tree_model)); +// GtkFerrisTreeStore *t = GTK_FERRIS_TREE_STORE (tree_model); +// GtkTreeIter iter; +// GtkTreePath *path = gtk_tree_path_new_from_string (path_string); +// gtk_tree_model_get_iter( GTK_TREE_MODEL(t), &iter, path ); + +// fh_context ctx = toContext( t, path_string ); +// // cerr << "context:" << ctx->getDirPath() << endl; +// fh_attribute a = ctx->getAttribute( cellname ); +// // cerr << "have attr:" << a->getDirPath() << endl; + +// // cerr << "setting to :-->:" << newval << ":<--:" << endl; +// { +// fh_iostream ss = a->getIOStream(); +// ss << newval; +// } + + +// cerr << "done reseting..."<d = this; + } + + + + void + FerrisTreeModel_Impl::clear( fh_context parentc ) + { + LG_GTKFERRIS_D << "clear() parentc:" << parentc->getURL() << endl; + if( m_cleared ) + return; + m_cleared = true; + + LG_GTKFERRIS_D << "clear() mydistance begin to end:" + << mydistance( parentc->begin(), parentc->end() ) + << endl; + +// int removeCount = 0; +// GtkTreeIter iter; +// if( gtk_tree_model_get_iter_first( getGtkModel(), &iter ) ) +// { +// while( true ) +// { +// GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); +// gtk_tree_model_row_deleted( getGtkModel(), path ); +// gtk_tree_path_free( path ); + +// fh_context c = toContext( &iter ); +// SigCol[ c ].MedallionUpdatedConnection.disconnect(); +// ++removeCount; + +// if( !gtk_tree_model_iter_next( getGtkModel(), &iter) ) +// break; +// } +// } + + + + if( parentc->begin() == parentc->end() ) + return; + + + int removeCount = 0; + GtkTreeIter iter; + Context::iterator ci = parentc->end(); + --ci; + ContextToTreeIter( &iter, ci ); + GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); + + while( true ) + { + g_return_if_fail( path ); + + LG_GTKFERRIS_D << " clear() ci:" << (*ci)->getURL() + << " path:" << tostr(path) + << endl; + + gtk_tree_model_row_deleted( getGtkModel(), path ); + +// SigCol[ *ci ].MedallionUpdatedConnection.disconnect(); + getSignalCollection( *ci ).MedallionUpdatedConnection.disconnect(); + + if( ci == parentc->begin() ) + break; + + --ci; + gtk_tree_path_prev( path ); + ++removeCount; + } + gtk_tree_path_free( path ); + + getClearedSig().emit( this ); + m_ContextIterators.clear(); + LG_GTKFERRIS_D << " clear(complete) parent:" << parentc->getURL() + << " removeCount:" << removeCount << endl; + } + + void + FerrisTreeModel_Impl::clear() + { + if( isBound( m_root ) ) + { + clear( m_root ); + } + } + + void + FerrisTreeModel_Impl::setURL( fh_context c ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::setURL() c:" << c->getURL() << endl; + + if( m_root ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::setURL() m_root:" << m_root->getURL() << endl; + StopMonitoringSubContext( m_root ); + m_areMonitoringRoot = false; + } + + clear(); + m_url = c->getURL(); + m_root = c; + m_root_hasChanged_RecheckStatelessSchemas = true; + + m_columnNames.clear(); + UpdateColumnNames(); + } + + void + FerrisTreeModel_Impl::setURL( const std::string& s ) + { + setURL( Resolve( s ) ); + } + + void + FerrisTreeModel_Impl::OnExistsDiskRead( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, std::string newdn ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::OnExistsDiskRead() " << endl; + + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + + ++m_contextsDone; + + if( (m_contextsDone % 100) == 0 ) + { + getDiskReadProgressSig().emit( c, m_contextsDone, m_subContextCountGuess ); + } + +// EnsureMonitoringSubContextCreationEvents( subc ); + } + + void + FerrisTreeModel_Impl::populateModelFromContext( fh_context c, bool isRoot ) + { + ImplicitIteratorUpdateLock ciLock; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::populateModelFromContext() isRoot:" << isRoot + << " c:" << c->getURL() + << endl; + + /* + * Add all the data to the gtk model + */ + m_contextsDone = 0; + getStartReadingSig().emit( c ); + GtkTreePath* path = gtk_tree_path_new_first(); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::populateModelFromContext(2) isRoot:" << isRoot << endl; + if( !isRoot ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::populateModelFromContext(3) isRoot:" << isRoot << endl; + Context::iterator ci = toContextIterator( c ); + GtkTreeIter giter = toTreeIter( ci ); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::populateModelFromContext(3.d)" + << " c:" << c->getURL() + << " ci:" << ci->getURL() + << endl; + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::populateModelFromContext(4) isRoot:" << isRoot << endl; + path = gtk_ferris_tree_store_get_path( getGtkModel(), &giter ); + + if( !path ) + { + LG_GTKFERRIS_D << "Asked to expand a context that a path in the tree can not be found for!" << endl; + } + gtk_tree_path_down(path); + LG_GTKFERRIS_D << "populateModelFromContext() path:" << tostr(path) << endl; + } + + LG_GTKFERRIS_D << "populateModelFromContext(got path) url:" << c->getURL() + << " path:" << tostr(path) + << endl; + int totalItems = 0; + + { +// cerr << "ADDING ENTRIES,START" << endl; +// Time::Benchmark bm("Adding entries"); + + Context::iterator e = c->end(); + for( Context::iterator ci = c->begin(); ci != e; ++ci ) + { + LG_GTKFERRIS_D << "populateModelFromContext(adding) url:" << (*ci)->getURL() + << " path:" << tostr(path) + << endl; + GtkTreeIter iter; + ContextToTreeIter( &iter, ci, false ); + add( ci, &iter, path ); + gtk_tree_path_next( path ); + ++totalItems; + } + +// cerr << "ADDING ENTRIES,DONE" << endl; + } + gtk_tree_path_free( path ); + getStopReadingSig().emit( c ); + LG_GTKFERRIS_D << "populateModelFromContext(done) url:" << c->getURL() + << " totalItems:" << totalItems + << endl; + + } + + + + void + FerrisTreeModel_Impl::read( fh_context c, bool isRoot, bool force ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::read(3param) m_root:" << toVoid(m_root) + << " root-url:" << m_root->getURL() << endl; + +// if( force ) + clear(); + m_subContextCountGuess = c->guessSize(); + m_contextsDone = 0; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::read() url:" << c->getURL() + << " filter:" << m_filterString + << " sorter:" << m_sortingString + << endl; + + /* Read the disk and propergate */ + getStartReadingDiskSig().emit( c ); + sigc::connection DiskReadConnection = + c->getNamingEvent_Exists_Sig().connect( + sigc::mem_fun( *this, &_Self::OnExistsDiskRead )); + c->read( force ); + DiskReadConnection.disconnect(); + getStopReadingDiskSig().emit( c ); + + /* + * We never bootstrap shortcut the name column because it could be any size + */ + m_bootstrapcount = m_viewIsBootstrappingNCols * c->SubContextCount(); + LG_GTKFERRIS_D << "read() c:" << c->getURL() + << " setting m_bootstrapcount:" << m_bootstrapcount + << " for m_viewIsBootstrappingNCols:" << m_viewIsBootstrappingNCols + << " and c->SubContextCount():" << c->SubContextCount() + << endl; + + if( isRoot ) + { + /* Make sure the root is set */ + setRoot( c ); + } + + + /** + * PURE DEBUG + * Assert that we are not filtering / sorting a sorted context + */ + { + if( SortedContext* sc = dynamic_cast( GetImpl(c) )) + { + cerr << "WARNING: possible NESTING ERROR Attempt to wrap a sorted context!" << endl; + } + } + + /* + * filter the view + */ + getFilterStartedSig().emit( c ); + if( !m_filterString.empty() ) + { + fh_context filter = Factory::MakeFilter( m_filterString ); + m_filteredContext = Factory::MakeFilteredContext( c, filter ); + + /* + * We have to read the base context before we drop our handle + * to it + */ + c->read(); + c = m_filteredContext; + } + else + { + m_filteredContext = 0; + } + + + + /* + * Sort the view + */ + getSortStartedSig().emit( c ); + if( m_sortingString.length() ) + { + c->read(); + m_sortedContext = Factory::MakeSortedContext( c, m_sortingString ); + c = m_sortedContext; + } + else + { + m_sortedContext = 0; + } + +// cerr << "Calling populateModelFromContext() c:" << c->getURL() << endl; + populateModelFromContext( c, isRoot ); +// cerr << "Done calling populateModelFromContext() c:" << c->getURL() << endl; + + if( !m_areMonitoringRoot ) + { + m_areMonitoringRoot = true; + StartMonitoringSubContext( c ); + } + } + + + void + FerrisTreeModel_Impl::read( bool force ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::read(before) m_root:" << toVoid(m_root) + << " root-url:" << m_root->getURL() + << " vc:" << getViewContext() + << " vc-url:" << getViewContext()->getURL() + << endl; + + read( m_root, true, force ); + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::read(after) m_root:" << toVoid(m_root) + << " root-url:" << m_root->getURL() + << " vc:" << getViewContext() + << " vc-url:" << getViewContext()->getURL() + << endl; + } + + + + std::string + FerrisTreeModel_Impl::getURL() + { + return m_url; + } + + fh_context + FerrisTreeModel_Impl::getRootContext() + { + return getViewContext(); + } + + + + GtkTreeModel* + FerrisTreeModel_Impl::getGtkModel() + { + return GTK_TREE_MODEL( m_gtkModel ); + } + + void + FerrisTreeModel_Impl::EnsureMonitoringSubContextCreationEvents( fh_context c, bool force ) + { + if( !force ) + { + if( !m_checkDirsForChildren ) + { + return; + } + } + + + LG_GTKFERRIS_D << "EnsureMonitoringSubContextCreationEvents()" + << " monitoring c:" << c->getURL() + << endl; + + SignalCollectionCreation& sigs = getSignalCollectionCreation( c ); + if( !sigs.ref_count ) + { + sigs.CreatedConnection = c->getNamingEvent_Created_Sig(). + connect( sigc::mem_fun( *this, &_Self::OnCreated )); + sigs.ref_count++; + } + } + + + + void + FerrisTreeModel_Impl::StartMonitoringSubContext( fh_context c ) + { + SignalCollection& sigs = getSignalCollection( c ); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::StartMonitoringSubContext()" + << " c:" << c->getURL() + << " rc:" << sigs.ref_count + << endl; + + if( !sigs.ref_count ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::StartMonitoringSubContext()" + << " c:" << c->getURL() + << " rc was 0" + << endl; + + sigs.ChangedConnection = c->getNamingEvent_Changed_Sig() + .connect( sigc::mem_fun( *this, &_Self::OnChanged )); + + EnsureMonitoringSubContextCreationEvents( c, true ); +// sigs.CreatedConnection = c->getNamingEvent_Created_Sig(). +// connect( sigc::mem_fun( *this, &_Self::OnCreated )); + + sigs.DeletedConnection = c->getNamingEvent_Deleted_Sig(). + connect( sigc::mem_fun( *this, &_Self::OnDeleted )); + + sigs.MovedConnection = c->getNamingEvent_Moved_Sig() + .connect( sigc::mem_fun( *this, &_Self::OnMoved )); + +// sigs.ChangedConnection = c->getNamingEvent_Exists_Sig(). +// connect( sigc::mem_fun( *this, &_Self::OnExists )); + } + + sigs.ref_count++; + } + + void + FerrisTreeModel_Impl::StopMonitoringSubContext( fh_context c ) + { + LG_GTKFERRIS_D << "StopMonitoringSubContext(top) c.addr:" << toVoid(c) << endl; + + if( !c ) + return; + + LG_GTKFERRIS_D << "StopMonitoringSubContext(1) c:" << c->getURL() << endl; + +// SigCol_t::iterator iter = SigCol.find(c); + SigCol_t::iterator iter = findSignalCollection( c ); + + LG_GTKFERRIS_D << "StopMonitoringSubContext(2) c:" << c->getURL() << endl; + + // + // this is bad. + // + if( iter == SigCol.end() ) + { + LG_GTKFERRIS_ER << "StopMonitoringSubContext(2.b) BAD! not found c:" << GetImpl(c) << endl; + if( ChainedViewContext* cvc = dynamic_cast(GetImpl(c))) + LG_GTKFERRIS_ER << " ddel:" << deepestDelegate( cvc ) << endl; + { + fh_stringstream ss; + c->dumpRefDebugData( ss ); + LG_GTKFERRIS_ER << " DBG:" << tostr(ss) + << " SigCol.sz:" << SigCol.size() + << endl; + } + for( SigCol_t::iterator iter = SigCol.begin(); iter != SigCol.end(); ++iter ) + { + fh_stringstream ss; + fh_context c = iter->first; +// fh_context c = Resolve(iter->first); + LG_GTKFERRIS_I << "StopMonitoringSubContext(2.c) iter... " + << " c:" << GetImpl(c) << endl; + if( ChainedViewContext* cvc = dynamic_cast(GetImpl(c))) + LG_GTKFERRIS_I << " ddel:" << deepestDelegate( cvc ) << endl; + + c->dumpRefDebugData( ss ); + LG_GTKFERRIS_ER << " DBG:" << tostr(ss) + << " SigCol.sz:" << SigCol.size() + << endl; + } + } + + if( iter != SigCol.end() ) + { + SignalCollection& sigs = iter->second; + + LG_GTKFERRIS_D << "StopMonitoringSubContext(3) c:" << c->getURL() + << " SigCol[c].ref_count:" << sigs.ref_count + << endl; + sigs.ref_count--; + if( !sigs.ref_count ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::StopMonitoringSubContext()" + << " c:" << c->getURL() << endl; +// sigs.ExistsConnection.disconnect(); +// sigs.CreatedConnection.disconnect(); + sigs.ChangedConnection.disconnect(); + sigs.DeletedConnection.disconnect(); + } + } + + // Creation signal is in another group. + { + SigColCreation_t::iterator iter = findSignalCollectionCreation( c ); + if( iter != SigColCreation.end() ) + { + SignalCollectionCreation& sigs = iter->second; + sigs.ref_count--; + if( !sigs.ref_count ) + { + sigs.CreatedConnection.disconnect(); + } + } + } + } + + void + FerrisTreeModel_Impl::OnExists ( NamingEvent_Exists* ev, + const fh_context& subc, + std::string olddn, + std::string newdn ) + { + + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::OnExists c:" << c->getURL() + << " subc:" << subc->getURL() + << endl; + add( subc ); + } + + void + FerrisTreeModel_Impl::OnCreated( NamingEvent_Created* ev, + const fh_context& subc, + std::string olddn, + std::string newdn ) + { + ImplicitIteratorUpdateLock l; + + fh_context c = ev->getSource(); +// fh_context subc = c->getSubContext(newdn); + LG_GTKFERRIS_D << "WATCH FerrisTreeModel_Impl::OnCreated c:" << GetImpl(c) + << " c:" << c->getURL() + << " subc:" << subc->getURL() + << " c-is-subc(rdn)-bound:" << c->priv_isSubContextBound( subc->getDirName() ) + << endl; + add( subc ); + + + +///// EnsureMonitoringSubContextCreationEvents( subc ); + +// { +// fh_context nc = c->getSubContext( subc->getDirName() ); + +// // cerr << "Dumping subc:" << endl; +// // subc->dumpRefDebugData( Factory::fcerr() ); +// // cerr << "Dumping nc:" << endl; +// // subc->dumpRefDebugData( Factory::fcerr() ); + +// LG_GTKFERRIS_D << "WATCH nc:" << GetImpl(nc) +// << endl; +// GtkTreeIter iter; +// ContextToTreeIter( &iter, nc ); +// LG_GTKFERRIS_D << "WATCH2 nc:" << GetImpl(nc) +// << endl; +// add( TreeIterToContext( &iter ) ); +// LG_GTKFERRIS_D << "WATCH3 nc:" << GetImpl(nc) +// << endl; +// } + } + + void + FerrisTreeModel_Impl::OnMedallionUpdated( fh_context c ) + { + cerr << "FerrisTreeModel_Impl::OnMedallionUpdated() c:" << c->getURL() << endl; + + GtkTreeIter iter = toTreeIter( c ); + GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); + g_return_if_fail( path ); + gtk_tree_model_row_changed( getGtkModel(), path, &iter ); + gtk_tree_path_free( path ); + } + + void + FerrisTreeModel_Impl::OnChanged( NamingEvent_Changed* ev, + std::string olddn, + std::string newdn ) + { + fh_context c = ev->getSource(); +// LG_GTKFERRIS_D << "+++++ Changed c:" << c->getURL() +// << " olddn:" << olddn +// << endl; + +// if( m_root ) +// { +// LG_GTKFERRIS_D << "+++ m_root:" << m_root->getURL() +// << endl; +// } + + + if( c == m_root + || c == m_filteredContext + || c == m_sortedContext + || ( m_root && c->getURL() == m_root->getURL() ) + ) + { + // Handle the root changing in a different manner + } + else if( m_root && c->getURL().length() < m_root->getURL().length() ) + { + // Notification for a context that is a parent of the root + } + else + { + cerr << "+++++ Changed c:" << c->getURL() + << " olddn:" << olddn + << endl; + BackTrace(); + + GtkTreeIter iter = toTreeIter( c ); + GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); + g_return_if_fail( path ); + +#ifndef GTK_SUBTREE_IS_BUGGY + gtk_tree_model_row_has_child_toggled( getGtkModel(), path, &iter ); +#endif + gtk_tree_model_row_changed( getGtkModel(), path, &iter ); + + gtk_tree_path_free( path ); + } + } + + void + FerrisTreeModel_Impl::OnMoved( NamingEvent_Moved* ev, std::string olddn, std::string newdn ) + { + fh_context rc = ev->getSource(); + fh_context c = rc->getSubContext(olddn); + cout << "FerrisTreeModel_Impl::OnMoved() c:" << c->getURL() << endl; + + } + + void + FerrisTreeModel_Impl::OnDeleted( NamingEvent_Deleted* ev, + std::string olddn, + std::string newdn ) + { + fh_context rc = ev->getSource(); + if( rc->isSubContextBound( olddn ) ) + { + fh_context c = rc->getSubContext(olddn); + cout << "FerrisTreeModel_Impl::OnDeleted() c:" << c->getURL() << endl; + + GtkTreeIter iter = toTreeIter( c ); + GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); + g_return_if_fail( path ); + + LG_GTKFERRIS_D << "WATCH REMOVE() " + << " url:" << c->getURL() + << " path:" << tostr(path) + << endl; + getRemovingContextSig().emit( c ); + gtk_tree_model_row_deleted( getGtkModel(), path ); + gtk_tree_path_free( path ); + } + } + + Context::iterator + FerrisTreeModel_Impl::TreeIterToContext( GtkTreeIter *iter ) + { + if( iter->user_data2 ) + { + Context::iterator* cip = (Context::iterator*)iter->user_data2; + return *cip; + } + + cerr << "WARNING: FerrisTreeModel_Impl::TreeIterToContext(using slow)" << endl; + + Context* cp = (Context*)( iter->user_data ); +// LG_GTKFERRIS_D << "TreeIterToContext() cp:" << ((void*)cp) << endl; +// LG_GTKFERRIS_D << "TreeIterToContext() cp:" << cp->getURL() << endl; + Context::iterator ci = m_ContextIterators[cp]; + +// LG_GTKFERRIS_D << "TreeIterToContext() ci:" << (*ci)->getURL() << endl; + return ci; + } + + void + FerrisTreeModel_Impl::ContextToTreeIter( GtkTreeIter *iter, Context::iterator ci, bool checkExistsInContextIterators ) + { + Context* cp = GetImpl( *ci ); + InvalidateIter( iter ); + + if( checkExistsInContextIterators ) + { + ContextIterators_t::iterator tmp = m_ContextIterators.find( cp ); + if( m_ContextIterators.end() != tmp ) + { + iter->stamp = m_gtkModel->stamp; + iter->user_data = (void*)cp; + iter->user_data2 = (void*)&tmp->second; + return; + } + } + + ContextIterators_t::iterator ins_iter + = m_ContextIterators.insert( make_pair( cp, ci )).first; + +// LG_GTKFERRIS_D << "ContextToTreeIter(ci) cp void*:" << ((void*)cp) << endl; +// LG_GTKFERRIS_D << "ContextToTreeIter(ci) cp:" << cp->getURL() << endl; +// LG_GTKFERRIS_D << "ContextToTreeIter(ci) ci:" << (*ci)->getURL() << endl; + + iter->stamp = m_gtkModel->stamp; + iter->user_data = (void*)cp; + iter->user_data2 = (void*)&ins_iter->second; + } + + + void + FerrisTreeModel_Impl::ContextToTreeIter( GtkTreeIter *iter, Context::iterator ci ) + { + ContextToTreeIter( iter, ci, true ); + } + + void + FerrisTreeModel_Impl::ContextToTreeIter( GtkTreeIter *iter, fh_context c ) + { +// cerr << "FerrisTreeModel_Impl::ContextToTreeIter() c:" << c->getURL() +// << " has p:" << c->isParentBound() +// << endl; + fh_context p = c->getParent(); + string rdn = c->getDirName(); + + if( m_sortedContext && p->getURL() == m_sortedContext->getURL() ) + { + p = m_sortedContext; + c = p->getSubContext( c->getDirName() ); + } + + + +// cerr << "ContextToTreeIter(ctx) c:" << c->getURL() +// << " p:" << p->getURL() +// << " caddr:" << toVoid(GetImpl(c)) +// << " paddr:" << toVoid(GetImpl(p)) +// << endl; +// BackTrace(); + + Context::iterator ci = Ferris::toContextIterator( c ); + if( ci == p->end() ) + { + cerr << "A VERY BAD THING, CAN NOT FIND THE CONTEXT ITERATOR FOR A\n" + << "GIVEN CONTEXT. BAD THINGS WILL SOON HAPPEN" + << endl; + g_on_error_stack_trace(NULL); + } + + ContextToTreeIter( iter, ci ); + } + + GtkTreeIter + FerrisTreeModel_Impl::toTreeIter( Context::iterator ci ) + { + static GtkTreeIter iter; + ContextToTreeIter( &iter, ci ); + return iter; + } + + GtkTreeIter + FerrisTreeModel_Impl::toTreeIter( fh_context c ) + { + static GtkTreeIter iter; + ContextToTreeIter( &iter, c ); + return iter; + } + + + void + FerrisTreeModel_Impl::UpdateColumnNames() + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(called)" << endl; + if( !isBound( m_root ) ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(returning) m_root not set." << endl; + return; + } + + if( !m_columnNames.empty() ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames() m_columnNames already populated." << endl; + return; + } + + if( !m_staticColumnNames.empty() ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames() using a static column name list.." << endl; + m_columnNames = m_staticColumnNames; + return; + } + + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(starting)" << endl; + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames() m_root:" << m_root->getURL() << endl; + fh_context rc = m_root; + try + { + set unionset; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(getting ea-names)" << endl; + addEAToSet( unionset, getStrAttr( rc, "ea-names", "" )); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(getting ea-names-union-view)" << endl; + addEAToSet( unionset, getStrAttr( rc, "recommended-ea-union-view", "" )); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::UpdateColumnNames(getting fixed additions)" << endl; + addEAToSet( unionset, getEDBString( FDB_GENERAL, + CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_K, + CFG_ATTRIBUTES_ALWAYS_IN_UI_MODEL_DEFAULT )); + unionset.insert( treeicon_pixbuf_cn ); + unionset.insert( emblems_pixbuf_cn ); + unionset.insert( ferris_iconname_pixbuf_cn ); + m_columnNames.clear(); + m_columnNames.reserve( unionset.size() ); + copy( unionset.begin(), unionset.end(), back_inserter( m_columnNames )); + } + catch( exception& e ) + { + LG_GTKFERRIS_D << "error adding column data for ctx:" << rc->getURL() << endl; + } + + LG_GTKFERRIS_D << "UpdateColumnNames() m_columnNames.size:" << m_columnNames.size() + << endl; + } + + /** + * Note that what is already in m_columnNames must remain in its current position. + */ + void + FerrisTreeModel_Impl::AddAllNewEANames( fh_context c ) + { + if( !m_staticColumnNames.empty() ) + return; + +// BackTrace(); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::AddAllNewEANames c:" << c->getURL() << endl; + typedef columnNames_t cn_t; + cn_t newcn; + string s; + + set unionset; + set rawset; + unionset.insert( m_columnNames.begin(), m_columnNames.end() ); + rawset.insert( m_columnNames.begin(), m_columnNames.end() ); + + addEAToSet( unionset, getStrAttr( c, "ea-names", "" )); + addEAToSet( unionset, getStrAttr( c, "recommended-ea-union-view", "" )); + + set_difference( unionset.begin(), unionset.end(), + rawset.begin(), rawset.end(), + back_inserter( m_columnNames ) ); + } + + + GType + FerrisTreeModel_Impl::getColumnType( const string& cn ) + { + typedef set strset_t; + static strset_t boolset; + static Util::SingleShot virgin; + if( virgin() ) + { + boolset.insert("ferris-handles-urls"); + boolset.insert("ferris-opens-many"); + boolset.insert("ferris-ignore-selection"); + } + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::getColumnType(begin) cn:" << cn << endl; + + // + // After m_root is set to something else it will set + // m_root_hasChanged_RecheckStatelessSchemas for us. + // We then rebuild the cache of which columns use different + // GTypes than string for use later + // + if( isBound(m_root) && m_root_hasChanged_RecheckStatelessSchemas ) + { + m_root_hasChanged_RecheckStatelessSchemas = false; + + m_columnTypeMap.clear(); + + int StatelessEACount = 0; + for( columnNames_t::iterator cni = m_columnNames.begin(); + cni != m_columnNames.end(); ++cni ) + { + try + { + string eaname = *cni; +// cerr << "FerrisTreeModel_Impl::getColumnType(iter) eaname:" << eaname << endl; + if( starts_with( eaname, "schema:" )) + continue; + + if( starts_with( eaname, "emblem:has-fuzzy-" )) + { + m_columnTypeMap[ eaname ] = G_TYPE_STRING; + continue; + } + if( starts_with( eaname, "emblem:has-" )) + { + m_columnTypeMap[ eaname ] = G_TYPE_BOOLEAN; + continue; + } + if( starts_with( eaname, "emblem:" )) + { + m_columnTypeMap[ eaname ] = G_TYPE_STRING; + continue; + } + + if( m_root->isStatelessAttributeBound( eaname ) ) + { + ++StatelessEACount; + + XSDBasic_t sct = getSchemaType( m_root, eaname, XSD_UNKNOWN ); + sct = maskOffXSDMeta( sct ); + + if( sct == XSD_BASIC_BOOL ) + { + m_columnTypeMap[ eaname ] = G_TYPE_BOOLEAN; + } + } + } + catch(...) + { + } + } + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::getColumnType(made cache)" + << " StatelessEACount:" << StatelessEACount << endl; + } + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::getColumnType(end) cn:" << cn << endl; + + if( boolset.end() != boolset.find( cn ) ) + return G_TYPE_BOOLEAN; + + if( m_columnTypeMap.end() != m_columnTypeMap.find( cn ) ) + { + return G_TYPE_BOOLEAN; + } + + if( cn == treeicon_pixbuf_cn ) + return G_TYPE_OBJECT; + if( cn == emblems_pixbuf_cn ) + return G_TYPE_OBJECT; + if( cn == ferris_iconname_pixbuf_cn ) + return G_TYPE_OBJECT; + + return G_TYPE_STRING; + } + + GType + FerrisTreeModel_Impl::getColumnType( int index ) + { + return getColumnType( getColumnName( index ) ); + } + + const string& + FerrisTreeModel_Impl::getColumnName( int index ) + { + return m_columnNames[index]; + } + + gint + FerrisTreeModel_Impl::getColumnNumber( const std::string& s ) + { + UpdateColumnNames(); + columnNames_t an = m_columnNames; + int i=0; + +// for( columnNames_t::const_iterator iter = an.begin(); iter != an.end(); ++iter, ++i ) +// { +// LG_GTKFERRIS_D << "getColumnNumber() s:" << s << " iter:" << *iter << endl; +// } + + for( columnNames_t::const_iterator iter = an.begin(); iter != an.end(); ++iter, ++i ) + { + if( *iter == s ) + { + return i; + } + } + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::getColumnNumber() HAS FAILED TO FIND COLUMN:" << s << endl; + for( columnNames_t::const_iterator iter = an.begin(); iter != an.end(); ++iter, ++i ) + { + LG_GTKFERRIS_D << " iter: " << *iter << endl; + } + + + return -1; + } + + + /** + * Get the context that is at iter + */ + fh_context + FerrisTreeModel_Impl::toContext( GtkTreeIter *iter ) + { + return *TreeIterToContext( iter ); + } + + fh_context + FerrisTreeModel_Impl::toContext( GtkTreePath* path ) + { + GtkTreeIter iter; + gtk_tree_model_get_iter( getGtkModel(), &iter, path ); + fh_context ret = toContext( &iter ); + return ret; + } + + + /** + * get the context that is at a given path + */ + fh_context + FerrisTreeModel_Impl::toContext( gchar* path_string ) + { + GtkTreeIter iter; + GtkTreePath *path = gtk_tree_path_new_from_string (path_string); + gtk_tree_model_get_iter( getGtkModel(), &iter, path ); + fh_context ret = toContext( &iter ); + gtk_tree_path_free( path ); + return ret; + } + + void + FerrisTreeModel_Impl::setRoot( fh_context c ) + { + if( isBound( m_root ) ) + return; + + LG_GTKFERRIS_D << "SETROOT() ++++++------++++++ c:" << c->getURL() << endl; + + m_root = c; + m_root_hasChanged_RecheckStatelessSchemas = true; + +// GtkTreeIter iter; +// iter.stamp = m_gtkModel->stamp; +// iter.user_data = 0; +// iter.user_data2 = 0; +// iter.user_data3 = 0; + +// GtkTreePath* path = gtk_tree_path_new_from_string ("0"); +// if( !path ) +// { +// LG_GTKFERRIS_D << "failing c:" << c->getURL() << endl; +// g_return_if_fail( path ); +// } +// gtk_tree_model_row_inserted( getGtkModel(), path, &iter ); +// gtk_tree_path_free( path ); + } + + void + FerrisTreeModel_Impl::add( Context::iterator ci, GtkTreeIter* iter, GtkTreePath* path ) + { +// LG_GTKFERRIS_D << "FerrisTreeModel_Impl::add(top) c:" << (*ci)->getURL() << endl; + + /* Make sure the root is set */ + setRoot( ci->getParent() ); + + if( !path ) + { + cerr << "failing c:" << (*ci)->getURL() << endl; + g_return_if_fail( path ); + } + +// LG_GTKFERRIS_D << "FerrisTreeModel_Impl::add(pre signal) c:" << (*ci)->getURL() << endl; + ++m_contextsDone; + if( (m_contextsDone % m_addingContextSignalModulas) == 0 ) + { + getAddingContextProgressSig().emit( *ci, m_contextsDone, m_subContextCountGuess ); + } + + + getAddingContextSig().emit( *ci, m_contextsDone, m_subContextCountGuess ); + +// LG_GTKFERRIS_D << "FerrisTreeModel_Impl::add(post signal) c:" << (*ci)->getURL() << endl; + cerr << "WATCH INSERT add() context:" << (*ci)->getURL() + << " at path:" << tostr(path) + << endl; + + gtk_tree_model_row_inserted( getGtkModel(), path, iter ); + m_cleared = false; + + + getSignalCollection( *ci ).MedallionUpdatedConnection + = (*ci)->getNamingEvent_MedallionUpdated_Sig().connect( sigc::mem_fun( *this, &_Self::OnMedallionUpdated ) ); + + EnsureMonitoringSubContextCreationEvents( *ci ); + + + // + // at rh9/gtk2.2 commented this chunk out + // +// #ifndef GTK_SUBTREE_IS_BUGGY +// LG_GTKFERRIS_D << "FerrisTreeModel_Impl::add() context:" << (*ci)->getURL() +// << " at path:" << tostr(path) +// << " doing subtree work" +// << endl; +// if( m_root != *ci && toint( getStrAttr( *ci, "has-subcontexts-guess", "1" ))) +// gtk_tree_model_row_has_child_toggled( getGtkModel(), path, iter ); +// #endif + +// LG_GTKFERRIS_D << "FerrisTreeModel_Impl::add(exit) context:" << (*ci)->getURL() +// << endl; + } + + void + FerrisTreeModel_Impl::add( Context::iterator ci ) + { + LG_GTKFERRIS_D << "add(top) c:" << (*ci)->getURL() << endl; + + /* Make sure the root is set */ + setRoot( ci->getParent() ); + + GtkTreeIter iter = toTreeIter( ci ); + GtkTreePath* path = gtk_tree_model_get_path( getGtkModel(), &iter ); + +// cerr << "add() ci:" << (*ci)->getURL() << " path:" << tostr(path) << endl; + + add( ci, &iter, path ); + gtk_tree_path_free( path ); + } + + void + FerrisTreeModel_Impl::add( fh_context c ) + { + GtkTreeIter iter; + ContextToTreeIter( &iter, c ); + add( TreeIterToContext( &iter ) ); + } + + fh_context + FerrisTreeModel_Impl::getViewContext() + { + if( isBound( m_sortedContext )) + { + return m_sortedContext; + } + if( isBound( m_filteredContext )) + { + return m_filteredContext; + } + return m_root; + } + + + std::string + FerrisTreeModel_Impl::getSortingString() + { + return m_sortingString; + } + + void + FerrisTreeModel_Impl::setSortingString( const std::string& s, bool revalidate ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::setSortingString s:" << s << endl; + + if( s == "" || s == "name" || s == "(name)" ) + { + if( !isBound( m_sortedContext ) ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::setSortingString m_sortedContext not bound" << endl; + return; + } + } + + m_sortingString = s; + if( m_sortingString == "" || m_sortingString == "name" ) + m_sortingString = "(name)"; + + if( revalidate ) + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::setSortingString() revalidate" << endl; + updateViewForSorting(); + } + } + + void + FerrisTreeModel_Impl::updateViewForSorting() + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(1)" << endl; + + if( !isBound( m_root )) + return; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(2)" << endl; + + fh_context bc = m_root; + if( isBound(m_filteredContext) ) + bc = m_filteredContext; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting() " + << " m_root:" << toVoid( m_root ) + << " bc:" << toVoid( bc ) + << " m_filteredContext:" << toVoid( m_filteredContext ) + << " m_sorted:" << toVoid( m_sortedContext ) + << endl; + + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(1) m_sortingString:" + << m_sortingString << endl; + bc->read(); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(1.b) m_sortingString:" + << m_sortingString << endl; + + fh_context c = Factory::MakeSortedContext( bc, m_sortingString ); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(1.c)" << endl; + StopMonitoringSubContext( getViewContext() ); + m_areMonitoringRoot = false; + m_sortedContext = c; + StartMonitoringSubContext( c ); + + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(2)" << endl; + m_sortedContext->read(); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(3)" << endl; + + clear(); + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForSorting(4)" << endl; + + populateModelFromContext( m_sortedContext, true ); + } + + + std::string + FerrisTreeModel_Impl::getFilterString() + { + return m_filterString; + } + + /** + * Set the new filter to use for this view. If this fails then the old + * filter is applied again. + */ + void + FerrisTreeModel_Impl::setFilterString( const std::string& s, bool revalidate ) + { +// if( s == "" ) +// return; + + string oldfilter = m_filterString; + try + { +// cerr << "FerrisTreeModel_Impl::setFilterString(top)" +// << " m_root:" << toVoid( m_root ) +// << " m_root.rc:" << m_root->getReferenceCount() +// << " m_filteredContext:" << toVoid( m_filteredContext ) +// << " m_sorted:" << toVoid( m_sortedContext ) +// << endl; +// m_root->read(); +// cerr << "FerrisTreeModel_Impl::setFilterString(top.2)" +// << " m_root:" << toVoid( m_root ) +// << " m_root.rc:" << m_root->getReferenceCount() +// << " m_filteredContext:" << toVoid( m_filteredContext ) +// << " m_sorted:" << toVoid( m_sortedContext ) +// << endl; + + m_filterString = s; + if( revalidate && m_root ) + updateViewForFiltering(); + } + catch( exception& e ) + { + m_filterString = oldfilter; + + if( revalidate ) + updateViewForFiltering(); + + throw; + } + } + + + void + FerrisTreeModel_Impl::updateViewForFiltering() + { + if( !isBound( m_root )) + return; + + LG_GTKFERRIS_D << "updateViewForFiltering() root:" << m_root->getURL() << endl; + + if( m_filterString.empty() ) + { + m_filteredContext = 0; + + if( isBound(m_sortedContext) ) + { + updateViewForSorting(); + } + else + { + StopMonitoringSubContext( m_filteredContext ); + m_areMonitoringRoot = false; + StartMonitoringSubContext( m_root ); + clear(); + populateModelFromContext( m_root, true ); + } + return; + } + + fh_context bc = m_root; + + + fh_context filter = Factory::MakeFilter( m_filterString ); + StopMonitoringSubContext( m_filteredContext ); + m_areMonitoringRoot = false; + m_filteredContext = Factory::MakeFilteredContext( m_root, filter ); + StartMonitoringSubContext( m_filteredContext ); + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForFiltering(top)" << endl; + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForFiltering() m_filterString:" << m_filterString << endl; + + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForFiltering() m_root:" + << (void*)GetImpl(m_root) << endl; + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForFiltering() m_filteredContext:" + << (void*)GetImpl(m_filteredContext) << endl; + + for( Context::iterator ci = m_root->begin(); ci != m_root->end(); ++ci ) + { + LG_GTKFERRIS_D << "updateViewForFiltering(root ci) ci:" << (*ci)->getURL() << endl; + } + + for( Context::iterator ci = m_filteredContext->begin(); ci != m_filteredContext->end(); ++ci ) + { + LG_GTKFERRIS_D << "updateViewForFiltering(filter ci) ci:" << (*ci)->getURL() << endl; + } + + if( isBound(m_sortedContext) ) + { + LG_GTKFERRIS_D << "updateViewForFiltering() Sorted is bound!" << endl; + updateViewForSorting(); + } + else + { + LG_GTKFERRIS_D << "FerrisTreeModel_Impl::updateViewForFiltering() clear and set to m_filtered" << endl; + clear(); + populateModelFromContext( m_filteredContext, true ); + } + + } + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + namespace FactoryUI + { + fh_ftreemodel CreateTreeModel() + { + return new FerrisTreeModel_Impl(); + } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + +}; diff --git a/FerrisUI/gtkferristreestore.hh b/FerrisUI/gtkferristreestore.hh new file mode 100644 index 0000000..bff6230 --- /dev/null +++ b/FerrisUI/gtkferristreestore.hh @@ -0,0 +1,257 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris context tree store + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: gtkferristreestore.hh,v 1.5 2010/09/24 21:31:07 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef __GTK_FERRIS_TREE_STORE_H__ +#define __GTK_FERRIS_TREE_STORE_H__ + +#include + +#include +#include +#include + +#include +#include +#include +#include + + +#include +#include + +namespace FerrisUI +{ + using namespace Ferris; + class FerrisTreeModel; + + FERRIS_SMARTPTR( FerrisTreeModel, fh_ftreemodel ); + + namespace FactoryUI + { + /** + * Create a FerrisTreeModel. This method will return a subclass + * of the abstract class FerrisTreeModel (keeps data in .cpp file) + */ + FERRISEXP_API fh_ftreemodel CreateTreeModel(); + }; + + /** + * A little hack for bootstrapping the tree slightly faster + * + * A view should count up the number of columns that it is viewing that are + * fixed size and set setViewIsBootstrappingNCols() to that count. + */ + FERRISEXP_API bool isColumnFixedSize( const std::string& cn ); + + /** + * Abstraction of a custom GTK+2 Tree Model. + * + * Events are emitted during interesting times like reading a dir etc. + */ + class FERRISEXP_API FerrisTreeModel + : + public ::Ferris::Handlable + { + friend fh_ftreemodel FactoryUI::CreateTreeModel(); + + public: + + virtual ~FerrisTreeModel() + {} + + virtual void setURL( fh_context c ) = 0; + virtual void setURL( const std::string& s ) = 0; + virtual std::string getURL() = 0; + virtual fh_context getRootContext() = 0; + virtual void read( bool force = false ) = 0; + + /** + * Clear the gtk model of all items emitting events so that all views + * think there are no items in the model + */ + virtual void clear() = 0; + + + virtual GtkTreeModel* getGtkModel() = 0; + + /** + * Gets the deepest context wrapper for the view. + * They are always wrapped like this, + * native + * filtered + * sorted + */ + virtual fh_context getViewContext() = 0; + + /** + * Get the description of what sorting is currently being + * performed. + */ + virtual std::string getSortingString() = 0; + virtual void setSortingString( const std::string& s, bool revalidate = true ) = 0; + + /** + * Update what filtering is to occur for the view + */ + virtual std::string getFilterString() = 0; + virtual void setFilterString( const std::string& s, bool revalidate = true ) = 0; + + + /** + * Only allow the user to select from these fixed columns. + */ + virtual void setStaticColumnNames( const std::vector< std::string >& v ) = 0; + + /** + * Append a new column if it is not already known + */ + virtual void appendColumnName( const std::string& s ) = 0; + + /** + * These methods allow the view to cheat by having the model return + * simple inline data instead of querying the VFS for the real data. + * + * These are used because even though a fixed cell size is set for some + * data the treeview always reads the value of *every* cell before display + * thus for a large dir lots of cells are read that are not displayed. + * + * The model doesn't know how many columns are actaully being displayed, + * so you must set that as ncols + */ + virtual void setViewIsBootstrappingNCols( int ncols ) = 0; + + + virtual void ContextToTreeIter( GtkTreeIter *iter, Context::iterator ci ) = 0; + virtual void ContextToTreeIter( GtkTreeIter *iter, fh_context c ) = 0; + virtual GtkTreeIter toTreeIter( fh_context c ) = 0; + + + /** + * Get the context for a given location in the tree + */ + virtual fh_context toContext( GtkTreeIter *iter ) = 0; + virtual fh_context toContext( gchar* path_string ) = 0; + virtual fh_context toContext( GtkTreePath* path ) = 0; + + + + /** + * Lookup the number of a column by its name. + * + * @param tree_model This + * @param s The name of the column to find the index of. + * + * @return the index from 0 up where the column with name 's' can be found at, + * or -1 if no column with the name 's' is being shown. + */ + virtual gint getColumnNumber( const std::string& s ) = 0; + + + /** + * Set this to check if a directory has children and only display a triangle + * opener if there are children + */ + virtual void setCheckDirsForChildren( bool v ) = 0; + + /** + * Check if there exists one or more subdirs from each context and only dislay + * a triangle for contexts who have subdirs. + */ + virtual void setCheckForExistsSubDir( bool v ) = 0; + + /** + * Set the number of contexts that are to be read between emission of + * getAddingContextProgressSig() signal. Normal GtkTreeView use should leave + * the default (somewhere around 100 at the moment) but other views + * that are just using the model for its data house can set to emit + * at different intervals + */ + virtual void setAddingContextSignalModulas( int m ) = 0; + + /** + * These are reference counted, you must match a Start() with a Stop() + */ + virtual void StartMonitoringSubContext( fh_context c ) = 0; + virtual void StopMonitoringSubContext( fh_context c ) = 0; + + typedef sigc::signal1< void, fh_context > StartReadingDiskSig_t; + typedef sigc::signal1< void, fh_context > StopReadingDiskSig_t; + typedef sigc::signal3< void, fh_context, long, long > DiskReadProgressSig_t; + typedef sigc::signal1< void, fh_context > StartReadingSig_t; + typedef sigc::signal1< void, fh_context > StopReadingSig_t; + typedef sigc::signal3< void, fh_context, long, long > AddingContextSig_t; + typedef sigc::signal1< void, fh_context > RemovingContextSig_t; + typedef sigc::signal1< void, fh_context > FilterStartedSig_t; + typedef sigc::signal1< void, fh_context > SortStartedSig_t; + + typedef sigc::signal1< void, FerrisTreeModel* > ClearedSig_t; + + StartReadingDiskSig_t& getStartReadingDiskSig() { return StartReadingDiskSig; } + StopReadingDiskSig_t& getStopReadingDiskSig() { return StopReadingDiskSig; } + DiskReadProgressSig_t& getDiskReadProgressSig() { return DiskReadProgressSig; } + StartReadingSig_t& getStartReadingSig() { return StartReadingSig; } + StopReadingSig_t& getStopReadingSig() { return StopReadingSig; } + AddingContextSig_t& getAddingContextProgressSig() { return AddingContextProgressSig; } + AddingContextSig_t& getAddingContextSig() { return AddingContextSig; } + RemovingContextSig_t& getRemovingContextSig() { return RemovingContextSig; } + FilterStartedSig_t& getFilterStartedSig() { return FilterStartedSig; } + SortStartedSig_t& getSortStartedSig() { return SortStartedSig; } + ClearedSig_t& getClearedSig() { return ClearedSig; } + + protected: + FerrisTreeModel() + {} + + private: + FerrisTreeModel( const FerrisTreeModel& ); +// FerrisTreeModel operator=( const FerrisTreeModel& ); + + StartReadingDiskSig_t StartReadingDiskSig; + StopReadingDiskSig_t StopReadingDiskSig; + DiskReadProgressSig_t DiskReadProgressSig; + StartReadingSig_t StartReadingSig; + StopReadingSig_t StopReadingSig; + AddingContextSig_t AddingContextProgressSig; + AddingContextSig_t AddingContextSig; + RemovingContextSig_t RemovingContextSig; + FilterStartedSig_t FilterStartedSig; + SortStartedSig_t SortStartedSig; + ClearedSig_t ClearedSig; + + public: + /** + * Get the type of a column based on its name/index + */ + virtual GType getColumnType( const std::string& cn ) = 0; + virtual GType getColumnType( int index ) = 0; + + }; + +}; +#endif diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..095b1eb --- /dev/null +++ b/INSTALL @@ -0,0 +1,231 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Indexing/BoostMultiIndexLexicon.cpp b/Indexing/BoostMultiIndexLexicon.cpp new file mode 100644 index 0000000..0e82fda --- /dev/null +++ b/Indexing/BoostMultiIndexLexicon.cpp @@ -0,0 +1,255 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: BoostMultiIndexLexicon.cpp,v 1.3 2010/09/24 21:31:07 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +/** + * uses a boost::multi_index to store both a forward and reverse lexicon + */ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "IndexPrivate.hh" +#include +//#include + +// #if !defined(NDEBUG) +// #define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING +// #define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE +// #endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace boost; +using namespace boost::multi_index; + +namespace boost { + namespace serialization { + + template + void serialize(Archive & ar, std::pair< FirstT, SecondT >& p, const unsigned int version) + { + ar & p.first; + ar & p.second; + } + + } // namespace serialization +} // namespace boost + +namespace Ferris +{ + struct from{}; + struct to{}; + template + struct bidirectional_map + { + typedef bidirectional_map _Self; + + typedef std::pair value_type; + typedef multi_index_container< + value_type, + indexed_by< + ordered_unique< + tag,member >, + ordered_unique< + tag, member > + > + > type; + }; + + + namespace FullTextIndex + { + class FERRISEXP_DLLLOCAL Lexicon_BoostMultiIndex + : + public Lexicon + { + typedef Lexicon_BoostMultiIndex _Self; + typedef Lexicon _Base; + + bool m_dirty; + + typedef bidirectional_map::type m_lexicon_t; + m_lexicon_t m_lexicon; + m_lexicon_t::iterator m_iter; + + void load(); + void save(); + + protected: + + virtual void setIndex( fh_idx idx ); + virtual std::string getFirstTerm(); + virtual std::string getNextTerm( const std::string& s ); + + public: + + Lexicon_BoostMultiIndex( fh_idx idx = 0 ); + virtual ~Lexicon_BoostMultiIndex(); + + virtual void insert( const std::string& term, termid_t termid ); + virtual termid_t lookup( const std::string& term ); + virtual void sync(); + + static bool reged; + static bool regedx; + static string getClassName() + { return "boost-multi-index"; } + }; + bool Lexicon_BoostMultiIndex::reged = LexiconFactory::Instance(). + Register( Lexicon_BoostMultiIndex::getClassName(), + &MakeObject::Create ); + bool Lexicon_BoostMultiIndex::regedx = appendToLexiconClassNames( + Lexicon_BoostMultiIndex::getClassName() ); + + + static bool rg = LexiconFactory::Instance(). + Register( "boost-multi-index", &MakeObject::Create ); + static bool rx = appendToLexiconAliasNames( "boost-multi-index" ); + + + Lexicon_BoostMultiIndex::Lexicon_BoostMultiIndex( fh_idx idx ) + : + Lexicon( idx ), + m_dirty( false ) + { + setFileName( "/lexicon.boost-multi-index" ); + m_iter = m_lexicon.end(); + } + + void + Lexicon_BoostMultiIndex::load() + { + string filename = CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ); + std::ifstream ifs(filename.c_str()); + if(ifs) { + boost::archive::binary_iarchive ia(ifs); + ia >> m_lexicon ; + } + } + + void + Lexicon_BoostMultiIndex::save() + { + string filename = CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ); + std::ofstream ofs( filename.c_str() ); + boost::archive::binary_oarchive oa(ofs); + const m_lexicon_t& work_around = m_lexicon; + oa << work_around; + } + + + void + Lexicon_BoostMultiIndex::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + try + { + load(); + } + catch( std::exception& e ) + { + LG_IDX_D << "Error opening lexicon e:" << e.what() << endl; + throw; + } + } + + + Lexicon_BoostMultiIndex::~Lexicon_BoostMultiIndex() + { + if( m_dirty ) + save(); + } + + void + Lexicon_BoostMultiIndex::insert( const std::string& term, termid_t termid ) + { + m_lexicon.insert( m_lexicon_t::value_type( term, termid ) ); + m_dirty = true; + } + + termid_t + Lexicon_BoostMultiIndex::lookup( const std::string& term ) + { + m_lexicon_t::iterator li = m_lexicon.find( term ); + if( li != m_lexicon.end() ) + return li->second; + return 0; + } + + void + Lexicon_BoostMultiIndex::sync() + { + if( m_dirty ) + save(); + } + + std::string + Lexicon_BoostMultiIndex::getFirstTerm() + { + if( m_lexicon.empty() ) + { + m_iter = m_lexicon.end(); + return ""; + } + + m_iter = m_lexicon.begin(); + return getNextTerm(""); + } + + std::string + Lexicon_BoostMultiIndex::getNextTerm( const std::string& s ) + { + if( m_iter == m_lexicon.end() ) + return ""; + + string v = m_iter->first; + ++m_iter; + return v; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + }; +}; + diff --git a/Indexing/FilesystemLexicon.cpp b/Indexing/FilesystemLexicon.cpp new file mode 100644 index 0000000..c9ff668 --- /dev/null +++ b/Indexing/FilesystemLexicon.cpp @@ -0,0 +1,188 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: FilesystemLexicon.cpp,v 1.4 2010/09/24 21:31:07 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +/** + * Implementation of lexicon storage using ferris VFS itself. + * This is probably the most basic lexicon storage plugin. + */ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "IndexPrivate.hh" +#include +#include + +#include +#include +#include + +#include + +#include +#include + +using namespace std; + +namespace Ferris +{ + namespace FullTextIndex + { + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + const std::string LEXICON_FILENAME = "lexicon"; + + class Lexicon_Filesystem; + FERRIS_SMARTPTR( Lexicon_Filesystem, fh_fclex ); + + /** + * Lexicon for storage in a ferris VFS + */ + class FERRISEXP_DLLLOCAL Lexicon_Filesystem + : + public Lexicon + { + typedef Lexicon_Filesystem _Self; + typedef Lexicon _Base; + + fh_context theContext; + + /** + * Playing around with having a 'cache' that is used during insertion/lookup + * to speed up this lexicon. It seems that having relatively small delays + * especially during lookup of terms during inversion of a file causes huge + * time delays overall. + */ + typedef map< std::string, termid_t > cache_t; + cache_t cache; + + protected: + + virtual void setIndex( fh_idx idx ); + virtual std::string getFirstTerm(); + virtual std::string getNextTerm( const std::string& s ); + + public: + + Lexicon_Filesystem( fh_idx idx = 0 ) + : Lexicon( idx ) + {} + virtual ~Lexicon_Filesystem() + {} + + virtual void insert( const std::string& term, termid_t termid ); + virtual termid_t lookup( const std::string& term ); + virtual void sync() + {} + + + + static bool reged; + static bool regedx; + static string getClassName() + { return "Filesystem"; } + }; + bool Lexicon_Filesystem::reged = LexiconFactory::Instance(). + Register( Lexicon_Filesystem::getClassName(), + &MakeObject::Create ); + bool Lexicon_Filesystem::regedx = appendToLexiconClassNames( + Lexicon_Filesystem::getClassName() ); + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + void + Lexicon_Filesystem::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + + string filename = m_path_mgr->getBasePath() + "/" + LEXICON_FILENAME; + LG_IDX_D << "Lexicon_Filesystem::setIndex() mkdir filename:" << filename << endl; + theContext = Shell::touch( filename, true, true ); + } + + void + Lexicon_Filesystem::insert( const std::string& term, termid_t termid ) + { + fh_context c = Shell::CreateFile( theContext, term ); + setStrAttr( c, "content", tostr( termid )); + cache[ term ] = termid; + } + + termid_t + Lexicon_Filesystem::lookup( const std::string& term ) + { + // check cache + { + cache_t::iterator ci = cache.find( term ); + if( ci != cache.end() ) + { + return ci->second; + } + } + + Context::iterator ci = theContext->find( term ); + if( ci != theContext->end() ) + { + termid_t ret = toType( getStrAttr( *ci, "content", "", true, true )); + + cache[ term ] = ret; + return ret; + } + return 0; + } + + + std::string + Lexicon_Filesystem::getFirstTerm() + { + Context::iterator ci = theContext->begin(); + if( ci == theContext->end() ) + return ""; + return (*ci)->getDirName(); + } + + + std::string + Lexicon_Filesystem::getNextTerm( const std::string& s ) + { + Context::iterator ci = theContext->find( s ); + if( ci != theContext->end() ) + ++ci; + if( ci == theContext->end() ) + return ""; + return (*ci)->getDirName(); + } + }; +}; diff --git a/Indexing/IndexPrivate.cpp b/Indexing/IndexPrivate.cpp new file mode 100644 index 0000000..698395d --- /dev/null +++ b/Indexing/IndexPrivate.cpp @@ -0,0 +1,94 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: IndexPrivate.cpp,v 1.2 2010/09/24 21:31:08 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +namespace Ferris +{ + namespace FullTextIndex + { + + /** + * Decode a run of document numbers from 'iss'. + * + * This mainly works on decoding the 'dgaps' and from there one must + * use convertFromDGaps() to get the IDs themself. + * + * @param iss Stream to get encoded document numbers from + * @param algo Algo that was used to encode the numbers + * @param countOfNumbers How many symbols were encoded + * @param entirePossibleByteAreaSize How far from where iss is now can + * possibly contain relevant data + * (iss+entirePossibleByteAreaSize == end) + * @param out Where to put decoded docids + * @param N The highest document number that we are encoding (max item in chunk) + * @param p The number of terms we are encoding (# items in chunk) + * + * @return The number of bytes consumed from iss + */ + int decodeDocumentNumbers( fh_istream iss, + string algo, + int countOfNumbers, + int entirePossibleByteAreaSize, + std::vector< docid_t >& out, + int N, int p ) + { + int bread = 0; + + if( algo == "Golomb" ) + bread = decode< BitCoder< GolombPolicy > >( istreambuf_iterator(iss), + entirePossibleByteAreaSize, + countOfNumbers, + out, N, p ); + else if( algo == "Elias" ) + bread = decode< BitCoder< EliasPolicy > >( istreambuf_iterator(iss), + entirePossibleByteAreaSize, + countOfNumbers, + out, N, p ); + else if( algo == "Delta" ) + bread = decode< BitCoder< DeltaPolicy > >( istreambuf_iterator(iss), + entirePossibleByteAreaSize, + countOfNumbers, + out, N, p ); + else + bread = decode< BitCoder< GammaPolicy > >( istreambuf_iterator(iss), + entirePossibleByteAreaSize, + countOfNumbers, + out, N, p ); + + // + // we have read more bytes than we actually processed, move to the end of the + // used byte section. + // + iss.seekg( (-1 * entirePossibleByteAreaSize) + bread, ios::cur ); + + return bread; + } + }; +}; diff --git a/Indexing/IndexPrivate.hh b/Indexing/IndexPrivate.hh new file mode 100644 index 0000000..413baf5 --- /dev/null +++ b/Indexing/IndexPrivate.hh @@ -0,0 +1,818 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: IndexPrivate.hh,v 1.6 2010/09/24 21:31:08 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_PRIVATE_IMPL_H_ +#define _ALREADY_INCLUDED_FERRIS_FULLTEXTIDX_PRIVATE_IMPL_H_ + +#include + +#include +#include +#include + +#ifdef GCC_HASCLASSVISIBILITY + #pragma GCC visibility push(default) +#endif + +#include +#include +#include +#include +#include + +#ifdef GCC_HASCLASSVISIBILITY + #pragma GCC visibility pop +#endif + +#include +#include +#include + +#include + +using namespace std; + +#ifdef GCC_HASCLASSVISIBILITY + #pragma GCC visibility push(default) +#endif + +namespace Ferris +{ + namespace FullTextIndex + { + + template < class Base,class Sub > + struct MakeObject + { + static Base* Create() + { return new Sub(); } + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + stringlist_t& getLexiconClassNames(); + bool appendToLexiconClassNames( const std::string& s ); + typedef Loki::SingletonHolder< + Loki::Factory< Lexicon, string >, Loki::CreateUsingNew, Loki::NoDestroy > + LexiconFactory; + stringlist_t& getLexiconAliasNames(); + bool appendToLexiconAliasNames( const std::string& s ); + + + + stringlist_t& getReverseLexiconClassNames(); + bool appendToReverseLexiconClassNames( const std::string& s ); + typedef Loki::SingletonHolder< + Loki::Factory< ReverseLexicon, string >, Loki::CreateUsingNew, Loki::NoDestroy > + ReverseLexiconFactory; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + struct FERRISEXP_DLLLOCAL CommonCodingPolicy + { + int N; + int p; + int blk; + unsigned long m_bitsProcessed; + mem_bitio_state m_state; + + inline CommonCodingPolicy( int N, int p ) + : + N( N ), + p( p ), + blk( 0 ), + m_bitsProcessed( 0 ) + { + } + }; + + + struct FERRISEXP_DLLLOCAL GolombPolicy + : + public CommonCodingPolicy + { + inline GolombPolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ) + { + blk = BIO_Bblock_Init ( N, p ); + LG_IDX_D << "Golomb() N:" << N << " p:" << p << " gives b:" << blk << endl; + } + + inline void encode( const int v ) + { + ENCODE_CONTINUE ( m_state ) + BBLOCK_ENCODE_L( v, blk, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + LG_IDX_D << "Golomb.encode() v:" << v << " m_bitsProcessed:" << m_bitsProcessed << endl; + } + + inline int decode() + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + BBLOCK_DECODE_L (v, blk, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + +// int v = BIO_Mem_Bblock_Decode( blk, &m_state, &m_bitsProcessed ); + return v; + } + }; + + + struct FERRISEXP_DLLLOCAL BinaryPolicy + : + public CommonCodingPolicy + { + inline BinaryPolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ) + { + } + + inline void encode( const int v ) + { + ENCODE_CONTINUE ( m_state ) + blk = BIO_Binary_Length( v, 8 ); + BINARY_ENCODE_L( v, blk, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + } + + inline void encode( const int v, const int lo, const int hi ) + { + ENCODE_CONTINUE ( m_state ) + BINARY_ENCODE_L( v + 1 - lo , hi + 1 - lo, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + } + + inline int decode() + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + BINARY_DECODE_L (v, blk, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + return v; + } + + inline int decode( const int lo, const int hi ) + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + BINARY_DECODE_L ( v, hi + 1 - lo, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + return v - 1 + lo; + } + + }; + + + struct FERRISEXP_DLLLOCAL EliasPolicy + : + public CommonCodingPolicy + { + double s; + + inline EliasPolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ), + s(2) + { + blk = 10; + } + + inline void encode( const int v ) + { + ENCODE_CONTINUE ( m_state ) + ELIAS_ENCODE_L( v, blk, s, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + } + + inline int decode() + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + ELIAS_DECODE_L ( v, blk, s, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + return v; + } + }; + + + /** + * This is the Y code from page 118 of MG. ie. The one that outputs + * the unary then binary code. + */ + struct FERRISEXP_DLLLOCAL GammaPolicy + : + public CommonCodingPolicy + { + inline GammaPolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ) + { + } + + inline void encode( const int v ) + { + ENCODE_CONTINUE ( m_state ) + GAMMA_ENCODE_L( v, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + } + + inline int decode() + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + GAMMA_DECODE_L( v, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + return v; + } + }; + + + /** + * This is the little bomb code from page 119 of MG. ie. The one that outputs + * the gamma code then binary code. + */ + struct FERRISEXP_DLLLOCAL DeltaPolicy + : + public CommonCodingPolicy + { + inline DeltaPolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ) + { + } + + inline void encode( const int v ) + { + ENCODE_CONTINUE ( m_state ) + DELTA_ENCODE_L( v, m_bitsProcessed ); + ENCODE_PAUSE ( m_state ) + } + + inline int decode() + { + register unsigned long v; + DECODE_CONTINUE ( m_state ) + DELTA_DECODE_L( v, m_bitsProcessed ); + DECODE_PAUSE ( m_state ) + return v; + } + }; + + /** + * Dummy policy. interpolitve coding is done with a different API because + * it traverses its data in a binary search pattern and doesn't use dgaps + */ + struct FERRISEXP_DLLLOCAL InterpolativePolicy + : + public CommonCodingPolicy + { + inline InterpolativePolicy( int N = 0 , int p = 0 ) + : + CommonCodingPolicy( N, p ) + { + } + + inline void encode( const int v ) + {} + + inline int decode() + { return 0; } + }; + + + template < class CoderPolicy > + class BitCoder + : + public CoderPolicy + { + bool m_ended; + bool m_encoding; + + enum { + bufsz = 65000 + }; + unsigned char buf[ 65001 ]; + + /** + * Called by begin() / end() to flush any temp data into the buffer 'buf' + */ + inline void endOperation() + { + if( m_ended ) + return; + + m_ended = true; + + if( m_encoding ) + BIO_Mem_Encode_Done( &this->m_state ); + } + + public: + + inline BitCoder( int N = 100, int p = 10 ) + : + CoderPolicy( N, p ) + { + } + + /** + * flush buffers and setup for a new encode run + */ + inline void resetForEncode() + { + m_ended = false; + m_encoding = true; + + this->m_bitsProcessed = 0; + bzero( buf, bufsz ); + BIO_Mem_Encode_Start ( buf, bufsz, + &this->m_state ); + } + + /** + * Setup buffers with data from begin to begin+count + */ + template + void resetForDecode( Iter begin, int count ) + { + m_ended = false; + this->m_bitsProcessed = 0; + bzero( buf, bufsz ); + BIO_Mem_Decode_Start ( buf, bufsz, + &this->m_state ); + + int i=0; + for( Iter iter = begin; count--; ++iter, ++i ) + { +// cerr << "resetForDecode i:" << i << " data:" << (int)*iter << endl; + buf[i] = *iter; + } + } + + /** + * number of bits encoded/decoded so far + */ + inline int getBitsProcessed() + { + return this->m_bitsProcessed; + } + + /** + * number of bytes needed to store the number of bits encoded/decoded so far. + * ie. roof of bits/8 + */ + inline int getBytesProcessed() + { + return (int)ceil(((double)getBitsProcessed())/8); + } + + + typedef unsigned char* iterator; + + inline iterator begin() + { + endOperation(); + return &buf[ 0 ]; + } + + inline iterator end() + { + endOperation(); + return &buf[ getBytesProcessed() ]; + } + }; + + + /** + * Decode data using the coding policy Coder from begin to begin+iterDistance + * decoding should stop after SymbolCount symbols have been recovered and output + * is to be placed in 'out' which is assumed to posses a vector/list push_back() method. + * N and p are used to initialize the codec. + * + * @return The number of bytes processed from begin. + */ + template < class Coder, class Iter, class OutClass > + int decode( Iter begin, int iterDistance, int SymbolCount, OutClass& out, int N = 100, int p = 10 ) + { + Coder c( N, p ); + c.resetForDecode( begin, iterDistance ); + + while( SymbolCount-- ) + { + int v = c.decode(); +// cerr << "decode()ed v:" << v << " SymbolCount:" << SymbolCount << endl; + out.push_back( v ); + } + +// cerr << "decode() bits:" << c.getBitsProcessed() << endl; + return c.getBytesProcessed(); + } + + /** + * encode data from begin to end non inclusive of end. Place the coded + * payload into the stream outss starting at the current put position. + * N and p are used to init the codec. + * + * @return the number of bytes written to outss + */ + template < class Coder, class Iter, class OutStream > + int encode( Iter begin, Iter end, OutStream outss, int N = 100, int p = 10 ) + { + Coder c( N, p ); + c.resetForEncode(); + + int UncodedCount = 0; + + for( Iter iter = begin; iter != end; ++iter ) + { +// cerr << "encode() n:" << *iter << " bits:" << c.getBitsProcessed() << endl; + c.encode( *iter ); + ++UncodedCount; + } + + // plain copy() fails to load again + // copy( c.begin(), c.end(), out ); + // have to manually copy it for some reason. + for( unsigned char* ci = c.begin(); ci != c.end(); ++ci ) + { + unsigned char v = *ci; + writenum( outss, v ); + } + +// cerr << "encode() bits:" << c.getBitsProcessed() +// << " distance:" << distance( c.begin(), c.end() ) +// << endl; + + return c.getBytesProcessed(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + /** + * See pp 127 of managing gigabytes + */ + template < class Coder, class Iter > + void encode_interpolative_recurse( Coder& c, Iter begin, Iter end, int f, int lo, int hi ) + { + if( f==0 ) return; + if( f==1 ) + { +// cerr << "binary_code( f==1 ) value:" << *begin << " low:" << lo << " high:" << hi << endl; + c.encode( *begin, lo, hi ); + return; + } + + int h = f / 2; + Iter midway = begin; + advance( midway, h ); + int m = *midway; + int f1 = h; + int f2 = f - h - 1; + Iter L1_begin = begin; + Iter L1_end = midway-1; + Iter L2_begin = midway+1; + Iter L2_end = end; + +// cerr << "encode_interpolative() f:" << f +// << " lo:" << lo << " hi:" << hi +// << " m:" << m << " f:" << f << " h:" << h +// << " f1:" << f1 << " f2:" << f2 +// << endl; + +// cerr << "binary_code( B ) value:" << m << " low:" << lo + f1 << " high:" << hi - f2 << endl; + c.encode( m, lo + f1, hi - f2 ); + encode_interpolative_recurse( c, L1_begin, L1_end, f1, lo, m-1 ); + encode_interpolative_recurse( c, L2_begin, L2_end, f2, m+1, hi ); + } + +/** + * + * @param lowmark is a out of band number below any in begin to end + * @param himark is a out of band number above any in begin to end + * + * @return The number of bytes written to outss + */ + template < class Iter, class OutClass > + int encode_interpolative( Iter begin, Iter end, int lowmark, int himark, OutClass& outss ) + { + int BitsProcessed = 0; + int UncodedCount = distance( begin, end ); + + + int lo=lowmark; + int hi=himark; + +// cerr << "encode() for interpolative mode." << endl; +// copy( begin, end, ostream_iterator( cerr, " " )); +// cerr << endl; + + + typedef BitCoder< BinaryPolicy > Coder; + Coder c( 100, 10 ); + c.resetForEncode(); +// cerr << "About to encode_interpolative. distance:" << distance( begin, end ) +// << " count:" << UncodedCount +// << " lo:" << lo +// << " hi:" << hi +// << endl; + + encode_interpolative_recurse( c, begin, end, UncodedCount, lo, hi ); + int bw = c.getBytesProcessed(); +// cerr << "encode() bytes:" << bw << endl; +// cerr << "encode() bits :" << c.getBitsProcessed() << endl; + + for( unsigned char* ci = c.begin(); ci != c.end(); ++ci ) + { + unsigned char v = *ci; +// cerr << "encode() write num:" << (int)v << endl; + writenum( outss, v ); + } + outss << flush; + return c.getBytesProcessed(); + } + + + template < class Coder, class OutClass > + void decode_interpolative_recurse( Coder& c, int f, int lo, int hi, OutClass& out, int arrayIndex ) + { + if( f==0 ) return; + if( f==1 ) + { + int m = 0; + m = c.decode( lo, hi ); +// out.push_back( m ); + out[ arrayIndex ] = m; +// cerr << "binary_code( f==1 ) value:" << m << " low:" << lo << " high:" << hi +// << " arrayIndex:" << arrayIndex << endl; + return; + } + + int h = f / 2; + int f1 = h; + int f2 = f - h - 1; + + int m = c.decode( lo + f1, hi - f2 ); +// out.push_back( m ); + out[ arrayIndex ] = m; +// cerr << "decode()ed m:" << m << " lo:" << lo+f1 << " hi:" << hi - f2 << endl; +// cerr << "decode_interpolative() f:" << f << " h:" << h << " f1:" << f1 << " f2:" << f2 << " lo:" << lo +// << " m:" << m << " hi:" << hi << " arrayIndex:" << arrayIndex << endl; + + decode_interpolative_recurse( c, f1, lo, m-1, out, arrayIndex - (int)(ceil(1.0 * (f-1)/4)) ); + decode_interpolative_recurse( c, f2, m+1, hi , out, arrayIndex + (int)(ceil(1.0 * (f)/4)) ); + } + + + /** + * + * @param lowmark is a out of band number below any in begin to end + * @param himark is a out of band number above any in begin to end + * + * @return The number of bytes actually consumed from begin + */ + template < class Iter, class OutClass > + int decode_interpolative( Iter begin, int iterDistance, int SymbolCount, int lomark, int himark, OutClass& out ) + { + typedef BitCoder< BinaryPolicy > Coder; + Coder c( 100, 10 ); + c.resetForDecode( begin, iterDistance ); + + out.resize( SymbolCount ); + decode_interpolative_recurse( c, SymbolCount, lomark, himark, out, (int)(ceil(1.0 * (SymbolCount-1)/2)) ); + +// cerr << "decode() out.size:" << out.size() << endl; + +// int lo = lomark; +// int hi = himark; +// int f = SymbolCount; + +// int h = f / 2; +// int f1 = h; +// int f2 = f - h - 1; + +// while( SymbolCount-- ) +// { +// int v = c.decode( f1 - lo, hi - f2 ); +// cerr << "decode()ed v:" << v << " lo:" << f1 - lo << " hi:" << hi - f2 << endl; +// } +// cerr << "decode() bits:" << c.getBitsProcessed() << " by:" << c.getBytesProcessed() << endl; + return c.getBytesProcessed(); + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * read a fixed length string from a stream + */ + template < class STREAM > + std::string readstring( STREAM& ss, int len ) + { + // FIXME + const int bufsz = 64*1024; + char buf[ bufsz+1 ]; + ss.read( buf, len ); + buf[ len ] = '\0'; + std::string s = buf; + return s; + } + + template < class STREAM > + STREAM& writestring( STREAM& ss, const std::string& s ) + { + ss << s; + return ss; + } + + + template < class STREAM, class N > + int readnum( STREAM& ss, N& v ) + { + N tmp; + ss.read( (char*)&tmp, sizeof(N) ); + if( ss.good() ) + { + v = tmp; + return sizeof(N); + } + else + { + LG_FTXLEXI_W << "readnum failed" << endl; + } + return 0; + } + + template < class STREAM, class N > + int writenum( STREAM& ss, N& v ) + { + ss.write( (char*)&v, sizeof(N) ); + return( sizeof(N) ); + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Decode a run of document numbers from 'iss'. + * + * This mainly works on decoding the 'dgaps' and from there one must + * use convertFromDGaps() to get the IDs themself. + * + * @param iss Stream to get encoded document numbers from + * @param algo Algo that was used to encode the numbers + * @param countOfNumbers How many symbols were encoded + * @param entirePossibleByteAreaSize How far from where iss is now can + * possibly contain relevant data + * (iss+entirePossibleByteAreaSize == end) + * @param out Where to put decoded docids + * @param N The highest document number that we are encoding (max item in chunk) + * @param p The number of terms we are encoding (# items in chunk) + * + * @return The number of bytes consumed from iss + */ + int decodeDocumentNumbers( fh_istream iss, + string algo, + int countOfNumbers, + int entirePossibleByteAreaSize, + std::vector< docid_t >& out, + int N, int p ); + + /** + * Use the coding method identified by algo to encode begin to end + * and put the coded version into oss. + * + * @param oss Stream to put bit coded data into + * @param algo Algo to use during encode + * @param begin First dgap to encode + * @param end Last + 1 dgap + * @param N The highest document number that we are encoding (max item in chunk) + * @param p The number of terms we are encoding (# items in chunk) + * + * @return The number of bytes written. + */ + template < class Iter > + int encodeDocumentNumbers( fh_ostream oss, string algo, Iter begin, Iter end, int N, int p ) + { + int ret = 0; + + if ( algo == "Golomb" ) ret = encode< BitCoder< GolombPolicy > >( begin, end, oss, N, p ); + else if( algo == "Elias" ) ret = encode< BitCoder< EliasPolicy > > ( begin, end, oss, N, p ); + else if( algo == "Delta" ) ret = encode< BitCoder< DeltaPolicy > > ( begin, end, oss, N, p ); + else ret = encode< BitCoder< GammaPolicy > > ( begin, end, oss, N, p ); + + return ret; + } + + /** + * converts from a sequence of dgaps to the document number collection + */ + template < class Iter, class Coll > + void convertFromDGaps( Iter begin, Iter end, Coll& out ) + { + typedef list< docid_t > tmp_t; + tmp_t tmp; + std::partial_sum( begin, end, back_inserter(tmp) ); + + for( tmp_t::iterator ti = tmp.begin(); ti != tmp.end(); ++ti ) + { + out[ *ti ] = 0; + } + } + + + /** + * converts a range into another range which is the gaps between each element in + * the original. ie. makes a document gap range. + * n n+1 n+2 + * n (n+1)-n (n+2)-(n+1) + */ + template < class Iter > + void convertToDGaps( Iter begin, Iter end, list< docid_t >& out ) + { + typedef list< docid_t > out_t; + + if( begin == end ) + return; + if( (begin+1) == end ) + { + out.push_back( *begin ); + return; + } + + // + // first number is pushed out whole + // + out.push_back( *begin ); + + // + // start working from the second number onward + // + Iter prev = begin; + Iter iter = begin; + for( ++iter; iter != end; ) + { + docid_t v = *iter - *prev; + out.push_back( v ); + + prev = iter; + ++iter; + } + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + }; +}; +#ifdef GCC_HASCLASSVISIBILITY + #pragma GCC visibility pop +#endif +#endif diff --git a/Indexing/Makefile.am b/Indexing/Makefile.am new file mode 100644 index 0000000..5541475 --- /dev/null +++ b/Indexing/Makefile.am @@ -0,0 +1,42 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @STLDB4_CFLAGS@ \ + @BOOST_CFLAGS@ \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + + +noinst_LTLIBRARIES = libferrisindexing.la +ferrisincludedir=$(includedir)/Ferris + +libferrisindexing_la_SOURCES = \ + IndexPrivate.hh \ + ThreeInFourLexicon.cpp \ + FilesystemLexicon.cpp \ + UncompressedDB4.cpp \ + XMLLexicon.cpp \ + BoostMultiIndexLexicon.cpp \ + IndexPrivate.cpp + +libferrisindexing_la_LIBADD = \ + @STLPORT_LIB@ + +libferrisindexing_la_LDFLAGS = \ + @STLDB4_LIBS@ \ + @BOOST_LIBS@ \ + @GLIB_LIBS@ + +########################################################################## +########################################################################## +########################################################################## + diff --git a/Indexing/Makefile.in b/Indexing/Makefile.in new file mode 100644 index 0000000..854e47e --- /dev/null +++ b/Indexing/Makefile.in @@ -0,0 +1,991 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = Indexing +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libferrisindexing_la_DEPENDENCIES = +am_libferrisindexing_la_OBJECTS = ThreeInFourLexicon.lo \ + FilesystemLexicon.lo UncompressedDB4.lo XMLLexicon.lo \ + BoostMultiIndexLexicon.lo IndexPrivate.lo +libferrisindexing_la_OBJECTS = $(am_libferrisindexing_la_OBJECTS) +libferrisindexing_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libferrisindexing_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferrisindexing_la_SOURCES) +DIST_SOURCES = $(libferrisindexing_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/context/ \ + -I/usr/local/include \ + @STLDB4_CFLAGS@ \ + @BOOST_CFLAGS@ \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +noinst_LTLIBRARIES = libferrisindexing.la +ferrisincludedir = $(includedir)/Ferris +libferrisindexing_la_SOURCES = \ + IndexPrivate.hh \ + ThreeInFourLexicon.cpp \ + FilesystemLexicon.cpp \ + UncompressedDB4.cpp \ + XMLLexicon.cpp \ + BoostMultiIndexLexicon.cpp \ + IndexPrivate.cpp + +libferrisindexing_la_LIBADD = \ + @STLPORT_LIB@ + +libferrisindexing_la_LDFLAGS = \ + @STLDB4_LIBS@ \ + @BOOST_LIBS@ \ + @GLIB_LIBS@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Indexing/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Indexing/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferrisindexing.la: $(libferrisindexing_la_OBJECTS) $(libferrisindexing_la_DEPENDENCIES) + $(libferrisindexing_la_LINK) $(libferrisindexing_la_OBJECTS) $(libferrisindexing_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BoostMultiIndexLexicon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FilesystemLexicon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IndexPrivate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThreeInFourLexicon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UncompressedDB4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLLexicon.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +########################################################################## +########################################################################## +########################################################################## + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Indexing/ThreeInFourLexicon.cpp b/Indexing/ThreeInFourLexicon.cpp new file mode 100644 index 0000000..2bb0c09 --- /dev/null +++ b/Indexing/ThreeInFourLexicon.cpp @@ -0,0 +1,2486 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ThreeInFourLexicon.cpp,v 1.4 2010/09/24 21:31:08 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +/** + * Implementation of partially front coded (currently using "3-in-4") + * compressed lexicon storage with insertion support. + * + * Assumes that the whole lexicon can be stored in main memory temporarily + * + * On disk format is + * number of disk_blockn entries as 4 bytes + * disk_block1 of disk_block_size bytes + * disk_block2 of disk_block_size bytes + * disk_blockn of disk_block_size bytes + * disk_block_index of sizeof(disk_block_index) bytes + * sizeof(disk_block_index) as 4 bytes + * version of file format as 4 bytes + * + * disk_block_index format is + * length(first_string_of_disk_block) as 1 byte + * first_string_of_disk_block as first_string_of_disk_block bytes + * repeat last 2 items + * the block_number is infered from the position in the list, starting at block 0 + * and having the final block_number record right up against the + * sizeof(disk_block_index==4) at eof + * + * disk_block format is + * number of fourpacks as sizeof(blockoffset_t) bytes + * fourpack1 offset from start of block as sizeof(blockoffset_t) bytes + * fourpack2 offset as sizeof(blockoffset_t) bytes + * fourpackn offset as sizeof(blockoffset_t) bytes + * fourpack1 + * fourpack2 + * fourpackn + * + * fourpack format is + * s1.length as 1 byte + * s1 as s1.length bytes + * s1_id as sizeof( termid_t ) bytes + * s2.prefix as 1 byte (# of bytes from start of s1 to copy as s2.prefix) + * s2.length as 1 byte + * s2 as s2.length bytes + * s2_id as sizeof( termid_t ) bytes + * s3.prefix as 1 byte (# of bytes from start of s2 to copy as s3.prefix) + * s3.length as 1 byte + * s3 as s3.length bytes + * s3_id as sizeof( termid_t ) bytes + * s4.prefix as 1 byte (# of bytes from start of s3 to copy as s3.prefix) + * s4.length as 1 byte ( this is redundant, can be invered, maybe remove ) + * s4 as s4.length bytes + * s4_id as sizeof( termid_t ) bytes + * + */ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "IndexPrivate.hh" +#include +#include + +#include +#include +#include + +#include + +#include + +using namespace std; + + +namespace Ferris +{ + namespace FullTextIndex + { + typedef gint32 tifl_version_t; + static const int TIFL_VERSION_BAD = 0; + static const int TIFL_VERSION_1 = 1; + + /** + * Get a string of the common prefix between two strings + */ + static string common_prefix( const std::string& s1, const std::string& s2 ) + { + int numCommon = 0; + int minlen = min( s1.length(), s2.length() ); + + for( int i=0; i overflow_t; + overflow_t overflow; + + FourPack(); + FourPack( fh_iostream& ss ); + FourPack( overflow_t::iterator iter, overflow_t::iterator ei ); + FourPack( map< termid_t, string >::iterator iter, + map< termid_t, string >::iterator ei ); + + list< termid_t > getSortedTids(); + + public: + + /** + * resolve the given term, 0 for failure. + */ + termid_t lookup( const std::string& term ); + + /** + * Perform a reverse lookup. Note that this method is slightly slower + * than lookup( string ) because it is currently linear time. + * (doesn't matter much for 4 items) + * + * REVERSE + */ + const std::string& lookup( termid_t tid ); + + /** + * Create a new fourpack with the elements from iter to ei + * ei-iter should <= 4 items + */ + static fh_fourpack Create( overflow_t::iterator iter, overflow_t::iterator ei ); + static fh_fourpack Create( map< termid_t, string >::iterator iter, + map< termid_t, string >::iterator ei ); + + /** + * first term of pack + */ + string firstTerm(); + + /** + * Load a fourpack from the given data + */ + static fh_fourpack Read( fh_iostream& ss ); + + /** + * Create a packed version of this fourpack, prefix coding the + * greatest 3 strings + */ + string tostr( bool WriteInTidOrder = false ); + + /** + * Creates a reasonable human readable version of the fourpack + * for debuging sessions + */ + string getDebugString(); + + /** + * return the size of the packed data, ie. tostr().size() + * use this so that caching can be added or the size explicitly + * calculated in a faster method than by making the string each time. + */ + streamsize size( bool WriteInTidOrder = false ); + + /** + * next term from the one given or "" if no next term in this fourpack + */ + string nextTerm( string s ); + + + /** + * Allow walking in reverse lookup mode + * + * REVERSE + */ + termid_t firstTid(); + /** + * Allow walking in reverse lookup mode + * + * REVERSE + */ + termid_t nextTid( termid_t tid ); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Disk block full of fourpack items. + * Each block contains a small header with pointers to the byte offset + * within the block of each fourpack + * + */ + class FERRISEXP_DLLLOCAL DiskBlock + : + public Handlable + { + + protected: + + fh_fclex m_lex; + blocknum_t m_blocknum; + blockoffset_t m_blockUsedBytes; //< mainly used in Create()/append() to keep track of size + bool m_readHeader; //< once the header has been read ensure it isn't again + bool m_readFourpacks; //< to prevent fourpacks being read more than once. also for + // new blocks both m_read* are set to stop attempts to read + + /** + * byte offset of each fourpack in the block + */ + typedef vector< blockoffset_t > fp_addrs_t; + fp_addrs_t fp_addrs; + + /** + * cache the decoded fourpacks here. + */ + typedef map< string, fh_fourpack > m_fps_t; + m_fps_t m_fps; + + DiskBlock( fh_fclex m_lex, blocknum_t blocknum, bool created ); + /** + * Used by Reverse diskblock to create a block with virtual getStream() binding. + */ + DiskBlock( blocknum_t blocknum, bool created ); + + /** + * Seeks the stream to the start of where this block is stored + * ready for reading. + */ + void seekStartBlockG( fh_iostream& ss ); + + /** + * Mainly for debug, reads all the fourpacks off the block into + * m_fps; + */ + void readAllFourPacks(); + + /** + * maybe read in the header info from the disk. + */ + void readHeader(); + + /** + * As a side effect the m_lex->getStream() will be moved to just + * after the header of the block + */ + void skipHeader(); + + /** + * Because subclasses might wish to maintain secondary index(es) + * fourpacks that are read/added are done via this method. + * The default creates a primary index with m_fps and should + * always be called aswell as any subclass impl. + */ + virtual void priv_insertFourpack( fh_fourpack fp ); + + public: + + /** + * Read back a disk block into RAM. Note that this method may not + * fully read the block, it may instead only read part of the block + * for example if you lookup() on the block not all fourpacks are + * always decoded. + */ + static fh_block Read( fh_fclex m_lex, blocknum_t n ); + + /** + * Create a new diskblock ready to append() with elements + */ + static fh_block Create( fh_fclex m_lex, blocknum_t n ); + + /** + * try to append the fourpack to this diskblock, if it doesn't + * fit then false is returned + */ + bool append( fh_fourpack fp ); + + /** + * After the sequence of Create(), many append() calls, the manager can + * call Write() with the stream at the correct location for putting this + * block + */ + void Write( fh_iostream& ss ); + + /** + * find the given term in the fourpacks contained in this block + * 0 for failure + */ + termid_t lookup( const std::string& term ); + + /** + * first term of pack + */ + string firstTerm(); + + /** + * next term from the one given or "" if no next term in this fourpack + */ + string next( string s ); + + /** + * get the stream associated with the disk block, seeked for reading at the + * start of block + */ + virtual fh_iostream getStream(); + + virtual bool getWriteInTidOrder(); + + + /** + * What block is this + */ + blocknum_t getBlockNumber() + { + return m_blocknum; + } + }; + + /** + * A DiskBlock that maintains an in memory reverse index so that + * termid -> fh_fourpack resolution is a fast access method + */ + class FERRISEXP_DLLLOCAL DiskBlock_Reverse + : + public DiskBlock + { + typedef DiskBlock _Base; + + fh_revfclex m_lex; + + protected: + + /** + * reverse lookup cache of the decoded fourpacks. + */ + typedef map< termid_t, fh_fourpack > m_revfps_t; + m_revfps_t m_revfps; + + m_revfps_t::iterator m_walkIter; //< used in firstTerm()/next() to walk fourpacks + + DiskBlock_Reverse( fh_revfclex m_lex, blocknum_t blocknum, bool created ); + + /** + * Also maintain a secondary index m_revfps + */ + virtual void priv_insertFourpack( fh_fourpack fp ); + + public: + + /** + * Read back a disk block into RAM. Note that this method may not + * fully read the block, it may instead only read part of the block + * for example if you lookup() on the block not all fourpacks are + * always decoded. + */ + static fh_revblock Read( fh_revfclex lex, blocknum_t n ); + + /** + * Create a new diskblock ready to append() with elements + */ + static fh_revblock Create( fh_revfclex lex, blocknum_t n ); + + /** + * find the given term in the fourpacks contained in this block + * "" for failure + */ + std::string lookup( termid_t tid ); + + /** + * first term of pack + */ + termid_t firstTid(); + + /** + * next term from the one given or "" if no next term in this fourpack + */ + termid_t next( termid_t s ); + + /** + * get the stream associated with the disk block, seeked for reading at the + * start of block + */ + virtual fh_iostream getStream(); + + virtual bool getWriteInTidOrder(); + }; + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + /** + * Lexicon for storage in 3in4 front coding + */ + class FERRISEXP_DLLLOCAL Lexicon_FrontCodedBlocks + : + public Lexicon + { + typedef Lexicon_FrontCodedBlocks _Self; + typedef Lexicon _Base; + + fh_fstream m_stream; + /** + * Overflow is used to store new terms until sync() + */ + typedef map< string, termid_t > overflow_t; + overflow_t overflow; + + /** + * Index to each disk_block_size byte disk block + * seek address = iter->second * disk_block_size; + */ + typedef map< string, blocknum_t > blockindex_t; + blockindex_t blockindex; + + protected: + + + /** + * reading and writing the blockindex map to disk. + * write() assumes we are at the correct location + * for their data in m_stream + */ + void blockindex_read(); + void blockindex_write(); + + /** + * acquire the block from disk or cache. Use this in preference + * to DiskBlock::Read() so that caching may be done on some of + * the most recent blocks and thus much greater speed. + */ + fh_block getBlock( blocknum_t b ); + fh_block m_getBlock_cache; + + virtual void setIndex( fh_idx idx ); + virtual std::string getFirstTerm(); + virtual std::string getNextTerm( const std::string& s ); + + public: + + Lexicon_FrontCodedBlocks( fh_idx idx = 0, PathManager* path_mgr = 0 ); + virtual ~Lexicon_FrontCodedBlocks(); + + virtual void insert( const std::string& term, termid_t termid ); + virtual termid_t lookup( const std::string& term ); + virtual void sync(); + + fh_iostream getStream(); + + virtual void prepareForInsertions(); + + + static bool reged; + static bool regedx; + static string getClassName() + { return "FrontCodedBlocks (3-in-4)"; } + }; + bool Lexicon_FrontCodedBlocks::reged = LexiconFactory::Instance(). + Register( Lexicon_FrontCodedBlocks::getClassName(), + &MakeObject::Create ); + bool Lexicon_FrontCodedBlocks::regedx = appendToLexiconClassNames( + Lexicon_FrontCodedBlocks::getClassName() ); + + + static bool alias_rg = LexiconFactory::Instance(). + Register( "FrontCodedBlocks", + &MakeObject::Create ); + static bool alias_rx = appendToLexiconAliasNames( "FrontCodedBlocks" ); + + + /********************/ + /********************/ + /********************/ + + class FERRISEXP_DLLLOCAL ReverseLexicon_FrontCodedBlocks + : + public ReverseLexicon + { + typedef ReverseLexicon_FrontCodedBlocks _Self; + typedef ReverseLexicon _Base; + + /** + * Overflow is used to store new terms until sync() + */ + typedef map< termid_t, string > overflow_t; + overflow_t overflow; + overflow_t::iterator m_walkIter; //< used by getFirst/NextTerm() + + /** + * secondary index to each disk_block_size byte disk block + * seek address = iter->second * disk_block_size; + */ + typedef map< termid_t, blocknum_t > blockindex_t; + blockindex_t blockindex; + + fh_fstream m_stream; + + /** + * reading and writing the blockindex map to disk. + * write() assumes we are at the correct location + * for their data in m_stream + */ + void blockindex_read(); + void blockindex_write(); + + /** + * acquire the block from disk or cache. Use this in preference + * to DiskBlock::Read() so that caching may be done on some of + * the most recent blocks and thus much greater speed. + */ + fh_revblock getBlock( blocknum_t b ); + fh_revblock m_getBlock_cache; + + protected: + + virtual void setIndex( fh_idx idx = 0 ); + virtual termid_t getFirstTerm(); + virtual termid_t getNextTerm( termid_t t ); + + public: + + ReverseLexicon_FrontCodedBlocks(); + virtual ~ReverseLexicon_FrontCodedBlocks(); + + virtual string lookup( termid_t tid ); + virtual void insert( const std::string& s, termid_t id ); + virtual bool exists( termid_t id ); + + virtual void sync(); + virtual void prepareForInsertions(); + + string getStreamFileName(); + fh_fstream getStream(); + fh_fstream getBlockIndexStream(); + + static bool reged; + static bool regedx; + static string getClassName() + { return "FrontCodedBlocks (3-in-4)"; } + }; + bool ReverseLexicon_FrontCodedBlocks::reged = ReverseLexiconFactory::Instance(). + Register( ReverseLexicon_FrontCodedBlocks::getClassName(), + &MakeObject::Create ); + bool ReverseLexicon_FrontCodedBlocks::regedx = appendToReverseLexiconClassNames( + ReverseLexicon_FrontCodedBlocks::getClassName() ); + + + static bool ralias_rg = ReverseLexiconFactory::Instance(). + Register( "FrontCodedBlocks", + &MakeObject::Create ); +// static bool ralias_rx = appendToReverseLexiconAliasNames( "FrontCodedBlocks" ); + + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + FourPack::FourPack( ) + {} + + /** + * Load a fourpack from the given data + */ + FourPack::FourPack( fh_iostream& ss ) + { + string term; + termid_t termid; + guint8 len = 0; + readnum( ss, len ); + term = readstring( ss, len ); + readnum( ss, termid ); + overflow.insert( make_pair( term, termid )); +// LG_FTXLEXI_D << "FourPack() LEADING term:" << term << " termid:" << termid << endl; + + for( int i = 0; i < (terms_per_fourpack-1); ++i ) + { + termid = 0; + len = 0; + guint8 prefixsz = 0; + + readnum( ss, prefixsz ); + readnum( ss, len ); + string suffix = readstring( ss, len ); + term = term.substr( 0, prefixsz ) + suffix; + readnum( ss, termid ); + + if( !term.empty() ) + overflow.insert( make_pair( term, termid )); + +// LG_FTXLEXI_D << "FourPack() term:" << term << " termid:" << termid +// << " prefixsz:" << (int)prefixsz +// << " len:" << (int)len +// << endl; + } +// LG_FTXLEXI_D << "FourPack::FourPack() from stream size:" << overflow.size() << endl; + } + + FourPack::FourPack( overflow_t::iterator iter, overflow_t::iterator ei ) + { + for( int i=0; i < terms_per_fourpack && iter != ei; ++i, ++iter ) + { + overflow.insert( make_pair( iter->first, iter->second )); + } +// LG_FTXLEXI_D << "FourPack::FourPack() from iterators size:" << overflow.size() << endl; + } + + + FourPack::FourPack( map< termid_t, string >::iterator iter, + map< termid_t, string >::iterator ei ) + { + for( int i=0; i < terms_per_fourpack && iter != ei; ++i, ++iter ) + { + overflow.insert( make_pair( iter->second, iter->first )); + } + } + + + fh_fourpack + FourPack::Create( overflow_t::iterator iter, overflow_t::iterator ei ) + { + return new FourPack( iter, ei ); + } + + fh_fourpack + FourPack::Create( map< termid_t, string >::iterator iter, + map< termid_t, string >::iterator ei ) + { + return new FourPack( iter, ei ); + } + + + termid_t + FourPack::lookup( const std::string& term ) + { + termid_t ret = 0; + overflow_t::iterator iter = overflow.find( term ); + if( overflow.end() != iter ) + { + ret = iter->second; + } + return ret; + } + + const std::string& + FourPack::lookup( termid_t tid ) + { + static string nullstr = ""; + + for( overflow_t::iterator iter = overflow.begin(); iter != overflow.end(); ++iter ) + { + if( iter->second == tid ) + return iter->first; + } + return nullstr; + } + + string + FourPack::firstTerm() + { + if( !overflow.empty() ) + return overflow.begin()->first; + return ""; + } + + + fh_fourpack + FourPack::Read( fh_iostream& ss ) + { + fh_fourpack ret = new FourPack( ss ); + return ret; + } + + string + FourPack::tostr( bool WriteInTidOrder ) + { + int numberWritten = 1; + if( overflow.empty() ) + { + LG_FTXLEXI_W << "WARNING tostr() called on empty fourpack" << endl; + return ""; + } + if( overflow.size() > terms_per_fourpack ) + { + LG_FTXLEXI_W << "WARNING tostr() called on oversized fourpack" + << " sz:" << overflow.size() + << endl; + } + + typedef list< pair< string, termid_t > > orderedData_t; + orderedData_t orderedData; + + // + // We can store data sorted either by term (the default) or in TID + // order. We thus have to build a temp orderedlist of data in the + // order that it should be on disk. + // + if( WriteInTidOrder ) + { + list< termid_t > sc = getSortedTids(); + for( list< termid_t >::iterator li = sc.begin(); li != sc.end(); ++li ) + { + termid_t tid = *li; + string term = ""; + for( overflow_t::iterator x = overflow.begin(); + x != overflow.end(); ++x ) + { + if( x->second == tid ) + term = x->first; + } + orderedData.push_back( make_pair( term, tid )); + } + } + else + { + for( overflow_t::iterator x = overflow.begin(); + x != overflow.end(); ++x ) + { + orderedData.push_back( make_pair( x->first, x->second )); + } + } + + orderedData_t::iterator x = orderedData.begin(); + + string term = x->first; + fh_stringstream ss; + guint8 fulllen = term.length(); + writenum( ss, fulllen ); + writestring( ss, term ); + writenum( ss, x->second ); + string last = term; + + LG_FTXLEXI_D << "Fourpack::tostr() LEADING term:" << term + << " id:" << x->second + << " overflow.size():" << overflow.size() + << endl; + + for( ++x ; x != orderedData.end(); ++x ) + { + string term = x->first; + string prefix = common_prefix( last, term ); + guint8 prefixlen = prefix.length(); + guint8 postfixlen = term.length() - prefix.length(); + + LG_FTXLEXI_D << "Fourpack::tostr() term:" << term + << " prefix:" << prefix + << " prefixlen:" << (int)prefixlen + << " postfixlen:" << (int)postfixlen + << " id:" << x->second + << " overflow.size():" << overflow.size() + << endl; + writenum( ss, prefixlen ); + writenum( ss, postfixlen ); + writestring( ss, term.substr( prefix.length() ) ); + writenum( ss, x->second ); + + last = term; + ++numberWritten; + } + + // + // For the last pack on disk we have to pad out non filled entries + // this is also needed to make sure that the entry fits into the + // DiskBlock, otherwise we could read over the end of the block and + // part of the index itself which would result in attempts to read + // huge strings etc. + // + for( ; numberWritten < terms_per_fourpack; ++numberWritten ) + { + guint8 len = 0; + termid_t termid = 0; + + writenum( ss, len ); + writenum( ss, len ); + writenum( ss, termid ); + } + + ss << flush; + return ::Ferris::tostr(ss); + } + + streamsize + FourPack::size( bool WriteInTidOrder ) + { + return this->tostr( WriteInTidOrder ).length(); + } + + string + FourPack::getDebugString() + { + fh_stringstream ss; + ss << "FourPack::getDebugString(start) size:" << overflow.size() << endl; + for( overflow_t::iterator x = overflow.begin(); x != overflow.end(); ++x ) + { + string term = x->first; + termid_t tid = x->second; + ss << " tid:" << tid << " term:" << term << endl; + } + ss << "FourPack::getDebugString(end) size:" << overflow.size() << endl; + return ::Ferris::tostr(ss); + } + + string + FourPack::nextTerm( string s ) + { + overflow_t::iterator iter = overflow.find( s ); + if( iter != overflow.end() ) + { + ++iter; + if( iter != overflow.end() ) + return iter->first; + } + return ""; + } + + list< termid_t > + FourPack::getSortedTids() + { + list< termid_t > ret; + for( overflow_t::iterator x = overflow.begin(); x != overflow.end(); ++x ) + { + string term = x->first; + termid_t tid = x->second; + ret.push_back( tid ); + } + ret.sort(); + return ret; + } + + + termid_t + FourPack::firstTid() + { + list< termid_t > sc = FourPack::getSortedTids(); + if( sc.empty() ) + return 0; + return sc.front(); + } + + termid_t + FourPack::nextTid( termid_t tid ) + { + list< termid_t > sc = FourPack::getSortedTids(); + termid_t ret = 0; + + for( list< termid_t >::iterator iter = sc.begin(); iter != sc.end(); ++iter ) + { + if( *iter == tid ) + { + ++iter; + if( iter != sc.end() ) + ret = *iter; + return ret; + } + } + return ret; + } + + + /********************************************************************************/ + /********************************************************************************/ + + DiskBlock::DiskBlock( fh_fclex m_lex, blocknum_t blocknum, bool created ) + : + m_blocknum( blocknum ), + m_lex( m_lex ), + m_blockUsedBytes( sizeof(blockoffset_t) ), // fixed block overhead + m_readHeader( created ), + m_readFourpacks( created ) + { + if( !created ) + readHeader(); + } + + DiskBlock::DiskBlock( blocknum_t blocknum, bool created ) + : + m_blocknum( blocknum ), + m_lex( 0 ), + m_blockUsedBytes( sizeof(blockoffset_t) ), // fixed block overhead + m_readHeader( created ), + m_readFourpacks( created ) + { + } + + void + DiskBlock::seekStartBlockG( fh_iostream& ss ) + { + ss.clear(); + ss.seekg( (m_blocknum-1) * disk_block_size, ios::beg ); + } + + fh_iostream + DiskBlock::getStream() + { + fh_iostream ioss = m_lex->getStream(); + seekStartBlockG( ioss ); + return ioss; + } + + bool + DiskBlock::getWriteInTidOrder() + { + return false; + } + + + void + DiskBlock::readHeader() + { + if( m_readHeader ) + return; + m_readHeader = true; + +// fh_iostream ioss = m_lex->getStream(); +// seekStartBlockG( ioss ); + fh_iostream ioss = getStream(); + + fp_addrs.clear(); + + blockoffset_t count = 0; + readnum( ioss, count ); + LG_FTXLEXI_D << "DiskBlock::readHeader() reading blocknum:" << m_blocknum + << " starting header at (v+2):" << ioss.tellg() + << " have count:" << count + << " good:" << ioss.good() + << endl; + + for( blockoffset_t i = 0; i < count; ++i ) + { + blockoffset_t n = 0; + readnum( ioss, n ); + fp_addrs.push_back( n ); + LG_FTXLEXI_D << "DiskBlock::readHeader() reading blocknum:" << m_blocknum + << " offset:" << n << endl; + } + } + + void + DiskBlock::skipHeader() + { +// fh_iostream ioss = m_lex->getStream(); +// seekStartBlockG( ioss ); + + fh_iostream ioss = getStream(); + ioss.seekg( (fp_addrs.size()+1) * sizeof(blockoffset_t), ios::cur ); + } + + void + DiskBlock::priv_insertFourpack( fh_fourpack fp ) + { + m_fps.insert( make_pair( fp->firstTerm(), fp ) ); + } + + void + DiskBlock::readAllFourPacks() + { + if( m_readFourpacks ) + return; + m_readFourpacks = true; + + LG_FTXLEXI_D << "DiskBlock::readAllFourPacks() block:" << m_blocknum << endl; + + readHeader(); + +// fh_iostream ioss = m_lex->getStream(); +// seekStartBlockG( ioss ); + fh_iostream ioss = getStream(); + + LG_FTXLEXI_D << "DiskBlock::readAllFourPacks(2) block:" << m_blocknum + << " starting payload base at:" << ioss.tellg() << " using offsets from there " + << " have fp_addrs.size():" << fp_addrs.size() + << endl; + + for( fp_addrs_t::iterator iter = fp_addrs.begin(); iter!=fp_addrs.end(); ++iter ) + { + seekStartBlockG( ioss ); + ioss->seekg( *iter, ios::cur ); + fh_fourpack fp = FourPack::Read( ioss ); + LG_FTXLEXI_D << "DiskBlock::readAllFourPacks(for) offset:" << *iter + << " tellg()" << ioss->tellg() << endl; + priv_insertFourpack( fp ); + } + +// // PURE DEBUG +// { +// cerr << "DiskBlock::readAllFourPacks() bn:" << m_blocknum +// << " m_fps.size:" << m_fps.size() +// << " after load dump..." << endl; +// for( m_fps_t::iterator iter = m_fps.begin(); iter != m_fps.end(); ++iter ) +// { +// cerr << "+++first term:" << iter->first << endl; +// } +// } + } + + + fh_block + DiskBlock::Read( fh_fclex m_lex, blocknum_t n ) + { + fh_block ret = new DiskBlock( m_lex, n, false ); + return ret; + } + + + fh_block + DiskBlock::Create( fh_fclex m_lex, blocknum_t n ) + { + fh_block ret = new DiskBlock( m_lex, n, true ); + return ret; + } + + + bool + DiskBlock::append( fh_fourpack fp ) + { + streamsize fpsz = fp->size() + sizeof(blockoffset_t); + + if( m_blockUsedBytes + fpsz > disk_block_size ) + return false; + + m_blockUsedBytes += fpsz; + priv_insertFourpack( fp ); + return true; + } + + void + DiskBlock::Write( fh_iostream& ss ) + { + // For writing the header we use RunningDataOffset to keep track of + // where each fourpack should start relative to the start of this block + blockoffset_t RunningDataOffset = (m_fps.size()+1) * sizeof(blockoffset_t); + blockoffset_t count = m_fps.size(); + + LG_FTXLEXI_D << "DiskBlock::Write(top) block:" << m_blocknum + << " count:" << count + << " should be at offset:" << (m_blocknum-1) * disk_block_size + << " are at:" << ss.tellp() + << " getWriteInTidOrder:" << getWriteInTidOrder() + << endl; + + writenum( ss, count ); + + typedef list< pair< string, fh_fourpack > > orderedData_t; + orderedData_t orderedData; + + // + // We can store data sorted either by term (the default) or in TID + // order. We thus have to build a temp orderedlist of data in the + // order that it should be on disk. + // + if( getWriteInTidOrder() ) + { + typedef map< termid_t, fh_fourpack > TidOrdered_t; + TidOrdered_t TidOrdered; + + // + // First we copy the fourmap map into a map ordered by termID + // then we copy that list in order into a list with term string -> fourpack + // + for( m_fps_t::iterator iter = m_fps.begin(); iter!=m_fps.end(); ++iter ) + { + TidOrdered.insert( make_pair( iter->second->firstTid(), iter->second )); + } + for( TidOrdered_t::iterator iter = TidOrdered.begin(); iter != TidOrdered.end(); ++iter ) + { + orderedData.push_back( make_pair( iter->second->firstTerm(), iter->second )); + } + +// cerr << ">>> DiskBlock::Write() this is the order of the data being written" << endl; +// for( orderedData_t::iterator iter = orderedData.begin(); iter != orderedData.end(); ++iter ) +// { +// cerr << "term:" << iter->first << " fp:" << iter->second->getDebugString() << endl; +// } +// cerr << "<<< DiskBlock::Write() this is the order of the data being written" << endl; + } + else + { + for( m_fps_t::iterator iter = m_fps.begin(); iter!=m_fps.end(); ++iter ) + { + orderedData.push_back( make_pair( iter->first, iter->second )); + } + } + + for( orderedData_t::iterator iter = orderedData.begin(); iter != orderedData.end(); ++iter ) + { + writenum( ss, RunningDataOffset ); + RunningDataOffset += iter->second->size( getWriteInTidOrder() ); + } + for( orderedData_t::iterator iter = orderedData.begin(); iter != orderedData.end(); ++iter ) + { + writestring( ss, iter->second->tostr( getWriteInTidOrder() ) ); + } + + // pad the block + for( ; RunningDataOffset < disk_block_size; ++RunningDataOffset ) + { + ss << '\0'; + } + + LG_FTXLEXI_D << "DiskBlock::Write(done) block:" << m_blocknum + << " count:" << count + << " should be at offset:" << (m_blocknum-1) * disk_block_size + << " are at:" << ss.tellp() + << endl; + } + + struct check_term_header + : + public binary_function< blockoffset_t, blockoffset_t, bool > + { + fh_block m_block; + + check_term_header( fh_block m_block ) + : + m_block( m_block ) + { + } + + string getLeadingFourPackTerm( blockoffset_t offset ) + { + fh_iostream ioss = m_block->getStream(); + ioss.seekg( offset, ios::cur ); + + guint8 len = 0; + string fpterm; + readnum( ioss, len ); + fpterm = readstring( ioss, len ); + return fpterm; + } + + bool operator()( blockoffset_t x, blockoffset_t y ) + { + return getLeadingFourPackTerm( x ) < getLeadingFourPackTerm( y ); + } + + bool operator()( blockoffset_t x, const std::string& y ) + { + return getLeadingFourPackTerm( x ) < y; + } + + bool operator()( const std::string& x, blockoffset_t y ) + { + return x < getLeadingFourPackTerm( y ); + } + }; + + struct reverse_check_term_header + : + public binary_function< blockoffset_t, blockoffset_t, bool > + { + fh_block m_block; + + reverse_check_term_header( fh_block m_block ) + : + m_block( m_block ) + { + } + + termid_t getLeadingFourPackTid( blockoffset_t offset ) + { + fh_iostream ioss = m_block->getStream(); + ioss.seekg( offset, ios::cur ); + + guint8 len = 0; + readnum( ioss, len ); + string fpterm = readstring( ioss, len ); + termid_t termid; + readnum( ioss, termid ); + return termid; + } + + bool operator()( blockoffset_t x, blockoffset_t y ) + { + return getLeadingFourPackTid( x ) < getLeadingFourPackTid( y ); + } + + bool operator()( blockoffset_t x, termid_t y ) + { + return getLeadingFourPackTid( x ) < y; + } + + bool operator()( termid_t x, blockoffset_t y ) + { + return x < getLeadingFourPackTid( y ); + } + }; + + + termid_t + DiskBlock::lookup( const std::string& term ) + { + termid_t ret = 0; + readHeader(); + skipHeader(); + + // + // Try to find the fourpack needed within the unloaded block. Do this by + // performing a binary search on the leading strings in each fourpack + // using the offsets of the start of each fourpack + // + fp_addrs_t::iterator iter = upper_bound( fp_addrs.begin(), fp_addrs.end(), + term, check_term_header( this ) ); + --iter; + blockoffset_t blockOffset = *iter; + + fh_iostream ioss = getStream(); + ioss.seekg( blockOffset, ios::cur ); + fh_fourpack fp = FourPack::Read( ioss ); + return fp->lookup( term ); + + + + + // // +// // Try to find the fourpack needed within the unloaded block. Do this by +// // performing a binary search on the leading strings in each fourpack +// // using the offsets of the start of each fourpack +// // +// // seek: mustard +// // in: +// // alice +// // hatter +// // wonderland +// // +// if( !fp_addrs.empty() && !m_readFourpacks ) +// { +// cerr << "DiskBlock::lookup() trying short cut loading of fourpack, term:" << term << endl; + +// fp_addrs_t::iterator iter = fp_addrs.begin(); +// int fp_addrs_size = fp_addrs.size(); +// int remainingsz = fp_addrs_size % 2 + fp_addrs_size / 2; +// advance( iter, remainingsz ); +// fh_iostream ioss = m_lex->getStream(); + +// blockoffset_t blockOffset = *iter; +// int loopCountDown = 2; + +// while( loopCountDown ) +// { +// blockOffset = *iter; + +// seekStartBlockG( ioss ); +// ioss.seekg( blockOffset, ios::cur ); + +// guint8 len = 0; +// string fpterm; +// readnum( ioss, len ); +// fpterm = readstring( ioss, len ); + +// int direction = fpterm < term ? 1 : -1; + +// cerr << "testing fourpack offset:" << blockOffset +// << " for term:" << term +// << " leading fourpack term is:" << fpterm +// << " fpterm < term:" << (fpterm < term) +// << " dir:" << direction +// << " remainingsz:" << remainingsz +// << " remainingsz/2:" << (remainingsz % 2 + remainingsz / 2) +// << " total.sz:" << fp_addrs.size() +// << endl; + +// if( remainingsz==1 ) +// --loopCountDown; + +// remainingsz = remainingsz % 2 + remainingsz / 2; +// fp_addrs_t::iterator next = iter; +// advance( next, direction * remainingsz ); +// if( iter == next ) +// break; +// iter = next; +// } + +// // +// // read just the desired fourpack +// // +// seekStartBlockG( ioss ); +// ioss.seekg( blockOffset, ios::cur ); +// fh_fourpack fp = FourPack::Read( ioss ); +// return fp->lookup( term ); +// } + + readAllFourPacks(); + + for( m_fps_t::iterator iter = m_fps.begin(); iter!=m_fps.end(); ++iter ) + { + if( ret = iter->second->lookup( term )) + return ret; + } + return ret; + } + + + string + DiskBlock::firstTerm() + { + readAllFourPacks(); + + if( m_fps.empty() ) + { + LG_FTXLEXI_D << "DiskBlock::firstTerm() WITH NO FIRST TERM!" + << " there are no fourpacks!" + << " m_readFourpacks:" << m_readFourpacks + << endl; + return ""; + } + string ret = m_fps.begin()->second->firstTerm(); + if( !ret.empty() ) + return ret; + + LG_FTXLEXI_D << "DiskBlock::firstTerm() WITH NO FIRST TERM!" + << " size:" << m_fps.size() + << endl; + + m_fps_t::iterator iter = m_fps.begin(); + for( ; iter != m_fps.end(); ++iter ) + { + LG_FTXLEXI_D << " fourpack:" << iter->first << " str:" << iter->second->getDebugString() << endl; + } + return ""; + } + + string + DiskBlock::next( string s ) + { + readAllFourPacks(); + + m_fps_t::iterator iter = m_fps.begin(); + while( iter != m_fps.end() ) + { + fh_fourpack fp = iter->second; + termid_t id = fp->lookup( s ); + + LG_FTXLEXI_D << "DiskBlock::next() m_blocknum:" << m_blocknum + << " lookup for s:" << s << " in fp:" + << iter->first << " got tid:" << id + << endl; + + if( id ) + { + string tmp = fp->firstTerm(); + while( tmp != s && tmp != "" ) + tmp = fp->nextTerm( tmp ); + tmp = fp->nextTerm( tmp ); + + LG_FTXLEXI_D << "DiskBlock::next(2) m_blocknum:" << m_blocknum + << " finding next term string for:" << id << " tmp:" << tmp << endl; + if( tmp == "" ) + { + ++iter; + if( iter == m_fps.end() ) + { + LG_FTXLEXI_D << "DiskBlock::next(not in block)" + << " m_blocknum:" << m_blocknum + << " id:" << id + << endl; + return ""; + } + fp = iter->second; + tmp = fp->firstTerm(); + } + return tmp; + } + ++iter; + } + return ""; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + fh_revblock + DiskBlock_Reverse::Read( fh_revfclex lex, blocknum_t n ) + { + fh_revblock ret = new DiskBlock_Reverse( lex, n, false ); + return ret; + } + + fh_revblock + DiskBlock_Reverse::Create( fh_revfclex lex, blocknum_t n ) + { + fh_revblock ret = new DiskBlock_Reverse( lex, n, true ); + return ret; + } + + DiskBlock_Reverse::DiskBlock_Reverse( fh_revfclex lex, blocknum_t blocknum, bool created ) + : + DiskBlock( blocknum, created ), + m_lex( lex ) + { + if( !created ) + readHeader(); + } + + void + DiskBlock_Reverse::priv_insertFourpack( fh_fourpack fp ) + { + m_revfps.insert( make_pair( fp->firstTid(), fp ) ); + _Base::priv_insertFourpack( fp ); + } + + + std::string + DiskBlock_Reverse::lookup( termid_t tid ) + { + readHeader(); + skipHeader(); + + // + // Try to find the fourpack needed within the unloaded block. Do this by + // performing a binary search on the leading strings in each fourpack + // using the offsets of the start of each fourpack + // + fp_addrs_t::iterator iter = upper_bound( fp_addrs.begin(), fp_addrs.end(), + tid, reverse_check_term_header( this ) ); + --iter; + blockoffset_t blockOffset = *iter; + + fh_iostream ioss = getStream(); + ioss.seekg( blockOffset, ios::cur ); + fh_fourpack fp = FourPack::Read( ioss ); + string term = fp->lookup( tid ); +// if( term.empty() ) +// { +// cerr << "DiskBlock_Reverse::lookup(failed) tid:" << tid +// << " blockOffset:" << blockOffset +// << " fp:" << fp->getDebugString() +// << endl; +// readAllFourPacks(); +// cerr << "lookup(empty) tid:" << tid << " FULL LEXICON DUMP --- BEGIN " << endl; +// for( m_revfps_t::iterator iter = m_revfps.begin(); iter != m_revfps.end(); ++iter ) +// { +// cerr << "revfps tid:" << iter->first << endl; +// cerr << iter->second->getDebugString(); +// } +// cerr << "FULL LEXICON DUMP --- END " << endl; + +// } + return term; + + +// readHeader(); +// skipHeader(); + +// // FIXME: should try to get the upper_bound() peeking method working for +// // reverse lexicons +// readAllFourPacks(); +// m_revfps_t::iterator iter = m_revfps.upper_bound( tid ); +// if( iter != m_revfps.begin() ) +// --iter; + +// cerr << "lookup() tid:" << tid +// << " checking in fourpack starting on tid:" << iter->first +// << endl; + +// string ret = iter->second->lookup( tid ); +// if( ret.empty() ) +// { +// cerr << "lookup(empty) tid:" << tid << " FULL LEXICON DUMP --- BEGIN " << endl; +// for( m_revfps_t::iterator iter = m_revfps.begin(); iter != m_revfps.end(); ++iter ) +// { +// cerr << "revfps tid:" << iter->first << endl; +// cerr << iter->second->getDebugString(); +// } +// cerr << "FULL LEXICON DUMP --- END " << endl; +// } +// cerr << "diskblock_reverse::lookup() tid:" << tid +// << " gives term:" << ret +// << endl; + +// return ret; + } + + termid_t + DiskBlock_Reverse::firstTid() + { + readAllFourPacks(); + + if( m_revfps.empty() ) + { + LG_FTXLEXI_D << "DiskBlock::firstTerm() WITH NO FIRST TERM!" + << " there are no fourpacks!" + << " m_readFourpacks:" << m_readFourpacks + << endl; + return 0; + } + + m_walkIter = m_revfps.begin(); + termid_t ret = m_walkIter->second->firstTid(); + return ret; + } + + termid_t + DiskBlock_Reverse::next( termid_t tid ) + { + fh_fourpack fp = m_walkIter->second; + + // + // check the current fourpack for the tid + // + for( termid_t tmp = fp->firstTid(); tmp; tmp = fp->nextTid( tmp ) ) + { + if( tmp == tid ) + { + tmp = fp->nextTid( tmp ); + if( tmp ) + return tmp; + break; + } + } + + // + // check next fourpack + // + ++m_walkIter; + if( m_walkIter == m_revfps.end() ) + return 0; + return m_walkIter->second->firstTid(); + } + + + fh_iostream + DiskBlock_Reverse::getStream() + { + fh_iostream ioss = m_lex->getStream(); + seekStartBlockG( ioss ); + return ioss; + } + + bool + DiskBlock_Reverse::getWriteInTidOrder() + { + return true; + } + + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + + Lexicon_FrontCodedBlocks::Lexicon_FrontCodedBlocks( fh_idx idx, PathManager* path_mgr ) + : + Lexicon( idx, path_mgr ), + m_getBlock_cache( 0 ) + { + setFileName( "/lexicon.prefixcoded" ); + } + + void + Lexicon_FrontCodedBlocks::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + + string filename = m_path_mgr->getBasePath() + "/" + getFileName(); + + Shell::touch( filename ); + m_stream.open( filename, ios::in | ios::out ); + blockindex_read(); + } + + Lexicon_FrontCodedBlocks::~Lexicon_FrontCodedBlocks() + { + if( !overflow.empty() ) + sync(); + } + + fh_block + Lexicon_FrontCodedBlocks::getBlock( blocknum_t b ) + { + if( m_getBlock_cache && m_getBlock_cache->getBlockNumber() == b ) + return m_getBlock_cache; + + m_getBlock_cache = DiskBlock::Read( this, b ); + return m_getBlock_cache; + } + + // + // read all terms into overflow map<> + // + void + Lexicon_FrontCodedBlocks::prepareForInsertions() + { + m_stream.clear(); + string term = getFirstTerm(); + while( !term.empty() ) + { + termid_t id = lookup( term ); + overflow.insert( make_pair( term, id )); + term = getNextTerm( term ); + } + } + + + void + Lexicon_FrontCodedBlocks::insert( const std::string& term, termid_t termid ) + { + overflow.insert( make_pair( term, termid )); + } + + termid_t + Lexicon_FrontCodedBlocks::lookup( const std::string& term ) + { + termid_t ret = 0; + + // + // check overflow first. + // Reason: there should only be an overflow if we are adding terms, + // in which case checking the in core overflow first may + // save a lot of time. + // + if( !overflow.empty() ) + { + overflow_t::iterator iter = overflow.find( term ); + if( overflow.end() != iter ) + { + ret = iter->second; + return ret; + } + } + + + // + // lookup term in prefix blocks + // + blockindex_t::iterator bi = blockindex.lower_bound( term ); + if( bi == blockindex.end() ) + { + // make sure that the last block is not a possible match + LG_FTXLEXI_D << "lower_bound() for term:" << term << " is eof" + << " block index is empty:" << blockindex.empty() + << endl; + if( !blockindex.empty() ) + { + blockindex_t::iterator tmp = blockindex.end(); + --tmp; + bi = tmp; + } + } + else + { + // Unless we hit on the term itself, lower_bound() will return an iterator + // to the block after the one we desire. + bool decrementIterator = (bi != blockindex.begin()); + if( bi != blockindex.end() ) + { + LG_FTXLEXI_D << "lower_bound() term:" << term + << " decrementIterator:" << decrementIterator + << " bi->first:" << bi->first + << endl; + + if( bi->first == term ) + decrementIterator = false; + } + + LG_FTXLEXI_D << "lower_bound() term:" << term + << " decrementIterator:" << decrementIterator + << endl; + + if( decrementIterator ) + { + --bi; + } + } + + blocknum_t blockNum = (bi==blockindex.end()) ? 0 : bi->second; + LG_FTXLEXI_D << "checking in block:" << blockNum + << " for term:" << term + << " bi==end:" << (bi==blockindex.end()) + << endl; + + if( !blockNum ) + { + LG_FTXLEXI_W << "Cant find term:" << term << " in lexicon!" << endl; + return 0; + } + fh_block b = getBlock( blockNum ); + ret = b->lookup( term ); + + return ret; + } + + + + + // + // consolidate overflow with prefix blocks into new file + // + void + Lexicon_FrontCodedBlocks::sync() + { + // + // don't go doing this if we dont have to. + // + if( overflow.empty() ) + { + return; + } + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(top)" << endl; + + // + // read all terms into overflow map<> + // + prepareForInsertions(); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(2 read all terms off disk)" << endl; + + // low level debugging + { + LG_FTXLEXI_D << "FULL LEXICON DUMP --- BEGIN " << endl; + for( overflow_t::iterator i = overflow.begin(); i!=overflow.end(); ++i ) + { + LG_FTXLEXI_D << "term:" << i->first << " id:" << i->second << endl; + } + LG_FTXLEXI_D << "FULL LEXICON DUMP --- END " << endl; + } + + + // + // start writing out the overflow terms in 4 term blocks + // we recreate the blockindex as we go + // + m_stream.close(); +// Util::BackupMaker bmaker; +// try +// { +// cerr << "3-in-4 making backup. " +// << " m_path_mgr:" << toVoid( m_path_mgr ) +// << " basePath:" << m_path_mgr->getBasePath() +// << " filename:" << getFileName() +// << " param:" << (m_path_mgr->getBasePath() + "/" + getFileName()) +// << endl; +// bmaker.perform( m_path_mgr->getBasePath() + "/" + getFileName() ); +// } +// catch( NoSuchSubContext& e ) +// { +// // nothing to backup +// } + + + m_stream.open( m_path_mgr->getBasePath() + "/" + getFileName(), ios::out | ios::trunc ); + blockindex.clear(); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(reopened file)" << endl; + + blocknum_t blockNumber = 1; // current block + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(starting to write blocks)" << endl; + + for( overflow_t::iterator iter = overflow.begin(); iter != overflow.end() ; ) + { + fh_block block = DiskBlock::Create( this, blockNumber ); + + // + // stuff fourpacks into the current block while we can + // + // last is used to contruct a new fourpack from the current iter to last + // inclusive. If the fourpack doesn't fit then iter is not moved so that + // the same fourpack will be constructed next time for insertion into + // the next block. If the fourpack fits then iter is moved to the next + // item after the fourpack + // + while( iter != overflow.end() ) + { + overflow_t::iterator last = iter; + for( int tmp = 0; last != overflow.end() && tmp < terms_per_fourpack; ++tmp ) + ++last; + + fh_fourpack fp = FourPack::Create( iter, last ); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(testing fourpack fits)" + << " blockNum:" << blockNumber + << " fp:" << fp->getDebugString() + << endl; + + if( !block->append( fp ) ) + { + LG_FTXLEXI_D << "block->append failed on term:" << iter->first << endl; + break; + } + iter = last; +// if( iter != overflow.end() ) +// ++iter; + } + + LG_FTXLEXI_D << "Adding to block index term:" << block->firstTerm() + << " block number:" << blockNumber + << endl; + blockindex.insert( make_pair( block->firstTerm(), blockNumber )); + + // move to next new block + block->Write( m_stream ); + ++blockNumber; + } + +// typedef list fplist_t; +// fplist_t fplist; // list of fourpacks that will be saved into this block +// fh_fourpack fp; // current fourpack we are going to write +// fh_fourpack overflow_four = 0; // overflow from last disk_block +// bool atEndOfTerms = false; // if we hit the end we can signal it +// blocknum_t blockNumber = 1; // current block + +// for( overflow_t::iterator iter = overflow.begin(); +// iter != overflow.end() && !atEndOfTerms ; ) +// { +// // +// // prepare for the next block +// // +// streamsize blockBytes = sizeof(blockoffset_t); // fixed block overhead +// fplist.clear(); + +// while( blockBytes < disk_block_size ) +// { + +// // get next fourpack and calc its size +// if( overflow_four ) +// { +// fp = overflow_four; +// overflow_four = 0; +// } +// else +// { +// if( iter == overflow.end() ) +// { +// atEndOfTerms = true; +// fp = 0; +// } +// else +// { +// fp = FourPack::Create( iter, overflow.end() ); +// } +// } + +// streamsize fpsz = 0; +// if( fp ) +// fpsz = fp->size(); + +// // Can we fit this fourpack of data? +// if( atEndOfTerms +// || blockBytes + fpsz + sizeof(blockoffset_t) > disk_block_size ) +// { +// // +// // fp itself won't fit, so we overflow it into the next disk_block +// // +// overflow_four = fp; + +// // +// // create and write this block +// // +// blockindex.insert( make_pair( (*fplist.begin())->firstTerm(), +// blockNumber++ )); +// streamsize offset = fplist.size()+1 * sizeof(blockoffset_t); +// m_stream << (char)fplist.size(); +// for( fplist_t::iterator i = fplist.begin(); i!=fplist.end(); ++i ) +// { +// m_stream << offset; +// offset += (*i)->size(); +// } +// for( fplist_t::iterator i = fplist.begin(); i!=fplist.end(); ++i ) +// { +// m_stream << (*i)->tostr(); +// } +// break; +// } +// else +// { +// fplist.push_back( fp ); +// } +// } +// } + + + // + // write the index at the end of file + // + blockindex_write(); + + // + // cleanup + // + m_stream << flush; + } + + std::string + Lexicon_FrontCodedBlocks::getFirstTerm() + { + if( blockindex.empty() ) + return ""; + + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getFirstTerm() ret:" + << blockindex.begin()->first << endl; + return blockindex.begin()->first; + } + + + std::string + Lexicon_FrontCodedBlocks::getNextTerm( const std::string& s ) + { + string ret = ""; + + blockindex_t::iterator bi = blockindex.lower_bound( s ); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getNextTerm() s:" << s + << " bi==end:" << ( bi == blockindex.end() ) + << endl; + + if( bi != blockindex.end() ) + { + LG_FTXLEXI_D << "getNextTerm() s:" << s << " bi->first:" << bi->first + << " bi->first > s:" << (bi->first > s) + << endl; + + // lower_bound will probably have found the next block to the one we want + if( bi->first > s ) + --bi; + } + + if( bi != blockindex.end() && bi->second ) + { + blocknum_t blockNum = bi->second; + + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getNextTerm() s:" << s + << " block#:" << blockNum + << " blockindex.size():" << blockindex.size() + << endl; + + fh_block block = getBlock( blockNum ); + ret = block->next( s ); +// if( ret.empty() && blockNum <= blockindex.size() ) + if( ret.empty() && blockNum < blockindex.size() ) + { + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getNextTerm() s:" << s + << " block#:" << blockNum + << " ret.empty() " + << endl; + + block = getBlock( ++blockNum ); + ret = block->firstTerm(); + + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getNextTerm() s:" << s + << " block#:" << blockNum + << " first term is:" << ret + << endl; + } + } + else + { + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::getNextTerm() s:" << s + << " bi==end " << endl; + // if bi==end then lower_bound() is still allowing it to maybe + // be in the last block. We should test against the last string + // in the lexicon to see if it exists. + + fh_block block = getBlock( blockindex.size() ); + blockindex_t::iterator last = blockindex.end(); +// --last; + +// // If we are just starting on the last block then do so +// if( s == last->first ) +// ret = block->firstTerm(); + + // let the block handle the end of block string. + ret = block->next( s ); + } + return ret; + } + + void + Lexicon_FrontCodedBlocks::blockindex_read() + { + m_stream.clear(); + blockindex.clear(); + + string filename = m_path_mgr->getBasePath() + "/" + getFileName(); + if( toint( getStrAttr( Resolve(filename), "size", "0" )) == 0 ) + { + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() zero length file" << endl; + return; + } + + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() top" << endl; + guint32 block_index_size = 0; + int versionAndLenghtOffset = sizeof( tifl_version_t ) + sizeof( guint32 ); + m_stream.clear(); + m_stream.seekg( -1 * versionAndLenghtOffset , ios::end ); + if( !m_stream.good() ) + return; + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() seeked to:" + << m_stream.tellg() + << " is_open():" << m_stream.is_open() + << endl; + + readnum( m_stream, block_index_size ); + tifl_version_t fileversion = TIFL_VERSION_BAD; + readnum( m_stream, fileversion ); + if( fileversion != TIFL_VERSION_1 ) + { + fh_stringstream ss; + ss << "Lexicon_FrontCodedBlocks::blockindex_read() " + << " unknown file version for on disk lexicon!" + << " fileversion:" << fileversion + << " path:" << filename + << " size:" << getStrAttr( Resolve(filename), "size", "0" ) + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() block_index_size:" << block_index_size << endl; + LG_FTXLEXI_D << " good:" << m_stream.good() + << " eof:" << m_stream.eof() + << " fail:" << m_stream.fail() + << endl; + m_stream.clear(); + streamsize offset = -1 * versionAndLenghtOffset; + offset -= block_index_size; + m_stream.seekg( offset, ios::end ); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() seeked2: " + << " eofminus:" << offset + << " tellg():" << m_stream.tellg() + << " good:" << m_stream.good() + << " eof:" << m_stream.eof() + << " fail:" << m_stream.fail() + << endl; + + // + // assertion: we should be at a block boundry now + // + if( m_stream.tellg() % disk_block_size != 0 ) + { + LG_FTXLEXI_W << "Index into lexicon is corrupt. Cant lookup start of index string table from eof" << endl; + } + + guint32 number_of_entries = 0; + readnum( m_stream, number_of_entries ); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() number_of_entries:" << number_of_entries << endl; + + for( int block_number=1; block_number <= number_of_entries; ++block_number ) + { + guint8 len = 0; + readnum( m_stream, len ); + const string firststr = readstring( m_stream, len ); + LG_FTXLEXI_D << "adding to block index term:" << firststr << " at block:" << block_number << endl; + blockindex.insert( make_pair( firststr, block_number )); + } + } + + void + Lexicon_FrontCodedBlocks::blockindex_write() + { + m_stream.clear(); + guint32 block_index_size = 0; + guint32 number_of_entries = blockindex.size(); + + writenum( m_stream, number_of_entries ); + block_index_size += sizeof(number_of_entries); + + for( blockindex_t::iterator iter = blockindex.begin(); + iter != blockindex.end(); ++iter ) + { + string firststr = iter->first; + blocknum_t block_number = iter->second; + + guint8 len = firststr.length(); + block_index_size += 1 + len; + writenum( m_stream, len ); + writestring( m_stream, firststr ); + LG_FTXLEXI_D << "blockindex_write() len:" << (int)len << " term:" << firststr << endl; + } + writenum( m_stream, block_index_size ); + tifl_version_t fileversion = TIFL_VERSION_1; + writenum( m_stream, fileversion ); + } + + fh_iostream + Lexicon_FrontCodedBlocks::getStream() + { + return m_stream; + } + + /****************************************/ + /****************************************/ + /****************************************/ + /****************************************/ + /****************************************/ + /****************************************/ + + ReverseLexicon_FrontCodedBlocks::ReverseLexicon_FrontCodedBlocks() + : + m_getBlock_cache( 0 ) + { + } + + ReverseLexicon_FrontCodedBlocks::~ReverseLexicon_FrontCodedBlocks() + { + sync(); + } + + string + ReverseLexicon_FrontCodedBlocks::getStreamFileName() + { + string filename = m_path_mgr->getBasePath() + "/" + getFileName(); + return filename; + } + + + fh_fstream + ReverseLexicon_FrontCodedBlocks::getStream() + { + string filename = getStreamFileName(); + + Shell::touch( filename ); + m_stream.close(); + m_stream.open( filename, ios::in | ios::out ); + return m_stream; + } + + + fh_fstream + ReverseLexicon_FrontCodedBlocks::getBlockIndexStream() + { + string filename = getStreamFileName() + ".blockindex"; + Shell::touch( filename ); + fh_fstream ret; + ret.open( filename, ios::in | ios::out ); + return ret; + } + + void + ReverseLexicon_FrontCodedBlocks::blockindex_read() + { + fh_istream iss = getBlockIndexStream(); + + string filename = getStreamFileName(); + if( toint( getStrAttr( Resolve(filename), "size", "0" )) == 0 ) + { + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::blockindex_read() zero length file" << endl; + return; + } + + + tifl_version_t fileversion = TIFL_VERSION_BAD; + readnum( iss, fileversion ); + if( fileversion != TIFL_VERSION_1 ) + { + fh_stringstream ss; + ss << "ReverseLexicon_FrontCodedBlocks::blockindex_read() " + << " unknown file version for on disk lexicon!" + << " fileversion:" << fileversion + << endl; + Throw_FullTextIndexException( tostr(ss), 0 ); + } + + guint32 number_of_entries = 0; + readnum( iss, number_of_entries ); + LG_FTXLEXI_D << "RevLexicon::sec_read() number_of_entries:" << number_of_entries << endl; + + for( int block_number=1; block_number <= number_of_entries; ++block_number ) + { + termid_t tid = 0; + readnum( iss, tid ); + LG_FTXLEXI_D << "adding to block index tid:" << tid << " at block:" << block_number << endl; + blockindex.insert( make_pair( tid, block_number )); + } + } + + void + ReverseLexicon_FrontCodedBlocks::blockindex_write() + { + fh_iostream ioss = getBlockIndexStream(); + ioss.clear(); + guint32 block_index_size = 0; + guint32 number_of_entries = blockindex.size(); + + tifl_version_t fileversion = TIFL_VERSION_1; + writenum( ioss, fileversion ); + writenum( ioss, number_of_entries ); + block_index_size += sizeof(number_of_entries); + + for( blockindex_t::iterator iter = blockindex.begin(); + iter != blockindex.end(); ++iter ) + { + termid_t tid = iter->first; + blocknum_t block_number = iter->second; + + block_index_size += sizeof(tid); + writenum( ioss, tid ); + } + } + + void + ReverseLexicon_FrontCodedBlocks::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + + string filename = m_path_mgr->getBasePath() + "/" + getFileName(); + Shell::touch( filename ); + m_stream.open( filename, ios::in | ios::out ); + blockindex_read(); + } + + + fh_revblock + ReverseLexicon_FrontCodedBlocks::getBlock( blocknum_t b ) + { + if( m_getBlock_cache && m_getBlock_cache->getBlockNumber() == b ) + return m_getBlock_cache; + + m_getBlock_cache = DiskBlock_Reverse::Read( this, b ); + return m_getBlock_cache; + } + + void + ReverseLexicon_FrontCodedBlocks::insert( const std::string& s, termid_t id ) + { + overflow.insert( make_pair( id, s )); + } + + bool + ReverseLexicon_FrontCodedBlocks::exists( termid_t id ) + { + return lookup( id ) != ""; + } + + termid_t + ReverseLexicon_FrontCodedBlocks::getFirstTerm() + { + prepareForInsertions(); + + if( overflow.empty() ) + return 0; + + LG_FTXLEXI_D << "ReverseLexicon_FrontCodedBlocks::getFirstTerm()" + << " overflow.size:" << overflow.size() << endl; + + m_walkIter = overflow.begin(); + return m_walkIter->first; + } + + + + termid_t + ReverseLexicon_FrontCodedBlocks::getNextTerm( termid_t tid ) + { + ++m_walkIter; + if( m_walkIter == overflow.end() ) + return 0; + return m_walkIter->first; + } + + + void + ReverseLexicon_FrontCodedBlocks::sync() + { + // + // don't go doing this if we dont have to. + // + if( overflow.empty() ) + { + return; + } + LG_FTXLEXI_D << "ReverseLexicon_FrontCodedBlocks::sync(top)" + << " overflow.size:" << overflow.size() << endl; + + // + // read all terms into overflow map<> + // + prepareForInsertions(); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(2 read all terms off disk)" << endl; + +// // low level debugging +// { +// cerr << "FULL LEXICON DUMP --- BEGIN " << endl; +// for( overflow_t::iterator i = overflow.begin(); i!=overflow.end(); ++i ) +// { +// cerr << "term:" << i->first << " id:" << i->second << endl; +// } +// cerr << "FULL LEXICON DUMP --- END " << endl; +// } + + // + // start writing out the overflow terms in 4 term blocks + // we recreate the blockindex as we go + // + m_stream.close(); + Util::BackupMaker bmaker; + bmaker.perform( m_path_mgr->getBasePath() + "/" + getFileName() ); + + m_stream.open( getStreamFileName(), ios::out | ios::trunc ); + blockindex.clear(); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(reopened file)" << endl; + + blocknum_t blockNumber = 1; // current block + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(starting to write blocks)" << endl; + + for( overflow_t::iterator iter = overflow.begin(); iter != overflow.end(); ) + { + fh_revblock block = DiskBlock_Reverse::Create( this, blockNumber ); + + // + // stuff fourpacks into the current block while we can + // + // last is used to contruct a new fourpack from the current iter to last + // inclusive. If the fourpack doesn't fit then iter is not moved so that + // the same fourpack will be constructed next time for insertion into + // the next block. If the fourpack fits then iter is moved to the next + // item after the fourpack + // + while( iter != overflow.end() ) + { + overflow_t::iterator last = iter; + for( int tmp = 0; last != overflow.end() && tmp < terms_per_fourpack; ++tmp ) + ++last; + + fh_fourpack fp = FourPack::Create( iter, last ); + LG_FTXLEXI_D << "Lexicon_FrontCodedBlocks::sync(testing fourpack fits)" + << " blockNum:" << blockNumber + << " fp:" << fp->getDebugString() + << endl; + + if( !block->append( fp ) ) + { + LG_FTXLEXI_D << "block->append failed on term:" << iter->first << endl; + break; + } + iter = last; + } + + LG_FTXLEXI_D << "Adding to block index term:" << block->firstTerm() + << " block number:" << blockNumber + << endl; + blockindex.insert( make_pair( block->firstTid(), blockNumber )); + + // move to next new block + block->Write( m_stream ); + ++blockNumber; + } + + LG_FTXLEXI_D << "ReverseLexicon_FrontCodedBlocks::sync() done writing the blocks. " << endl; + + + // + // write the index at the end of file + // + blockindex_write(); + + // + // cleanup + // + m_stream << flush; + } + + void + ReverseLexicon_FrontCodedBlocks::prepareForInsertions() + { + for( blockindex_t::iterator bi = blockindex.begin(); bi != blockindex.end(); ++bi ) + { + fh_revblock b = getBlock( bi->second ); + + for( termid_t tid = b->firstTid(); tid; tid = b->next( tid ) ) + { + string term = b->lookup( tid ); +// cerr << "ReverseLexicon_FrontCodedBlocks::prepareForInsertions()" +// << " tid:" << tid << " term:" << term << endl; + overflow.insert( make_pair( tid, term ) ); + } + } + + LG_FTXLEXI_D << "ReverseLexicon_FrontCodedBlocks::prepareForInsertions(end)" + << " overflow.sz:" << overflow.size() << endl; + + } + + + string + ReverseLexicon_FrontCodedBlocks::lookup( termid_t tid ) + { + string ret = ""; + + // + // check overflow first. + // Reason: there should only be an overflow if we are adding terms, + // in which case checking the in core overflow first may + // save a lot of time. + // + if( !overflow.empty() ) + { + overflow_t::iterator iter = overflow.find( tid ); + if( overflow.end() != iter ) + { + ret = iter->second; + return ret; + } + } + + // + // lookup term in prefix blocks + // + blockindex_t::iterator bi = blockindex.upper_bound( tid ); + if( bi == blockindex.begin() ) + return ""; + --bi; + + blocknum_t blockNum = bi->second; + LG_FTXLEXI_D << "checking in block:" << blockNum + << " for tid:" << tid + << endl; + + fh_revblock b = getBlock( blockNum ); + ret = b->lookup( tid ); + + LG_FTXLEXI_D << "ReverseLexicon_FrontCodedBlocks::lookup() tid:" << tid + << " blockNum:" << blockNum + << " ret:" << ret << endl; + return ret; + } + + + }; +}; diff --git a/Indexing/UncompressedDB4.cpp b/Indexing/UncompressedDB4.cpp new file mode 100644 index 0000000..11a4741 --- /dev/null +++ b/Indexing/UncompressedDB4.cpp @@ -0,0 +1,308 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: UncompressedDB4.cpp,v 1.4 2010/09/24 21:31:08 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +/** + * Just stores the data without compression in a db4 file. + * + * Should be the simplest codepath and maybe the fastest for very fast disks + * with large in memory caches. + */ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "IndexPrivate.hh" +#include +#include + +#include +#include +#include + +#include + +#include + +#include + +using namespace std; +using namespace STLdb4; + + +namespace Ferris +{ + namespace FullTextIndex + { + class FERRISEXP_DLLLOCAL Lexicon_Uncompressed + : + public Lexicon + { + typedef Lexicon_Uncompressed _Self; + typedef Lexicon _Base; + + fh_database m_db; + Database::iterator m_iter; + + protected: + + virtual void setIndex( fh_idx idx ); + virtual std::string getFirstTerm(); + virtual std::string getNextTerm( const std::string& s ); + + public: + + Lexicon_Uncompressed( fh_idx idx = 0 ); + virtual ~Lexicon_Uncompressed(); + + virtual void insert( const std::string& term, termid_t termid ); + virtual termid_t lookup( const std::string& term ); + virtual void sync(); + + static bool reged; + static bool regedx; + static string getClassName() + { return "Uncompressed (db4 hash)"; } + }; + bool Lexicon_Uncompressed::reged = LexiconFactory::Instance(). + Register( Lexicon_Uncompressed::getClassName(), + &MakeObject::Create ); + bool Lexicon_Uncompressed::regedx = appendToLexiconClassNames( + Lexicon_Uncompressed::getClassName() ); + + + static bool rg = LexiconFactory::Instance(). + Register( "Uncompressed", &MakeObject::Create ); + static bool rx = appendToLexiconAliasNames( "Uncompressed" ); + + + Lexicon_Uncompressed::Lexicon_Uncompressed( fh_idx idx ) + : + Lexicon( idx ), + m_db( 0 ) + { + setFileName( "/lexicon.db" ); + } + + void + Lexicon_Uncompressed::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + try + { + string filename = CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ); + LG_IDX_D << "Lexicon_Uncompressed::setIndex() filename:" << filename << endl; + m_db = new Database( DB_HASH, filename ); + } + catch( exception& e ) + { + LG_IDX_W << "Error opening lexicon e:" << e.what() << endl; + throw; + } + } + + + Lexicon_Uncompressed::~Lexicon_Uncompressed() + { + if( m_db ) + m_db->sync(); + } + + void + Lexicon_Uncompressed::insert( const std::string& term, termid_t termid ) + { + LG_IDX_D << "Lexicon_Uncompressed::insert() term:" << term << " tid:" << termid + << " db:" << toVoid( GetImpl( m_db )) << endl; + + m_db[ term ] = tostr( termid ); + } + + termid_t + Lexicon_Uncompressed::lookup( const std::string& term ) + { + string s = tostr( 0 ); + Database::iterator di = m_db->find( term ); + if( di != m_db->end() ) + di.getValue( s ); + return toType< termid_t >( s ); + } + + void + Lexicon_Uncompressed::sync() + { + if( m_db ) + m_db->sync(); + } + + std::string + Lexicon_Uncompressed::getFirstTerm() + { + LG_IDX_D << "Lexicon_Uncompressed::getFirstTerm(t)" << endl; + LG_IDX_D << "Lexicon_Uncompressed::getFirstTerm(b==e)" + << (m_db->begin() == m_db->end()) << endl; + if( m_db->begin() == m_db->end() ) + { + m_iter = m_db->end(); + return ""; + } + + m_iter = m_db->begin(); + return getNextTerm(""); + } + + std::string + Lexicon_Uncompressed::getNextTerm( const std::string& s ) + { + if( m_iter == m_db->end() ) + return ""; + + string v = ""; + m_iter.getKey( v ); + ++m_iter; + return v; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + + class FERRISEXP_DLLLOCAL ReverseLexicon_Uncompressed + : + public ReverseLexicon + { + fh_database getDB(); + fh_database m_db; + Database::iterator m_iter; + + protected: + + virtual termid_t getFirstTerm(); + virtual termid_t getNextTerm( termid_t t ); + + public: + ReverseLexicon_Uncompressed() + : + m_db( 0 ) + { + setFileName("uncompressed.rlexicon"); + } + + virtual void insert( const std::string& s, termid_t id ); + virtual std::string lookup( termid_t id ); + virtual bool exists( termid_t id ); + virtual void sync() + { + if( m_db ) + getDB()->sync(); + } + + static bool reged; + static bool regedx; + static string getClassName() + { return "Uncompressed (db4 hash)"; } + }; + bool ReverseLexicon_Uncompressed::reged = ReverseLexiconFactory::Instance(). + Register( ReverseLexicon_Uncompressed::getClassName(), + &MakeObject::Create ); + bool ReverseLexicon_Uncompressed::regedx = appendToReverseLexiconClassNames( + ReverseLexicon_Uncompressed::getClassName() ); + + static bool rlx_reged = ReverseLexiconFactory::Instance(). + Register( "Uncompressed", + &MakeObject::Create ); + static bool rlx_regedx = appendToReverseLexiconClassNames( "Uncompressed" ); + + + fh_database + ReverseLexicon_Uncompressed::getDB() + { + if( !m_db ) + { + string filename = CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ); + LG_IDX_D << "ReverseLexicon_Uncompressed::getDB() fn:" << filename << endl; + + m_db = new Database( DB_HASH, filename ); + } + return m_db; + } + + + void + ReverseLexicon_Uncompressed::insert( const std::string& s, termid_t id ) + { + fh_database db = getDB(); + LG_IDX_D << "ReverseLexicon_Uncompressed::insert() s:" << s << " id:" << id << endl; + db[ tostr(id) ] = s; + } + + std::string + ReverseLexicon_Uncompressed::lookup( termid_t id ) + { + fh_database db = getDB(); + return db[ tostr(id) ]; + } + + bool + ReverseLexicon_Uncompressed::exists( termid_t id ) + { + fh_database db = getDB(); + return db->find( tostr(id) ) != db->end(); + } + + + termid_t + ReverseLexicon_Uncompressed::getFirstTerm() + { + fh_database db = getDB(); + + if( db->begin() == db->end() ) + { + m_iter = db->end(); + return 0; + } + + m_iter = db->begin(); + return getNextTerm( 0 ); + } + + termid_t + ReverseLexicon_Uncompressed::getNextTerm( termid_t t ) + { + fh_database db = getDB(); + if( m_iter == db->end() ) + return 0; + + string v; + m_iter.getKey( v ); + ++m_iter; + return toType(v); + } + + + }; +}; + diff --git a/Indexing/XMLLexicon.cpp b/Indexing/XMLLexicon.cpp new file mode 100644 index 0000000..5ab34a0 --- /dev/null +++ b/Indexing/XMLLexicon.cpp @@ -0,0 +1,280 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + libferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: XMLLexicon.cpp,v 1.3 2010/09/24 21:31:08 ben Exp $ + + ******************************************************************************* + ******************************************************************************* + ******************************************************************************/ + +/** + * Just stores the data without compression in an XML file. + * + * The entire lexicon is loaded into RAM at startup so it should operate + * very quickly + */ + +#include "FullTextIndexer.hh" +#include "FullTextIndexer_private.hh" +#include "IndexPrivate.hh" +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include + +using namespace std; +using namespace STLdb4; + +#define X(str) XStr(str).unicodeForm() + +namespace Ferris +{ + namespace FullTextIndex + { + class FERRISEXP_DLLLOCAL Lexicon_XML + : + public Lexicon + { + typedef Lexicon_XML _Self; + typedef Lexicon _Base; + + bool m_dirty; + typedef map< string, termid_t > m_lexicon_t; + m_lexicon_t m_lexicon; + m_lexicon_t::iterator m_iter; + + void load(); + void save(); + + protected: + + virtual void setIndex( fh_idx idx ); + virtual std::string getFirstTerm(); + virtual std::string getNextTerm( const std::string& s ); + + public: + + Lexicon_XML( fh_idx idx = 0 ); + virtual ~Lexicon_XML(); + + virtual void insert( const std::string& term, termid_t termid ); + virtual termid_t lookup( const std::string& term ); + virtual void sync(); + + static bool reged; + static bool regedx; + static string getClassName() + { return "XML"; } + }; + bool Lexicon_XML::reged = LexiconFactory::Instance(). + Register( Lexicon_XML::getClassName(), + &MakeObject::Create ); + bool Lexicon_XML::regedx = appendToLexiconClassNames( + Lexicon_XML::getClassName() ); + + + static bool rg = LexiconFactory::Instance(). + Register( "XML", &MakeObject::Create ); + static bool rx = appendToLexiconAliasNames( "XML" ); + + + Lexicon_XML::Lexicon_XML( fh_idx idx ) + : + Lexicon( idx ), + m_dirty( false ) + { + setFileName( "/lexicon.xml" ); + m_iter = m_lexicon.end(); + } + + void + Lexicon_XML::load() + { + try + { + string filename = CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ); + fh_context c = Resolve( filename ); + if( toint( getStrAttr( c, "size", "0" )) > 0 ) + { + fh_ifstream iss( filename ); + fh_domdoc doc = Ferris::Factory::StreamToDOM( iss ); + DOMElement* root = doc->getDocumentElement(); + + for( DOMNode* n = root->getFirstChild(); n ; n = n->getNextSibling() ) + { + if( n->getNodeType() == DOMNode::ELEMENT_NODE ) + { + DOMElement* child = (DOMElement*)n; + string sid = getAttribute( child, "id" ); + termid_t id = toType(sid); + string term = XML::getChildText( child ); + m_lexicon.insert( make_pair( term, id )); + } + } + + // + // The following is MUCH slower! + // +// cerr << "Lexicon_XML::load(x) nl->getLength:" << nl->getLength() << endl; +// for( int i=0; i < nl->getLength(); ++i ) +// { +// if( i % 100 == 1 ) +// { +// cerr << "Lexicon_XML::load(x) nl->getLength:" << nl->getLength() +// << " i:" << i << endl; +// } + +// DOMNode* n = nl->item( i ); +// if( n->getNodeType() == DOMNode::ELEMENT_NODE ) +// { +// DOMElement* child = (DOMElement*)n; +// string sid = getAttribute( child, "id" ); +// termid_t id = toType(sid); +// // string term = getAttribute( child, "term" ); +// string term = XML::getChildText( child ); +// m_lexicon.insert( make_pair( term, id )); +// } +// } + } + } + catch( NoSuchSubContext& e ) + {} + catch( exception& e ) + { + cerr << "Lexicon_XML::load() general e:" << e.what() << endl; + throw; + } + } + + void + Lexicon_XML::save() + { + DOMImplementation *impl = Ferris::Factory::getDefaultDOMImpl(); + fh_domdoc doc = impl->createDocument( 0, X("lexicon"), 0 ); + DOMElement* root = doc->getDocumentElement(); + + for( m_lexicon_t::iterator li = m_lexicon.begin(); li!=m_lexicon.end(); ++li ) + { + DOMElement* e = doc->createElement( X("keyval") ); + root->appendChild( e ); + setAttribute( e, "id", tostr(li->second) ); +// setAttribute( e, "term", li->first ); + + DOMText* payload = doc->createTextNode( X(li->first.c_str())); + e->appendChild( payload ); + } + fh_stringstream ss = tostream( doc ); + + fh_ofstream oss( CleanupURL( m_path_mgr->getBasePath() + "/" + getFileName() ) ); + std::copy( std::istreambuf_iterator(ss), + std::istreambuf_iterator(), + std::ostreambuf_iterator(oss)); + oss << flush; + } + + + void + Lexicon_XML::setIndex( fh_idx idx ) + { + _Base::setIndex( idx ); + try + { + Ferris::Factory::ensureXMLPlatformInitialized(); + load(); + } + catch( exception& e ) + { + LG_IDX_D << "Error opening lexicon e:" << e.what() << endl; + throw; + } + } + + + Lexicon_XML::~Lexicon_XML() + { + if( m_dirty ) + save(); + } + + void + Lexicon_XML::insert( const std::string& term, termid_t termid ) + { + m_lexicon[ term ] = termid; + m_dirty = true; + } + + termid_t + Lexicon_XML::lookup( const std::string& term ) + { + m_lexicon_t::iterator li = m_lexicon.find( term ); + if( li != m_lexicon.end() ) + return li->second; + return 0; + } + + void + Lexicon_XML::sync() + { + if( m_dirty ) + save(); + } + + std::string + Lexicon_XML::getFirstTerm() + { + if( m_lexicon.empty() ) + { + m_iter = m_lexicon.end(); + return ""; + } + + m_iter = m_lexicon.begin(); + return getNextTerm(""); + } + + std::string + Lexicon_XML::getNextTerm( const std::string& s ) + { + if( m_iter == m_lexicon.end() ) + return ""; + + string v = m_iter->first; + ++m_iter; + return v; + } + + /********************************************************************************/ + /********************************************************************************/ + /********************************************************************************/ + }; +}; + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d694bd4 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,52 @@ +AUTOMAKE_OPTIONS = dist-bzip2 dist-xz subdir-objects + +NULL= + +if HAVE_GTK2 +FERRISUIDIR = FerrisUI appsui +endif + +if USE_CUSTOMALLOC +CUSTOMALLOCDIR = customalloc +endif + +if HAVE_XALAN +XSLTFUNCTIONSDIR = xsltfunctions +endif + +if HAVE_GCJ +GCJDIR = FerrisGCJ +endif + +if HAVE_QTGUI +FERRISQTDIR = FerrisQtGui +endif + +SUBDIRS = ThirdParty $(CUSTOMALLOCDIR) \ + DBusGlue \ + $(GCJDIR) mg Indexing \ + factories \ + FerrisGlue \ + Ferris fulltextindexers_custom_plugin eaindexers_custom_plugin apps \ + $(FERRISQTDIR) \ + $(FERRISUIDIR) \ + plugins \ + tests dot-ferris \ + cc media firsttime $(XSLTFUNCTIONSDIR) \ + noarch migration perl exposures patches + +bin_SCRIPTS = ferris-config + +EXTRA_DIST = \ +ferris-config.in \ +ferris.pc.in \ +ferris.pc \ +ferrisui.pc.in \ +ferrisui.pc \ +ferrisxslt.pc.in \ +ferrisxslt.pc + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ferris.pc ferrisui.pc ferrisxslt.pc + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..87c592d --- /dev/null +++ b/Makefile.in @@ -0,0 +1,1315 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/ferris-config.in $(srcdir)/ferris.pc.in \ + $(srcdir)/ferrisui.pc.in $(srcdir)/ferrisxslt.pc.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO acconfig.h compile config.guess config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = ferris-config ferris.pc ferrisui.pc ferrisxslt.pc +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = ThirdParty customalloc DBusGlue FerrisGCJ mg Indexing \ + factories FerrisGlue Ferris fulltextindexers_custom_plugin \ + eaindexers_custom_plugin apps FerrisQtGui FerrisUI appsui \ + plugins tests dot-ferris cc media firsttime xsltfunctions \ + noarch migration perl exposures patches +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = dist-bzip2 dist-xz subdir-objects +NULL = +@HAVE_GTK2_TRUE@FERRISUIDIR = FerrisUI appsui +@USE_CUSTOMALLOC_TRUE@CUSTOMALLOCDIR = customalloc +@HAVE_XALAN_TRUE@XSLTFUNCTIONSDIR = xsltfunctions +@HAVE_GCJ_TRUE@GCJDIR = FerrisGCJ +@HAVE_QTGUI_TRUE@FERRISQTDIR = FerrisQtGui +SUBDIRS = ThirdParty $(CUSTOMALLOCDIR) \ + DBusGlue \ + $(GCJDIR) mg Indexing \ + factories \ + FerrisGlue \ + Ferris fulltextindexers_custom_plugin eaindexers_custom_plugin apps \ + $(FERRISQTDIR) \ + $(FERRISUIDIR) \ + plugins \ + tests dot-ferris \ + cc media firsttime $(XSLTFUNCTIONSDIR) \ + noarch migration perl exposures patches + +bin_SCRIPTS = ferris-config +EXTRA_DIST = \ +ferris-config.in \ +ferris.pc.in \ +ferris.pc \ +ferrisui.pc.in \ +ferrisui.pc \ +ferrisxslt.pc.in \ +ferrisxslt.pc + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ferris.pc ferrisui.pc ferrisxslt.pc +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +ferris-config: $(top_builddir)/config.status $(srcdir)/ferris-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +ferris.pc: $(top_builddir)/config.status $(srcdir)/ferris.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +ferrisui.pc: $(top_builddir)/config.status $(srcdir)/ferrisui.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +ferrisxslt.pc: $(top_builddir)/config.status $(srcdir)/ferrisxslt.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS uninstall-pkgconfigDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..359e22f --- /dev/null +++ b/README @@ -0,0 +1,147 @@ +Make sure you have run the following +$ ferris-first-time-user --setup-defaults +to setup each user who is going to use libferris. +Files installed into /etc/skel should setup new users created +after libferris was installed. The ferris-first-time-user also +updates skel files with sane values from the user environment. + +When you are installing libferris don't forget to run +cc/capplets/logging/ferris-capplet-logging and make sure your debug +levels are set to None or Emergency using the ``all'' slider. Running +ferris-first-time-user should do that automatically for you. Though +when you update to a new libferris, new functionality might be +included with default logging levels higher than you might like. + + +C++ Virtual file system + +As of version 1.1.61 the test suite has been moved out of the main +distro tarball to save space and because the testing needs the machine +to be setup in a given way. Testing should now be performed in a +virtual machine. + +This is a Virtual file system implementation that relies quite a lot +on the Extended Attributes (EA) paradigm. With EA, key-value pairs are +associated with files and directories to offer create, read, write and +update access to metadata about files. This metadata and the file +contents can also be indexed with libferris to provide powerful search +capabilities. Access to file content is done using std::iostreams. + +The design is also flexable enough to allow internet protocols to +integrate providing C++ IOStreams and EA about each object. + +There is an 'ls' client for the VFS. + +Requirements: + + gcc 3.1+ + ferrisloki see the witme sourceforge site + libferrisstreams see the witme sourceforge site + stldb4 see the witme sourceforge site + fam++2 see the fampp sourceforge site + openssl + glib/gtk2 + Qt 4.5+ + Soprano (Installed with KDE4 by default) + libsigc++ 1.2+ + xerces-c 3.x + xalan-c 1.10+ (optional but recommended) + a MIME engine either gnome, KDE, or libfile. + +Optional but very highly recommended (only needed at build time): + pccts 1.33mr22 + +Optional but very highly recommended: + gimp 1.2.1 + Imlib2 1.0.2 + libjpeg 6b + libpng 1.0.9 + ImageMagick-c++ 5.2.7 + libattr (xfs) 1.1.3 (http://oss.sgi.com/projects/xfs/) + xqilla + +Optional recommended: + See configure.ac, plugins/context and plugins/eagenerators + and see if something looks like it is interesting. + +There is optional support for building against STLPort + +Note that many of the icons in media/icons are by jimmac +http://jimmac.musichall.cz/ +Thanks for the nice icons jimmac :) + + +-------------------------------------------------------------------------------- + +SORTING: + A sort filter is made up of + :!#:attrName + Where the :!#: part is optional extra information about the sort. + +The attribute name is the name of the attribute +to sort on. The default action is a case sensitive sort, so for example to sort +a dir by filename you can use +./ls . --sort=name +And to reverse that sort +./ls . --sort=':!:name' + +The # in the above example means to perform comparisons numerically instead of +as a string. so +$ ./ls . --sort=':!#:size' +Will sort a directory by size with the largest file first. + +The other option at this point in time is CIS +./ls . --sort=':CIS:name' +Which sorts using a case insensitive scheme. There is really no +gain to using CIS as it is slower to use and looses information. + +-------------------------------------------------------------------------------- + +Some assumptions that are worth knowing: +* For subclasses of ChainedViewContext it is assumed that a context will wrap + a chainedContext of its own type around the underlying child for a read() +* Reference counting has some querks for the root of a ChainedViewContext, one + must call setIsChainedViewContextRoot() for the root of a chained tree. + +-------------------------------------------------------------------------------- + +Setting up apps:// + +use the scripts and apps in apps/importdesktop/ + + +-------------------------------------------------------------------------------- + +The directory mg/ contains code that was nicked from the mg system +most files are left intact as were and a wrapper created in +FerrisMG.hh to be more C++ friendly. I have tried to limit changes to +the other files, except where global variables needed to be changed or +other such library friendly changes are needed. +http://www.cs.mu.oz.au/mg/ + +For some custom coded indexing stuff check out +Ferris/Indexing/ # contains custom lexicon/inverted file storage classes +Ferris/FullTextIndexer.hh +Ferris/FullTextIndexer.cpp +Ferris/FullTextQuery.hh +Ferris/FullTextQuery.cpp +-------------------------------------------------------------------------------- + +Some internal headers from xerces-c are included verbatim from the xerces-c +codebase because it seems most public interfaces are pure in xerces-c and +I don't really feel like reimplmeneting treeWalker etc to do the same thing as +the code already in the xerces-c library. + +This creates a maintainance problem in libferris but perhaps the xerces-c guys +will decide at some point to offer the "defualt" implementations of some things +in the public API. + +-------------------------------------------------------------------------------- + + +ACLOCAL="aclocal -I macros" autoreconf -vfi + +To create a blank RDF database using redland +mkdir -p ~/.ferris/rdfdb +cd ~/.ferris/rdfdb +rdfproc myrdf -c add a b c diff --git a/TODO b/TODO new file mode 100644 index 0000000..1bffd18 --- /dev/null +++ b/TODO @@ -0,0 +1 @@ +See the ChangeLog for what has changed. TODO list moved to local CMS system. diff --git a/ThirdParty/Makefile.am b/ThirdParty/Makefile.am new file mode 100644 index 0000000..25400f1 --- /dev/null +++ b/ThirdParty/Makefile.am @@ -0,0 +1,3 @@ +NULL= + +SUBDIRS = boost internal-xerces-c-headers diff --git a/ThirdParty/Makefile.in b/ThirdParty/Makefile.in new file mode 100644 index 0000000..df86fb5 --- /dev/null +++ b/ThirdParty/Makefile.in @@ -0,0 +1,1022 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +SUBDIRS = boost internal-xerces-c-headers +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/boost/Makefile.am b/ThirdParty/boost/Makefile.am new file mode 100644 index 0000000..2b6889a --- /dev/null +++ b/ThirdParty/boost/Makefile.am @@ -0,0 +1,3 @@ +NULL= + +EXTRA_DIST = $(srcdir)/*.hpp $(srcdir)/*.cpp diff --git a/ThirdParty/boost/Makefile.in b/ThirdParty/boost/Makefile.in new file mode 100644 index 0000000..0faad05 --- /dev/null +++ b/ThirdParty/boost/Makefile.in @@ -0,0 +1,820 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/boost +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +EXTRA_DIST = $(srcdir)/*.hpp $(srcdir)/*.cpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/boost/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/boost/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/boost/utf8_codecvt_facet.cpp b/ThirdParty/boost/utf8_codecvt_facet.cpp new file mode 100644 index 0000000..f271cdb --- /dev/null +++ b/ThirdParty/boost/utf8_codecvt_facet.cpp @@ -0,0 +1,269 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// utf8_codecvt_facet.cpp + +// Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Please see the comments in to +// learn how this file should be used. + +#include + +#include // for multi-byte converson routines +#include + +#include +#include + +// If we don't have wstring, then Unicode support +// is not available anyway, so we don't need to even +// compiler this file. This also fixes the problem +// with mingw, which can compile this file, but will +// generate link error when building DLL. +#ifndef BOOST_NO_STD_WSTRING + +BOOST_UTF8_BEGIN_NAMESPACE + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation for wchar_t + +// Translate incoming UTF-8 into UCS-4 +std::codecvt_base::result utf8_codecvt_facet::do_in( + std::mbstate_t& state, + const char * from, + const char * from_end, + const char * & from_next, + wchar_t * to, + wchar_t * to_end, + wchar_t * & to_next +) const { + // Basic algorithm: The first octet determines how many + // octets total make up the UCS-4 character. The remaining + // "continuing octets" all begin with "10". To convert, subtract + // the amount that specifies the number of octets from the first + // octet. Subtract 0x80 (1000 0000) from each continuing octet, + // then mash the whole lot together. Note that each continuing + // octet only uses 6 bits as unique values, so only shift by + // multiples of 6 to combine. + while (from != from_end && to != to_end) { + + // Error checking on the first octet + if (invalid_leading_octet(*from)){ + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + // The first octet is adjusted by a value dependent upon + // the number of "continuing octets" encoding the character + const int cont_octet_count = get_cont_octet_count(*from); + const wchar_t octet1_modifier_table[] = { + 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc + }; + + // The unsigned char conversion is necessary in case char is + // signed (I learned this the hard way) + wchar_t ucs_result = + (unsigned char)(*from++) - octet1_modifier_table[cont_octet_count]; + + // Invariants : + // 1) At the start of the loop, 'i' continuing characters have been + // processed + // 2) *from points to the next continuing character to be processed. + int i = 0; + while(i != cont_octet_count && from != from_end) { + + // Error checking on continuing characters + if (invalid_continuing_octet(*from)) { + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + ucs_result *= (1 << 6); + + // each continuing character has an extra (10xxxxxx)b attached to + // it that must be removed. + ucs_result += (unsigned char)(*from++) - 0x80; + ++i; + } + + // If the buffer ends with an incomplete unicode character... + if (from == from_end && i != cont_octet_count) { + // rewind "from" to before the current character translation + from_next = from - (i+1); + to_next = to; + return std::codecvt_base::partial; + } + *to++ = ucs_result; + } + from_next = from; + to_next = to; + + // Were we done converting or did we run out of destination space? + if(from == from_end) return std::codecvt_base::ok; + else return std::codecvt_base::partial; +} + +std::codecvt_base::result utf8_codecvt_facet::do_out( + std::mbstate_t& state, + const wchar_t * from, + const wchar_t * from_end, + const wchar_t * & from_next, + char * to, + char * to_end, + char * & to_next +) const +{ + // RG - consider merging this table with the other one + const wchar_t octet1_modifier_table[] = { + 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc + }; + + wchar_t max_wchar = (std::numeric_limits::max)(); + while (from != from_end && to != to_end) { + + // Check for invalid UCS-4 character + if (*from > max_wchar) { + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + int cont_octet_count = get_cont_octet_out_count(*from); + + // RG - comment this formula better + int shift_exponent = (cont_octet_count) * 6; + + // Process the first character + *to++ = octet1_modifier_table[cont_octet_count] + + (unsigned char)(*from / (1 << shift_exponent)); + + // Process the continuation characters + // Invariants: At the start of the loop: + // 1) 'i' continuing octets have been generated + // 2) '*to' points to the next location to place an octet + // 3) shift_exponent is 6 more than needed for the next octet + int i = 0; + while (i != cont_octet_count && to != to_end) { + shift_exponent -= 6; + *to++ = 0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)); + ++i; + } + // If we filled up the out buffer before encoding the character + if(to == to_end && i != cont_octet_count) { + from_next = from; + to_next = to - (i+1); + return std::codecvt_base::partial; + } + *from++; + } + from_next = from; + to_next = to; + // Were we done or did we run out of destination space + if(from == from_end) return std::codecvt_base::ok; + else return std::codecvt_base::partial; +} + +// How many char objects can I process to get <= max_limit +// wchar_t objects? +int utf8_codecvt_facet::do_length( + BOOST_CODECVT_DO_LENGTH_CONST std::mbstate_t &, + const char * from, + const char * from_end, + std::size_t max_limit +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) +) const throw() +#else +) const +#endif +{ + // RG - this code is confusing! I need a better way to express it. + // and test cases. + + // Invariants: + // 1) last_octet_count has the size of the last measured character + // 2) char_count holds the number of characters shown to fit + // within the bounds so far (no greater than max_limit) + // 3) from_next points to the octet 'last_octet_count' before the + // last measured character. + int last_octet_count=0; + std::size_t char_count = 0; + const char* from_next = from; + // Use "<" because the buffer may represent incomplete characters + while (from_next+last_octet_count <= from_end && char_count <= max_limit) { + from_next += last_octet_count; + last_octet_count = (get_octet_count(*from_next)); + ++char_count; + } + return from_next-from_end; +} + +unsigned int utf8_codecvt_facet::get_octet_count( + unsigned char lead_octet +){ + // if the 0-bit (MSB) is 0, then 1 character + if (lead_octet <= 0x7f) return 1; + + // Otherwise the count number of consecutive 1 bits starting at MSB +// assert(0xc0 <= lead_octet && lead_octet <= 0xfd); + + if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2; + else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3; + else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4; + else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5; + else return 6; +} +BOOST_UTF8_END_NAMESPACE + +namespace { +template +int get_cont_octet_out_count_impl(wchar_t word){ + if (word < 0x80) { + return 0; + } + if (word < 0x800) { + return 1; + } + return 2; +} + +// note the following code will generate on some platforms where +// wchar_t is defined as UCS2. The warnings are superfluous as +// the specialization is never instantitiated with such compilers. +template<> +int get_cont_octet_out_count_impl<4>(wchar_t word){ + if (word < 0x80) { + return 0; + } + if (word < 0x800) { + return 1; + } + if (word < 0x10000) { + return 2; + } + if (word < 0x200000) { + return 3; + } + if (word < 0x4000000) { + return 4; + } + return 5; +} + +} // namespace anonymous + +BOOST_UTF8_BEGIN_NAMESPACE +// How many "continuing octets" will be needed for this word +// == total octets - 1. +int utf8_codecvt_facet::get_cont_octet_out_count( + wchar_t word +) const { + return get_cont_octet_out_count_impl(word); +} +BOOST_UTF8_END_NAMESPACE + +#endif diff --git a/ThirdParty/boost/utf8_codecvt_facet.hpp b/ThirdParty/boost/utf8_codecvt_facet.hpp new file mode 100644 index 0000000..97e6ddc --- /dev/null +++ b/ThirdParty/boost/utf8_codecvt_facet.hpp @@ -0,0 +1,199 @@ +// Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). Permission to copy, +// use, modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided "as is" +// without express or implied warranty, and with no claim as to its suitability +// for any purpose. + +#ifndef BOOST_UTF8_CODECVT_FACET_HPP +#define BOOST_UTF8_CODECVT_FACET_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// utf8_codecvt_facet.hpp + +// This header defines class utf8_codecvt_facet, derived fro +// std::codecvt, which can be used to convert utf8 data in +// files into wchar_t strings in the application. +// +// The header is NOT STANDALONE, and is not to be included by the USER. +// There are at least two libraries which want to use this functionality, and +// we want to avoid code duplication. It would be possible to create utf8 +// library, but: +// - this requires review process first +// - in the case, when linking the a library which uses utf8 +// (say 'program_options'), user should also link to the utf8 library. +// This seems inconvenient, and asking a user to link to an unrevieved +// library is strange. +// Until the above points are fixed, a library which wants to use utf8 must: +// - include this header from one of it's headers or sources +// - include the corresponding .cpp file from one of the sources +// - before including either file, the library must define +// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used +// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace +// - declaration. +// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable' +// symbols. +// +// For example, program_options library might contain: +// #define BOOST_UTF8_BEGIN_NAMESPACE +// namespace boost { namespace program_options { +// #define BOOST_UTF8_END_NAMESPACE }} +// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL +// #include "../../detail/utf8/utf8_codecvt.cpp" +// +// Essentially, each library will have its own copy of utf8 code, in +// different namespaces. + +// Note:(Robert Ramey). I have made the following alterations in the original +// code. +// a) Rendered utf8_codecvt with using templates +// b) Move longer functions outside class definition to prevent inlining +// and make code smaller +// c) added on a derived class to permit translation to/from current +// locale to utf8 + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters +// +// utf8_codecvt_facet +// This is an implementation of a std::codecvt facet for translating +// from UTF-8 externally to UCS-4. Note that this is not tied to +// any specific types in order to allow customization on platforms +// where wchar_t is not big enough. +// +// NOTES: The current implementation jumps through some unpleasant hoops in +// order to deal with signed character types. As a std::codecvt_base::result, +// it is necessary for the ExternType to be convertible to unsigned char. +// I chose not to tie the extern_type explicitly to char. But if any combination +// of types other than is used, then std::codecvt must be +// specialized on those types for this to work. + +#include +// for mbstate_t +#include +// for std::size_t +#include + +#include +#include + +namespace std { + #if defined(__LIBCOMO__) + using ::mbstate_t; + #elif defined(BOOST_DINKUMWARE_STDLIB) + using ::mbstate_t; + #elif defined(__SGI_STL_PORT) + #elif defined(BOOST_NO_STDC_NAMESPACE) + using ::mbstate_t; + using ::codecvt; + #endif +} // namespace std + +#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) + #define BOOST_CODECVT_DO_LENGTH_CONST const +#else + #define BOOST_CODECVT_DO_LENGTH_CONST +#endif + +// maximum lenght of a multibyte string +#define MB_LENGTH_MAX 8 + +BOOST_UTF8_BEGIN_NAMESPACE + +struct BOOST_UTF8_DECL utf8_codecvt_facet : + public std::codecvt +{ +public: + explicit utf8_codecvt_facet(std::size_t no_locale_manage=0) + : std::codecvt(no_locale_manage) + {} +protected: + virtual std::codecvt_base::result do_in( + std::mbstate_t& state, + const char * from, + const char * from_end, + const char * & from_next, + wchar_t * to, + wchar_t * to_end, + wchar_t*& to_next + ) const; + + virtual std::codecvt_base::result do_out( + std::mbstate_t & state, const wchar_t * from, + const wchar_t * from_end, const wchar_t* & from_next, + char * to, char * to_end, char * & to_next + ) const; + + bool invalid_continuing_octet(unsigned char octet_1) const { + return (octet_1 < 0x80|| 0xbf< octet_1); + } + + bool invalid_leading_octet(unsigned char octet_1) const { + return (0x7f < octet_1 && octet_1 < 0xc0) || + (octet_1 > 0xfd); + } + + // continuing octets = octets except for the leading octet + static unsigned int get_cont_octet_count(unsigned char lead_octet) { + return get_octet_count(lead_octet) - 1; + } + + static unsigned int get_octet_count(unsigned char lead_octet); + + // How many "continuing octets" will be needed for this word + // == total octets - 1. + int get_cont_octet_out_count(wchar_t word) const ; + + virtual bool do_always_noconv() const throw() { return false; } + + // UTF-8 isn't really stateful since we rewind on partial conversions + virtual std::codecvt_base::result do_unshift( + std::mbstate_t&, + char * from, + char * to, + char * & next + ) const + { + next = from; + return ok; + } + + virtual int do_encoding() const throw() { + const int variable_byte_external_encoding=0; + return variable_byte_external_encoding; + } + + // How many char objects can I process to get <= max_limit + // wchar_t objects? + virtual int do_length( + BOOST_CODECVT_DO_LENGTH_CONST std::mbstate_t &, + const char * from, + const char * from_end, + std::size_t max_limit +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + ) const throw(); +#else + ) const; +#endif + + // Largest possible value do_length(state,from,from_end,1) could return. + virtual int do_max_length() const throw () { + return 6; // largest UTF-8 encoding of a UCS-4 character + } +}; + +BOOST_UTF8_END_NAMESPACE + +#endif // BOOST_UTF8_CODECVT_FACET_HPP diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.am b/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.am new file mode 100644 index 0000000..9364c19 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = xerces + + diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.in b/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.in new file mode 100644 index 0000000..c33dc7b --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/2.7.0 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = xerces +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.7.0/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.7.0/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMAttrImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMAttrImpl.hpp new file mode 100644 index 0000000..a8633e2 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMAttrImpl.hpp @@ -0,0 +1,126 @@ +#ifndef DOMAttrImpl_HEADER_GUARD_ +#define DOMAttrImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMDocumentImpl.hpp" +#include +#include +#include "DOMNodeIDMap.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMElementImpl; +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMAttrImpl: public DOMAttr { + +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + const XMLCh *fName; + +private: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMAttrImpl(DOMDocument *ownerDocument, const XMLCh *aName); + DOMAttrImpl(const DOMAttrImpl &other, bool deep=false); + virtual ~DOMAttrImpl(); + + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + + virtual const XMLCh * getName() const; + virtual bool getSpecified() const; + virtual const XMLCh * getValue() const; + virtual void setSpecified(bool arg); + virtual void setValue(const XMLCh * value); + virtual bool isId() const; + + //Introduced in DOM Level 2 + DOMElement *getOwnerElement() const; + void setOwnerElement(DOMElement *ownerElem); //internal use only + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + + virtual const DOMTypeInfo* getTypeInfo() const; + + //helper function for DOM Level 3 TypeInfo + virtual void setTypeInfo(const DOMTypeInfoImpl* typeInfo); + + // helper method that sets this attr to an idnode and places it into the document map + virtual void addAttrToIDNodeMap(); + + // helper to remove this attr from from the id map if it is in there + virtual void removeAttrFromIDNodeMap(); + +private: + void getTextValue(DOMNode* node, XMLBuffer& buf) const; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrImpl& operator=(const DOMAttrImpl&); +}; + +inline void DOMAttrImpl::removeAttrFromIDNodeMap() +{ + if (fNode.isIdAttr()) { + ((DOMDocumentImpl *)getOwnerDocument())->getNodeIDMap()->remove(this); + fNode.isIdAttr(false); + } +} + +inline void DOMAttrImpl::addAttrToIDNodeMap() +{ + if (fNode.isIdAttr()) + return; + + fNode.isIdAttr(true); + + // REVIST For now, we don't worry about what happens if the new + // name conflicts as per setValue + DOMDocumentImpl *doc = (DOMDocumentImpl *)(fParent.fOwnerDocument); + + if (doc->fNodeIDMap == 0) + doc->fNodeIDMap = new (doc) DOMNodeIDMap(500, doc); + + doc->getNodeIDMap()->add(this); +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDeepNodeListPool.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDeepNodeListPool.hpp new file mode 100644 index 0000000..9eabc57 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDeepNodeListPool.hpp @@ -0,0 +1,213 @@ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListPool.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#if !defined(DOMDeepNODELISTPOOL_HPP) +#define DOMDeepNODELISTPOOL_HPP + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +// This hash table is modified from RefHash3KeysIdPool with first key as object ptr (DOMNode), +// second and third keys are both XMLCh* string + +template struct DOMDeepNodeListPoolTableBucketElem; + + +// +// This should really be a nested class, but some of the compilers we +// have to support cannot deal with that! +// +template +struct DOMDeepNodeListPoolTableBucketElem : public XMemory +{ + DOMDeepNodeListPoolTableBucketElem + ( + void* key1 + , XMLCh* key2 + , XMLCh* key3 + , TVal* const value + , DOMDeepNodeListPoolTableBucketElem* next + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ) : + fData(value) + , fNext(next) + , fKey1(key1) + , fKey2(0) + , fKey3(0) + { + if (key2) + fKey2 = XMLString::replicate(key2, manager); + + if (key3) + fKey3 = XMLString::replicate(key3, manager); + } + + TVal* fData; + DOMDeepNodeListPoolTableBucketElem* fNext; + void* fKey1; + XMLCh* fKey2; + XMLCh* fKey3; + + ~DOMDeepNodeListPoolTableBucketElem() {}; +}; + + +template class DOMDeepNodeListPool +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const XMLSize_t initSize = 128 + ); + + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const XMLSize_t initSize = 128 + ); + + // if a hash function is passed in, it will be deleted when the hashtable is deleted. + // use a new instance of the hasher class for each hashtable, otherwise one hashtable + // may delete the hasher of a different hashtable if both use the same hasher. + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , HashBase* hashBase + , const XMLSize_t initSize = 128 + ); + + ~DOMDeepNodeListPool(); + + // ----------------------------------------------------------------------- + // Element management + // ----------------------------------------------------------------------- + bool isEmpty() const; + bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + void removeAll(); + void cleanup(); + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3); + const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + + TVal* getById(const XMLSize_t elemId); + const TVal* getById(const XMLSize_t elemId) const; + + // ----------------------------------------------------------------------- + // Putters + // ----------------------------------------------------------------------- + XMLSize_t put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt); + +private: + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal); + const DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal) const; + void initialize(const XMLSize_t modulus); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListPool(const DOMDeepNodeListPool &); + DOMDeepNodeListPool & operator = (const DOMDeepNodeListPool &); + + // ----------------------------------------------------------------------- + // Data members + // + // fAdoptedElems + // Indicates whether the values added are adopted or just referenced. + // If adopted, then they are deleted when they are removed from the + // hash table. + // + // fBucketList + // This is the array that contains the heads of all of the list + // buckets, one for each possible hash value. + // + // fHashModulus + // The modulus used for this hash table, to hash the keys. This is + // also the number of elements in the bucket list. + // + // fHash + // The hasher for the key1 data type. + // + // fIdPtrs + // fIdPtrsCount + // This is the array of pointers to the bucket elements in order of + // their assigned ids. So taking id N and referencing this array + // gives you the element with that id. The count field indicates + // the current size of this list. When fIdCounter+1 reaches this + // value the list must be expanded. + // + // fIdCounter + // This is used to give out unique ids to added elements. It starts + // at zero (which means empty), and is bumped up for each newly added + // element. So the first element is 1, the next is 2, etc... This + // means that this value is set to the top index of the fIdPtrs array. + // ----------------------------------------------------------------------- + bool fAdoptedElems; + DOMDeepNodeListPoolTableBucketElem** fBucketList; + XMLSize_t fHashModulus; + HashBase* fHash; + TVal** fIdPtrs; + XMLSize_t fIdPtrsCount; + XMLSize_t fIdCounter; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#if !defined(XERCES_TMPLSINC) +#include +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDocumentImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDocumentImpl.hpp new file mode 100644 index 0000000..20abf63 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMDocumentImpl.hpp @@ -0,0 +1,398 @@ +#ifndef DOMDocumentImpl_HEADER_GUARD_ +#define DOMDocumentImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include +#include +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMParentNode.hpp" +#include "DOMDeepNodeListPool.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMAttrImpl; +class DOMCDATASectionImpl; +class DOMCommentImpl; +class DOMConfiguration; +class DOMDeepNodeListImpl; +class DOMDocumentFragmentImpl; +class DOMDocumentTypeImpl; +class DOMElementImpl; +class DOMEntityImpl; +class DOMEntityReferenceImpl; +class DOMNotationImpl; +class DOMProcessingInstructionImpl; +class DOMTextImpl; +class DOMNodeIteratorImpl; +class DOMNormalizer; +class DOMTreeWalkerImpl; +class DOMNodeFilter; +class DOMNodeFilterImpl; +class DOMImplementation; +class DOMNodeIDMap; +class DOMRangeImpl; +class DOMStringPool; +class DOMBuffer; +class MemoryManager; +class XPathNSResolver; +class XPathExpression; + +typedef RefVectorOf Ranges; +typedef RefVectorOf NodeIterators; +typedef KeyRefPair DOMUserDataRecord; +typedef RefStackOf DOMNodePtr; + +class CDOM_EXPORT DOMDocumentImpl: public XMemory, public DOMDocument { +public: + // ----------------------------------------------------------------------- + // data types + // ----------------------------------------------------------------------- + enum NodeObjectType { + ATTR_OBJECT = 0, + ATTR_NS_OBJECT = 1, + CDATA_SECTION_OBJECT = 2, + COMMENT_OBJECT = 3, + DOCUMENT_FRAGMENT_OBJECT = 4, + DOCUMENT_TYPE_OBJECT = 5, + ELEMENT_OBJECT = 6, + ELEMENT_NS_OBJECT = 7, + ENTITY_OBJECT = 8, + ENTITY_REFERENCE_OBJECT = 9, + NOTATION_OBJECT = 10, + PROCESSING_INSTRUCTION_OBJECT = 11, + TEXT_OBJECT = 12 + }; + + + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + DOMNodeImpl fNode; // Implements common node functionality. + DOMParentNode fParent; // Implements common parent node functionality + DOMNodeIDMap* fNodeIDMap; // for use by GetElementsById(). + +public: + DOMDocumentImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMDocumentImpl(const XMLCh* namespaceURI, //DOM Level 2 + const XMLCh* qualifiedName, + DOMDocumentType* doctype, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DOMDocumentImpl(); + + void setDocumentType(DOMDocumentType *doctype); + + // Add all functions that are pure virutal in DOMNODE + DOMNODE_FUNCTIONS; + + // Add all functions that are pure virutal in DOMDocument + virtual DOMAttr* createAttribute(const XMLCh *name); + virtual DOMCDATASection* createCDATASection(const XMLCh *data); + virtual DOMComment* createComment(const XMLCh *data); + virtual DOMDocumentFragment* createDocumentFragment(); + virtual DOMDocumentType* createDocumentType(const XMLCh *name); + virtual DOMDocumentType* createDocumentType(const XMLCh *qName, + const XMLCh *publicId, + const XMLCh *systemId); + virtual DOMElement* createElement(const XMLCh * tagName); + virtual DOMElement* createElementNoCheck(const XMLCh *tagName); + virtual DOMEntity* createEntity(const XMLCh * name); + virtual DOMEntityReference* createEntityReference(const XMLCh * name); + virtual DOMNotation* createNotation(const XMLCh * name); + virtual DOMProcessingInstruction* createProcessingInstruction(const XMLCh * target, const XMLCh * data); + virtual DOMText* createTextNode(const XMLCh * data); + virtual DOMDocumentType* getDoctype() const; + virtual DOMElement* getDocumentElement() const; + virtual DOMNodeList* getElementsByTagName(const XMLCh * tagname) const; + virtual DOMImplementation* getImplementation() const; + bool isXMLName(const XMLCh * s); + virtual DOMNodeIterator* createNodeIterator(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + virtual DOMTreeWalker* createTreeWalker(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + + + virtual DOMRange* createRange(); + virtual Ranges* getRanges() const; //non-standard api + virtual NodeIterators* getNodeIterators() const; //non-standard api + virtual void removeRange(DOMRangeImpl* range); //non-standard api + virtual void removeNodeIterator(DOMNodeIteratorImpl* nodeIterator); //non-standard api + + virtual const DOMXPathExpression* createExpression(const XMLCh *expression, const DOMXPathNSResolver *resolver); + virtual const DOMXPathNSResolver* createNSResolver(DOMNode *nodeResolver); + virtual void* evaluate(const XMLCh *expression, DOMNode *contextNode, const DOMXPathNSResolver *resolver, + unsigned short type, void* result); + + + // Extension to be called by the Parser + DOMEntityReference* createEntityReferenceByParser(const XMLCh * name); + + + // + // Functions to keep track of document mutations, so that node list chached + // information can be invalidated. One global changes counter per document. + // + virtual void changed(); + virtual int changes() const; + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *
    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() const { + return errorChecking; + } + + //Introduced in DOM Level 2 + virtual DOMNode* importNode(DOMNode *source, bool deep); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLSSize_t lineNo, + const XMLSSize_t columnNo); + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMElement* getElementById(const XMLCh *elementId) const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getActualEncoding() const; + virtual void setActualEncoding(const XMLCh* actualEncoding); + virtual const XMLCh* getEncoding() const; + virtual void setEncoding(const XMLCh* encoding); + virtual bool getStandalone() const; + virtual void setStandalone(bool standalone); + virtual const XMLCh* getVersion() const; + virtual void setVersion(const XMLCh* version); + virtual const XMLCh* getDocumentURI() const; + virtual void setDocumentURI(const XMLCh* documentURI); + virtual bool getStrictErrorChecking() const; + virtual void setStrictErrorChecking(bool strictErrorChecking); + virtual DOMNode* adoptNode(DOMNode* source); + virtual void normalizeDocument(); + virtual DOMConfiguration* getDOMConfiguration() const; + virtual void setDOMConfiguration(DOMConfiguration *config); + + // helper functions to prevent storing userdata pointers on every node. + void* setUserData(DOMNodeImpl* n, + const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + void* getUserData(const DOMNodeImpl* n, + const XMLCh* key) const; + void callUserDataHandlers(const DOMNodeImpl* n, + DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + void transferUserData(DOMNodeImpl* n1, DOMNodeImpl* n2); + + DOMNode* renameNode(DOMNode* n, + const XMLCh* namespaceURI, + const XMLCh* name); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const XMLCh * qName); + static bool isKidOK(DOMNode *parent, DOMNode *child); + + inline DOMNodeIDMap* getNodeIDMap() {return fNodeIDMap;}; + + + // + // Memory Management Functions. All memory is allocated by and owned by + // a document, and is not recovered until the + // document itself is deleted. + // + void* allocate(size_t amount); + void* allocate(size_t amount, NodeObjectType type); + XMLCh* cloneString(const XMLCh *src); + const XMLCh* getPooledString(const XMLCh *src); + void deleteHeap(); + void release(DOMNode* object, NodeObjectType type); + void releaseDocNotifyUserData(DOMNode* object); + void releaseBuffer(DOMBuffer* buffer); + DOMBuffer* popBuffer(); + MemoryManager* getMemoryManager() const; + + // Factory methods for getting/creating node lists. + // Because nothing is ever deleted, the implementation caches and recycles + // previously used instances of DOMDeepNodeList + // + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, const XMLCh *tagName); + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + +private: + //Internal helper functions + virtual DOMNode* importNode(DOMNode *source, bool deep, bool cloningNode); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentImpl(const DOMDocumentImpl &); + DOMDocumentImpl & operator = (const DOMDocumentImpl &); + +private: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + // New data introduced in DOM Level 3 + const XMLCh* fActualEncoding; + const XMLCh* fEncoding; + bool fStandalone; + const XMLCh* fVersion; + const XMLCh* fDocumentURI; + DOMConfiguration* fDOMConfiguration; + + XMLStringPool fUserDataTableKeys; + RefHash2KeysTableOf* fUserDataTable; + + + // Per-Document heap Variables. + // The heap consists of one or more biggish blocks which are + // sub-allocated for individual allocations of nodes, strings, etc. + // The big blocks form a linked list, allowing them to be located for deletion. + // + // There is no provision for deleting suballocated blocks, other than + // deleting the entire heap when the document is deleted. + // + // There is no header on individual sub-allocated blocks. + // The header on big blocks consists only of a single back pointer to + // the previously allocated big block (our linked list of big blocks) + // + // + // revisit - this heap should be encapsulated into its own + // class, rather than hanging naked on Document. + // + void* fCurrentBlock; + char* fFreePtr; + XMLSize_t fFreeBytesRemaining; + + // To recycle the DOMNode pointer + RefArrayOf* fRecycleNodePtr; + + // To recycle DOMBuffer pointer + RefStackOf* fRecycleBufferPtr; + + // Pool of DOMNodeList for getElementsByTagName + DOMDeepNodeListPool* fNodeListPool; + + // Other data + DOMDocumentType* fDocType; + DOMElement* fDocElement; + DOMStringPool* fNamePool; + DOMNormalizer* fNormalizer; + Ranges* fRanges; + NodeIterators* fNodeIterators; + MemoryManager* fMemoryManager; // configurable memory manager + + int fChanges; + bool errorChecking; // Bypass error checking. + +}; + +inline MemoryManager* DOMDocumentImpl::getMemoryManager() const +{ + return fMemoryManager; +} + +XERCES_CPP_NAMESPACE_END + +// --------------------------------------------------------------------------- +// +// Operator new. Global overloaded version, lets any object be allocated on +// the heap owned by a document. +// +// --------------------------------------------------------------------------- +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType type) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt); + return p; +} + +// --------------------------------------------------------------------------- +// For DOM: +// Bypass compiler warning: +// no matching operator delete found; memory will not be freed if initialization throws an exception +// --------------------------------------------------------------------------- +#if _MSC_VER >= 1200 /* VC++ 6.0 */ +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType /*type*/) +{ + return; +} +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeIDMap.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeIDMap.hpp new file mode 100644 index 0000000..b4f0bbf --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeIDMap.hpp @@ -0,0 +1,87 @@ +#ifndef DOMNodeIDMap_HEADER_GUARD_ +#define DOMNodeIDMap_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIDMap.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +XERCES_CPP_NAMESPACE_BEGIN + + +// +// Class DOMNodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +class DOMAttr; +class DOMDocument; + + +class DOMNodeIDMap { +public: + + DOMNodeIDMap(int initialSize, DOMDocument *doc); // Create a new hash table, sized to hold "initialSize" + // Entries. It will automatically grow if need be. + + virtual ~DOMNodeIDMap(); + +private: + DOMNodeIDMap(const DOMNodeIDMap &other); // No copy, assignement, comparison. + DOMNodeIDMap &operator = (const DOMNodeIDMap &other); + bool operator == (const DOMNodeIDMap &other); + +public: + void add(DOMAttr *attr); // Add the specified attribute to the table. + void remove(DOMAttr *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + DOMAttr *find(const XMLCh *ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + DOMAttr **fTable; + XMLSize_t fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + XMLSize_t fSize; // The current size of the table array + // (number of slots, not bytes.) + XMLSize_t fNumEntries; // The number of entries used. + XMLSize_t fMaxEntries; // The max number of entries to use before + // growing the table. + DOMDocument *fDoc; // The owning document. + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeImpl.hpp new file mode 100644 index 0000000..36af11d --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeImpl.hpp @@ -0,0 +1,380 @@ +#ifndef DOMNodeImpl_HEADER_GUARD_ +#define DOMNodeImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A DOMNodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMap; +class DOMNodeList; +class DOMNode; +class DOMDocument; +class DOMElement; + +class CDOM_EXPORT DOMNodeImpl { +public: + + // data + DOMNode *fOwnerNode; // typically the parent but not always! + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short LEAFNODETYPE; + static const unsigned short CHILDNODE; + static const unsigned short TOBERELEASED; + + +public: + DOMNodeImpl(DOMNode *ownerDocument); + DOMNodeImpl(const DOMNodeImpl &other); + ~DOMNodeImpl(); + + DOMNode * appendChild(DOMNode *newChild); + DOMNamedNodeMap * getAttributes() const; + DOMNodeList * getChildNodes() const; + DOMNode * getFirstChild() const; + DOMNode * getLastChild() const; + const XMLCh * getLocalName() const; + const XMLCh * getNamespaceURI() const; + DOMNode * getNextSibling() const; + const XMLCh * getNodeValue() const; + DOMDocument * getOwnerDocument() const; + DOMNode * getParentNode() const; + const XMLCh * getPrefix() const; + DOMNode * getPreviousSibling() const; + bool hasChildNodes() const; + DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild); + void normalize(); + DOMNode * removeChild(DOMNode *oldChild); + DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild); + void setNodeValue(const XMLCh *value); + void setPrefix(const XMLCh *fPrefix); + void setReadOnly(bool readOnly, bool deep); + bool isSupported(const XMLCh *feature, const XMLCh *version) const; + bool hasAttributes() const; + + // Introduced in DOM Level 3 + void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler); + void* getUserData(const XMLCh* key) const; + bool isSameNode(const DOMNode* other) const; + bool isEqualNode(const DOMNode* arg) const; + const XMLCh* getBaseURI() const ; + short compareTreePosition(const DOMNode* other) const; + const XMLCh* getTextContent() const ; + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const; + void setTextContent(const XMLCh* textContent) ; + const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ; + bool isDefaultNamespace(const XMLCh* namespaceURI) const ; + const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ; + DOMNode* getInterface(const XMLCh* feature) ; + + + // Helper functions for DOM Level 3 + void release(); + void callUserDataHandlers(DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + //reverses the bit pattern given by compareTreePosition + short reverseTreeOrderBitPattern(short pattern) const; + + + //Utility, not part of DOM Level 2 API + static bool isKidOK(DOMNode *parent, DOMNode *child); + static const XMLCh *mapPrefix(const XMLCh *prefix, + const XMLCh *namespaceURI, short nType); + + static const XMLCh *getXmlnsString(); + static const XMLCh *getXmlnsURIString(); + static const XMLCh *getXmlString(); + static const XMLCh *getXmlURIString(); + +public: // should really be protected - ALH + + DOMNode* getElementAncestor (const DOMNode* currentNode) const; + const XMLCh* lookupNamespacePrefix(const XMLCh* const namespaceURI, bool useDefaultx, DOMElement *el) const ; + void setOwnerDocument(DOMDocument *doc); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + // For Attributes, true if the attr node is attached to an element. + // For all other node types, true if the node has a parent node. + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValue() const { + return (flags & SETVALUE) != 0; + } + + inline void setValue(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + // + // LeafNode is set true for node types that can not be ParentNodes (can't have children) + // This knowledge is used to allow casting from any unknown node type to the + // IDParentImpl or IDChildImpl parts of the node. + // + inline bool isLeafNode() const { + return (flags & LEAFNODETYPE) != 0; + } + + inline void setIsLeafNode(bool value) { + flags = (value ? flags | LEAFNODETYPE : flags & ~LEAFNODETYPE); + } + + + // + // ChildNode is set true for node types that can be children of other nodes, and + // therefore include a DOMChildNode data member. Note that all of the leaf + // node types (above flag) are also ChildNodes, but not all ChildNodes are + // leaf nodes. + inline bool isChildNode() const { + return (flags & CHILDNODE) != 0; + } + + inline void setIsChildNode(bool value) { + flags = (value ? flags | CHILDNODE : flags & ~CHILDNODE); + } + + // True if this node has to be released regardless if it has a owner or not + // This is true if called from fParent->release() + inline bool isToBeReleased() const { + return (flags & TOBERELEASED) != 0; + } + + inline void isToBeReleased(bool value) { + flags = (value ? flags | TOBERELEASED : flags & ~TOBERELEASED); + } + +}; + + +// This macro lists all of the pure virtual functions declared in DOMNode that must +// be implemented by all node types. Since there is no inheritance of implementation, +// using this macro in the class declaration of the node types make it easier to +// accurately get all of the functions declared. +// +#define DOMNODE_FUNCTIONS \ + virtual DOMNode* appendChild(DOMNode *newChild) ;\ + virtual DOMNode* cloneNode(bool deep) const ;\ + virtual DOMNamedNodeMap* getAttributes() const ;\ + virtual DOMNodeList* getChildNodes() const ;\ + virtual DOMNode* getFirstChild() const ;\ + virtual DOMNode* getLastChild() const ;\ + virtual const XMLCh* getLocalName() const ;\ + virtual const XMLCh* getNamespaceURI() const ;\ + virtual DOMNode* getNextSibling() const ;\ + virtual const XMLCh* getNodeName() const ;\ + virtual short getNodeType() const ;\ + virtual const XMLCh* getNodeValue() const ;\ + virtual DOMDocument* getOwnerDocument() const ;\ + virtual const XMLCh* getPrefix() const ;\ + virtual DOMNode* getParentNode() const ;\ + virtual DOMNode* getPreviousSibling() const ;\ + virtual bool hasChildNodes() const ;\ + virtual DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild) ;\ + virtual void normalize() ;\ + virtual DOMNode* removeChild(DOMNode *oldChild) ;\ + virtual DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild) ;\ + virtual void setNodeValue(const XMLCh *nodeValue) ;\ + virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const ;\ + virtual bool hasAttributes() const ;\ + virtual void setPrefix(const XMLCh * prefix) ;\ + virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\ + virtual void* getUserData(const XMLCh* key) const ;\ + virtual bool isSameNode(const DOMNode* other) const;\ + virtual bool isEqualNode(const DOMNode* arg) const;\ + virtual const XMLCh* getBaseURI() const ;\ + virtual short compareTreePosition(const DOMNode* other) const ;\ + virtual const XMLCh* getTextContent() const ;\ + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const;\ + virtual void setTextContent(const XMLCh* textContent) ;\ + virtual const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ;\ + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const;\ + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ;\ + virtual DOMNode* getInterface(const XMLCh* feature) ;\ + virtual void release() + + +/* + * Here are dummy stubs for most of the functions introduced by DOMNode. + * Each subclass of DOMNode will have something like this that delegates each + * function to the appropriate implementation. + * Functions that must be supplied by every node class are omitted. + * + DOMNode* xxx::appendChild(DOMNode *newChild) {return fParent.appendChild (newChild); }; + DOMNamedNodeMap* xxx::getAttributes() const {return fNode.getAttributes (); }; + DOMNodeList* xxx::getChildNodes() const {return fParent.getChildNodes (); }; + DOMNode* xxx::getFirstChild() const {return fParent.getFirstChild (); }; + DOMNode* xxx::getLastChild() const {return fParent.getLastChild (); }; + const XMLCh* xxx::getLocalName() const {return fNode.getLocalName (); }; + const XMLCh* xxx::getNamespaceURI() const {return fNode.getNamespaceURI (); }; + DOMNode* xxx::getNextSibling() const {return fChild.getNextSibling (); }; + const XMLCh* xxx::getNodeValue() const {return fNode.getNodeValue (); }; + DOMDocument* xxx::getOwnerDocument() const {return fNode.getOwnerDocument (); }; + const XMLCh* xxx::getPrefix() const {return fNode.getPrefix (); }; + DOMNode* xxx::getParentNode() const {return fChild.getParentNode (this); }; + DOMNode* xxx::getPreviousSibling() const {return fChild.getPreviousSibling (this); }; + bool xxx::hasChildNodes() const {return fParent.hasChildNodes (); }; + DOMNode* xxx::insertBefore(DOMNode *newChild, DOMNode *refChild) + {return fParent.insertBefore (newChild, refChild); }; + void xxx::normalize() {fParent.normalize(); }; + DOMNode* xxx::removeChild(DOMNode *oldChild) {return fParent.removeChild (oldChild); }; + DOMNode* xxx::replaceChild(DOMNode *newChild, DOMNode *oldChild) + {return fParent.replaceChild (newChild, oldChild); }; + bool xxx::isSupported(const XMLCh *feature, const XMLCh *version) const + {return fNode.isSupported (feature, version); }; + void xxx::setPrefix(const XMLCh *prefix) {fNode.setPrefix(prefix); }; + bool xxx::hasAttributes() const {return fNode.hasAttributes(); }; + bool xxx::isSameNode(const DOMNode* other) const {return fNode.isSameNode(other); }; + bool xxx::isEqualNode(const DOMNode* arg) const {return fNode.isEqualNode(arg); }; + void* xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) + {return fNode.setUserData(key, data, handler); }; + void* xxx::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* xxx::getBaseURI() const {return fNode.getBaseURI(); }; + short xxx::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); }; + const XMLCh* xxx::getTextContent() const {return fNode.getTextContent(); }; + void xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* xxx::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); }; + bool xxx::isDefaultNamespace(const XMLCh* namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* xxx::lookupNamespaceURI(const XMLCh* prefix) const {return fNode.lookupNamespaceURI(prefix); }; + DOMNode* xxx::getInterface(const XMLCh* feature) {return fNode.getInterface(feature); }; + + +*/ + + + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeListImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeListImpl.hpp new file mode 100644 index 0000000..03718ec --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMNodeListImpl.hpp @@ -0,0 +1,72 @@ +#ifndef DOMNodeListImpl_HEADER_GUARD_ +#define DOMNodeListImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeListImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +// NodeList implementation class - +// This is for NodeLists returned by GetChildNodes only, not for +// node lists returned by GetElementsByTagName +// +// Every node type capable of having children has (as an embedded member) +// an instance of this class. To hold down the size overhead on each node, a +// cache of extended data for active node lists is maintained +// separately. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; + +class CDOM_EXPORT DOMNodeListImpl: public DOMNodeList +{ +private: + DOMNode *fNode; + + // Unused, and unimplemented constructors, operators, etc. + DOMNodeListImpl(); + DOMNodeListImpl(const DOMNodeListImpl & other); + DOMNodeListImpl & operator = (const DOMNodeListImpl & other); + +public: + DOMNodeListImpl(DOMNode *node); + virtual ~DOMNodeListImpl(); + virtual DOMNode * item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + + diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMParentNode.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMParentNode.hpp new file mode 100644 index 0000000..05c7f93 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMParentNode.hpp @@ -0,0 +1,111 @@ +#ifndef DOMParentNode_HEADER_GUARD_ +#define DOMParentNode_HEADER_GUARD_ + + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMParentNode.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ParentNode provides the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should include this class and pay the price for it. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + * + **/ + +#include +#include "DOMNodeListImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMChildNode; +class DOMDocument; +class DOMNode; +class DOMNodeList; + +class CDOM_EXPORT DOMParentNode { +public: + DOMDocument *fOwnerDocument; // Document this node belongs to + DOMNode *fFirstChild; + DOMNodeListImpl fChildNodeList; // for GetChildNodes() + +public: + DOMParentNode(DOMDocument *ownerDocument); + DOMParentNode(const DOMParentNode &other); + + DOMDocument * getOwnerDocument() const; + void setOwnerDocument(DOMDocument* doc); + + // Track changes to the node tree structure under this node. An optimization + // for NodeLists. + int changes() const; + void changed(); + + DOMNode* appendChild(DOMNode *newChild); + DOMNodeList* getChildNodes() const; + DOMNode* getFirstChild() const; + DOMNode* getLastChild() const; + XMLSize_t getLength() const; + bool hasChildNodes() const; + DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild); + DOMNode* item(XMLSize_t index) const; + DOMNode* removeChild(DOMNode *oldChild); + DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild); + + //Introduced in DOM Level 2 + void normalize(); + + //Introduced in DOM Level 3 + bool isEqualNode(const DOMNode* arg) const; + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + DOMDocument * getDocument() const; + void release(); + + +public: + void cloneChildren(const DOMNode *other); + DOMNode * lastChild() const; + void lastChild(DOMNode *); + +private: + // unimplemented + DOMParentNode& operator= (const DOMParentNode& other); +}; + +#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument) + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMRangeImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMRangeImpl.hpp new file mode 100644 index 0000000..6f316e6 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMRangeImpl.hpp @@ -0,0 +1,174 @@ +#ifndef DOMRangeImpl_HEADER_GUARD_ +#define DOMRangeImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: DOMRangeImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DOMNode; +class DOMDocumentFragment; +class DOMDocument; +class DOMText; +class MemoryManager; + +class CDOM_EXPORT DOMRangeImpl: public DOMRange { +private: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //private data + + DOMNode* fStartContainer; + XMLSize_t fStartOffset; + DOMNode* fEndContainer; + XMLSize_t fEndOffset; + bool fCollapsed; + DOMDocument* fDocument; + bool fDetached; + + DOMNode* fRemoveChild; + MemoryManager* fMemoryManager; + +public: + //c'tor + DOMRangeImpl(DOMDocument* doc, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMRangeImpl(const DOMRangeImpl& other); + + //d'tor + ~DOMRangeImpl(); + + //getter functions + virtual DOMNode* getStartContainer() const; + virtual XMLSize_t getStartOffset() const; + virtual DOMNode* getEndContainer() const; + virtual XMLSize_t getEndOffset() const; + virtual bool getCollapsed() const; + virtual const DOMNode* getCommonAncestorContainer() const; + + //setter functions + virtual void setStart(const DOMNode *parent, XMLSize_t offset); + virtual void setEnd(const DOMNode *parent, XMLSize_t offset); + + virtual void setStartBefore(const DOMNode *refNode); + virtual void setStartAfter(const DOMNode *refNode); + virtual void setEndBefore(const DOMNode *refNode); + virtual void setEndAfter(const DOMNode *refNode); + + //misc functions + virtual void collapse(bool toStart); + virtual void selectNode(const DOMNode *node); + virtual void selectNodeContents(const DOMNode *node); + + //Functions related to comparing range Boundrary-Points + virtual short compareBoundaryPoints(CompareHow how, const DOMRange* range) const; + virtual void deleteContents(); + virtual DOMDocumentFragment* extractContents(); + virtual DOMDocumentFragment* cloneContents() const; + virtual void insertNode(DOMNode* node); + + //Misc functions + virtual void surroundContents(DOMNode *node); + virtual DOMRange* cloneRange() const; + virtual const XMLCh* toString() const; + virtual void detach(); + virtual void release(); + + //getter functions + DOMDocument* getDocument(); + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(DOMNode* oldNode, DOMNode* startNode, XMLSize_t offset); + void updateRangeForInsertedNode(DOMNode* node); + void receiveReplacedText(DOMNode* node); + void updateRangeForDeletedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForInsertedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForDeletedNode(DOMNode* node); + +private: + //setter functions + void setStartContainer(const DOMNode* node); + void setStartOffset(XMLSize_t offset) ; + void setEndContainer(const DOMNode* node); + void setEndOffset(XMLSize_t offset) ; + + //misc functions + void validateNode(const DOMNode* node) const; + bool isValidAncestorType(const DOMNode* node) const; + bool hasLegalRootContainer(const DOMNode* node) const; + bool isLegalContainedNode(const DOMNode* node ) const; + void checkIndex(const DOMNode* node, XMLSize_t offset) const; + static bool isAncestorOf(const DOMNode* a, const DOMNode* b); + + XMLSize_t indexOf(const DOMNode* child, const DOMNode* parent) const; + + const DOMNode* commonAncestorOf(const DOMNode* pointA, const DOMNode* pointB) const; + DOMNode* nextNode(const DOMNode* node, bool visitChildren) const; + DOMDocumentFragment* traverseContents(TraversalType type); + void checkReadOnly(DOMNode* start, DOMNode* end, + XMLSize_t starOffset, XMLSize_t endOffset); + void recurseTreeAndCheck(DOMNode* start, DOMNode* end); + DOMNode* removeChild(DOMNode* parent, DOMNode* child); + + DOMDocumentFragment* traverseSameContainer( int how ); + DOMDocumentFragment* traverseCommonStartContainer( DOMNode *endAncestor, int how ); + DOMDocumentFragment* traverseCommonEndContainer( DOMNode *startAncestor, int how ); + DOMDocumentFragment* traverseCommonAncestors( DOMNode *startAncestor, DOMNode *endAncestor, int how ); + DOMNode* traverseRightBoundary( DOMNode *root, int how ); + DOMNode* traverseLeftBoundary( DOMNode *root, int how ); + DOMNode* traverseNode( DOMNode *n, bool isFullySelected, bool isLeft, int how ); + DOMNode* traverseFullySelected( DOMNode *n, int how ); + DOMNode* traversePartiallySelected( DOMNode *n, int how ); + DOMNode* traverseTextNode( DOMNode *n, bool isLeft, int how ); + DOMNode* getSelectedNode( DOMNode *container, int offset ); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMRangeImpl & operator = (const DOMRangeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTreeWalkerImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTreeWalkerImpl.hpp new file mode 100644 index 0000000..70cd4e1 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTreeWalkerImpl.hpp @@ -0,0 +1,167 @@ +#ifndef DOMTreeWalkerImpl_HEADER_GUARD_ +#define DOMTreeWalkerImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTreeWalkerImpl.hpp,v 1.1 2008/05/26 21:30:06 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker { + private: + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + // The current Node. + DOMNode* fCurrentNode; + + // The root Node. + DOMNode* fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + + public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + DOMTreeWalkerImpl ( + DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi); + DOMTreeWalkerImpl& operator= (const DOMTreeWalkerImpl& twi); + + // Return the root node. + virtual DOMNode* getRoot (); + + // Return the whatToShow value. + virtual unsigned long getWhatToShow (); + + // Return the NodeFilter. + virtual DOMNodeFilter* getFilter (); + + + // Return the current DOMNode. + virtual DOMNode* getCurrentNode (); + + // Return the current Node. + virtual void setCurrentNode (DOMNode* node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + virtual DOMNode* nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* nextNode (); + + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + // release the resource + virtual void release(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getParentNode (DOMNode* node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getNextSibling (DOMNode* node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getPreviousSibling (DOMNode* node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getFirstChild (DOMNode* node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getLastChild (DOMNode* node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOMNode* node); + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTypeInfoImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTypeInfoImpl.hpp new file mode 100644 index 0000000..bad6eb4 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/DOMTypeInfoImpl.hpp @@ -0,0 +1,159 @@ +/* + * Copyright 2003,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#if !defined(DOMTYPEINFOIMPL_HPP) +#define DOMTYPEINFOIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMTypeInfoImpl : public DOMTypeInfo, public DOMPSVITypeInfo +{ +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMTypeInfoImpl(const XMLCh* namespaceUri=0, const XMLCh* name=0); + + static DOMTypeInfoImpl g_DtdValidatedElement; + static DOMTypeInfoImpl g_DtdNotValidatedAttribute; + static DOMTypeInfoImpl g_DtdValidatedCDATAAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFSAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITYAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITIESAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENSAttribute; + static DOMTypeInfoImpl g_DtdValidatedNOTATIONAttribute; + static DOMTypeInfoImpl g_DtdValidatedENUMERATIONAttribute; + + //@{ + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + /** + * Returns The name of a type declared for the associated DOMElement + * or DOMAttr, or null if undeclared. + * + *

"Experimental - subject to change"

+ * + * @return The name of a type declared for the associated DOMElement + * or DOMAttribute, or null if undeclared. + * @since DOM level 3 + */ + virtual const XMLCh* getName() const; + + /** + * The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * + *

"Experimental - subject to change"

+ * + * @return The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * @since DOM level 3 + */ + virtual const XMLCh* getNamespace() const; + + /** + * Returns the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + * + *

"Experimental - subject to change"

+ * + * @return the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + */ + virtual const XMLCh* getStringProperty(PSVIProperty prop) const; + + /** + * Returns the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + * + *

"Experimental - subject to change"

+ * + * @return the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + */ + virtual int getNumericProperty(PSVIProperty prop) const; + //@} + + //@{ + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + + /** + * Set the value for a string PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setStringProperty(PSVIProperty prop, const XMLCh* value); + + /** + * Set the value for a numeric PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setNumericProperty(PSVIProperty prop, int value); + //@} + + private: + int fBitFields; + const XMLCh* fTypeName; + const XMLCh* fTypeNamespace; + const XMLCh* fMemberTypeName; + const XMLCh* fMemberTypeNamespace; + const XMLCh* fDefaultValue; + const XMLCh* fNormalizedValue; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTypeInfoImpl (const DOMTypeInfoImpl&); + DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMTypeInfo.hpp + */ diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.am b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.am new file mode 100644 index 0000000..ce63756 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = $(srcdir)/*.hpp + diff --git a/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.in b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.in new file mode 100644 index 0000000..d767cba --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile.in @@ -0,0 +1,819 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/2.7.0/xerces +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = $(srcdir)/*.hpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.7.0/xerces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.am b/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.am new file mode 100644 index 0000000..9364c19 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = xerces + + diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.in b/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.in new file mode 100644 index 0000000..70bb4f7 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/2.8.0 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = xerces +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.8.0/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.8.0/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMAttrImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMAttrImpl.hpp new file mode 100644 index 0000000..63dd1e9 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMAttrImpl.hpp @@ -0,0 +1,127 @@ +#ifndef DOMAttrImpl_HEADER_GUARD_ +#define DOMAttrImpl_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMDocumentImpl.hpp" +#include +#include +#include "DOMNodeIDMap.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMElementImpl; +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMAttrImpl: public DOMAttr { + +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + const XMLCh *fName; + +private: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMAttrImpl(DOMDocument *ownerDocument, const XMLCh *aName); + DOMAttrImpl(const DOMAttrImpl &other, bool deep=false); + virtual ~DOMAttrImpl(); + + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + + virtual const XMLCh * getName() const; + virtual bool getSpecified() const; + virtual const XMLCh * getValue() const; + virtual void setSpecified(bool arg); + virtual void setValue(const XMLCh * value); + virtual bool isId() const; + + //Introduced in DOM Level 2 + DOMElement *getOwnerElement() const; + void setOwnerElement(DOMElement *ownerElem); //internal use only + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + + virtual const DOMTypeInfo* getTypeInfo() const; + + //helper function for DOM Level 3 TypeInfo + virtual void setTypeInfo(const DOMTypeInfoImpl* typeInfo); + + // helper method that sets this attr to an idnode and places it into the document map + virtual void addAttrToIDNodeMap(); + + // helper to remove this attr from from the id map if it is in there + virtual void removeAttrFromIDNodeMap(); + +private: + void getTextValue(DOMNode* node, XMLBuffer& buf) const; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrImpl& operator=(const DOMAttrImpl&); +}; + +inline void DOMAttrImpl::removeAttrFromIDNodeMap() +{ + if (fNode.isIdAttr()) { + ((DOMDocumentImpl *)getOwnerDocument())->getNodeIDMap()->remove(this); + fNode.isIdAttr(false); + } +} + +inline void DOMAttrImpl::addAttrToIDNodeMap() +{ + if (fNode.isIdAttr()) + return; + + fNode.isIdAttr(true); + + // REVIST For now, we don't worry about what happens if the new + // name conflicts as per setValue + DOMDocumentImpl *doc = (DOMDocumentImpl *)(fParent.fOwnerDocument); + + if (doc->fNodeIDMap == 0) + doc->fNodeIDMap = new (doc) DOMNodeIDMap(500, doc); + + doc->getNodeIDMap()->add(this); +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDeepNodeListPool.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDeepNodeListPool.hpp new file mode 100644 index 0000000..ea338fe --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDeepNodeListPool.hpp @@ -0,0 +1,214 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListPool.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#if !defined(DOMDeepNODELISTPOOL_HPP) +#define DOMDeepNODELISTPOOL_HPP + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +// This hash table is modified from RefHash3KeysIdPool with first key as object ptr (DOMNode), +// second and third keys are both XMLCh* string + +template struct DOMDeepNodeListPoolTableBucketElem; + + +// +// This should really be a nested class, but some of the compilers we +// have to support cannot deal with that! +// +template +struct DOMDeepNodeListPoolTableBucketElem : public XMemory +{ + DOMDeepNodeListPoolTableBucketElem + ( + void* key1 + , XMLCh* key2 + , XMLCh* key3 + , TVal* const value + , DOMDeepNodeListPoolTableBucketElem* next + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ) : + fData(value) + , fNext(next) + , fKey1(key1) + , fKey2(0) + , fKey3(0) + { + if (key2) + fKey2 = XMLString::replicate(key2, manager); + + if (key3) + fKey3 = XMLString::replicate(key3, manager); + } + + TVal* fData; + DOMDeepNodeListPoolTableBucketElem* fNext; + void* fKey1; + XMLCh* fKey2; + XMLCh* fKey3; + + ~DOMDeepNodeListPoolTableBucketElem() {}; +}; + + +template class DOMDeepNodeListPool +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const XMLSize_t initSize = 128 + ); + + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const XMLSize_t initSize = 128 + ); + + // if a hash function is passed in, it will be deleted when the hashtable is deleted. + // use a new instance of the hasher class for each hashtable, otherwise one hashtable + // may delete the hasher of a different hashtable if both use the same hasher. + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , HashBase* hashBase + , const XMLSize_t initSize = 128 + ); + + ~DOMDeepNodeListPool(); + + // ----------------------------------------------------------------------- + // Element management + // ----------------------------------------------------------------------- + bool isEmpty() const; + bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + void removeAll(); + void cleanup(); + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3); + const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + + TVal* getById(const XMLSize_t elemId); + const TVal* getById(const XMLSize_t elemId) const; + + // ----------------------------------------------------------------------- + // Putters + // ----------------------------------------------------------------------- + XMLSize_t put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt); + +private: + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal); + const DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal) const; + void initialize(const XMLSize_t modulus); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListPool(const DOMDeepNodeListPool &); + DOMDeepNodeListPool & operator = (const DOMDeepNodeListPool &); + + // ----------------------------------------------------------------------- + // Data members + // + // fAdoptedElems + // Indicates whether the values added are adopted or just referenced. + // If adopted, then they are deleted when they are removed from the + // hash table. + // + // fBucketList + // This is the array that contains the heads of all of the list + // buckets, one for each possible hash value. + // + // fHashModulus + // The modulus used for this hash table, to hash the keys. This is + // also the number of elements in the bucket list. + // + // fHash + // The hasher for the key1 data type. + // + // fIdPtrs + // fIdPtrsCount + // This is the array of pointers to the bucket elements in order of + // their assigned ids. So taking id N and referencing this array + // gives you the element with that id. The count field indicates + // the current size of this list. When fIdCounter+1 reaches this + // value the list must be expanded. + // + // fIdCounter + // This is used to give out unique ids to added elements. It starts + // at zero (which means empty), and is bumped up for each newly added + // element. So the first element is 1, the next is 2, etc... This + // means that this value is set to the top index of the fIdPtrs array. + // ----------------------------------------------------------------------- + bool fAdoptedElems; + DOMDeepNodeListPoolTableBucketElem** fBucketList; + XMLSize_t fHashModulus; + HashBase* fHash; + TVal** fIdPtrs; + XMLSize_t fIdPtrsCount; + XMLSize_t fIdCounter; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#if !defined(XERCES_TMPLSINC) +#include +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDocumentImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDocumentImpl.hpp new file mode 100644 index 0000000..089ee37 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMDocumentImpl.hpp @@ -0,0 +1,400 @@ +#ifndef DOMDocumentImpl_HEADER_GUARD_ +#define DOMDocumentImpl_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include +#include +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMParentNode.hpp" +#include "DOMDeepNodeListPool.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMAttrImpl; +class DOMCDATASectionImpl; +class DOMCommentImpl; +class DOMConfiguration; +class DOMDeepNodeListImpl; +class DOMDocumentFragmentImpl; +class DOMDocumentTypeImpl; +class DOMElementImpl; +class DOMEntityImpl; +class DOMEntityReferenceImpl; +class DOMNotationImpl; +class DOMProcessingInstructionImpl; +class DOMTextImpl; +class DOMNodeIteratorImpl; +class DOMNormalizer; +class DOMTreeWalkerImpl; +class DOMNodeFilter; +class DOMNodeFilterImpl; +class DOMImplementation; +class DOMNodeIDMap; +class DOMRangeImpl; +class DOMStringPool; +class DOMBuffer; +class MemoryManager; +class XPathNSResolver; +class XPathExpression; + +typedef RefVectorOf Ranges; +typedef RefVectorOf NodeIterators; +typedef KeyRefPair DOMUserDataRecord; +typedef RefStackOf DOMNodePtr; + +class CDOM_EXPORT DOMDocumentImpl: public XMemory, public DOMDocument { +public: + // ----------------------------------------------------------------------- + // data types + // ----------------------------------------------------------------------- + enum NodeObjectType { + ATTR_OBJECT = 0, + ATTR_NS_OBJECT = 1, + CDATA_SECTION_OBJECT = 2, + COMMENT_OBJECT = 3, + DOCUMENT_FRAGMENT_OBJECT = 4, + DOCUMENT_TYPE_OBJECT = 5, + ELEMENT_OBJECT = 6, + ELEMENT_NS_OBJECT = 7, + ENTITY_OBJECT = 8, + ENTITY_REFERENCE_OBJECT = 9, + NOTATION_OBJECT = 10, + PROCESSING_INSTRUCTION_OBJECT = 11, + TEXT_OBJECT = 12 + }; + + + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + DOMNodeImpl fNode; // Implements common node functionality. + DOMParentNode fParent; // Implements common parent node functionality + DOMNodeIDMap* fNodeIDMap; // for use by GetElementsById(). + +public: + DOMDocumentImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMDocumentImpl(const XMLCh* namespaceURI, //DOM Level 2 + const XMLCh* qualifiedName, + DOMDocumentType* doctype, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DOMDocumentImpl(); + + void setDocumentType(DOMDocumentType *doctype); + + // Add all functions that are pure virutal in DOMNODE + DOMNODE_FUNCTIONS; + + // Add all functions that are pure virutal in DOMDocument + virtual DOMAttr* createAttribute(const XMLCh *name); + virtual DOMCDATASection* createCDATASection(const XMLCh *data); + virtual DOMComment* createComment(const XMLCh *data); + virtual DOMDocumentFragment* createDocumentFragment(); + virtual DOMDocumentType* createDocumentType(const XMLCh *name); + virtual DOMDocumentType* createDocumentType(const XMLCh *qName, + const XMLCh *publicId, + const XMLCh *systemId); + virtual DOMElement* createElement(const XMLCh * tagName); + virtual DOMElement* createElementNoCheck(const XMLCh *tagName); + virtual DOMEntity* createEntity(const XMLCh * name); + virtual DOMEntityReference* createEntityReference(const XMLCh * name); + virtual DOMNotation* createNotation(const XMLCh * name); + virtual DOMProcessingInstruction* createProcessingInstruction(const XMLCh * target, const XMLCh * data); + virtual DOMText* createTextNode(const XMLCh * data); + virtual DOMDocumentType* getDoctype() const; + virtual DOMElement* getDocumentElement() const; + virtual DOMNodeList* getElementsByTagName(const XMLCh * tagname) const; + virtual DOMImplementation* getImplementation() const; + bool isXMLName(const XMLCh * s); + virtual DOMNodeIterator* createNodeIterator(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + virtual DOMTreeWalker* createTreeWalker(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + + + virtual DOMRange* createRange(); + virtual Ranges* getRanges() const; //non-standard api + virtual NodeIterators* getNodeIterators() const; //non-standard api + virtual void removeRange(DOMRangeImpl* range); //non-standard api + virtual void removeNodeIterator(DOMNodeIteratorImpl* nodeIterator); //non-standard api + + virtual const DOMXPathExpression* createExpression(const XMLCh *expression, const DOMXPathNSResolver *resolver); + virtual const DOMXPathNSResolver* createNSResolver(DOMNode *nodeResolver); + virtual void* evaluate(const XMLCh *expression, DOMNode *contextNode, const DOMXPathNSResolver *resolver, + unsigned short type, void* result); + + + // Extension to be called by the Parser + DOMEntityReference* createEntityReferenceByParser(const XMLCh * name); + + + // + // Functions to keep track of document mutations, so that node list chached + // information can be invalidated. One global changes counter per document. + // + virtual void changed(); + virtual int changes() const; + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *
    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() const { + return errorChecking; + } + + //Introduced in DOM Level 2 + virtual DOMNode* importNode(DOMNode *source, bool deep); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLSSize_t lineNo, + const XMLSSize_t columnNo); + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMElement* getElementById(const XMLCh *elementId) const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getActualEncoding() const; + virtual void setActualEncoding(const XMLCh* actualEncoding); + virtual const XMLCh* getEncoding() const; + virtual void setEncoding(const XMLCh* encoding); + virtual bool getStandalone() const; + virtual void setStandalone(bool standalone); + virtual const XMLCh* getVersion() const; + virtual void setVersion(const XMLCh* version); + virtual const XMLCh* getDocumentURI() const; + virtual void setDocumentURI(const XMLCh* documentURI); + virtual bool getStrictErrorChecking() const; + virtual void setStrictErrorChecking(bool strictErrorChecking); + virtual DOMNode* adoptNode(DOMNode* source); + virtual void normalizeDocument(); + virtual DOMConfiguration* getDOMConfiguration() const; + virtual void setDOMConfiguration(DOMConfiguration *config); + + // helper functions to prevent storing userdata pointers on every node. + void* setUserData(DOMNodeImpl* n, + const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + void* getUserData(const DOMNodeImpl* n, + const XMLCh* key) const; + void callUserDataHandlers(const DOMNodeImpl* n, + DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + void transferUserData(DOMNodeImpl* n1, DOMNodeImpl* n2); + + DOMNode* renameNode(DOMNode* n, + const XMLCh* namespaceURI, + const XMLCh* name); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const XMLCh * qName); + static bool isKidOK(DOMNode *parent, DOMNode *child); + + inline DOMNodeIDMap* getNodeIDMap() {return fNodeIDMap;}; + + + // + // Memory Management Functions. All memory is allocated by and owned by + // a document, and is not recovered until the + // document itself is deleted. + // + void* allocate(size_t amount); + void* allocate(size_t amount, NodeObjectType type); + XMLCh* cloneString(const XMLCh *src); + const XMLCh* getPooledString(const XMLCh *src); + void deleteHeap(); + void release(DOMNode* object, NodeObjectType type); + void releaseDocNotifyUserData(DOMNode* object); + void releaseBuffer(DOMBuffer* buffer); + DOMBuffer* popBuffer(); + MemoryManager* getMemoryManager() const; + + // Factory methods for getting/creating node lists. + // Because nothing is ever deleted, the implementation caches and recycles + // previously used instances of DOMDeepNodeList + // + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, const XMLCh *tagName); + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + +private: + //Internal helper functions + virtual DOMNode* importNode(DOMNode *source, bool deep, bool cloningNode); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentImpl(const DOMDocumentImpl &); + DOMDocumentImpl & operator = (const DOMDocumentImpl &); + +private: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + // New data introduced in DOM Level 3 + const XMLCh* fActualEncoding; + const XMLCh* fEncoding; + bool fStandalone; + const XMLCh* fVersion; + const XMLCh* fDocumentURI; + DOMConfiguration* fDOMConfiguration; + + XMLStringPool fUserDataTableKeys; + RefHash2KeysTableOf* fUserDataTable; + + + // Per-Document heap Variables. + // The heap consists of one or more biggish blocks which are + // sub-allocated for individual allocations of nodes, strings, etc. + // The big blocks form a linked list, allowing them to be located for deletion. + // + // There is no provision for deleting suballocated blocks, other than + // deleting the entire heap when the document is deleted. + // + // There is no header on individual sub-allocated blocks. + // The header on big blocks consists only of a single back pointer to + // the previously allocated big block (our linked list of big blocks) + // + // + // revisit - this heap should be encapsulated into its own + // class, rather than hanging naked on Document. + // + void* fCurrentBlock; + char* fFreePtr; + XMLSize_t fFreeBytesRemaining, + fHeapAllocSize; + + // To recycle the DOMNode pointer + RefArrayOf* fRecycleNodePtr; + + // To recycle DOMBuffer pointer + RefStackOf* fRecycleBufferPtr; + + // Pool of DOMNodeList for getElementsByTagName + DOMDeepNodeListPool* fNodeListPool; + + // Other data + DOMDocumentType* fDocType; + DOMElement* fDocElement; + DOMStringPool* fNamePool; + DOMNormalizer* fNormalizer; + Ranges* fRanges; + NodeIterators* fNodeIterators; + MemoryManager* fMemoryManager; // configurable memory manager + + int fChanges; + bool errorChecking; // Bypass error checking. + +}; + +inline MemoryManager* DOMDocumentImpl::getMemoryManager() const +{ + return fMemoryManager; +} + +XERCES_CPP_NAMESPACE_END + +// --------------------------------------------------------------------------- +// +// Operator new. Global overloaded version, lets any object be allocated on +// the heap owned by a document. +// +// --------------------------------------------------------------------------- +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType type) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt); + return p; +} + +// --------------------------------------------------------------------------- +// For DOM: +// Bypass compiler warning: +// no matching operator delete found; memory will not be freed if initialization throws an exception +// --------------------------------------------------------------------------- +#if _MSC_VER >= 1200 /* VC++ 6.0 */ +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType /*type*/) +{ + return; +} +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeIDMap.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeIDMap.hpp new file mode 100644 index 0000000..95771a2 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeIDMap.hpp @@ -0,0 +1,88 @@ +#ifndef DOMNodeIDMap_HEADER_GUARD_ +#define DOMNodeIDMap_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIDMap.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +XERCES_CPP_NAMESPACE_BEGIN + + +// +// Class DOMNodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +class DOMAttr; +class DOMDocument; + + +class DOMNodeIDMap { +public: + + DOMNodeIDMap(int initialSize, DOMDocument *doc); // Create a new hash table, sized to hold "initialSize" + // Entries. It will automatically grow if need be. + + virtual ~DOMNodeIDMap(); + +private: + DOMNodeIDMap(const DOMNodeIDMap &other); // No copy, assignement, comparison. + DOMNodeIDMap &operator = (const DOMNodeIDMap &other); + bool operator == (const DOMNodeIDMap &other); + +public: + void add(DOMAttr *attr); // Add the specified attribute to the table. + void remove(DOMAttr *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + DOMAttr *find(const XMLCh *ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + DOMAttr **fTable; + XMLSize_t fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + XMLSize_t fSize; // The current size of the table array + // (number of slots, not bytes.) + XMLSize_t fNumEntries; // The number of entries used. + XMLSize_t fMaxEntries; // The max number of entries to use before + // growing the table. + DOMDocument *fDoc; // The owning document. + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeImpl.hpp new file mode 100644 index 0000000..f3749ed --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeImpl.hpp @@ -0,0 +1,381 @@ +#ifndef DOMNodeImpl_HEADER_GUARD_ +#define DOMNodeImpl_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A DOMNodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMap; +class DOMNodeList; +class DOMNode; +class DOMDocument; +class DOMElement; + +class CDOM_EXPORT DOMNodeImpl { +public: + + // data + DOMNode *fOwnerNode; // typically the parent but not always! + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short LEAFNODETYPE; + static const unsigned short CHILDNODE; + static const unsigned short TOBERELEASED; + + +public: + DOMNodeImpl(DOMNode *ownerDocument); + DOMNodeImpl(const DOMNodeImpl &other); + ~DOMNodeImpl(); + + DOMNode * appendChild(DOMNode *newChild); + DOMNamedNodeMap * getAttributes() const; + DOMNodeList * getChildNodes() const; + DOMNode * getFirstChild() const; + DOMNode * getLastChild() const; + const XMLCh * getLocalName() const; + const XMLCh * getNamespaceURI() const; + DOMNode * getNextSibling() const; + const XMLCh * getNodeValue() const; + DOMDocument * getOwnerDocument() const; + DOMNode * getParentNode() const; + const XMLCh * getPrefix() const; + DOMNode * getPreviousSibling() const; + bool hasChildNodes() const; + DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild); + void normalize(); + DOMNode * removeChild(DOMNode *oldChild); + DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild); + void setNodeValue(const XMLCh *value); + void setPrefix(const XMLCh *fPrefix); + void setReadOnly(bool readOnly, bool deep); + bool isSupported(const XMLCh *feature, const XMLCh *version) const; + bool hasAttributes() const; + + // Introduced in DOM Level 3 + void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler); + void* getUserData(const XMLCh* key) const; + bool isSameNode(const DOMNode* other) const; + bool isEqualNode(const DOMNode* arg) const; + const XMLCh* getBaseURI() const ; + short compareTreePosition(const DOMNode* other) const; + const XMLCh* getTextContent() const ; + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const; + void setTextContent(const XMLCh* textContent) ; + const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ; + bool isDefaultNamespace(const XMLCh* namespaceURI) const ; + const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ; + DOMNode* getInterface(const XMLCh* feature) ; + + + // Helper functions for DOM Level 3 + void release(); + void callUserDataHandlers(DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + //reverses the bit pattern given by compareTreePosition + short reverseTreeOrderBitPattern(short pattern) const; + + + //Utility, not part of DOM Level 2 API + static bool isKidOK(DOMNode *parent, DOMNode *child); + static const XMLCh *mapPrefix(const XMLCh *prefix, + const XMLCh *namespaceURI, short nType); + + static const XMLCh *getXmlnsString(); + static const XMLCh *getXmlnsURIString(); + static const XMLCh *getXmlString(); + static const XMLCh *getXmlURIString(); + +public: // should really be protected - ALH + + DOMNode* getElementAncestor (const DOMNode* currentNode) const; + const XMLCh* lookupNamespacePrefix(const XMLCh* const namespaceURI, bool useDefaultx, DOMElement *el) const ; + void setOwnerDocument(DOMDocument *doc); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + // For Attributes, true if the attr node is attached to an element. + // For all other node types, true if the node has a parent node. + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValue() const { + return (flags & SETVALUE) != 0; + } + + inline void setValue(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + // + // LeafNode is set true for node types that can not be ParentNodes (can't have children) + // This knowledge is used to allow casting from any unknown node type to the + // IDParentImpl or IDChildImpl parts of the node. + // + inline bool isLeafNode() const { + return (flags & LEAFNODETYPE) != 0; + } + + inline void setIsLeafNode(bool value) { + flags = (value ? flags | LEAFNODETYPE : flags & ~LEAFNODETYPE); + } + + + // + // ChildNode is set true for node types that can be children of other nodes, and + // therefore include a DOMChildNode data member. Note that all of the leaf + // node types (above flag) are also ChildNodes, but not all ChildNodes are + // leaf nodes. + inline bool isChildNode() const { + return (flags & CHILDNODE) != 0; + } + + inline void setIsChildNode(bool value) { + flags = (value ? flags | CHILDNODE : flags & ~CHILDNODE); + } + + // True if this node has to be released regardless if it has a owner or not + // This is true if called from fParent->release() + inline bool isToBeReleased() const { + return (flags & TOBERELEASED) != 0; + } + + inline void isToBeReleased(bool value) { + flags = (value ? flags | TOBERELEASED : flags & ~TOBERELEASED); + } + +}; + + +// This macro lists all of the pure virtual functions declared in DOMNode that must +// be implemented by all node types. Since there is no inheritance of implementation, +// using this macro in the class declaration of the node types make it easier to +// accurately get all of the functions declared. +// +#define DOMNODE_FUNCTIONS \ + virtual DOMNode* appendChild(DOMNode *newChild) ;\ + virtual DOMNode* cloneNode(bool deep) const ;\ + virtual DOMNamedNodeMap* getAttributes() const ;\ + virtual DOMNodeList* getChildNodes() const ;\ + virtual DOMNode* getFirstChild() const ;\ + virtual DOMNode* getLastChild() const ;\ + virtual const XMLCh* getLocalName() const ;\ + virtual const XMLCh* getNamespaceURI() const ;\ + virtual DOMNode* getNextSibling() const ;\ + virtual const XMLCh* getNodeName() const ;\ + virtual short getNodeType() const ;\ + virtual const XMLCh* getNodeValue() const ;\ + virtual DOMDocument* getOwnerDocument() const ;\ + virtual const XMLCh* getPrefix() const ;\ + virtual DOMNode* getParentNode() const ;\ + virtual DOMNode* getPreviousSibling() const ;\ + virtual bool hasChildNodes() const ;\ + virtual DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild) ;\ + virtual void normalize() ;\ + virtual DOMNode* removeChild(DOMNode *oldChild) ;\ + virtual DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild) ;\ + virtual void setNodeValue(const XMLCh *nodeValue) ;\ + virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const ;\ + virtual bool hasAttributes() const ;\ + virtual void setPrefix(const XMLCh * prefix) ;\ + virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\ + virtual void* getUserData(const XMLCh* key) const ;\ + virtual bool isSameNode(const DOMNode* other) const;\ + virtual bool isEqualNode(const DOMNode* arg) const;\ + virtual const XMLCh* getBaseURI() const ;\ + virtual short compareTreePosition(const DOMNode* other) const ;\ + virtual const XMLCh* getTextContent() const ;\ + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const;\ + virtual void setTextContent(const XMLCh* textContent) ;\ + virtual const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ;\ + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const;\ + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ;\ + virtual DOMNode* getInterface(const XMLCh* feature) ;\ + virtual void release() + + +/* + * Here are dummy stubs for most of the functions introduced by DOMNode. + * Each subclass of DOMNode will have something like this that delegates each + * function to the appropriate implementation. + * Functions that must be supplied by every node class are omitted. + * + DOMNode* xxx::appendChild(DOMNode *newChild) {return fParent.appendChild (newChild); }; + DOMNamedNodeMap* xxx::getAttributes() const {return fNode.getAttributes (); }; + DOMNodeList* xxx::getChildNodes() const {return fParent.getChildNodes (); }; + DOMNode* xxx::getFirstChild() const {return fParent.getFirstChild (); }; + DOMNode* xxx::getLastChild() const {return fParent.getLastChild (); }; + const XMLCh* xxx::getLocalName() const {return fNode.getLocalName (); }; + const XMLCh* xxx::getNamespaceURI() const {return fNode.getNamespaceURI (); }; + DOMNode* xxx::getNextSibling() const {return fChild.getNextSibling (); }; + const XMLCh* xxx::getNodeValue() const {return fNode.getNodeValue (); }; + DOMDocument* xxx::getOwnerDocument() const {return fNode.getOwnerDocument (); }; + const XMLCh* xxx::getPrefix() const {return fNode.getPrefix (); }; + DOMNode* xxx::getParentNode() const {return fChild.getParentNode (this); }; + DOMNode* xxx::getPreviousSibling() const {return fChild.getPreviousSibling (this); }; + bool xxx::hasChildNodes() const {return fParent.hasChildNodes (); }; + DOMNode* xxx::insertBefore(DOMNode *newChild, DOMNode *refChild) + {return fParent.insertBefore (newChild, refChild); }; + void xxx::normalize() {fParent.normalize(); }; + DOMNode* xxx::removeChild(DOMNode *oldChild) {return fParent.removeChild (oldChild); }; + DOMNode* xxx::replaceChild(DOMNode *newChild, DOMNode *oldChild) + {return fParent.replaceChild (newChild, oldChild); }; + bool xxx::isSupported(const XMLCh *feature, const XMLCh *version) const + {return fNode.isSupported (feature, version); }; + void xxx::setPrefix(const XMLCh *prefix) {fNode.setPrefix(prefix); }; + bool xxx::hasAttributes() const {return fNode.hasAttributes(); }; + bool xxx::isSameNode(const DOMNode* other) const {return fNode.isSameNode(other); }; + bool xxx::isEqualNode(const DOMNode* arg) const {return fNode.isEqualNode(arg); }; + void* xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) + {return fNode.setUserData(key, data, handler); }; + void* xxx::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* xxx::getBaseURI() const {return fNode.getBaseURI(); }; + short xxx::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); }; + const XMLCh* xxx::getTextContent() const {return fNode.getTextContent(); }; + void xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* xxx::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); }; + bool xxx::isDefaultNamespace(const XMLCh* namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* xxx::lookupNamespaceURI(const XMLCh* prefix) const {return fNode.lookupNamespaceURI(prefix); }; + DOMNode* xxx::getInterface(const XMLCh* feature) {return fNode.getInterface(feature); }; + + +*/ + + + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeListImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeListImpl.hpp new file mode 100644 index 0000000..3539bcb --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMNodeListImpl.hpp @@ -0,0 +1,73 @@ +#ifndef DOMNodeListImpl_HEADER_GUARD_ +#define DOMNodeListImpl_HEADER_GUARD_ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeListImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +// NodeList implementation class - +// This is for NodeLists returned by GetChildNodes only, not for +// node lists returned by GetElementsByTagName +// +// Every node type capable of having children has (as an embedded member) +// an instance of this class. To hold down the size overhead on each node, a +// cache of extended data for active node lists is maintained +// separately. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; + +class CDOM_EXPORT DOMNodeListImpl: public DOMNodeList +{ +private: + DOMNode *fNode; + + // Unused, and unimplemented constructors, operators, etc. + DOMNodeListImpl(); + DOMNodeListImpl(const DOMNodeListImpl & other); + DOMNodeListImpl & operator = (const DOMNodeListImpl & other); + +public: + DOMNodeListImpl(DOMNode *node); + virtual ~DOMNodeListImpl(); + virtual DOMNode * item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + + diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMParentNode.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMParentNode.hpp new file mode 100644 index 0000000..923bef5 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMParentNode.hpp @@ -0,0 +1,116 @@ +#ifndef DOMParentNode_HEADER_GUARD_ +#define DOMParentNode_HEADER_GUARD_ + + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMParentNode.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ParentNode provides the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should include this class and pay the price for it. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + * + **/ + +#include +#include "DOMNodeListImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMChildNode; +class DOMDocument; +class DOMNode; +class DOMNodeList; + +class CDOM_EXPORT DOMParentNode { +public: + DOMDocument *fOwnerDocument; // Document this node belongs to + DOMNode *fFirstChild; + DOMNodeListImpl fChildNodeList; // for GetChildNodes() + +public: + DOMParentNode(DOMDocument *ownerDocument); + DOMParentNode(const DOMParentNode &other); + + DOMDocument * getOwnerDocument() const; + void setOwnerDocument(DOMDocument* doc); + + // Track changes to the node tree structure under this node. An optimization + // for NodeLists. + int changes() const; + void changed(); + + DOMNode* appendChild(DOMNode *newChild); + DOMNodeList* getChildNodes() const; + DOMNode* getFirstChild() const; + DOMNode* getLastChild() const; + XMLSize_t getLength() const; + bool hasChildNodes() const; + DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild); + DOMNode* item(XMLSize_t index) const; + DOMNode* removeChild(DOMNode *oldChild); + DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild); + + // Append certain types of nodes fast. Used to speed up XML to DOM + // parsing. See the function implementation for detail. + DOMNode* appendChildFast(DOMNode *newChild); + + //Introduced in DOM Level 2 + void normalize(); + + //Introduced in DOM Level 3 + bool isEqualNode(const DOMNode* arg) const; + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + DOMDocument * getDocument() const; + void release(); + + +public: + void cloneChildren(const DOMNode *other); + DOMNode * lastChild() const; + void lastChild(DOMNode *); + +private: + // unimplemented + DOMParentNode& operator= (const DOMParentNode& other); +}; + +#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument) + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMRangeImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMRangeImpl.hpp new file mode 100644 index 0000000..8fe3052 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMRangeImpl.hpp @@ -0,0 +1,175 @@ +#ifndef DOMRangeImpl_HEADER_GUARD_ +#define DOMRangeImpl_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: DOMRangeImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DOMNode; +class DOMDocumentFragment; +class DOMDocument; +class DOMText; +class MemoryManager; + +class CDOM_EXPORT DOMRangeImpl: public DOMRange { +private: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //private data + + DOMNode* fStartContainer; + XMLSize_t fStartOffset; + DOMNode* fEndContainer; + XMLSize_t fEndOffset; + bool fCollapsed; + DOMDocument* fDocument; + bool fDetached; + + DOMNode* fRemoveChild; + MemoryManager* fMemoryManager; + +public: + //c'tor + DOMRangeImpl(DOMDocument* doc, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMRangeImpl(const DOMRangeImpl& other); + + //d'tor + ~DOMRangeImpl(); + + //getter functions + virtual DOMNode* getStartContainer() const; + virtual XMLSize_t getStartOffset() const; + virtual DOMNode* getEndContainer() const; + virtual XMLSize_t getEndOffset() const; + virtual bool getCollapsed() const; + virtual const DOMNode* getCommonAncestorContainer() const; + + //setter functions + virtual void setStart(const DOMNode *parent, XMLSize_t offset); + virtual void setEnd(const DOMNode *parent, XMLSize_t offset); + + virtual void setStartBefore(const DOMNode *refNode); + virtual void setStartAfter(const DOMNode *refNode); + virtual void setEndBefore(const DOMNode *refNode); + virtual void setEndAfter(const DOMNode *refNode); + + //misc functions + virtual void collapse(bool toStart); + virtual void selectNode(const DOMNode *node); + virtual void selectNodeContents(const DOMNode *node); + + //Functions related to comparing range Boundrary-Points + virtual short compareBoundaryPoints(CompareHow how, const DOMRange* range) const; + virtual void deleteContents(); + virtual DOMDocumentFragment* extractContents(); + virtual DOMDocumentFragment* cloneContents() const; + virtual void insertNode(DOMNode* node); + + //Misc functions + virtual void surroundContents(DOMNode *node); + virtual DOMRange* cloneRange() const; + virtual const XMLCh* toString() const; + virtual void detach(); + virtual void release(); + + //getter functions + DOMDocument* getDocument(); + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(DOMNode* oldNode, DOMNode* startNode, XMLSize_t offset); + void updateRangeForInsertedNode(DOMNode* node); + void receiveReplacedText(DOMNode* node); + void updateRangeForDeletedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForInsertedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForDeletedNode(DOMNode* node); + +private: + //setter functions + void setStartContainer(const DOMNode* node); + void setStartOffset(XMLSize_t offset) ; + void setEndContainer(const DOMNode* node); + void setEndOffset(XMLSize_t offset) ; + + //misc functions + void validateNode(const DOMNode* node) const; + bool isValidAncestorType(const DOMNode* node) const; + bool hasLegalRootContainer(const DOMNode* node) const; + bool isLegalContainedNode(const DOMNode* node ) const; + void checkIndex(const DOMNode* node, XMLSize_t offset) const; + static bool isAncestorOf(const DOMNode* a, const DOMNode* b); + + XMLSize_t indexOf(const DOMNode* child, const DOMNode* parent) const; + + const DOMNode* commonAncestorOf(const DOMNode* pointA, const DOMNode* pointB) const; + DOMNode* nextNode(const DOMNode* node, bool visitChildren) const; + DOMDocumentFragment* traverseContents(TraversalType type); + void checkReadOnly(DOMNode* start, DOMNode* end, + XMLSize_t starOffset, XMLSize_t endOffset); + void recurseTreeAndCheck(DOMNode* start, DOMNode* end); + DOMNode* removeChild(DOMNode* parent, DOMNode* child); + + DOMDocumentFragment* traverseSameContainer( int how ); + DOMDocumentFragment* traverseCommonStartContainer( DOMNode *endAncestor, int how ); + DOMDocumentFragment* traverseCommonEndContainer( DOMNode *startAncestor, int how ); + DOMDocumentFragment* traverseCommonAncestors( DOMNode *startAncestor, DOMNode *endAncestor, int how ); + DOMNode* traverseRightBoundary( DOMNode *root, int how ); + DOMNode* traverseLeftBoundary( DOMNode *root, int how ); + DOMNode* traverseNode( DOMNode *n, bool isFullySelected, bool isLeft, int how ); + DOMNode* traverseFullySelected( DOMNode *n, int how ); + DOMNode* traversePartiallySelected( DOMNode *n, int how ); + DOMNode* traverseTextNode( DOMNode *n, bool isLeft, int how ); + DOMNode* getSelectedNode( DOMNode *container, int offset ); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMRangeImpl & operator = (const DOMRangeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTreeWalkerImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTreeWalkerImpl.hpp new file mode 100644 index 0000000..501a676 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTreeWalkerImpl.hpp @@ -0,0 +1,168 @@ +#ifndef DOMTreeWalkerImpl_HEADER_GUARD_ +#define DOMTreeWalkerImpl_HEADER_GUARD_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTreeWalkerImpl.hpp,v 1.1 2008/05/26 03:12:16 ben Exp $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker { + private: + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + // The current Node. + DOMNode* fCurrentNode; + + // The root Node. + DOMNode* fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + + public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + DOMTreeWalkerImpl ( + DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi); + DOMTreeWalkerImpl& operator= (const DOMTreeWalkerImpl& twi); + + // Return the root node. + virtual DOMNode* getRoot (); + + // Return the whatToShow value. + virtual unsigned long getWhatToShow (); + + // Return the NodeFilter. + virtual DOMNodeFilter* getFilter (); + + + // Return the current DOMNode. + virtual DOMNode* getCurrentNode (); + + // Return the current Node. + virtual void setCurrentNode (DOMNode* node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + virtual DOMNode* nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* nextNode (); + + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + // release the resource + virtual void release(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getParentNode (DOMNode* node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getNextSibling (DOMNode* node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getPreviousSibling (DOMNode* node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getFirstChild (DOMNode* node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getLastChild (DOMNode* node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOMNode* node); + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTypeInfoImpl.hpp b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTypeInfoImpl.hpp new file mode 100644 index 0000000..6cdf968 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/DOMTypeInfoImpl.hpp @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#if !defined(DOMTYPEINFOIMPL_HPP) +#define DOMTYPEINFOIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMTypeInfoImpl : public DOMTypeInfo, public DOMPSVITypeInfo +{ +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMTypeInfoImpl(const XMLCh* namespaceUri=0, const XMLCh* name=0); + DOMTypeInfoImpl(DOMDocumentImpl* ownerDoc, const DOMPSVITypeInfo* sourcePSVI); + + static DOMTypeInfoImpl g_DtdValidatedElement; + static DOMTypeInfoImpl g_DtdNotValidatedAttribute; + static DOMTypeInfoImpl g_DtdValidatedCDATAAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFSAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITYAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITIESAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENSAttribute; + static DOMTypeInfoImpl g_DtdValidatedNOTATIONAttribute; + static DOMTypeInfoImpl g_DtdValidatedENUMERATIONAttribute; + + //@{ + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + /** + * Returns The name of a type declared for the associated DOMElement + * or DOMAttr, or null if undeclared. + * + *

"Experimental - subject to change"

+ * + * @return The name of a type declared for the associated DOMElement + * or DOMAttribute, or null if undeclared. + * @since DOM level 3 + */ + virtual const XMLCh* getName() const; + + /** + * The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * + *

"Experimental - subject to change"

+ * + * @return The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * @since DOM level 3 + */ + virtual const XMLCh* getNamespace() const; + + /** + * Returns the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + * + *

"Experimental - subject to change"

+ * + * @return the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + */ + virtual const XMLCh* getStringProperty(PSVIProperty prop) const; + + /** + * Returns the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + * + *

"Experimental - subject to change"

+ * + * @return the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + */ + virtual int getNumericProperty(PSVIProperty prop) const; + //@} + + //@{ + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + + /** + * Set the value for a string PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setStringProperty(PSVIProperty prop, const XMLCh* value); + + /** + * Set the value for a numeric PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setNumericProperty(PSVIProperty prop, int value); + //@} + + private: + int fBitFields; + const XMLCh* fTypeName; + const XMLCh* fTypeNamespace; + const XMLCh* fMemberTypeName; + const XMLCh* fMemberTypeNamespace; + const XMLCh* fDefaultValue; + const XMLCh* fNormalizedValue; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTypeInfoImpl (const DOMTypeInfoImpl&); + DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMTypeInfo.hpp + */ diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.am b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.am new file mode 100644 index 0000000..ce63756 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = $(srcdir)/*.hpp + diff --git a/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.in b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.in new file mode 100644 index 0000000..7618a21 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile.in @@ -0,0 +1,819 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/2.8.0/xerces +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = $(srcdir)/*.hpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/2.8.0/xerces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.am b/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.am new file mode 100644 index 0000000..9364c19 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = xerces + + diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.in b/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.in new file mode 100644 index 0000000..e81a071 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/3.0.0 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = xerces +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.0.0/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.0.0/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMAttrImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMAttrImpl.hpp new file mode 100644 index 0000000..e4fc0fa --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMAttrImpl.hpp @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrImpl.hpp 678709 2008-07-22 10:56:56Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMATTRIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMATTRIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMDocumentImpl.hpp" +#include +#include +#include "DOMNodeIDMap.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMElementImpl; +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMAttrImpl: public DOMAttr { + +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + const XMLCh *fName; + +protected: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMAttrImpl(DOMDocument *ownerDocument, const XMLCh *aName); + DOMAttrImpl(const DOMAttrImpl &other, bool deep=false); + virtual ~DOMAttrImpl(); + +public: + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + +public: + virtual const XMLCh * getName() const; + virtual bool getSpecified() const; + virtual const XMLCh * getValue() const; + virtual void setSpecified(bool arg); + virtual void setValue(const XMLCh * value); + virtual DOMElement * getOwnerElement() const; + virtual bool isId() const; + virtual const DOMTypeInfo* getSchemaTypeInfo() const; + + void setOwnerElement(DOMElement *ownerElem); //internal use only + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + + //helper function for DOM Level 3 TypeInfo + virtual void setSchemaTypeInfo(const DOMTypeInfoImpl* typeInfo); + + // helper method that sets this attr to an idnode and places it into the document map + virtual void addAttrToIDNodeMap(); + + // helper to remove this attr from from the id map if it is in there + virtual void removeAttrFromIDNodeMap(); + +public: + // Set attribute value fast. Assumptions: + // + // - node is not read-only + // - no ID management is performed + // - this attribute does not have a value + // + virtual void setValueFast (const XMLCh * value); + +protected: + void getTextValue(DOMNode* node, XMLBuffer& buf) const; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrImpl& operator=(const DOMAttrImpl&); +}; + +inline void DOMAttrImpl::removeAttrFromIDNodeMap() +{ + if (fNode.isIdAttr()) { + ((DOMDocumentImpl *)fParent.fOwnerDocument)->getNodeIDMap()->remove(this); + fNode.isIdAttr(false); + } +} + +inline void DOMAttrImpl::addAttrToIDNodeMap() +{ + if (fNode.isIdAttr()) + return; + + fNode.isIdAttr(true); + + // REVIST For now, we don't worry about what happens if the new + // name conflicts as per setValue + DOMDocumentImpl *doc = (DOMDocumentImpl *)(fParent.fOwnerDocument); + + if (doc->fNodeIDMap == 0) + doc->fNodeIDMap = new (doc) DOMNodeIDMap(500, doc); + + doc->getNodeIDMap()->add(this); +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDeepNodeListPool.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDeepNodeListPool.hpp new file mode 100644 index 0000000..431e07d --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDeepNodeListPool.hpp @@ -0,0 +1,200 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListPool.hpp 679340 2008-07-24 10:28:29Z borisk $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#if !defined(XERCESC_INCLUDE_GUARD_DOMDEEPNODELISTPOOL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMDEEPNODELISTPOOL_HPP + + +#include +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This should really be a nested class, but some of the compilers we +// have to support cannot deal with that! +// +template +struct DOMDeepNodeListPoolTableBucketElem : public XMemory +{ + DOMDeepNodeListPoolTableBucketElem + ( + void* key1 + , XMLCh* key2 + , XMLCh* key3 + , TVal* const value + , DOMDeepNodeListPoolTableBucketElem* next + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ) : + fData(value) + , fNext(next) + , fKey1(key1) + , fKey2(0) + , fKey3(0) + { + if (key2) + fKey2 = XMLString::replicate(key2, manager); + + if (key3) + fKey3 = XMLString::replicate(key3, manager); + } + + TVal* fData; + DOMDeepNodeListPoolTableBucketElem* fNext; + void* fKey1; + XMLCh* fKey2; + XMLCh* fKey3; + + ~DOMDeepNodeListPoolTableBucketElem() {}; +}; + + +template +class DOMDeepNodeListPool +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const XMLSize_t initSize = 128 + ); + + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const XMLSize_t initSize = 128 + ); + + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const THasher& hasher + , const XMLSize_t initSize = 128 + ); + + ~DOMDeepNodeListPool(); + + // ----------------------------------------------------------------------- + // Element management + // ----------------------------------------------------------------------- + bool isEmpty() const; + bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + void removeAll(); + void cleanup(); + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3); + const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + + TVal* getById(const unsigned int elemId); + const TVal* getById(const unsigned int elemId) const; + + // ----------------------------------------------------------------------- + // Putters + // ----------------------------------------------------------------------- + unsigned int put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt); + +private: + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal); + const DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal) const; + void initialize(const XMLSize_t modulus); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListPool(const DOMDeepNodeListPool &); + DOMDeepNodeListPool & operator = (const DOMDeepNodeListPool &); + + // ----------------------------------------------------------------------- + // Data members + // + // fAdoptedElems + // Indicates whether the values added are adopted or just referenced. + // If adopted, then they are deleted when they are removed from the + // hash table. + // + // fBucketList + // This is the array that contains the heads of all of the list + // buckets, one for each possible hash value. + // + // fHashModulus + // The modulus used for this hash table, to hash the keys. This is + // also the number of elements in the bucket list. + // + // fHash + // The hasher for the key1 data type. + // + // fIdPtrs + // fIdPtrsCount + // This is the array of pointers to the bucket elements in order of + // their assigned ids. So taking id N and referencing this array + // gives you the element with that id. The count field indicates + // the current size of this list. When fIdCounter+1 reaches this + // value the list must be expanded. + // + // fIdCounter + // This is used to give out unique ids to added elements. It starts + // at zero (which means empty), and is bumped up for each newly added + // element. So the first element is 1, the next is 2, etc... This + // means that this value is set to the top index of the fIdPtrs array. + // ----------------------------------------------------------------------- + bool fAdoptedElems; + DOMDeepNodeListPoolTableBucketElem** fBucketList; + XMLSize_t fHashModulus; + THasher fHasher; + TVal** fIdPtrs; + XMLSize_t fIdPtrsCount; + unsigned int fIdCounter; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#if !defined(XERCES_TMPLSINC) +#include +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDocumentImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDocumentImpl.hpp new file mode 100644 index 0000000..76deafc --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMDocumentImpl.hpp @@ -0,0 +1,507 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentImpl.hpp 679340 2008-07-24 10:28:29Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMDOCUMENTIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMDOCUMENTIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMStringPool.hpp" +#include "DOMParentNode.hpp" +#include "DOMDeepNodeListPool.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMAttrImpl; +class DOMCDATASectionImpl; +class DOMCommentImpl; +class DOMConfiguration; +class DOMDeepNodeListImpl; +class DOMDocumentFragmentImpl; +class DOMDocumentTypeImpl; +class DOMElementImpl; +class DOMEntityImpl; +class DOMEntityReferenceImpl; +class DOMNotationImpl; +class DOMProcessingInstructionImpl; +class DOMTextImpl; +class DOMNodeIteratorImpl; +class DOMNormalizer; +class DOMTreeWalkerImpl; +class DOMNodeFilter; +class DOMNodeFilterImpl; +class DOMImplementation; +class DOMNodeIDMap; +class DOMRangeImpl; +class DOMBuffer; +class MemoryManager; +class XPathNSResolver; +class XPathExpression; + +typedef RefVectorOf Ranges; +typedef RefVectorOf NodeIterators; +typedef KeyRefPair DOMUserDataRecord; +typedef RefStackOf DOMNodePtr; + +class CDOM_EXPORT DOMDocumentImpl: public XMemory, public DOMMemoryManager, public DOMDocument { +public: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + DOMNodeImpl fNode; // Implements common node functionality. + DOMParentNode fParent; // Implements common parent node functionality + DOMNodeIDMap* fNodeIDMap; // for use by GetElementsById(). + +public: + DOMDocumentImpl(DOMImplementation* domImpl, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMDocumentImpl(const XMLCh* namespaceURI, //DOM Level 2 + const XMLCh* qualifiedName, + DOMDocumentType* doctype, + DOMImplementation* domImpl, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DOMDocumentImpl(); + + void setDocumentType(DOMDocumentType *doctype); + +public: + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + +public: + // Add all functions that are pure virtual in DOMDocument + virtual DOMAttr* createAttribute(const XMLCh *name); + virtual DOMCDATASection* createCDATASection(const XMLCh *data); + virtual DOMComment* createComment(const XMLCh *data); + virtual DOMDocumentFragment* createDocumentFragment(); + virtual DOMDocumentType* createDocumentType(const XMLCh *name); + virtual DOMDocumentType* createDocumentType(const XMLCh *qName, + const XMLCh *publicId, + const XMLCh *systemId); + virtual DOMElement* createElement(const XMLCh * tagName); + virtual DOMElement* createElementNoCheck(const XMLCh *tagName); + virtual DOMEntity* createEntity(const XMLCh * name); + virtual DOMEntityReference* createEntityReference(const XMLCh * name); + virtual DOMNotation* createNotation(const XMLCh * name); + virtual DOMProcessingInstruction* createProcessingInstruction(const XMLCh * target, const XMLCh * data); + virtual DOMText* createTextNode(const XMLCh * data); + virtual DOMDocumentType* getDoctype() const; + virtual DOMElement* getDocumentElement() const; + virtual DOMNodeList* getElementsByTagName(const XMLCh * tagname) const; + virtual DOMImplementation* getImplementation() const; + bool isXMLName(const XMLCh * s); + virtual DOMNodeIterator* createNodeIterator(DOMNode *root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + virtual DOMTreeWalker* createTreeWalker(DOMNode *root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + + + virtual DOMRange* createRange(); + virtual Ranges* getRanges() const; //non-standard api + virtual NodeIterators* getNodeIterators() const; //non-standard api + virtual void removeRange(DOMRangeImpl* range); //non-standard api + virtual void removeNodeIterator(DOMNodeIteratorImpl* nodeIterator); //non-standard api + + virtual DOMXPathExpression* createExpression(const XMLCh *expression, + const DOMXPathNSResolver *resolver); + virtual DOMXPathNSResolver* createNSResolver(const DOMNode *nodeResolver); + virtual DOMXPathResult* evaluate(const XMLCh *expression, + const DOMNode *contextNode, + const DOMXPathNSResolver *resolver, + DOMXPathResult::ResultType type, + DOMXPathResult* result); + + + // Extension to be called by the Parser + DOMEntityReference* createEntityReferenceByParser(const XMLCh * name); + + // Add all functions that are pure virtual in DOMMemoryManager + virtual XMLSize_t getMemoryAllocationBlockSize() const; + virtual void setMemoryAllocationBlockSize(XMLSize_t size); + virtual void* allocate(XMLSize_t amount); + virtual void* allocate(XMLSize_t amount, DOMMemoryManager::NodeObjectType type); + virtual void release(DOMNode* object, DOMMemoryManager::NodeObjectType type); + virtual XMLCh* cloneString(const XMLCh *src); + + // + // Functions to keep track of document mutations, so that node list chached + // information can be invalidated. One global changes counter per document. + // + virtual void changed(); + virtual int changes() const; + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *
    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() const { + return errorChecking; + } + + //Introduced in DOM Level 2 + virtual DOMNode* importNode(const DOMNode *source, bool deep); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLFileLoc lineNo, + const XMLFileLoc columnNo); + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMElement* getElementById(const XMLCh *elementId) const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getInputEncoding() const; + virtual const XMLCh* getXmlEncoding() const; + virtual bool getXmlStandalone() const; + virtual void setXmlStandalone(bool standalone); + virtual const XMLCh* getXmlVersion() const; + virtual void setXmlVersion(const XMLCh* version); + virtual const XMLCh* getDocumentURI() const; + virtual void setDocumentURI(const XMLCh* documentURI); + virtual bool getStrictErrorChecking() const; + virtual void setStrictErrorChecking(bool strictErrorChecking); + virtual DOMNode* adoptNode(DOMNode* source); + virtual void normalizeDocument(); + virtual DOMConfiguration* getDOMConfig() const; + + void setInputEncoding(const XMLCh* actualEncoding); + void setXmlEncoding(const XMLCh* encoding); + // helper functions to prevent storing userdata pointers on every node. + void* setUserData(DOMNodeImpl* n, + const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + void* getUserData(const DOMNodeImpl* n, + const XMLCh* key) const; + void callUserDataHandlers(const DOMNodeImpl* n, + DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + DOMNode* dst) const; + void transferUserData(DOMNodeImpl* n1, DOMNodeImpl* n2); + + DOMNode* renameNode(DOMNode* n, + const XMLCh* namespaceURI, + const XMLCh* name); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const XMLCh * qName); + static bool isKidOK(DOMNode *parent, DOMNode *child); + + inline DOMNodeIDMap* getNodeIDMap() {return fNodeIDMap;}; + + + // + // Memory Management Functions. All memory is allocated by and owned by + // a document, and is not recovered until the + // document itself is deleted. + // + const XMLCh* getPooledString(const XMLCh*); + const XMLCh* getPooledNString(const XMLCh*, XMLSize_t); + void deleteHeap(); + void releaseDocNotifyUserData(DOMNode* object); + void releaseBuffer(DOMBuffer* buffer); + DOMBuffer* popBuffer(XMLSize_t nMinSize); + MemoryManager* getMemoryManager() const; + + // Factory methods for getting/creating node lists. + // Because nothing is ever deleted, the implementation caches and recycles + // previously used instances of DOMDeepNodeList + // + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, const XMLCh *tagName); + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + +protected: + //Internal helper functions + virtual DOMNode* importNode(const DOMNode *source, bool deep, bool cloningNode); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentImpl(const DOMDocumentImpl &); + DOMDocumentImpl & operator = (const DOMDocumentImpl &); + +protected: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + // New data introduced in DOM Level 3 + const XMLCh* fInputEncoding; + const XMLCh* fXmlEncoding; + bool fXmlStandalone; + const XMLCh* fXmlVersion; + const XMLCh* fDocumentURI; + DOMConfiguration* fDOMConfiguration; + + XMLStringPool fUserDataTableKeys; + RefHash2KeysTableOf* fUserDataTable; + + + // Per-Document heap Variables. + // The heap consists of one or more biggish blocks which are + // sub-allocated for individual allocations of nodes, strings, etc. + // The big blocks form a linked list, allowing them to be located for deletion. + // + // There is no provision for deleting suballocated blocks, other than + // deleting the entire heap when the document is deleted. + // + // There is no header on individual sub-allocated blocks. + // The header on big blocks consists only of a single back pointer to + // the previously allocated big block (our linked list of big blocks) + // + // + // revisit - this heap should be encapsulated into its own + // class, rather than hanging naked on Document. + // + void* fCurrentBlock; + char* fFreePtr; + XMLSize_t fFreeBytesRemaining, + fHeapAllocSize; + + // To recycle the DOMNode pointer + RefArrayOf* fRecycleNodePtr; + + // To recycle DOMBuffer pointer + RefStackOf* fRecycleBufferPtr; + + // Pool of DOMNodeList for getElementsByTagName + DOMDeepNodeListPool* fNodeListPool; + + // Other data + DOMDocumentType* fDocType; + DOMElement* fDocElement; + + DOMStringPoolEntry** fNameTable; + XMLSize_t fNameTableSize; + + DOMNormalizer* fNormalizer; + Ranges* fRanges; + NodeIterators* fNodeIterators; + MemoryManager* fMemoryManager; // configurable memory manager + DOMImplementation* fDOMImplementation; + + int fChanges; + bool errorChecking; // Bypass error checking. + +}; + +inline MemoryManager* DOMDocumentImpl::getMemoryManager() const +{ + return fMemoryManager; +} + +inline const XMLCh* DOMDocumentImpl::getPooledString(const XMLCh *in) +{ + if (in == 0) + return 0; + + DOMStringPoolEntry **pspe; + DOMStringPoolEntry *spe; + + XMLSize_t inHash = XMLString::hash(in, fNameTableSize); + pspe = &fNameTable[inHash]; + while (*pspe != 0) + { + if (XMLString::equals((*pspe)->fString, in)) + return (*pspe)->fString; + pspe = &((*pspe)->fNext); + } + + // This string hasn't been seen before. Add it to the pool. + // + + // Compute size to allocate. Note that there's 1 char of string + // declared in the struct, so we don't need to add one again to + // account for the trailing null. + // + XMLSize_t sizeToAllocate = sizeof(DOMStringPoolEntry) + XMLString::stringLen(in)*sizeof(XMLCh); + *pspe = spe = (DOMStringPoolEntry *)allocate(sizeToAllocate); + spe->fNext = 0; + XMLString::copyString((XMLCh*)spe->fString, in); + + return spe->fString; +} + +inline const XMLCh* DOMDocumentImpl:: +getPooledNString(const XMLCh *in, XMLSize_t n) +{ + if (in == 0) + return 0; + + DOMStringPoolEntry **pspe; + DOMStringPoolEntry *spe; + + XMLSize_t inHash = XMLString::hashN(in, n, fNameTableSize); + pspe = &fNameTable[inHash]; + while (*pspe != 0) + { + if (XMLString::equalsN((*pspe)->fString, in, n)) + return (*pspe)->fString; + pspe = &((*pspe)->fNext); + } + + // This string hasn't been seen before. Add it to the pool. + // + + // Compute size to allocate. Note that there's 1 char of string + // declared in the struct, so we don't need to add one again to + // account for the trailing null. + // + XMLSize_t sizeToAllocate = sizeof(DOMStringPoolEntry) + n*sizeof(XMLCh); + *pspe = spe = (DOMStringPoolEntry *)allocate(sizeToAllocate); + spe->fNext = 0; + XMLString::copyNString((XMLCh*)spe->fString, in, n); + + return spe->fString; +} + +inline int DOMDocumentImpl::indexofQualifiedName(const XMLCh* name) +{ + int i = 0; + int colon = -1; + int colon_count = 0; + for (; *name != 0; ++i, ++name) + { + if (*name == chColon) + { + ++colon_count; + colon = i; + } + } + + if (i == 0 || colon == 0 || colon == (i - 1) || colon_count > 1) + return -1; + + return colon != -1 ? colon : 0; +} + +XERCES_CPP_NAMESPACE_END + +// --------------------------------------------------------------------------- +// +// Operator new. Global overloaded version, lets any object be allocated on +// the heap owned by a document. +// +// --------------------------------------------------------------------------- +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type) +{ + void *p = doc->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type) +{ + XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0); + void* p=0; + if(mgr) + p = mgr->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc) +{ + void* p = doc->allocate(amt); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) +{ + XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0); + void* p=0; + if(mgr) + p = mgr->allocate(amt); + return p; +} + +// --------------------------------------------------------------------------- +// For DOM: +// Bypass compiler warning: +// no matching operator delete found; memory will not be freed if initialization throws an exception +// --------------------------------------------------------------------------- +#if !defined(XERCES_NO_MATCHING_DELETE_OPERATOR) +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/) +{ + return; +} + +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/) +{ + return; +} +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeIDMap.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeIDMap.hpp new file mode 100644 index 0000000..22a45a8 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeIDMap.hpp @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIDMap.hpp 676911 2008-07-15 13:27:32Z amassari $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODEIDMAP_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODEIDMAP_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +XERCES_CPP_NAMESPACE_BEGIN + + +// +// Class DOMNodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +class DOMAttr; +class DOMDocument; + + +class DOMNodeIDMap { +public: + + DOMNodeIDMap(XMLSize_t initialSize, DOMDocument *doc); // Create a new hash table, sized to hold "initialSize" + // Entries. It will automatically grow if need be. + + ~DOMNodeIDMap(); + +private: + DOMNodeIDMap(const DOMNodeIDMap &other); // No copy, assignement, comparison. + DOMNodeIDMap &operator = (const DOMNodeIDMap &other); + bool operator == (const DOMNodeIDMap &other); + +public: + void add(DOMAttr *attr); // Add the specified attribute to the table. + void remove(DOMAttr *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + DOMAttr *find(const XMLCh *ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + DOMAttr **fTable; + XMLSize_t fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + XMLSize_t fSize; // The current size of the table array + // (number of slots, not bytes.) + XMLSize_t fNumEntries; // The number of entries used. + XMLSize_t fMaxEntries; // The max number of entries to use before + // growing the table. + DOMDocument *fDoc; // The owning document. +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeImpl.hpp new file mode 100644 index 0000000..9c6c278 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeImpl.hpp @@ -0,0 +1,382 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeImpl.hpp 671894 2008-06-26 13:29:21Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODEIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODEIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A DOMNodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMap; +class DOMNodeList; +class DOMNode; +class DOMDocument; +class DOMElement; + +class CDOM_EXPORT DOMNodeImpl { +public: + + // data + DOMNode *fOwnerNode; // typically the parent but not always! + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short LEAFNODETYPE; + static const unsigned short CHILDNODE; + static const unsigned short TOBERELEASED; + + +public: + DOMNodeImpl(DOMNode *ownerDocument); + DOMNodeImpl(const DOMNodeImpl &other); + ~DOMNodeImpl(); + + DOMNode * appendChild(DOMNode *newChild); + DOMNamedNodeMap * getAttributes() const; + DOMNodeList * getChildNodes() const; + DOMNode * getFirstChild() const; + DOMNode * getLastChild() const; + const XMLCh * getLocalName() const; + const XMLCh * getNamespaceURI() const; + DOMNode * getNextSibling() const; + const XMLCh * getNodeValue() const; + DOMDocument * getOwnerDocument() const; + DOMNode * getParentNode() const; + const XMLCh * getPrefix() const; + DOMNode * getPreviousSibling() const; + bool hasChildNodes() const; + DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild); + void normalize(); + DOMNode * removeChild(DOMNode *oldChild); + DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild); + void setNodeValue(const XMLCh *value); + void setPrefix(const XMLCh *fPrefix); + void setReadOnly(bool readOnly, bool deep); + bool isSupported(const XMLCh *feature, const XMLCh *version) const; + bool hasAttributes() const; + + // Introduced in DOM Level 3 + void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler); + void* getUserData(const XMLCh* key) const; + bool isSameNode(const DOMNode* other) const; + bool isEqualNode(const DOMNode* arg) const; + const XMLCh* getBaseURI() const ; + short compareDocumentPosition(const DOMNode* other) const; + const XMLCh* getTextContent() const ; + const XMLCh* getTextContent(XMLCh* pzBuffer, XMLSize_t& rnBufferLength) const; + void setTextContent(const XMLCh* textContent) ; + const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const ; + bool isDefaultNamespace(const XMLCh* namespaceURI) const ; + const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ; + void* getFeature(const XMLCh* feature, const XMLCh* version) const; + + + // Helper functions for DOM Level 3 + void release(); + void callUserDataHandlers(DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + DOMNode* dst) const; + //reverses the bit pattern given by compareDocumentPosition + short reverseTreeOrderBitPattern(short pattern) const; + const DOMNode* getTreeParentNode(const DOMNode* node) const; + + + //Utility, not part of DOM Level 2 API + static bool isKidOK(DOMNode *parent, DOMNode *child); + static const XMLCh *mapPrefix(const XMLCh *prefix, + const XMLCh *namespaceURI, short nType); + + static const XMLCh *getXmlnsString(); + static const XMLCh *getXmlnsURIString(); + static const XMLCh *getXmlString(); + static const XMLCh *getXmlURIString(); + +public: // should really be protected - ALH + + DOMNode* getElementAncestor (const DOMNode* currentNode) const; + const XMLCh* lookupPrefix(const XMLCh* const namespaceURI, DOMElement *el) const ; + void setOwnerDocument(DOMDocument *doc); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + // For Attributes, true if the attr node is attached to an element. + // For all other node types, true if the node has a parent node. + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValue() const { + return (flags & SETVALUE) != 0; + } + + inline void setValue(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + // + // LeafNode is set true for node types that can not be ParentNodes (can't have children) + // This knowledge is used to allow casting from any unknown node type to the + // IDParentImpl or IDChildImpl parts of the node. + // + inline bool isLeafNode() const { + return (flags & LEAFNODETYPE) != 0; + } + + inline void setIsLeafNode(bool value) { + flags = (value ? flags | LEAFNODETYPE : flags & ~LEAFNODETYPE); + } + + + // + // ChildNode is set true for node types that can be children of other nodes, and + // therefore include a DOMChildNode data member. Note that all of the leaf + // node types (above flag) are also ChildNodes, but not all ChildNodes are + // leaf nodes. + inline bool isChildNode() const { + return (flags & CHILDNODE) != 0; + } + + inline void setIsChildNode(bool value) { + flags = (value ? flags | CHILDNODE : flags & ~CHILDNODE); + } + + // True if this node has to be released regardless if it has a owner or not + // This is true if called from fParent->release() + inline bool isToBeReleased() const { + return (flags & TOBERELEASED) != 0; + } + + inline void isToBeReleased(bool value) { + flags = (value ? flags | TOBERELEASED : flags & ~TOBERELEASED); + } + +}; + + +// This macro lists all of the pure virtual functions declared in DOMNode that must +// be implemented by all node types. Since there is no inheritance of implementation, +// using this macro in the class declaration of the node types make it easier to +// accurately get all of the functions declared. +// +#define DOMNODE_FUNCTIONS \ + virtual DOMNode* appendChild(DOMNode *newChild) ;\ + virtual DOMNode* cloneNode(bool deep) const ;\ + virtual DOMNamedNodeMap* getAttributes() const ;\ + virtual DOMNodeList* getChildNodes() const ;\ + virtual DOMNode* getFirstChild() const ;\ + virtual DOMNode* getLastChild() const ;\ + virtual const XMLCh* getLocalName() const ;\ + virtual const XMLCh* getNamespaceURI() const ;\ + virtual DOMNode* getNextSibling() const ;\ + virtual const XMLCh* getNodeName() const ;\ + virtual NodeType getNodeType() const ;\ + virtual const XMLCh* getNodeValue() const ;\ + virtual DOMDocument* getOwnerDocument() const ;\ + virtual const XMLCh* getPrefix() const ;\ + virtual DOMNode* getParentNode() const ;\ + virtual DOMNode* getPreviousSibling() const ;\ + virtual bool hasChildNodes() const ;\ + virtual DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild) ;\ + virtual void normalize() ;\ + virtual DOMNode* removeChild(DOMNode *oldChild) ;\ + virtual DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild) ;\ + virtual void setNodeValue(const XMLCh *nodeValue) ;\ + virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const ;\ + virtual bool hasAttributes() const ;\ + virtual void setPrefix(const XMLCh * prefix) ;\ + virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\ + virtual void* getUserData(const XMLCh* key) const ;\ + virtual bool isSameNode(const DOMNode* other) const;\ + virtual bool isEqualNode(const DOMNode* arg) const;\ + virtual const XMLCh* getBaseURI() const ;\ + virtual short compareDocumentPosition(const DOMNode* other) const ;\ + virtual const XMLCh* getTextContent() const ;\ + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const;\ + virtual void setTextContent(const XMLCh* textContent) ;\ + virtual const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const ;\ + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const;\ + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ;\ + virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const ;\ + virtual void release() + + +/* + * Here are dummy stubs for most of the functions introduced by DOMNode. + * Each subclass of DOMNode will have something like this that delegates each + * function to the appropriate implementation. + * Functions that must be supplied by every node class are omitted. + * + DOMNode* xxx::appendChild(DOMNode *newChild) {return fParent.appendChild (newChild); }; + DOMNamedNodeMap* xxx::getAttributes() const {return fNode.getAttributes (); }; + DOMNodeList* xxx::getChildNodes() const {return fParent.getChildNodes (); }; + DOMNode* xxx::getFirstChild() const {return fParent.getFirstChild (); }; + DOMNode* xxx::getLastChild() const {return fParent.getLastChild (); }; + const XMLCh* xxx::getLocalName() const {return fNode.getLocalName (); }; + const XMLCh* xxx::getNamespaceURI() const {return fNode.getNamespaceURI (); }; + DOMNode* xxx::getNextSibling() const {return fChild.getNextSibling (); }; + const XMLCh* xxx::getNodeValue() const {return fNode.getNodeValue (); }; + DOMDocument* xxx::getOwnerDocument() const {return fNode.getOwnerDocument (); }; + const XMLCh* xxx::getPrefix() const {return fNode.getPrefix (); }; + DOMNode* xxx::getParentNode() const {return fChild.getParentNode (this); }; + DOMNode* xxx::getPreviousSibling() const {return fChild.getPreviousSibling (this); }; + bool xxx::hasChildNodes() const {return fParent.hasChildNodes (); }; + DOMNode* xxx::insertBefore(DOMNode *newChild, DOMNode *refChild) + {return fParent.insertBefore (newChild, refChild); }; + void xxx::normalize() {fParent.normalize(); }; + DOMNode* xxx::removeChild(DOMNode *oldChild) {return fParent.removeChild (oldChild); }; + DOMNode* xxx::replaceChild(DOMNode *newChild, DOMNode *oldChild) + {return fParent.replaceChild (newChild, oldChild); }; + bool xxx::isSupported(const XMLCh *feature, const XMLCh *version) const + {return fNode.isSupported (feature, version); }; + void xxx::setPrefix(const XMLCh *prefix) {fNode.setPrefix(prefix); }; + bool xxx::hasAttributes() const {return fNode.hasAttributes(); }; + bool xxx::isSameNode(const DOMNode* other) const {return fNode.isSameNode(other); }; + bool xxx::isEqualNode(const DOMNode* arg) const {return fNode.isEqualNode(arg); }; + void* xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) + {return fNode.setUserData(key, data, handler); }; + void* xxx::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* xxx::getBaseURI() const {return fNode.getBaseURI(); }; + short xxx::compareDocumentPosition(const DOMNode* other) const {return fNode.compareDocumentPosition(other); }; + const XMLCh* xxx::getTextContent() const {return fNode.getTextContent(); }; + void xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* xxx::lookupPrefix(const XMLCh* namespaceURI) const {return fNode.lookupPrefix(namespaceURI); }; + bool xxx::isDefaultNamespace(const XMLCh* namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* xxx::lookupNamespaceURI(const XMLCh* prefix) const {return fNode.lookupNamespaceURI(prefix); }; + void* xxx::getFeature(const XMLCh* feature, const XMLCh* version) const {return fNode.getFeature(feature, version); }; + + +*/ + + + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeListImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeListImpl.hpp new file mode 100644 index 0000000..8117ee3 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMNodeListImpl.hpp @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeListImpl.hpp 676911 2008-07-15 13:27:32Z amassari $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODELISTIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODELISTIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +// NodeList implementation class - +// This is for NodeLists returned by GetChildNodes only, not for +// node lists returned by GetElementsByTagName +// +// Every node type capable of having children has (as an embedded member) +// an instance of this class. To hold down the size overhead on each node, a +// cache of extended data for active node lists is maintained +// separately. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMParentNode; +class DOMNode; + +class CDOM_EXPORT DOMNodeListImpl: public DOMNodeList +{ +protected: + DOMParentNode *fNode; + +private: + // Unused, and unimplemented constructors, operators, etc. + DOMNodeListImpl(); + DOMNodeListImpl(const DOMNodeListImpl & other); + DOMNodeListImpl & operator = (const DOMNodeListImpl & other); + +public: + DOMNodeListImpl(DOMParentNode *node); + virtual ~DOMNodeListImpl(); + virtual DOMNode * item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMParentNode.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMParentNode.hpp new file mode 100644 index 0000000..cd571a5 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMParentNode.hpp @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMParentNode.hpp 678709 2008-07-22 10:56:56Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMPARENTNODE_HPP) +#define XERCESC_INCLUDE_GUARD_DOMPARENTNODE_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ParentNode provides the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should include this class and pay the price for it. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + * + **/ + +#include +#include "DOMNodeListImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMChildNode; +class DOMDocument; +class DOMNode; +class DOMNodeList; + +class CDOM_EXPORT DOMParentNode { +public: + DOMDocument *fOwnerDocument; // Document this node belongs to + DOMNode *fFirstChild; + DOMNodeListImpl fChildNodeList; // for GetChildNodes() + +public: + DOMParentNode(DOMDocument *ownerDocument); + DOMParentNode(const DOMParentNode &other); + + DOMDocument * getOwnerDocument() const; + void setOwnerDocument(DOMDocument* doc); + + // Track changes to the node tree structure under this node. An optimization + // for NodeLists. + int changes() const; + void changed(); + + DOMNode* appendChild(DOMNode *newChild); + DOMNodeList* getChildNodes() const; + DOMNode* getFirstChild() const; + DOMNode* getLastChild() const; + bool hasChildNodes() const; + DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild); + DOMNode* item(unsigned int index) const; + DOMNode* removeChild(DOMNode *oldChild); + DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild); + + // Append certain types of nodes fast. Used to speed up XML to DOM + // parsing. See the function implementation for detail. + virtual DOMNode* appendChildFast(DOMNode *newChild); + + //Introduced in DOM Level 2 + void normalize(); + + //Introduced in DOM Level 3 + bool isEqualNode(const DOMNode* arg) const; + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + DOMDocument * getDocument() const; + void release(); + + +public: + void cloneChildren(const DOMNode *other); + DOMNode * lastChild() const; + void lastChild(DOMNode *); + +private: + // unimplemented + DOMParentNode& operator= (const DOMParentNode& other); +}; + +#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument) + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMRangeImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMRangeImpl.hpp new file mode 100644 index 0000000..fcb68c9 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMRangeImpl.hpp @@ -0,0 +1,176 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: DOMRangeImpl.hpp 641193 2008-03-26 08:06:57Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMRANGEIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMRANGEIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DOMNode; +class DOMDocumentFragment; +class DOMDocument; +class DOMText; +class MemoryManager; + +class CDOM_EXPORT DOMRangeImpl: public DOMRange { +protected: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //private data + + DOMNode* fStartContainer; + XMLSize_t fStartOffset; + DOMNode* fEndContainer; + XMLSize_t fEndOffset; + bool fCollapsed; + DOMDocument* fDocument; + bool fDetached; + + DOMNode* fRemoveChild; + MemoryManager* fMemoryManager; + +public: + //c'tor + DOMRangeImpl(DOMDocument* doc, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMRangeImpl(const DOMRangeImpl& other); + + //d'tor + ~DOMRangeImpl(); + + //getter functions + virtual DOMNode* getStartContainer() const; + virtual XMLSize_t getStartOffset() const; + virtual DOMNode* getEndContainer() const; + virtual XMLSize_t getEndOffset() const; + virtual bool getCollapsed() const; + virtual const DOMNode* getCommonAncestorContainer() const; + + //setter functions + virtual void setStart(const DOMNode *parent, XMLSize_t offset); + virtual void setEnd(const DOMNode *parent, XMLSize_t offset); + + virtual void setStartBefore(const DOMNode *refNode); + virtual void setStartAfter(const DOMNode *refNode); + virtual void setEndBefore(const DOMNode *refNode); + virtual void setEndAfter(const DOMNode *refNode); + + //misc functions + virtual void collapse(bool toStart); + virtual void selectNode(const DOMNode *node); + virtual void selectNodeContents(const DOMNode *node); + + //Functions related to comparing range Boundrary-Points + virtual short compareBoundaryPoints(CompareHow how, const DOMRange* range) const; + virtual void deleteContents(); + virtual DOMDocumentFragment* extractContents(); + virtual DOMDocumentFragment* cloneContents() const; + virtual void insertNode(DOMNode* node); + + //Misc functions + virtual void surroundContents(DOMNode *node); + virtual DOMRange* cloneRange() const; + virtual const XMLCh* toString() const; + virtual void detach(); + virtual void release(); + + //getter functions + DOMDocument* getDocument(); + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(DOMNode* oldNode, DOMNode* startNode, XMLSize_t offset); + void updateRangeForInsertedNode(DOMNode* node); + void receiveReplacedText(DOMNode* node); + void updateRangeForDeletedText(DOMNode* node, XMLSize_t offset, XMLSize_t count); + void updateRangeForInsertedText(DOMNode* node, XMLSize_t offset, XMLSize_t count); + void updateRangeForDeletedNode(DOMNode* node); + +protected: + //setter functions + void setStartContainer(const DOMNode* node); + void setStartOffset(XMLSize_t offset) ; + void setEndContainer(const DOMNode* node); + void setEndOffset(XMLSize_t offset) ; + + //misc functions + void validateNode(const DOMNode* node) const; + bool isValidAncestorType(const DOMNode* node) const; + bool hasLegalRootContainer(const DOMNode* node) const; + bool isLegalContainedNode(const DOMNode* node ) const; + void checkIndex(const DOMNode* node, XMLSize_t offset) const; + static bool isAncestorOf(const DOMNode* a, const DOMNode* b); + + XMLSize_t indexOf(const DOMNode* child, const DOMNode* parent) const; + + const DOMNode* commonAncestorOf(const DOMNode* pointA, const DOMNode* pointB) const; + DOMNode* nextNode(const DOMNode* node, bool visitChildren) const; + DOMDocumentFragment* traverseContents(TraversalType type); + void checkReadOnly(DOMNode* start, DOMNode* end, + XMLSize_t starOffset, XMLSize_t endOffset); + void recurseTreeAndCheck(DOMNode* start, DOMNode* end); + DOMNode* removeChild(DOMNode* parent, DOMNode* child); + + DOMDocumentFragment* traverseSameContainer( int how ); + DOMDocumentFragment* traverseCommonStartContainer( DOMNode *endAncestor, int how ); + DOMDocumentFragment* traverseCommonEndContainer( DOMNode *startAncestor, int how ); + DOMDocumentFragment* traverseCommonAncestors( DOMNode *startAncestor, DOMNode *endAncestor, int how ); + DOMNode* traverseRightBoundary( DOMNode *root, int how ); + DOMNode* traverseLeftBoundary( DOMNode *root, int how ); + DOMNode* traverseNode( DOMNode *n, bool isFullySelected, bool isLeft, int how ); + DOMNode* traverseFullySelected( DOMNode *n, int how ); + DOMNode* traversePartiallySelected( DOMNode *n, int how ); + DOMNode* traverseTextNode( DOMNode *n, bool isLeft, int how ); + DOMNode* getSelectedNode( DOMNode *container, int offset ); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMRangeImpl & operator = (const DOMRangeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMStringPool.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMStringPool.hpp new file mode 100644 index 0000000..92a30ab --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMStringPool.hpp @@ -0,0 +1,211 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMStringPool.hpp 678766 2008-07-22 14:00:16Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMSTRINGPOOL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMSTRINGPOOL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +// +// DStringPoolEntry - one of these structs is allocated for each +// XMLCh String in the pool. Each slot in the +// hash table array itself is a pointer to the head +// of a singly-linked list of these structs. +// +// Although this struct is delcared with a string length of one, +// the factory method allocates enough storage to hold the full +// string length. +// +struct DOMStringPoolEntry +{ + DOMStringPoolEntry *fNext; + XMLCh fString[1]; +}; + +// +// DOMBuffer is a lightweight text buffer +// The buffer is not nul terminated until some asks to see the raw buffer +// contents. This also avoids overhead during append operations. +class DOMBuffer +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + DOMBuffer(DOMDocumentImpl *doc, XMLSize_t capacity = 31); + + ~DOMBuffer() + { + } + + // ----------------------------------------------------------------------- + // Buffer Management + // ----------------------------------------------------------------------- + void append (const XMLCh* const chars); + void append (const XMLCh* const chars, const XMLSize_t count); + + void set (const XMLCh* const chars); + void set (const XMLCh* const chars, const XMLSize_t count); + + const XMLCh* getRawBuffer() const + { + fBuffer[fIndex] = 0; + return fBuffer; + } + + void reset() + { + fIndex = 0; + fBuffer[0] = 0; + } + + void chop + ( + const XMLSize_t count + ) + { + fBuffer[count] = 0; + fIndex = count; + } + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + XMLSize_t getLen() const + { + return fIndex; + } + + XMLSize_t getCapacity() const + { + return fCapacity; + } + + // ----------------------------------------------------------------------- + // Private helpers + // ----------------------------------------------------------------------- + void expandCapacity(const XMLSize_t extraNeeded); + + +private : + // ----------------------------------------------------------------------- + // Private data members + // + // fBuffer + // The pointer to the buffer data. Its grown as needed. Its always + // one larger than fCapacity, to leave room for the null terminator. + // + // fIndex + // The current index into the buffer, as characters are appended + // to it. If its zero, then the buffer is empty. + // + // fCapacity + // The current capacity of the buffer. Its actually always one + // larger, to leave room for the null terminator. + // + // fDoc + // For allocating memory + // ----------------------------------------------------------------------- + XMLCh* fBuffer; + XMLSize_t fIndex; + XMLSize_t fCapacity; + DOMDocumentImpl* fDoc; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMBuffer(const DOMBuffer &); + DOMBuffer & operator = (const DOMBuffer &); +}; + +inline void DOMBuffer:: +append (const XMLCh* const chars) +{ + XMLSize_t count = XMLString::stringLen(chars); + if (fIndex + count >= fCapacity) + expandCapacity(count); + + memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh)); + fIndex += count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +append (const XMLCh* const chars, const XMLSize_t count) +{ + if (fIndex + count >= fCapacity) + expandCapacity(count); + + memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh)); + fIndex += count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +set (const XMLCh* const chars) +{ + XMLSize_t count = XMLString::stringLen(chars); + fIndex = 0; + if (count >= fCapacity) + expandCapacity(count); + + memcpy(fBuffer, chars, count * sizeof(XMLCh)); + fIndex = count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +set (const XMLCh* const chars, const XMLSize_t count) +{ + fIndex = 0; + if (count >= fCapacity) + expandCapacity(count); + + memcpy(fBuffer, chars, count * sizeof(XMLCh)); + fIndex = count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTreeWalkerImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTreeWalkerImpl.hpp new file mode 100644 index 0000000..c36ba1e --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTreeWalkerImpl.hpp @@ -0,0 +1,168 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTreeWalkerImpl.hpp 671894 2008-06-26 13:29:21Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMTREEWALKERIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMTREEWALKERIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker { +protected: + // The whatToShow mask. + DOMNodeFilter::ShowType fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + // The current Node. + DOMNode* fCurrentNode; + + // The root Node. + DOMNode* fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + +public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + DOMTreeWalkerImpl ( + DOMNode* root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi); + DOMTreeWalkerImpl& operator= (const DOMTreeWalkerImpl& twi); + + // Return the root node. + virtual DOMNode* getRoot (); + + // Return the whatToShow value. + virtual DOMNodeFilter::ShowType getWhatToShow (); + + // Return the NodeFilter. + virtual DOMNodeFilter* getFilter (); + + + // Return the current DOMNode. + virtual DOMNode* getCurrentNode (); + + // Return the current Node. + virtual void setCurrentNode (DOMNode* node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + virtual DOMNode* nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* nextNode (); + + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + // release the resource + virtual void release(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getParentNode (DOMNode* node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getNextSibling (DOMNode* node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getPreviousSibling (DOMNode* node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getFirstChild (DOMNode* node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getLastChild (DOMNode* node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOMNode* node); + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTypeInfoImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTypeInfoImpl.hpp new file mode 100644 index 0000000..f290fe1 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/DOMTypeInfoImpl.hpp @@ -0,0 +1,106 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#if !defined(XERCESC_INCLUDE_GUARD_DOMTYPEINFOIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMTYPEINFOIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMTypeInfoImpl : public DOMTypeInfo, public DOMPSVITypeInfo +{ +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMTypeInfoImpl(const XMLCh* namespaceUri=0, const XMLCh* name=0); + DOMTypeInfoImpl(DOMDocumentImpl* ownerDoc, const DOMPSVITypeInfo* sourcePSVI); + + static DOMTypeInfoImpl g_DtdValidatedElement; + static DOMTypeInfoImpl g_DtdNotValidatedAttribute; + static DOMTypeInfoImpl g_DtdValidatedCDATAAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFSAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITYAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITIESAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENSAttribute; + static DOMTypeInfoImpl g_DtdValidatedNOTATIONAttribute; + static DOMTypeInfoImpl g_DtdValidatedENUMERATIONAttribute; + + // ----------------------------------------------------------------------- + // DOMTypeInfo interface + // ----------------------------------------------------------------------- + virtual const XMLCh* getTypeName() const; + virtual const XMLCh* getTypeNamespace() const; + virtual bool isDerivedFrom(const XMLCh* typeNamespaceArg, const XMLCh* typeNameArg, DerivationMethods derivationMethod) const; + + // ----------------------------------------------------------------------- + // DOMPSVITypeInfo interface + // ----------------------------------------------------------------------- + virtual const XMLCh* getStringProperty(PSVIProperty prop) const; + virtual int getNumericProperty(PSVIProperty prop) const; + + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + virtual void setStringProperty(PSVIProperty prop, const XMLCh* value); + virtual void setNumericProperty(PSVIProperty prop, int value); + +protected: + int fBitFields; + const XMLCh* fTypeName; + const XMLCh* fTypeNamespace; + const XMLCh* fMemberTypeName; + const XMLCh* fMemberTypeNamespace; + const XMLCh* fDefaultValue; + const XMLCh* fNormalizedValue; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTypeInfoImpl (const DOMTypeInfoImpl&); + DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMTypeInfo.hpp + */ diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.am b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.am new file mode 100644 index 0000000..ce63756 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = $(srcdir)/*.hpp + diff --git a/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.in b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.in new file mode 100644 index 0000000..97c97d5 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile.in @@ -0,0 +1,819 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/3.0.0/xerces +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = $(srcdir)/*.hpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.0.0/xerces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.am b/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.am new file mode 100644 index 0000000..9364c19 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = xerces + + diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.in b/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.in new file mode 100644 index 0000000..e9255a2 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/3.1.0 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = xerces +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.1.0/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.1.0/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMAttrImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMAttrImpl.hpp new file mode 100644 index 0000000..e4fc0fa --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMAttrImpl.hpp @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrImpl.hpp 678709 2008-07-22 10:56:56Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMATTRIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMATTRIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMDocumentImpl.hpp" +#include +#include +#include "DOMNodeIDMap.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMElementImpl; +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMAttrImpl: public DOMAttr { + +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + const XMLCh *fName; + +protected: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMAttrImpl(DOMDocument *ownerDocument, const XMLCh *aName); + DOMAttrImpl(const DOMAttrImpl &other, bool deep=false); + virtual ~DOMAttrImpl(); + +public: + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + +public: + virtual const XMLCh * getName() const; + virtual bool getSpecified() const; + virtual const XMLCh * getValue() const; + virtual void setSpecified(bool arg); + virtual void setValue(const XMLCh * value); + virtual DOMElement * getOwnerElement() const; + virtual bool isId() const; + virtual const DOMTypeInfo* getSchemaTypeInfo() const; + + void setOwnerElement(DOMElement *ownerElem); //internal use only + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + + //helper function for DOM Level 3 TypeInfo + virtual void setSchemaTypeInfo(const DOMTypeInfoImpl* typeInfo); + + // helper method that sets this attr to an idnode and places it into the document map + virtual void addAttrToIDNodeMap(); + + // helper to remove this attr from from the id map if it is in there + virtual void removeAttrFromIDNodeMap(); + +public: + // Set attribute value fast. Assumptions: + // + // - node is not read-only + // - no ID management is performed + // - this attribute does not have a value + // + virtual void setValueFast (const XMLCh * value); + +protected: + void getTextValue(DOMNode* node, XMLBuffer& buf) const; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrImpl& operator=(const DOMAttrImpl&); +}; + +inline void DOMAttrImpl::removeAttrFromIDNodeMap() +{ + if (fNode.isIdAttr()) { + ((DOMDocumentImpl *)fParent.fOwnerDocument)->getNodeIDMap()->remove(this); + fNode.isIdAttr(false); + } +} + +inline void DOMAttrImpl::addAttrToIDNodeMap() +{ + if (fNode.isIdAttr()) + return; + + fNode.isIdAttr(true); + + // REVIST For now, we don't worry about what happens if the new + // name conflicts as per setValue + DOMDocumentImpl *doc = (DOMDocumentImpl *)(fParent.fOwnerDocument); + + if (doc->fNodeIDMap == 0) + doc->fNodeIDMap = new (doc) DOMNodeIDMap(500, doc); + + doc->getNodeIDMap()->add(this); +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDeepNodeListPool.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDeepNodeListPool.hpp new file mode 100644 index 0000000..ad609b6 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDeepNodeListPool.hpp @@ -0,0 +1,200 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListPool.hpp 883368 2009-11-23 15:28:19Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#if !defined(XERCESC_INCLUDE_GUARD_DOMDEEPNODELISTPOOL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMDEEPNODELISTPOOL_HPP + + +#include +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This should really be a nested class, but some of the compilers we +// have to support cannot deal with that! +// +template +struct DOMDeepNodeListPoolTableBucketElem : public XMemory +{ + DOMDeepNodeListPoolTableBucketElem + ( + void* key1 + , XMLCh* key2 + , XMLCh* key3 + , TVal* const value + , DOMDeepNodeListPoolTableBucketElem* next + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ) : + fData(value) + , fNext(next) + , fKey1(key1) + , fKey2(0) + , fKey3(0) + { + if (key2) + fKey2 = XMLString::replicate(key2, manager); + + if (key3) + fKey3 = XMLString::replicate(key3, manager); + } + + TVal* fData; + DOMDeepNodeListPoolTableBucketElem* fNext; + void* fKey1; + XMLCh* fKey2; + XMLCh* fKey3; + + ~DOMDeepNodeListPoolTableBucketElem() {}; +}; + + +template +class DOMDeepNodeListPool +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const XMLSize_t initSize = 128 + ); + + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const XMLSize_t initSize = 128 + ); + + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const THasher& hasher + , const XMLSize_t initSize = 128 + ); + + ~DOMDeepNodeListPool(); + + // ----------------------------------------------------------------------- + // Element management + // ----------------------------------------------------------------------- + bool isEmpty() const; + bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + void removeAll(); + void cleanup(); + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3); + const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + + TVal* getById(const XMLSize_t elemId); + const TVal* getById(const XMLSize_t elemId) const; + + // ----------------------------------------------------------------------- + // Putters + // ----------------------------------------------------------------------- + XMLSize_t put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt); + +private: + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal); + const DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal) const; + void initialize(const XMLSize_t modulus); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListPool(const DOMDeepNodeListPool &); + DOMDeepNodeListPool & operator = (const DOMDeepNodeListPool &); + + // ----------------------------------------------------------------------- + // Data members + // + // fAdoptedElems + // Indicates whether the values added are adopted or just referenced. + // If adopted, then they are deleted when they are removed from the + // hash table. + // + // fBucketList + // This is the array that contains the heads of all of the list + // buckets, one for each possible hash value. + // + // fHashModulus + // The modulus used for this hash table, to hash the keys. This is + // also the number of elements in the bucket list. + // + // fHash + // The hasher for the key1 data type. + // + // fIdPtrs + // fIdPtrsCount + // This is the array of pointers to the bucket elements in order of + // their assigned ids. So taking id N and referencing this array + // gives you the element with that id. The count field indicates + // the current size of this list. When fIdCounter+1 reaches this + // value the list must be expanded. + // + // fIdCounter + // This is used to give out unique ids to added elements. It starts + // at zero (which means empty), and is bumped up for each newly added + // element. So the first element is 1, the next is 2, etc... This + // means that this value is set to the top index of the fIdPtrs array. + // ----------------------------------------------------------------------- + bool fAdoptedElems; + DOMDeepNodeListPoolTableBucketElem** fBucketList; + XMLSize_t fHashModulus; + TVal** fIdPtrs; + XMLSize_t fIdPtrsCount; + XMLSize_t fIdCounter; + MemoryManager* fMemoryManager; + THasher fHasher; +}; + +XERCES_CPP_NAMESPACE_END + +#if !defined(XERCES_TMPLSINC) +#include +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDocumentImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDocumentImpl.hpp new file mode 100644 index 0000000..76deafc --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMDocumentImpl.hpp @@ -0,0 +1,507 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentImpl.hpp 679340 2008-07-24 10:28:29Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMDOCUMENTIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMDOCUMENTIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMStringPool.hpp" +#include "DOMParentNode.hpp" +#include "DOMDeepNodeListPool.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMAttrImpl; +class DOMCDATASectionImpl; +class DOMCommentImpl; +class DOMConfiguration; +class DOMDeepNodeListImpl; +class DOMDocumentFragmentImpl; +class DOMDocumentTypeImpl; +class DOMElementImpl; +class DOMEntityImpl; +class DOMEntityReferenceImpl; +class DOMNotationImpl; +class DOMProcessingInstructionImpl; +class DOMTextImpl; +class DOMNodeIteratorImpl; +class DOMNormalizer; +class DOMTreeWalkerImpl; +class DOMNodeFilter; +class DOMNodeFilterImpl; +class DOMImplementation; +class DOMNodeIDMap; +class DOMRangeImpl; +class DOMBuffer; +class MemoryManager; +class XPathNSResolver; +class XPathExpression; + +typedef RefVectorOf Ranges; +typedef RefVectorOf NodeIterators; +typedef KeyRefPair DOMUserDataRecord; +typedef RefStackOf DOMNodePtr; + +class CDOM_EXPORT DOMDocumentImpl: public XMemory, public DOMMemoryManager, public DOMDocument { +public: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + DOMNodeImpl fNode; // Implements common node functionality. + DOMParentNode fParent; // Implements common parent node functionality + DOMNodeIDMap* fNodeIDMap; // for use by GetElementsById(). + +public: + DOMDocumentImpl(DOMImplementation* domImpl, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMDocumentImpl(const XMLCh* namespaceURI, //DOM Level 2 + const XMLCh* qualifiedName, + DOMDocumentType* doctype, + DOMImplementation* domImpl, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DOMDocumentImpl(); + + void setDocumentType(DOMDocumentType *doctype); + +public: + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + +public: + // Add all functions that are pure virtual in DOMDocument + virtual DOMAttr* createAttribute(const XMLCh *name); + virtual DOMCDATASection* createCDATASection(const XMLCh *data); + virtual DOMComment* createComment(const XMLCh *data); + virtual DOMDocumentFragment* createDocumentFragment(); + virtual DOMDocumentType* createDocumentType(const XMLCh *name); + virtual DOMDocumentType* createDocumentType(const XMLCh *qName, + const XMLCh *publicId, + const XMLCh *systemId); + virtual DOMElement* createElement(const XMLCh * tagName); + virtual DOMElement* createElementNoCheck(const XMLCh *tagName); + virtual DOMEntity* createEntity(const XMLCh * name); + virtual DOMEntityReference* createEntityReference(const XMLCh * name); + virtual DOMNotation* createNotation(const XMLCh * name); + virtual DOMProcessingInstruction* createProcessingInstruction(const XMLCh * target, const XMLCh * data); + virtual DOMText* createTextNode(const XMLCh * data); + virtual DOMDocumentType* getDoctype() const; + virtual DOMElement* getDocumentElement() const; + virtual DOMNodeList* getElementsByTagName(const XMLCh * tagname) const; + virtual DOMImplementation* getImplementation() const; + bool isXMLName(const XMLCh * s); + virtual DOMNodeIterator* createNodeIterator(DOMNode *root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + virtual DOMTreeWalker* createTreeWalker(DOMNode *root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + + + virtual DOMRange* createRange(); + virtual Ranges* getRanges() const; //non-standard api + virtual NodeIterators* getNodeIterators() const; //non-standard api + virtual void removeRange(DOMRangeImpl* range); //non-standard api + virtual void removeNodeIterator(DOMNodeIteratorImpl* nodeIterator); //non-standard api + + virtual DOMXPathExpression* createExpression(const XMLCh *expression, + const DOMXPathNSResolver *resolver); + virtual DOMXPathNSResolver* createNSResolver(const DOMNode *nodeResolver); + virtual DOMXPathResult* evaluate(const XMLCh *expression, + const DOMNode *contextNode, + const DOMXPathNSResolver *resolver, + DOMXPathResult::ResultType type, + DOMXPathResult* result); + + + // Extension to be called by the Parser + DOMEntityReference* createEntityReferenceByParser(const XMLCh * name); + + // Add all functions that are pure virtual in DOMMemoryManager + virtual XMLSize_t getMemoryAllocationBlockSize() const; + virtual void setMemoryAllocationBlockSize(XMLSize_t size); + virtual void* allocate(XMLSize_t amount); + virtual void* allocate(XMLSize_t amount, DOMMemoryManager::NodeObjectType type); + virtual void release(DOMNode* object, DOMMemoryManager::NodeObjectType type); + virtual XMLCh* cloneString(const XMLCh *src); + + // + // Functions to keep track of document mutations, so that node list chached + // information can be invalidated. One global changes counter per document. + // + virtual void changed(); + virtual int changes() const; + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *

    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() const { + return errorChecking; + } + + //Introduced in DOM Level 2 + virtual DOMNode* importNode(const DOMNode *source, bool deep); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLFileLoc lineNo, + const XMLFileLoc columnNo); + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMElement* getElementById(const XMLCh *elementId) const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getInputEncoding() const; + virtual const XMLCh* getXmlEncoding() const; + virtual bool getXmlStandalone() const; + virtual void setXmlStandalone(bool standalone); + virtual const XMLCh* getXmlVersion() const; + virtual void setXmlVersion(const XMLCh* version); + virtual const XMLCh* getDocumentURI() const; + virtual void setDocumentURI(const XMLCh* documentURI); + virtual bool getStrictErrorChecking() const; + virtual void setStrictErrorChecking(bool strictErrorChecking); + virtual DOMNode* adoptNode(DOMNode* source); + virtual void normalizeDocument(); + virtual DOMConfiguration* getDOMConfig() const; + + void setInputEncoding(const XMLCh* actualEncoding); + void setXmlEncoding(const XMLCh* encoding); + // helper functions to prevent storing userdata pointers on every node. + void* setUserData(DOMNodeImpl* n, + const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + void* getUserData(const DOMNodeImpl* n, + const XMLCh* key) const; + void callUserDataHandlers(const DOMNodeImpl* n, + DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + DOMNode* dst) const; + void transferUserData(DOMNodeImpl* n1, DOMNodeImpl* n2); + + DOMNode* renameNode(DOMNode* n, + const XMLCh* namespaceURI, + const XMLCh* name); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const XMLCh * qName); + static bool isKidOK(DOMNode *parent, DOMNode *child); + + inline DOMNodeIDMap* getNodeIDMap() {return fNodeIDMap;}; + + + // + // Memory Management Functions. All memory is allocated by and owned by + // a document, and is not recovered until the + // document itself is deleted. + // + const XMLCh* getPooledString(const XMLCh*); + const XMLCh* getPooledNString(const XMLCh*, XMLSize_t); + void deleteHeap(); + void releaseDocNotifyUserData(DOMNode* object); + void releaseBuffer(DOMBuffer* buffer); + DOMBuffer* popBuffer(XMLSize_t nMinSize); + MemoryManager* getMemoryManager() const; + + // Factory methods for getting/creating node lists. + // Because nothing is ever deleted, the implementation caches and recycles + // previously used instances of DOMDeepNodeList + // + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, const XMLCh *tagName); + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + +protected: + //Internal helper functions + virtual DOMNode* importNode(const DOMNode *source, bool deep, bool cloningNode); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentImpl(const DOMDocumentImpl &); + DOMDocumentImpl & operator = (const DOMDocumentImpl &); + +protected: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + // New data introduced in DOM Level 3 + const XMLCh* fInputEncoding; + const XMLCh* fXmlEncoding; + bool fXmlStandalone; + const XMLCh* fXmlVersion; + const XMLCh* fDocumentURI; + DOMConfiguration* fDOMConfiguration; + + XMLStringPool fUserDataTableKeys; + RefHash2KeysTableOf* fUserDataTable; + + + // Per-Document heap Variables. + // The heap consists of one or more biggish blocks which are + // sub-allocated for individual allocations of nodes, strings, etc. + // The big blocks form a linked list, allowing them to be located for deletion. + // + // There is no provision for deleting suballocated blocks, other than + // deleting the entire heap when the document is deleted. + // + // There is no header on individual sub-allocated blocks. + // The header on big blocks consists only of a single back pointer to + // the previously allocated big block (our linked list of big blocks) + // + // + // revisit - this heap should be encapsulated into its own + // class, rather than hanging naked on Document. + // + void* fCurrentBlock; + char* fFreePtr; + XMLSize_t fFreeBytesRemaining, + fHeapAllocSize; + + // To recycle the DOMNode pointer + RefArrayOf* fRecycleNodePtr; + + // To recycle DOMBuffer pointer + RefStackOf* fRecycleBufferPtr; + + // Pool of DOMNodeList for getElementsByTagName + DOMDeepNodeListPool* fNodeListPool; + + // Other data + DOMDocumentType* fDocType; + DOMElement* fDocElement; + + DOMStringPoolEntry** fNameTable; + XMLSize_t fNameTableSize; + + DOMNormalizer* fNormalizer; + Ranges* fRanges; + NodeIterators* fNodeIterators; + MemoryManager* fMemoryManager; // configurable memory manager + DOMImplementation* fDOMImplementation; + + int fChanges; + bool errorChecking; // Bypass error checking. + +}; + +inline MemoryManager* DOMDocumentImpl::getMemoryManager() const +{ + return fMemoryManager; +} + +inline const XMLCh* DOMDocumentImpl::getPooledString(const XMLCh *in) +{ + if (in == 0) + return 0; + + DOMStringPoolEntry **pspe; + DOMStringPoolEntry *spe; + + XMLSize_t inHash = XMLString::hash(in, fNameTableSize); + pspe = &fNameTable[inHash]; + while (*pspe != 0) + { + if (XMLString::equals((*pspe)->fString, in)) + return (*pspe)->fString; + pspe = &((*pspe)->fNext); + } + + // This string hasn't been seen before. Add it to the pool. + // + + // Compute size to allocate. Note that there's 1 char of string + // declared in the struct, so we don't need to add one again to + // account for the trailing null. + // + XMLSize_t sizeToAllocate = sizeof(DOMStringPoolEntry) + XMLString::stringLen(in)*sizeof(XMLCh); + *pspe = spe = (DOMStringPoolEntry *)allocate(sizeToAllocate); + spe->fNext = 0; + XMLString::copyString((XMLCh*)spe->fString, in); + + return spe->fString; +} + +inline const XMLCh* DOMDocumentImpl:: +getPooledNString(const XMLCh *in, XMLSize_t n) +{ + if (in == 0) + return 0; + + DOMStringPoolEntry **pspe; + DOMStringPoolEntry *spe; + + XMLSize_t inHash = XMLString::hashN(in, n, fNameTableSize); + pspe = &fNameTable[inHash]; + while (*pspe != 0) + { + if (XMLString::equalsN((*pspe)->fString, in, n)) + return (*pspe)->fString; + pspe = &((*pspe)->fNext); + } + + // This string hasn't been seen before. Add it to the pool. + // + + // Compute size to allocate. Note that there's 1 char of string + // declared in the struct, so we don't need to add one again to + // account for the trailing null. + // + XMLSize_t sizeToAllocate = sizeof(DOMStringPoolEntry) + n*sizeof(XMLCh); + *pspe = spe = (DOMStringPoolEntry *)allocate(sizeToAllocate); + spe->fNext = 0; + XMLString::copyNString((XMLCh*)spe->fString, in, n); + + return spe->fString; +} + +inline int DOMDocumentImpl::indexofQualifiedName(const XMLCh* name) +{ + int i = 0; + int colon = -1; + int colon_count = 0; + for (; *name != 0; ++i, ++name) + { + if (*name == chColon) + { + ++colon_count; + colon = i; + } + } + + if (i == 0 || colon == 0 || colon == (i - 1) || colon_count > 1) + return -1; + + return colon != -1 ? colon : 0; +} + +XERCES_CPP_NAMESPACE_END + +// --------------------------------------------------------------------------- +// +// Operator new. Global overloaded version, lets any object be allocated on +// the heap owned by a document. +// +// --------------------------------------------------------------------------- +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type) +{ + void *p = doc->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type) +{ + XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0); + void* p=0; + if(mgr) + p = mgr->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc) +{ + void* p = doc->allocate(amt); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) +{ + XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0); + void* p=0; + if(mgr) + p = mgr->allocate(amt); + return p; +} + +// --------------------------------------------------------------------------- +// For DOM: +// Bypass compiler warning: +// no matching operator delete found; memory will not be freed if initialization throws an exception +// --------------------------------------------------------------------------- +#if !defined(XERCES_NO_MATCHING_DELETE_OPERATOR) +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/) +{ + return; +} + +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/) +{ + return; +} +#endif + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeIDMap.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeIDMap.hpp new file mode 100644 index 0000000..22a45a8 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeIDMap.hpp @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIDMap.hpp 676911 2008-07-15 13:27:32Z amassari $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODEIDMAP_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODEIDMAP_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +XERCES_CPP_NAMESPACE_BEGIN + + +// +// Class DOMNodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +class DOMAttr; +class DOMDocument; + + +class DOMNodeIDMap { +public: + + DOMNodeIDMap(XMLSize_t initialSize, DOMDocument *doc); // Create a new hash table, sized to hold "initialSize" + // Entries. It will automatically grow if need be. + + ~DOMNodeIDMap(); + +private: + DOMNodeIDMap(const DOMNodeIDMap &other); // No copy, assignement, comparison. + DOMNodeIDMap &operator = (const DOMNodeIDMap &other); + bool operator == (const DOMNodeIDMap &other); + +public: + void add(DOMAttr *attr); // Add the specified attribute to the table. + void remove(DOMAttr *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + DOMAttr *find(const XMLCh *ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + DOMAttr **fTable; + XMLSize_t fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + XMLSize_t fSize; // The current size of the table array + // (number of slots, not bytes.) + XMLSize_t fNumEntries; // The number of entries used. + XMLSize_t fMaxEntries; // The max number of entries to use before + // growing the table. + DOMDocument *fDoc; // The owning document. +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeImpl.hpp new file mode 100644 index 0000000..9c6c278 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeImpl.hpp @@ -0,0 +1,382 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeImpl.hpp 671894 2008-06-26 13:29:21Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODEIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODEIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A DOMNodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMap; +class DOMNodeList; +class DOMNode; +class DOMDocument; +class DOMElement; + +class CDOM_EXPORT DOMNodeImpl { +public: + + // data + DOMNode *fOwnerNode; // typically the parent but not always! + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short LEAFNODETYPE; + static const unsigned short CHILDNODE; + static const unsigned short TOBERELEASED; + + +public: + DOMNodeImpl(DOMNode *ownerDocument); + DOMNodeImpl(const DOMNodeImpl &other); + ~DOMNodeImpl(); + + DOMNode * appendChild(DOMNode *newChild); + DOMNamedNodeMap * getAttributes() const; + DOMNodeList * getChildNodes() const; + DOMNode * getFirstChild() const; + DOMNode * getLastChild() const; + const XMLCh * getLocalName() const; + const XMLCh * getNamespaceURI() const; + DOMNode * getNextSibling() const; + const XMLCh * getNodeValue() const; + DOMDocument * getOwnerDocument() const; + DOMNode * getParentNode() const; + const XMLCh * getPrefix() const; + DOMNode * getPreviousSibling() const; + bool hasChildNodes() const; + DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild); + void normalize(); + DOMNode * removeChild(DOMNode *oldChild); + DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild); + void setNodeValue(const XMLCh *value); + void setPrefix(const XMLCh *fPrefix); + void setReadOnly(bool readOnly, bool deep); + bool isSupported(const XMLCh *feature, const XMLCh *version) const; + bool hasAttributes() const; + + // Introduced in DOM Level 3 + void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler); + void* getUserData(const XMLCh* key) const; + bool isSameNode(const DOMNode* other) const; + bool isEqualNode(const DOMNode* arg) const; + const XMLCh* getBaseURI() const ; + short compareDocumentPosition(const DOMNode* other) const; + const XMLCh* getTextContent() const ; + const XMLCh* getTextContent(XMLCh* pzBuffer, XMLSize_t& rnBufferLength) const; + void setTextContent(const XMLCh* textContent) ; + const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const ; + bool isDefaultNamespace(const XMLCh* namespaceURI) const ; + const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ; + void* getFeature(const XMLCh* feature, const XMLCh* version) const; + + + // Helper functions for DOM Level 3 + void release(); + void callUserDataHandlers(DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + DOMNode* dst) const; + //reverses the bit pattern given by compareDocumentPosition + short reverseTreeOrderBitPattern(short pattern) const; + const DOMNode* getTreeParentNode(const DOMNode* node) const; + + + //Utility, not part of DOM Level 2 API + static bool isKidOK(DOMNode *parent, DOMNode *child); + static const XMLCh *mapPrefix(const XMLCh *prefix, + const XMLCh *namespaceURI, short nType); + + static const XMLCh *getXmlnsString(); + static const XMLCh *getXmlnsURIString(); + static const XMLCh *getXmlString(); + static const XMLCh *getXmlURIString(); + +public: // should really be protected - ALH + + DOMNode* getElementAncestor (const DOMNode* currentNode) const; + const XMLCh* lookupPrefix(const XMLCh* const namespaceURI, DOMElement *el) const ; + void setOwnerDocument(DOMDocument *doc); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + // For Attributes, true if the attr node is attached to an element. + // For all other node types, true if the node has a parent node. + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValue() const { + return (flags & SETVALUE) != 0; + } + + inline void setValue(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + // + // LeafNode is set true for node types that can not be ParentNodes (can't have children) + // This knowledge is used to allow casting from any unknown node type to the + // IDParentImpl or IDChildImpl parts of the node. + // + inline bool isLeafNode() const { + return (flags & LEAFNODETYPE) != 0; + } + + inline void setIsLeafNode(bool value) { + flags = (value ? flags | LEAFNODETYPE : flags & ~LEAFNODETYPE); + } + + + // + // ChildNode is set true for node types that can be children of other nodes, and + // therefore include a DOMChildNode data member. Note that all of the leaf + // node types (above flag) are also ChildNodes, but not all ChildNodes are + // leaf nodes. + inline bool isChildNode() const { + return (flags & CHILDNODE) != 0; + } + + inline void setIsChildNode(bool value) { + flags = (value ? flags | CHILDNODE : flags & ~CHILDNODE); + } + + // True if this node has to be released regardless if it has a owner or not + // This is true if called from fParent->release() + inline bool isToBeReleased() const { + return (flags & TOBERELEASED) != 0; + } + + inline void isToBeReleased(bool value) { + flags = (value ? flags | TOBERELEASED : flags & ~TOBERELEASED); + } + +}; + + +// This macro lists all of the pure virtual functions declared in DOMNode that must +// be implemented by all node types. Since there is no inheritance of implementation, +// using this macro in the class declaration of the node types make it easier to +// accurately get all of the functions declared. +// +#define DOMNODE_FUNCTIONS \ + virtual DOMNode* appendChild(DOMNode *newChild) ;\ + virtual DOMNode* cloneNode(bool deep) const ;\ + virtual DOMNamedNodeMap* getAttributes() const ;\ + virtual DOMNodeList* getChildNodes() const ;\ + virtual DOMNode* getFirstChild() const ;\ + virtual DOMNode* getLastChild() const ;\ + virtual const XMLCh* getLocalName() const ;\ + virtual const XMLCh* getNamespaceURI() const ;\ + virtual DOMNode* getNextSibling() const ;\ + virtual const XMLCh* getNodeName() const ;\ + virtual NodeType getNodeType() const ;\ + virtual const XMLCh* getNodeValue() const ;\ + virtual DOMDocument* getOwnerDocument() const ;\ + virtual const XMLCh* getPrefix() const ;\ + virtual DOMNode* getParentNode() const ;\ + virtual DOMNode* getPreviousSibling() const ;\ + virtual bool hasChildNodes() const ;\ + virtual DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild) ;\ + virtual void normalize() ;\ + virtual DOMNode* removeChild(DOMNode *oldChild) ;\ + virtual DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild) ;\ + virtual void setNodeValue(const XMLCh *nodeValue) ;\ + virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const ;\ + virtual bool hasAttributes() const ;\ + virtual void setPrefix(const XMLCh * prefix) ;\ + virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\ + virtual void* getUserData(const XMLCh* key) const ;\ + virtual bool isSameNode(const DOMNode* other) const;\ + virtual bool isEqualNode(const DOMNode* arg) const;\ + virtual const XMLCh* getBaseURI() const ;\ + virtual short compareDocumentPosition(const DOMNode* other) const ;\ + virtual const XMLCh* getTextContent() const ;\ + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const;\ + virtual void setTextContent(const XMLCh* textContent) ;\ + virtual const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const ;\ + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const;\ + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ;\ + virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const ;\ + virtual void release() + + +/* + * Here are dummy stubs for most of the functions introduced by DOMNode. + * Each subclass of DOMNode will have something like this that delegates each + * function to the appropriate implementation. + * Functions that must be supplied by every node class are omitted. + * + DOMNode* xxx::appendChild(DOMNode *newChild) {return fParent.appendChild (newChild); }; + DOMNamedNodeMap* xxx::getAttributes() const {return fNode.getAttributes (); }; + DOMNodeList* xxx::getChildNodes() const {return fParent.getChildNodes (); }; + DOMNode* xxx::getFirstChild() const {return fParent.getFirstChild (); }; + DOMNode* xxx::getLastChild() const {return fParent.getLastChild (); }; + const XMLCh* xxx::getLocalName() const {return fNode.getLocalName (); }; + const XMLCh* xxx::getNamespaceURI() const {return fNode.getNamespaceURI (); }; + DOMNode* xxx::getNextSibling() const {return fChild.getNextSibling (); }; + const XMLCh* xxx::getNodeValue() const {return fNode.getNodeValue (); }; + DOMDocument* xxx::getOwnerDocument() const {return fNode.getOwnerDocument (); }; + const XMLCh* xxx::getPrefix() const {return fNode.getPrefix (); }; + DOMNode* xxx::getParentNode() const {return fChild.getParentNode (this); }; + DOMNode* xxx::getPreviousSibling() const {return fChild.getPreviousSibling (this); }; + bool xxx::hasChildNodes() const {return fParent.hasChildNodes (); }; + DOMNode* xxx::insertBefore(DOMNode *newChild, DOMNode *refChild) + {return fParent.insertBefore (newChild, refChild); }; + void xxx::normalize() {fParent.normalize(); }; + DOMNode* xxx::removeChild(DOMNode *oldChild) {return fParent.removeChild (oldChild); }; + DOMNode* xxx::replaceChild(DOMNode *newChild, DOMNode *oldChild) + {return fParent.replaceChild (newChild, oldChild); }; + bool xxx::isSupported(const XMLCh *feature, const XMLCh *version) const + {return fNode.isSupported (feature, version); }; + void xxx::setPrefix(const XMLCh *prefix) {fNode.setPrefix(prefix); }; + bool xxx::hasAttributes() const {return fNode.hasAttributes(); }; + bool xxx::isSameNode(const DOMNode* other) const {return fNode.isSameNode(other); }; + bool xxx::isEqualNode(const DOMNode* arg) const {return fNode.isEqualNode(arg); }; + void* xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) + {return fNode.setUserData(key, data, handler); }; + void* xxx::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* xxx::getBaseURI() const {return fNode.getBaseURI(); }; + short xxx::compareDocumentPosition(const DOMNode* other) const {return fNode.compareDocumentPosition(other); }; + const XMLCh* xxx::getTextContent() const {return fNode.getTextContent(); }; + void xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* xxx::lookupPrefix(const XMLCh* namespaceURI) const {return fNode.lookupPrefix(namespaceURI); }; + bool xxx::isDefaultNamespace(const XMLCh* namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* xxx::lookupNamespaceURI(const XMLCh* prefix) const {return fNode.lookupNamespaceURI(prefix); }; + void* xxx::getFeature(const XMLCh* feature, const XMLCh* version) const {return fNode.getFeature(feature, version); }; + + +*/ + + + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeListImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeListImpl.hpp new file mode 100644 index 0000000..8117ee3 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMNodeListImpl.hpp @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeListImpl.hpp 676911 2008-07-15 13:27:32Z amassari $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMNODELISTIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMNODELISTIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +// NodeList implementation class - +// This is for NodeLists returned by GetChildNodes only, not for +// node lists returned by GetElementsByTagName +// +// Every node type capable of having children has (as an embedded member) +// an instance of this class. To hold down the size overhead on each node, a +// cache of extended data for active node lists is maintained +// separately. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMParentNode; +class DOMNode; + +class CDOM_EXPORT DOMNodeListImpl: public DOMNodeList +{ +protected: + DOMParentNode *fNode; + +private: + // Unused, and unimplemented constructors, operators, etc. + DOMNodeListImpl(); + DOMNodeListImpl(const DOMNodeListImpl & other); + DOMNodeListImpl & operator = (const DOMNodeListImpl & other); + +public: + DOMNodeListImpl(DOMParentNode *node); + virtual ~DOMNodeListImpl(); + virtual DOMNode * item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMParentNode.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMParentNode.hpp new file mode 100644 index 0000000..cd571a5 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMParentNode.hpp @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMParentNode.hpp 678709 2008-07-22 10:56:56Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMPARENTNODE_HPP) +#define XERCESC_INCLUDE_GUARD_DOMPARENTNODE_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ParentNode provides the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should include this class and pay the price for it. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + * + **/ + +#include +#include "DOMNodeListImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMChildNode; +class DOMDocument; +class DOMNode; +class DOMNodeList; + +class CDOM_EXPORT DOMParentNode { +public: + DOMDocument *fOwnerDocument; // Document this node belongs to + DOMNode *fFirstChild; + DOMNodeListImpl fChildNodeList; // for GetChildNodes() + +public: + DOMParentNode(DOMDocument *ownerDocument); + DOMParentNode(const DOMParentNode &other); + + DOMDocument * getOwnerDocument() const; + void setOwnerDocument(DOMDocument* doc); + + // Track changes to the node tree structure under this node. An optimization + // for NodeLists. + int changes() const; + void changed(); + + DOMNode* appendChild(DOMNode *newChild); + DOMNodeList* getChildNodes() const; + DOMNode* getFirstChild() const; + DOMNode* getLastChild() const; + bool hasChildNodes() const; + DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild); + DOMNode* item(unsigned int index) const; + DOMNode* removeChild(DOMNode *oldChild); + DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild); + + // Append certain types of nodes fast. Used to speed up XML to DOM + // parsing. See the function implementation for detail. + virtual DOMNode* appendChildFast(DOMNode *newChild); + + //Introduced in DOM Level 2 + void normalize(); + + //Introduced in DOM Level 3 + bool isEqualNode(const DOMNode* arg) const; + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + DOMDocument * getDocument() const; + void release(); + + +public: + void cloneChildren(const DOMNode *other); + DOMNode * lastChild() const; + void lastChild(DOMNode *); + +private: + // unimplemented + DOMParentNode& operator= (const DOMParentNode& other); +}; + +#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument) + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMRangeImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMRangeImpl.hpp new file mode 100644 index 0000000..fcb68c9 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMRangeImpl.hpp @@ -0,0 +1,176 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: DOMRangeImpl.hpp 641193 2008-03-26 08:06:57Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMRANGEIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMRANGEIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DOMNode; +class DOMDocumentFragment; +class DOMDocument; +class DOMText; +class MemoryManager; + +class CDOM_EXPORT DOMRangeImpl: public DOMRange { +protected: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //private data + + DOMNode* fStartContainer; + XMLSize_t fStartOffset; + DOMNode* fEndContainer; + XMLSize_t fEndOffset; + bool fCollapsed; + DOMDocument* fDocument; + bool fDetached; + + DOMNode* fRemoveChild; + MemoryManager* fMemoryManager; + +public: + //c'tor + DOMRangeImpl(DOMDocument* doc, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMRangeImpl(const DOMRangeImpl& other); + + //d'tor + ~DOMRangeImpl(); + + //getter functions + virtual DOMNode* getStartContainer() const; + virtual XMLSize_t getStartOffset() const; + virtual DOMNode* getEndContainer() const; + virtual XMLSize_t getEndOffset() const; + virtual bool getCollapsed() const; + virtual const DOMNode* getCommonAncestorContainer() const; + + //setter functions + virtual void setStart(const DOMNode *parent, XMLSize_t offset); + virtual void setEnd(const DOMNode *parent, XMLSize_t offset); + + virtual void setStartBefore(const DOMNode *refNode); + virtual void setStartAfter(const DOMNode *refNode); + virtual void setEndBefore(const DOMNode *refNode); + virtual void setEndAfter(const DOMNode *refNode); + + //misc functions + virtual void collapse(bool toStart); + virtual void selectNode(const DOMNode *node); + virtual void selectNodeContents(const DOMNode *node); + + //Functions related to comparing range Boundrary-Points + virtual short compareBoundaryPoints(CompareHow how, const DOMRange* range) const; + virtual void deleteContents(); + virtual DOMDocumentFragment* extractContents(); + virtual DOMDocumentFragment* cloneContents() const; + virtual void insertNode(DOMNode* node); + + //Misc functions + virtual void surroundContents(DOMNode *node); + virtual DOMRange* cloneRange() const; + virtual const XMLCh* toString() const; + virtual void detach(); + virtual void release(); + + //getter functions + DOMDocument* getDocument(); + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(DOMNode* oldNode, DOMNode* startNode, XMLSize_t offset); + void updateRangeForInsertedNode(DOMNode* node); + void receiveReplacedText(DOMNode* node); + void updateRangeForDeletedText(DOMNode* node, XMLSize_t offset, XMLSize_t count); + void updateRangeForInsertedText(DOMNode* node, XMLSize_t offset, XMLSize_t count); + void updateRangeForDeletedNode(DOMNode* node); + +protected: + //setter functions + void setStartContainer(const DOMNode* node); + void setStartOffset(XMLSize_t offset) ; + void setEndContainer(const DOMNode* node); + void setEndOffset(XMLSize_t offset) ; + + //misc functions + void validateNode(const DOMNode* node) const; + bool isValidAncestorType(const DOMNode* node) const; + bool hasLegalRootContainer(const DOMNode* node) const; + bool isLegalContainedNode(const DOMNode* node ) const; + void checkIndex(const DOMNode* node, XMLSize_t offset) const; + static bool isAncestorOf(const DOMNode* a, const DOMNode* b); + + XMLSize_t indexOf(const DOMNode* child, const DOMNode* parent) const; + + const DOMNode* commonAncestorOf(const DOMNode* pointA, const DOMNode* pointB) const; + DOMNode* nextNode(const DOMNode* node, bool visitChildren) const; + DOMDocumentFragment* traverseContents(TraversalType type); + void checkReadOnly(DOMNode* start, DOMNode* end, + XMLSize_t starOffset, XMLSize_t endOffset); + void recurseTreeAndCheck(DOMNode* start, DOMNode* end); + DOMNode* removeChild(DOMNode* parent, DOMNode* child); + + DOMDocumentFragment* traverseSameContainer( int how ); + DOMDocumentFragment* traverseCommonStartContainer( DOMNode *endAncestor, int how ); + DOMDocumentFragment* traverseCommonEndContainer( DOMNode *startAncestor, int how ); + DOMDocumentFragment* traverseCommonAncestors( DOMNode *startAncestor, DOMNode *endAncestor, int how ); + DOMNode* traverseRightBoundary( DOMNode *root, int how ); + DOMNode* traverseLeftBoundary( DOMNode *root, int how ); + DOMNode* traverseNode( DOMNode *n, bool isFullySelected, bool isLeft, int how ); + DOMNode* traverseFullySelected( DOMNode *n, int how ); + DOMNode* traversePartiallySelected( DOMNode *n, int how ); + DOMNode* traverseTextNode( DOMNode *n, bool isLeft, int how ); + DOMNode* getSelectedNode( DOMNode *container, int offset ); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMRangeImpl & operator = (const DOMRangeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMStringPool.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMStringPool.hpp new file mode 100644 index 0000000..92a30ab --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMStringPool.hpp @@ -0,0 +1,211 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMStringPool.hpp 678766 2008-07-22 14:00:16Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMSTRINGPOOL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMSTRINGPOOL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +// +// DStringPoolEntry - one of these structs is allocated for each +// XMLCh String in the pool. Each slot in the +// hash table array itself is a pointer to the head +// of a singly-linked list of these structs. +// +// Although this struct is delcared with a string length of one, +// the factory method allocates enough storage to hold the full +// string length. +// +struct DOMStringPoolEntry +{ + DOMStringPoolEntry *fNext; + XMLCh fString[1]; +}; + +// +// DOMBuffer is a lightweight text buffer +// The buffer is not nul terminated until some asks to see the raw buffer +// contents. This also avoids overhead during append operations. +class DOMBuffer +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + DOMBuffer(DOMDocumentImpl *doc, XMLSize_t capacity = 31); + + ~DOMBuffer() + { + } + + // ----------------------------------------------------------------------- + // Buffer Management + // ----------------------------------------------------------------------- + void append (const XMLCh* const chars); + void append (const XMLCh* const chars, const XMLSize_t count); + + void set (const XMLCh* const chars); + void set (const XMLCh* const chars, const XMLSize_t count); + + const XMLCh* getRawBuffer() const + { + fBuffer[fIndex] = 0; + return fBuffer; + } + + void reset() + { + fIndex = 0; + fBuffer[0] = 0; + } + + void chop + ( + const XMLSize_t count + ) + { + fBuffer[count] = 0; + fIndex = count; + } + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + XMLSize_t getLen() const + { + return fIndex; + } + + XMLSize_t getCapacity() const + { + return fCapacity; + } + + // ----------------------------------------------------------------------- + // Private helpers + // ----------------------------------------------------------------------- + void expandCapacity(const XMLSize_t extraNeeded); + + +private : + // ----------------------------------------------------------------------- + // Private data members + // + // fBuffer + // The pointer to the buffer data. Its grown as needed. Its always + // one larger than fCapacity, to leave room for the null terminator. + // + // fIndex + // The current index into the buffer, as characters are appended + // to it. If its zero, then the buffer is empty. + // + // fCapacity + // The current capacity of the buffer. Its actually always one + // larger, to leave room for the null terminator. + // + // fDoc + // For allocating memory + // ----------------------------------------------------------------------- + XMLCh* fBuffer; + XMLSize_t fIndex; + XMLSize_t fCapacity; + DOMDocumentImpl* fDoc; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMBuffer(const DOMBuffer &); + DOMBuffer & operator = (const DOMBuffer &); +}; + +inline void DOMBuffer:: +append (const XMLCh* const chars) +{ + XMLSize_t count = XMLString::stringLen(chars); + if (fIndex + count >= fCapacity) + expandCapacity(count); + + memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh)); + fIndex += count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +append (const XMLCh* const chars, const XMLSize_t count) +{ + if (fIndex + count >= fCapacity) + expandCapacity(count); + + memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh)); + fIndex += count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +set (const XMLCh* const chars) +{ + XMLSize_t count = XMLString::stringLen(chars); + fIndex = 0; + if (count >= fCapacity) + expandCapacity(count); + + memcpy(fBuffer, chars, count * sizeof(XMLCh)); + fIndex = count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +inline void DOMBuffer:: +set (const XMLCh* const chars, const XMLSize_t count) +{ + fIndex = 0; + if (count >= fCapacity) + expandCapacity(count); + + memcpy(fBuffer, chars, count * sizeof(XMLCh)); + fIndex = count; + + // Keep it null terminated + fBuffer[fIndex] = 0; +} + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTreeWalkerImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTreeWalkerImpl.hpp new file mode 100644 index 0000000..c36ba1e --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTreeWalkerImpl.hpp @@ -0,0 +1,168 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTreeWalkerImpl.hpp 671894 2008-06-26 13:29:21Z borisk $ + */ + +#if !defined(XERCESC_INCLUDE_GUARD_DOMTREEWALKERIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMTREEWALKERIMPL_HPP + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker { +protected: + // The whatToShow mask. + DOMNodeFilter::ShowType fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + // The current Node. + DOMNode* fCurrentNode; + + // The root Node. + DOMNode* fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + +public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + DOMTreeWalkerImpl ( + DOMNode* root, + DOMNodeFilter::ShowType whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi); + DOMTreeWalkerImpl& operator= (const DOMTreeWalkerImpl& twi); + + // Return the root node. + virtual DOMNode* getRoot (); + + // Return the whatToShow value. + virtual DOMNodeFilter::ShowType getWhatToShow (); + + // Return the NodeFilter. + virtual DOMNodeFilter* getFilter (); + + + // Return the current DOMNode. + virtual DOMNode* getCurrentNode (); + + // Return the current Node. + virtual void setCurrentNode (DOMNode* node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + virtual DOMNode* nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* nextNode (); + + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + // release the resource + virtual void release(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getParentNode (DOMNode* node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getNextSibling (DOMNode* node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getPreviousSibling (DOMNode* node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getFirstChild (DOMNode* node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getLastChild (DOMNode* node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOMNode* node); + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTypeInfoImpl.hpp b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTypeInfoImpl.hpp new file mode 100644 index 0000000..f290fe1 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/DOMTypeInfoImpl.hpp @@ -0,0 +1,106 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#if !defined(XERCESC_INCLUDE_GUARD_DOMTYPEINFOIMPL_HPP) +#define XERCESC_INCLUDE_GUARD_DOMTYPEINFOIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMTypeInfoImpl : public DOMTypeInfo, public DOMPSVITypeInfo +{ +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMTypeInfoImpl(const XMLCh* namespaceUri=0, const XMLCh* name=0); + DOMTypeInfoImpl(DOMDocumentImpl* ownerDoc, const DOMPSVITypeInfo* sourcePSVI); + + static DOMTypeInfoImpl g_DtdValidatedElement; + static DOMTypeInfoImpl g_DtdNotValidatedAttribute; + static DOMTypeInfoImpl g_DtdValidatedCDATAAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFSAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITYAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITIESAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENSAttribute; + static DOMTypeInfoImpl g_DtdValidatedNOTATIONAttribute; + static DOMTypeInfoImpl g_DtdValidatedENUMERATIONAttribute; + + // ----------------------------------------------------------------------- + // DOMTypeInfo interface + // ----------------------------------------------------------------------- + virtual const XMLCh* getTypeName() const; + virtual const XMLCh* getTypeNamespace() const; + virtual bool isDerivedFrom(const XMLCh* typeNamespaceArg, const XMLCh* typeNameArg, DerivationMethods derivationMethod) const; + + // ----------------------------------------------------------------------- + // DOMPSVITypeInfo interface + // ----------------------------------------------------------------------- + virtual const XMLCh* getStringProperty(PSVIProperty prop) const; + virtual int getNumericProperty(PSVIProperty prop) const; + + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + virtual void setStringProperty(PSVIProperty prop, const XMLCh* value); + virtual void setNumericProperty(PSVIProperty prop, int value); + +protected: + int fBitFields; + const XMLCh* fTypeName; + const XMLCh* fTypeNamespace; + const XMLCh* fMemberTypeName; + const XMLCh* fMemberTypeNamespace; + const XMLCh* fDefaultValue; + const XMLCh* fNormalizedValue; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTypeInfoImpl (const DOMTypeInfoImpl&); + DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMTypeInfo.hpp + */ diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.am b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.am new file mode 100644 index 0000000..ce63756 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = $(srcdir)/*.hpp + diff --git a/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.in b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.in new file mode 100644 index 0000000..b0537f4 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile.in @@ -0,0 +1,819 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers/3.1.0/xerces +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = $(srcdir)/*.hpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/3.1.0/xerces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ThirdParty/internal-xerces-c-headers/Makefile.am b/ThirdParty/internal-xerces-c-headers/Makefile.am new file mode 100644 index 0000000..6e351f3 --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = 2.7.0 2.8.0 3.0.0 3.1.0 diff --git a/ThirdParty/internal-xerces-c-headers/Makefile.in b/ThirdParty/internal-xerces-c-headers/Makefile.in new file mode 100644 index 0000000..9b7562f --- /dev/null +++ b/ThirdParty/internal-xerces-c-headers/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ThirdParty/internal-xerces-c-headers +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = 2.7.0 2.8.0 3.0.0 3.1.0 +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ThirdParty/internal-xerces-c-headers/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 0000000..cc5c461 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,159 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS +#undef MIMETYPE_DIRECTORY + +#undef HAVE_LIBRPM + +#undef FERRIS_AS_TEXT_PLUGIN_DIR +#undef FERRIS_CREATION_PLUGIN_DIR +#undef LIBASTEXT_PLUGIN_FACTORY_PREFIX +#undef FERRIS_HAVE_LIBZ +#undef FERRIS_HAVE_BZIP2 +#undef FERRIS_HAVE_DB4 +#undef FERRIS_HAVE_GDBM +#undef FERRIS_HAVE_TDB +#undef FERRIS_HAVE_EET +#undef HAVE_EDB +#undef HAVE_LIBJPEG +#undef HAVE_LIBPNG +#undef HAVE_MAGICK +#undef HAVE_LIBPQXX + +#undef FERRIS_USER_NAME_NOBODY +#undef FERRIS_DEBUG_VM +#undef FERRIS_DEBUG_RESOLVE + + +#undef FERRIS_HAVE_ATTR +#undef FERRIS_HAVE_LIBCAP +#undef HAVE_DVDREAD +#undef HAVE_XALAN +#undef HAVE_XML4C +#undef HAVE_PATHAN + +#undef PREFIX + +#undef FERRIS_HAVE_XFSPROGS + +#undef FERRIS_HAVE_IPC_CONTEXT + +#undef HAVE_GNOMEVFS +#undef HAVE_LIBFILE +#undef HAVE_EFSD +#undef QT_THREAD_SUPPORT +#undef HAVE_KDE3 + +/* Define if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if you have the crypto library (-lcrypto). */ +#undef HAVE_LIBCRYPTO + +/* Define if you have the fam library (-lfam). */ +#undef HAVE_LIBFAM + +/* Define if you have the file library (-lfile). */ +#undef HAVE_LIBFILE + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION +#undef FERRIS_VERSION + + +#undef HAVE_BOGOFILTER +#undef HAVE_LIBTEXTCAT +#undef HAVE_SVMLIGHT + +#undef HAVE_DBXML + +#undef HAVE_REDLAND +#undef FERRIS_HAVE_GPGME + +#undef HAVE_EPEG +#undef HAVE_LIBEXIF + +#define XFS_SUPER_MAGIC 0x58465342 + +#undef HAVE_GCJLUCENE +#undef FERRIS_HAVE_GCJ + + +#undef HAVE_DTL +#undef HAVE_SQLPLUS + + +#undef HAVE_FCA +#undef BUILD_FCA + +#undef HAVE_LIBSELINUX + +#undef HAVE_LIBMAGIC +#undef BUILD_PGTSEARCH_FTXIDX + + +#undef CURL_LEAVES_SIG_ALARM_ON +#undef FERRIS_DEBUG_RESOLVE +#undef FERRIS_DEBUG_VM +#undef FERRIS_HAVE_GCJ +#undef FERRIS_HAVE_GPGME +#undef FERRIS_HAVE_SQLPLUS +#undef FERRIS_HAVE_XFS +#undef GCC_HASCLASSVISIBILITY +#undef HAVE_BOGOFILTER +#undef HAVE_BONOBO +#undef HAVE_BOOST +#undef HAVE_DTL +#undef HAVE_EET +#undef HAVE_FAMPP2 +#undef HAVE_GDBM +#undef HAVE_GPGME +#undef HAVE_IMLIB2 +#undef HAVE_LDAP +#undef HAVE_LIBDJVULIBRE +#undef HAVE_LIBJASPER +#undef HAVE_LIBPQXX +#undef HAVE_LOKI +#undef HAVE_OPENSSL +#undef HAVE_PATHAN +#undef HAVE_SIGC +#undef HAVE_SOCKETPP +#undef HAVE_STLPORT +#undef HAVE_STREAMS +#undef HAVE_TDB +#undef HAVE_XALAN +#undef HAVE_XAPIAN +#undef HAVE_XERCESC +#undef HAVE_XML4C +#undef SIGCXX_HAS_LESS_THAN_FIVE_SIGNAL_ARGS_AS_MAX +#undef STLPORT_IOSIZE + + +#undef FERRIS_DEBUG_RESOLVE +#undef FERRIS_DEBUG_VM +#undef FERRIS_HAVE_GCJ +#undef FERRIS_HAVE_GPGME +#undef HAVE_BOGOFILTER +#undef HAVE_BOOST +#undef HAVE_DTL +#undef HAVE_FAMPP2 +#undef HAVE_GPGME +#undef HAVE_LIBPQXX +#undef HAVE_LOKI +#undef HAVE_PATHAN +#undef HAVE_SIGC +#undef HAVE_SOCKETPP +#undef HAVE_STLPORT +#undef HAVE_STREAMS +#undef HAVE_XALAN +#undef HAVE_XERCESC +#undef HAVE_XML4C +#undef STLPORT_IOSIZE + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..d8dd951 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,10038 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Configure paths for GLIB +# Owen Taylor 1997-2001 + +dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, +dnl gthread, or gio is specified in MODULES, pass to pkg-config +dnl +AC_DEFUN([AM_PATH_GLIB_2_0], +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + pkg_config_args=glib-2.0 + for module in . $4 + do + case "$module" in + gmodule) + pkg_config_args="$pkg_config_args gmodule-2.0" + ;; + gmodule-no-export) + pkg_config_args="$pkg_config_args gmodule-no-export-2.0" + ;; + gobject) + pkg_config_args="$pkg_config_args gobject-2.0" + ;; + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + gio*) + pkg_config_args="$pkg_config_args $module-2.0" + ;; + esac + done + + PKG_PROG_PKG_CONFIG([0.16]) + + no_glib="" + + if test "x$PKG_CONFIG" = x ; then + no_glib=yes + PKG_CONFIG=no + fi + + min_glib_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib=yes + fi + fi + + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" +dnl +dnl Now check if the installed GLIB is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.glibtest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + unsigned int major, minor, micro; + char *tmp_version; + + fclose (fopen ("conf.glibtest", "w")); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) + rm -f conf.glibtest +]) + +# Configure paths for GTK+ +# Owen Taylor 1997-2001 + +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, +dnl pass to pkg-config +dnl +AC_DEFUN([AM_PATH_GTK_2_0], +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], + , enable_gtktest=yes) + + pkg_config_args=gtk+-2.0 + for module in . $4 + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + fclose (fopen ("conf.gtktest", "w")); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3293 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4' +macro_revision='1.3293' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT]) + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .]) + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Check for Java compiler. -*- Autoconf -*- +# For now we only handle the GNU compiler. + +# Copyright (C) 1999, 2000, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +AC_DEFUN([AM_PROG_GCJ],[ +AC_CHECK_TOOLS(GCJ, gcj, gcj) +test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH]) +if test "x${GCJFLAGS-unset}" = xunset; then + GCJFLAGS="-g -O2" +fi +AC_SUBST(GCJFLAGS) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(GCJ)]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([macros/ferrismacros.m4]) diff --git a/apps/Makefile.am b/apps/Makefile.am new file mode 100644 index 0000000..e6a2643 --- /dev/null +++ b/apps/Makefile.am @@ -0,0 +1,76 @@ +NULL= + +if HAVE_LIBPQXX +PQXX_DEPENDANT_CODE = fca +endif + +if HAVE_LIBPLATINUM +UPNPDIR = upnpserver +endif + +SUBDIRS = \ + fileclip cat importdesktop \ + fmkdir \ + fmodestr2octal \ + oprocdeamon \ + fcompress \ + fulltextindex \ + ftouch \ + fschema \ + fmedallion \ + ferriscd \ + ai \ + namespaces \ + cursors \ + $(PQXX_DEPENDANT_CODE) \ + ls \ + copy \ + mv rm \ + xml \ + head tail \ + fileactions \ + ferrisredirect \ + rdf xmmsdaemon \ + metadataserver \ + phpsearchinterface \ + frunner \ + volumemanager \ + du \ + scripts \ + $(UPNPDIR) \ + tools + + +bin_SCRIPTS = $(srcdir)/*.sh $(srcdir)/*.pl libferris-googleearth ferris-rdfproc fedit ferris-internal-extract-subtitles-to-format +EXTRA_DIST = $(srcdir)/*.sh $(srcdir)/*.pl libferris-googleearth ferris-rdfproc fedit ferris-internal-extract-subtitles-to-format + +# +# These were moved to plugins/context/webphotos so that they are closer to the shared +# library they depend on. +# +# bin_PROGRAMS = \ +# ferris-webphoto-upload \ +# ferris-webphoto-remote-url-to-eaindex-predicate + +# INCLUDES = \ +# @STLPORT_CFLAGS@ \ +# @SIGC_CFLAGS@ \ +# -I. \ +# -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ +# -I$(top_builddir) \ +# -I$(includedir) \ +# -I/usr/local/include \ +# @GLIB_CFLAGS@ \ +# @QT_CFLAGS@ @QTNETWORK_CFLAGS@ \ +# @CFLAGS@ + +# ferris_webphoto_upload_SOURCES = ferris-webphoto-upload.cpp +# ferris_webphoto_upload_LDADD = -lpopt @LIBFERRIS_LA@ @SHAREDWEBPHOTOS_LA@ +# ferris_webphoto_upload_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @QT_LIBS@ @QTNETWORK_LIBS@ + +# ferris_webphoto_remote_url_to_eaindex_predicate_SOURCES = ferris-webphoto-remote-url-to-eaindex-predicate.cpp +# ferris_webphoto_remote_url_to_eaindex_predicate_LDADD = -lpopt @LIBFERRIS_LA@ @SHAREDWEBPHOTOS_LA@ +# ferris_webphoto_remote_url_to_eaindex_predicate_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @QT_LIBS@ @QTNETWORK_LIBS@ + + + diff --git a/apps/Makefile.in b/apps/Makefile.in new file mode 100644 index 0000000..9934cb9 --- /dev/null +++ b/apps/Makefile.in @@ -0,0 +1,1152 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bindir)" +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = fileclip cat importdesktop fmkdir fmodestr2octal \ + oprocdeamon fcompress fulltextindex ftouch fschema fmedallion \ + ferriscd ai namespaces cursors fca ls copy mv rm xml head tail \ + fileactions ferrisredirect rdf xmmsdaemon metadataserver \ + phpsearchinterface frunner volumemanager du scripts upnpserver \ + tools +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +@HAVE_LIBPQXX_TRUE@PQXX_DEPENDANT_CODE = fca +@HAVE_LIBPLATINUM_TRUE@UPNPDIR = upnpserver +SUBDIRS = \ + fileclip cat importdesktop \ + fmkdir \ + fmodestr2octal \ + oprocdeamon \ + fcompress \ + fulltextindex \ + ftouch \ + fschema \ + fmedallion \ + ferriscd \ + ai \ + namespaces \ + cursors \ + $(PQXX_DEPENDANT_CODE) \ + ls \ + copy \ + mv rm \ + xml \ + head tail \ + fileactions \ + ferrisredirect \ + rdf xmmsdaemon \ + metadataserver \ + phpsearchinterface \ + frunner \ + volumemanager \ + du \ + scripts \ + $(UPNPDIR) \ + tools + +bin_SCRIPTS = $(srcdir)/*.sh $(srcdir)/*.pl libferris-googleearth ferris-rdfproc fedit ferris-internal-extract-subtitles-to-format +EXTRA_DIST = $(srcdir)/*.sh $(srcdir)/*.pl libferris-googleearth ferris-rdfproc fedit ferris-internal-extract-subtitles-to-format +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binSCRIPTS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS + + +# +# These were moved to plugins/context/webphotos so that they are closer to the shared +# library they depend on. +# +# bin_PROGRAMS = \ +# ferris-webphoto-upload \ +# ferris-webphoto-remote-url-to-eaindex-predicate + +# INCLUDES = \ +# @STLPORT_CFLAGS@ \ +# @SIGC_CFLAGS@ \ +# -I. \ +# -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ +# -I$(top_builddir) \ +# -I$(includedir) \ +# -I/usr/local/include \ +# @GLIB_CFLAGS@ \ +# @QT_CFLAGS@ @QTNETWORK_CFLAGS@ \ +# @CFLAGS@ + +# ferris_webphoto_upload_SOURCES = ferris-webphoto-upload.cpp +# ferris_webphoto_upload_LDADD = -lpopt @LIBFERRIS_LA@ @SHAREDWEBPHOTOS_LA@ +# ferris_webphoto_upload_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @QT_LIBS@ @QTNETWORK_LIBS@ + +# ferris_webphoto_remote_url_to_eaindex_predicate_SOURCES = ferris-webphoto-remote-url-to-eaindex-predicate.cpp +# ferris_webphoto_remote_url_to_eaindex_predicate_LDADD = -lpopt @LIBFERRIS_LA@ @SHAREDWEBPHOTOS_LA@ +# ferris_webphoto_remote_url_to_eaindex_predicate_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @QT_LIBS@ @QTNETWORK_LIBS@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ai/Makefile.am b/apps/ai/Makefile.am new file mode 100644 index 0000000..2f4a94c --- /dev/null +++ b/apps/ai/Makefile.am @@ -0,0 +1,24 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fagent fagentcreate + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fagent_SOURCES = fagent.cpp +fagent_LDADD = -lpopt @LIBFERRIS_LA@ +fagent_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +fagentcreate_SOURCES = fagentcreate.cpp +fagentcreate_LDADD = -lpopt @LIBFERRIS_LA@ +fagentcreate_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/ai/Makefile.in b/apps/ai/Makefile.in new file mode 100644 index 0000000..729c5d7 --- /dev/null +++ b/apps/ai/Makefile.in @@ -0,0 +1,1005 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fagent$(EXEEXT) fagentcreate$(EXEEXT) +subdir = apps/ai +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fagent_OBJECTS = fagent.$(OBJEXT) +fagent_OBJECTS = $(am_fagent_OBJECTS) +fagent_DEPENDENCIES = +fagent_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fagent_LDFLAGS) $(LDFLAGS) -o $@ +am_fagentcreate_OBJECTS = fagentcreate.$(OBJEXT) +fagentcreate_OBJECTS = $(am_fagentcreate_OBJECTS) +fagentcreate_DEPENDENCIES = +fagentcreate_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fagentcreate_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fagent_SOURCES) $(fagentcreate_SOURCES) +DIST_SOURCES = $(fagent_SOURCES) $(fagentcreate_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fagent_SOURCES = fagent.cpp +fagent_LDADD = -lpopt @LIBFERRIS_LA@ +fagent_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +fagentcreate_SOURCES = fagentcreate.cpp +fagentcreate_LDADD = -lpopt @LIBFERRIS_LA@ +fagentcreate_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/ai/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/ai/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fagent$(EXEEXT): $(fagent_OBJECTS) $(fagent_DEPENDENCIES) + @rm -f fagent$(EXEEXT) + $(fagent_LINK) $(fagent_OBJECTS) $(fagent_LDADD) $(LIBS) +fagentcreate$(EXEEXT): $(fagentcreate_OBJECTS) $(fagentcreate_DEPENDENCIES) + @rm -f fagentcreate$(EXEEXT) + $(fagentcreate_LINK) $(fagentcreate_OBJECTS) $(fagentcreate_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fagent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fagentcreate.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ai/fagent.cpp b/apps/ai/fagent.cpp new file mode 100644 index 0000000..752b9eb --- /dev/null +++ b/apps/ai/fagent.cpp @@ -0,0 +1,189 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fagent command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fagent.cpp,v 1.3 2010/09/24 21:31:08 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::AI; + +const string PROGRAM_NAME = "fagent"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int exit_status = 0; +const char* AgentName = 0; +const char* UseETagereAtPath = 0; +unsigned long TrainingMode = 0; +unsigned long ListAgents = 0; +unsigned long EraseAgent = 0; +unsigned long Verbose = 0; + + + +int main( int argc, char** argv ) +{ + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "train", 't', POPT_ARG_NONE, &TrainingMode, 0, + "train agent with existing emblem attachment", "" }, + + { "list-agents", 'l', POPT_ARG_NONE, &ListAgents, 0, + "list agent names that are available", "" }, + + { "agent-name", 'a', POPT_ARG_STRING, &AgentName, 0, + "name of emblem for operation", "" }, + + { "use-etagere", 0, POPT_ARG_STRING, &UseETagereAtPath, 0, + "use etagere at specified location instead of default", "" }, + + { "erase", 0, POPT_ARG_NONE, &EraseAgent, 0, + "erase the agent with --agent-name", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if( ListAgents ) + { + stringlist_t& sl = getAgentNames(); + copy( sl.begin(), sl.end(), ostream_iterator( cout, "\n")); + exit( 0 ); + } + + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if ( !AgentName ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_etagere et = Factory::getEtagere(); + if( UseETagereAtPath ) + { + et = Factory::makeEtagere( UseETagereAtPath ); + Factory::setDefaultEtagere( et ); + } + + fh_agent d = getAgent( AgentName ); + + if ( !d ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( EraseAgent ) + { + eraseAgent( d ); + exit(0); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + try + { + string srcURL = tmpCSTR; + fh_context c = Resolve( srcURL ); + + if( TrainingMode ) + { + d->addTrainingExample( c ); + } + else + { + d->classify( c ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + + if( TrainingMode ) + d->train(); + + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/ai/fagentcreate.cpp b/apps/ai/fagentcreate.cpp new file mode 100644 index 0000000..206dd49 --- /dev/null +++ b/apps/ai/fagentcreate.cpp @@ -0,0 +1,176 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fagentcreate command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fagentcreate.cpp,v 1.3 2010/09/24 21:31:08 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::AI; + +const string PROGRAM_NAME = "fagentcreate"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + const char* AgentName = 0; + const char* AgentImplemenationName = 0; + const char* UseETagereAtPath = 0; + const char* stateDir = 0; + const char* EmblemName = 0; + const char* EmblemID = 0; + const char* PersonalityName = 0; + const char* PersonalityID = 0; + unsigned long Verbose = 0; + unsigned long isBinaryClassifierAgent = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "agent-name", 'a', POPT_ARG_STRING, &AgentName, 0, + "name of agent", "" }, + + { "agent-impl-name", 'A', POPT_ARG_STRING, &AgentImplemenationName, 0, + "name of algorithm / plugin implementation to perform ML", "" }, + + { "use-etagere", 0, POPT_ARG_STRING, &UseETagereAtPath, 0, + "use etagere at specified location instead of default", "" }, + + { "statedir", 0, POPT_ARG_STRING, &stateDir, 0, + "where agent stores its state", "" }, + + { "emblem-name", 'e', POPT_ARG_STRING, &EmblemName, 0, + "name of emblem for operation", "" }, + + { "emblem-id", 'i', POPT_ARG_STRING, &EmblemID, 0, + "emblem ID for operation", "" }, + + { "pers-name", 'p', POPT_ARG_STRING, &PersonalityName, 0, + "name of personality that agent makes assertions as", "" }, + + { "pers-id", 'P', POPT_ARG_STRING, &PersonalityID, 0, + "emblem ID of personality that agent makes assertions as", "" }, + + { "binary", 'b', POPT_ARG_NONE, &isBinaryClassifierAgent, 0, + "create a binary classifier agent", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "OPTIONS ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if( !AgentName + || !AgentImplemenationName + || !stateDir + || ( !EmblemName && !EmblemID ) + || ( !isBinaryClassifierAgent ) ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_etagere et = Factory::getEtagere(); + if( UseETagereAtPath ) + { + et = Factory::makeEtagere( UseETagereAtPath ); + Factory::setDefaultEtagere( et ); + } + + fh_emblem em = 0; + if( EmblemName ) + em = et->getEmblemByName( EmblemName ); + if( EmblemID ) + em = et->getEmblemByID( toType( EmblemID )); + + fh_personality pers = Factory::getGenericClassifierAgentPersonality( et ); + if( PersonalityName ) + pers = obtainPersonality( PersonalityName ); + if( PersonalityID ) + pers = obtainPersonality( toType( PersonalityID )); + + fh_agent d = 0; + + if( isBinaryClassifierAgent ) + { + d = createBinaryAgent( AgentName, + AgentImplemenationName, + stateDir, + em, + pers ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/cat/Makefile.am b/apps/cat/Makefile.am new file mode 100644 index 0000000..d5f3ef5 --- /dev/null +++ b/apps/cat/Makefile.am @@ -0,0 +1,25 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fcat ftee + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + + +fcat_SOURCES = fcat.cpp +fcat_LDADD = -lpopt @LIBFERRIS_LA@ +fcat_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +ftee_SOURCES = ftee.cpp +ftee_LDADD = -lpopt @LIBFERRIS_LA@ +ftee_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/cat/Makefile.in b/apps/cat/Makefile.in new file mode 100644 index 0000000..1afc63c --- /dev/null +++ b/apps/cat/Makefile.in @@ -0,0 +1,1005 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fcat$(EXEEXT) ftee$(EXEEXT) +subdir = apps/cat +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fcat_OBJECTS = fcat.$(OBJEXT) +fcat_OBJECTS = $(am_fcat_OBJECTS) +fcat_DEPENDENCIES = +fcat_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fcat_LDFLAGS) $(LDFLAGS) -o $@ +am_ftee_OBJECTS = ftee.$(OBJEXT) +ftee_OBJECTS = $(am_ftee_OBJECTS) +ftee_DEPENDENCIES = +ftee_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ftee_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fcat_SOURCES) $(ftee_SOURCES) +DIST_SOURCES = $(fcat_SOURCES) $(ftee_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fcat_SOURCES = fcat.cpp +fcat_LDADD = -lpopt @LIBFERRIS_LA@ +fcat_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +ftee_SOURCES = ftee.cpp +ftee_LDADD = -lpopt @LIBFERRIS_LA@ +ftee_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/cat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/cat/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fcat$(EXEEXT): $(fcat_OBJECTS) $(fcat_DEPENDENCIES) + @rm -f fcat$(EXEEXT) + $(fcat_LINK) $(fcat_OBJECTS) $(fcat_LDADD) $(LIBS) +ftee$(EXEEXT): $(ftee_OBJECTS) $(ftee_DEPENDENCIES) + @rm -f ftee$(EXEEXT) + $(ftee_LINK) $(ftee_OBJECTS) $(ftee_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftee.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/cat/fcat.cpp b/apps/cat/fcat.cpp new file mode 100644 index 0000000..d41f11b --- /dev/null +++ b/apps/cat/fcat.cpp @@ -0,0 +1,348 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + Copyright (C) 2002 Ben Martin + + This file is part of libferris. + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fcat.cpp,v 1.11 2010/09/24 21:31:08 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 5 for not modified + * + * + * + * + * +bash -c '/ferris/apps/cat/fcat Makefile 2>/dev/null | wc -l' + + + +*/ + + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fcat"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +unsigned long OutputHeadersOnFD = 0; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void OutputHeadersOnFD_cb( fh_context c, const stringset_t& strset ) +{ + try + { + cerr << "OutputHeadersOnFD_cb()" << endl; + fh_stringstream ss; + ss << " " << endl; + ss << " " << endl; + for( stringset_t::const_iterator iter = strset.begin(); iter != strset.end(); ++iter ) + { + string k = *iter; + cerr << "OutputHeadersOnFD_cb() k:" << k << endl; + string v = getStrAttr( c, k, "" ); + ss << "<" << k << ">"; + ss << v; + ss << "" << endl; + } + ss << " " << endl; + + fh_ostream oss = Factory::MakeFdOStream( OutputHeadersOnFD ); + oss << tostr(ss) << flush; + } + catch( exception& e ) + { + cerr << "OutputHeadersOnFD_cb() e:" << e.what() << endl; + } +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + unsigned long FerrisInternalAsyncMessageSlave = 0; + const char* FerrisInternalAsyncMessageSlaveAttrs = 0; + const char* SourceAttrName = "content"; + + try + { + const char* DownloadIfMtimeSinceStr= 0; + unsigned long DownloadIfMtimeSince = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "download-if-mtime-since", 0, POPT_ARG_INT, &DownloadIfMtimeSince, 0, + "only transfer file content if it has been modified after given long time", "" }, + + { "output-headers-on-fd", 0, POPT_ARG_INT, &OutputHeadersOnFD, 0, + "when header info is received output an XML docuemnt on the given already open fd.", + "" }, + + { "download-if-mtime-since-string", 0, POPT_ARG_STRING, + &DownloadIfMtimeSinceStr, 0, + "only transfer file content if it has been modified after given string time", "" }, + + { "src-attr", 'a', POPT_ARG_STRING, + &SourceAttrName, 0, + "cat an EA rather than the content itself", "" }, + + { "ea", 0, POPT_ARG_STRING, + &SourceAttrName, 0, + "cat an EA rather than the content itself", "" }, + + { "ferris-internal-async-message-slave", 0, POPT_ARG_NONE, &FerrisInternalAsyncMessageSlave, 0, + "used by libferris itself to perform async queries through a slave process", "" }, + + { "ferris-internal-async-message-slave-attrs", 0, POPT_ARG_STRING, + &FerrisInternalAsyncMessageSlaveAttrs, 0, + "used by libferris itself to perform async queries through a slave process", "" }, + + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + stringlist_t srcs; + srcs = expandShellGlobs( srcs, optCon ); + + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream mss = ::Ferris::Factory::fcout(); + stringlist_t rdnlist; + Util::parseSeperatedList( FerrisInternalAsyncMessageSlaveAttrs, + rdnlist, back_inserter( rdnlist )); + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + for( ; srcsiter != srcsend ; ++srcsiter ) + { + stringlist_t::iterator rdniter = rdnlist.begin(); + stringlist_t::iterator rdnend = rdnlist.end(); + for( ; rdniter != rdnend; ++rdniter ) + { + string rdn = *rdniter; + + try + { + string srcURL = *srcsiter; + fh_context c = Resolve( srcURL ); + string v = getStrAttr( c, rdn, "", true, true ); + + stringmap_t m; + m["v"] = v; + m["eaname"] = rdn; + XML::writeMessage( mss, m ); + mss << flush; + } + catch( exception& e ) + { + string emsg = e.what(); + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["outofband-error"] = emsg; + m["eaname"] = rdn; + XML::writeMessage( mss, m ); + exit_status = 1; + mss << flush; + } + } + } + } + return exit_status; + } + + + + + + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + for( ; srcsiter != srcsend ; ++srcsiter ) + { + string srcURL = *srcsiter; + fh_istream iss; + fh_ostream oss = Factory::MakeFdOStream( STDOUT_FILENO ); + + try + { +// cerr << "srcURL :" << srcURL << endl; + + if( srcURL == "-" ) + { + iss = Factory::MakeFdIStream( STDIN_FILENO ); + } + else + { + fh_context c = Resolve( srcURL ); + if( DownloadIfMtimeSince ) + setStrAttr( c, "download-if-mtime-since", + tostr(DownloadIfMtimeSince), + false, false ); + if( DownloadIfMtimeSinceStr ) + { + try + { + cerr << "DownloadIfMtimeSinceStr:" << DownloadIfMtimeSinceStr << endl; + cerr << "c:" << c->getURL() << endl; + setStrAttr( c, "download-if-mtime-since-display", + DownloadIfMtimeSinceStr, + false, true ); + } + catch( exception& e ) + { + cerr << "DownloadIfMtimeSinceStr e:" << e.what() << endl; + } + } + + sigc::connection hdrcon; + + if( OutputHeadersOnFD ) + { + hdrcon = c->getContextEvent_Headers_Received_Sig().connect( + sigc::ptr_fun( OutputHeadersOnFD_cb ) ); + } + + /* + * Either cat an EA or the file itself, + * SourceAttrName==content by default + */ + fh_attribute a = c->getAttribute( SourceAttrName ); + iss = a->getIStream(); + + if( OutputHeadersOnFD ) + { + hdrcon.disconnect(); + } + + } + +// iss.exceptions( ios_base::badbit | ios_base::failbit ); +// cerr << "set exceptions to on...." << endl; + + copy( istreambuf_iterator(iss), istreambuf_iterator(), + ostreambuf_iterator(oss)); + oss << flush; + +// cerr << " iss is good():"<< iss.good() << endl; +// cerr << " iss is eof():"<< iss.eof() << endl; +// cerr << " iss is state:"<< iss.rdstate() << endl; +// if ( iss.rdstate() & ifstream::failbit ) +// cerr << " iss has fail bit set." << endl; +// if ( iss.rdstate() & ifstream::badbit ) +// cerr << " iss has bad bit set." << endl; + + string emsg = ""; + + if( !iss.good() ) + { + emsg = getIOErrorDescription( iss, srcURL ); + } +// else if( haveIOError( iss ) ) +// { +// emsg = getIOErrorDescription( iss, srcURL ); +// } + else if( haveIOError( oss ) ) + { + emsg = getIOErrorDescription( oss, "" ); + } + + if( !emsg.empty() ) + { + cerr << emsg << endl; + exit_status = 1; + } + } + catch( ContentNotModified& e ) + { + cerr << "not modified:" << srcURL << endl; + return 5; + } + catch( exception& e ) + { + string emsg = e.what(); + cerr << "error:" << emsg << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + string emsg = e.what(); + cerr << "error:" << emsg << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/cat/ftee.cpp b/apps/cat/ftee.cpp new file mode 100644 index 0000000..e6f44f5 --- /dev/null +++ b/apps/cat/ftee.cpp @@ -0,0 +1,222 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ftee + Copyright (C) 2009 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fcat.cpp,v 1.10 2009/04/14 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 5 for not modified + * + * + * +*/ + + +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ftee"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + + + + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + unsigned long FerrisInternalAsyncMessageSlave = 0; + const char* FerrisInternalAsyncMessageSlaveAttrs = 0; + const char* SourceAttrName = "content"; + + try + { + unsigned long Verbose = 0; + unsigned long Append = 0; + unsigned long DigestMD5 = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "append", 'a', POPT_ARG_NONE, &Append, 0, + "append to given files", "" }, + + { "md5", '5', POPT_ARG_NONE, &DigestMD5, 0, + "show md5 on stderr at end", "" }, + + + // { "src-attr", 'a', POPT_ARG_STRING, + // &SourceAttrName, 0, + // "cat an EA rather than the content itself", "" }, + + // { "ea", 0, POPT_ARG_STRING, + // &SourceAttrName, 0, + // "cat an EA rather than the content itself", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* dst"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + stringlist_t dsts; + dsts = expandShellGlobs( dsts, optCon ); + + if( dsts.size() != 1 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + // // digest + // { + // fh_istream iss = Factory::fcin(); + // fh_iostream z = Factory::MakeDigestStream( "md5" ); + // cerr << "copying..." << endl; + // copy( istreambuf_iterator(iss), + // istreambuf_iterator(), + // ostreambuf_iterator(z)); + // cerr << "2........" << endl; + // z << flush; + // cerr << "3........" << endl; + // { + // string s; + // cerr << "4........" << endl; + // z >> s; + // cerr << "digest:" << s << endl; + // } + // exit(0); + // } + + + string earl = *(dsts.begin()); + fh_istream iss = Factory::fcin(); + fh_ostream oss1 = Factory::fcout(); + fh_context outc = Shell::acquireContext( earl, 0, false ); + ferris_ios::openmode m = std::ios::out; + if( Append ) + { + m |= ios::app | ios::ate; + } + fh_ostream oss2 = outc->getIOStream( m ); + + fh_ostream oss = Factory::MakeTeeStream( oss1, oss2 ); + + fh_iostream digestStream; + if( DigestMD5 ) + { + digestStream = Factory::MakeDigestStream( "md5" ); + oss = Factory::MakeTeeStream( oss1, digestStream ); + } + + + copy( istreambuf_iterator(iss), + istreambuf_iterator(), + ostreambuf_iterator(oss)); + oss << flush; + oss1 << flush; + oss2 << flush; + digestStream << flush; + + if( DigestMD5 ) + { + string s; + digestStream >> s; + cerr << "digest:" << s << endl; + } + + + string emsg = ""; + if( !iss.good() ) + { + emsg = getIOErrorDescription( iss, "" ); + } + else if( haveIOError( oss ) ) + { + emsg = getIOErrorDescription( oss, "" ); + } + + if( !emsg.empty() ) + { + cerr << emsg << endl; + exit_status = 1; + } + } + catch( exception& e ) + { + string emsg = e.what(); + cerr << "error:" << emsg << endl; + exit_status = 1; + } + return exit_status; +} + + diff --git a/apps/copy/Makefile.am b/apps/copy/Makefile.am new file mode 100644 index 0000000..f72d0b6 --- /dev/null +++ b/apps/copy/Makefile.am @@ -0,0 +1,21 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferriscp + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferriscp_SOURCES = ferriscp.cpp +ferriscp_LDADD = -lpopt @LIBFERRIS_LA@ +ferriscp_LDFLAGS = @GLIB_LIBS@ + + diff --git a/apps/copy/Makefile.in b/apps/copy/Makefile.in new file mode 100644 index 0000000..fb90023 --- /dev/null +++ b/apps/copy/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferriscp$(EXEEXT) +subdir = apps/copy +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferriscp_OBJECTS = ferriscp.$(OBJEXT) +ferriscp_OBJECTS = $(am_ferriscp_OBJECTS) +ferriscp_DEPENDENCIES = +ferriscp_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferriscp_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferriscp_SOURCES) +DIST_SOURCES = $(ferriscp_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferriscp_SOURCES = ferriscp.cpp +ferriscp_LDADD = -lpopt @LIBFERRIS_LA@ +ferriscp_LDFLAGS = @GLIB_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/copy/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/copy/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferriscp$(EXEEXT): $(ferriscp_OBJECTS) $(ferriscp_DEPENDENCIES) + @rm -f ferriscp$(EXEEXT) + $(ferriscp_LINK) $(ferriscp_OBJECTS) $(ferriscp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferriscp.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/copy/ferriscp.cpp b/apps/copy/ferriscp.cpp new file mode 100644 index 0000000..985f589 --- /dev/null +++ b/apps/copy/ferriscp.cpp @@ -0,0 +1,192 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris cp + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferriscp.cpp,v 1.7 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +using namespace std; +using namespace Ferris; + + +const string PROGRAM_NAME = "ferriscp"; + + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ +/*******************************************************************************/ + + +int main( int argc, const char** argv ) +{ + fh_cp_tty obj = new FerrisCopy_TTY(); + + const char* DstNameCSTR = 0; + unsigned long ShowMeter = 0; + unsigned long UseSyncDelayer = 0; + + struct poptOption optionsTable[] = + { + { "show-progress-meter", 0, POPT_ARG_NONE, &ShowMeter, 0, + "Show a one line progress meter", "" }, + + { "use-sync-delayer", 0, POPT_ARG_NONE, &UseSyncDelayer, 0, + "try to delay final writing until end of execution", "" }, + + { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, + "Specify destination explicity, all remaining URLs are assumed to be source files", + "DIR" }, + + FERRIS_COPY_OPTIONS( obj ) + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ... dst"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + obj->getPoptCollector()->ArgProcessingDone( optCon ); + + if (argc < 3) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + try + { + typedef stringlist_t srcs_t; + srcs_t srcs; + + srcs = expandShellGlobs( srcs, optCon ); + + /* + * Setup the destination from either explicit command line or + * last arg + */ + string DstName; + if( DstNameCSTR ) + { + obj->setDstIsDirectory( true ); + DstName = DstNameCSTR; + } + else + { + DstName = srcs.back(); + srcs.pop_back(); + } + + /* TTY version */ + obj->setShowMeter( ShowMeter ); + + /* Common version */ +// cerr << "dst:" << DstName << endl; + obj->setDstURL( DstName ); + + /************************************************************/ + /************************************************************/ + /************************************************************/ + + + typedef Loki::SmartPtr< SyncDelayer, + Loki::RefLinked, + Loki::DisallowConversion, + FerrisLoki::FerrisExSmartPointerChecker, + Loki::DefaultSPStorage > fh_SyncDelayer; + + fh_SyncDelayer syncd = 0; + if( UseSyncDelayer ) + { + syncd = new SyncDelayer(); + } + + for( srcs_t::iterator iter = srcs.begin(); iter != srcs.end(); ++iter ) + { + string SrcName = *iter; +// cerr << "src:" << SrcName << endl; + + obj->setSrcURL( SrcName ); + obj->copy(); + } + } + catch( NoSuchContextClass& e ) + { + cerr << "Invalid context class given e:" << e.what() << endl; + exit(1); + } + catch( exception& e ) + { + cerr << "Error: " << e.what() << endl; + exit(1); + } + + + + + poptFreeContext(optCon); + return 0; +} diff --git a/apps/cursors/Makefile.am b/apps/cursors/Makefile.am new file mode 100644 index 0000000..57675e7 --- /dev/null +++ b/apps/cursors/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferris-cursor + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_cursor_SOURCES = ferris-cursor.cpp +ferris_cursor_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_cursor_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/cursors/Makefile.in b/apps/cursors/Makefile.in new file mode 100644 index 0000000..ec37ff7 --- /dev/null +++ b/apps/cursors/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-cursor$(EXEEXT) +subdir = apps/cursors +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_cursor_OBJECTS = ferris-cursor.$(OBJEXT) +ferris_cursor_OBJECTS = $(am_ferris_cursor_OBJECTS) +ferris_cursor_DEPENDENCIES = +ferris_cursor_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_cursor_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_cursor_SOURCES) +DIST_SOURCES = $(ferris_cursor_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_cursor_SOURCES = ferris-cursor.cpp +ferris_cursor_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_cursor_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/cursors/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/cursors/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-cursor$(EXEEXT): $(ferris_cursor_OBJECTS) $(ferris_cursor_DEPENDENCIES) + @rm -f ferris-cursor$(EXEEXT) + $(ferris_cursor_LINK) $(ferris_cursor_OBJECTS) $(ferris_cursor_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-cursor.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/cursors/ferris-cursor.cpp b/apps/cursors/ferris-cursor.cpp new file mode 100644 index 0000000..605804e --- /dev/null +++ b/apps/cursors/ferris-cursor.cpp @@ -0,0 +1,232 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + cursor manipulation and reading command line client + Copyright (C) 2004 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-cursor.cpp,v 1.3 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::Cursor; + +const string PROGRAM_NAME = "ferris-cursor"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void show( const std::string& msg, fh_context c, const std::string& eanames ) +{ + cout << msg << c->getURL() << endl; + + stringlist_t sl = Util::parseCommaSeperatedList( eanames ); + for( stringlist_t::const_iterator si = sl.begin(); si != sl.end(); ++si ) + { + cout << " " << getStrAttr( c, *si, "" ) << endl; + } +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + const char* NewCursorContent_CSTR = 0; + const char* NewCursorRdn_CSTR = 0; + unsigned long ListMode = 0; + unsigned long SetMode = 0; + unsigned long Verbose = 0; + unsigned long MoveNext = 0; + unsigned long MovePrev = 0; + unsigned long CursorOptionRemake = 0; + unsigned long CursorOptionSize = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "rdn", 'R', POPT_ARG_STRING, &NewCursorRdn_CSTR, 0, + "rdn for what to set the cursor to point to. " + "Must be a child of the cursor directory", "" }, + + { "list", 'l', POPT_ARG_NONE, &ListMode, 0, + "show all the items that the cursor will move to in cursor order", "" }, + + { "set", 's', POPT_ARG_NONE, &SetMode, 0, + "Set the cursor to the file at prefix", "" }, + + { "content", 'c', POPT_ARG_STRING, &NewCursorContent_CSTR, 0, + "Set the content of the cursor to the given string." + "This is applied after any prev/next movements if they are present", "" }, + + { "next", 'n', POPT_ARG_NONE, &MoveNext, 0, + "move cursor to next item", "" }, + + { "prev", 'p', POPT_ARG_NONE, &MovePrev, 0, + "move cursor to prev item", "" }, + + { "cursor-option-remake", 0, POPT_ARG_NONE, &CursorOptionRemake, 0, + "set the cursor option to always remake the cursor file", "" }, + + { "cursor-option-size", 0, POPT_ARG_INT, &CursorOptionSize, 0, + "set the cursor option to have the cursor loop size items", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if( SetMode && !NewCursorRdn_CSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + try + { + string srcURL = tmpCSTR; + fh_context parent = Resolve( srcURL ); + fh_context cursor = Factory::getCursor( parent ); + + if( CursorOptionRemake ) + { + Config::setCursorOption( parent, + Config::cursor_object_always_remake, + "1" ); + } + if( CursorOptionSize > 0 ) + { + Config::setCursorOption( parent, + Config::cursor_object_list_size, + tostr( CursorOptionSize ) ); + } + if( ListMode ) + { + show( "Cursor itself is at ", cursor, "content" ); + cout << "--------------------------------------------" << endl; + + Context::iterator cursor_iter = parent->find( cursor->getDirName() ); + for( circular_iterator< Context, Context::iterator > + ci = make_circular_iterator( parent, cursor_iter ); + ci != make_circular_iterator( parent ); ++ci ) + { + show( "", *ci, "content" ); + } + } + else if( SetMode ) + { + fh_context newposition = parent->getSubContext( NewCursorRdn_CSTR ); + cursorSet( cursor, newposition ); + } + else if( MoveNext ) + { + cursor = cursorNext( cursor ); + } + else if( MovePrev ) + { + cursor = cursorPrev( cursor ); + } + else + { + if( !NewCursorContent_CSTR ) + { + show( "Cursor is at ", cursor, "content" ); + } + } + + if( NewCursorContent_CSTR ) + { + show( "setting data for cursor at ", cursor, "content" ); + setStrAttr( cursor, "content", NewCursorContent_CSTR, true, true ); + cout << "read back:" << getStrAttr( cursor, "content", "" ) << endl; + + try + { + setStrAttr( cursor, "mtime", Ferris::tostr(time(0)), true, true ); + } + catch( exception& e ) + { + cerr << "ERROR SETTING MTIME! e:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/du/Makefile.am b/apps/du/Makefile.am new file mode 100644 index 0000000..22e8427 --- /dev/null +++ b/apps/du/Makefile.am @@ -0,0 +1,15 @@ +bin_PROGRAMS = fdu + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +fdu_SOURCES = fdu.cpp +fdu_LDADD = -lm -lpopt +fdu_LDFLAGS = @LIBFERRIS_LA@ + diff --git a/apps/du/Makefile.in b/apps/du/Makefile.in new file mode 100644 index 0000000..5a1f4f5 --- /dev/null +++ b/apps/du/Makefile.in @@ -0,0 +1,987 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fdu$(EXEEXT) +subdir = apps/du +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fdu_OBJECTS = fdu.$(OBJEXT) +fdu_OBJECTS = $(am_fdu_OBJECTS) +fdu_DEPENDENCIES = +fdu_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(fdu_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fdu_SOURCES) +DIST_SOURCES = $(fdu_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +fdu_SOURCES = fdu.cpp +fdu_LDADD = -lm -lpopt +fdu_LDFLAGS = @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/du/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/du/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fdu$(EXEEXT): $(fdu_OBJECTS) $(fdu_DEPENDENCIES) + @rm -f fdu$(EXEEXT) + $(fdu_LINK) $(fdu_OBJECTS) $(fdu_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdu.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/du/fdu.cpp b/apps/du/fdu.cpp new file mode 100644 index 0000000..b8d92ca --- /dev/null +++ b/apps/du/fdu.cpp @@ -0,0 +1,408 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris fdu + Copyright (C) 2008 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ls.cpp,v 1.12 2008/04/27 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +#define DEBUG 0 + +const string PROGRAM_NAME = "fdu"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +fh_display_aggdata d = 0; + +unsigned long HumanReadable = 0; +unsigned long ShowCountsForAll = 0; +unsigned long ShowApparentSize = 0; +const char* BlockSize_CSTR = 0; +unsigned long ShowBytes = 0; +unsigned long ShowTotal = 0; +unsigned long DereferenceArgs = 0; +const char* Files0From= 0; +unsigned long BlockSize1K = 0; +unsigned long BlockSize1M = 0; +unsigned long CountLinks = 0; +unsigned long DereferenceAllLinks = 0; +unsigned long NullTerminateLines = 0; +unsigned long SeparateDirs = 0; +unsigned long Summarize = 0; +unsigned long OneFileSystem = 0; +const char* ExcludeFrom = 0; +const char* Exclude = 0; +unsigned long MaxDepth = 0; +unsigned long ShowMTime = 0; +const char* ShowXTime_CSTR = "none"; +const char* TimeStyle_CSTR = 0; +unsigned long ShowVersion = 0; +unsigned long Debug = 0; +unsigned long XML = 0; + + +const char* DontDescendRegexCSTR = 0; +const char* ContextSeperator = ""; +unsigned long SeperateEachContextWithNewLine = 0; +const char* FieldSeperator = "\t"; + + +bool ShowCTime = false; +bool ShowATime = false; +string time_format = ""; + + +string showByteCount( guint64 v ) +{ + if( HumanReadable ) + { + return Util::convertByteString( v ); + } + return tostr( v ); +} + +void presentData( const Ferrisls_aggregate_t& data, const std::string& earl ) +{ + guint64 sizein1kblocks = data.sizeIn1KBlocks(); + guint64 sz = sizein1kblocks; + if( HumanReadable ) + sz = data.byteSizeOnDisk(); + else + { + if( BlockSize_CSTR ) + { + guint64 v = Util::convertByteString( (string)BlockSize_CSTR ); + sz = sizein1kblocks * 1024.0 / v; + cerr << "blocksz given v:" << v << " total blocks:" << sizein1kblocks << endl; + } + } + + cout << showByteCount(sz); + + if( ShowMTime ) + cout << FieldSeperator << Time::toTimeString( data.newestmtime, time_format ); + if( ShowCTime ) + cout << FieldSeperator << Time::toTimeString( data.newestmtime, time_format ); + if( ShowATime ) + cout << FieldSeperator << Time::toTimeString( data.newestmtime, time_format ); + + cout << FieldSeperator << earl << endl; +} + + + +typedef list< Ferrisls_aggregate_t > aggregateStack_t; +aggregateStack_t aggregateStack; +void EnteringContext( Ferrisls& ls, fh_context c ) +{ +// cerr << "EnteringContext() c:" << c->getURL() << endl; + + static Util::SingleShot virgin; + if( virgin ) + { +// cerr << "EnteringContext(IGNORING FIRST) c:" << c->getURL() << endl; + Ferrisls_aggregate_t a; + a.reset(); + aggregateStack.push_back( a ); + return; + } + Ferrisls_aggregate_t a = d->getData( AGGDATA_RECURSIVE ); + aggregateStack.push_back( d->getData( AGGDATA_RECURSIVE ) ); + d->getData( AGGDATA_RECURSIVE ).reset(); +} + +void LeavingContext( Ferrisls& ls, fh_context c ) +{ +// cerr << "LeavingContext() c:" << c->getURL() << endl; + presentData( d->getData( AGGDATA_RECURSIVE ), c->getURL() ); + + Ferrisls_aggregate_t a = aggregateStack.back(); + aggregateStack.pop_back(); + + presentData( d->getData( AGGDATA_RECURSIVE ), c->getURL() ); +// presentData( a, c->getURL() ); + d->setData( d->getData( AGGDATA_RECURSIVE ) + a, AGGDATA_RECURSIVE ); + +} + +int main( int argc, const char** argv ) +{ + Ferrisls ls; + + + struct poptOption optionsTable[] = { + +// { 0, 'x', POPT_ARG_NONE, &HorizList, 0, +// "list entries by lines instead of by columns", 0 }, + +// { "context", 'Z', POPT_ARG_NONE, &ShowSELinuxContext, 0, +// "Display SELinux security context so it fits on most displays.", 0 }, + +// { "lcontext", 0, POPT_ARG_NONE, &ShowSELinuxContextLong, 0, +// "Display SELinux security context in wide display mode", 0 }, + +// { "dont-descend-regex", 0, POPT_ARG_STRING, &DontDescendRegexCSTR, 0, +// "Don't descend into urls which match this regex in -R mode", 0 }, + +// { "ea-index-path", 0, POPT_ARG_STRING, &EAIndexPath_CSTR, 0, +// "which EA Index to use", "" }, + +// { "output-precision", 0, POPT_ARG_INT, &OutputPrecision, 0, +// "precision of numerical output", "" }, + + { "summarize", 's', POPT_ARG_NONE, &Summarize, 0, + "display only a total for each argument", "" }, + + { "human-readable", 'h', POPT_ARG_NONE, &HumanReadable, 0, + "print sizes in human readable format (e.g., 1K 234M 2G)", "" }, + + { "block-size", 'h', POPT_ARG_STRING, &BlockSize_CSTR, 0, + "Scale sizes by SIZE before printing them", "" }, + + { "time", '1', POPT_ARG_STRING, &ShowXTime_CSTR, 0, + "show time as WORD instead of modification time: atime, access, use, ctime or status", "" }, + + { "mtime", 0, POPT_ARG_NONE, &ShowMTime, 0, + "show mtime", "" }, + + { "time-style", 0, POPT_ARG_STRING, &TimeStyle_CSTR, 0, + "List timestamps in style STYLE.", "" }, + + /* + * ferrisls type options + */ + { "dont-descend-regex", 0, POPT_ARG_STRING, &DontDescendRegexCSTR, 0, + "Don't descend into urls which match this regex in -R mode", 0 }, + + { "context-seperator", 0, POPT_ARG_STRING, &ContextSeperator, 0, + "Data to be printed after the display of each context", "" }, + + { "seperate-each-context-with-new-line", 0, POPT_ARG_NONE, + &SeperateEachContextWithNewLine, 0, + "Seperate each context with an extra newline", 0 }, + + { "field-seperator", 0, POPT_ARG_STRING, &FieldSeperator, 0, + "The seperator to use between attributes", " " }, + + /* + * Other handy stuff + */ + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + { "debug", 0, POPT_ARG_NONE, &Debug, 0, + "show debugging output", 0 }, + + { "xml", 0, POPT_ARG_NONE, &XML, 0, + "show output in XML format", 0 }, + + + /* + * Standard Ferris options + */ + FERRIS_POPT_OPTIONS + + /** + * Expansion of strange-url://foo* + */ + FERRIS_SHELL_GLOB_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* url1 url2 ..."); + + if (argc < 1) { +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if( ShowVersion ) + { + cout << "ferrisls version: $Id: ls.cpp,v 1.12 2008/04/27 21:30:11 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + d = createDisplayAggregateData( &ls ); + + if( DontDescendRegexCSTR ) + ls.setDontDescendRegex( DontDescendRegexCSTR ); + + if( !Summarize ) + { + ls.getEnteringContext_Sig().connect( sigc::ptr_fun( EnteringContext )); + ls.getLeavingContext_Sig().connect( sigc::ptr_fun( LeavingContext )); + } + + + +// cerr << "ShowMTime:" << ShowMTime << endl; +// cerr << "ShowXTime_CSTR:" << ShowXTime_CSTR << endl; + if( ShowXTime_CSTR ) + { + string ShowXTime = ShowXTime_CSTR; + ShowCTime = ShowXTime == "ctime" || ShowXTime == "status" || ShowXTime == "use"; + ShowATime = ShowXTime == "atime" || ShowXTime == "access"; + ShowMTime = ShowMTime || ShowXTime == "mtime" || ShowXTime == "modification"; + } + time_format = TimeStyle_CSTR ? TimeStyle_CSTR : ""; + + try + { + + + stringlist_t srcs; + srcs = expandShellGlobs( srcs, optCon ); + if( srcs.empty() ) + { + srcs.push_back("."); + } + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + + bool Done = false; + for( int First_Time = 1; !Done && srcsiter != srcsend ; ++srcsiter ) + { +// RootName = poptGetArg(optCon); + string RootName = *srcsiter; + + + First_Time = 0; + + fh_context c = Resolve( RootName ); +// d->setRootContext( c ); +// ls.setURL( c->getURL() ); + + if( isTrue( getStrAttr( c, "is-dir", "0" ))) + d->ShowAttributes( c ); + ls.setURL( RootName ); + ls(); + d->DetachAllSignals(); +// d->UpdateAggregateData( d->getData( m ), c ); + + string earl = RootName; + const Ferrisls_aggregate_t& data = d->getData( AGGDATA_RECURSIVE ); + + if( Debug ) + { + cout << " count:" << data.count << endl; + cout << " maxdepth:" << data.maxdepth << endl; + cout << " size:" << data.size << endl; + cout << "size human readable:" << Util::convertByteString(data.size) << endl; + cout << " size in blocks:" << data.sizeinblocks << endl; + cout << endl; + cout << " files:" << data.filecount << endl; + cout << " dirs:" << data.dircount << endl; + } + else + { + if( Summarize ) + presentData( data, earl ); + } + + cout << ContextSeperator; + if(SeperateEachContextWithNewLine) + cout << endl; + } + } + catch( NoSuchContextClass& e ) + { +// cerr << "Invalid context class given:" << RootContextClass << endl; + cerr << "e:" << e.what() << endl; + exit(1); + } + catch( exception& e ) + { + cerr << "ls.cpp cought:" << e.what() << endl; + exit(1); + } + + + +poptFreeContext(optCon); + +cout << flush; +return ls.hadErrors(); +} diff --git a/apps/fca/Makefile.am b/apps/fca/Makefile.am new file mode 100644 index 0000000..3101bcb --- /dev/null +++ b/apps/fca/Makefile.am @@ -0,0 +1,83 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +if HAVE_GTKEXTRA2 +GTKEXTRA_APPS = gf-create-fca-scale-numeric +endif + +bin_PROGRAMS = ferris-create-fca-tree ferris-lattice-from-cfi \ + ferris-create-fca-scale-urls ferris-create-fca-scale-numeric \ + ferris-create-fca-scale-numeric-ordinal \ + $(GTKEXTRA_APPS) \ + ferris-create-fca-scale-splice-in-ffitler \ + ferris-create-fca-scale-nominal \ + ferris-export-concept-lattice-to-toscanaj \ + ferris-export-formal-context-to-burmeister + + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @LIBPQXX_CFLAGS@ \ + @SOPRANO_CFLAGS@ \ + @LIBGISTMIQ_CFLAGS@ \ + @CFLAGS@ + +noinst_LTLIBRARIES = libferrisfcascaling.la +libferrisfcascaling_la_SOURCES = libferrisfcascaling.cpp libferrisfcascaling.hh + + +ferris_create_fca_tree_SOURCES = ferris-create-fca-tree.cpp +ferris_create_fca_tree_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_tree_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la + +ferris_lattice_from_cfi_SOURCES = ferris-lattice-from-cfi.cpp +ferris_lattice_from_cfi_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_lattice_from_cfi_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ @LIBGISTMIQ_LIBS@ + +ferris_create_fca_scale_urls_SOURCES = ferris-create-fca-scale-urls.cpp +ferris_create_fca_scale_urls_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_urls_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ @SOPRANO_LIBS@ libferrisfcascaling.la + +ferris_create_fca_scale_numeric_SOURCES = ferris-create-fca-scale-numeric.cpp +ferris_create_fca_scale_numeric_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_numeric_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la + +ferris_create_fca_scale_numeric_ordinal_SOURCES = ferris-create-fca-scale-numeric-ordinal.cpp +ferris_create_fca_scale_numeric_ordinal_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_numeric_ordinal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la + +ferris_create_fca_scale_splice_in_ffitler_SOURCES = ferris-create-fca-scale-splice-in-ffitler.cpp +ferris_create_fca_scale_splice_in_ffitler_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_splice_in_ffitler_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la + + +gf_create_fca_scale_numeric_SOURCES = gf-create-fca-scale-numeric.cpp +gf_create_fca_scale_numeric_CXXFLAGS = $(INCLUDES) @GTK_CFLAGS@ @GTKEXTRA2_CFLAGS@ +gf_create_fca_scale_numeric_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISUI_LA@ +gf_create_fca_scale_numeric_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ \ + @GTK_LIBS@ @GTKEXTRA2_LIBS@ libferrisfcascaling.la + + +ferris_create_fca_scale_nominal_SOURCES = ferris-create-fca-scale-nominal.cpp +ferris_create_fca_scale_nominal_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_nominal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la + + +ferris_export_concept_lattice_to_toscanaj_SOURCES = ferris-export-concept-lattice-to-toscanaj.cpp +ferris_export_concept_lattice_to_toscanaj_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_export_concept_lattice_to_toscanaj_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ + +ferris_export_formal_context_to_burmeister_SOURCES = ferris-export-formal-context-to-burmeister.cpp +ferris_export_formal_context_to_burmeister_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_export_formal_context_to_burmeister_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ + + + + diff --git a/apps/fca/Makefile.in b/apps/fca/Makefile.in new file mode 100644 index 0000000..f80c887 --- /dev/null +++ b/apps/fca/Makefile.in @@ -0,0 +1,1220 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-create-fca-tree$(EXEEXT) \ + ferris-lattice-from-cfi$(EXEEXT) \ + ferris-create-fca-scale-urls$(EXEEXT) \ + ferris-create-fca-scale-numeric$(EXEEXT) \ + ferris-create-fca-scale-numeric-ordinal$(EXEEXT) \ + $(am__EXEEXT_1) \ + ferris-create-fca-scale-splice-in-ffitler$(EXEEXT) \ + ferris-create-fca-scale-nominal$(EXEEXT) \ + ferris-export-concept-lattice-to-toscanaj$(EXEEXT) \ + ferris-export-formal-context-to-burmeister$(EXEEXT) +subdir = apps/fca +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libferrisfcascaling_la_LIBADD = +am_libferrisfcascaling_la_OBJECTS = libferrisfcascaling.lo +libferrisfcascaling_la_OBJECTS = $(am_libferrisfcascaling_la_OBJECTS) +@HAVE_GTKEXTRA2_TRUE@am__EXEEXT_1 = \ +@HAVE_GTKEXTRA2_TRUE@ gf-create-fca-scale-numeric$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_create_fca_scale_nominal_OBJECTS = \ + ferris-create-fca-scale-nominal.$(OBJEXT) +ferris_create_fca_scale_nominal_OBJECTS = \ + $(am_ferris_create_fca_scale_nominal_OBJECTS) +ferris_create_fca_scale_nominal_DEPENDENCIES = +ferris_create_fca_scale_nominal_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_create_fca_scale_nominal_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_create_fca_scale_numeric_OBJECTS = \ + ferris-create-fca-scale-numeric.$(OBJEXT) +ferris_create_fca_scale_numeric_OBJECTS = \ + $(am_ferris_create_fca_scale_numeric_OBJECTS) +ferris_create_fca_scale_numeric_DEPENDENCIES = +ferris_create_fca_scale_numeric_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_create_fca_scale_numeric_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_create_fca_scale_numeric_ordinal_OBJECTS = \ + ferris-create-fca-scale-numeric-ordinal.$(OBJEXT) +ferris_create_fca_scale_numeric_ordinal_OBJECTS = \ + $(am_ferris_create_fca_scale_numeric_ordinal_OBJECTS) +ferris_create_fca_scale_numeric_ordinal_DEPENDENCIES = +ferris_create_fca_scale_numeric_ordinal_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_create_fca_scale_numeric_ordinal_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_ferris_create_fca_scale_splice_in_ffitler_OBJECTS = \ + ferris-create-fca-scale-splice-in-ffitler.$(OBJEXT) +ferris_create_fca_scale_splice_in_ffitler_OBJECTS = \ + $(am_ferris_create_fca_scale_splice_in_ffitler_OBJECTS) +ferris_create_fca_scale_splice_in_ffitler_DEPENDENCIES = +ferris_create_fca_scale_splice_in_ffitler_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_create_fca_scale_splice_in_ffitler_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_ferris_create_fca_scale_urls_OBJECTS = \ + ferris-create-fca-scale-urls.$(OBJEXT) +ferris_create_fca_scale_urls_OBJECTS = \ + $(am_ferris_create_fca_scale_urls_OBJECTS) +ferris_create_fca_scale_urls_DEPENDENCIES = +ferris_create_fca_scale_urls_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_create_fca_scale_urls_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_create_fca_tree_OBJECTS = ferris-create-fca-tree.$(OBJEXT) +ferris_create_fca_tree_OBJECTS = $(am_ferris_create_fca_tree_OBJECTS) +ferris_create_fca_tree_DEPENDENCIES = +ferris_create_fca_tree_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_create_fca_tree_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_export_concept_lattice_to_toscanaj_OBJECTS = \ + ferris-export-concept-lattice-to-toscanaj.$(OBJEXT) +ferris_export_concept_lattice_to_toscanaj_OBJECTS = \ + $(am_ferris_export_concept_lattice_to_toscanaj_OBJECTS) +ferris_export_concept_lattice_to_toscanaj_DEPENDENCIES = +ferris_export_concept_lattice_to_toscanaj_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_export_concept_lattice_to_toscanaj_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_ferris_export_formal_context_to_burmeister_OBJECTS = \ + ferris-export-formal-context-to-burmeister.$(OBJEXT) +ferris_export_formal_context_to_burmeister_OBJECTS = \ + $(am_ferris_export_formal_context_to_burmeister_OBJECTS) +ferris_export_formal_context_to_burmeister_DEPENDENCIES = +ferris_export_formal_context_to_burmeister_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_export_formal_context_to_burmeister_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_ferris_lattice_from_cfi_OBJECTS = \ + ferris-lattice-from-cfi.$(OBJEXT) +ferris_lattice_from_cfi_OBJECTS = \ + $(am_ferris_lattice_from_cfi_OBJECTS) +ferris_lattice_from_cfi_DEPENDENCIES = +ferris_lattice_from_cfi_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_lattice_from_cfi_LDFLAGS) $(LDFLAGS) -o \ + $@ +am_gf_create_fca_scale_numeric_OBJECTS = gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.$(OBJEXT) +gf_create_fca_scale_numeric_OBJECTS = \ + $(am_gf_create_fca_scale_numeric_OBJECTS) +gf_create_fca_scale_numeric_DEPENDENCIES = +gf_create_fca_scale_numeric_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(gf_create_fca_scale_numeric_CXXFLAGS) $(CXXFLAGS) \ + $(gf_create_fca_scale_numeric_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libferrisfcascaling_la_SOURCES) \ + $(ferris_create_fca_scale_nominal_SOURCES) \ + $(ferris_create_fca_scale_numeric_SOURCES) \ + $(ferris_create_fca_scale_numeric_ordinal_SOURCES) \ + $(ferris_create_fca_scale_splice_in_ffitler_SOURCES) \ + $(ferris_create_fca_scale_urls_SOURCES) \ + $(ferris_create_fca_tree_SOURCES) \ + $(ferris_export_concept_lattice_to_toscanaj_SOURCES) \ + $(ferris_export_formal_context_to_burmeister_SOURCES) \ + $(ferris_lattice_from_cfi_SOURCES) \ + $(gf_create_fca_scale_numeric_SOURCES) +DIST_SOURCES = $(libferrisfcascaling_la_SOURCES) \ + $(ferris_create_fca_scale_nominal_SOURCES) \ + $(ferris_create_fca_scale_numeric_SOURCES) \ + $(ferris_create_fca_scale_numeric_ordinal_SOURCES) \ + $(ferris_create_fca_scale_splice_in_ffitler_SOURCES) \ + $(ferris_create_fca_scale_urls_SOURCES) \ + $(ferris_create_fca_tree_SOURCES) \ + $(ferris_export_concept_lattice_to_toscanaj_SOURCES) \ + $(ferris_export_formal_context_to_burmeister_SOURCES) \ + $(ferris_lattice_from_cfi_SOURCES) \ + $(gf_create_fca_scale_numeric_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +@HAVE_GTKEXTRA2_TRUE@GTKEXTRA_APPS = gf-create-fca-scale-numeric +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @LIBPQXX_CFLAGS@ \ + @SOPRANO_CFLAGS@ \ + @LIBGISTMIQ_CFLAGS@ \ + @CFLAGS@ + +noinst_LTLIBRARIES = libferrisfcascaling.la +libferrisfcascaling_la_SOURCES = libferrisfcascaling.cpp libferrisfcascaling.hh +ferris_create_fca_tree_SOURCES = ferris-create-fca-tree.cpp +ferris_create_fca_tree_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_tree_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la +ferris_lattice_from_cfi_SOURCES = ferris-lattice-from-cfi.cpp +ferris_lattice_from_cfi_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_lattice_from_cfi_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ @LIBGISTMIQ_LIBS@ +ferris_create_fca_scale_urls_SOURCES = ferris-create-fca-scale-urls.cpp +ferris_create_fca_scale_urls_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_urls_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ @SOPRANO_LIBS@ libferrisfcascaling.la +ferris_create_fca_scale_numeric_SOURCES = ferris-create-fca-scale-numeric.cpp +ferris_create_fca_scale_numeric_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_numeric_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la +ferris_create_fca_scale_numeric_ordinal_SOURCES = ferris-create-fca-scale-numeric-ordinal.cpp +ferris_create_fca_scale_numeric_ordinal_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_numeric_ordinal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la +ferris_create_fca_scale_splice_in_ffitler_SOURCES = ferris-create-fca-scale-splice-in-ffitler.cpp +ferris_create_fca_scale_splice_in_ffitler_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_splice_in_ffitler_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la +gf_create_fca_scale_numeric_SOURCES = gf-create-fca-scale-numeric.cpp +gf_create_fca_scale_numeric_CXXFLAGS = $(INCLUDES) @GTK_CFLAGS@ @GTKEXTRA2_CFLAGS@ +gf_create_fca_scale_numeric_LDADD = -lpopt @LIBFERRIS_LA@ @LIBFERRISUI_LA@ +gf_create_fca_scale_numeric_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ \ + @GTK_LIBS@ @GTKEXTRA2_LIBS@ libferrisfcascaling.la + +ferris_create_fca_scale_nominal_SOURCES = ferris-create-fca-scale-nominal.cpp +ferris_create_fca_scale_nominal_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_create_fca_scale_nominal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ libferrisfcascaling.la +ferris_export_concept_lattice_to_toscanaj_SOURCES = ferris-export-concept-lattice-to-toscanaj.cpp +ferris_export_concept_lattice_to_toscanaj_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_export_concept_lattice_to_toscanaj_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ +ferris_export_formal_context_to_burmeister_SOURCES = ferris-export-formal-context-to-burmeister.cpp +ferris_export_formal_context_to_burmeister_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_export_formal_context_to_burmeister_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @LIBPQXX_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fca/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fca/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libferrisfcascaling.la: $(libferrisfcascaling_la_OBJECTS) $(libferrisfcascaling_la_DEPENDENCIES) + $(CXXLINK) $(libferrisfcascaling_la_OBJECTS) $(libferrisfcascaling_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-create-fca-scale-nominal$(EXEEXT): $(ferris_create_fca_scale_nominal_OBJECTS) $(ferris_create_fca_scale_nominal_DEPENDENCIES) + @rm -f ferris-create-fca-scale-nominal$(EXEEXT) + $(ferris_create_fca_scale_nominal_LINK) $(ferris_create_fca_scale_nominal_OBJECTS) $(ferris_create_fca_scale_nominal_LDADD) $(LIBS) +ferris-create-fca-scale-numeric$(EXEEXT): $(ferris_create_fca_scale_numeric_OBJECTS) $(ferris_create_fca_scale_numeric_DEPENDENCIES) + @rm -f ferris-create-fca-scale-numeric$(EXEEXT) + $(ferris_create_fca_scale_numeric_LINK) $(ferris_create_fca_scale_numeric_OBJECTS) $(ferris_create_fca_scale_numeric_LDADD) $(LIBS) +ferris-create-fca-scale-numeric-ordinal$(EXEEXT): $(ferris_create_fca_scale_numeric_ordinal_OBJECTS) $(ferris_create_fca_scale_numeric_ordinal_DEPENDENCIES) + @rm -f ferris-create-fca-scale-numeric-ordinal$(EXEEXT) + $(ferris_create_fca_scale_numeric_ordinal_LINK) $(ferris_create_fca_scale_numeric_ordinal_OBJECTS) $(ferris_create_fca_scale_numeric_ordinal_LDADD) $(LIBS) +ferris-create-fca-scale-splice-in-ffitler$(EXEEXT): $(ferris_create_fca_scale_splice_in_ffitler_OBJECTS) $(ferris_create_fca_scale_splice_in_ffitler_DEPENDENCIES) + @rm -f ferris-create-fca-scale-splice-in-ffitler$(EXEEXT) + $(ferris_create_fca_scale_splice_in_ffitler_LINK) $(ferris_create_fca_scale_splice_in_ffitler_OBJECTS) $(ferris_create_fca_scale_splice_in_ffitler_LDADD) $(LIBS) +ferris-create-fca-scale-urls$(EXEEXT): $(ferris_create_fca_scale_urls_OBJECTS) $(ferris_create_fca_scale_urls_DEPENDENCIES) + @rm -f ferris-create-fca-scale-urls$(EXEEXT) + $(ferris_create_fca_scale_urls_LINK) $(ferris_create_fca_scale_urls_OBJECTS) $(ferris_create_fca_scale_urls_LDADD) $(LIBS) +ferris-create-fca-tree$(EXEEXT): $(ferris_create_fca_tree_OBJECTS) $(ferris_create_fca_tree_DEPENDENCIES) + @rm -f ferris-create-fca-tree$(EXEEXT) + $(ferris_create_fca_tree_LINK) $(ferris_create_fca_tree_OBJECTS) $(ferris_create_fca_tree_LDADD) $(LIBS) +ferris-export-concept-lattice-to-toscanaj$(EXEEXT): $(ferris_export_concept_lattice_to_toscanaj_OBJECTS) $(ferris_export_concept_lattice_to_toscanaj_DEPENDENCIES) + @rm -f ferris-export-concept-lattice-to-toscanaj$(EXEEXT) + $(ferris_export_concept_lattice_to_toscanaj_LINK) $(ferris_export_concept_lattice_to_toscanaj_OBJECTS) $(ferris_export_concept_lattice_to_toscanaj_LDADD) $(LIBS) +ferris-export-formal-context-to-burmeister$(EXEEXT): $(ferris_export_formal_context_to_burmeister_OBJECTS) $(ferris_export_formal_context_to_burmeister_DEPENDENCIES) + @rm -f ferris-export-formal-context-to-burmeister$(EXEEXT) + $(ferris_export_formal_context_to_burmeister_LINK) $(ferris_export_formal_context_to_burmeister_OBJECTS) $(ferris_export_formal_context_to_burmeister_LDADD) $(LIBS) +ferris-lattice-from-cfi$(EXEEXT): $(ferris_lattice_from_cfi_OBJECTS) $(ferris_lattice_from_cfi_DEPENDENCIES) + @rm -f ferris-lattice-from-cfi$(EXEEXT) + $(ferris_lattice_from_cfi_LINK) $(ferris_lattice_from_cfi_OBJECTS) $(ferris_lattice_from_cfi_LDADD) $(LIBS) +gf-create-fca-scale-numeric$(EXEEXT): $(gf_create_fca_scale_numeric_OBJECTS) $(gf_create_fca_scale_numeric_DEPENDENCIES) + @rm -f gf-create-fca-scale-numeric$(EXEEXT) + $(gf_create_fca_scale_numeric_LINK) $(gf_create_fca_scale_numeric_OBJECTS) $(gf_create_fca_scale_numeric_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-scale-nominal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-scale-numeric-ordinal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-scale-numeric.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-scale-splice-in-ffitler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-scale-urls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-create-fca-tree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-export-concept-lattice-to-toscanaj.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-export-formal-context-to-burmeister.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-lattice-from-cfi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libferrisfcascaling.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.o: gf-create-fca-scale-numeric.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gf_create_fca_scale_numeric_CXXFLAGS) $(CXXFLAGS) -MT gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.o -MD -MP -MF $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Tpo -c -o gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.o `test -f 'gf-create-fca-scale-numeric.cpp' || echo '$(srcdir)/'`gf-create-fca-scale-numeric.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Tpo $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gf-create-fca-scale-numeric.cpp' object='gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gf_create_fca_scale_numeric_CXXFLAGS) $(CXXFLAGS) -c -o gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.o `test -f 'gf-create-fca-scale-numeric.cpp' || echo '$(srcdir)/'`gf-create-fca-scale-numeric.cpp + +gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.obj: gf-create-fca-scale-numeric.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gf_create_fca_scale_numeric_CXXFLAGS) $(CXXFLAGS) -MT gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.obj -MD -MP -MF $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Tpo -c -o gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.obj `if test -f 'gf-create-fca-scale-numeric.cpp'; then $(CYGPATH_W) 'gf-create-fca-scale-numeric.cpp'; else $(CYGPATH_W) '$(srcdir)/gf-create-fca-scale-numeric.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Tpo $(DEPDIR)/gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gf-create-fca-scale-numeric.cpp' object='gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gf_create_fca_scale_numeric_CXXFLAGS) $(CXXFLAGS) -c -o gf_create_fca_scale_numeric-gf-create-fca-scale-numeric.obj `if test -f 'gf-create-fca-scale-numeric.cpp'; then $(CYGPATH_W) 'gf-create-fca-scale-numeric.cpp'; else $(CYGPATH_W) '$(srcdir)/gf-create-fca-scale-numeric.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fca/ferris-create-fca-scale-nominal.cpp b/apps/fca/ferris-create-fca-scale-nominal.cpp new file mode 100644 index 0000000..be22b5f --- /dev/null +++ b/apps/fca/ferris-create-fca-scale-nominal.cpp @@ -0,0 +1,532 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-scale-nominal.cpp,v 1.6 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + + +#include "libferrisfcascaling.hh" +#include +#include +#include + +const string PROGRAM_NAME = "ferris-create-fca-scale-nominal"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +string getBitFunctionName( const std::string& attributeName ) +{ + static string prefix = "ferris_bitf_"; + string ea = EANameToSQLColumnName( attributeName ); + return prefix + ea; +} + + +typedef map< string, pair< string, string > > values_t; + +void output( values_t& values ) +{ + cerr << "output() sz:" << values.size() << endl; + for( values_t::const_iterator vi = values.begin(); vi != values.end(); ++vi ) + { + string rdn = vi->first; + string ea = vi->second.first; + string v = vi->second.second; + + if( v.empty() ) + { + cout << cleanAttributeName(rdn) << ea << endl; + } + else + { +// cerr << " ea:" << ea << " v:" << v << endl; + cout << cleanAttributeName(rdn) << " '(" << ea << "==" << v << ")'" << endl; + } + } +} + +stringmap_t m_ExtraColumnsToInlineInDocmap; +stringlist_t bitflist; +static string hasValid = "has-valid"; +unsigned long EmblemDownSet = 0; +unsigned long DataDrivenEmblem = 0; +unsigned long isTimeEA = 0; +unsigned long EmblemIncludeMissing = 0; +unsigned long EmblemUseEIDs = 0; +unsigned long EmblemIncludeOrder = 0; +string ValueTableName = ""; +const char* ValueTableName_CSTR = 0; +const char* SplitChar_CSTR = 0; +fh_etagere et = 0; + +string getEmblemAttrName( fh_emblem attrem ) +{ + stringstream rdnss; + + if( attrem->getUniqueName() != attrem->getName() ) + { + emblems_t el = attrem->getParents(); + if( !el.empty() ) + { + emblems_t::iterator e = el.end(); + for( emblems_t::iterator ei = el.begin(); ei!=e; ++ei ) + { + rdnss << (*ei)->getName() << "-"; + } + rdnss << attrem->getName(); + } + else + rdnss << attrem->getUniqueName(); + } + else + { + rdnss << attrem->getUniqueName(); + } + + return rdnss.str(); +} + + +void makeEmblemAndDownSetFFilter( fh_emblem attrem, string& attrname, string& v ) +{ + stringstream ss; + + ss << " '(|(" << attrname << "==" << v << ")"; + + emblems_t el = attrem->getDownset(); + if( el.size() > 1 ) + { + emblems_t::iterator e = el.end(); + for( emblems_t::iterator ei = el.begin(); ei!=e; ++ei ) + { + if( *ei == attrem ) + continue; + + stringstream tmpss; + tmpss << "emblem:id-" << (*ei)->getID(); + ss << "(" << tmpss.str() << "==" << v << ")"; + } + ss << ")'"; + attrname = ss.str(); + v = ""; + } +} + + +void processAttribute( work& trans, values_t& values, string attrname, fh_emblem attrem = 0, fh_emblem baseEm = 0 ) +{ + if( isTimeEA ) + ValueTableName = "timelookup"; + + fh_stringstream selectss; + string selectAttrName = attrname; + string fromClause = " from docmap d "; + bool isBoolEA = false; + string attrCastClause = "::varchar "; + cerr << "m_ExtraColumnsToInlineInDocmap.size:" << m_ExtraColumnsToInlineInDocmap.size() << endl; + + bool isNormalized + = m_ExtraColumnsToInlineInDocmap.find( attrname ) == m_ExtraColumnsToInlineInDocmap.end(); + + stringlist_t::const_iterator isBitfColumnIter = find( bitflist.begin(), bitflist.end(), attrname ); + + string emblemColon = "emblem:"; + bool isEmblem = EmblemDownSet || starts_with( attrname, emblemColon ); + if( isEmblem ) + { + if( EmblemUseEIDs ) + { + stringstream ss; + ss << "emblem:id-" << attrem->getID(); + attrname = ss.str(); + } + } + if( isEmblem || isBitfColumnIter != bitflist.end() ) + { + stringstream ss; + ss << getBitFunctionName( attrname ) << "(d.bitf)"; + selectAttrName = ss.str(); + isBoolEA = true; + attrCastClause = " "; + } + else if( isNormalized ) + { + selectAttrName = "attrvalue"; + stringstream ss; +// ss << " from docattrs da, " +// << ValueTableName << " l, attrmap an " << endl +// << " where an.attrname = '" << attrname +// << "' and an.attrid = da.attrid and da.vid = l.vid "; + ss << " from docattrs da, " + << ValueTableName << " l " << endl + << " where da.attrid = " + << " (select max(attrid) from attrmap where attrname = '" << attrname << "') " + << " and da.vid = l.vid "; + + fromClause = ss.str(); + } + if( isTimeEA ) + { + stringstream ss; + ss << "EXTRACT(EPOCH FROM " << selectAttrName << " )"; + selectAttrName = ss.str(); + } + + if( !DataDrivenEmblem && isEmblem ) + { + { + stringstream rdnss; + rdnss << attrname.substr( emblemColon.length() ); + values.insert( make_pair( rdnss.str(), make_pair( attrname, "1" ) ) ); + } + if( EmblemIncludeMissing ) + { + stringstream rdnss; + rdnss << "missing" << attrname.substr( emblemColon.length() + strlen("has") ); + values.insert( make_pair( rdnss.str(), make_pair( attrname, "0" ) ) ); + } + return; + } + + selectss << "SELECT distinct(" << selectAttrName << ")" << attrCastClause + << fromClause << endl; + cerr << "SQL:" << endl + << tostr(selectss) << endl; + result res = trans.exec( tostr( selectss ) ); + + string SplitChar = SplitChar_CSTR ? SplitChar_CSTR : ""; + cerr << "result.size:" << res.size() << endl; + for (result::const_iterator c = res.begin(); c != res.end(); ++c) + { + string v; + stringstream rdnss; + + if( isBoolEA ) + { + bool bv; + c[0].to(bv); + v = tostr(bv); + if( bv ) + { + if( starts_with( attrname, hasValid ) ) + { + rdnss << attrname; + } + else if( isEmblem ) + { + rdnss << getEmblemAttrName( attrem ); + +// if( attrem->getUniqueName() != attrem->getName() ) +// { +// emblems_t el = attrem->getParents(); +// if( !el.empty() ) +// { +// emblems_t::iterator e = el.end(); +// for( emblems_t::iterator ei = el.begin(); ei!=e; ++ei ) +// { +// rdnss << (*ei)->getName() << "-"; +// } +// rdnss << attrem->getName(); +// } +// else +// rdnss << attrem->getUniqueName(); +// } +// else +// { +// rdnss << attrem->getUniqueName(); +// // rdnss << attrname.substr( emblemColon.length() ); +// } + + if( EmblemIncludeOrder ) + { + makeEmblemAndDownSetFFilter( attrem, attrname, v ); + +// stringstream ss; +// ss << " '(|(" << attrname << "==" << v << ")"; + +// emblems_t el = attrem->getDownset(); +// if( el.size() > 1 ) +// { +// emblems_t::iterator e = el.end(); +// for( emblems_t::iterator ei = el.begin(); ei!=e; ++ei ) +// { +// if( *ei == attrem ) +// continue; + +// stringstream tmpss; +// tmpss << "emblem:id-" << (*ei)->getID(); +// ss << "(" << tmpss.str() << "==" << v << ")"; +// } +// ss << ")'"; +// attrname = ss.str(); +// v = ""; +// } + } + } + else + { + rdnss << attrname << "_" << v; + } + } + else + { + if( starts_with( attrname, hasValid ) ) + { + rdnss << "no" << attrname.substr( hasValid.length() ); + } + else if( isEmblem ) + { + if( EmblemIncludeMissing ) + { + rdnss << "missing" << attrname.substr( emblemColon.length() + strlen("has") ); + } + if( EmblemIncludeOrder ) + { + string tattrname = attrname; + string tv = v; + makeEmblemAndDownSetFFilter( attrem, tattrname, tv ); + values.insert( make_pair( getEmblemAttrName( attrem ), make_pair( tattrname, tv ) ) ); + } + } + else + { + rdnss << attrname << "_" << v; + } + } + } + else + { + c[0].to(v); + if( v.empty() ) + continue; + rdnss << attrname << "_"; + if( isTimeEA ) + rdnss << formalTimeValueForFormalAttribute( v ); + else + rdnss << EANameToSQLColumnName(v); + } + + if( !rdnss.str().empty() ) + { + values.insert( make_pair( rdnss.str(), make_pair( attrname, v ) ) ); + } + + + + if( SplitChar_CSTR ) + { + stringlist_t sl; + Util::parseSeperatedList( v, sl, SplitChar[0] ); + + if( !sl.empty() ) + { + stringlist_t::const_iterator end = sl.end(); + --end; + + for( stringlist_t::const_iterator si = sl.begin(); si!=end; ++si ) + { + string v = *si; + cerr << "pfx v:" << v << endl; + stringstream rdnss; + rdnss << attrname << "_" << v; + values.insert( make_pair( rdnss.str(), make_pair( attrname, v ) ) ); + } + } + } + + } +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long Verbose = 0; + const char* findexPath_CSTR = 0; + const char* UseETagereAtPath = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "emblem-down-set", 'E', POPT_ARG_NONE, &EmblemDownSet, 0, + "create an attribute for each emblem in the downset of the given emblem", "" }, + + { "emblem-include-missing", '0', POPT_ARG_NONE, &EmblemIncludeMissing, 0, + "create an attribute for each emblem for ==0 case as well", "0" }, + + { "emblem-use-ids", 'i', POPT_ARG_NONE, &EmblemUseEIDs, 0, + "output ffilters using emblem IDs instead of names", "0" }, + + { "emblem-include-order", 'O', POPT_ARG_NONE, &EmblemIncludeOrder, 0, + "include emblem partial order information into ffilters", "0" }, + + { "data-driven-emblem-ffilters", 0, POPT_ARG_NONE, &DataDrivenEmblem, 0, + "do not create an attribute for a emblem scenario which is not in the index", "" }, + + { "value-table", 'L', POPT_ARG_STRING, &ValueTableName_CSTR, 0, + "tablename containing values", "guessed from attribute name" }, + + { "is-time-attribute", 'T', POPT_ARG_NONE, &isTimeEA, 0, + "handle attribute as a time_t", "" }, + + { "split-char", '1', POPT_ARG_STRING, &SplitChar_CSTR, 0, + "split the values of the scale with this char and create a virtual hierarchy", "" }, + + { "use-etagere", 0, POPT_ARG_STRING, &UseETagereAtPath, 0, + "use etagere at specified location instead of default", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] attrname"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + + stringstream conSS; + conSS << " host=" << host; + conSS << " dbname=" << dbname; + connection con( conSS.str() ); + work trans( con, "getting the schema..." ); + + const char* CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K + = CFG_EAIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K; + + m_ExtraColumnsToInlineInDocmap = + Util::ParseKeyValueString( + idx->getConfig( CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K, + CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT ) + ); + + string bitfColumnsRAW = idx->getConfig( + CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_CREATE_K, + CFG_POSTGRESQLIDX_COLUMNS_TO_INLINE_IN_BITF_DEFAULT ); + Util::parseCommaSeperatedList( bitfColumnsRAW, bitflist ); + + values_t values; + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + string attrname = RootNameCSTR; + if( ValueTableName_CSTR ) + ValueTableName = ValueTableName_CSTR; + else + ValueTableName = guessLookupTableName( trans, attrname ); + cerr << "ValueTableName:" << ValueTableName << endl; + + et = Ferris::Factory::getEtagere(); + if( UseETagereAtPath ) + { + et = Ferris::Factory::makeEtagere( UseETagereAtPath ); + Ferris::Factory::setDefaultEtagere( et ); + } + + string emblemColon = "emblem:"; + bool isEmblem = EmblemDownSet || starts_with( attrname, emblemColon ); + fh_emblem attrem = 0; + if( isEmblem ) + { + if( !attrem ) + { + string emblemHasPFX = "emblem:has-"; + string emblemName = attrname; + if( starts_with( attrname, emblemHasPFX ) ) + emblemName = attrname.substr( emblemHasPFX.length() ); + + attrem = et->getEmblemByName( emblemName ); + } +// cerr << "attrem:" << attrem << endl; +// cerr << "attrem.name:" << attrem->getName() << endl; +// cerr << "attrem.id:" << (long long)attrem->getID() << endl; + } + + processAttribute( trans, values, attrname, attrem, attrem ); + + if( EmblemDownSet ) + { + string emblemHasPFX = "emblem:has-"; + string emblemName = attrname; + if( starts_with( attrname, emblemHasPFX ) ) + emblemName = attrname.substr( emblemHasPFX.length() ); + if( starts_with( attrname, "emblem:id-" ) ) + emblemName = attrname.substr( strlen("emblem:id-") ); + cerr << "emblemName:" << emblemName << endl; + + fh_emblem em = et->getEmblemByName( emblemName ); + emblems_t el = em->getDownset(); + for( emblems_t::const_iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + stringstream ss; + ss << emblemHasPFX << (*ei)->getName(); + processAttribute( trans, values, ss.str(), *ei, attrem ); + } + } + } + output( values ); + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fca/ferris-create-fca-scale-numeric-ordinal.cpp b/apps/fca/ferris-create-fca-scale-numeric-ordinal.cpp new file mode 100644 index 0000000..3a0cf23 --- /dev/null +++ b/apps/fca/ferris-create-fca-scale-numeric-ordinal.cpp @@ -0,0 +1,129 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-scale-numeric-ordinal.cpp,v 1.3 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + + +#include "libferrisfcascaling.hh" + +const string PROGRAM_NAME = "ferris-create-fca-scale-numeric-ordinal"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long Verbose = 0; + unsigned long ReverseOrder = 0; + unsigned long KeepBothEnds = 0; + const char* findexPath_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "reverse", 'r', POPT_ARG_NONE, &ReverseOrder, 0, + "reverse the sorting order", "" }, + + { "keep-ends", 'K', POPT_ARG_NONE, &KeepBothEnds, 0, + "retain both ends of the scale", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + + stringmap_t ffilterStrings; + readAttributes( ffilterStrings, optCon ); + + string oldcomp = "<="; + string newcomp = ">="; + if( ReverseOrder ) + { + swap( oldcomp, newcomp ); + } + + + int i = 0; + int sz = ffilterStrings.size(); + for( stringmap_t::const_iterator ci = ffilterStrings.begin(); + ci != ffilterStrings.end(); ++ci, ++i ) + { + if( KeepBothEnds || i ) + cout << ci->first << " '" << ci->second << "'" << endl; + + if( KeepBothEnds || i < (sz-1) ) + cout << ci->first << "_rev " + << "'" << Util::replace_all( ci->second, oldcomp, newcomp ) << "'" << endl; + } + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + + diff --git a/apps/fca/ferris-create-fca-scale-numeric.cpp b/apps/fca/ferris-create-fca-scale-numeric.cpp new file mode 100644 index 0000000..c431246 --- /dev/null +++ b/apps/fca/ferris-create-fca-scale-numeric.cpp @@ -0,0 +1,446 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-scale-numeric.cpp,v 1.8 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + + +#include "libferrisfcascaling.hh" +#include +#include + +const string PROGRAM_NAME = "ferris-create-fca-scale-numeric"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long isTimeEA = 0; +unsigned long ExcludeZero = 0; +unsigned long ReverseOrder = 0; +string ffilterReverseComparitor = ">"; +string ffilterComparitor = "<="; + +typedef map< string, double, versionltstr > values_t; + +unsigned long IncludeMinValue = 0; + +template < class v_iterator_t > +values_t& +performDataDrivenOrdinalScale( + values_t& v, + v_iterator_t vbegin, + v_iterator_t vend, + int v_size, + int TargetNumberOfAttrs ) +{ + int advancement = (v_size-1) / TargetNumberOfAttrs; + v_iterator_t vi = vbegin; + if( !IncludeMinValue ) + advance( vi, advancement ); + + for( int i=!IncludeMinValue; ifirst ] = vi->second; + advance( vi, advancement ); + } + vi = vend; + --vi; + v[ vi->first ] = vi->second; + return v; +} + +template < class v_iterator_t > +values_t& +performOrdinalScale( + values_t& v, + v_iterator_t vbegin, + v_iterator_t vend, + int v_size, + int TargetNumberOfAttrs, + bool isDataDriven, + const std::string attrname + ) +{ + if( !TargetNumberOfAttrs ) + { + copy( vbegin, vend, inserter( v, v.end() )); + return v; + } + + if( isDataDriven ) + return performDataDrivenOrdinalScale( v, vbegin, vend, v_size, TargetNumberOfAttrs ); + + float min = vbegin->second; + v_iterator_t last = vend; + --last; + float max = last->second; + + int value_incr = (int)((MAX(max,min)-MIN(max,min))/TargetNumberOfAttrs); + if( min > max ) + value_incr *= -1; + int value = (int)(min); + if( !IncludeMinValue ) + value += value_incr; + + cerr << "start total size:" << distance( vbegin, vend ) << " min:" << fixed << min << " max:" << fixed << max << endl; + cerr << " mintt:" << Time::toTimeString( (time_t)min, "%Y %b %e %H:%M" ) << endl; + cerr << " maxtt:" << Time::toTimeString( (time_t)max, "%Y %b %e %H:%M" ) << endl; + cerr << " value_incr:" << value_incr << endl; + + for( int i=!IncludeMinValue; ifirst; + double value = vi->second; + + if( isTimeEA ) + { +// cout << " " << attrname << "_" << formalTimeValueForFormalAttribute(s) << " " << "'"; + cout << " " << formalTimeValueForFormalAttribute(s) << " " << "'"; + } + else + { + cout << " " << s << " " << "'"; + } + + + if( !idx && ExcludeZero && ReverseOrder ) + { + value++; + } + + if( !ReverseOrder && ExcludeZero ) + { + cout << "(&(" << attrname << ffilterReverseComparitor << 0 << ")"; + } + + cout << "(" << attrname << ffilterComparitor << (int)value << ")"; + + if( !ReverseOrder && ExcludeZero ) + { + cout << ")"; + } + + + + cout << "' " << endl; + } +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long Verbose = 0; + unsigned long MakeDataDrivenScale = 0; + unsigned long TargetNumberOfAttrs = 10; + unsigned long StdDeviations = 0; + double StdDeviationsIncr = 0.5; + const char* findexPath_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "exclude-zero", 'z', POPT_ARG_NONE, &ExcludeZero, 0, + "explicitly exclude zero from output ffilters", "" }, + + { "data-driven-scale", 'd', POPT_ARG_NONE, &MakeDataDrivenScale, 0, + "derive the scale biased on the data given in the index", "" }, + + { "target-number-of-attributes", 'g', POPT_ARG_INT, &TargetNumberOfAttrs, 10, + "desired number of formal attributes to create", "" }, + + { "reverse", 'r', POPT_ARG_NONE, &ReverseOrder, 0, + "reverse the sorting order", "" }, + + { "std-deviations", 'S', POPT_ARG_INT, &StdDeviations, 0, + "create a scale for the given number of std deviations from mean", "" }, + + { "std-deviations-increment", 0, POPT_ARG_DOUBLE, &StdDeviationsIncr, 0.5, + "generate a new attribute every x fraction of a standard deviation", "" }, + + { "include-min-value", 'M', POPT_ARG_NONE, &IncludeMinValue, 0, + "include min value aswell, eg. <=0. Use with ferris-create-fca-scale-numeric-ordinal", "" }, + + { "is-time-attribute", 'T', POPT_ARG_NONE, &isTimeEA, 0, + "handle attribute as a time_t", "" }, + + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + if( ReverseOrder ) + { + ffilterComparitor = ">="; + ffilterReverseComparitor = "<"; + } + + + stringstream conSS; + conSS << " host=" << host; + conSS << " dbname=" << dbname; + connection con( conSS.str() ); + work trans( con, "getting the schema..." ); + + const char* CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K + = CFG_EAIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K; + + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + string attrname = RootNameCSTR; + string ValueTableName = guessLookupTableName( trans, attrname ); + fh_stringstream selectss; + string selectAttrName = attrname; + string fromClause = " from docmap "; + + stringmap_t m_ExtraColumnsToInlineInDocmap; + m_ExtraColumnsToInlineInDocmap = + Util::ParseKeyValueString( + idx->getConfig( CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K, + CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT ) + ); + cerr << "m_ExtraColumnsToInlineInDocmap.size:" << m_ExtraColumnsToInlineInDocmap.size() << endl; + + bool isNormalized + = m_ExtraColumnsToInlineInDocmap.find( attrname ) == m_ExtraColumnsToInlineInDocmap.end(); + + if( isNormalized ) + { + selectAttrName = "attrvalue"; + stringstream ss; +// ss << " from docattrs da, " +// << ValueTableName << " l, attrmap an " << endl +// << " where an.attrname = '" << attrname +// << "' and an.attrid = da.attrid and da.vid = l.vid "; + ss << " from docattrs da, " + << ValueTableName << " l " << endl + << " where da.attrid = " + << " (select max(attrid) from attrmap where attrname = '" << attrname << "') " + << " and da.vid = l.vid "; + + fromClause = ss.str(); + } + + + + if( StdDeviations ) + { + selectss << "SELECT " + << " avg(" << selectAttrName << ") as avg," + << " stddev(" << selectAttrName << ") as stddev," + << " min(" << selectAttrName << ") as mi," + << " max(" << selectAttrName << ") as mx " + << fromClause << endl; + cerr << "SQL:" << tostr(selectss) << endl; + result res = trans.exec( tostr( selectss ) ); + double mean = 0; + double stddev = 0; + double min = 0; + double max = 0; + + for (result::const_iterator c = res.begin(); c != res.end(); ++c) + { + c[0].to(mean); + c[1].to(stddev); + c[2].to(min); + c[3].to(max); + } + cerr << "mean:" << mean << " stddev:" << stddev << " min:" << min << " max:" << max << endl; + + bool haveOverflowedMax = 0; + values_t values; + values[ attrname + "_mean" ] = mean; + for( double i = StdDeviationsIncr; i <= StdDeviations; i+=StdDeviationsIncr ) + { + stringstream pattrss; + stringstream nattrss; + pattrss << attrname << "_p" << i; + nattrss << attrname << "_n" << i; + int p = ((int)(mean + i*stddev)); + int n = ((int)(mean - i*stddev)); + + if( !haveOverflowedMax ) + { + if( max && p > max ) + { + haveOverflowedMax = 1; + p = (int)max; + } + + values[ pattrss.str() ] = p; + } + + if( min && p > min ) + values[ nattrss.str() ] = n; + } + output( values, attrname, ffilterComparitor ); + + continue; + } + + if( isTimeEA ) + { + stringstream ss; + ss << "EXTRACT(EPOCH FROM " << selectAttrName << " )"; + selectAttrName = ss.str(); + } + + selectss << "SELECT distinct(" << selectAttrName << ") " + << fromClause << endl; + cerr << "SQL: " << tostr(selectss) << endl; + result res = trans.exec( tostr( selectss ) ); + values_t values; + cerr << "res.sz: " << res.size() << endl; + + for (result::const_iterator c = res.begin(); c != res.end(); ++c) + { + stringstream rdnss; + if( isTimeEA ) + { + time_t tt = 0; + c[0].to(tt); + rdnss << attrname << "_" << formalTimeValueForFormalAttribute( tostr( tt ) ); + cerr << "rdn:" << tostr(rdnss) << endl; + values.insert( make_pair( rdnss.str(), tt ) ); + } + else + { + double v = 0; + c[0].to(v); + rdnss << attrname << "_" << v; + values.insert( make_pair( rdnss.str(), v ) ); + } + + } + + cerr << "values.sz:" << values.size() << endl; + + + if( !values.empty() ) + { + values_t newValues; + // ordinal scale. + if( ReverseOrder ) + performOrdinalScale( newValues, + values.rbegin(), values.rend(), values.size(), + TargetNumberOfAttrs, MakeDataDrivenScale, attrname ); + else + performOrdinalScale( newValues, + values.begin(), values.end(), values.size(), + TargetNumberOfAttrs, MakeDataDrivenScale, attrname ); + output( newValues, attrname, ffilterComparitor ); + } + } + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fca/ferris-create-fca-scale-splice-in-ffitler.cpp b/apps/fca/ferris-create-fca-scale-splice-in-ffitler.cpp new file mode 100644 index 0000000..a7e046e --- /dev/null +++ b/apps/fca/ferris-create-fca-scale-splice-in-ffitler.cpp @@ -0,0 +1,144 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-scale-splice-in-ffitler.cpp,v 1.3 2010/09/24 21:31:09 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + + +#include "libferrisfcascaling.hh" + +const string PROGRAM_NAME = "ferris-create-fca-scale-splice-in-ffitler"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long Verbose = 0; + unsigned long Clone = 0; + const char* splice_opcode_CSTR = "&"; + const char* splice_ffilter_CSTR = 0; + const char* splice_attrname_postfix_CSTR = 0; + const char* findexPath_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "clone", 'a', POPT_ARG_NONE, &Clone, 0, + "output the input data aswell as the new attributes", "" }, + + { "opcode", 'e', POPT_ARG_STRING, &splice_opcode_CSTR, 0, + "opcode to use to join new ffitler with existing ffilters", "&" }, + + { "ffilter", 'f', POPT_ARG_STRING, &splice_ffilter_CSTR, 0, + "new ffitler to splice in", "" }, + + { "attr-postfix", 'o', POPT_ARG_STRING, &splice_attrname_postfix_CSTR, 0, + "postfix to add to the new attribute name", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if( Clone && !splice_attrname_postfix_CSTR ) + { + splice_attrname_postfix_CSTR = "_new"; + } + if( !splice_attrname_postfix_CSTR ) + splice_attrname_postfix_CSTR = ""; + + string splice_opcode = splice_opcode_CSTR; + if( !splice_ffilter_CSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + string splice_ffilter = splice_ffilter_CSTR; + string splice_attrname_postfix = splice_attrname_postfix_CSTR; + +// EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); +// string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); +// string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + + stringmap_t ffilterStrings; + readAttributes( ffilterStrings, optCon ); + + + int i = 0; + for( stringmap_t::const_iterator ci = ffilterStrings.begin(); + ci != ffilterStrings.end(); ++ci, ++i ) + { + if( Clone ) + cout << ci->first << " '(" << ci->second << ")'" << endl; + + cout << ci->first << splice_attrname_postfix << " '(" << splice_opcode << splice_ffilter + << ci->second << ")'" << endl; + } + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + + diff --git a/apps/fca/ferris-create-fca-scale-urls.cpp b/apps/fca/ferris-create-fca-scale-urls.cpp new file mode 100644 index 0000000..57fb420 --- /dev/null +++ b/apps/fca/ferris-create-fca-scale-urls.cpp @@ -0,0 +1,367 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-scale-urls.cpp,v 1.8 2010/09/24 21:31:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include "libferrisfcascaling.hh" + +#include +#include + +using namespace Ferris::RDFCore; +using namespace Ferris::Semantic::Wordnet; +using namespace Ferris::Semantic; + +const string PROGRAM_NAME = "ferris-create-fca-scale-urls"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +typedef map< string, stringmap_t::const_iterator > matches_t; +typedef map< string, matches_t > hyponyms_t; + +fh_node hasWord = Node::CreateURI( RDFSCHEMA + "hasWord" ); +fh_node NounSynSet = Node::CreateURI( RDFSCHEMA + "NounSynSet" ); +fh_node Type = Node::CreateURI( "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" ); +fh_node hasGloss = Node::CreateURI( RDFSCHEMA + "hasGloss" ); +fh_node partMeronymOf = Node::CreateURI( RDFSCHEMA + "partMeronymOf" ); + +void getHyponyms( fh_model m, hyponyms_t& h, stringmap_t::const_iterator dni ) +{ + string word = dni->first; + + nodelist_t synlist; + getSynSet( m, synlist, word ); + NodeIterator end = NodeIterator(); + + for( nodelist_t::const_iterator syniter = synlist.begin(); syniter != synlist.end(); ++syniter ) + { + fh_node synset = *syniter; + + // hypern + { + NodeIterator hiter = m->findObjects( synset, hyponymOf() ); + for( ; hiter != end; ++hiter ) + { + fh_node hs = *hiter; + + h[ hs->getURI()->toString() ].insert( make_pair( word, dni ) ); + +// for( NodeIterator i = m->findSubjects( hasSynSet(), hs ); i != end; ++i ) +// { +// fh_node syn = *i; +// string w = getWordNodeAsString( syn ); +// h[ syn->getURI()->toString() ].insert( make_pair( word, dni ) ); +// } + } + } + } + + +// NodeIterator end = NodeIterator(); +// NodeIterator oiter = m->findSubjects( wordForm, wordNode ); +// for( ; oiter != end; ++oiter ) +// { +// fh_node subject = *oiter; +// // cerr << "have subject:" << subject->toString() << endl; + +// fh_node wordtype = m->getObject( subject, wordType ); +// // cerr << "have word type:" << wordtype->toString() << endl; +// if( wordtype == noun ) +// { +// NodeIterator hypiter = m->findObjects( subject, hyponymOf() ); +// for( ; hypiter != end; ++hypiter ) +// { +// fh_node hyp = *hypiter; +// // cerr << " hyp:" << hyp->toString() << endl; +// // h[ word ].push_back( hyp->toString() ); +// fh_uri uri = hyp->getURI(); +// h[ uri->toString() ].insert( make_pair( word, dni ) ); +// } +// } +// } +} + +string getAttributeName( fh_model m, const std::string& hypuri ) +{ + NodeIterator end = NodeIterator(); + stringstream retss; + +// [http://www.dcc.uchile.cl/~agraves/wordnet/1.0/schema#hasSynSet], [http://www.dcc.uchile.cl/~agraves/wordnet/1.0/synsets#102073042]} + + bool v = true; + fh_node hs = Node::CreateURI( hypuri ); + for( NodeIterator i = m->findSubjects( hasSynSet(), hs ); i != end; ++i ) + { + fh_node node = *i; + if( v ) v = false; + else retss << "-"; + retss << cleanAttributeName( getWordNodeAsString( node ) ); + } + + cerr << "getAttributeName() hyp:" << hypuri << endl + << " ret:" << tostr(retss) << endl; + + +// fh_node subj = Node::CreateURI( hypuri ); +// NodeIterator end = NodeIterator(); +// NodeIterator iter = m->findObjects( subj, wordForm ); +// bool v = true; +// for( ; iter != end; ++iter ) +// { +// fh_node obj = *iter; +// if( v ) v = false; +// else retss << "-"; + +// retss << cleanAttributeName(obj->toString()); +// } + +// cerr << "getAttributeName() hypuri:" << hypuri +// << " ret:" << retss.str() +// << endl; + + return retss.str(); +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long Verbose = 0; + unsigned long PathComponentsToStripFromEnd = 1; + unsigned long MinMatchLength = 2; + unsigned long UseWordnet = 0; + unsigned long RemoveVersionedDirectories = 0; + const char* findexPath_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + { "path-components-to-strip-from-end", 'E', + POPT_ARG_INT, &PathComponentsToStripFromEnd, 0, + "remove this amount of path components from the end of each url", "1" }, + + { "min-match-length", 'm', + POPT_ARG_INT, &MinMatchLength, 0, + "min number of chars in URL match to make formal attribute", "2" }, + + { "use-wordnet", 'W', + POPT_ARG_NONE, &UseWordnet, 0, + "Use wordnet to structure directory names", "(off)" }, + + { "remove-versioned-directories", 'V', + POPT_ARG_NONE, &RemoveVersionedDirectories, 0, + "remove directories which contain explicit version numbers at the end", "(off)" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + + stringstream conSS; + conSS << " host=" << host; + conSS << " dbname=" << dbname; + connection con( conSS.str() ); + work trans( con, "getting the schema..." ); + + result res = trans.exec( "select * from urlmap" ); + + stringmap_t dirNames; + for (result::const_iterator c = res.begin(); c != res.end(); ++c) + { + string url = ""; + c[0].to(url); + string s; + stringstream urlss; + + for( int i=0; ifirst; + string ffilter = dni->second; + bool skip = false; + + if( RemoveVersionedDirectories && regex_match(s,r,boost::match_any) ) + { + stringmap_t::iterator t = dni; + ++dni; + dirNames.erase( t ); + continue; + } + for( stringset_t::const_iterator si = stopEndings.begin(); + si != stopEndings.end(); ++si ) + { + string ending = *si; + + if( ends_with( s, ending ) ) + { + stringmap_t::iterator t = dni; + ++dni; + dirNames.erase( t ); + skip = true; + break; + } + } + if( skip ) + continue; + + ++dni; + } + } + + + + + if( UseWordnet ) + { + hyponyms_t hyponyms; + + fh_model m = Wordnet::getWordnetModel(); + stringmap_t::const_iterator dne = dirNames.end(); + for( stringmap_t::const_iterator dni = dirNames.begin(); dni != dne; ) + { + string s = dni->first; + string ffilter = dni->second; + +// cerr << "Getting HYP for s:" << s << endl; + getHyponyms( m, hyponyms, dni ); + ++dni; + } + + string wn_attr_prefix = "wn_"; + for( hyponyms_t::const_iterator hi = hyponyms.begin(); hi!=hyponyms.end(); ++hi ) + { + const string& hypuri = hi->first; + const matches_t& matches = hi->second; + + if( matches.size() > 1 ) + { + string attr = getAttributeName( m, hypuri ); + + fh_stringstream ffilterss; + ffilterss << "'(|"; +// cerr << "sz:" << matches.size() << " hyp:" << hypuri << endl; + for( matches_t::const_iterator mi = matches.begin(); mi!=matches.end(); ++mi ) + { + string dirName = mi->first; +// cerr << " matches:" << dirName << endl; + const std::string& ffilter = mi->second->second; + ffilterss << "(url=~\\/" << ffilter << "\\/)"; + } + ffilterss << ")'"; +// cerr << "ADDING... attr:" << attr +// << " ffilter:" << tostr(ffilterss) +// << endl; + dirNames.insert( make_pair( wn_attr_prefix + attr, tostr(ffilterss) )); + } + } + } + +// copy( dirNames.begin(), dirNames.end(), ostream_iterator( cerr,"\n") ); + stringmap_t::const_iterator dne = dirNames.end(); + for( stringmap_t::const_iterator dni = dirNames.begin(); + dni != dne; ++dni ) + { + string s = dni->first; + string ffilter = dni->second; + if( !starts_with( ffilter, "'(|" )) + cout << " " << s << " '(url=~\\/" << ffilter << "\\/)' " << endl; + else + cout << " " << s << " " << ffilter << endl; + } + + + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fca/ferris-create-fca-tree.cpp b/apps/fca/ferris-create-fca-tree.cpp new file mode 100644 index 0000000..e7d36b1 --- /dev/null +++ b/apps/fca/ferris-create-fca-tree.cpp @@ -0,0 +1,1098 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a new FCA tree command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-create-fca-tree.cpp,v 1.11 2010/09/24 21:31:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include "libferrisfcascaling.hh" + +#include +#include +#include +#include + + +using namespace Ferris::FCA; + + +const string PROGRAM_NAME = "ferris-create-fca-tree"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +class Titanic +{ + int m_BifFieldSize; + + typedef std::list< std::string > PGOutputTableDataColumnsList_t; + PGOutputTableDataColumnsList_t PGOutputTableDataColumnsList; + + typedef list< string > colNames_t; + colNames_t colNames; + colNames_t colNamesBitf; + bool colNamesBitfSetup; + colNames_t* SplitColNames; + + int m_transactionCount; + +public: + + Titanic() + : + m_BifFieldSize( 0 ), + colNamesBitfSetup( false ) + { + SplitColNames = &colNames; + } + + typedef FerrisBitMagic::bvector<> itemset_t; + typedef list< itemset_t > itemsetList_t; + + void weight( itemsetList_t& l ) + { + } + + + void perform() + { + string PGQuery = "select bitf FROM wn1 d"; + connection* db_connection = 0; + + + + { + stringstream ss; + string user = ""; + string port = ""; + string PGServer = "localhost"; + string PGDatabase = "findexpriv"; + + if( !user.empty() ) + ss << " user=" << user; + if( !PGServer.empty() ) + ss << " host=" << PGServer; + if( !port.empty() ) + ss << " port=" << port; + if( !PGDatabase.empty() ) + ss << " dbname=" << PGDatabase; + + string constring = ss.str(); + db_connection = new connection( constring ); + } + + work trans( *db_connection, "getting the data..." ); + + result res = trans.exec( PGQuery ); + + if( res.empty() ) + { + cerr << "SQL Query generates no tuples" << endl; + exit(1); + } + + // if we are making an output table then we need + // to know the input column names for the output table + { + string InputBitVaryingColumnName = "bitf"; + + m_BifFieldSize = 1; + result::const_iterator c = res.begin(); + if( c != res.end() ) + { + result::tuple::const_iterator e = c->end(); + for( result::tuple::const_iterator cur = c->begin(); + cur != e; ++cur ) + { + string name = cur->name(); + + if( InputBitVaryingColumnName == name ) + { + string t; + cur->to(t); + m_BifFieldSize = t.length(); + } + + PGOutputTableDataColumnsList.push_back( name ); + colNames.push_back( name ); + } + } + } + + + for( colNames_t::const_iterator cni = colNames.begin(); + cni != colNames.end(); ++cni ) + { + fprintf(stderr,"cni:%s\n", cni->c_str() ); + } + + m_transactionCount = 0; + for( result::const_iterator res_iter = res.begin(); res_iter != res.end(); ++res_iter ) + { + + ++m_transactionCount; + } + + cerr << "m_transactionCount:" << m_transactionCount << endl; + } +}; + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +static string makeNonNormalizedLiftString( const std::string& rdn ) +{ + stringstream ss; + ss << " ,d." << rdn << " as \"" << rdn << "\" " << nl; + return ss.str(); +} + +static string DQuoteStr( work& trans, const std::string& s ) +{ + stringstream ss; + ss << "\"" << trans.esc( s ) << "\""; + return tostr(ss); +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + +// Titanic t; +// t.perform(); +// cerr << "EXITING AFTER TITANIC!" << endl; +// exit(0); + + + + try + { + unsigned long Verbose = 0; + unsigned long dontCreateCFI = 0; + unsigned long dontCreateParentChild = 0; + unsigned long dontDenormalizeEAIntoBaseTable = 0; + const char* host_CSTR = 0; + const char* dbname_CSTR = 0; + const char* findexPath_CSTR = 0; + const char* newTreeName = 0; + const char* newTreeCFIPostfix = "_cfi"; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + +// { "host", 'h', POPT_ARG_STRING, &host_CSTR, 0, +// "host running postgresql server", "localhost" }, + +// { "dbname", 'd', POPT_ARG_STRING, &dbname_CSTR, 0, +// "database to connect to", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + { "treename", 'n', POPT_ARG_STRING, &newTreeName, 0, + "name of the new fca-tree", "" }, + + { "skip-cfi", 'C', POPT_ARG_NONE, &dontCreateCFI, 0, + "don't calculate the CFI at this time.", "" }, + + { "skip-parent-child", 'c', POPT_ARG_NONE, &dontCreateParentChild, 0, + "don't calculate the parent/child relation for the CFI at this time.", "" }, + + { "dont-denormalize-ea-into-basetable", '1', POPT_ARG_NONE, + &dontDenormalizeEAIntoBaseTable, 0, + "don't denormalize all the EA in all ffilters into basetable.", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* attr1_name 'attr1_ffilter' attr2_name 'attr2_ffilter' ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if( !newTreeName ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + + string host = "localhost"; + if( host_CSTR ) + host = host_CSTR; + else + host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + + string dbname = ""; + if( dbname_CSTR ) + dbname = dbname_CSTR; + else + { + try { + dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF, true ); + } + catch( exception& e ) + { + cerr << "Can't find out database name. e:" << e.what() << endl; + exit(1); + } + } + + + + // read in the name ffilter pairs + stringmap_t ffilterStrings; + readAttributes( ffilterStrings, optCon, newTreeName ); + + + if( ffilterStrings.empty() ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + string newTreeCFIName = newTreeName; + newTreeCFIName += newTreeCFIPostfix; + string newTreeAttrNamesTable = newTreeName; + newTreeAttrNamesTable += "_attrnames"; + + fh_context dotferris = Resolve( "~/.ferris" ); + fh_context viewc = 0; + fh_context ffilterc = 0; + { + stringstream ss; + ss << "~/.ferris/fcatree/" + << host << "/" + << dbname << "/" + << newTreeName; + viewc = Shell::acquireContext( ss.str() ); + ss << "/ffilters"; + ffilterc = Shell::acquireContext( ss.str() ); + } + + // save our command line to a file for full exposure + { + stringstream ss; + for( int i=0; ifirst; + string ffilter = si->second; + fh_context c = Shell::acquireSubContext( ffilterc, rdn ); + setStrAttr( c, "content", ffilter ); + + formalContextColumns.push_back( rdn ); + } + + // + // binary columns names + // + { + fh_context c = Shell::acquireSubContext( viewc, "formal-context-columns" ); + setStrAttr( c, "content", Util::createSeperatedList( formalContextColumns ) ); + } + + + // + // work out what the SQL view will look like. + // + typedef map< string, int > BitFieldShifts_t; + BitFieldShifts_t BitFieldShifts; + stringlist_t sqlfuncs; + stringstream SQLHeaderSS; + stringstream SQLTailerINTO_SS; + stringstream SQLTailerFROM_SS; + stringstream SQLTailerWHERE_SS; + stringstream SQLWhereSS; + + stringset_t alreadySelectedAttributes; + alreadySelectedAttributes.insert( "url" ); + alreadySelectedAttributes.insert( "urlid" ); + alreadySelectedAttributes.insert( "docid" ); + + int BitFieldSize = ffilterStrings.size() + 2; + setFile( viewc, "bit-field-size", tostr(BitFieldSize) ); + +// SQLHeaderSS << "create or replace view " << newTreeName << " as "; + SQLHeaderSS << " SELECT " << nl +// << " u.url as url " << nl +// << " ,d.width as width " << nl +// << " ,d.height as height " << nl + << " d.urlid as urlid " << nl + << " ,d.docid as docid " << nl + << " ,B'0'::bit(" << BitFieldSize << ") " << nl + << nl; + SQLTailerINTO_SS << " INTO TABLE " << newTreeName << nl; + SQLTailerFROM_SS << " FROM (SELECT d.* " << nl + << " FROM docmap d, " << nl + << " ( select max(docidtime) as ddtime, urlid " << nl + << " from docmap " << nl + << " group by urlid " << nl + << " ) dd " << nl + << " WHERE d.urlid=dd.urlid " << nl + << " AND d.docidtime=dd.ddtime " << nl + << " ) as d JOIN urlmap as u ON( d.urlid = u.urlid ) " << nl; +// SQLTailerFROM_SS << " FROM (SELECT d.* " << nl +// << " FROM docmap d, " << nl +// << " ( select max(docidtime) as ddtime, urlid " << nl +// << " from docmap " << nl +// << " group by urlid " << nl +// << " ) dd " << nl +// << " WHERE d.urlid=dd.urlid " << nl +// << " AND d.docidtime=dd.ddtime " << nl +// << " ) as d," << nl +// << " urlmap as u " << nl; +// SQLTailerWHERE_SS << " where d.urlid = u.urlid " << nl; + + LG_FCA_D << "ffilterStrings.size:" << ffilterStrings.size() << endl; + stringset_t eanamesUsed; + stringstream conSS; + conSS << " host=" << host; + conSS << " dbname=" << dbname; + connection con( conSS.str() ); + + + stringmap_t lifted_columns; + stringset_t columns_in_docmap; + { + work trans( con, "getting the schema..." ); + result res = trans.exec( "select * from docmap where docid < 0" ); + + result::tuple::size_type res_col_sz = res.columns(); + for( int i=0; ifirst; + string ffilter_string = si->second; + + fh_eaquery q = EAIndex::Factory::makeEAQuery( ffilter_string, idx ); + + std::stringstream LocalSQLHeaderSS; + std::stringstream LocalSQLWherePredicatesSS; + std::stringstream LocalSQLTailerSS; + stringset_t lookupTablesUsed; + bool queryHasTimeRestriction; + std::string DocIDColumn; + + q->getQuerySQL( LocalSQLHeaderSS, + LocalSQLWherePredicatesSS, + LocalSQLTailerSS, + lookupTablesUsed, + queryHasTimeRestriction, + DocIDColumn, + eanamesUsed, + termInfo ); + LG_FCA_D << "rdn:" << rdn << " SQLWherePredicatesSS:" << LocalSQLWherePredicatesSS.str() << endl; + +// if( SQLHeader.empty() || queryHasTimeRestriction ) +// SQLHeader = LocalSQLHeaderSS.str(); +// if( SQLTailer.empty() || queryHasTimeRestriction ) +// SQLTailer = LocalSQLTailerSS.str(); + +// SQLWhereSS << "," << LocalSQLWherePredicatesSS.str() +// << " as \"" << rdn << "\" " << nl; + + SQLHeaderSS << " | " << nl + << "CASE (" << LocalSQLWherePredicatesSS.str() << ")" << nl + << " WHEN 't' THEN B'1'::bit(" << BitFieldSize << ") >> " + << BitFieldShift << " " << nl + << " ELSE B'0'::bit(" << BitFieldSize << ") " << nl + << "END" << endl; + + { + BitFieldShifts[rdn] = BitFieldShift; + { +// sqlfuncs.push_front( +// (string)"drop function " +// + getBitFunctionName( newTreeName, rdn ) + "(bit varying);" ); + stringstream ss; + ss << "CREATE OR REPLACE FUNCTION " + << getBitFunctionName( newTreeName, rdn ) + << "( bit varying ) RETURNS boolean IMMUTABLE STRICT AS '" << nl + << "DECLARE" << nl + << " bv ALIAS FOR $1;" << nl + << "BEGIN" << nl + << "RETURN ( bv::bit(" << BitFieldSize << ") " + << " & (B''1''::bit(" << BitFieldSize << ") >> " << BitFieldShift << ")" + << " = (B''1''::bit(" << BitFieldSize << ") >> " << BitFieldShift << "));" + << "END;" << nl + << "' LANGUAGE plpgsql;"; + sqlfuncs.push_front( ss.str() ); + } + { +// sqlfuncs.push_front( +// (string)"drop function " +// + getBitFunctionName( newTreeName, rdn ) + ";" ); + stringstream ss; + ss << "CREATE OR REPLACE FUNCTION " + << getBitFunctionName( newTreeName, rdn ) + << "() RETURNS bit(" << BitFieldSize << ") IMMUTABLE STRICT AS '" << nl + << "DECLARE" << nl + << "BEGIN" << nl + << "RETURN (B''1''::bit(" << BitFieldSize << ") >> " << BitFieldShift << ");" + << "END;" << nl + << "' LANGUAGE plpgsql;"; + sqlfuncs.push_front( ss.str() ); + } + + + ReadCFISQLSS << ", " << getBitFunctionName( newTreeName, rdn ) + << "(d.bitf) as \"" << rdn << "\" "; + } + ++BitFieldShift; + } + SQLHeaderSS << " as bitf " << nl; + + + ReadCFISQLSS << " from " << newTreeCFIName << " d order by id desc "; + setFile( viewc, "read-cfi-sql-tail", ReadCFISQLSS ); + + { +// sqlfuncs.push_front( +// (string)"drop function " +// + "meta_" + getBitFunctionName( newTreeName, "zero_bitf",false ) ); + + stringstream ss; + ss << "CREATE OR REPLACE FUNCTION " + << "meta_" << getBitFunctionName( newTreeName, "zero_bitf",false ) + << "() RETURNS bit(" << BitFieldSize << ") IMMUTABLE STRICT AS '" << nl + << "DECLARE" << nl + << "BEGIN" << nl + << "RETURN (B''0''::bit(" << (BitFieldSize) << "));" + << "END;" << nl + << "' LANGUAGE plpgsql;"; + sqlfuncs.push_front( ss.str() ); + } + { +// sqlfuncs.push_front( +// (string)"drop function " +// + "meta_" + getBitFunctionName( newTreeName, "bitf_size",false ) ); + + stringstream ss; + ss << "CREATE OR REPLACE FUNCTION " + << "meta_" << getBitFunctionName( newTreeName, "bitf_size",false ) + << "() RETURNS int IMMUTABLE STRICT AS '" << nl + << "DECLARE" << nl + << "BEGIN" << nl + << "RETURN " << (BitFieldSize-3) << " ;" + << "END;" << nl + << "' LANGUAGE plpgsql;"; + sqlfuncs.push_front( ss.str() ); + } + + + if( eanamesUsed.find("width") != eanamesUsed.end() ) + { + eanamesUsed.insert("height"); + } + if( eanamesUsed.find("height") != eanamesUsed.end() ) + { + eanamesUsed.insert("width"); + } + + for( stringset_t::const_iterator si = eanamesUsed.begin(); + si != eanamesUsed.end(); ++si ) + { + string rdn = *si; + + LG_FCA_D << "eanamesUsed ITER:" << rdn << endl; + if( columns_in_docmap.find( rdn ) != columns_in_docmap.end() ) + { + LG_FCA_D << "LIFTING:" << rdn << endl; + lifted_columns[ rdn ] = makeNonNormalizedLiftString( rdn ); + } + else if( !dontDenormalizeEAIntoBaseTable ) + { + if( alreadySelectedAttributes.find( rdn ) != alreadySelectedAttributes.end() ) + continue; + if( rdn == "name" ) + continue; + if( starts_with( rdn, "emblem:" )) + continue; + + // + // This is tricky, we are going to denormalize the EA value + // into the new base table. + // + string tmptableName = (string)"tab_" + rdn; + tmptableName = Util::replace_all( tmptableName, '-', '_' ); + MetaEAIndexerInterface:: + BuildQuerySQLTermInfo_t::const_iterator ti = termInfo.find( rdn ); + + if( ti == termInfo.end() ) + continue; + + string lookupTableName = ti->second.m_lookupTable; + int attrtype = ti->second.m_attrType; + stringstream ss; + ss << ", \"" << tmptableName << "\".docid as \"" + << Util::replace_all( rdn, '-', '_' ) << "\" " << nl; + lifted_columns[ rdn ] = ss.str(); + + SQLTailerFROM_SS + << "LEFT OUTER JOIN " << nl + << "( SELECT docattrs.docid as docid, " << nl + << " " << lookupTableName << ".attrvalue as value" << nl + << " FROM docattrs, attrmap , " << lookupTableName << nl + << " WHERE" << nl + << " ((" << nl +// << " docattrs.docid = d.docid and " << nl +// << " " << lookupTableName << ".attrvalue FIXME! " << nl + << " " << lookupTableName << ".vid = docattrs.vid" << nl + << " and attrmap.attrname='" << rdn << "'" << nl + << " and ( attrmap.attrtype='" << attrtype << "' "; + + if( attrtype == MetaEAIndexerInterface::ATTRTYPEID_CIS ) + SQLTailerFROM_SS << nl + << " or attrmap.attrtype='" + << MetaEAIndexerInterface::ATTRTYPEID_STR + << "' ) " << nl; + else + SQLTailerFROM_SS << " ) " << nl; + + SQLTailerFROM_SS + << " and attrmap.attrid=docattrs.attrid" << nl + << " ))" << nl +// << " UNION ALL SELECT null as value" +// << " LIMIT 1 " << nl + << " ) as \"" << tmptableName << "\" " << nl + << " ON (\"" << tmptableName << "\".docid = d.docid)" << nl + << nl; + +// SQLTailerWHERE_SS +// << " and " << tmptableName << ".docid = d.docid " << nl; + } + + } + + // + // For those EA which are mentioned in the various ffilters + // that make up the formal context, we should copy those EA + // into the new basetable. + // + { + for( stringmap_t::const_iterator ei = lifted_columns.begin(); + ei != lifted_columns.end(); ++ei ) + { + string rdn = ei->first; + string sql = ei->second; + + if( alreadySelectedAttributes.find( rdn ) != alreadySelectedAttributes.end() ) + continue; + + SQLHeaderSS << sql << nl; + } + } + + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + +// SQLHeaderSS << " ,'t'='t' as ferris_top_generator " << nl; +// SQLHeaderSS << " ,'t'<>'t' as ferris_bottom_generator " << nl; + + // create the database view + { + stringstream sqlss; + sqlss << SQLHeaderSS.str() << nl << SQLWhereSS.str() << nl + << SQLTailerINTO_SS.str() + << SQLTailerFROM_SS.str() + << SQLTailerWHERE_SS.str() + << ";" << endl; + + LG_FCA_D << "Base table generator SQL:" + << sqlss.str() + << endl; + cerr << "Base table generator SQL:" + << sqlss.str() + << endl; + + fh_context c = Shell::acquireSubContext( viewc, "recreate-sql" ); + setStrAttr( c, "content", sqlss.str() ); + +// try +// { +// work trans( con, "dropping the view..." ); +// stringstream dropSS; +// dropSS << "drop view " << newTreeName << ";"; +// trans.exec( dropSS.str() ); +// trans.commit(); +// } +// catch( exception& e ) +// {} + try + { + work trans( con, "dropping the table..." ); + stringstream dropSS; + dropSS << "drop table " << newTreeName << ";"; + trans.exec( dropSS.str() ); + trans.commit(); + } + catch( exception& e ) + {} + try + { + work trans( con, "dropping the table..." ); + stringstream dropSS; + dropSS << "drop table " << newTreeAttrNamesTable << ";"; + trans.exec( dropSS.str() ); + trans.commit(); + } + catch( exception& e ) + {} + + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + + { + fh_context c = Shell::acquireSubContext( viewc, "bitf-column-names" ); + setStrAttr( c, "content", Util::createSeperatedList( formalContextColumns, '\n' ) ); + + stringstream ss; + ss << "create table " << newTreeAttrNamesTable << " ( " + << " id serial primary key," + << " name varchar(100) NOT NULL" + << " ) without oids " + << " " + << endl; + work trans( con, "setting up attrnames table..." ); + trans.exec( ss.str() ); + + for( BitFieldShifts_t::const_iterator ci = BitFieldShifts.begin(); + ci != BitFieldShifts.end(); ++ci ) + { + string name = ci->first; + int id = ci->second; + + stringstream ss; + ss << "insert into " << newTreeAttrNamesTable << " (id,name) values (" + << id << ",'" << name << "'" + << ");" << endl; + LG_FCA_D << ss.str(); + trans.exec( ss.str() ); + } + + { + stringstream ss; + ss << "" + << "create or replace function " << newTreeName << "_n( int[] ) returns varchar[] AS '" + << "DECLARE" + << " MyArgument alias for $1;" + << " sz int := 300; " + << " i int := 1; " + << " ret varchar[]; " + << " Rec RECORD; " + << "BEGIN " + << " ret := ARRAY[100]; " + << " FOR Rec IN select name from wn2_attrnames where id = ANY ( MyArgument ) LOOP " + << " ret[ i ] = Rec.name; " + << " i := i + 1; " + << " END LOOP; " + << " RETURN ret; " + << "END; " + << "' LANGUAGE plpgsql; "; + LG_FCA_D << "SQL:" << ss.str() << endl; + trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "" + << "create or replace function " << newTreeName << "_n( bit varying ) returns varchar[] AS '" + << "DECLARE" + << " MyArgument alias for $1;" + << "BEGIN " + << " RETURN " << newTreeName << "_n(" << newTreeName << "_intvec(MyArgument));" + << "END; " + << "' LANGUAGE plpgsql; "; + LG_FCA_D << "SQL:" << ss.str() << endl; + trans.exec( ss.str() ); + } + + + trans.commit(); + } + + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + + for( stringlist_t::const_iterator si = sqlfuncs.begin(); + si != sqlfuncs.end(); ++si ) + { + LG_EAIDX_D << "SQL: " << *si << endl; + } + + cerr << "making the view..." << endl; + { + work trans( con, "making the view..." ); + LG_EAIDX_D << "SQL: " << sqlss.str() << endl; + trans.exec( sqlss.str() ); + trans.commit(); + } + cerr << "making the functions..." << endl; + work trans( con, "making the view..." ); + LG_FCA_D << "MADE TABLE" << endl; + for( stringlist_t::const_iterator si = sqlfuncs.begin(); + si != sqlfuncs.end(); ++si ) + { + LG_EAIDX_D << "SQL: " << *si << endl; + LG_FCA_D << "SQL:" << *si << endl; + trans.exec( *si ); + } + cerr << "making the index..." << endl; + { + stringstream ss; + ss << "create index " << newTreeName << "docid on " << newTreeName << "(docid)"; + LG_EAIDX_D << "SQL: " << ss.str() << endl; + trans.exec( ss.str() ); + } + string intvecFunctionName = (string)newTreeName + "_intvec"; + { + stringstream ss; + ss << "CREATE OR REPLACE FUNCTION " << intvecFunctionName + << " ( bit varying ) RETURNS int[] IMMUTABLE STRICT AS ' " + << " DECLARE " + << " bv alias for $1;" + << " sz int := " << BitFieldSize << "-1;" + << " ret int[];" + << " tmp int;" + << "BEGIN" + << " tmp := -1;" + << " FOR i IN 0..sz LOOP" + << " IF (bv::bit(" << BitFieldSize << ") " + << " & (B''1''::bit(" << BitFieldSize << ") >> i )) " + << " = (B''1''::bit(" << BitFieldSize << ") >> i)" + << " THEN" + << " tmp := i;" + << " EXIT;" + << " END IF;" + << " END LOOP;" + << " IF tmp = -1 " + << " THEN" + << " RETURN ret;" + << " END IF;" + << " ret := ARRAY[tmp];" + << " tmp := tmp + 1;" + << " FOR i IN tmp..sz LOOP" + << " IF (bv::bit(" << BitFieldSize << ")" + << " & (B''1''::bit(" << BitFieldSize << ") >> i ))" + << " = (B''1''::bit(" << BitFieldSize << ") >> i)" + << " THEN" + << " ret = array_append(ret,i); " + << " END IF;" + << " END LOOP;" + << " RETURN ret;" + << "END;" + << "' LANGUAGE plpgsql;"; + + LG_EAIDX_D << "BITF2INTVEC FUNC:" << ss.str() << endl; + trans.exec( ss.str() ); + } + { + stringstream ss; + ss << "create index " << newTreeName << "bitfsubeq on " << newTreeName + << " using gist ( " << intvecFunctionName << "(bitf) gist__int_ops, " + << " (#( " << intvecFunctionName << "(bitf))) gist_int4_ops )"; + LG_EAIDX_D << "SQL: " << ss.str() << endl; + trans.exec( ss.str() ); + } + + trans.commit(); + + +// { +// work trans( con, "making indexes..." ); + +// { +// stringstream idxss; +// idxss << "create index urlidx on " << newTreeName +// << " ( url ) " << nl; +// trans.exec( idxss.str() ); +// } +// { +// stringstream idxss; +// idxss << "create index urlididx on " << newTreeName +// << " ( urlid ) " << nl; +// trans.exec( idxss.str() ); +// } +// trans.commit(); +// } + + } + + cerr << "setting up ~/.ferris/tree files..." << endl; + + string CFICmd = ""; + string LatticeFromCFICmd = ""; + + stringstream recreate_concept_lattice_SS; + recreate_concept_lattice_SS << "#!/bin/bash" << endl; + // workout what the command will be to make the CFI table + { + work trans( con, "as string..." ); + stringlist_t formalContextBitFieldFunctions; + stringlist_t formalContextColumnsQuoted; + stringlist_t::const_iterator ce = formalContextColumns.end(); + for( stringlist_t::const_iterator ci = formalContextColumns.begin(); + ci != ce; ++ci ) + { + formalContextColumnsQuoted.push_back( DQuoteStr( trans, *ci )); + formalContextBitFieldFunctions.push_front( + getBitFunctionName( newTreeName, *ci ) + "(d)" ); + } + + int attributeCount = ffilterStrings.size(); + string commaSepColumnsSQL = Util::createSeperatedList( formalContextColumnsQuoted ); + string commaSepBitFFSQL = + Util::createSeperatedList( formalContextBitFieldFunctions ); + +// { + +// stringstream cmdSS; +// cmdSS << "aprioripg -tc -n" << (MaxItemSetSize) << " -s0 -P " << host +// << " " << dbname << " " +// << " 'select " << commaSepColumnsSQL +// // << " 'select " << commaSepBitFFSQL +// // << " ,ferris_top_generator " +// // << " ,ferris_bottom_generator " +// << " FROM " << newTreeName << " d " +// // << " GROUP BY " << commaSepColumnsSQL +// << " ' " +// << " " << newTreeCFIName; + +// setFile( viewc, "apriori-commandline", cmdSS ); +// CFICmd = cmdSS.str(); +// recreate_concept_lattice_SS << cmdSS.str() << endl; +// } + + + { + // FIXME: -s1 means 1% not one object! + stringstream cmdSS; + int MaxItemSetSize = 7; + double minSupport = 0.05; + int TargetLatticeSize = 500; + +// cmdSS << "#!/bin/bash" << endl +// << "minsup=${1:-" << minSupport << "};" << endl; + cmdSS << "aprioripg -Vbitf -B -tc -n" << (MaxItemSetSize) + << " -s" << minSupport + << " -T" << TargetLatticeSize + << " -D " + << " -P " << host + << " " << dbname << " "; + cmdSS << " 'select bitf "; // << commaSepBitFFSQL +// bool v = true; +// for(BitFieldShifts_t::const_iterator iter = BitFieldShifts.begin(); +// iter != BitFieldShifts.end(); ++iter ) +// { +// if( v ) v = false; +// else cmdSS << " , "; +// string rdn = iter->first; +// int shift = iter->second; + +// cmdSS << getBitFunctionName( newTreeName, rdn ) +// << "(d.bitf) as \"" << EANameToSQLColumnName(rdn) << "\" "; + +// // cmdSS << " ( d.bitf::bit(" << BitFieldSize << ") " +// // << " & (B'1'::bit(" << BitFieldSize << ") >> " << shift << ")" +// // << " = (B'1'::bit(" << BitFieldSize << ") >> " << shift << "))" +// // << " as " << EANameToSQLColumnName(rdn) << " " << endl; +// } + cmdSS << " FROM " << newTreeName << " d " + << " ' " + << " " << newTreeCFIName; + + CFICmd = cmdSS.str(); + recreate_concept_lattice_SS << cmdSS.str() << endl; + setFile( viewc, "apriori-commandline", cmdSS, 700 ); + } + } + +// { +// stringstream cmdSS; +// cmdSS << "#!/bin/bash" << endl +// << "tmpfile=/tmp/out.txt;" << endl +// << "tc=0;" << endl +// << endl +// << "for supp in \"0.9\" \"0.8\" \"0.7\" \"0.6\" \"0.5\" \"0.4\" \"0.3\" \"0.2\" \"0.1\" \"0.05\"" << endl +// << "do" << endl +// << "./apriori-commandline $supp >|$tmpfile 2>&1" << endl +// << "tc=$(tail -1 $tmpfile | cut -f 1 -d ' ' | cut -b\"2-\")" << endl +// << "echo $tc;" << endl +// << "if [ $tc -gt \"1000\" ]; " << endl +// << " then " << endl +// << " break;" << endl +// << " fi " << endl +// << "done" << endl +// << endl; +// setFile( viewc, "apriori-commandline-adaptive", cmdSS, 700 ); +// } + + + // workout what the command is to set child/parent links in CFI table + { + stringstream cmdSS; + cmdSS << "ferris-lattice-from-cfi --lattice-tree-path=" << viewc->getURL() + << ""; +// cmdSS << "ferris-lattice-from-cfi -d " << dbname +// << " -Q 'select * from " << newTreeCFIName << " order by id desc' " +// << " -o " << newTreeCFIName; + + setFile( viewc, "lattice-from-cfi-commandline", cmdSS, 700 ); + LatticeFromCFICmd = cmdSS.str(); + recreate_concept_lattice_SS << viewc->getDirPath() << "/" << "reset-lattice.sh" << endl; + recreate_concept_lattice_SS << cmdSS.str() << endl; + } + + { + setFile( viewc, "recreate-concept-lattice-script", + recreate_concept_lattice_SS, 700 ); + } + + // run apriori against the database view to create the CFI + if( !dontCreateCFI ) + { + fh_runner r = new Runner(); + r->setCommandLine( CFICmd ); + r->setSpawnFlags( (GSpawnFlags)(r->getSpawnFlags() + | G_SPAWN_STDOUT_TO_DEV_NULL + | G_SPAWN_STDERR_TO_DEV_NULL )); + r->Run(); + gint es = r->getExitStatus(); +// cerr << "apriori es:" << es << endl; + if( es != 0 ) + { + cerr << "Generating the set of concepts failed! error:" << es << endl; + cerr << "CFICmd:" << CFICmd << endl; + } + } + +// sleep(3); + // generate the parent/child relations + if( !dontCreateParentChild ) + { + fh_runner r = new Runner(); + r->setCommandLine( LatticeFromCFICmd ); + r->setSpawnFlags( (GSpawnFlags)(r->getSpawnFlags() + | G_SPAWN_STDOUT_TO_DEV_NULL + | G_SPAWN_STDERR_TO_DEV_NULL )); + r->Run(); + gint es = r->getExitStatus(); +// cerr << "LatticeFromCFI es:" << es << endl; + if( es != 0 ) + { + cerr << "Generating the parent/child relations failed! error:" << es << endl; + cerr << "LatticeFromCFICmd:" << LatticeFromCFICmd << endl; + } + } + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fca/ferris-export-concept-lattice-to-toscanaj.cpp b/apps/fca/ferris-export-concept-lattice-to-toscanaj.cpp new file mode 100644 index 0000000..7e4a7c4 --- /dev/null +++ b/apps/fca/ferris-export-concept-lattice-to-toscanaj.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + export part of a libferris concept lattice to a file readable by ToscanaJ + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-export-concept-lattice-to-toscanaj.cpp,v 1.3 2010/09/24 21:31:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +using namespace std; +using namespace Ferris; +using namespace Ferris::FCA; + + +const string PROGRAM_NAME = "ferris-export-concept-lattice-to-toscanaj"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int hadErrors = 0; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long ShowVersion = 0; + unsigned long Verbose = 0; + const char* flatticeTreePath_CSTR = 0; + const char* outputFileBase_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "lattice-tree-path", 'L', POPT_ARG_STRING, &flatticeTreePath_CSTR, 0, + "url for the lattice tree", "" }, + + { "output-filebase", 'o', POPT_ARG_STRING, &outputFileBase_CSTR, 0, + "path without extension for output", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 || !flatticeTreePath_CSTR || !outputFileBase_CSTR ) + { + if( !flatticeTreePath_CSTR ) + cerr << "ERROR: you must supply an fca lattice tree path" << endl; + +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(5); + } + string flatticeTreePath = flatticeTreePath_CSTR; + string outputFileBase = outputFileBase_CSTR; + + if( ShowVersion ) + { + cout << "ferris-export-concept-lattice-to-toscanaj version:" + << " $Id: ferris-export-concept-lattice-to-toscanaj.cpp,v 1.3 2010/09/24 21:31:10 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << endl + << endl + << "Copyright (C) 2005 Ben Martin" << endl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + cerr << "getting the data..." << endl; + + fh_conceptLattice cl = 0; + cl = ConceptLattice::load( flatticeTreePath ); + + cl->exportAsToscanaJConceptualSchema( outputFileBase ); + poptFreeContext(optCon); + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "error:" << e.what() << endl; + exit(3); + } + + cout << flush; + return hadErrors; +} diff --git a/apps/fca/ferris-export-formal-context-to-burmeister.cpp b/apps/fca/ferris-export-formal-context-to-burmeister.cpp new file mode 100644 index 0000000..dfcd1d8 --- /dev/null +++ b/apps/fca/ferris-export-formal-context-to-burmeister.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + export part of a libferris concept lattice to a file readable by ToscanaJ + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-export-formal-context-to-burmeister.cpp,v 1.3 2010/09/24 21:31:10 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +using namespace std; +using namespace Ferris; +using namespace Ferris::FCA; + + +const string PROGRAM_NAME = "ferris-export-concept-lattice-to-burmeister"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int hadErrors = 0; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long ShowVersion = 0; + unsigned long Verbose = 0; + const char* flatticeTreePath_CSTR = 0; + const char* outputFileBase_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "lattice-tree-path", 'L', POPT_ARG_STRING, &flatticeTreePath_CSTR, 0, + "url for the lattice tree", "" }, + + { "output-filename", 'o', POPT_ARG_STRING, &outputFileBase_CSTR, 0, + "path without extension for output", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 || !flatticeTreePath_CSTR || !outputFileBase_CSTR ) + { + if( !flatticeTreePath_CSTR ) + cerr << "ERROR: you must supply an fca lattice tree path" << endl; + +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(5); + } + string flatticeTreePath = flatticeTreePath_CSTR; + string outputFileBase = outputFileBase_CSTR; + + if( ShowVersion ) + { + cout << "ferris-export-concept-lattice-to-toscanaj version:" + << " $Id: ferris-export-formal-context-to-burmeister.cpp,v 1.3 2010/09/24 21:31:10 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << endl + << endl + << "Copyright (C) 2005 Ben Martin" << endl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + cerr << "getting the data..." << endl; + + fh_conceptLattice cl = 0; + cl = ConceptLattice::load( flatticeTreePath ); + + cl->exportAsBurmeister( outputFileBase ); + poptFreeContext(optCon); + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "error:" << e.what() << endl; + exit(3); + } + + cout << flush; + return hadErrors; +} diff --git a/apps/fca/ferris-lattice-from-cfi.cpp b/apps/fca/ferris-lattice-from-cfi.cpp new file mode 100644 index 0000000..e585ad0 --- /dev/null +++ b/apps/fca/ferris-lattice-from-cfi.cpp @@ -0,0 +1,2175 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + LatticeFromCFI + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-lattice-from-cfi.cpp,v 1.33 2010/09/24 21:31:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +//#define HAVE_LIBGISTMIQ + + +//#define USE_BVMINI 1 +#define USE_BITSET + +//#define BM_DISBALE_BIT_IN_PTR +#define BM64OPT + + + +#include + +#include +#include +#include +#include +using namespace Ferris; +using namespace Ferris::FCA; +using Ferris::Time::Benchmark; +using namespace FerrisBitMagic; + +#include +#include +#include +#include +#include +#include +#include +#include +using namespace PGSTD; +using namespace pqxx; + +#include +#include +#include +#include +#include +#include +using namespace std; + +#ifdef HAVE_LIBGISTMIQ +#include "EasyRDTreeClient.hh" +#include "gist.h" +#include "gist_support.h" +#endif + +//#include + +// stringstream junk; +// #undef LG_FCA_D +// #define LG_FCA_D if( 0 ) junk +// #undef LG_FCA_ACTIVE +// #define LG_FCA_ACTIVE 0 + + +const string PROGRAM_NAME = "ferris-lattice-from-cfi"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int hadErrors = 0; + +enum { + E_PGCONNECT = -6, + E_PGNOINPUT = -7, +}; + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +static void error (int code, ...) +{ + switch( -code ) + { + case E_PGCONNECT: cerr << "error connecting to database" << endl; break; + } + exit( code ); +} + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +connection* db_connection = 0; +bool parentsColumnExists = false; +bool childrenColumnExists = false; +bool addedAttrColumnExists = false; + +int maxID=0; // highest ID in use at initial load time +string ItemSetNamesSQL=""; // SQL column names in order of ItemSet +int ItemSetNamesSQLCount=0; // Number of columns in ItemSetNamesSQL +fh_conceptLattice cl = 0; // concept lattice +fh_concept LatticeTop = 0; // top element in lattice +fh_concept LatticeBottom = 0; // bottom element in lattice +typedef std::list< fh_concept > nodes_t; +nodes_t nodes; // all nodes except LatticeBottom + +string flatticeTreePath = ""; + +bool LatticeBottomIsAlreadyInDatabase = true; +bool LatticeTopIsAlreadyInDatabase = true; + +static void setBit( guint8* Index, int value ) +{ + guint8 rem = value % 8; + guint8 b = 1 << rem; + int offset = (value-rem)/8; +// cerr << "setBit() value:" << value << " b:" << (int)b << " offset:" << offset << " rem:" << (int)rem << endl; + Index[offset] |= b; +} +static void clearBit( guint8* Index, int value ) +{ + guint8 rem = value % 8; + guint8 b = 1 << rem; + b = ~b; + int offset = (value-rem)/8; + Index[offset] &= b; +} +static void dumpBits( guint8* Index, int Index_sz ) +{ +// cerr << "dumpBits() "; +// int e = Index_sz/8+1; +// for( int i=0; i < e; ++i ) +// { +// cerr << ((Index[i] & 1) > 0) +// << ((Index[i] & 2) > 0) +// << ((Index[i] & 4) > 0) +// << ((Index[i] & 8) > 0) +// << ((Index[i] & 16) > 0) +// << ((Index[i] & 32) > 0) +// << ((Index[i] & 64) > 0) +// << ((Index[i] & 128) > 0) +// << ' '; +// } +// cerr << endl; +} +void dumpBits( const FerrisBitMagic::bvector<>& a ) +{ + if( LG_FCA_ACTIVE ) + { + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + stringstream ss; + while (an < an_end) + { + ss << *an << ' '; + ++an; // Fastest way to increment enumerator + } + + LG_FCA_D << "dumpBits(bv) count:" << a.count() << " " << ss.str() << endl; + } +} +void dumpBits( const FerrisBitMagic::bvector<>& a, fh_ostream oss ) +{ + FerrisBitMagic::bvector<>::enumerator an = a.first(); + FerrisBitMagic::bvector<>::enumerator an_end = a.end(); + + stringstream ss; + while (an < an_end) + { + ss << *an << ' '; + ++an; // Fastest way to increment enumerator + } + + oss << "dumpBits(bv) count:" << a.count() << " " << ss.str() << endl; +} +void dumpBits( guint64 v, fh_ostream oss ) +{ + int count = 0; + stringstream ss; + for( long i = 0; i < 64; ++i ) + { + if( (v >> i) & 0x1 == 0x1 ) + { + ++count; + ss << " " << i; + } + } + oss << "dumpBits(u64) count:" << count << ss.str() << endl; +} + +void dump( fh_ostream oss, clist_t& cl, const std::string& desc ) +{ + oss << "======= start ======:" << desc << endl; + for( rs ri(cl); ri; ++ri ) + { + oss << "id:" << (*ri)->getID() << " bv:"; + dumpBits( (*ri)->getItemSet(), oss ); +// oss << endl; + } + oss << "======= end ======:" << desc << endl; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +#define BM_DISBALE_BIT_IN_PTR + +#ifdef USE_BITSET + +struct IntentsData : public Handlable +{ + fh_concept node; + typedef fca_std_bitset_t intent_t; + intent_t intent; + + IntentsData( fh_concept node, const intent_t& _intent ) + : + node( node ), + intent( _intent ) + { + } +}; + +#else + +#ifndef USE_BVMINI + + +struct IntentsData : public Handlable +{ + fh_concept node; + typedef FerrisBitMagic::bvector<> intent_t; + intent_t intent; + + IntentsData( fh_concept node, const FerrisBitMagic::bvector<>& _intent ) + : + node( node ), intent( _intent ) + // node( node ) +// node( node ), intent( FerrisBitMagic::BM_BIT, FerrisBitMagic::gap_len_table::_len, 64 ) + { +// intent |= _intent; +// intent.set_new_blocks_strat( FerrisBitMagic::BM_GAP ); +// FerrisBitMagic::bvector<>::enumerator an = _intent.first(); +// FerrisBitMagic::bvector<>::enumerator an_end = _intent.end(); + +// while (an < an_end) +// { +// intent[*an]=1; +// ++an; // Fastest way to increment enumerator +// } + } +}; + +#else + +#warning "Using bvmini!" +struct IntentsData : public Handlable +{ + fh_concept node; + typedef FerrisBitMagic::bvector + > intent_t; + intent_t intent; + + + IntentsData( fh_concept node, const FerrisBitMagic::bvector<>& _intent ) + : + node( node ) + { + to_bvmini( _intent, intent ); + } + +}; +#endif +#endif + +FERRIS_SMARTPTR( IntentsData, fh_IntentsData ); +typedef multimap< int, fh_IntentsData > Intents_t; +//typedef multimap< int, IntentsData* > Intents_t; + + + + +Intents_t& Maxima( Intents_t& input, Intents_t& ret ) +{ + for( Intents_t::reverse_iterator ii = input.rbegin(); ii!=input.rend(); ++ii ) + { + const IntentsData::intent_t& iIntent = ii->second->intent; + bool ismin = true; + for( Intents_t::iterator ri = ret.begin(); ri!=ret.end(); ++ri ) + { + ismin &= (!second_is_superset(iIntent, ri->second->intent)); + if( !ismin ) + break; + } + + if( ismin ) + { + ret.insert( *ii ); + } + } + + return ret; +} + +//fh_concept FindConcept( fh_concept startc, const FerrisBitMagic::bvector<>& intent ) +template < class Arg2 > +fh_concept FindConcept( fh_concept startc, const Arg2& intent ) +{ +#ifdef USE_BITSET + + fh_concept c = startc; + LG_FCA_D << "FindConcept(bitset) startc:" << c->getID() << endl; + while( !equiv( c->getItemSetBitSet(), intent ) ) + { + bool c_changed = false; + LG_FCA_D << "FindConcept() c:" << c->getID() << endl; + const clist_t& pl = c->getParents(); + for( clist_t::const_iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { + LG_FCA_D << "FindConcept() c:" << c->getID() + << " p:" << (*pi)->getID() + << endl; + LG_FCA_D << "FindConcept() c.intent:" << intent + << " p.intent:" << (*pi)->getItemSetBitSet() + << endl; + if( !second_is_superset( intent, (*pi)->getItemSetBitSet() ) ) + continue; + c = *pi; + c_changed = true; + break; + } + if( !c_changed ) + { + LG_FCA_D << "FindConcept(ERROR) !c_changed" << endl; + return 0; + } + } + return c; + +#else + fh_concept c = startc; + LG_FCA_D << "FindConcept(not bitset) startc:" << c->getID() << endl; + while( !equiv( c->getItemSet(), intent ) ) + { + const clist_t& pl = c->getParents(); + for( clist_t::const_iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { + if( !second_is_superset( intent, (*pi)->getItemSet() ) ) + continue; + c = *pi; + break; + } + } + return c; +#endif + + +// // cerr << "FIXME: FindConcept() needs optimization" << endl; + +// nodes_t::iterator begin = nodes.begin(); +// nodes_t::iterator end = nodes.end(); +// for( nodes_t::iterator ni = begin; ni != end; ++ni ) +// { +// fh_concept n = *ni; +// if( n->getItemSet() == intent ) +// return n; +// } +// if( LatticeTop->getItemSet() == intent ) +// return LatticeTop; + +// return 0; +} + + +void dumpNodes( fh_ostream oss ) +{ + oss << "setupParentAndChildrenLinks(dump begin)" << endl; + nodes_t::iterator begin = nodes.begin(); + nodes_t::iterator end = nodes.end(); + for( nodes_t::iterator ni = begin; ni != end; ++ni ) + { + fh_concept n = *ni; + oss << "n->id:" << n->getID() << " "; + dumpBits( n->getItemSet(), oss ); + oss << endl; + } + oss << "setupParentAndChildrenLinks(dump end)" << endl; +} + +string +tostr( const FerrisBitMagic::bvector<>& bv ) +{ + stringstream ss; +// ss << "sz:" << bv.count() << " " << bv; + + ss << "sz:" << bv.count() << " bv:"; + + if( !bv.count() ) + return ss.str(); + + unsigned value = bv.get_first(); + do + { + ss << value; + value = bv.get_next(value); + if (value) + { + ss << ","; + } + else + { + break; + } + } while(1); +// ss << std::endl; + return ss.str(); +} + +string +tostr( const extent_bitset_t& bv ) +{ + return "tostr(bitset) FIXME"; +} + +// string +// tostr( const fca_std_bitset_t& bv ) +// { +// return "tostr(bitset) FIXME"; +// } + + +unsigned long CLARIFY = 0; + +// pp38 Concept Data Analysis CoveringEdges() +void setupParentAndChildrenLinks_CoveringEdges( bool useGIST = false, bool populateGIST = true ) +{ + Time::Benchmark setupParentAndChildrenLinks_benchmark("setupParentAndChildrenLinks()"); + + int TotalEdges = 0; + LatticeTop = 0; + + // Create a new lattice top, we shall remove it later if there is already + // a top node in the lattice. + int NextID = nodes.size(); + LatticeTop = new Concept( cl ); + LatticeTop->setID( NextID ); + cl->addConcept( LatticeTop ); + LG_FCA_D << "CLARIFY:" << CLARIFY << endl; + LG_FCA_D << "Lattice top ID:" << LatticeTop->getID() << endl; +// fh_context G = cl->getAllObjects(); +// LG_FCA_D << "G.sz:" << G->getSubContextCount() << " G.url:" << G->getURL() << endl; + + Intents_t Intents; + typedef std::list< fh_concept > OuterList_t; + OuterList_t OuterList; + + copy( nodes.begin(), nodes.end(), back_inserter( OuterList ) ); + OuterList.push_front( LatticeTop ); + + FerrisBitMagic::bvector<> M = cl->getFullItemSet(); + stringlist_t allAttributeNames; + cl->getAllAttributeNames( allAttributeNames ); + + // Precalculate m' for every individual item in M + LG_FCA_D << "setting up m' cache..." << endl; + FerrisBitMagic::bvector<> G; + VerticalFormalContext_t vfc; + { + Benchmark bm( "BENCH: setting up m' cache..."); + cl->getVerticalFormalContext( G, vfc, CLARIFY ); + } + + // Precalculate X for all {nodes} such that X AND m' is quick. + LG_FCA_D << "setting up X for all nodes..." << endl; + typedef map< fh_concept, FerrisBitMagic::bvector<> > XCache_t; + typedef map< FerrisBitMagic::bvector<>, fh_concept > RevXCache_t; + XCache_t XCache; +#ifdef HAVE_LIBGISTMIQ + typedef bvector<> key_type; + typedef EasyRDTreeClientBitMagic tree_type; + tree_type RevXCacheGIST("tmp-fca-gist"); + tree_type::iterator RevXCacheGIST_end = RevXCacheGIST.end(); +#endif + fh_concept NullXConcept = 0; + RevXCache_t RevXCache; + { + cerr << "nodes.sz:" << nodes.size() << endl; + + Benchmark bm( "BENCH: setting up X for all nodes..."); + nodes_t::iterator nend = nodes.end(); + nodes_t::iterator niter = nodes.begin(); + for( ; niter != nend; ++niter ) + { + fh_concept c = *niter; + + FerrisBitMagic::bvector<> X; + c->getExtentVerticalVector( X, CLARIFY ); + long Xcount = X.count(); + + if( !Xcount ) + { + NullXConcept = c; + LG_FCA_D << "ERROR! Processing concept:" << c->getID() << endl; + LG_FCA_D << "Concept has no getExtentVerticalVector" << endl; + } + LG_FCA_D << "Setting up XCache for concept:" << c->getID() + << " X.sz:" << X.count() + << " X:" << tostr(X) + << endl; + + XCache[ c ] = X; + +#ifdef HAVE_LIBGISTMIQ + if( useGIST ) + { + if( populateGIST ) + { + if( Xcount ) + { + cerr << "GIST Adding X:" << tostr(X) << endl; + RevXCacheGIST.insert( X, c->getID() ); + } + } + } +#endif + cerr << "RevXCache[X] Adding X:" << tostr(X) << endl; + RevXCache[ X ] = c; + } + } + + +// LG_FCA_D << "setting up atom..." << endl; +// stringmap_t atof; +// typedef map< long, fh_matcher > atom_t; +// atom_t atom; +// { +// cl->getAttributeToFFilterMap( atof ); +// for( stringmap_t::iterator ai = atof.begin(); ai != atof.end(); ++ai ) +// { +// string a = ai->first; +// string fstr = ai->second; +// fh_context z = Factory::MakeFilter( fstr ); +// fh_matcher m = Factory::MakeMatcherFromContext( z ); + +// const FerrisBitMagic::bvector<>& t = cl->StringToAttrID( a ); +// long attrid = (*(t.first())); +// atom[ attrid ] = m; +// } +// } + +// // Precalculate m' for every individual item in M +// LG_FCA_D << "setting up m' cache..." << endl; +// typedef map< long, FerrisBitMagic::bvector<> > emDashCache_t; +// emDashCache_t emDashCache; +// { +// Context::iterator Gend = G->end(); + +// // for( stringlist_t miter = allAttributeNames.begin(); miter != allAttributeNames.end(); ++miter ) +// // { +// // string m = *miter; + +// FerrisBitMagic::bvector<>::enumerator an = M.first(); +// FerrisBitMagic::bvector<>::enumerator an_end = M.end(); +// for ( ; an < an_end; ++an ) +// { +// long m = *an; +// LG_FCA_D << "setting up m' cache for m:" << m << endl; +// // string m_str = AttrIDToString( m ); + +// // FIXME: THIS NEXT LOOP IS SLOW!!! +// FerrisBitMagic::bvector<> bv; +// int i = 0; +// for( Context::iterator Giter = G->begin(); Giter != Gend; ++Giter, ++i ) +// { +// fh_context g = *Giter; + +// LG_FCA_D << "testing g:" << g->getURL() << endl; +// if( atom[ m ]( g ) ) +// { +// bv[i] = 1; +// } +// } +// emDashCache[ m ] = bv; +// } +// } + +// // Precalculate X for all {nodes} such that X AND m' is quick. +// LG_FCA_D << "setting up X for all nodes..." << endl; +// typedef map< fh_concept, FerrisBitMagic::bvector<> > XCache_t; +// typedef map< FerrisBitMagic::bvector<>, fh_concept > RevXCache_t; +// XCache_t XCache; +// RevXCache_t RevXCache; +// { +// nodes_t::iterator nend = nodes.end(); +// nodes_t::iterator niter = nodes.begin(); +// for( ; niter != nend; ++niter ) +// { +// fh_concept n = *niter; +// fh_context nextent = n->getExtent(); +// typedef set< string > nurls_t; +// nurls_t nurls; +// { +// Context::iterator ce = nextent->end(); +// for( Context::iterator ci = nextent->begin(); ci!=ce; ++ci ) +// { +// nurls.insert( (*ci)->getURL() ); +// } +// } + +// FerrisBitMagic::bvector<> bv; + +// Context::iterator Gend = G->end(); +// Context::iterator Giter = G->begin(); +// for( int i=0; Giter != Gend; ++Giter, ++i ) +// { +// fh_context g = *Giter; +// if( nurls.count( g->getURL() ) ) +// { +// bv[i] = 1; +// } +// } +// XCache[ n ] = bv; +// RevXCache[ bv ] = n; +// } +// } + + LG_FCA_D << "G.sz:" << G.count() << endl; + LG_FCA_D << "nodes.sz:" << nodes.size() << endl; + LG_FCA_D << "XCache.sz:" << XCache.size() << endl; + LG_FCA_D << "RevXCache.sz:" << RevXCache.size() << endl; + + // + // + // + cerr << "BENCH: Starting main work" << endl; + { + Benchmark bm( "BENCH: covering edges Finding parent/child links..."); + OuterList_t::iterator OuterListBegin = OuterList.begin(); + OuterList_t::iterator OuterListEnd = OuterList.end(); + for( OuterList_t::iterator OuterListIter = OuterListBegin; + OuterListIter != OuterListEnd; ++OuterListIter ) + { + fh_concept n = *OuterListIter; + const FerrisBitMagic::bvector<>& nIntent = n->getItemSet(); + const FerrisBitMagic::bvector<>& X = XCache[ n ]; + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "---------------------------------------------------" << endl << endl; + LG_FCA_D << "Processing concept:" << n->getID() + << " nIntent:" << tostr(nIntent) + << " X.sz:" << X.count() + << endl; + } + // const FerrisBitMagic::bvector<> Y; +// n->getExtentVerticalVector( Y ); + + // set count of any concept in C to 0 + typedef map< fh_concept, long > Counters_t; + Counters_t Counters; + + // Subtraction = M\Y + FerrisBitMagic::bvector<> Subtraction = M; + Subtraction -= nIntent; + + LG_FCA_D << "Subtraction:" << tostr(Subtraction) + << endl; + LG_FCA_D << "-------------" << endl; + + // For m in (M\Y) + FerrisBitMagic::bvector<>::enumerator an = Subtraction.first(); + FerrisBitMagic::bvector<>::enumerator an_end = Subtraction.end(); + for ( ; an < an_end; ++an ) + { + long m = *an; + +// inters = X AND m'; + FerrisBitMagic::bvector<> inters = X; + inters &= vfc[ m ]; + LG_FCA_D << "m:" << m << " X.sz:" << X.count() << " vfc[ m ].size:" << vfc[ m ].count() + << " inters.size:" << inters.count() << endl; + if( vfc[ m ].count() < 10 ) + LG_FCA_D << "vfc[ m ]... " << tostr( vfc[ m ] ) << endl; + +// fh_concept tc = find( C with X==inters ); +// typedef map< FerrisBitMagic::bvector<>, fh_concept > RevXCache_t; + + LG_FCA_D << "A inters:" << tostr(inters) << endl; +#ifdef HAVE_LIBGISTMIQ + LG_FCA_D << "B inters:" << libgist::tostr_binary(inters) << endl; +#endif + + fh_concept tc = 0; + if( !useGIST ) + { + RevXCache_t::iterator tciter = RevXCache.find( inters ); + if( tciter == RevXCache.end() ) + continue; + tc = tciter->second; + } +#ifdef HAVE_LIBGISTMIQ + if( useGIST ) + { + if( !inters.count() ) + { + LG_FCA_D << "GIST !inters.count" << endl; + + if( NullXConcept ) + { + tc = NullXConcept; + } + else + { + RevXCache_t::iterator tciter = RevXCache.find( inters ); + if( tciter == RevXCache.end() ) + continue; + tc = tciter->second; + } + } + else + { + tree_type::iterator iter = RevXCacheGIST.find( inters ); + if( iter == RevXCacheGIST_end ) + { + LG_FCA_D << "GIST !iter!" << endl; + continue; + } + + long cid = iter->second; + LG_FCA_D << "GIST concept-id:" << cid << endl; + tc = cl->getConcept( cid ); + } + } +#endif + + if( !tc ) + { + LG_FCA_D << "WARNING !tc" << endl; + continue; + } + LG_FCA_D << "tc:" << tc->getID() << endl; + + const FerrisBitMagic::bvector<>& tcIntent = tc->getItemSet(); + long newCount = (++Counters[ tc ]); + LG_FCA_D << "incrementing count(x1,y1) concept:" << tc->getID() + << " newCount:" << newCount + << " tcIntent.count():" << tcIntent.count() + << " nIntent.count():" << nIntent.count() + << " tcIntent:" << tostr(tcIntent) + << endl; + + if( tcIntent.count() - nIntent.count() == newCount ) + { +// LG_FCA_D << "TESTING2!.................." << endl; +// if( n != tc ) + { + n->makeLink( tc, false ); + ++TotalEdges; + } + } + } + } + } + cerr << "BENCH: Ended main work" << endl; + + +// OuterList_t::iterator OuterListBegin = OuterList.begin(); +// OuterList_t::iterator OuterListEnd = OuterList.end(); +// for( OuterList_t::iterator OuterListIter = OuterListBegin; +// OuterListIter != OuterListEnd; ++OuterListIter ) +// { +// fh_concept OuterListConcept = *OuterListIter; +// FerrisBitMagic::bvector<> OuterListIntent = OuterListConcept->getItemSet(); + +// nodes_t::iterator InnerListBegin = nodes.begin(); +// nodes_t::iterator InnerListEnd = nodes.end(); +// for( nodes_t::iterator InnerListIter = InnerListBegin; +// InnerListIter != InnerListEnd; ++InnerListIter ) +// { +// fh_concept InnerListConcept = *InnerListIter; +// FerrisBitMagic::bvector<> InnerListIntent = InnerListConcept->getItemSet(); + +// if( second_is_superset( OuterListIntent, InnerListIntent ) ) +// { +// OuterListConcept->makeLink( InnerListConcept, false ); +// } +// } +// } + + + + + + // If the synthetic lattice top node was made in error remove it and promote + // the correct child to become the new lattice top + { + fh_concept newRoot = 0; + + const clist_t& children = LatticeTop->getChildren(); + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + fh_concept child = *ci; + + if( child->getChildren().empty() ) + { + newRoot = *ci; + break; + } + } + if( newRoot ) + { + LG_FCA_D << "newRoot ID:" << newRoot->getID() << endl; + LG_FCA_D << "oldRoot ID:" << LatticeTop->getID() << endl; + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + if( (*ci)->getID() != newRoot->getID() ) + newRoot->makeLink( *ci, false ); + } + cl->removeConcept( LatticeTop ); + } + } + cerr << "TotalConcepts:" << nodes.size() << endl; + cerr << "TotalEdges:" << TotalEdges << endl; +} + + +struct myhash +{ + size_t + operator()(const extent_bitset_t& s) const + { + unsigned long __h = 0; + for( size_t an = s.find_first(); an!=extent_bitset_t::npos; an = s.find_next( an ) ) + __h = 5 * __h + an; + return size_t(__h); + } +}; + + +// pp38 Concept Data Analysis CoveringEdges() +void setupParentAndChildrenLinks_CoveringEdgesNativeBitSet() +{ + Time::Benchmark setupParentAndChildrenLinks_benchmark("setupParentAndChildrenLinks()"); + + int TotalEdges = 0; + LatticeTop = 0; + + // Create a new lattice top, we shall remove it later if there is already + // a top node in the lattice. + int NextID = nodes.size(); + LatticeTop = new Concept( cl ); + LatticeTop->setID( NextID ); + cl->addConcept( LatticeTop ); + LG_FCA_D << "CLARIFY:" << CLARIFY << endl; + LG_FCA_D << "Lattice top ID:" << LatticeTop->getID() << endl; + + Intents_t Intents; + typedef std::list< fh_concept > OuterList_t; + OuterList_t OuterList; + + copy( nodes.begin(), nodes.end(), back_inserter( OuterList ) ); + OuterList.push_front( LatticeTop ); + + + fca_std_bitset_t M = cl->getFullItemSetBitSet(); + stringlist_t allAttributeNames; + cl->getAllAttributeNames( allAttributeNames ); + + // Precalculate m' for every individual item in M + LG_FCA_D << "setting up m' cache..." << endl; + extent_bitset_t G; + VerticalFormalContextBitSet_t vfc; + { + Benchmark bm( "BENCH: setting up m' cache..."); + cl->getVerticalFormalContextBitSet( G, vfc, CLARIFY ); + } + + // Precalculate X for all {nodes} such that X AND m' is quick. + LG_FCA_D << "setting up X for all nodes..." << endl; + typedef map< fh_concept, extent_bitset_t > XCache_t; +// typedef map< extent_bitset_t, fh_concept > RevXCache_t; + typedef FERRIS_STD_HASH_MAP< extent_bitset_t, fh_concept, myhash > RevXCache_t; + XCache_t XCache; + RevXCache_t RevXCache; + { + Benchmark bm( "BENCH: setting up X for all nodes..."); + nodes_t::iterator nend = nodes.end(); + nodes_t::iterator niter = nodes.begin(); + for( ; niter != nend; ++niter ) + { + fh_concept c = *niter; + + extent_bitset_t X; + c->getExtentVerticalVectorBitSet( X, CLARIFY ); + + if( X.count() == 0 ) + { + LG_FCA_D << "ERROR! Processing concept:" << c->getID() << endl; + } + LG_FCA_D << "Setting up XCache for concept:" << c->getID() + << " X.sz:" << X.count() + << " X:" << tostr(X) + << endl; + + XCache[ c ] = X; + RevXCache[ X ] = c; + } + } + + +////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////// + + LG_FCA_D << "G.sz:" << G.count() << endl; + LG_FCA_D << "nodes.sz:" << nodes.size() << endl; + LG_FCA_D << "XCache.sz:" << XCache.size() << endl; + LG_FCA_D << "RevXCache.sz:" << RevXCache.size() << endl; + + // + // + // + cerr << "BENCH: Starting main work" << endl; + { + Benchmark bm( "BENCH: covering edges Finding parent/child links..."); + OuterList_t::iterator OuterListBegin = OuterList.begin(); + OuterList_t::iterator OuterListEnd = OuterList.end(); + for( OuterList_t::iterator OuterListIter = OuterListBegin; + OuterListIter != OuterListEnd; ++OuterListIter ) + { + fh_concept n = *OuterListIter; + const fca_std_bitset_t& nIntent = n->getItemSetBitSet(); + const extent_bitset_t& X = XCache[ n ]; + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "---------------------------------------------------" << endl << endl; + LG_FCA_D << "Processing concept:" << n->getID() + << " nIntent:" << tostr(nIntent) + << " X.sz:" << X.count() + << endl; + } + + // set count of any concept in C to 0 + typedef map< fh_concept, long > Counters_t; + Counters_t Counters; + + // Subtraction = M\Y +// fca_std_bitset_t Subtraction = M; +// Subtraction -= nIntent; + fca_std_bitset_t Subtraction = M ^ (M & nIntent); + + LG_FCA_D << "Subtraction:" << tostr(Subtraction) + << endl; + LG_FCA_D << "-------------" << endl; + + // For m in (M\Y) + + for( size_t an = Subtraction.find_first(); + an!=fca_std_bitset_t::npos; + an = Subtraction.find_next( an ) ) + { + long m = an; + +// inters = X AND m'; + extent_bitset_t inters = X; + inters &= vfc[ m ]; + LG_FCA_D << "m:" << m << " X.sz:" << X.count() << " vfc[ m ].size:" << vfc[ m ].count() + << " inters.size:" << inters.count() << endl; + if( vfc[ m ].count() < 10 ) + LG_FCA_D << "vfc[ m ]... " << tostr( vfc[ m ] ) << endl; + +// fh_concept tc = find( C with X==inters ); +// typedef map< FerrisBitMagic::bvector<>, fh_concept > RevXCache_t; + RevXCache_t::iterator tciter = RevXCache.find( inters ); + if( tciter == RevXCache.end() ) + continue; + + fh_concept tc = tciter->second; + const fca_std_bitset_t& tcIntent = tc->getItemSetBitSet(); + long newCount = (++Counters[ tc ]); + LG_FCA_D << "incrementing count(x1,y1) concept:" << tc->getID() + << " newCount:" << newCount + << " tcIntent.count():" << tcIntent.count() + << " nIntent.count():" << nIntent.count() + << " tcIntent:" << tostr(tcIntent) + << endl; + + if( tcIntent.count() - nIntent.count() == newCount ) + { +// LG_FCA_D << "TESTING2!.................." << endl; +// if( n != tc ) + { + n->makeLink( tc, false ); + ++TotalEdges; + } + } + } + } + } + cerr << "BENCH: Ended main work" << endl; + + +////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////// + + + + // If the synthetic lattice top node was made in error remove it and promote + // the correct child to become the new lattice top + { + fh_concept newRoot = 0; + + const clist_t& children = LatticeTop->getChildren(); + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + fh_concept child = *ci; + + if( child->getChildren().empty() ) + { + newRoot = *ci; + break; + } + } + if( newRoot ) + { + LG_FCA_D << "newRoot ID:" << newRoot->getID() << endl; + LG_FCA_D << "oldRoot ID:" << LatticeTop->getID() << endl; + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + if( (*ci)->getID() != newRoot->getID() ) + newRoot->makeLink( *ci, false ); + } + cl->removeConcept( LatticeTop ); + } + } + cerr << "TotalConcepts:" << nodes.size() << endl; + cerr << "TotalEdges:" << TotalEdges << endl; +} + + + +void first_and_eq_second( FerrisBitMagic::bvector<>& a, + const FerrisBitMagic::bvector<>& b ) +{ + a &= b; +} + + + +#ifdef USE_BVMINI +void first_and_eq_second( + FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::bvmini<64> >& a, + const FerrisBitMagic::bvector<>& blarge ) +{ + FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::bvmini<64> > b64; + to_bvmini( blarge, b64 ); + a &= b64; +} +#endif + + +// An extension method +void first_and_eq_second( FerrisBitMagic::bvector< + FerrisBitMagic::standard_allocator, + FerrisBitMagic::miniset< + FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >& a, + const FerrisBitMagic::bvector<>& b ) +{ + typedef FerrisBitMagic::bvector<>::enumerator enumerator_t; +// typedef FerrisBitMagic::bvector< +// FerrisBitMagic::standard_allocator, +// FerrisBitMagic::miniset< +// FerrisBitMagic::block_allocator, FerrisBitMagic::set_total_blocks> >::enumerator enumerator_t; + enumerator_t bn = b.first(); + enumerator_t bn_end = b.end(); + + while (bn < bn_end) + { + a[*bn] = 1; + ++bn; + } +} + + +string getTEXLabel( const FerrisBitMagic::bvector<>& bv ) +{ + stringlist_t sl; + cl->AttrIDToStringList( bv, sl ); + stringstream ss; + ss << "\\{"; + for( stringlist_t::iterator si = sl.begin(); si != sl.end(); ++si ) + ss << *si; + //ss << Util::createSeperatedList( sl, '' ); + ss << "\\}"; + return ss.str(); +} + + + +FerrisBitMagic::bvector<> to_bvector( const fca_std_bitset_t& bv ) +{ + int bv_sz = bv.size(); + FerrisBitMagic::bvector<> ret( FerrisBitMagic::BM_BIT, + FerrisBitMagic::gap_len_table_min::_len, + bv_sz ); + for ( fca_std_bitset_t::size_type i = 0; i < bv_sz; ++i) + ret[i] = bv[i]; + return ret; +} + +string getTEXLabel( const fca_std_bitset_t& bv ) +{ + return getTEXLabel( to_bvector( bv ) ); +} + + +void setupParentAndChildrenLinks( bool useGIST = false, bool populateGIST = true ) +{ + Time::Benchmark setupParentAndChildrenLinks_benchmark("setupParentAndChildrenLinks()"); + +// cerr << "setupParentAndChildrenLinks(top)" << endl; + + int TotalEdges = 0; + LatticeTop = 0; +// for( nodes_t::iterator ni = nodes.begin(); ni != nodes.end(); ++ni ) +// { +// fh_concept n = *ni; +// if( isZero( n->getItemSet() ) ) +// { +// LatticeTop = n; +// nodes.erase( ni ); +// break; +// } +// } + + int nodes_sz = nodes.size(); + + if( LatticeTop ) + { + } + else + { + // Create a new lattice top, we shall remove it later if there is already + // a top node in the lattice. + int NextID = nodes_sz; + LatticeTop = new Concept( cl ); + LatticeTop->setID( NextID ); + cl->addConcept( LatticeTop ); + } + LG_FCA_D << "Lattice top ID:" << LatticeTop->getID() << endl; + if( LatticeBottom ) + LG_FCA_D << "LatticeBottom ID:" << LatticeBottom->getID() << endl; + LG_FCA_D << "TRACE. Lattice top ID:" << LatticeTop->getID() << endl; + if( LatticeBottom ) + LG_FCA_D << "TRACE. LatticeBottom ID:" << LatticeBottom->getID() << endl; + + + bool Collect_sumOfAllIntentIntersectionSizes = true; + typedef map< int, int > sumOfAllIntentIntersectionSizes_t; + sumOfAllIntentIntersectionSizes_t sumOfAllIntentIntersectionSizes; + int sumOfAllBorderSizes = 0; + Intents_t Intents; + clist_t Border; + Border.insert( LatticeTop ); + +#ifdef HAVE_LIBGISTMIQ + typedef bvector<> key_type; + typedef EasyRDTreeClientNative tree_type; + tree_type BorderGIST("tmp-fca-gist-border"); + tree_type::iterator BorderGIST_end = BorderGIST.end(); + BorderGIST.insert( LatticeTop->getItemSetBitSet(), LatticeTop->getID() ); + cerr << "TOP.bv:" << libgist::tostr( LatticeTop->getItemSetBitSet() ) << endl; +// fh_concept BorderGIST_PossibleExtraConcept = LatticeTop; +#endif + + FerrisBitMagic::bvector<> tmpbv( //FerrisBitMagic::BM_GAP, + FerrisBitMagic::BM_BIT, + FerrisBitMagic::gap_len_table::_len, + 64 ); + +// // Intents.reserve( nodes_sz ); +// typedef vector< IntentsData* > IDataCache_t; +// IDataCache_t IDataCache; +// int IDataCache_sz = nodes_sz + 10; +// IDataCache.reserve( IDataCache_sz ); +// FerrisBitMagic::bvector<> IDataCacheTemplate; +// for( int i=0; i < IDataCache_sz; ++i ) +// { +// IDataCache[i] = new IntentsData( 0, IDataCacheTemplate ); +// } +// IDataCache_t::iterator IDataCacheEnd = IDataCache.end(); +// IDataCache_t::iterator IDataCacheBegin = IDataCache.begin(); +// IDataCache_t::iterator IDataCacheIter = IDataCacheBegin; + + + Benchmark bm( "BENCH: border Finding parent/child links..."); + nodes_t::iterator begin = nodes.begin(); + nodes_t::iterator end = nodes.end(); + for( nodes_t::iterator ni = begin; ni != end; ++ni ) + { + fh_concept n = *ni; +// n->optimizeItemSet(); +#ifdef USE_BITSET + const fca_std_bitset_t& nIntent = n->getItemSetBitSet(); +#else + const FerrisBitMagic::bvector<>& nIntent = n->getItemSet(); +#endif + + + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "--- Starting on n:" << n->getID() << " ---------------------" << endl; + dumpBits( n->getItemSet() ); + { + fh_stringstream ss; + dump( ss, Border, "border set" ); + LG_FCA_D << "" << ss.str() << endl; + } + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "------------------------------------------------------------" << endl; + } + + + + Intents.clear(); +// IDataCacheIter = IDataCacheBegin; + +#ifdef HAVE_LIBGISTMIQ + + if( useGIST ) + { +// if( LG_FCA_ACTIVE ) +// { +// LG_FCA_D << " nIntent:"; dumpBits( nIntent ); +// } + + + tree_type::iterator iter = BorderGIST.subsets( nIntent ); + for( ; iter != BorderGIST_end; ++iter ) + { + LG_FCA_D << "---------------" << endl; + LG_FCA_D << "iter.data:" << iter->second << endl; + LG_FCA_D << "iter.bv:" << libgist::tostr_binary(iter->first) << endl; + + long cid = iter->second; + LG_FCA_D << "GIST concept-id:" << cid << endl; + fh_concept borderNode = cl->getConcept( cid ); + + fh_IntentsData idata = new IntentsData( borderNode, borderNode->getItemSetBitSet() ); + idata->intent &= nIntent; + int count = idata->intent.count(); + Intents.insert( make_pair( count, idata ) ); + + if( Collect_sumOfAllIntentIntersectionSizes ) + { + sumOfAllIntentIntersectionSizes[count]++; + } + + LG_FCA_D << " borderID :" << borderNode->getID() << endl; + LG_FCA_D << " borderIntent:"; dumpBits( borderNode->getItemSet() ); + + } + } + +#endif + + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "TRACE. ===========================================" << endl; + LG_FCA_D << "TRACE. ===========================================" << endl; + LG_FCA_D << "TRACE. ===========================================" << endl; + LG_FCA_D << "TRACE. WORKING ON CONCEPT:" << n->getID() << endl; + LG_FCA_D << "TRACE. WORKING ON CONCEPT:" << n->getItemSetBitSet() << endl; + { + LG_FCA_D << "TRACE.TEX \\item Current Concept = $\\{" + << getTEXLabel(n->getItemSet()) + << "\\}$ \\\\" << endl; + } + + stringstream borderTEX; + LG_FCA_D << "TRACE. ------border dump -------------- " << endl; + LG_FCA_D << "TRACE. Border.sz:" << Border.size() << endl; + for( clist_t::const_iterator bi = Border.begin(); bi!=Border.end(); ++bi ) + { + fh_concept borderNode = *bi; + const fca_std_bitset_t& bnodebits = borderNode->getItemSetBitSet(); + LG_FCA_D << "TRACE. borderID :" << borderNode->getID() << endl; + LG_FCA_D << "TRACE. borderIntent:" << bnodebits << endl; + if( !borderTEX.str().empty() ) + borderTEX << ", "; + borderTEX << getTEXLabel(borderNode->getItemSet()); + } + LG_FCA_D << "TRACE. ------border dump -------------- " << endl; + + + { + LG_FCA_D << "TRACE.TEX Border = $\\{" + << borderTEX.str() + << "\\}$ \\\\" << endl; + } + + + if( LatticeBottom && n->getID() == LatticeBottom->getID() ) + { + LG_FCA_D << "TRACE. BOTTOM NODE!---------- " << endl; + LG_FCA_D << "TRACE. borderID :" << n->getID() << endl; + LG_FCA_D << "TRACE. borderIntent:" << n->getItemSetBitSet() << endl; + fh_stringstream ss; + dumpBits( n->getItemSet(), ss ); + LG_FCA_D << "TRACE. borderIntent:" << ss.str() << endl; + + } + + } + + if( !useGIST ) + { + + for( clist_t::const_iterator bi = Border.begin(); bi!=Border.end(); ++bi ) + { + fh_concept borderNode = *bi; +// fh_IntentsData idata = new IntentsData( borderNode, borderNode->getItemSet() & nIntent ); + +#ifdef USE_BITSET + + fh_IntentsData idata = new IntentsData( borderNode, borderNode->getItemSetBitSet() ); + LG_FCA_D << "TRACE.bi bn.bits:" << borderNode->getItemSetBitSet() << endl; + LG_FCA_D << "TRACE.bi d.intent1:" << idata->intent << endl; + + idata->intent &= nIntent; + int count = idata->intent.count(); + Intents.insert( make_pair( count, idata ) ); + + LG_FCA_D << "TRACE.bi d.intent2:" << idata->intent << endl; +#else + + fh_IntentsData idata = new IntentsData( borderNode, borderNode->getItemSet() ); +// idata->intent &= nIntent; + first_and_eq_second( idata->intent, nIntent ); +// idata->intent.optimize(); + int count = idata->intent.count(); + Intents.insert( make_pair( count, idata ) ); + +#endif + +// IntentsData* idata = *IDataCacheIter; +// ++IDataCacheIter; +// idata->node = borderNode; +// idata->intent = borderNode->getItemSet() & nIntent; +// // first_and_eq_second( idata->intent, nIntent ); +// int count = idata->intent.count(); +// Intents.insert( make_pair( count, idata ) ); + + +// FerrisBitMagic::bvector<> tmpbv( borderNode->getItemSet() ); +// tmpbv &= nIntent; +// int count = tmpbv.count(); +// if( !count ) +// continue; +// fh_IntentsData idata = new IntentsData( borderNode, tmpbv ); +// Intents.insert( make_pair( count, idata ) ); + + + + if( Collect_sumOfAllIntentIntersectionSizes ) + { + sumOfAllIntentIntersectionSizes[count]++; + } + + + LG_FCA_D << " borderID :" << borderNode->getID() << endl; + LG_FCA_D << " borderIntent:"; dumpBits( borderNode->getItemSet() ); +// LG_FCA_D << "generatedIntent:"; dumpBits( idata->intent ); + } + } + + if( LG_FCA_ACTIVE ) + { + stringstream borderTEX; + LG_FCA_D << "TRACE. ------intents dump -------------- " << endl; + LG_FCA_D << "TRACE. Intents.sz:" << Intents.size() << endl; + for( Intents_t::reverse_iterator ii = Intents.rbegin(); ii!=Intents.rend(); ++ii ) + { + const IntentsData::intent_t& iIntent = ii->second->intent; + LG_FCA_D << "TRACE. nodeID:" << ii->second->node->getID() << endl; + LG_FCA_D << "TRACE. node-intent:" << ii->second->node->getItemSetBitSet() << endl; + LG_FCA_D << "TRACE. sec-intent:" << ii->second->intent << endl; + + if( !borderTEX.str().empty() ) + borderTEX << ", "; +// borderTEX << getTEXLabel(ii->second->node->getItemSet()); + borderTEX << getTEXLabel(ii->second->intent); + } + LG_FCA_D << "TRACE. ------intents dump -------------- " << endl; + + { + LG_FCA_D << "TRACE.TEX Intents = $\\{" + << borderTEX.str() + << "\\}$ \\\\" << endl; + } + } + + + // Filter Intents to only have Maxima + Intents_t CoverIntents; + Maxima( Intents, CoverIntents ); + + + if( LG_FCA_ACTIVE ) + { + stringstream borderTEX; + LG_FCA_D << "TRACE. ------CoverIntents dump -------------- " << endl; + LG_FCA_D << "TRACE. CoverIntents.sz:" << CoverIntents.size() << endl; + for( Intents_t::reverse_iterator ii = CoverIntents.rbegin(); ii!=CoverIntents.rend(); ++ii ) + { + const IntentsData::intent_t& iIntent = ii->second->intent; + LG_FCA_D << "TRACE. nodeID:" << ii->second->node->getID() << endl; + LG_FCA_D << "TRACE. node-intent:" << ii->second->node->getItemSetBitSet() << endl; + LG_FCA_D << "TRACE. sec-intent:" << ii->second->intent << endl; + + if( !borderTEX.str().empty() ) + borderTEX << ", "; +// borderTEX << getTEXLabel(ii->second->node->getItemSet()); + borderTEX << getTEXLabel(ii->second->intent); + } + LG_FCA_D << "TRACE. ------intents dump -------------- " << endl; + + { + LG_FCA_D << "TRACE.TEX Maxima(Intents) = $\\{" + << borderTEX.str() + << "\\}$ \\\\" << endl; + } + } + + + + sumOfAllBorderSizes += Border.size(); + LG_FCA_D << "Border.size:" << Border.size() << endl; + LG_FCA_D << "Intents.size:" << Intents.size() << endl; + LG_FCA_D << "CoverIntents.size:" << CoverIntents.size() << endl; + + for( Intents_t::const_iterator ii = CoverIntents.begin(); ii!=CoverIntents.end(); ++ii ) + { +// LG_FCA_D << "Calling findconcept(1)" << endl; + + fh_concept parent = FindConcept( ii->second->node, ii->second->intent ); + +// LG_FCA_D << "Called findconcept(2)" << endl; + if( !parent ) + { + LG_FCA_D << "ERROR concept not found for intent" << endl; +// dumpBits( ii->second->intent ); + LG_FCA_D << endl << endl; + continue; + } + LG_FCA_D << "parent:" << parent->getID() << endl; + LG_FCA_D << "child:" << n->getID() << endl; + parent->makeLink( n, false ); + TotalEdges++; + + + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "TRACE. parent:" << parent->getID() << " child:" << n->getID() << endl; + LG_FCA_D << "TRACE. parent:" << parent->getItemSetBitSet() + << " child:" << n->getItemSetBitSet() << endl; + + { + LG_FCA_D << "TRACE.TEX Add edge $" + << getTEXLabel(parent->getItemSet()) + << " \\rightarrow " + << getTEXLabel(n->getItemSet()) + << "$ \\\\" << endl; + } + + } + + if( useGIST ) + { +#ifdef HAVE_LIBGISTMIQ + BorderGIST.erase( parent->getItemSetBitSet() ); +#endif + } + else + { + Border.erase( parent ); + } + + if( LG_FCA_ACTIVE ) + { + fh_stringstream ss; + dumpBits( parent->getItemSet(), ss ); + LG_FCA_D << "Removing from border set:" << ss.str(); + } + } +#ifdef HAVE_LIBGISTMIQ + if( useGIST ) + { + BorderGIST.insert( n->getItemSetBitSet(), n->getID() ); + } +#endif + if( !useGIST ) + { + Border.insert( n ); + } + } + bm.print(); + + + // If the synthetic lattice top node was made in error remove it and promote + // the correct child to become the new lattice top + { + fh_concept newRoot = 0; + + const clist_t& children = LatticeTop->getChildren(); + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + fh_concept child = *ci; + + if( child->getChildren().empty() ) + { + newRoot = *ci; + break; + } + } + if( newRoot ) + { + LG_FCA_D << "newRoot ID:" << newRoot->getID() << endl; + LG_FCA_D << "oldRoot ID:" << LatticeTop->getID() << endl; + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + if( (*ci)->getID() != newRoot->getID() ) + newRoot->makeLink( *ci, false ); + } + cl->removeConcept( LatticeTop ); + } + } + + + + + + if( Collect_sumOfAllIntentIntersectionSizes ) + { + int nodes_sz = nodes.size(); + if( !nodes_sz ) nodes_sz = 1; + + for( sumOfAllIntentIntersectionSizes_t::const_iterator ci = sumOfAllIntentIntersectionSizes.begin(); + ci != sumOfAllIntentIntersectionSizes.end(); ++ci ) + { + int sz = ci->first; + int count = ci->second; + + cerr << "Intent.sz:" << sz + << " intersection count:" << count + << " avg per concept:" << (count*1.0/nodes_sz) + << endl; + + } + } + + + if( !nodes.empty() ) + cerr << "Average border size:" << (1.0*sumOfAllBorderSizes/nodes.size()) << endl; + cerr << "TotalConcepts:" << nodes.size() << endl; + cerr << "TotalEdges:" << TotalEdges << endl; +} + + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + +struct IntentsDataNative; +FERRIS_SMARTPTR( IntentsDataNative, fh_IntentsDataNative ); +struct IntentsDataNative : public Handlable +{ + fh_concept node; + typedef guint64 intent_t; + intent_t intent; + + static intent_t toNative( const FerrisBitMagic::bvector<>& _intent ) + { + intent_t ret = 0; + FerrisBitMagic::bvector<>::enumerator an = _intent.first(); + FerrisBitMagic::bvector<>::enumerator an_end = _intent.end(); + + while (an < an_end) + { + ret |= ( 1ULL << *an ); + ++an; + } + return ret; + } + IntentsDataNative( fh_concept node, const FerrisBitMagic::bvector<>& _intent ) + : + node( node ), intent( 0 ) + { + intent = toNative( _intent ); + } + + void operator&= ( const FerrisBitMagic::bvector<>& _intent ) + { + intent &= toNative( _intent ); + } + + void operator&= ( intent_t v ) + { + intent &= v; + } + + int getIntentCount() + { + long ret = 0; + for( long i = 0; i < 64; ++i ) + { + if( (intent >> i) & 0x1 == 0x1 ) + ++ret; + } + return ret; + +// return (int)log2( intent ); + } + + bool arg_is_superset( fh_IntentsDataNative& other ) + { + intent_t v = other->intent; + intent_t t = intent & v; + return t == intent; + } + bool arg_is_superset( const FerrisBitMagic::bvector<>& other ) + { + intent_t v = toNative( other ); + intent_t t = intent & v; + return t == intent; + } + bool equiv( const FerrisBitMagic::bvector<>& other ) + { + intent_t v = toNative( other ); + return v == intent; + } + + +}; +typedef multimap< int, fh_IntentsDataNative > IntentsNative_t; + + +IntentsNative_t& Maxima( IntentsNative_t& input, IntentsNative_t& ret ) +{ + for( IntentsNative_t::reverse_iterator ii = input.rbegin(); ii!=input.rend(); ++ii ) + { +// const IntentsDataNative::intent_t& iIntent = ii->second->intent; + bool ismin = true; + for( IntentsNative_t::iterator ri = ret.begin(); ri!=ret.end(); ++ri ) + { +// ismin &= (!second_is_superset(iIntent, ri->second->intent)); + ismin &= !ii->second->arg_is_superset( ri->second ); + if( !ismin ) + break; + } + + if( ismin ) + { + ret.insert( *ii ); + } + } + + return ret; +} + + +fh_concept FindConceptNative( fh_concept startc, fh_IntentsDataNative intent ) +{ +// cerr << "FindConceptNative(enter)" << endl; + fh_concept c = startc; + while( !intent->equiv( c->getItemSet() ) ) + { + bool changedC = false; + const clist_t& pl = c->getParents(); +// cerr << "FindConceptNative() c:" << c->getID() << " pl.sz:" << pl.size() << endl; + for( clist_t::const_iterator pi = pl.begin(); pi!=pl.end(); ++pi ) + { +// if( !second_is_superset( intent, (*pi)->getItemSet() ) ) + if( !intent->arg_is_superset( (*pi)->getItemSet() ) ) + { +// cerr << "FindConceptNative(SS) pi:" << (*pi)->getID() << endl; + continue; + } + c = *pi; + changedC = true; + break; + } + if( !changedC ) + { +// cerr << "FindConceptNative(exit)" << endl; + return 0; + } + } +// cerr << "FindConceptNative(exit)" << endl; + return c; +} + + +void setupParentAndChildrenLinks_NativeBits() +{ + Time::Benchmark setupParentAndChildrenLinks_benchmark("setupParentAndChildrenLinks()"); + + + int TotalEdges = 0; + LatticeTop = 0; + + if( LatticeTop ) + { + } + else + { + // Create a new lattice top, we shall remove it later if there is already + // a top node in the lattice. + int NextID = nodes.size(); + LatticeTop = new Concept( cl ); + LatticeTop->setID( NextID ); + cl->addConcept( LatticeTop ); + } + LG_FCA_D << "Lattice top ID:" << LatticeTop->getID() << endl; + + bool Collect_sumOfAllIntentIntersectionSizes = true; + typedef map< int, int > sumOfAllIntentIntersectionSizes_t; + sumOfAllIntentIntersectionSizes_t sumOfAllIntentIntersectionSizes; + int sumOfAllBorderSizes = 0; + IntentsNative_t Intents; + clist_t Border; + Border.insert( LatticeTop ); + + Benchmark bm( "BENCH: native border Finding parent/child links..."); + nodes_t::iterator begin = nodes.begin(); + nodes_t::iterator end = nodes.end(); + for( nodes_t::iterator ni = begin; ni != end; ++ni ) + { + fh_concept n = *ni; + const FerrisBitMagic::bvector<>& nIntent = n->getItemSet(); + IntentsDataNative::intent_t nIntent64 = IntentsDataNative::toNative( nIntent ); + + if( LG_FCA_ACTIVE ) + { + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "--- Starting on n:" << n->getID() << " ---------------------" << endl; + dumpBits( n->getItemSet() ); + { + fh_stringstream ss; + dumpBits( IntentsDataNative::toNative( n->getItemSet()), ss ); + LG_FCA_D << ss.str() << endl; + } + IntentsDataNative idata( n, n->getItemSet() ); + IntentsDataNative::intent_t testA = 0x000000000000000FULL; + bvector<> tmp; + tmp[0] = 1; + tmp[1] = 1; + tmp[2] = 1; + LG_FCA_D << "intent-count:" << idata.getIntentCount() << endl; + idata &= tmp; + { + fh_stringstream ss; + dumpBits( idata.intent, ss ); + LG_FCA_D << "n.itemset&[0,1,2] = :" << ss.str() << endl; + } + + { + fh_stringstream ss; + dump( ss, Border, "border set" ); + LG_FCA_D << "" << ss.str() << endl; + } + + LG_FCA_D << "------------------------------------------------------------" << endl; + LG_FCA_D << "------------------------------------------------------------" << endl; + } + + + Intents.clear(); + for( clist_t::const_iterator bi = Border.begin(); bi!=Border.end(); ++bi ) + { + fh_concept borderNode = *bi; +// fh_IntentsDataNative idata = new IntentsDataNative( borderNode, borderNode->getItemSet() & nIntent ); + fh_IntentsDataNative idata = new IntentsDataNative( borderNode, borderNode->getItemSet() ); + + + +// idata->intent &= nIntent; + (*idata) &= nIntent64; + + + + int count = idata->getIntentCount(); + Intents.insert( make_pair( count, idata ) ); + + if( Collect_sumOfAllIntentIntersectionSizes ) + { + sumOfAllIntentIntersectionSizes[count]++; + } + + LG_FCA_D << " borderID :" << borderNode->getID() << endl; + LG_FCA_D << " borderIntent:"; dumpBits( borderNode->getItemSet() ); +// LG_FCA_D << "generatedIntent:"; dumpBits( idata->intent ); + } + + // Filter Intents to only have Maxima + IntentsNative_t CoverIntents; + Maxima( Intents, CoverIntents ); + + sumOfAllBorderSizes += Border.size(); + LG_FCA_D << "Border.size:" << Border.size() << endl; + LG_FCA_D << "Intents.size:" << Intents.size() << endl; + LG_FCA_D << "CoverIntents.size:" << CoverIntents.size() << endl; + + for( IntentsNative_t::const_iterator ii = CoverIntents.begin(); ii!=CoverIntents.end(); ++ii ) + { + fh_concept parent = FindConceptNative( ii->second->node, ii->second ); + if( !parent ) + { + LG_FCA_D << "ERROR concept not found for intent" << endl; +// dumpBits( ii->second->intent ); + LG_FCA_D << endl << endl; + continue; + } + LG_FCA_D << "parent:" << parent->getID() << endl; + LG_FCA_D << "child:" << n->getID() << endl; + parent->makeLink( n, false ); + TotalEdges++; + Border.erase( parent ); + + if( LG_FCA_ACTIVE ) + { + fh_stringstream ss; + dumpBits( parent->getItemSet(), ss ); + LG_FCA_D << "Removing from border set:" << ss.str(); + } + } + Border.insert( n ); + } + bm.print(); + + + // If the synthetic lattice top node was made in error remove it and promote + // the correct child to become the new lattice top + { + fh_concept newRoot = 0; + + const clist_t& children = LatticeTop->getChildren(); + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + fh_concept child = *ci; + + if( child->getChildren().empty() ) + { + newRoot = *ci; + break; + } + } + if( newRoot ) + { + LG_FCA_D << "newRoot ID:" << newRoot->getID() << endl; + LG_FCA_D << "oldRoot ID:" << LatticeTop->getID() << endl; + for( clist_t::const_iterator ci = children.begin(); ci!=children.end(); ++ci ) + { + if( (*ci)->getID() != newRoot->getID() ) + newRoot->makeLink( *ci, false ); + } + cl->removeConcept( LatticeTop ); + } + } + + + + + + if( Collect_sumOfAllIntentIntersectionSizes ) + { + int nodes_sz = nodes.size(); + if( !nodes_sz ) nodes_sz = 1; + + for( sumOfAllIntentIntersectionSizes_t::const_iterator ci = sumOfAllIntentIntersectionSizes.begin(); + ci != sumOfAllIntentIntersectionSizes.end(); ++ci ) + { + int sz = ci->first; + int count = ci->second; + + cerr << "Intent.sz:" << sz + << " intersection count:" << count + << " avg per concept:" << (count*1.0/nodes_sz) + << endl; + + } + } + + + if( !nodes.empty() ) + cerr << "Average border size:" << (1.0*sumOfAllBorderSizes/nodes.size()) << endl; + cerr << "TotalConcepts:" << nodes.size() << endl; + cerr << "TotalEdges:" << TotalEdges << endl; +} + + + + +void dumpParentChildrenLinks() +{ + for( nodes_t::iterator ni = nodes.begin(); + ni != nodes.end(); ++ni ) + { + fh_concept c = *ni; + cerr << "c:" << c->getID() << " has-children" << endl; + clist_t& children = c->getChildren(); + + for( clist_t::iterator ci = children.begin(); ci != children.end(); ++ci ) + { + cerr << " child:" << (*ci)->getID() << endl; + } + cerr << endl; + } +} + +// +// precalculate the number of objects which match only this concept. +// ie. they are not in any of the subconcepts. +// +void +setupConceptOnlySupport() +{ + Time::Benchmark refreshAllConceptsContingentCounter_benchmark("refreshAllConceptsContingentCounter()"); + cl->refreshAllConceptsContingentCounter(); + +// for( nodes_t::iterator ni = nodes.begin(); ni != nodes.end(); ++ni ) +// { +// fh_concept c = *ni; +// c->updateConceptOnlyMatchSize(); +// } +} + + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + +int main( int argc, const char** argv ) +{ + unsigned long ShowVersion = 0; + const char* flatticeTreePath_CSTR = 0; + unsigned long UseCoveringEdgesAlgo = 0; + unsigned long UseCoveringEdgesAlgoNative = 0; + unsigned long UseNativeBitsBorder = 0; + unsigned long DumpLinksToCerr = 0; + unsigned long DumpNodesToCerr_PriorToFindingLinks = 0; + unsigned long DontSave = 0; + unsigned long useGIST = 0; + unsigned long populateGIST = 0; + +#ifdef HAVE_LIBGISTMIQ + gist_init(); +#endif + + struct poptOption optionsTable[] = { + + { "lattice-tree-path", 'L', POPT_ARG_STRING, &flatticeTreePath_CSTR, 0, + "url for the lattice tree", "" }, + + { "gist", 'g', POPT_ARG_NONE, &useGIST, 0, + "use rd-tree based gist to speed up set selects", "" }, + + { "populate-gist", 'G', POPT_ARG_NONE, &populateGIST, 0, + "assume that gist needs to be populated before use (no existing tree on disk)", "" }, + + { "covering-edges-algo", 0, POPT_ARG_NONE, &UseCoveringEdgesAlgo, 0, + "use covering-edges method from concept data analysis (debug/benchmark)", 0 }, + + { "covering-edges-algo-native", 0, POPT_ARG_NONE, &UseCoveringEdgesAlgoNative, 0, + "use covering-edges method (with boost::dynamic_bitset<>) from concept data analysis (debug/benchmark)", 0 }, + + + { "native-bits-border", 0, POPT_ARG_NONE, &UseNativeBitsBorder, 0, + "use native long long for bitmask in border algo. Only useful with formal attribute count < 64 (debug/benchmark)", 0 }, + + { "results-to-cerr", 0, POPT_ARG_NONE, &DumpLinksToCerr, 0, + "show parent/child links found to cerr for debugging.", 0 }, + + { "dump-nodes-prior", 0, POPT_ARG_NONE, &DumpNodesToCerr_PriorToFindingLinks, 0, + "show all nodes in traversal order before finding parent/child relations..", 0 }, + + { "dont-save", 0, POPT_ARG_NONE, &DontSave, 0, + "dont save any modifications to the database..", 0 }, + + { "clarify", 0, POPT_ARG_NONE, &CLARIFY, 0, + "For covering-edges, clarify the context first..", 0 }, + + /* + * Other handy stuff + */ + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "-L path-to-fcatree-subdir [OPTIONS]* ..."); + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + + if (argc < 2 || !flatticeTreePath_CSTR ) + { + if( !flatticeTreePath_CSTR ) + cerr << "ERROR: you must supply an fca lattice tree path" << endl; + +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(5); + } + flatticeTreePath = flatticeTreePath_CSTR; + + if( ShowVersion ) + { + cout << "LatticeFromCFI version: $Id: ferris-lattice-from-cfi.cpp,v 1.33 2010/09/24 21:31:11 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << endl + << endl + << "Copyright (C) 2005 Ben Martin" << endl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + try + { + cerr << "getting the data..." << endl; + + cl = ConceptLattice::load( flatticeTreePath ); + maxID = cl->getHighestConceptID(); + cerr << "maxid:" << maxID << endl; + fh_concept c = cl->getConcept( maxID ); + + // + // Make sure there is a bottom element. + // + cerr << "got maxid concept:" << c->getID() << endl; + FerrisBitMagic::bvector<> bv_full = cl->getFullItemSet(); + + cerr << "bv_full:" << bv_full << endl; + cerr << "maxc_bv:" << c->getItemSet() << endl; + + if( equiv( bv_full & c->getItemSet(), bv_full ) ) + { + LatticeBottom = c; + cerr << "LatticeBottom = " << c->getID() << endl; + } + else + { + cerr << "Making new lattice bottom..." << endl; + LatticeBottomIsAlreadyInDatabase = false; + + LatticeBottom = new Concept( cl ); + LatticeBottom->setID( maxID + 1000 ); + LatticeBottom->setItemSet( bv_full ); + cl->addConcept( LatticeBottom ); + cerr << "new LatticeBottom = " << c->getID() << endl; + } + + + cerr << "getting nodes..." << endl; + cl->getConcepts( nodes ); + cerr << "got nodes..." << endl; + + if( DumpNodesToCerr_PriorToFindingLinks ) + dumpNodes( Factory::fcout() ); + + cerr << "Working out the parent/child relations..." << endl; + if( UseCoveringEdgesAlgo ) + { + setupParentAndChildrenLinks_CoveringEdges( useGIST, populateGIST ); + } + else if( UseCoveringEdgesAlgoNative ) + { + setupParentAndChildrenLinks_CoveringEdgesNativeBitSet(); + } + else if( UseNativeBitsBorder ) + { + setupParentAndChildrenLinks_NativeBits(); + } + else + { + setupParentAndChildrenLinks( useGIST ); + } + + if( DumpLinksToCerr ) + dumpParentChildrenLinks(); + +// cerr << "FIXME! not saving!" << endl; + if( !DontSave ) + { + cerr << "Finding the contingent size for each concept..." << endl; + setupConceptOnlySupport(); + + cl->save(); + cl->fixInvalidTopLevelConcepts(); + } + + cerr << "all done." << endl; + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "error:" << e.what() << endl; + exit(3); + } + + + poptFreeContext(optCon); + cout << flush; + return hadErrors; +} diff --git a/apps/fca/gf-create-fca-scale-numeric.cpp b/apps/fca/gf-create-fca-scale-numeric.cpp new file mode 100644 index 0000000..18f6d84 --- /dev/null +++ b/apps/fca/gf-create-fca-scale-numeric.cpp @@ -0,0 +1,778 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: gf-create-fca-scale-numeric.cpp,v 1.4 2010/09/24 21:31:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include + +#include "libferrisfcascaling.hh" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +const string PROGRAM_NAME = "ferris-create-fca-scale-numeric"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +unsigned long OutputDouble = 0; +unsigned long OutputInterval = 0; +string attrname; + +GtkWidget* gtk_window; +gfloat scale = 1.0; +gint page_width = (int)(GTK_PLOT_LETTER_H * scale); +gint page_height = (int)(GTK_PLOT_LETTER_W * scale/2); +gint nlayers = 0; +GtkPlotCanvas *canvas = 0; +GtkWidget *active_plot = 0; + +typedef map< string, string, versionltstr > SelectedValues_t; +SelectedValues_t SelectedValues; + +void +quit () +{ + gtk_main_quit(); +} + +GtkWidget * +new_layer(GtkWidget *canvas) +{ + GtkWidget* plot = 0; + + plot = gtk_plot_new_with_size(NULL, 1.0, 1.0 ); + gtk_widget_show( plot ); + + return plot; +} + +GtkPlotData *dataset[5]; +void +build_example1(GtkWidget *plot) +{ + GdkColor color; + GdkColor color2; + GtkPlotAxis *axis; + + static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; + static gdouble py1[]={.2, .4, .5, .35, .30, .40}; + static gdouble dx1[]={.2, .2, .2, .2, .2, .2}; + static gdouble dy1[]={.1, .1, .1, .1, .1, .1}; + + static gdouble px2[]={0., -0.2, -0.4, -0.6, -0.8, -1.0}; + static gdouble py2[]={.2, .4, .5, .35, .30, .40}; + static gdouble dx2[]={.2, .2, .2, .2, .2, .2}; + static gdouble dy2[]={.1, .1, .1, .1, .1, .1}; + + /* CUSTOM TICK LABELS */ + +// gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_RIGHT), TRUE); +// axis = gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_RIGHT); +// gtk_signal_connect(GTK_OBJECT(axis), "tick_label", +// GTK_SIGNAL_FUNC(my_tick_label), NULL); + + dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); + gtk_plot_add_data(GTK_PLOT(plot), dataset[0]); + gtk_widget_show(GTK_WIDGET(dataset[0])); + gtk_plot_data_set_points(dataset[0], px1, py1, 0,0, 6); +// gtk_plot_data_set_points(dataset[0], px1, py1, dx1, dy1, 6); + +// gtk_plot_data_add_marker(dataset[0], 3); +// gtk_plot_data_add_marker(dataset[0], 4); +// gtk_plot_data_gradient_set_visible(dataset[0], TRUE); + + gdk_color_parse("red", &color); + gdk_color_parse("blue", &color2); + gdk_color_alloc(gdk_colormap_get_system(), &color); + gdk_color_alloc(gdk_colormap_get_system(), &color2); + + gtk_plot_data_set_symbol(dataset[0], + GTK_PLOT_SYMBOL_NONE, + GTK_PLOT_SYMBOL_OPAQUE, + 10, 2, &color, &color); + gtk_plot_data_set_line_attributes(dataset[0], + GTK_PLOT_LINE_SOLID, + (GdkCapStyle)0, (GdkJoinStyle)0, 1, &color2); + + gtk_plot_data_set_connector(dataset[0], GTK_PLOT_CONNECT_SPLINE); + + gtk_plot_data_show_yerrbars(dataset[0]); + gtk_plot_data_set_legend(dataset[0], "Spline + EY"); + +// dataset[3] = GTK_PLOT_DATA(gtk_plot_data_new()); +// gtk_plot_add_data(GTK_PLOT(plot), dataset[3]); +// gtk_widget_show(GTK_WIDGET(dataset[3])); +// gtk_plot_data_set_points(dataset[3], px2, py2, dx2, dy2, 6); +// gtk_plot_data_set_symbol(dataset[3], +// GTK_PLOT_SYMBOL_SQUARE, +// GTK_PLOT_SYMBOL_OPAQUE, +// 8, 2, +// &plot->style->black, +// &plot->style->black); +// gtk_plot_data_set_line_attributes(dataset[3], +// GTK_PLOT_LINE_SOLID, +// (GdkCapStyle)0, (GdkJoinStyle)0, 4, &color); +// gtk_plot_data_set_connector(dataset[3], GTK_PLOT_CONNECT_STRAIGHT); + +// gtk_plot_data_set_x_attributes(dataset[3], +// GTK_PLOT_LINE_SOLID, +// (GdkCapStyle)0, (GdkJoinStyle)0, 0, &plot->style->black); +// gtk_plot_data_set_y_attributes(dataset[3], +// GTK_PLOT_LINE_SOLID, +// (GdkCapStyle)0, (GdkJoinStyle)0, 0, &plot->style->black); + +// gtk_plot_data_set_legend(dataset[3], "Line + Symbol"); + +} + + +// gint +// move_item(GtkWidget *widget, GtkPlotCanvasChild *child, double nx, double ny, gpointer data) +// { +// GtkWidget **widget_list = NULL; +// GtkWidget *active_widget = NULL; +// gint n = 0; +// gdouble *x = NULL, *y = NULL; + +// if(GTK_IS_PLOT_CANVAS_PLOT(child)) +// { +// switch(GTK_PLOT_CANVAS_PLOT(child)->pos) +// { +// case GTK_PLOT_CANVAS_PLOT_IN_DATA: +// x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); +// y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); +// n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; +// printf("mx Item selected: DATA\n"); +// printf("mx Active point: %d %f %f -> %f %f \n", +// GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n], nx, ny); +// break; +// } +// } +// return 0; +// } + + +void updateSelectedValues( const std::string& an, const std::string& v, const std::string& prev_value ) +{ + stringstream ffilterss; + if( prev_value.empty() ) + { + ffilterss << "(" << attrname << "<=" << fixed << v << ")"; + } + else + { + ffilterss << "(&" + << "(" << attrname << "<=" << fixed << v << ")" + << "(" << attrname << ">" << fixed << prev_value << ")" + << ")"; + } + + SelectedValues[ an ] = ffilterss.str(); +} + + + +gint +select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, + gpointer data) +{ + GtkWidget **widget_list = NULL; + GtkWidget *active_widget = NULL; + gint n = 0; + gdouble *x = NULL, *y = NULL; + +// if(GTK_IS_PLOT_CANVAS_TEXT(child)) +// printf("Item selected: TEXT\n"); +// if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) +// printf("Item selected: PIXMAP\n"); +// if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) +// printf("Item selected: RECTANGLE\n"); +// if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) +// printf("Item selected: ELLIPSE\n"); +// if(GTK_IS_PLOT_CANVAS_LINE(child)) +// printf("Item selected: LINE\n"); + if(GTK_IS_PLOT_CANVAS_PLOT(child)){ + switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ +// case GTK_PLOT_CANVAS_PLOT_IN_TITLE: +// printf("Item selected: TITLE\n"); +// break; +// case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: +// printf("Item selected: LEGENDS\n"); +// break; +// case GTK_PLOT_CANVAS_PLOT_IN_PLOT: +// printf("Item selected: PLOT\n"); +// break; +// case GTK_PLOT_CANVAS_PLOT_IN_AXIS: +// printf("Item selected: AXIS\n"); +// break; +// case GTK_PLOT_CANVAS_PLOT_IN_MARKER: +// printf("Item selected: MARKER\n"); +// break; +// case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: +// printf("Item selected: GRADIENT\n"); +// break; + case GTK_PLOT_CANVAS_PLOT_IN_DATA: + x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); + y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); + n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; + cerr << "Item selected: DATA" << endl; + cerr << "Active point: " << GTK_PLOT_CANVAS_PLOT(child)->datapoint + << " x:" << x[n] << " y:" << y[n] << endl; + { + stringstream valuess; + if( OutputDouble ) + valuess << fixed << x[n]; + else + valuess << (int)(ceil(x[n])); + string v = valuess.str(); + stringstream anss; + anss << attrname << "_" << v; + + if( OutputInterval ) + { + cerr << "LB anss.str():" << anss.str() << endl; + SelectedValues_t::iterator iter = SelectedValues.upper_bound( anss.str() ); + if( iter == SelectedValues.end() && !SelectedValues.empty() ) + { + cerr << "size && !LB anss.str():" << anss.str() << endl; + iter = SelectedValues.end(); + } + if( !SelectedValues.empty() ) + --iter; + + if( iter != SelectedValues.end() ) + { + string prev_an = iter->first; + string prev_value = prev_an.substr( prev_an.find("_")+1 ); + cerr << "prev_an:" << prev_an << endl; + + if( toint( prev_value ) > toint( v ) ) + { + updateSelectedValues( anss.str(), v, "" ); + updateSelectedValues( prev_an, prev_value, v ); + } + else + { + updateSelectedValues( anss.str(), v, prev_value ); + SelectedValues_t::iterator si = SelectedValues.find( anss.str() ); + ++si; + if( si != SelectedValues.end() ) + { + string next_an = si->first; + string next_value = next_an.substr( next_an.find("_")+1 ); + cerr << "next_an:" << next_an << endl; + updateSelectedValues( next_an, next_value, v ); + } + } + } + else + { + cerr << "NO LB anss.str():" << anss.str() << endl; + updateSelectedValues( anss.str(), v, "" ); + SelectedValues_t::iterator si = SelectedValues.find( anss.str() ); + ++si; + if( si != SelectedValues.end() ) + { + string next_an = si->first; + string next_value = next_an.substr( next_an.find("_")+1 ); + cerr << "next_an:" << next_an << endl; + updateSelectedValues( next_an, next_value, v ); + } + } + } + else + { + updateSelectedValues( anss.str(), v, "" ); + } + } + + return TRUE; + break; + default: + break; + } + +// widget_list = plots; +// active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); + } + + return FALSE; +} + +void +size_alloc_event(GtkWidget *area, GtkAllocation* a, gpointer data) +{ +// cerr << "size_alloc_event() w:" << a->width << " height:" << a->height << endl; +// gtk_plot_canvas_set_magnification( GTK_PLOT_CANVAS( canvas ), 1.4 ); +// gtk_plot_canvas_set_size( GTK_PLOT_CANVAS( canvas ), 1000, 800 ); +// gtk_plot_resize( GTK_PLOT( active_plot ), a->width, a->height ); +// gtk_plot_paint( GTK_PLOT( active_plot ) ); + gtk_plot_canvas_set_size( GTK_PLOT_CANVAS( canvas ), a->width, a->height ); + gtk_plot_canvas_paint( GTK_PLOT_CANVAS( canvas ) ); +} + +void make_window() +{ + GtkWidget *vbox1 = 0; + GtkWidget *scrollw1 = 0; + + int win_w = 1000; + int win_h = 800; + + gtk_window=gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_title(GTK_WINDOW(gtk_window), "gf-create-fca-scale-numeric"); + gtk_widget_set_usize(gtk_window,win_w,win_h); + + gtk_signal_connect (GTK_OBJECT (gtk_window), "destroy", + GTK_SIGNAL_FUNC (quit), NULL); + gtk_signal_connect(GTK_OBJECT(gtk_window), "size_allocate", + GTK_SIGNAL_FUNC(size_alloc_event), 0 ); + + vbox1=gtk_vbox_new(FALSE,0); + gtk_container_add(GTK_CONTAINER(gtk_window),vbox1); + gtk_widget_show(vbox1); + +// scrollw1=gtk_scrolled_window_new(NULL, NULL); +// gtk_container_border_width(GTK_CONTAINER(scrollw1),0); +// gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), +// GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); +// gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); +// gtk_widget_show(scrollw1); + + + canvas = GTK_PLOT_CANVAS(gtk_plot_canvas_new(win_w,win_h, 1.0)); +// canvas = GTK_PLOT_CANVAS(gtk_plot_canvas_new(page_width, page_height, 1.0)); + + GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); + + gtk_box_pack_start(GTK_BOX(vbox1),GTK_WIDGET(canvas), TRUE, TRUE,0); +// gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), GTK_WIDGET(canvas)); + gtk_widget_show(GTK_WIDGET(canvas)); + active_plot = GTK_WIDGET(new_layer(GTK_WIDGET(canvas))); + + + gtk_plot_set_range(GTK_PLOT(active_plot), -1., 1., -1., 1.4); + gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); +// gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); + gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); + gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), 15, 3); + gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_X, 1., 1); + gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_Y, 1., 1); + gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); +// gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); + gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); + gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); + gtk_plot_axis_set_labels_suffix(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), ""); + + GtkPlotCanvasChild *child; + + child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); + gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .1, .85, .85); + gtk_widget_show(active_plot); + GTK_PLOT_CANVAS_PLOT(child)->flags |= GTK_PLOT_CANVAS_PLOT_SELECT_POINT; +// GTK_PLOT_CANVAS_PLOT(child)->flags |= GTK_PLOT_CANVAS_PLOT_DND_POINT; + +// build_example1(active_plot); + + GtkPlotAxis *axis; +// gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); +// axis = gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT); +// gtk_signal_connect(GTK_OBJECT(axis), "tick_label", +// GTK_SIGNAL_FUNC(my_tick_label), NULL); + + gtk_signal_connect(GTK_OBJECT(canvas), "select_item", + (GtkSignalFunc) select_item, NULL); + +// gtk_signal_connect(GTK_OBJECT(canvas), "move_item", +// (GtkSignalFunc) move_item, NULL); + +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + unsigned long ExcludeZero = 0; + unsigned long TargetNumberOfAttrs = 10; + unsigned long ReverseOrder = 0; + unsigned long isTimeEA = 0; + const char* findexPath_CSTR = 0; + const char* forceMinTime_CSTR = 0; + const char* forceMinTimeRel_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "exclude-zero", 'z', POPT_ARG_NONE, &ExcludeZero, 0, + "explicitly exclude zero from output ffilters", "" }, + + { "double", 'd', POPT_ARG_NONE, &OutputDouble, 0, + "output ffilters using double precision", "" }, + + { "interval", 'I', POPT_ARG_NONE, &OutputInterval, 0, + "generate interval attributes", "" }, + + { "is-time-attribute", 'T', POPT_ARG_NONE, &isTimeEA, 0, + "handle attribute as a time_t", "" }, + +// { "target-number-of-attributes", 'g', POPT_ARG_INT, &TargetNumberOfAttrs, 10, +// "desired number of formal attributes to create", "" }, + +// { "reverse", 'r', POPT_ARG_NONE, &ReverseOrder, 0, +// "reverse the sorting order", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &findexPath_CSTR, 0, + "path to existing postgresql EA index", "" }, + + { "force-min-time", 0, POPT_ARG_STRING, &forceMinTime_CSTR, 0, + "force min time to be given date string index", "" }, + + { "force-min-time-relative", 0, POPT_ARG_STRING, &forceMinTimeRel_CSTR, 0, + "force min time to be given date string index", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + gtk_init( &argc, &argv ); + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* [-P ea-index-url] "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + EAIndex::fh_idx idx = getEAIndex( findexPath_CSTR ); + string host = idx->getConfig( CFG_IDX_HOST_K, CFG_IDX_HOST_DEF ); + string dbname = idx->getConfig( CFG_IDX_DBNAME_K, CFG_IDX_DBNAME_DEF ); + + if( forceMinTime_CSTR || forceMinTimeRel_CSTR ) + isTimeEA = true; + + string ffilterComparitor = "<="; + if( ReverseOrder ) + ffilterComparitor = ">="; + + stringstream conSS; + conSS << " host=" << host; + conSS << " dbname=" << dbname; + connection con( conSS.str() ); + work trans( con, "getting the schema..." ); + + const char* CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K + = CFG_EAIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K; + + make_window(); + + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + attrname = RootNameCSTR; + + string ValueTableName = guessLookupTableName( trans, attrname ); + if( OutputDouble ) + ValueTableName = "doublelookup"; + + fh_stringstream selectss; + string selectAttrName = Util::replace_all( attrname, "-", "_" ); + string fromClause = " from docmap "; + string whereClauseBegining = " where "; + + stringmap_t m_ExtraColumnsToInlineInDocmap; + m_ExtraColumnsToInlineInDocmap = + Util::ParseKeyValueString( + idx->getConfig( CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_K, + CFG_POSTGRESQLIDX_EXTRA_COLUMNS_TO_INLINE_IN_DOCMAP_DEFAULT ) + ); + cerr << "m_ExtraColumnsToInlineInDocmap.size:" << m_ExtraColumnsToInlineInDocmap.size() << endl; + + bool isNormalized + = m_ExtraColumnsToInlineInDocmap.find( attrname ) == m_ExtraColumnsToInlineInDocmap.end(); + + if( isNormalized ) + { + selectAttrName = "attrvalue"; + stringstream ss; +// ss << " from docattrs da, " +// << ValueTableName << " l, attrmap an " << endl +// << " where an.attrname = '" << attrname +// << "' and an.attrid = da.attrid and da.vid = l.vid "; + ss << " from docattrs da, " + << ValueTableName << " l " << endl + << " where da.attrid = " + << " (select max(attrid) from attrmap where attrname = '" << attrname << "') " + << " and da.vid = l.vid "; + fromClause = ss.str(); + whereClauseBegining = " and "; + } + + string selectAttrNameNumeric = selectAttrName; + if( isTimeEA ) + { + stringstream ss; + ss << "EXTRACT(EPOCH FROM " << selectAttrName << " )"; + selectAttrNameNumeric = ss.str(); + } + + selectss << "select max(" << selectAttrNameNumeric << ") as v," + << "count(" << selectAttrName << ") as count " + << fromClause + << whereClauseBegining << selectAttrNameNumeric << " <> 0 " + << " group by " << selectAttrName << " order by " << selectAttrName << " "; + cerr << "SQL:" << selectss.str() << endl; + result res = trans.exec( tostr( selectss ) ); + int res_sz = res.size(); + int point_count = res_sz; + + gdouble* px=new gdouble[res_sz+1]; + gdouble* py=new gdouble[res_sz+1]; + gdouble* dx=new gdouble[res_sz+1]; + gdouble* dy=new gdouble[res_sz+1]; + + gdouble x_min = 0, x_max = 0, y_min = 0, y_max = 0; + int idx = 0; + for (result::const_iterator c = res.begin(); c != res.end(); ++c, ++idx) + { + gdouble v = 0, count = 0; + c[0].to(v); + c[1].to(count); + + px[ idx ] = v; + py[ idx ] = count; + dx[ idx ] = 0; + dy[ idx ] = 0; + + if( !idx ) + { + x_min = x_max = v; + y_min = y_max = count; + } + else + { + x_min = MIN( v, x_min ); + x_max = MAX( v, x_max ); + y_min = MIN( count, y_min ); + y_max = MAX( count, y_max ); + } + } + +// x_max = 4096; + cerr << " x_min:" << x_min + << " x_max:" << x_max + << " y_min:" << y_min + << " y_max:" << y_max + << endl; + GtkWidget *plot = active_plot; + + gtk_plot_set_ticks(GTK_PLOT(plot), GTK_PLOT_AXIS_X, (x_max-x_min)/5.0, 4); + gtk_plot_set_ticks(GTK_PLOT(plot), GTK_PLOT_AXIS_Y, (y_max-y_min)/10.0, 4); + gtk_plot_set_range(GTK_PLOT(plot), x_min, x_max, y_min, y_max ); +// gtk_plot_set_xscale( GTK_PLOT(plot), GTK_PLOT_SCALE_LINEAR ); +// gtk_plot_set_yscale( GTK_PLOT(plot), GTK_PLOT_SCALE_LOG10 ); + gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_RIGHT), ""); + gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_LEFT), "count"); + gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_BOTTOM), attrname.c_str() ); + + if( isTimeEA ) + { + time_t min_time = (time_t)x_min; + time_t max_time = (time_t)x_max; + + if( forceMinTime_CSTR ) + { + struct tm tm = Time::ParseTimeString( forceMinTime_CSTR ); + min_time = mktime( &tm ); + } + if( forceMinTimeRel_CSTR ) + { + min_time = Time::ParseRelativeTimeString( forceMinTimeRel_CSTR ); + } + + if( min_time < 0 ) + min_time = 0; + + cerr << " min_time:" << (long)( min_time ) + << " max_time:" << (long)( max_time ) + << endl; + cerr << " min_time:" << Time::toTimeString( min_time ) + << " max_time:" << Time::toTimeString( max_time ) + << endl; + +// static gchar* custom_labels[] = {"FIXME Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; + GtkPlotArray *array; + static gchar* custom_labels[13]; + int custom_labels_sz = 12; + string format = "%b_%y"; + + time_t diff_time = max_time - min_time; + if( diff_time < (3600*24*365) ) + { + format = "%d_%b"; + } + if( diff_time < (3600*24*31) ) + { + format = "%d_%a"; + } + if( diff_time < (3600*24) ) + { + format = "%R"; + } + + for( long i = 0; i < custom_labels_sz; ++i ) + { + long long offset = diff_time/(custom_labels_sz-1); + offset *= i; + time_t tt = min_time + offset; + string tv = Time::toTimeString( tt, format ); + custom_labels[i] = strdup( tv.c_str() ); + cerr << " min_time:" << min_time << " dtdiv:" << (diff_time/custom_labels_sz) + << " offset:" << offset + << " (i*diff_time/custom_labels_sz):" << (i*diff_time/custom_labels_sz) + << " i:" << i << " tt:" << tt << " tv:" << tv << endl; + } + + array = GTK_PLOT_ARRAY(gtk_plot_array_new(NULL, custom_labels, custom_labels_sz, GTK_TYPE_STRING, FALSE)); + gtk_plot_axis_set_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_BOTTOM), array); + gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_BOTTOM), TRUE); + gtk_plot_axis_set_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_TOP), array); + gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_TOP), TRUE); + gtk_plot_set_ticks(GTK_PLOT(plot), GTK_PLOT_AXIS_X, (x_max-x_min)/12.0, 4); + + { + stringstream ss; + ss << attrname + << " - \\Bmin\\N:" << Time::toTimeString( min_time ) + << " - \\Bmax\\N:" << Time::toTimeString( max_time ); + gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_BOTTOM), ss.str().c_str() ); + } + } + + + GdkColor color; + GdkColor color2; + GtkPlotAxis *axis; + + dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); + gtk_plot_add_data(GTK_PLOT(plot), dataset[0]); + gtk_widget_show(GTK_WIDGET(dataset[0])); + gtk_plot_data_set_points(dataset[0], px, py, dx, dy, point_count ); + +// gtk_plot_data_add_marker(dataset[0], 4); + + gdk_color_parse("red", &color); + gdk_color_parse("blue", &color2); + gdk_color_alloc(gdk_colormap_get_system(), &color); + gdk_color_alloc(gdk_colormap_get_system(), &color2); + + gtk_plot_data_set_symbol(dataset[0], + GTK_PLOT_SYMBOL_CIRCLE, + GTK_PLOT_SYMBOL_OPAQUE, + 10, 2, &color, &color); + gtk_plot_data_set_line_attributes(dataset[0], + GTK_PLOT_LINE_SOLID, + (GdkCapStyle)0, (GdkJoinStyle)0, 1, &color2); + +// gtk_plot_data_set_connector(dataset[0], GTK_PLOT_CONNECT_SPLINE); + gtk_plot_data_set_connector(dataset[0], GTK_PLOT_CONNECT_NONE); + + gtk_plot_data_show_yerrbars(dataset[0]); + { + stringstream ss; + ss << attrname; + gtk_plot_data_set_legend(dataset[0], ss.str().c_str() ); + } + } + + gtk_widget_show_all( gtk_window ); + gtk_main(); + + if( !SelectedValues.empty() ) + { + SelectedValues_t::iterator si = SelectedValues.begin(); + string an = si->first; + string v = an.substr( an.find("_")+1 ); + updateSelectedValues( si->first, v, ExcludeZero ? "0" : "" ); + } + + for( SelectedValues_t::const_iterator si = SelectedValues.begin(); + si != SelectedValues.end(); ++si ) + { + string an = si->first; + string ffilter = si->second; + + cout << an << " '" << ffilter << "' " << endl; + } + } + catch( exception& e ) + { + LG_FCA_ER << PROGRAM_NAME << " cought exception:" << e.what() << endl; + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + + diff --git a/apps/fca/libferrisfcascaling.cpp b/apps/fca/libferrisfcascaling.cpp new file mode 100644 index 0000000..e8c6a0f --- /dev/null +++ b/apps/fca/libferrisfcascaling.cpp @@ -0,0 +1,219 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisfcascaling.cpp,v 1.5 2010/09/24 21:31:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "libferrisfcascaling.hh" +#include +#include + +namespace Ferris +{ + const char* CFG_IDX_USER_K = "cfg-idx-user"; + const char* CFG_IDX_HOST_K = "cfg-idx-host"; + const char* CFG_IDX_PORT_K = "cfg-idx-port"; + const char* CFG_IDX_DBNAME_K = "cfg-idx-dbname"; + const char* CFG_IDX_USER_DEF = ""; + const char* CFG_IDX_HOST_DEF = "localhost"; + const char* CFG_IDX_PORT_DEF = ""; + const char* CFG_IDX_DBNAME_DEF = ""; + + + string cleanAttributeName( const std::string& const_s ) + { + static tolowerstr lower; + string s = const_s; + s = lower(s); + s = Util::replace_all( s, '_', "__" ); + s = Util::replace_all( s, ' ', '_' ); + s = Util::replace_all( s, '<', "_lt_" ); + s = Util::replace_all( s, '>', "_gt_" ); + s = EANameToSQLColumnName( s ); + return s; + } + + EAIndex::fh_idx getEAIndex( const char* findexPath_CSTR ) + { + EAIndex::fh_idx idx = 0; + + if( findexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( findexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } + + return idx; + } + + + static stringmap_t& + handle_possible_attribute_length_truncation( stringmap_t& ret, const std::string& treename ) + { + int uniq = 1; + const int maxlength = 62 - treename.length(); + + for( stringmap_t::iterator ri = ret.begin(); ri!=ret.end(); ) + { + if( ri->first.length() > maxlength ) + { + string k = ri->first; + string v = ri->second; + + stringmap_t::iterator t = ri; + ++ri; + ret.erase( t ); + string newk = k.substr( 0, maxlength ) + tostr(uniq++); + ret.insert( make_pair( newk, v ) ); + } + else + ++ri; + } + + cerr << "handle_possible_attribute_length_truncation()" << endl; + for( stringmap_t::iterator ri = ret.begin(); ri!=ret.end(); ++ri ) + { + cerr << "k:" << ri->first << endl; + } + + return ret; + } + + static stringmap_t& + readAttributesStdIn( stringmap_t& ret, const std::string& treename ) + { + cerr << "Assuming attribute ffilter pairs are on stdin! FORMAT: attrname 'ffilter'\\n" << endl; + + PrefixTrimmer trimmer; + trimmer.push_back( "'" ); + trimmer.push_back( " " ); + PostfixTrimmer ptrimmer; + ptrimmer.push_back( "'" ); + ptrimmer.push_back( " " ); + + string s; + string ffilterstring; + while( cin ) + { + if( cin >> s && getline( cin, ffilterstring ) ) + { + ffilterstring = trimmer( ffilterstring ); + ffilterstring = ptrimmer( ffilterstring ); + ret[ s ] = ffilterstring; + } + } + return handle_possible_attribute_length_truncation( ret, treename ); + } + + stringmap_t& + readAttributes( stringmap_t& ret, poptContext& optCon, const std::string& treename ) + { + string k = ""; + while( const char* s_CSTR = poptGetArg(optCon) ) + { + string s = s_CSTR; + if( k.empty() ) + { + k = s; + if( k == "-" ) + { + return readAttributesStdIn( ret, treename ); + } + } + else + { + ret.insert( make_pair( k, s ) ); + k = ""; + } + } + + if( ret.empty() ) + return readAttributesStdIn( ret, treename ); + + return handle_possible_attribute_length_truncation( ret, treename ); + } + + std::string guessLookupTableName( work& trans, std::string attrname ) + { + stringstream ss; + ss << "select attrid, attrtype from attrmap where attrname='" << attrname << "'"; + cerr << "guessLookupTableName() SQL: " << ss.str() << endl; + + result res = trans.exec( tostr( ss ) ); + cerr << "guessLookupTableName() res.sz:" << res.size() << endl; + + for (result::const_iterator c = res.begin(); c != res.end(); ++c) + { + int attrid = 0; + int attrtype = 0; + c[0].to(attrid); + c[1].to(attrtype); + cerr << " att:" << attrtype + << " MetaEAIndexerInterface::ATTRTYPEID_DBL:" << MetaEAIndexerInterface::ATTRTYPEID_DBL + << endl; + + switch( (MetaEAIndexerInterface::AttrType_t)attrtype ) + { + case MetaEAIndexerInterface::ATTRTYPEID_INT: + return "intlookup"; + case MetaEAIndexerInterface::ATTRTYPEID_DBL: + return "doublelookup"; + case MetaEAIndexerInterface::ATTRTYPEID_TIME: + return "timelookup"; + case MetaEAIndexerInterface::ATTRTYPEID_STR: + case MetaEAIndexerInterface::ATTRTYPEID_CIS: + return "strlookup"; + } + } + return "intlookup"; + } + + std::string formalTimeValueForFormalAttribute( std::string v ) + { + if( v.find( '_' ) != string::npos ) + return v; + + stringstream ss; + ss << v; + time_t tt = 0; + ss >> tt; + + cerr << "formalTimeValueForFormalAttribute() v:" << v + << " tt:" << tt + << " tt.ts:" << Time::toTimeString( tt, "%y %b %e %H:%M" ) + << " ret:" << EANameToSQLColumnName(Time::toTimeString( tt, "%y %b %e %H:%M" )) + << endl; + + return EANameToSQLColumnName(Time::toTimeString( tt, "%Y %b %e %H:%M" )); + } + + + +}; + diff --git a/apps/fca/libferrisfcascaling.hh b/apps/fca/libferrisfcascaling.hh new file mode 100644 index 0000000..90eb189 --- /dev/null +++ b/apps/fca/libferrisfcascaling.hh @@ -0,0 +1,89 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + create a scale from the URLs in the EA index + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: libferrisfcascaling.hh,v 1.4 2010/09/24 21:31:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_FCA_SCALING_H_ +#define _ALREADY_INCLUDED_FERRIS_FCA_SCALING_H_ + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +#include +#include +#include +#include +#include +#include +#include +using namespace PGSTD; +using namespace pqxx; + +namespace Ferris +{ + extern const char* CFG_IDX_USER_K; + extern const char* CFG_IDX_HOST_K; + extern const char* CFG_IDX_PORT_K; + extern const char* CFG_IDX_DBNAME_K; + extern const char* CFG_IDX_USER_DEF; + extern const char* CFG_IDX_HOST_DEF; + extern const char* CFG_IDX_PORT_DEF; + extern const char* CFG_IDX_DBNAME_DEF; + + + std::string cleanAttributeName( const std::string& const_s ); + EAIndex::fh_idx getEAIndex( const char* findexPath_CSTR ); + + stringmap_t& readAttributes( stringmap_t& ret, poptContext& optCon, const std::string& treename = "" ); + + struct versionltstr + { + inline bool operator()(const string& s1, const string& s2) const + { + return strverscmp(s1.c_str(), s2.c_str()) < 0; + } + }; + + + std::string guessLookupTableName( work& trans, std::string attrname ); + + std::string formalTimeValueForFormalAttribute( std::string v ); +}; + + + +#endif + + diff --git a/apps/fcompress/Makefile.am b/apps/fcompress/Makefile.am new file mode 100644 index 0000000..a68dccb --- /dev/null +++ b/apps/fcompress/Makefile.am @@ -0,0 +1,21 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fcompress + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @BZIP2_CFLAGS@ @LIBZ_CFLAGS@ \ + @CFLAGS@ + +fcompress_SOURCES = fcompress.cpp +fcompress_LDADD = -lpopt @LIBFERRIS_LA@ +fcompress_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @BZIP2_LIBS@ @LIBZ_LIBS@ + diff --git a/apps/fcompress/Makefile.in b/apps/fcompress/Makefile.in new file mode 100644 index 0000000..68eec81 --- /dev/null +++ b/apps/fcompress/Makefile.in @@ -0,0 +1,993 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fcompress$(EXEEXT) +subdir = apps/fcompress +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fcompress_OBJECTS = fcompress.$(OBJEXT) +fcompress_OBJECTS = $(am_fcompress_OBJECTS) +fcompress_DEPENDENCIES = +fcompress_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fcompress_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fcompress_SOURCES) +DIST_SOURCES = $(fcompress_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @BZIP2_CFLAGS@ @LIBZ_CFLAGS@ \ + @CFLAGS@ + +fcompress_SOURCES = fcompress.cpp +fcompress_LDADD = -lpopt @LIBFERRIS_LA@ +fcompress_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ @BZIP2_LIBS@ @LIBZ_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fcompress/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fcompress/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fcompress$(EXEEXT): $(fcompress_OBJECTS) $(fcompress_DEPENDENCIES) + @rm -f fcompress$(EXEEXT) + $(fcompress_LINK) $(fcompress_OBJECTS) $(fcompress_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcompress.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fcompress/fcompress.cpp b/apps/fcompress/fcompress.cpp new file mode 100644 index 0000000..ea14581 --- /dev/null +++ b/apps/fcompress/fcompress.cpp @@ -0,0 +1,230 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fcompress command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fcompress.cpp,v 1.4 2010/09/24 21:31:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fcompress"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* CreateTypeName_CSTR = 0; + unsigned long Compress = 0; + unsigned long Decompress = 0; + unsigned long UseGZip = 0; + unsigned long UseBZip2 = 0; + unsigned long UseNoCompression = 0; + unsigned long Verbose = 0; + unsigned long NumberOf512ByteBlocksPerChunk = 0; + unsigned long CompressionLevel = 1; + unsigned long UseFastestCompression = 0; + unsigned long UseSlowestCompression = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "compress", 'c', POPT_ARG_NONE, &Compress, 0, + "compress given files", "" }, + + { "decompress", 'x', POPT_ARG_NONE, &Decompress, 0, + "decompress given files", "" }, + + { "use-gzip", 'z', POPT_ARG_NONE, &UseGZip, 0, + "use gzip when selecting compression", "" }, + + { "use-bzip2", 'j', POPT_ARG_NONE, &UseBZip2, 0, + "use bzip2 when selecting compression", "" }, + + { "use-no-compression", 0, POPT_ARG_NONE, &UseNoCompression, 0, + "just chunk the file and dont compress the chunks (for testing mainly)", "" }, + + { "block-size", 'b', POPT_ARG_INT, &NumberOf512ByteBlocksPerChunk, 0, + "block size of Nx512 bytes used for chunking (default varies)", "" }, + + { "compression-level", 0, POPT_ARG_INT, &CompressionLevel, 0, + "use compression level (1-9 for gzip, 1==speed) (1-9 for bzip2 means 100-900k blocks", "1" }, + + { 0, '1', POPT_ARG_NONE, &UseFastestCompression, 0, + "use best compression viz CPU time required", "" }, + + { 0, '9', POPT_ARG_NONE, &UseSlowestCompression, 0, + "use best compression viz size of output", "" }, + + { "create-type", 0, POPT_ARG_STRING, &CreateTypeName_CSTR, 0, + "what form of context to store the chunks in (dir/db4/gdbm/xml/etc)", 0 }, + + +// { "src-attr", 'a', POPT_ARG_STRING, +// &SourceAttrName, 0, +// "cat an EA rather than the content itself", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2 || (!Compress && !Decompress) ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( UseFastestCompression ) CompressionLevel = 1; + if( UseSlowestCompression ) CompressionLevel = 9; + + if( !NumberOf512ByteBlocksPerChunk ) + { + if( UseBZip2 ) + NumberOf512ByteBlocksPerChunk = CompressionLevel * 200; + else + NumberOf512ByteBlocksPerChunk = 512; + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + try + { + string srcURL = tmpCSTR; + string extension = ""; + + int compress_mode = Factory::COMPRESS_INVALID; + + if( UseNoCompression ) compress_mode = Factory::COMPRESS_NONE; + if( UseGZip ) compress_mode = Factory::COMPRESS_GZIP; + if( UseBZip2 ) compress_mode = Factory::COMPRESS_BZIP2; + + fh_context c = Resolve( srcURL ); + fh_context target = 0; + + string CreateTypeName; + if( CreateTypeName_CSTR ) + CreateTypeName = CreateTypeName_CSTR; + + if( Compress && CreateTypeName_CSTR ) + { + fh_mdcontext md = new f_mdcontext(); + fh_mdcontext child = md->setChild( CreateTypeName, "" ); + + // FIXME: This is very hacky, but we need to be fairly sure + // that overmounting will work for target. + if( CreateTypeName == "db4" ) extension = ".db"; + if( CreateTypeName == "gdbm" ) extension = ".gdbm"; + if( CreateTypeName == "tdb" ) extension = ".tdb"; + if( CreateTypeName == "xml" ) extension = ".xml"; + + string rdn = c->getDirName() + ".compressed" + extension; + cerr << "Creating new context at path:" << c->getURL() + << " rdn:" << rdn + << " type:" << CreateTypeName + << " extension:" << extension + << endl; + child->setChild( "name", rdn ); + target = c->getParent()->createSubContext( "", md ); + } + + if( Compress ) + { + string rdn = c->getDirName(); + fh_context p = c->getParent(); + + if( !CreateTypeName.empty() ) + { +// cerr << "Setting ferris-type:" << CreateTypeName << endl; + setStrAttr( target, "ferris-type", CreateTypeName,1,1); + } + + Factory::ConvertToCompressedChunkContext( c, + target, + NumberOf512ByteBlocksPerChunk*512, + compress_mode, + CompressionLevel ); +// if( !extension.empty() ) +// { +// p->rename( rdn, rdn + extension ); +// Shell::CreateLink( p->getSubContext( rdn + extension ), p, rdn ); +// } + + } + if( Decompress ) + Factory::ConvertFromCompressedChunkContext( c ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fedit b/apps/fedit new file mode 100755 index 0000000..46185c8 --- /dev/null +++ b/apps/fedit @@ -0,0 +1,21 @@ +#!/bin/bash + +EDITOR=vi + +if [ $1 == "-a" ]; then + ea=$2 + url=$3 + $EDITOR $( ferris-file-to-fifo --ea $ea $url ); +else + + if [ -z $2 ]; then + url=$1 + $EDITOR $( ferris-file-to-fifo $url ); + else + url=$1 + ea=$2 + $EDITOR $( ferris-file-to-fifo --ea $ea $url ); + fi + +fi + diff --git a/apps/ferris-bash-exec.sh b/apps/ferris-bash-exec.sh new file mode 100755 index 0000000..db8daaf --- /dev/null +++ b/apps/ferris-bash-exec.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +arg=${1:?Supply virtual bash script as arg1}; +fcat $arg 2>/dev/null | bash + diff --git a/apps/ferris-exec-in-terminal.sh b/apps/ferris-exec-in-terminal.sh new file mode 100755 index 0000000..8493431 --- /dev/null +++ b/apps/ferris-exec-in-terminal.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +fname=`mktemp` +arg=${1:?Supply bash script as arg1}; + +echo "fname:$fname arg: $arg" +if ftest -e "$arg"; then + fcat $arg 2>/dev/null >| $fname +else + echo "#!/bin/bash" >| $fname + echo "$@" >> $fname +fi +echo "echo " >> $fname +echo "echo ---Execution Complete at `date`---" >> $fname +echo "read" >> $fname +chmod +x $fname +konsole -e $fname + + diff --git a/apps/ferris-internal-extract-subtitles-to-format b/apps/ferris-internal-extract-subtitles-to-format new file mode 100755 index 0000000..800c0a3 --- /dev/null +++ b/apps/ferris-internal-extract-subtitles-to-format @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +use IO::All; +use File::Temp qw/ tempfile tempdir /; +use String::ShellQuote; + +$i=0; +$lang=$ARGV[$i++]; +$fmt=$ARGV[$i++]; +$url=$ARGV[$i++]; + +$url =~ s/^file://g; +$url = shell_quote $url; +io("=") << "cmd:$cmd\n"; +#io("/tmp/f.log") << " script... $lang $fmt $url\n"; + +if( $url eq "" ) +{ + print "Usage:\n"; + print " $0 language format url\n"; + print " \n"; + print " language is in {en,ja,default,...}\n"; + print " format is in {txt,ssa}\n"; + print " url is what file to find the subtitles for\n"; + print " \n"; + print " language/format are ignored for now, always english in txt format\n"; + exit 10; +} + +# +# Output the subtitles at $1 converting into the format +# $fmt if needed. +# +sub outputSubtitles { + my $subtitles = shift(@_); + my $oss = shift(@_); + my $line; + + # raw copy + # $subtitles > $oss; + + while( $line = $subtitles->getline ) + { + + # SSA -> TXT + if( $line =~ /^Dialog/ ) + { + # remove leading start, end times et al + $line =~ s/^([^,]*,){8},//g; + + # remove extra comments {inside these} + $line =~ s/{.*}//g; + + # cleanup + $line =~ s/\\/ /g; + + # show the line + $oss->print($line); + } + } + $oss->close; + + exit 0; +} + +$mimetype = io("file -iLb $url |")->getline; +$mimetype =~ s/^([^;]*);.*/\1/g; +if( $mimetype =~ "matroska" ) +{ + $tmpfile="/tmp/ferris-tmp-sub.ssa"; + #($tmpfileh,$tmpfile)=tempfile( DIR => "/tmp" ); + io("=") << "tmpfile:$tmpfile\n"; + + $subtrack = io("mkvmerge -i $url | grep subt | sed -r 's/^[^0-9]*([0-9]+).*/\\1/g' |")->getline; + chomp($subtrack); + $cmd="mkvextract tracks $url -r /dev/null ${subtrack}:${tmpfile}"; + io("=") << "subtitle track:$subtrack url:$url\n"; + io("=") << "cmd:$cmd\n"; + system($cmd); + + outputSubtitles( io($tmpfile), io("-") ); +} +else +{ + io("=") << "unsuppored format:" << $mimetype; + exit 1; +} + + diff --git a/apps/ferris-internal-remembrance-redo-batch-script.sh b/apps/ferris-internal-remembrance-redo-batch-script.sh new file mode 100755 index 0000000..6e8bc75 --- /dev/null +++ b/apps/ferris-internal-remembrance-redo-batch-script.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +read cmd; +exec $cmd; diff --git a/apps/ferris-internal-remembrance-redo-script.sh b/apps/ferris-internal-remembrance-redo-script.sh new file mode 100755 index 0000000..6e8bc75 --- /dev/null +++ b/apps/ferris-internal-remembrance-redo-script.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +read cmd; +exec $cmd; diff --git a/apps/ferris-internal-scale-image-by-dimension.sh b/apps/ferris-internal-scale-image-by-dimension.sh new file mode 100755 index 0000000..e29040d --- /dev/null +++ b/apps/ferris-internal-scale-image-by-dimension.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# +# scale an image from std to sz and write it to stdout +# +sz=${1:?supply size as arg1} +format=${2:-unknown}; + +# graphics magick +# gm convert -resize $sz - - + +# Nokia n900 with newer ImageMagick which can respect exif orientation tags. +# setup by extracting tarball to /opt and then: +# cd /usr/lib +# ln -s /opt/ImageMagick-6.6.0/lib/ImageMagick-6.6.0 . +# +# -resize takes a handful of seconds but is a much nicer result. +# -sample takes almost no time but is blocky +# +if [ -e /opt/ImageMagick-6.6.0 ]; +then + export LD_LIBRARY_PATH=/opt/ImageMagick-6.6.0/lib + /opt/ImageMagick-6.6.0/bin/convert -auto-orient -resize $sz - - + exit +fi + +# try to do a better job for CR2 RAW files than using +# the embedded JPEG preview. +if [ "xCR2" = "x$format" ]; then + fn=$(mktemp) + cat - >| $fn; + dcraw -w -c $fn | convert -resize $sz -auto-orient - - | ppmtojpeg +else + # Raw ImageMagick + convert -resize $sz -auto-orient - - +fi + + + diff --git a/apps/ferris-mount-etagere-as-kml.sh b/apps/ferris-mount-etagere-as-kml.sh new file mode 100755 index 0000000..726c27d --- /dev/null +++ b/apps/ferris-mount-etagere-as-kml.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +mountpoint=${1:-~/ferrisfuse/etagere-as-kml}; + +export LIBFERRIS_XSLTFS_SHEETS_URL="/usr/local/ferris/stylesheets" +URL='single-file-filesystem:xsltfs?append-extension=.kml&stylesheet=ferris-geospatial-emblems-to-kml.xsl&reverse-stylesheet=ferris-kml-to-geospatial-emblems.xsl://context/etagere/libferris/libferris-geospatial.kml' + +echo "mountpoint:$mountpoint" +mkdir -p "$mountpoint" +ferrisfs -u "$URL" -F '.*.kml' --force-append-flag-clear "$mountpoint" + diff --git a/apps/ferris-open-google-earth-for-context.pl b/apps/ferris-open-google-earth-for-context.pl new file mode 100755 index 0000000..0e35c3c --- /dev/null +++ b/apps/ferris-open-google-earth-for-context.pl @@ -0,0 +1,92 @@ +#!/usr/bin/perl -w + +# +# A little glue to open a context's lat/long point in a new firefox tab +# + +$uid=`id -u`; +chomp $uid; +$tmpfile="/tmp/libferris-google-earth-glue-$uid.kml"; +print "tmpfile:$tmpfile\n"; + +open(OSS,">$tmpfile"); +print OSS "\n"; +print OSS "\n"; +print OSS "\n"; + +sub makeLocation { + my $line = shift; + print "line:$line\n"; + + ($long,$lat,$zoom,$emblemid,$stamp,$fname,$earl) = split /,/, $line; + print "name:$fname stamp:$stamp lat:$lat long:$long zoom:$zoom id:$uid emblemid:$emblemid\n"; + + if( $lat == 0 || $long == 0 ) + { + print "No map location for this context:$fname\n" + } + else + { + print "ok\n"; + + $name=`basename $fname`; + print OSS "\n"; + print OSS " $name\n"; + if( $stamp =~ /T/ ) { + print OSS "\n"; + print OSS " $stamp\n"; + print OSS " \n"; + } + print OSS " \n"; + print OSS "
\n"; + } + print OSS "Search nearby (5km) for:\n"; + print OSS "files,\n"; + print OSS "image files,\n"; + print OSS "video files.\n"; + print OSS "


Search for\n"; + print OSS "
files with emblem\n"; + print OSS "
image files with emblem\n"; + print OSS "
video files with emblem\n"; + print OSS "

Search near (15km) for\n"; + print OSS "
files\n"; + print OSS "
image files\n"; + print OSS "
video files\n"; + print OSS "

Search around (50km) for\n"; + print OSS "
files\n"; + print OSS "
image files\n"; + print OSS "
video files\n"; + print OSS "]]>\n"; + print OSS " \n"; + print OSS " $long\n"; + print OSS " $lat" ; + print OSS " $zoom" ; + print OSS " \n"; + print OSS " \n"; + print OSS " $long,$lat,0\n"; + print OSS " \n"; + print OSS "\n"; + } +} + +$cmd = "ferrisls -ld --show-ea=longitude,latitude,geospatial-range,geospatial-emblem-id,exif:date-time-original-xml,name,url --field-seperator=\",\" " ; +while( $v = pop ) { + $cmd .= " \"$v\" "; +} +$cmd .= " | "; +print "ferrisls cmd:$cmd\n"; + +open FERRISLS, $cmd; +while( ) +{ + makeLocation $_; +} + +print OSS "\n"; +print OSS "\n"; + +$cmd="libferris-googleearth $tmpfile"; +print "command: $cmd\n"; +exec $cmd diff --git a/apps/ferris-open-google-map-for-context.sh b/apps/ferris-open-google-map-for-context.sh new file mode 100755 index 0000000..350a487 --- /dev/null +++ b/apps/ferris-open-google-map-for-context.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# +# A little glue to open a context's lat/long point in a new firefox tab +# + +if=$1; +openInNewTab=${2:-1} + +loc=$(ferrisls -ld --show-ea=google-maps-location $if); + +if test "x$(echo $loc | sed 's/ //g')" = "x"; then + echo "No maps.google.com location for this context" +else + echo $openInNewTab + newPane="new-tab" + if test -z $openInNewTab; then + newPane="new-window" + fi + + cmd="firefox -remote 'openURL(http://maps.google.com/?q=$loc,$newPane)' " + echo "command: $cmd" + eval $cmd +fi diff --git a/apps/ferris-rdfproc b/apps/ferris-rdfproc new file mode 100755 index 0000000..873005b --- /dev/null +++ b/apps/ferris-rdfproc @@ -0,0 +1,9 @@ +#!/bin/bash + +dbname=`cat ~/.ferris/rdfdb/ferris-db-name`; +dbops=`cat ~/.ferris/rdfdb/ferris-db-options`; +dbstorage=`cat ~/.ferris/rdfdb/ferris-storage-name`; +rdfproccmd="rdfproc -s $dbstorage -t \"$dbops\" $dbname "; +echo "Base command: $rdfproccmd"; +exec $rdfproccmd "$@"; + diff --git a/apps/ferris-recreate-primary-fulltext-and-eaindex-as-clucene.sh b/apps/ferris-recreate-primary-fulltext-and-eaindex-as-clucene.sh new file mode 100755 index 0000000..e51edc5 --- /dev/null +++ b/apps/ferris-recreate-primary-fulltext-and-eaindex-as-clucene.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mkdir -p ~/.ferris/full-text-index +fcreate ~/.ferris/full-text-index --create-type=fulltextindexclucene +fcreate ~/.ferris/ea-index --create-type=eaindexclucene db-exists=1 +feaindex-attach-fulltext-index -P ~/.ferris/ea-index -F ~/.ferris/full-text-index diff --git a/apps/ferris-recreate-primary-fulltext-and-eaindex-as-postgresql.sh b/apps/ferris-recreate-primary-fulltext-and-eaindex-as-postgresql.sh new file mode 100755 index 0000000..b368269 --- /dev/null +++ b/apps/ferris-recreate-primary-fulltext-and-eaindex-as-postgresql.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +dbname=${1:-findexpriv}; + +echo "-------------------------------------------------------------" +echo "This remakes the default EA and Fulltext indexes to use PostgreSQL" +echo "The indexes are linked to allow combined metadata and text search" +echo "-------------------------------------------------------------" +echo "-------------------------------------------------------------" +echo "WARNING This script will drop the postgresql database:$dbname" +echo " in order to create it again... press return to proceed"; +read + +echo "drop database $dbname" | psql template1 +sleep 2; +fcreate ~/.ferris/full-text-index --create-type=fulltextindextsearch2 dbname="$dbname" +fcreate ~/.ferris/ea-index --create-type=eaindexpostgresql dbname="$dbname" db-exists=1 +feaindex-attach-fulltext-index -P ~/.ferris/ea-index -F ~/.ferris/full-text-index diff --git a/apps/ferris-setup-template-findex-database.sh b/apps/ferris-setup-template-findex-database.sh new file mode 100644 index 0000000..98d5932 --- /dev/null +++ b/apps/ferris-setup-template-findex-database.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +PGCONTRIB=/usr/share/pgsql/contrib + +echo create database ferrisftxtemplate | psql +cat ${PGCONTRIB}/tsearch2.sql | psql ferrisftxtemplate +cat ${PGCONTRIB}/dbsize.sql | psql ferrisftxtemplate +cat ${PGCONTRIB}/btree_gist.sql | psql ferrisftxtemplate +cat ${PGCONTRIB}/_int.sql | psql ferrisftxtemplate +createlang -d ferrisftxtemplate plpgsql +echo "update pg_database set datistemplate='t' where datname='ferrisftxtemplate';" | psql ferrisftxtemplate +echo "grant SELECT on table pg_ts_cfg to PUBLIC;" | psql ferrisftxtemplate +echo "grant SELECT on table pg_ts_cfgmap to PUBLIC;" | psql ferrisftxtemplate +echo "grant SELECT on table pg_ts_parser to PUBLIC;" | psql ferrisftxtemplate +echo "grant SELECT on table pg_ts_dict to PUBLIC;" | psql ferrisftxtemplate + +# echo "update pg_database set datistemplate='f' where datname='ferrisftxtemplate';" | psql + +echo create database ferriseatemplate | psql +cat ${PGCONTRIB}/dbsize.sql | psql ferriseatemplate +cat ${PGCONTRIB}/btree_gist.sql | psql ferriseatemplate +cat ${PGCONTRIB}/_int.sql | psql ferriseatemplate +createlang -d ferriseatemplate plpgsql +echo "update pg_database set datistemplate='t' where datname='ferriseatemplate';" | psql ferriseatemplate diff --git a/apps/ferris-setupaction.sh b/apps/ferris-setupaction.sh new file mode 100755 index 0000000..611f4dd --- /dev/null +++ b/apps/ferris-setupaction.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +mimetype=${1:?usage: setupaction mimetype applabel app}; +applabel=${2}; +app=${3:-${applabel}}; + +major=`dirname ${mimetype}` +minor=`basename ${mimetype}` + +createdir mime:// ${major} +createdir mime://${major} ${minor} +createdir mime://${mimetype} actions +createfile mime://${mimetype}/actions ${applabel} +createea mime://${mimetype}/actions/${applabel} ferris-appname ${app} diff --git a/apps/ferris-setupapp.sh b/apps/ferris-setupapp.sh new file mode 100755 index 0000000..a58780c --- /dev/null +++ b/apps/ferris-setupapp.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +appname=${1:?Usage: setupapp applabel appexe openmany handleurl}; +exename=${2:-${appname}}; +openmany=${3:-0}; +handleurl=0; + +cd ~/.ferris +createfile applications:// ${appname} +createea applications://${appname} ferris-exe ${exename} +createea applications://${appname} ferris-handles-urls ${handleurl} +createea applications://${appname} ferris-opens-many ${openmany} diff --git a/apps/ferris-setupopen.sh b/apps/ferris-setupopen.sh new file mode 100755 index 0000000..483cdaf --- /dev/null +++ b/apps/ferris-setupopen.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mimetype=${1:?usage: setupopen mimetype app}; +app=${2}; + +ferris-setupaction.sh ${mimetype} open ${app}; diff --git a/apps/ferris-verify-dot-ferris-databases.sh b/apps/ferris-verify-dot-ferris-databases.sh new file mode 100755 index 0000000..ce3d60c --- /dev/null +++ b/apps/ferris-verify-dot-ferris-databases.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for if in $(find ~/.ferris -name "*.db") +do + echo "Verifying database $if..." + db_verify $if +done diff --git a/apps/ferriscd/Makefile.am b/apps/ferriscd/Makefile.am new file mode 100644 index 0000000..9675ff3 --- /dev/null +++ b/apps/ferriscd/Makefile.am @@ -0,0 +1,27 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferriscdexe + +SHELL_FILES = ferriscd +shelldir = @DOTFILE_ETC@/profile.d/ +shell_DATA = $(SHELL_FILES) + +EXTRA_DIST = $(SHELL_FILES) + + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferriscdexe_SOURCES = ferriscdexe.cpp +ferriscdexe_LDADD = -lpopt @LIBFERRIS_LA@ +ferriscdexe_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/ferriscd/Makefile.in b/apps/ferriscd/Makefile.in new file mode 100644 index 0000000..1dd2618 --- /dev/null +++ b/apps/ferriscd/Makefile.in @@ -0,0 +1,1039 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferriscdexe$(EXEEXT) +subdir = apps/ferriscd +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(shelldir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferriscdexe_OBJECTS = ferriscdexe.$(OBJEXT) +ferriscdexe_OBJECTS = $(am_ferriscdexe_OBJECTS) +ferriscdexe_DEPENDENCIES = +ferriscdexe_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferriscdexe_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferriscdexe_SOURCES) +DIST_SOURCES = $(ferriscdexe_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DATA = $(shell_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +SHELL_FILES = ferriscd +shelldir = @DOTFILE_ETC@/profile.d/ +shell_DATA = $(SHELL_FILES) +EXTRA_DIST = $(SHELL_FILES) +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferriscdexe_SOURCES = ferriscdexe.cpp +ferriscdexe_LDADD = -lpopt @LIBFERRIS_LA@ +ferriscdexe_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/ferriscd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/ferriscd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferriscdexe$(EXEEXT): $(ferriscdexe_OBJECTS) $(ferriscdexe_DEPENDENCIES) + @rm -f ferriscdexe$(EXEEXT) + $(ferriscdexe_LINK) $(ferriscdexe_OBJECTS) $(ferriscdexe_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferriscdexe.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-shellDATA: $(shell_DATA) + @$(NORMAL_INSTALL) + test -z "$(shelldir)" || $(MKDIR_P) "$(DESTDIR)$(shelldir)" + @list='$(shell_DATA)'; test -n "$(shelldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(shelldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(shelldir)" || exit $$?; \ + done + +uninstall-shellDATA: + @$(NORMAL_UNINSTALL) + @list='$(shell_DATA)'; test -n "$(shelldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(shelldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(shelldir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(shelldir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-shellDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-shellDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-shellDATA install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-shellDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ferriscd/ferriscd b/apps/ferriscd/ferriscd new file mode 100644 index 0000000..b8ceac0 --- /dev/null +++ b/apps/ferriscd/ferriscd @@ -0,0 +1,18 @@ + +# +# This should go in /etc/profile.d so that it is sourced by bash +# and is executed in the shell that invokes it rather than a subshell +# +ferriscd() { + + extarg="" + shopt -q cdable_vars + if [ x$? = x0 ]; then + extarg="$extarg --try-cdable-vars"; + fi + + extarg="$extarg --cdpath=$CDPATH " + echo $CDPATH + echo "ferriscdexe $extarg $@" + eval `ferriscdexe $extarg $@` +} diff --git a/apps/ferriscd/ferriscdexe.cpp b/apps/ferriscd/ferriscdexe.cpp new file mode 100644 index 0000000..8a6e523 --- /dev/null +++ b/apps/ferriscd/ferriscdexe.cpp @@ -0,0 +1,255 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fmedallion command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferriscdexe.cpp,v 1.3 2010/09/24 21:31:12 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 5 for no suitable directories found to cd to +*/ + +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferriscd"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +typedef list< string > cdpath_t; +cdpath_t cdpath; + +typedef std::list< fh_context > targets_t; +targets_t targets; + +unsigned long RetainLinks = 0; +unsigned long ResolveLinks = 0; + +// +// This uses any arg above that is not given explicitly as a param to the +// function. +// +// @return true if a directory was added to targets. +// +bool tryAddTarget( targets_t& targets, + bool useCDPath, + string earl ) +{ + try + { +// cerr << "tryAddTarget() cdpath:" << useCDPath << " earl:" << earl << endl; + + + fh_context c = Resolve( earl, RESOLVE_EXACT, + 0 + | ResolveLinks ? RESOLVEEX_UNROLL_LINKS : 0 ); + targets.push_back( c ); +// cerr << "tryAddTarget() added url:" << c->getURL() << endl; + + return true; + } + catch( exception& e ) + { + if( useCDPath ) + { + for( cdpath_t::iterator pi = cdpath.begin(); pi != cdpath.end(); ++pi ) + { + if( tryAddTarget( targets, false, earl )) + return true; + } + } + } + return false; +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* CDPathCSTR = 0; + unsigned long Verbose = 0; + unsigned long CDableVars = 0; + bool useCDPath = true; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "retain-links", 'L', POPT_ARG_NONE, &RetainLinks, 0, + "follow symbolic links like -L in bash's cd", "" }, + + { "resolve-links", 'P', POPT_ARG_NONE, &ResolveLinks, 0, + "when cd'ing into a link move to the physical path of the link", "" }, + + { "try-cdable-vars", 0, POPT_ARG_NONE, &CDableVars, 0, + "if the given DIR can not be resolved try to dereference a env" + "var $DIR and go there", "" }, + + { "cdpath", 0, POPT_ARG_STRING, &CDPathCSTR, 0, + "what cdpath to use", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if( !RetainLinks && !ResolveLinks ) + { + RetainLinks = true; + } + + // + // Parse the CDPATH environment variable into a nice STL collection + // + if( CDPathCSTR ) + { + string cdpathstr = CDPathCSTR; + cerr << "cdpathstrA:" << cdpathstr << endl; + +// cerr << "PATH:" << g_getenv("PATH") << endl; +// cerr << "CDPATH:" << g_getenv("CDPATH") << endl; +// cerr << "CDPathCSTR:" << CDPathCSTR << endl; + + while( true ) + { + int pos = cdpathstr.find("::"); + if( pos == string::npos ) + break; + fh_stringstream ss; + ss << ":" << Shell::quote(Shell::getCWDString()) << ":"; + cdpathstr.replace( pos, 2, tostr(ss) ); + } + + cerr << "cdpathstr:" << cdpathstr << endl; + Util::parseSeperatedList( cdpathstr, + cdpath, + back_inserter( cdpath ), + ':' ); + } + + typedef vector srcs_t; + srcs_t srcs; + + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + string RootName = RootNameCSTR; + srcs.push_back( RootName ); +// cerr << "adding src:" << RootName << endl; + } + + // default is to go HOME // + if( srcs.empty() ) + { + const gchar* p = g_getenv("HOME"); + cout << "cd " << Shell::quote(p) << endl; + return 0; + } + + // + // try to add each directory to the target list + // + for( srcs_t::iterator si = srcs.begin(); si!=srcs.end(); ++si ) + { + string earl = *si; + + useCDPath = !earl.empty() && earl[0] != '/'; + + tryAddTarget( targets, useCDPath, earl ); + } + + // + // If we have no targets but there was a string given to cd to + // then they might want an environment variable dereferenced. + // + if( CDableVars && targets.empty() ) + { + for( srcs_t::iterator si = srcs.begin(); si!=srcs.end(); ++si ) + { + string earl = *si; + if( const gchar* tmp = g_getenv(earl.c_str()) ) + { + tryAddTarget( targets, false, earl ); + } + } + } + + if( targets.empty() ) + return 5; + + Context::UnrollQueryResultContexts( targets, targets.begin() ); + + // + // make a command to cd to the possibly many target directories. + // + fh_context lastc = targets.back(); + targets.pop_back(); + fh_stringstream cmdss; + + for( targets_t::iterator ti = targets.begin(); ti!=targets.end(); ++ti ) + { + fh_context c = *ti; + cmdss << "pushd " << Shell::quote( c->getDirPath() ) << ";" << endl; + } + cmdss << "cd " << Shell::quote( lastc->getDirPath() ) << ";" << endl; + cout << tostr(cmdss); + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/ferrisredirect/Makefile.am b/apps/ferrisredirect/Makefile.am new file mode 100644 index 0000000..58c8fd9 --- /dev/null +++ b/apps/ferrisredirect/Makefile.am @@ -0,0 +1,25 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferris-redirect ferris-internal-file-to-fifo-command + +dist_bin_SCRIPTS = ferris-file-to-fifo +# EXTRA_DIST = $(dist_bin_SCRIPTS) + + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferris_redirect_SOURCES = ferris-redirect.cpp +ferris_redirect_LDADD = -lpopt @LIBFERRIS_LA@ + +ferris_internal_file_to_fifo_command_SOURCES = ferris-internal-file-to-fifo-command.cpp +ferris_internal_file_to_fifo_command_LDADD = -lpopt @LIBFERRIS_LA@ + diff --git a/apps/ferrisredirect/Makefile.in b/apps/ferrisredirect/Makefile.in new file mode 100644 index 0000000..6340218 --- /dev/null +++ b/apps/ferrisredirect/Makefile.in @@ -0,0 +1,1062 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-redirect$(EXEEXT) \ + ferris-internal-file-to-fifo-command$(EXEEXT) +subdir = apps/ferrisredirect +DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_internal_file_to_fifo_command_OBJECTS = \ + ferris-internal-file-to-fifo-command.$(OBJEXT) +ferris_internal_file_to_fifo_command_OBJECTS = \ + $(am_ferris_internal_file_to_fifo_command_OBJECTS) +ferris_internal_file_to_fifo_command_DEPENDENCIES = +am_ferris_redirect_OBJECTS = ferris-redirect.$(OBJEXT) +ferris_redirect_OBJECTS = $(am_ferris_redirect_OBJECTS) +ferris_redirect_DEPENDENCIES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +SCRIPTS = $(dist_bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_internal_file_to_fifo_command_SOURCES) \ + $(ferris_redirect_SOURCES) +DIST_SOURCES = $(ferris_internal_file_to_fifo_command_SOURCES) \ + $(ferris_redirect_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +dist_bin_SCRIPTS = ferris-file-to-fifo +# EXTRA_DIST = $(dist_bin_SCRIPTS) +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferris_redirect_SOURCES = ferris-redirect.cpp +ferris_redirect_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_internal_file_to_fifo_command_SOURCES = ferris-internal-file-to-fifo-command.cpp +ferris_internal_file_to_fifo_command_LDADD = -lpopt @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/ferrisredirect/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/ferrisredirect/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-internal-file-to-fifo-command$(EXEEXT): $(ferris_internal_file_to_fifo_command_OBJECTS) $(ferris_internal_file_to_fifo_command_DEPENDENCIES) + @rm -f ferris-internal-file-to-fifo-command$(EXEEXT) + $(CXXLINK) $(ferris_internal_file_to_fifo_command_OBJECTS) $(ferris_internal_file_to_fifo_command_LDADD) $(LIBS) +ferris-redirect$(EXEEXT): $(ferris_redirect_OBJECTS) $(ferris_redirect_DEPENDENCIES) + @rm -f ferris-redirect$(EXEEXT) + $(CXXLINK) $(ferris_redirect_OBJECTS) $(ferris_redirect_LDADD) $(LIBS) +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-dist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-internal-file-to-fifo-command.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-redirect.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-dist_binSCRIPTS install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-dist_binSCRIPTS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ferrisredirect/ferris-file-to-fifo b/apps/ferrisredirect/ferris-file-to-fifo new file mode 100755 index 0000000..96e0505 --- /dev/null +++ b/apps/ferrisredirect/ferris-file-to-fifo @@ -0,0 +1,50 @@ +#!/bin/bash + +# /****************************************************************************** +# ******************************************************************************* +# ******************************************************************************* + +# libferris +# Copyright (C) 2001 Ben Martin + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# For more details see the COPYING file in the root directory of this +# distribution. + +# $Id: ferris-file-to-fifo,v 1.2 2006/08/13 11:43:12 ben Exp $ + +# ******************************************************************************* +# ******************************************************************************* +# ******************************************************************************/ + +# +# This exists mainly because I can't easily figure out how to tell bash that +# $(foo) has exited. If I run it and redirect its output then bash detects +# that the parent has exited and is OK. If run in $() notation bash waits +# for both parent and child to exit before running the enclosing command. +# + +earl=$1; +if [ x$1 == "x--ea" ]; then + attrselect="--ea $2" + earl=$3; +fi + +tmpfilename=/tmp/libferris-redirect-fifo-temp-$(id -u); +ferris-internal-file-to-fifo-command $attrselect -w $earl >|$tmpfilename; +cat $tmpfilename; +rm -f $tmpfilename; + diff --git a/apps/ferrisredirect/ferris-internal-file-to-fifo-command.cpp b/apps/ferrisredirect/ferris-internal-file-to-fifo-command.cpp new file mode 100644 index 0000000..884807b --- /dev/null +++ b/apps/ferrisredirect/ferris-internal-file-to-fifo-command.cpp @@ -0,0 +1,247 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fhead + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-file-to-fifo-command.cpp,v 1.7 2011/11/10 21:30:22 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * +*/ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-redirect-to-fifo"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +//unsigned long Truncate = 0; +unsigned long Writable = 0; +const char* EAName_CSTR = 0; + + +fh_ostream getOStream( fh_context c ) +{ + ferris_ios::openmode om = std::ios::out | std::ios::trunc | ferris_ios::o_mseq; + + if( EAName_CSTR ) + { + string eaname = EAName_CSTR; + setStrAttr( c, eaname, "x", true ); + fh_attribute a = c->getAttribute( eaname ); + return a->getIOStream( om ); + } + else + { + return c->getIOStream( om ); + } + return Factory::fcerr(); +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "trunc", 'T', POPT_ARG_NONE, &Truncate, 0, +// "truncate output file", "" }, + + { "writable", 'w', POPT_ARG_NONE, &Writable, 0, + "after reading file allow client to send updated contents.", "" }, + + { "ea", 0, POPT_ARG_STRING, &EAName_CSTR, 0, + "put redirection into this EA", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + { + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + } + if (argc < 1) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + char templatestr[500] = "/tmp/libferris-fifo-redirect-tmp-XXXXXX"; + { + int fd = mkstemp( templatestr ); + if( fd == -1 ) + { + cerr << errnum_to_string( "Failed to create a temporary file:", errno ); + return 0; + } + close(fd); + } + + + mode_t mode = S_IRUSR | S_IWUSR; + unlink( templatestr ); + int rc = mkfifo( templatestr, mode ); + if( rc == -1 ) + { + cerr << errnum_to_string( "Failed to create a fifo:", errno ); + return 0; + } + + cout << templatestr << flush; + SwitchToDaemonMode(); + + + + ctxlist_t selection; + stringlist_t srcs; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + fh_context c = Shell::acquireContext( srcURL, 0, false ); + selection.push_back( c ); + } + + if( selection.empty() ) + { + cerr << "please supply a URL to acquire data from." << endl; + exit(1); + } + + fh_context c = selection.front(); + + ferris_ios::openmode om = std::ios::in | ferris_ios::o_mseq; +// if( Truncate ) +// { +// om |= std::ios::ate; +// } + + fh_istream iss = Factory::fcin(); + if( EAName_CSTR ) + { + string eaname = EAName_CSTR; + cerr << "Information using getstrattr():" << getStrAttr( c, eaname, "" ) << endl; + try + { + fh_attribute a = c->getAttribute( eaname ); + iss = a->getIStream(); + } + catch( NoSuchAttribute& e ) + { + cerr << "no attribute" << endl; + fh_stringstream ss; + iss = ss; + } + catch( exception& e ) + { + cerr << "unexpected error:" << e.what() << endl; + } + + } + else + { +// cerr << "Reading from c:" << c->getURL() << endl; + iss = c->getIStream( om ); + } + + + + { + int fd = open( templatestr, O_WRONLY ); + bool closeFD = true; + fh_ostream oss = Factory::MakeFdOStream( fd, closeFD ); + copy( istreambuf_iterator( iss ), + istreambuf_iterator(), + ostreambuf_iterator( oss ) ); + oss << flush; + close(fd); + } + + if( Writable ) + { + int fd = open( templatestr, O_RDONLY ); + bool closeFD = true; + fh_istream iss = Factory::MakeFdIStream( fd, closeFD ); + fh_ostream oss = getOStream( c ); + copy( istreambuf_iterator( iss ), + istreambuf_iterator(), + ostreambuf_iterator( oss ) ); + oss << flush; + + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/ferrisredirect/ferris-redirect.cpp b/apps/ferrisredirect/ferris-redirect.cpp new file mode 100644 index 0000000..1e6910b --- /dev/null +++ b/apps/ferrisredirect/ferris-redirect.cpp @@ -0,0 +1,174 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fhead + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-redirect.cpp,v 1.9 2010/09/24 21:31:12 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * +*/ + + +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-redirect"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +unsigned long Truncate = 0; +unsigned long Append = 0; +unsigned long DontAttemptMount = 0; +const char* EAName_CSTR = 0; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "trunc", 'T', POPT_ARG_NONE, &Truncate, 0, + "truncate output file", "" }, + + { "append", 'z', POPT_ARG_NONE, &Append, 0, + "append to output file", "" }, + + { "ea", 'a', POPT_ARG_STRING, &EAName_CSTR, 0, + "put redirection into this EA", "" }, + + { "dont-attempt-mount", 'x', POPT_ARG_NONE, &DontAttemptMount, 0, + "truncate output file", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + { + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + } + + + if (argc < 1) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + ctxlist_t selection; + stringlist_t srcs; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + fh_context c = Shell::acquireContext( srcURL, 0, false ); + selection.push_back( c ); + } + + if( selection.empty() ) + { + cerr << "please supply a URL where data is to be redirected to." << endl; + exit(1); + } + + fh_context c = selection.front(); + fh_istream iss = Factory::fcin(); + + ferris_ios::openmode om = std::ios::out | ferris_ios::o_mseq; + if( Truncate ) + { + om |= std::ios::trunc; + } + if( Append ) + { + om |= std::ios::ate; + } + + + fh_ostream oss = Factory::fcerr(); + if( EAName_CSTR ) + { + string eaname = EAName_CSTR; + string v = StreamToString( iss ); + bool create = true; + bool throw_for_errors = true; + bool dontDelegateToOvermountContext = DontAttemptMount; + setStrAttr( c, eaname, v, create, throw_for_errors, dontDelegateToOvermountContext ); + } + else + { + oss = c->getIOStream( om ); + copy( istreambuf_iterator( iss ), + istreambuf_iterator(), + ostreambuf_iterator( oss ) ); + } + + if( Verbose ) + { + cerr << "ferris redirection successfully performed." << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fileactions/Makefile.am b/apps/fileactions/Makefile.am new file mode 100644 index 0000000..f5df017 --- /dev/null +++ b/apps/fileactions/Makefile.am @@ -0,0 +1,21 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferris-file-action ferris-set-file-action-for-type + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferris_file_action_SOURCES = ferris-file-action.cpp +ferris_file_action_LDADD = -lpopt @LIBFERRIS_LA@ + +ferris_set_file_action_for_type_SOURCES = ferris-set-file-action-for-type.cpp +ferris_set_file_action_for_type_LDADD = -lpopt @LIBFERRIS_LA@ + diff --git a/apps/fileactions/Makefile.in b/apps/fileactions/Makefile.in new file mode 100644 index 0000000..ccbceb0 --- /dev/null +++ b/apps/fileactions/Makefile.in @@ -0,0 +1,1001 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-file-action$(EXEEXT) \ + ferris-set-file-action-for-type$(EXEEXT) +subdir = apps/fileactions +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_file_action_OBJECTS = ferris-file-action.$(OBJEXT) +ferris_file_action_OBJECTS = $(am_ferris_file_action_OBJECTS) +ferris_file_action_DEPENDENCIES = +am_ferris_set_file_action_for_type_OBJECTS = \ + ferris-set-file-action-for-type.$(OBJEXT) +ferris_set_file_action_for_type_OBJECTS = \ + $(am_ferris_set_file_action_for_type_OBJECTS) +ferris_set_file_action_for_type_DEPENDENCIES = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_file_action_SOURCES) \ + $(ferris_set_file_action_for_type_SOURCES) +DIST_SOURCES = $(ferris_file_action_SOURCES) \ + $(ferris_set_file_action_for_type_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferris_file_action_SOURCES = ferris-file-action.cpp +ferris_file_action_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_set_file_action_for_type_SOURCES = ferris-set-file-action-for-type.cpp +ferris_set_file_action_for_type_LDADD = -lpopt @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileactions/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileactions/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-file-action$(EXEEXT): $(ferris_file_action_OBJECTS) $(ferris_file_action_DEPENDENCIES) + @rm -f ferris-file-action$(EXEEXT) + $(CXXLINK) $(ferris_file_action_OBJECTS) $(ferris_file_action_LDADD) $(LIBS) +ferris-set-file-action-for-type$(EXEEXT): $(ferris_set_file_action_for_type_OBJECTS) $(ferris_set_file_action_for_type_DEPENDENCIES) + @rm -f ferris-set-file-action-for-type$(EXEEXT) + $(CXXLINK) $(ferris_set_file_action_for_type_OBJECTS) $(ferris_set_file_action_for_type_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-file-action.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-set-file-action-for-type.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileactions/ferris-file-action.cpp b/apps/fileactions/ferris-file-action.cpp new file mode 100644 index 0000000..87c9c67 --- /dev/null +++ b/apps/fileactions/ferris-file-action.cpp @@ -0,0 +1,163 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fhead + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-file-action.cpp,v 1.4 2010/09/24 21:31:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * +*/ + + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileActions; + +const string PROGRAM_NAME = "ferris-file-action"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +unsigned long ViewMode = 0; +unsigned long EditMode = 0; +const char* AppName = 0; +unsigned long ListAppNames = 0; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 0, POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "view", 'v', POPT_ARG_NONE, &ViewMode, 0, + "view the given file URLs", "" }, + + { "edit", 'e', POPT_ARG_NONE, &EditMode, 0, + "edit the given file URLs", "" }, + + { "app", 'a', POPT_ARG_STRING, &AppName, 0, + "execute the named operation", "" }, + + { "list", 'l', POPT_ARG_NONE, &ListAppNames, 0, + "list named operations for given urls", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 1) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + ctxlist_t selection; + stringlist_t srcs; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + fh_context c = Resolve( srcURL ); + selection.push_back( c ); + } + + KnownFileOperations opcode = OP_VIEW; + if( EditMode ) + opcode = OP_EDIT; + + if( ListAppNames ) + { + fh_context c = getOpenWithContext( selection ); + cerr << "Actions are defined at:" << c->getURL() << endl; + for( Context::iterator ci = c->begin(); ci!=c->end(); ++ci ) + { + cout << (*ci)->getDirName() << endl; + } + } + else + { + int selection_sz = selection.size(); + if( AppName ) + { + KnownFileOperations opcode = OP_UNKNOWN; + if( ViewMode ) + opcode = OP_VIEW; + if( EditMode ) + opcode = OP_EDIT; + + ExecuteApplicaionByShortcutName( AppName, selection, opcode ); + } + else + { + long rc = ExecuteOperation( opcode, selection ); + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fileactions/ferris-set-file-action-for-type.cpp b/apps/fileactions/ferris-set-file-action-for-type.cpp new file mode 100644 index 0000000..1a5e0e4 --- /dev/null +++ b/apps/fileactions/ferris-set-file-action-for-type.cpp @@ -0,0 +1,136 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris-set-file-action-for-type + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-set-file-action-for-type.cpp,v 1.3 2010/09/24 21:31:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * +*/ + + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileActions; + +const string PROGRAM_NAME = "ferris-set-file-action-for-type"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +unsigned long ViewMode = 0; +unsigned long EditMode = 0; +const char* AppName = 0; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "view", 'v', POPT_ARG_NONE, &ViewMode, 0, + "view the given file URLs", "" }, + + { "edit", 'e', POPT_ARG_NONE, &EditMode, 0, + "edit the given file URLs", "" }, + + { "app", 'a', POPT_ARG_STRING, &AppName, 0, + "execute the named operation", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 1) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + ctxlist_t selection; + stringlist_t srcs; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + fh_context c = Resolve( srcURL ); + selection.push_back( c ); + } + + KnownFileOperations opcode = OP_VIEW; + if( EditMode ) + opcode = OP_EDIT; + + if( AppName ) + { + setApplicationForOperationOnType( selection, AppName, opcode ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fileclip/Makefile.am b/apps/fileclip/Makefile.am new file mode 100644 index 0000000..b7b5801 --- /dev/null +++ b/apps/fileclip/Makefile.am @@ -0,0 +1,5 @@ +NULL= +SUBDIRS = fclipcopy fclipcut fclippaste fclipundo fclipredo fcliplink + +bin_SCRIPTS = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.sh diff --git a/apps/fileclip/Makefile.in b/apps/fileclip/Makefile.in new file mode 100644 index 0000000..b2a8b6e --- /dev/null +++ b/apps/fileclip/Makefile.in @@ -0,0 +1,1086 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/fileclip +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bindir)" +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +SUBDIRS = fclipcopy fclipcut fclippaste fclipundo fclipredo fcliplink +bin_SCRIPTS = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.sh +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binSCRIPTS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclipcopy/Makefile.am b/apps/fileclip/fclipcopy/Makefile.am new file mode 100644 index 0000000..f969c87 --- /dev/null +++ b/apps/fileclip/fclipcopy/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fclipcopy + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipcopy_SOURCES = fclipcopy.cpp +fclipcopy_LDADD = -lpopt @LIBFERRIS_LA@ +fclipcopy_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fclipcopy/Makefile.in b/apps/fileclip/fclipcopy/Makefile.in new file mode 100644 index 0000000..3db970e --- /dev/null +++ b/apps/fileclip/fclipcopy/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fclipcopy$(EXEEXT) +subdir = apps/fileclip/fclipcopy +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fclipcopy_OBJECTS = fclipcopy.$(OBJEXT) +fclipcopy_OBJECTS = $(am_fclipcopy_OBJECTS) +fclipcopy_DEPENDENCIES = +fclipcopy_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fclipcopy_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fclipcopy_SOURCES) +DIST_SOURCES = $(fclipcopy_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipcopy_SOURCES = fclipcopy.cpp +fclipcopy_LDADD = -lpopt @LIBFERRIS_LA@ +fclipcopy_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fclipcopy/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fclipcopy/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fclipcopy$(EXEEXT): $(fclipcopy_OBJECTS) $(fclipcopy_DEPENDENCIES) + @rm -f fclipcopy$(EXEEXT) + $(fclipcopy_LINK) $(fclipcopy_OBJECTS) $(fclipcopy_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclipcopy.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclipcopy/fclipcopy.cpp b/apps/fileclip/fclipcopy/fclipcopy.cpp new file mode 100644 index 0000000..75436b1 --- /dev/null +++ b/apps/fileclip/fclipcopy/fclipcopy.cpp @@ -0,0 +1,124 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclipcopy + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fclipcopy.cpp,v 1.3 2010/09/24 21:31:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; + +const string PROGRAM_NAME = "fclipcopy"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + unsigned long Additive = 0; + + struct poptOption optionsTable[] = + { + { "additive", 'a', POPT_ARG_NONE, &Additive, 0, + "If previous operation was a copy, then add new urls to clipboard", "" }, + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_context clip = Factory::getFileClipboard(); + + if( !Additive ) + { + Clear( clip ); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + + try + { + fh_context c = Resolve( srcURL ); + Copy( clip, c ); + if( Verbose ) + { + cout << "copy object from:" << c->getURL() << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/fclipcut/Makefile.am b/apps/fileclip/fclipcut/Makefile.am new file mode 100644 index 0000000..b400483 --- /dev/null +++ b/apps/fileclip/fclipcut/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fclipcut + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipcut_SOURCES = fclipcut.cpp +fclipcut_LDADD = -lpopt @LIBFERRIS_LA@ +fclipcut_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fclipcut/Makefile.in b/apps/fileclip/fclipcut/Makefile.in new file mode 100644 index 0000000..6bda3c6 --- /dev/null +++ b/apps/fileclip/fclipcut/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fclipcut$(EXEEXT) +subdir = apps/fileclip/fclipcut +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fclipcut_OBJECTS = fclipcut.$(OBJEXT) +fclipcut_OBJECTS = $(am_fclipcut_OBJECTS) +fclipcut_DEPENDENCIES = +fclipcut_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fclipcut_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fclipcut_SOURCES) +DIST_SOURCES = $(fclipcut_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipcut_SOURCES = fclipcut.cpp +fclipcut_LDADD = -lpopt @LIBFERRIS_LA@ +fclipcut_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fclipcut/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fclipcut/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fclipcut$(EXEEXT): $(fclipcut_OBJECTS) $(fclipcut_DEPENDENCIES) + @rm -f fclipcut$(EXEEXT) + $(fclipcut_LINK) $(fclipcut_OBJECTS) $(fclipcut_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclipcut.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclipcut/fclipcut.cpp b/apps/fileclip/fclipcut/fclipcut.cpp new file mode 100644 index 0000000..59153eb --- /dev/null +++ b/apps/fileclip/fclipcut/fclipcut.cpp @@ -0,0 +1,124 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclipcut + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fclipcut.cpp,v 1.3 2010/09/24 21:31:13 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; + +const string PROGRAM_NAME = "fclipcut"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + unsigned long Additive = 0; + + struct poptOption optionsTable[] = + { + { "additive", 'a', POPT_ARG_NONE, &Additive, 0, + "If previous operation was a copy, then add new urls to clipboard", "" }, + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_context clip = Factory::getFileClipboard(); + + if( !Additive ) + { + Clear( clip ); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + + try + { + fh_context c = Resolve( srcURL ); + Cut( clip, c ); + if( Verbose ) + { + cout << "cut object from:" << c->getURL() << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/fcliplink/Makefile.am b/apps/fileclip/fcliplink/Makefile.am new file mode 100644 index 0000000..5b3da57 --- /dev/null +++ b/apps/fileclip/fcliplink/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fcliplink + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fcliplink_SOURCES = fcliplink.cpp +fcliplink_LDADD = -lpopt @LIBFERRIS_LA@ +fcliplink_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fcliplink/Makefile.in b/apps/fileclip/fcliplink/Makefile.in new file mode 100644 index 0000000..7ff7f69 --- /dev/null +++ b/apps/fileclip/fcliplink/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fcliplink$(EXEEXT) +subdir = apps/fileclip/fcliplink +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fcliplink_OBJECTS = fcliplink.$(OBJEXT) +fcliplink_OBJECTS = $(am_fcliplink_OBJECTS) +fcliplink_DEPENDENCIES = +fcliplink_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fcliplink_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fcliplink_SOURCES) +DIST_SOURCES = $(fcliplink_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fcliplink_SOURCES = fcliplink.cpp +fcliplink_LDADD = -lpopt @LIBFERRIS_LA@ +fcliplink_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fcliplink/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fcliplink/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fcliplink$(EXEEXT): $(fcliplink_OBJECTS) $(fcliplink_DEPENDENCIES) + @rm -f fcliplink$(EXEEXT) + $(fcliplink_LINK) $(fcliplink_OBJECTS) $(fcliplink_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcliplink.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fcliplink/fcliplink.cpp b/apps/fileclip/fcliplink/fcliplink.cpp new file mode 100644 index 0000000..b01cd47 --- /dev/null +++ b/apps/fileclip/fcliplink/fcliplink.cpp @@ -0,0 +1,124 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclipcopy + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fcliplink.cpp,v 1.3 2010/09/24 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; + +const string PROGRAM_NAME = "fclipcopy"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + unsigned long Additive = 0; + + struct poptOption optionsTable[] = + { + { "additive", 'a', POPT_ARG_NONE, &Additive, 0, + "If previous operation was a copy, then add new urls to clipboard", "" }, + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_context clip = Factory::getFileClipboard(); + + if( !Additive ) + { + Clear( clip ); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + + try + { + fh_context c = Resolve( srcURL ); + Link( clip, c ); + if( Verbose ) + { + cout << "copy object from:" << c->getURL() << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/fclippaste/Makefile.am b/apps/fileclip/fclippaste/Makefile.am new file mode 100644 index 0000000..4205ccf --- /dev/null +++ b/apps/fileclip/fclippaste/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fclippaste + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclippaste_SOURCES = fclippaste.cpp +fclippaste_LDADD = -lpopt @LIBFERRIS_LA@ +fclippaste_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fclippaste/Makefile.in b/apps/fileclip/fclippaste/Makefile.in new file mode 100644 index 0000000..c0cc258 --- /dev/null +++ b/apps/fileclip/fclippaste/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fclippaste$(EXEEXT) +subdir = apps/fileclip/fclippaste +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fclippaste_OBJECTS = fclippaste.$(OBJEXT) +fclippaste_OBJECTS = $(am_fclippaste_OBJECTS) +fclippaste_DEPENDENCIES = +fclippaste_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fclippaste_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fclippaste_SOURCES) +DIST_SOURCES = $(fclippaste_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclippaste_SOURCES = fclippaste.cpp +fclippaste_LDADD = -lpopt @LIBFERRIS_LA@ +fclippaste_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fclippaste/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fclippaste/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fclippaste$(EXEEXT): $(fclippaste_OBJECTS) $(fclippaste_DEPENDENCIES) + @rm -f fclippaste$(EXEEXT) + $(fclippaste_LINK) $(fclippaste_OBJECTS) $(fclippaste_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclippaste.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclippaste/fclippaste.cpp b/apps/fileclip/fclippaste/fclippaste.cpp new file mode 100644 index 0000000..9d52f65 --- /dev/null +++ b/apps/fileclip/fclippaste/fclippaste.cpp @@ -0,0 +1,118 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclippaste + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fclippaste.cpp,v 1.3 2010/09/24 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; + +const string PROGRAM_NAME = "fclippaste"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_context clip = Factory::getFileClipboard(); + + typedef vector srcs_t; + srcs_t srcs; + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + + try + { + fh_context c = Resolve( srcURL ); + Paste( clip, c ); + if( Verbose ) + { + cout << "paste object to:" << c->getURL() << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/fclipredo/Makefile.am b/apps/fileclip/fclipredo/Makefile.am new file mode 100644 index 0000000..d632ccf --- /dev/null +++ b/apps/fileclip/fclipredo/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fclipredo + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipredo_SOURCES = fclipredo.cpp +fclipredo_LDADD = -lpopt @LIBFERRIS_LA@ +fclipredo_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fclipredo/Makefile.in b/apps/fileclip/fclipredo/Makefile.in new file mode 100644 index 0000000..077c4df --- /dev/null +++ b/apps/fileclip/fclipredo/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fclipredo$(EXEEXT) +subdir = apps/fileclip/fclipredo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fclipredo_OBJECTS = fclipredo.$(OBJEXT) +fclipredo_OBJECTS = $(am_fclipredo_OBJECTS) +fclipredo_DEPENDENCIES = +fclipredo_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fclipredo_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fclipredo_SOURCES) +DIST_SOURCES = $(fclipredo_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipredo_SOURCES = fclipredo.cpp +fclipredo_LDADD = -lpopt @LIBFERRIS_LA@ +fclipredo_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fclipredo/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fclipredo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fclipredo$(EXEEXT): $(fclipredo_OBJECTS) $(fclipredo_DEPENDENCIES) + @rm -f fclipredo$(EXEEXT) + $(fclipredo_LINK) $(fclipredo_OBJECTS) $(fclipredo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclipredo.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclipredo/fclipredo.cpp b/apps/fileclip/fclipredo/fclipredo.cpp new file mode 100644 index 0000000..b352e8c --- /dev/null +++ b/apps/fileclip/fclipredo/fclipredo.cpp @@ -0,0 +1,103 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclipredo + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fclipredo.cpp,v 1.3 2010/09/24 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; +using namespace Ferris::Cursor; + +const string PROGRAM_NAME = "fclipredo"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + unsigned long DontMoveCursor = 0; + + struct poptOption optionsTable[] = + { + { "dont-move-cursor", 'd', POPT_ARG_NONE, &DontMoveCursor, 0, + "leave cursor at current position", "" }, + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]*"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + fh_context clip = Factory::getFileClipboard(); + fh_context cursor = Factory::getCursor( clip ); + + Redo( cursor ); + + if( !DontMoveCursor ) + { + cursorNext( cursor ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/fclipundo/Makefile.am b/apps/fileclip/fclipundo/Makefile.am new file mode 100644 index 0000000..b191a6f --- /dev/null +++ b/apps/fileclip/fclipundo/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fclipundo + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipundo_SOURCES = fclipundo.cpp +fclipundo_LDADD = -lpopt @LIBFERRIS_LA@ +fclipundo_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fileclip/fclipundo/Makefile.in b/apps/fileclip/fclipundo/Makefile.in new file mode 100644 index 0000000..b4668cd --- /dev/null +++ b/apps/fileclip/fclipundo/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fclipundo$(EXEEXT) +subdir = apps/fileclip/fclipundo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fclipundo_OBJECTS = fclipundo.$(OBJEXT) +fclipundo_OBJECTS = $(am_fclipundo_OBJECTS) +fclipundo_DEPENDENCIES = +fclipundo_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fclipundo_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fclipundo_SOURCES) +DIST_SOURCES = $(fclipundo_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fclipundo_SOURCES = fclipundo.cpp +fclipundo_LDADD = -lpopt @LIBFERRIS_LA@ +fclipundo_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fileclip/fclipundo/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fileclip/fclipundo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fclipundo$(EXEEXT): $(fclipundo_OBJECTS) $(fclipundo_DEPENDENCIES) + @rm -f fclipundo$(EXEEXT) + $(fclipundo_LINK) $(fclipundo_OBJECTS) $(fclipundo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclipundo.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fileclip/fclipundo/fclipundo.cpp b/apps/fileclip/fclipundo/fclipundo.cpp new file mode 100644 index 0000000..4b3dec6 --- /dev/null +++ b/apps/fileclip/fclipundo/fclipundo.cpp @@ -0,0 +1,109 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fclipundo + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fclipundo.cpp,v 1.3 2010/09/24 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FileClip; +using namespace Ferris::Cursor; + +const string PROGRAM_NAME = "fclipundo"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* strx = 0; + unsigned long Verbose = 0; + unsigned long DontMoveCursor = 0; + + struct poptOption optionsTable[] = + { + { "dont-move-cursor", 'd', POPT_ARG_NONE, &DontMoveCursor, 0, + "leave cursor at current position", "" }, + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + +// { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, +// "Specify destination explicity, all remaining URLs are assumed to be source files", +// "DIR" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]*"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + +// if (argc < 2) +// { +// poptPrintHelp(optCon, stderr, 0); +// exit(1); +// } + + fh_context clip = Factory::getFileClipboard(); + fh_context cursor = Factory::getCursor( clip ); + + Undo( cursor ); + + if( !DontMoveCursor ) + { + cursorPrev( cursor ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/fileclip/ferris-fileclip-set-sloth.sh b/apps/fileclip/ferris-fileclip-set-sloth.sh new file mode 100644 index 0000000..5a27deb --- /dev/null +++ b/apps/fileclip/ferris-fileclip-set-sloth.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +val=${1:-1}; +clipname=${2:-~/.ferris/file-clipboard.db/primary}; + +echo -n $val | ferris-redirect -T --ea=commands-use-sloth $clipname diff --git a/apps/fmedallion/Makefile.am b/apps/fmedallion/Makefile.am new file mode 100644 index 0000000..204b7a6 --- /dev/null +++ b/apps/fmedallion/Makefile.am @@ -0,0 +1,24 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fmedallion ferris-get-emblems-within-range + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmedallion_SOURCES = fmedallion.cpp +fmedallion_LDADD = -lpopt @LIBFERRIS_LA@ +fmedallion_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +ferris_get_emblems_within_range_SOURCES = ferris-get-emblems-within-range.cpp +ferris_get_emblems_within_range_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_get_emblems_within_range_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fmedallion/Makefile.in b/apps/fmedallion/Makefile.in new file mode 100644 index 0000000..3626598 --- /dev/null +++ b/apps/fmedallion/Makefile.in @@ -0,0 +1,1011 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fmedallion$(EXEEXT) \ + ferris-get-emblems-within-range$(EXEEXT) +subdir = apps/fmedallion +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_get_emblems_within_range_OBJECTS = \ + ferris-get-emblems-within-range.$(OBJEXT) +ferris_get_emblems_within_range_OBJECTS = \ + $(am_ferris_get_emblems_within_range_OBJECTS) +ferris_get_emblems_within_range_DEPENDENCIES = +ferris_get_emblems_within_range_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_get_emblems_within_range_LDFLAGS) $(LDFLAGS) -o $@ +am_fmedallion_OBJECTS = fmedallion.$(OBJEXT) +fmedallion_OBJECTS = $(am_fmedallion_OBJECTS) +fmedallion_DEPENDENCIES = +fmedallion_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fmedallion_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_get_emblems_within_range_SOURCES) \ + $(fmedallion_SOURCES) +DIST_SOURCES = $(ferris_get_emblems_within_range_SOURCES) \ + $(fmedallion_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmedallion_SOURCES = fmedallion.cpp +fmedallion_LDADD = -lpopt @LIBFERRIS_LA@ +fmedallion_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +ferris_get_emblems_within_range_SOURCES = ferris-get-emblems-within-range.cpp +ferris_get_emblems_within_range_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_get_emblems_within_range_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fmedallion/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fmedallion/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-get-emblems-within-range$(EXEEXT): $(ferris_get_emblems_within_range_OBJECTS) $(ferris_get_emblems_within_range_DEPENDENCIES) + @rm -f ferris-get-emblems-within-range$(EXEEXT) + $(ferris_get_emblems_within_range_LINK) $(ferris_get_emblems_within_range_OBJECTS) $(ferris_get_emblems_within_range_LDADD) $(LIBS) +fmedallion$(EXEEXT): $(fmedallion_OBJECTS) $(fmedallion_DEPENDENCIES) + @rm -f fmedallion$(EXEEXT) + $(fmedallion_LINK) $(fmedallion_OBJECTS) $(fmedallion_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-get-emblems-within-range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmedallion.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fmedallion/ferris-get-emblems-within-range.cpp b/apps/fmedallion/ferris-get-emblems-within-range.cpp new file mode 100644 index 0000000..9efa25e --- /dev/null +++ b/apps/fmedallion/ferris-get-emblems-within-range.cpp @@ -0,0 +1,237 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris-get-emblems-within-range command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-get-emblems-within-range.cpp,v 1.3 2010/09/24 21:31:14 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-get-emblems-within-range"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void showEmblemList( emblemset_t& el ) +{ + bool v = true; + for( emblemset_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + if( v ) v = false; + else cout << ","; + + cout << em->getID(); + } + cout << endl; +} + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* Z_CSTR = 0; + unsigned long EAQueryFormat = 0; + unsigned long Verbose = 0; + unsigned long ShowDownSet = 0; + unsigned long InKilometers = 0; + double LatRange = 0; + double LongRange = 0; + double BothRange = 0; + const char* PersonalityName_CSTR = 0; + const char* UseETagereAtPath = 0; + const char* EmblemName = 0; + const char* EmblemID = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "eaquery-format", 'q', POPT_ARG_NONE, &EAQueryFormat, 0, + "generate output in the format the feaindexquery expects", "" }, + + { "emblem-name", 'e', POPT_ARG_STRING, &EmblemName, 0, + "name of emblem for operation", "" }, + + { "emblem-id", 'i', POPT_ARG_STRING, &EmblemID, 0, + "emblem ID for operation", "" }, + + { "latitude-range", 'A', POPT_ARG_DOUBLE, &LatRange, 0, + "range left and right emblem", "" }, + + { "longitude-range", 'O', POPT_ARG_DOUBLE, &LongRange, 0, + "range above and below emblem", "" }, + + { "range", 'R', POPT_ARG_DOUBLE, &BothRange, 0, + "range to use for both lat/long (-A and -O in one)", "" }, + + { "kilometers", 'k', POPT_ARG_NONE, &InKilometers, 0, + "latitude-range and latitude-range are in km instead of digital long/lat", "" }, + + { "downset", 'd', POPT_ARG_NONE, &ShowDownSet, 0, + "show the downsets of all emblems within range.", "" }, + + { "use-etagere", 0, POPT_ARG_STRING, &UseETagereAtPath, 0, + "use etagere at specified location instead of default", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( BothRange ) + { + LatRange = BothRange; + LongRange = BothRange; + } + + + double kmPerDigitalDigit = 111.10527282045992; + if( InKilometers ) + { +// cerr << "InKilometers" << endl; + LatRange /= kmPerDigitalDigit; + LongRange /= kmPerDigitalDigit; + } + + fh_etagere et = Factory::getEtagere(); + if( UseETagereAtPath ) + { + et = Factory::makeEtagere( UseETagereAtPath ); + Factory::setDefaultEtagere( et ); + } + + fh_emblem em = 0; + if( EmblemName ) + em = et->getEmblemByName( EmblemName ); + if( EmblemID ) + em = et->getEmblemByID( toType( EmblemID )); + + double elat = em->getDigitalLatitude(); + double elong = em->getDigitalLongitude(); + +// cerr << "LatRange:" << LatRange << " LongRange:" << LongRange << endl; +// cerr << " elat:" << elat << " elong:" << elong << endl; + + emblemset_t result; + fh_emblem geospatialem = et->getEmblemByName( "libferris-geospatial" ); + emblems_t all = geospatialem->getDownset(); + for( emblems_t::iterator ai = all.begin(); ai != all.end(); ++ai ) + { + double alat = (*ai)->getDigitalLatitude(); + double along = (*ai)->getDigitalLongitude(); + + if( !alat || !along ) + continue; + +// cerr << "eid:" << (*ai)->getID() +// << " alat:" << alat << " along:" << along +// << endl; + + if( fabs( alat - elat ) < LatRange ) + { + if( fabs( along - elong ) < LongRange ) + { + if( ShowDownSet ) + { + emblems_t ds = (*ai)->getDownset(); + copy( ds.begin(), ds.end(), inserter( result, result.end() ) ); + } + else + { + result.insert( *ai ); + } + } + } + } + + if( EAQueryFormat ) + { + cout << "("; + if( result.size() > 1 ) + cout << "|"; + bool v = true; + for( emblemset_t::iterator ei = result.begin(); ei!=result.end(); ++ei ) + { + fh_emblem em = *ei; + if( v ) v = false; + else cout << ""; + + cout << "(emblem:id-" << em->getID() << "==1)"; + } + cout << ")"; + } + else + { + showEmblemList( result ); + } + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fmedallion/fmedallion.cpp b/apps/fmedallion/fmedallion.cpp new file mode 100644 index 0000000..a8952e0 --- /dev/null +++ b/apps/fmedallion/fmedallion.cpp @@ -0,0 +1,317 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fmedallion command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fmedallion.cpp,v 1.5 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 2 for unknown personality requested +*/ + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fmedallion"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void showEmblemList( emblems_t& el ) +{ + for( emblems_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + cout << "id:" << em->getID() << " name:" << em->getName() << endl; + } +} + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* Z_CSTR = 0; + unsigned long Verbose = 0; + unsigned long ListEmblems = 0; + unsigned long AddEmblem = 0; + unsigned long RetractEmblem = 0; + unsigned long RemoveEmblem = 0; + unsigned long ListEmblem = 0; + unsigned long ShowBelief = 0; + unsigned long UpsetEmblem = 0; + unsigned long CreateEmblem = 0; + double Sureness = 0; + const char* PersonalityName_CSTR = 0; + const char* UseETagereAtPath = 0; + const char* EmblemName = 0; + const char* EmblemID = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "create", 'c', POPT_ARG_NONE, &CreateEmblem, 0, + "Create emblem is it doesn't already exist", "" }, + + { "list-all-emblems", 'A', POPT_ARG_NONE, &ListEmblems, 0, + "Present a listing of all emblems sorted by name", "" }, + + { "emblem-name", 'e', POPT_ARG_STRING, &EmblemName, 0, + "name of emblem for operation", "" }, + + { "emblem-id", 'i', POPT_ARG_STRING, &EmblemID, 0, + "emblem ID for operation", "" }, + + { "personality", 'p', POPT_ARG_STRING, &PersonalityName_CSTR, 0, + "personality to use (see also sureness)", "" }, + + { "sureness", 's', POPT_ARG_DOUBLE, &Sureness, 0, + "sureness of assertion for personality (no effect for user personality)", "" }, + + { "add", 'a', POPT_ARG_NONE, &AddEmblem, 0, + "add the emblem to all contexts listed", "" }, + + { "retract", 'r', POPT_ARG_NONE, &RetractEmblem, 0, + "retract the emblem from all contexts listed (negative association)", "" }, + + { "remove", 'R', POPT_ARG_NONE, &RemoveEmblem, 0, + "remove the emblem from all contexts listed (neither assertion or " + "retraction is recorded for the emblem, medallion, personality combination", "" }, + + { "list", 'l', POPT_ARG_NONE, &ListEmblem, 0, + "show the emblems that each listed context has", "" }, + + { "belief", 'b', POPT_ARG_NONE, &ShowBelief, 0, + "show the current assertions and retractions for all personalities for a file", "" }, + + { "upset", 'u', POPT_ARG_NONE, &UpsetEmblem, 0, + "show the upset of the emblems that each listed context has", "" }, + + { "use-etagere", 0, POPT_ARG_STRING, &UseETagereAtPath, 0, + "use etagere at specified location instead of default", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_etagere et = Factory::getEtagere(); + if( UseETagereAtPath ) + { + et = Factory::makeEtagere( UseETagereAtPath ); + Factory::setDefaultEtagere( et ); + } + + // cerr << "CreateEmblem:" << CreateEmblem << endl; + // cerr << "AddEmblem:" << AddEmblem << endl; + // cerr << "EmblemName:" << EmblemName << endl; + // + // If they want to create a new emblem when it doesn't + // already exist, then create it now. + // + if( CreateEmblem && AddEmblem && EmblemName ) + { + try + { + et->getEmblemByName( EmblemName ); + } + catch( EmblemNotFoundException& e ) + { + fh_emblem root = et->obtainEmblemByName( "libferris-created-emblems" ); + fh_emblem em = root->obtainChild( EmblemName ); + et->sync(); + } + catch(...) + { + throw; + } + } + + if( AddEmblem || RetractEmblem || RemoveEmblem || ListEmblem || UpsetEmblem || ShowBelief ) + { + fh_emblem em = 0; + if( EmblemName ) + em = et->getEmblemByName( EmblemName ); + if( EmblemID ) + em = et->getEmblemByID( toType( EmblemID )); + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string URL = tmpCSTR; + try + { + fh_context c = Resolve( URL ); + fh_medallion m = c->getMedallion(); + fh_personality pers = Factory::getCurrentUserPersonality(); + + if( PersonalityName_CSTR ) + { +// cerr << "Looking for personality:" << PersonalityName_CSTR << "..." << endl; + pers = obtainPersonality( PersonalityName_CSTR ); + if( !pers ) + { + cerr << "Personality:" << PersonalityName_CSTR << " not found" << endl; + exit( 2 ); + } +// cerr << "Obtained personality:" << PersonalityName_CSTR << "..." << endl; + } + + if( AddEmblem ) + { + if( PersonalityName_CSTR ) + { + m->addEmblem( em, pers, Sureness ); + } + else + { + m->addEmblem( em ); + } + } + if( RetractEmblem ) + { + if( PersonalityName_CSTR ) + { + m->retractEmblem( em, pers, Sureness ); + } + else + { + m->retractEmblem( em ); + } + } + if( RemoveEmblem ) + { + cerr << "RemoveEmblem em:" << em->getName() + << " pers:" << pers->getName() + << endl; + + if( PersonalityName_CSTR ) + { + m->removeEmblem( em, pers ); + } + else + { + m->removeEmblem( em ); + } + } + if( ListEmblem ) + { + emblems_t el = m->getMostSpecificEmblems(); + cerr << "ListEmblem count:" << el.size() << endl; + showEmblemList( el ); + } + if( ShowBelief ) + { + emblems_t el = m->getMostSpecificEmblems(); + for( emblems_t::iterator ei = el.begin(); ei!=el.end(); ++ei ) + { + fh_emblem em = *ei; + + typedef std::list< fh_personality > plist_t; + plist_t plist = m->getListOfPersonalitiesWhoHaveOpinion( em ); + + cerr << "For emblem: " << em->getName() << endl; + cerr << "Fuzzy resolution from -100 to 100: " + << m->getFuzzyBelief( em ) << endl; + for( plist_t::iterator pi = plist.begin(); pi!=plist.end(); ++pi ) + { + fh_medallionBelief bel = m->getBelief( em, *pi ); + fh_times t = bel->getTimes(); + double sureness = bel->getSureness(); + + cerr << "Personality: " << (*pi)->getName() << endl; + cerr << " sureness: " << sureness << endl; + cerr << " atime: " << Time::toTimeString(t->getATime()) << endl; + cerr << " mtime: " << Time::toTimeString(t->getMTime()) << endl; + } + cerr << endl; + cerr << endl; + } + } + if( UpsetEmblem ) + { + emblems_t el = m->getAllEmblems(); + showEmblemList( el ); + } + m->sync(); + } + catch( exception& e ) + { + cerr << "Problem changing emblems for:" << URL << endl + << " e:" << e.what() + << endl; + } + } + } + + if( ListEmblems ) + { + emblems_t el = et->getAllEmblems(); + showEmblemList( el ); + } + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fmkdir/Makefile.am b/apps/fmkdir/Makefile.am new file mode 100644 index 0000000..89d0a66 --- /dev/null +++ b/apps/fmkdir/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fmkdir + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmkdir_SOURCES = fmkdir.cpp +fmkdir_LDADD = -lpopt @LIBFERRIS_LA@ +fmkdir_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fmkdir/Makefile.in b/apps/fmkdir/Makefile.in new file mode 100644 index 0000000..77507f6 --- /dev/null +++ b/apps/fmkdir/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fmkdir$(EXEEXT) +subdir = apps/fmkdir +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fmkdir_OBJECTS = fmkdir.$(OBJEXT) +fmkdir_OBJECTS = $(am_fmkdir_OBJECTS) +fmkdir_DEPENDENCIES = +fmkdir_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fmkdir_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fmkdir_SOURCES) +DIST_SOURCES = $(fmkdir_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmkdir_SOURCES = fmkdir.cpp +fmkdir_LDADD = -lpopt @LIBFERRIS_LA@ +fmkdir_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fmkdir/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fmkdir/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fmkdir$(EXEEXT): $(fmkdir_OBJECTS) $(fmkdir_DEPENDENCIES) + @rm -f fmkdir$(EXEEXT) + $(fmkdir_LINK) $(fmkdir_OBJECTS) $(fmkdir_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmkdir.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fmkdir/fmkdir.cpp b/apps/fmkdir/fmkdir.cpp new file mode 100644 index 0000000..53ee835 --- /dev/null +++ b/apps/fmkdir/fmkdir.cpp @@ -0,0 +1,176 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fmkdir + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fmkdir.cpp,v 1.6 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 2 for no -p and no parent existing + * + * + * + * + * + **/ + + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::Shell; + +const string PROGRAM_NAME = "fmkdir"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +const char* ModeCSTR = 0; +unsigned long Verbose = 0; +unsigned long Parents = 0; +unsigned long Mode = 0; + +void verboseDirMade( fh_context c ) +{ + if( Verbose ) + cerr << "fmkdir: created directory " << quote( c->getURL() ) << endl; +} + + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + ContextCreated_Sig_t createdHandler; + + try + { + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "mode", 'm', POPT_ARG_STRING, &ModeCSTR, 0, + "set permission mode (as in chmod), not rwxrwxrwx - umask", "" }, + + { "parents", 'p', POPT_ARG_NONE, &Parents, 0, + "no error if existing, make parent directories as needed", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( ModeCSTR ) + { + Mode = Factory::MakeInitializationMode( ModeCSTR ); + cerr << "Have mode:" << Mode << endl; + } + + if( Verbose ) + { + createdHandler.connect( sigc::ptr_fun( verboseDirMade )); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string URL = tmpCSTR; + + try + { + if( Parents ) + { + fh_context c = CreateDir( URL, Parents, Mode, createdHandler ); +// verboseDirMade( c ); + } + else + { + fh_context p = 0; + try + { + p = Resolve( URL, RESOLVE_PARENT ); + } + catch( exception& e ) + { + cerr << "fmkdir: parent of url:" << quote( URL ) + << " does not exist and no -p option used." << endl; + exit( 2 ); + } + try + { + fh_context c = CreateDir( URL, false, Mode, createdHandler ); +// verboseDirMade( c ); + } + catch( exception& e ) + { + cerr << "fmkdir: error:" << e.what() << endl; + exit( 3 ); + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fmodestr2octal/Makefile.am b/apps/fmodestr2octal/Makefile.am new file mode 100644 index 0000000..eb8f35b --- /dev/null +++ b/apps/fmodestr2octal/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fmodestr2octal + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmodestr2octal_SOURCES = fmodestr2octal.cpp +fmodestr2octal_LDADD = -lpopt @LIBFERRIS_LA@ +fmodestr2octal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fmodestr2octal/Makefile.in b/apps/fmodestr2octal/Makefile.in new file mode 100644 index 0000000..4dd0f79 --- /dev/null +++ b/apps/fmodestr2octal/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fmodestr2octal$(EXEEXT) +subdir = apps/fmodestr2octal +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fmodestr2octal_OBJECTS = fmodestr2octal.$(OBJEXT) +fmodestr2octal_OBJECTS = $(am_fmodestr2octal_OBJECTS) +fmodestr2octal_DEPENDENCIES = +fmodestr2octal_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fmodestr2octal_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fmodestr2octal_SOURCES) +DIST_SOURCES = $(fmodestr2octal_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fmodestr2octal_SOURCES = fmodestr2octal.cpp +fmodestr2octal_LDADD = -lpopt @LIBFERRIS_LA@ +fmodestr2octal_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fmodestr2octal/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fmodestr2octal/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fmodestr2octal$(EXEEXT): $(fmodestr2octal_OBJECTS) $(fmodestr2octal_DEPENDENCIES) + @rm -f fmodestr2octal$(EXEEXT) + $(fmodestr2octal_LINK) $(fmodestr2octal_OBJECTS) $(fmodestr2octal_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmodestr2octal.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fmodestr2octal/fmodestr2octal.cpp b/apps/fmodestr2octal/fmodestr2octal.cpp new file mode 100644 index 0000000..b3149ca --- /dev/null +++ b/apps/fmodestr2octal/fmodestr2octal.cpp @@ -0,0 +1,126 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fmodestr2octal + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fmodestr2octal.cpp,v 1.3 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * + * + * + * + * + **/ + + +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::Shell; + +const string PROGRAM_NAME = "fmodestr2octal"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +const char* ModeCSTR = 0; +unsigned long Verbose = 0; + +int main( int argc, char** argv ) +{ + int exit_status = 0; + ContextCreated_Sig_t createdHandler; + + try + { + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "mode", 'm', POPT_ARG_STRING, &ModeCSTR, 0, + "Mode string to convert to octal", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* basemode1 basemode2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 || !ModeCSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string URL = tmpCSTR; + fh_context c = Resolve( URL ); + fh_chmod cmod = Factory::MakeChmod( ModeCSTR ); + + if( Verbose ) + { + cout << "using base mode from url:" << c->getURL() << endl; + } + + mode_t m = cmod->apply( toType(getStrAttr( c, "mode", "0" ))); +// cerr << "init mode:" << cmod->getInitializationMode() + cerr << "init mode:" << cmod->apply( 0 ) + << " mode:" << m + << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/frunner/Makefile.am b/apps/frunner/Makefile.am new file mode 100644 index 0000000..1b06fae --- /dev/null +++ b/apps/frunner/Makefile.am @@ -0,0 +1,24 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = + +bin_PROGRAMS = ferris-runner + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/eagenerators/ \ + -I/usr/local/include \ + @CFLAGS@ + + + +ferris_runner_SOURCES = ferris-runner.cpp +ferris_runner_LDADD = -lm -lpopt +ferris_runner_LDFLAGS = @LIBFERRIS_LA@ + diff --git a/apps/frunner/Makefile.in b/apps/frunner/Makefile.in new file mode 100644 index 0000000..61b0a82 --- /dev/null +++ b/apps/frunner/Makefile.in @@ -0,0 +1,993 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-runner$(EXEEXT) +subdir = apps/frunner +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_runner_OBJECTS = ferris-runner.$(OBJEXT) +ferris_runner_OBJECTS = $(am_ferris_runner_OBJECTS) +ferris_runner_DEPENDENCIES = +ferris_runner_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_runner_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_runner_SOURCES) +DIST_SOURCES = $(ferris_runner_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/eagenerators/ \ + -I/usr/local/include \ + @CFLAGS@ + +ferris_runner_SOURCES = ferris-runner.cpp +ferris_runner_LDADD = -lm -lpopt +ferris_runner_LDFLAGS = @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/frunner/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/frunner/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-runner$(EXEEXT): $(ferris_runner_OBJECTS) $(ferris_runner_DEPENDENCIES) + @rm -f ferris-runner$(EXEEXT) + $(ferris_runner_LINK) $(ferris_runner_OBJECTS) $(ferris_runner_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-runner.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/frunner/ferris-runner.cpp b/apps/frunner/ferris-runner.cpp new file mode 100644 index 0000000..f45bf19 --- /dev/null +++ b/apps/frunner/ferris-runner.cpp @@ -0,0 +1,187 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris runner + Copyright (C) 2008 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ls.cpp,v 1.12 2008/04/27 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; + +#define DEBUG 0 + +const string PROGRAM_NAME = "ferris-runner"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +int main( int argc, const char** argv ) +{ + const char* ShowColumnsCSTR = "x"; + unsigned long HideHeadings = 1; + unsigned long ShowVersion = 0; + + struct poptOption optionsTable[] = { + +// { "show-columns", 0, POPT_ARG_STRING, &ShowColumnsCSTR, 0, +// "Same as --show-ea", +// "size,mimetype,name" }, + + +// { "hide-headings", 0, POPT_ARG_NONE, &HideHeadings, 0, +// "Prohibit the display of column headings", 0 }, + + + /* + * Other handy stuff + */ + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + /* + * Standard Ferris options + */ + FERRIS_POPT_OPTIONS + + /** + * Expansion of strange-url://foo* + */ + FERRIS_SHELL_GLOB_POPT_OPTIONS + +// { "show-all-attributes", 0, POPT_ARG_NONE, +// &ShowAllAttributes, 0, +// "Show every available bit of metadata about each object in context", +// 0 }, + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* url1 url2 ..."); + + if (argc < 1) { +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if( ShowVersion ) + { + cout << "ferrisls version: $Id: ls.cpp,v 1.12 2008/04/27 21:30:11 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + stringstream ss; + while( const char* argCSTR = poptGetArg(optCon) ) + { + string arg = argCSTR; + ss << arg << " "; + } + cerr << "ss:" << ss.str() << endl; + +// ss << "gfcp -av file:///Video/Backedup/japan_comercial/DrJapan.avi /tmp"; +// ss << "gfcp -av file:///Video/Backedup/japan_comercial/DrJapan.avi file:///tmp"; + +// ss << "gfcp -av "; +// typedef stringlist_t urllist_t; +// urllist_t urllist; +// urllist.push_back("file:///Video/Backedup/japan_comercial/DrJapan.avi"); +// urllist.push_back("file:///tmp"); +// for( urllist_t::iterator iter = urllist.begin(); +// iter != urllist.end(); ++iter ) +// { +// fh_context src = Resolve( *iter ); +// ss << " " << Shell::quote( src->getParent()->getURL() + "\\/" + src->getDirName() ) << " "; +// } + + cerr << "cmd:" << ss.str() << endl; + + fh_runner r = new Runner(); + r->setCommandLine( ss.str() ); + r->setConnect_ChildStdOut_To_ParentStdOut( true ); + r->setConnect_ChildStdErr_To_ParentStdErr( true ); + r->setSpawnFlags( + GSpawnFlags( + G_SPAWN_SEARCH_PATH | +// G_SPAWN_STDERR_TO_DEV_NULL | +// G_SPAWN_STDOUT_TO_DEV_NULL | + r->getSpawnFlags())); + r->Run(); + + gint e = r->getExitStatus(); + cerr << "e:" << e << endl; + + return 0; +} diff --git a/apps/fschema/Makefile.am b/apps/fschema/Makefile.am new file mode 100644 index 0000000..63fb24a --- /dev/null +++ b/apps/fschema/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fschema + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fschema_SOURCES = fschema.cpp +fschema_LDADD = -lpopt @LIBFERRIS_LA@ +fschema_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fschema/Makefile.in b/apps/fschema/Makefile.in new file mode 100644 index 0000000..ba63d69 --- /dev/null +++ b/apps/fschema/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fschema$(EXEEXT) +subdir = apps/fschema +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fschema_OBJECTS = fschema.$(OBJEXT) +fschema_OBJECTS = $(am_fschema_OBJECTS) +fschema_DEPENDENCIES = +fschema_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fschema_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fschema_SOURCES) +DIST_SOURCES = $(fschema_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fschema_SOURCES = fschema.cpp +fschema_LDADD = -lpopt @LIBFERRIS_LA@ +fschema_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fschema/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fschema/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fschema$(EXEEXT): $(fschema_OBJECTS) $(fschema_DEPENDENCIES) + @rm -f fschema$(EXEEXT) + $(fschema_LINK) $(fschema_OBJECTS) $(fschema_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fschema.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fschema/fschema.cpp b/apps/fschema/fschema.cpp new file mode 100644 index 0000000..8917551 --- /dev/null +++ b/apps/fschema/fschema.cpp @@ -0,0 +1,122 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fschema command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fschema.cpp,v 1.3 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fschema"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* Z_CSTR = 0; + unsigned long Verbose = 0; + unsigned long ListBasicTypes = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "report more details than normal", "" }, + + { "list-basic-types", 'l', POPT_ARG_NONE, &ListBasicTypes, 0, + "list the basic types that are available and some info about them", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( ListBasicTypes ) + { + Factory::xsdtypemap_t tm; + Factory::makeBasicTypeMap( tm ); + + for( Factory::xsdtypemap_t::iterator ti = tm.begin(); + ti != tm.end(); ++ti ) + { + fh_context c = ti->second; + + cout << endl; + cout << "uname:" << getStrAttr( c, "uname", "" ) + << " uuid:" << getStrAttr( c, "uuid", "" ) << endl; + cout << "ferris enum:" << getStrAttr( c, "ferrisenum", "" ) + << " " << getStrAttr( c, "ferrisname", "" ) << endl; + cout << "description:" << getStrAttr( c, "description", "" ) << endl; + } + } + + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/ftouch/Makefile.am b/apps/ftouch/Makefile.am new file mode 100644 index 0000000..b7e5345 --- /dev/null +++ b/apps/ftouch/Makefile.am @@ -0,0 +1,21 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ftouch + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ftouch_SOURCES = ftouch.cpp +ftouch_LDADD = -lpopt @LIBFERRIS_LA@ +ftouch_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + + diff --git a/apps/ftouch/Makefile.in b/apps/ftouch/Makefile.in new file mode 100644 index 0000000..827021e --- /dev/null +++ b/apps/ftouch/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ftouch$(EXEEXT) +subdir = apps/ftouch +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ftouch_OBJECTS = ftouch.$(OBJEXT) +ftouch_OBJECTS = $(am_ftouch_OBJECTS) +ftouch_DEPENDENCIES = +ftouch_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ftouch_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ftouch_SOURCES) +DIST_SOURCES = $(ftouch_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ftouch_SOURCES = ftouch.cpp +ftouch_LDADD = -lpopt @LIBFERRIS_LA@ +ftouch_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/ftouch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/ftouch/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ftouch$(EXEEXT): $(ftouch_OBJECTS) $(ftouch_DEPENDENCIES) + @rm -f ftouch$(EXEEXT) + $(ftouch_LINK) $(ftouch_OBJECTS) $(ftouch_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftouch.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ftouch/ftouch.cpp b/apps/ftouch/ftouch.cpp new file mode 100644 index 0000000..709bf4f --- /dev/null +++ b/apps/ftouch/ftouch.cpp @@ -0,0 +1,344 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ftouch command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ftouch.cpp,v 1.7 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::Time; + + +const string PROGRAM_NAME = "fcompress"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +bool isRelativePath( const std::string& path ) +{ + static fh_rex r = toregexh( "^[-_A-Za-z]+:/.*" ); + if( regex_match( path, r ) ) + return false; + + return( !starts_with( path, "/" ) + && !starts_with( path, "file:" ) + && !starts_with( path, "~" ) + && !starts_with( path, "root:" ) + && !starts_with( path, "x-ferris:" ) ); +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* Date_CSTR = 0; + const char* OutputTimeFormat_CSTR = 0; + const char* ReferenceDate_CSTR = 0; + const char* StampDate_CSTR = 0; + const char* UpdateNamedStamps_CSTR = 0; + const char* NewContextMode_CSTR = 0; + unsigned long ChangeOnlyATime = 0; + unsigned long ChangeOnlyMTime = 0; + unsigned long DontCreate = 0; + unsigned long CreateDir = 0; + const char* CreateEA_CSTR = 0; + const char* CreateEAValue_CSTR = 0; + const char* TouchEA_CSTR = 0; + const char* TouchEAValue_CSTR = 0; + unsigned long Dummy = 0; + unsigned long Verbose = 0; + const char* ExplicitSELinuxContext_CSTR = 0; + const char* ExplicitSELinuxType_CSTR = 0; + const char* ReferenceSELinuxContext_CSTR = 0; + + struct poptOption optionsTable[] = + { + { 0, 'a', POPT_ARG_NONE, &ChangeOnlyATime, 0, + "change only access time", "" }, + + { "no-create", 'c', POPT_ARG_NONE, &DontCreate, 0, + "do not create any files", "" }, + + { "create-dir", 0, POPT_ARG_NONE, &CreateDir, 0, + "targets should be directories, not files", "" }, + + { "create-ea", 0, POPT_ARG_STRING, &CreateEA_CSTR, 0, + "create the specified EA at the touched location", "" }, + + { "create-ea-value", 0, POPT_ARG_STRING, &CreateEAValue_CSTR, 0, + "optional value to write to the newly created EA at creation time.", "" }, + + { "touch-ea", 0, POPT_ARG_STRING, &TouchEA_CSTR, 0, + "touch the given EA writing touch-ea-value to it.", "" }, + + { "touch-ea-value", 0, POPT_ARG_STRING, &TouchEAValue_CSTR, 0, + "value to write to the touched-ea.", "" }, + + { "chmod", 0, POPT_ARG_STRING, &NewContextMode_CSTR, 0, + "mode to create new objects with", "" }, + + { "date", 'd', POPT_ARG_STRING, &Date_CSTR, 0, + "pass given time string and use instead of current time", "" }, + + { "output-time-format", 0, POPT_ARG_STRING, &OutputTimeFormat_CSTR, 0, + "when displaying time values, use the strftime(3) format provided", "" }, + + { 0, 'f', POPT_ARG_NONE, &Dummy, 0, + "ignored", "" }, + + { 0, 'm', POPT_ARG_NONE, &ChangeOnlyMTime, 0, + "change only modification time", "" }, + + { "reference", 'r', POPT_ARG_STRING, &ReferenceDate_CSTR, 0, + "use mtime and atime from context referenced at given URL instead of current time", "" }, + +// { 0, 't', POPT_ARG_STRING, &StampDate_CSTR, 0, +// "use [[CC]YY]MMDDhhmm[.ss] instead of current time", "" }, + + { "time", 0, POPT_ARG_STRING, &UpdateNamedStamps_CSTR, 0, + "set time given by WORD: access atime use (same as -a) modify mtime (same as -m)", "" }, + + { "set", 0, POPT_ARG_STRING, &ExplicitSELinuxType_CSTR, 0, + "set security context of copy to CONTEXT", "" }, + + { "selinux-type", 0, POPT_ARG_STRING, &ExplicitSELinuxType_CSTR, 0, + "set security context of copy to CONTEXT", "" }, + + { "context", 'Z', POPT_ARG_STRING, &ExplicitSELinuxContext_CSTR, 0, + "set the SELinux context to CONTEXT", "" }, + + { "reference-context", 'X', POPT_ARG_STRING, &ReferenceSELinuxContext_CSTR, 0, + "set the SELinux context to the same as the given reference file", "" }, + + + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + //////////////////////////////////////////////////////////////////////// + // + // parse some popt options into params that can be used later + // + //////////////////////////////////////////////////////////////////////// + bool CreateContexts = !DontCreate; + mode_t Mode = 0; + bool touchMTime = true; + bool touchATime = true; + time_t newATime = getTime(); + time_t newMTime = newATime; + string timeFormat = "%y %b %e %H:%M:%S"; + string ExplicitSELinuxContext = + ExplicitSELinuxContext_CSTR ? ExplicitSELinuxContext_CSTR : ""; + + if( OutputTimeFormat_CSTR ) + { + timeFormat = OutputTimeFormat_CSTR; + } + + if( Date_CSTR ) + { + struct tm tm = ParseTimeString( Date_CSTR ); + newATime = newMTime = mktime( &tm ); + } + if( ReferenceDate_CSTR ) + { + fh_context c = Resolve( ReferenceDate_CSTR ); + newATime = toType( getStrAttr( c, "atime", "0" )); + newMTime = toType( getStrAttr( c, "mtime", "0" )); + } + if( ReferenceSELinuxContext_CSTR ) + { + fh_context c = Resolve( ReferenceSELinuxContext_CSTR ); + ExplicitSELinuxContext = getStrAttr( c, + "dontfollow-selinux-context", + "", + true, true ); + } + if( UpdateNamedStamps_CSTR ) + { + string namedStamps = UpdateNamedStamps_CSTR; + + if( contains( namedStamps, "access" ) + || contains( namedStamps, "atime" ) + || contains( namedStamps, "use" ) ) + { + touchATime = true; + } + if( contains( namedStamps, "modify" ) + || contains( namedStamps, "mtime" ) ) + { + touchMTime = true; + } + } + + if( ChangeOnlyATime ) touchMTime = false; + if( ChangeOnlyMTime ) touchATime = false; + + if( NewContextMode_CSTR ) + { + Mode = Factory::MakeInitializationMode( NewContextMode_CSTR ); + } + + + //////////////////////////////////////////////////////////////////////// + // + // apply changes to each URL + // + //////////////////////////////////////////////////////////////////////// + stringlist_t srcs; + srcs = expandShellGlobs( srcs, optCon ); + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + for( ; srcsiter != srcsend ; ++srcsiter ) + { + try + { + string srcURL = *srcsiter; + + if( Verbose ) + { + cerr << "touching " << srcURL << endl; + if( CreateContexts ) + { + cerr << " will create if needed, as a "; + if( CreateDir ) cerr << "directory"; + else cerr << "file"; + if( Mode ) cerr << " with mode " << Mode; + else cerr << " with default mode"; + cerr << endl; + } + if( touchMTime ) + cerr << " setting mtime to:" << toTimeString(newMTime,timeFormat) << endl; + if( touchATime ) + cerr << " setting atime to:" << toTimeString(newATime,timeFormat) << endl; + } + + if( isRelativePath( srcURL ) ) + { + srcURL = Shell::getCWDDirPath() + "/" + srcURL; + if( Verbose ) + cerr << "you have given a relative path, new fully qualified path:" << srcURL << endl; + } + + + + fh_context c = Shell::touch( srcURL, + ExplicitSELinuxContext, + CreateContexts, + CreateDir, + Mode, + touchMTime, + touchATime, + newMTime, + newATime ); + if( ExplicitSELinuxType_CSTR ) + { + setStrAttr( c, + "dontfollow-selinux-type", + ExplicitSELinuxType_CSTR, + true, true ); + } + + if( CreateEA_CSTR ) + { + string k = CreateEA_CSTR; + string v = ""; + if( CreateEAValue_CSTR ) + v = CreateEAValue_CSTR; + + Shell::createEA( c, k, v ); + } + + if( TouchEA_CSTR ) + { + string k = TouchEA_CSTR; + string v = ""; + if( TouchEAValue_CSTR ) + v = TouchEAValue_CSTR; + + setStrAttr( c, k, v, true, true ); + } + + if( Verbose ) + { + cerr << "touched: " << srcURL << endl; + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/DirectIndexConfigAccess.hh b/apps/fulltextindex/DirectIndexConfigAccess.hh new file mode 100644 index 0000000..d626864 --- /dev/null +++ b/apps/fulltextindex/DirectIndexConfigAccess.hh @@ -0,0 +1,55 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindex-federation-add-index command line client + Copyright (C) 2006 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: DirectIndexConfigAccess.hh,v 1.2 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include +using namespace STLdb4; +using namespace std; + +namespace Ferris +{ + fh_database getDB( EAIndex::fh_idx eidx ) + { + string dbfilename = CleanupURL( eidx->getPath() + "/" + EAIndex::DB_EAINDEX ); + fh_database db = new Database( dbfilename ); + return db; + } + + string getConfig( fh_database db, const std::string& k, const std::string& def ) + { + string ret = get_db4_string( db, k, def, true ); + return ret; + } + + void setConfig( fh_database db, const std::string& k, const std::string& v ) + { + set_db4_string( db, k, v ); + db->sync(); + } +}; diff --git a/apps/fulltextindex/Makefile.am b/apps/fulltextindex/Makefile.am new file mode 100644 index 0000000..5513d8b --- /dev/null +++ b/apps/fulltextindex/Makefile.am @@ -0,0 +1,90 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_SCRIPTS = ferris-index-remove ferris-eaindex-postgresql-add-column ferris-eaindex-postgresql-add-fulltext-index-on-column ferris-eaindex-update-existing-attributes +SHELL_FILES = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.xsl $(SHELL_FILES) $(bin_SCRIPTS) + + +bin_PROGRAMS = findexadd feaindexadd \ + findexquery feaindexquery \ + findexcompact feaindexcompact \ + findexremove feaindexremove \ + ferris-search \ + feaindex-attach-fulltext-index \ + ferris-find \ + findex-remove-old-instances feaindex-remove-old-instances \ + feaindex-federation-add-url-substitution-regex-for-index \ + feaindex-federation-add-index + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +findexadd_SOURCES = findexadd.cpp +findexadd_LDADD = -lpopt @LIBFERRIS_LA@ +findexadd_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindexadd_SOURCES = feaindexadd.cpp +feaindexadd_LDADD = -lpopt @LIBFERRIS_LA@ +feaindexadd_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +findexquery_SOURCES = findexquery.cpp +findexquery_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexquery_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindexquery_SOURCES = feaindexquery.cpp +feaindexquery_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexquery_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +findexcompact_SOURCES = findexcompact.cpp +findexcompact_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexcompact_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindexcompact_SOURCES = feaindexcompact.cpp +feaindexcompact_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexcompact_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +findexremove_SOURCES = findexremove.cpp +findexremove_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexremove_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindexremove_SOURCES = feaindexremove.cpp +feaindexremove_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexremove_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +ferris_search_SOURCES = ferris-search.cpp +ferris_search_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_search_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindex_attach_fulltext_index_SOURCES = feaindex-attach-fulltext-index.cpp +feaindex_attach_fulltext_index_LDADD = -lpopt @LIBFERRIS_LA@ +feaindex_attach_fulltext_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +ferris_find_SOURCES = ferris-find.cpp +ferris_find_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +ferris_find_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +findex_remove_old_instances_SOURCES = findex-remove-old-instances.cpp +findex_remove_old_instances_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +findex_remove_old_instances_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindex_remove_old_instances_SOURCES = feaindex-remove-old-instances.cpp +feaindex_remove_old_instances_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_remove_old_instances_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindex_federation_add_index_SOURCES = feaindex-federation-add-index.cpp DirectIndexConfigAccess.hh +feaindex_federation_add_index_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_federation_add_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + +feaindex_federation_add_url_substitution_regex_for_index_SOURCES = feaindex-federation-add-url-substitution-regex-for-index.cpp DirectIndexConfigAccess.hh +feaindex_federation_add_url_substitution_regex_for_index_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_federation_add_url_substitution_regex_for_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/fulltextindex/Makefile.in b/apps/fulltextindex/Makefile.in new file mode 100644 index 0000000..0f30b3d --- /dev/null +++ b/apps/fulltextindex/Makefile.in @@ -0,0 +1,1284 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = findexadd$(EXEEXT) feaindexadd$(EXEEXT) \ + findexquery$(EXEEXT) feaindexquery$(EXEEXT) \ + findexcompact$(EXEEXT) feaindexcompact$(EXEEXT) \ + findexremove$(EXEEXT) feaindexremove$(EXEEXT) \ + ferris-search$(EXEEXT) feaindex-attach-fulltext-index$(EXEEXT) \ + ferris-find$(EXEEXT) findex-remove-old-instances$(EXEEXT) \ + feaindex-remove-old-instances$(EXEEXT) \ + feaindex-federation-add-url-substitution-regex-for-index$(EXEEXT) \ + feaindex-federation-add-index$(EXEEXT) +subdir = apps/fulltextindex +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_feaindex_attach_fulltext_index_OBJECTS = \ + feaindex-attach-fulltext-index.$(OBJEXT) +feaindex_attach_fulltext_index_OBJECTS = \ + $(am_feaindex_attach_fulltext_index_OBJECTS) +feaindex_attach_fulltext_index_DEPENDENCIES = +feaindex_attach_fulltext_index_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(feaindex_attach_fulltext_index_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindex_federation_add_index_OBJECTS = \ + feaindex-federation-add-index.$(OBJEXT) +feaindex_federation_add_index_OBJECTS = \ + $(am_feaindex_federation_add_index_OBJECTS) +feaindex_federation_add_index_DEPENDENCIES = +feaindex_federation_add_index_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(feaindex_federation_add_index_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindex_federation_add_url_substitution_regex_for_index_OBJECTS = feaindex-federation-add-url-substitution-regex-for-index.$(OBJEXT) +feaindex_federation_add_url_substitution_regex_for_index_OBJECTS = $(am_feaindex_federation_add_url_substitution_regex_for_index_OBJECTS) +feaindex_federation_add_url_substitution_regex_for_index_DEPENDENCIES = +feaindex_federation_add_url_substitution_regex_for_index_LINK = \ + $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(feaindex_federation_add_url_substitution_regex_for_index_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_feaindex_remove_old_instances_OBJECTS = \ + feaindex-remove-old-instances.$(OBJEXT) +feaindex_remove_old_instances_OBJECTS = \ + $(am_feaindex_remove_old_instances_OBJECTS) +feaindex_remove_old_instances_DEPENDENCIES = +feaindex_remove_old_instances_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(feaindex_remove_old_instances_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindexadd_OBJECTS = feaindexadd.$(OBJEXT) +feaindexadd_OBJECTS = $(am_feaindexadd_OBJECTS) +feaindexadd_DEPENDENCIES = +feaindexadd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(feaindexadd_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindexcompact_OBJECTS = feaindexcompact.$(OBJEXT) +feaindexcompact_OBJECTS = $(am_feaindexcompact_OBJECTS) +feaindexcompact_DEPENDENCIES = +feaindexcompact_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(feaindexcompact_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindexquery_OBJECTS = feaindexquery.$(OBJEXT) +feaindexquery_OBJECTS = $(am_feaindexquery_OBJECTS) +feaindexquery_DEPENDENCIES = +feaindexquery_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(feaindexquery_LDFLAGS) $(LDFLAGS) -o $@ +am_feaindexremove_OBJECTS = feaindexremove.$(OBJEXT) +feaindexremove_OBJECTS = $(am_feaindexremove_OBJECTS) +feaindexremove_DEPENDENCIES = +feaindexremove_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(feaindexremove_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_find_OBJECTS = ferris-find.$(OBJEXT) +ferris_find_OBJECTS = $(am_ferris_find_OBJECTS) +ferris_find_DEPENDENCIES = +ferris_find_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_find_LDFLAGS) $(LDFLAGS) -o $@ +am_ferris_search_OBJECTS = ferris-search.$(OBJEXT) +ferris_search_OBJECTS = $(am_ferris_search_OBJECTS) +ferris_search_DEPENDENCIES = +ferris_search_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferris_search_LDFLAGS) $(LDFLAGS) -o $@ +am_findex_remove_old_instances_OBJECTS = \ + findex-remove-old-instances.$(OBJEXT) +findex_remove_old_instances_OBJECTS = \ + $(am_findex_remove_old_instances_OBJECTS) +findex_remove_old_instances_DEPENDENCIES = +findex_remove_old_instances_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(findex_remove_old_instances_LDFLAGS) $(LDFLAGS) -o $@ +am_findexadd_OBJECTS = findexadd.$(OBJEXT) +findexadd_OBJECTS = $(am_findexadd_OBJECTS) +findexadd_DEPENDENCIES = +findexadd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(findexadd_LDFLAGS) $(LDFLAGS) -o $@ +am_findexcompact_OBJECTS = findexcompact.$(OBJEXT) +findexcompact_OBJECTS = $(am_findexcompact_OBJECTS) +findexcompact_DEPENDENCIES = +findexcompact_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(findexcompact_LDFLAGS) $(LDFLAGS) -o $@ +am_findexquery_OBJECTS = findexquery.$(OBJEXT) +findexquery_OBJECTS = $(am_findexquery_OBJECTS) +findexquery_DEPENDENCIES = +findexquery_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(findexquery_LDFLAGS) $(LDFLAGS) -o $@ +am_findexremove_OBJECTS = findexremove.$(OBJEXT) +findexremove_OBJECTS = $(am_findexremove_OBJECTS) +findexremove_DEPENDENCIES = +findexremove_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(findexremove_LDFLAGS) $(LDFLAGS) -o $@ +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(feaindex_attach_fulltext_index_SOURCES) \ + $(feaindex_federation_add_index_SOURCES) \ + $(feaindex_federation_add_url_substitution_regex_for_index_SOURCES) \ + $(feaindex_remove_old_instances_SOURCES) \ + $(feaindexadd_SOURCES) $(feaindexcompact_SOURCES) \ + $(feaindexquery_SOURCES) $(feaindexremove_SOURCES) \ + $(ferris_find_SOURCES) $(ferris_search_SOURCES) \ + $(findex_remove_old_instances_SOURCES) $(findexadd_SOURCES) \ + $(findexcompact_SOURCES) $(findexquery_SOURCES) \ + $(findexremove_SOURCES) +DIST_SOURCES = $(feaindex_attach_fulltext_index_SOURCES) \ + $(feaindex_federation_add_index_SOURCES) \ + $(feaindex_federation_add_url_substitution_regex_for_index_SOURCES) \ + $(feaindex_remove_old_instances_SOURCES) \ + $(feaindexadd_SOURCES) $(feaindexcompact_SOURCES) \ + $(feaindexquery_SOURCES) $(feaindexremove_SOURCES) \ + $(ferris_find_SOURCES) $(ferris_search_SOURCES) \ + $(findex_remove_old_instances_SOURCES) $(findexadd_SOURCES) \ + $(findexcompact_SOURCES) $(findexquery_SOURCES) \ + $(findexremove_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +bin_SCRIPTS = ferris-index-remove ferris-eaindex-postgresql-add-column ferris-eaindex-postgresql-add-fulltext-index-on-column ferris-eaindex-update-existing-attributes +SHELL_FILES = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.xsl $(SHELL_FILES) $(bin_SCRIPTS) +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +findexadd_SOURCES = findexadd.cpp +findexadd_LDADD = -lpopt @LIBFERRIS_LA@ +findexadd_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindexadd_SOURCES = feaindexadd.cpp +feaindexadd_LDADD = -lpopt @LIBFERRIS_LA@ +feaindexadd_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +findexquery_SOURCES = findexquery.cpp +findexquery_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexquery_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindexquery_SOURCES = feaindexquery.cpp +feaindexquery_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexquery_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +findexcompact_SOURCES = findexcompact.cpp +findexcompact_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexcompact_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindexcompact_SOURCES = feaindexcompact.cpp +feaindexcompact_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexcompact_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +findexremove_SOURCES = findexremove.cpp +findexremove_LDADD = -lpopt @LIBFERRIS_LA@ @FTXIDXCUSTOMFERRIS_LA@ @LIBFERRISMG_LA@ +findexremove_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindexremove_SOURCES = feaindexremove.cpp +feaindexremove_LDADD = -lpopt @LIBFERRIS_LA@ @EAIDXCUSTOMFERRIS_LA@ @EAIDXCUSTOMFERRISDB4TREE_LA@ @LIBFERRISMG_LA@ +feaindexremove_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +ferris_search_SOURCES = ferris-search.cpp +ferris_search_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_search_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindex_attach_fulltext_index_SOURCES = feaindex-attach-fulltext-index.cpp +feaindex_attach_fulltext_index_LDADD = -lpopt @LIBFERRIS_LA@ +feaindex_attach_fulltext_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +ferris_find_SOURCES = ferris-find.cpp +ferris_find_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +ferris_find_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +findex_remove_old_instances_SOURCES = findex-remove-old-instances.cpp +findex_remove_old_instances_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +findex_remove_old_instances_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindex_remove_old_instances_SOURCES = feaindex-remove-old-instances.cpp +feaindex_remove_old_instances_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_remove_old_instances_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindex_federation_add_index_SOURCES = feaindex-federation-add-index.cpp DirectIndexConfigAccess.hh +feaindex_federation_add_index_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_federation_add_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +feaindex_federation_add_url_substitution_regex_for_index_SOURCES = feaindex-federation-add-url-substitution-regex-for-index.cpp DirectIndexConfigAccess.hh +feaindex_federation_add_url_substitution_regex_for_index_LDADD = -lpopt @LIBFERRIS_LA@ @BOOST_LIBS@ -lboost_regex +feaindex_federation_add_url_substitution_regex_for_index_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/fulltextindex/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/fulltextindex/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +feaindex-attach-fulltext-index$(EXEEXT): $(feaindex_attach_fulltext_index_OBJECTS) $(feaindex_attach_fulltext_index_DEPENDENCIES) + @rm -f feaindex-attach-fulltext-index$(EXEEXT) + $(feaindex_attach_fulltext_index_LINK) $(feaindex_attach_fulltext_index_OBJECTS) $(feaindex_attach_fulltext_index_LDADD) $(LIBS) +feaindex-federation-add-index$(EXEEXT): $(feaindex_federation_add_index_OBJECTS) $(feaindex_federation_add_index_DEPENDENCIES) + @rm -f feaindex-federation-add-index$(EXEEXT) + $(feaindex_federation_add_index_LINK) $(feaindex_federation_add_index_OBJECTS) $(feaindex_federation_add_index_LDADD) $(LIBS) +feaindex-federation-add-url-substitution-regex-for-index$(EXEEXT): $(feaindex_federation_add_url_substitution_regex_for_index_OBJECTS) $(feaindex_federation_add_url_substitution_regex_for_index_DEPENDENCIES) + @rm -f feaindex-federation-add-url-substitution-regex-for-index$(EXEEXT) + $(feaindex_federation_add_url_substitution_regex_for_index_LINK) $(feaindex_federation_add_url_substitution_regex_for_index_OBJECTS) $(feaindex_federation_add_url_substitution_regex_for_index_LDADD) $(LIBS) +feaindex-remove-old-instances$(EXEEXT): $(feaindex_remove_old_instances_OBJECTS) $(feaindex_remove_old_instances_DEPENDENCIES) + @rm -f feaindex-remove-old-instances$(EXEEXT) + $(feaindex_remove_old_instances_LINK) $(feaindex_remove_old_instances_OBJECTS) $(feaindex_remove_old_instances_LDADD) $(LIBS) +feaindexadd$(EXEEXT): $(feaindexadd_OBJECTS) $(feaindexadd_DEPENDENCIES) + @rm -f feaindexadd$(EXEEXT) + $(feaindexadd_LINK) $(feaindexadd_OBJECTS) $(feaindexadd_LDADD) $(LIBS) +feaindexcompact$(EXEEXT): $(feaindexcompact_OBJECTS) $(feaindexcompact_DEPENDENCIES) + @rm -f feaindexcompact$(EXEEXT) + $(feaindexcompact_LINK) $(feaindexcompact_OBJECTS) $(feaindexcompact_LDADD) $(LIBS) +feaindexquery$(EXEEXT): $(feaindexquery_OBJECTS) $(feaindexquery_DEPENDENCIES) + @rm -f feaindexquery$(EXEEXT) + $(feaindexquery_LINK) $(feaindexquery_OBJECTS) $(feaindexquery_LDADD) $(LIBS) +feaindexremove$(EXEEXT): $(feaindexremove_OBJECTS) $(feaindexremove_DEPENDENCIES) + @rm -f feaindexremove$(EXEEXT) + $(feaindexremove_LINK) $(feaindexremove_OBJECTS) $(feaindexremove_LDADD) $(LIBS) +ferris-find$(EXEEXT): $(ferris_find_OBJECTS) $(ferris_find_DEPENDENCIES) + @rm -f ferris-find$(EXEEXT) + $(ferris_find_LINK) $(ferris_find_OBJECTS) $(ferris_find_LDADD) $(LIBS) +ferris-search$(EXEEXT): $(ferris_search_OBJECTS) $(ferris_search_DEPENDENCIES) + @rm -f ferris-search$(EXEEXT) + $(ferris_search_LINK) $(ferris_search_OBJECTS) $(ferris_search_LDADD) $(LIBS) +findex-remove-old-instances$(EXEEXT): $(findex_remove_old_instances_OBJECTS) $(findex_remove_old_instances_DEPENDENCIES) + @rm -f findex-remove-old-instances$(EXEEXT) + $(findex_remove_old_instances_LINK) $(findex_remove_old_instances_OBJECTS) $(findex_remove_old_instances_LDADD) $(LIBS) +findexadd$(EXEEXT): $(findexadd_OBJECTS) $(findexadd_DEPENDENCIES) + @rm -f findexadd$(EXEEXT) + $(findexadd_LINK) $(findexadd_OBJECTS) $(findexadd_LDADD) $(LIBS) +findexcompact$(EXEEXT): $(findexcompact_OBJECTS) $(findexcompact_DEPENDENCIES) + @rm -f findexcompact$(EXEEXT) + $(findexcompact_LINK) $(findexcompact_OBJECTS) $(findexcompact_LDADD) $(LIBS) +findexquery$(EXEEXT): $(findexquery_OBJECTS) $(findexquery_DEPENDENCIES) + @rm -f findexquery$(EXEEXT) + $(findexquery_LINK) $(findexquery_OBJECTS) $(findexquery_LDADD) $(LIBS) +findexremove$(EXEEXT): $(findexremove_OBJECTS) $(findexremove_DEPENDENCIES) + @rm -f findexremove$(EXEEXT) + $(findexremove_LINK) $(findexremove_OBJECTS) $(findexremove_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindex-attach-fulltext-index.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindex-federation-add-index.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindex-federation-add-url-substitution-regex-for-index.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindex-remove-old-instances.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindexadd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindexcompact.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindexquery.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feaindexremove.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-find.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-search.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findex-remove-old-instances.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findexadd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findexcompact.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findexquery.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findexremove.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-binSCRIPTS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/fulltextindex/eainverted_file_to_html_table.xsl b/apps/fulltextindex/eainverted_file_to_html_table.xsl new file mode 100644 index 0000000..b57e222 --- /dev/null +++ b/apps/fulltextindex/eainverted_file_to_html_table.xsl @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Ferris attribute index + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index
inverted list refcount (given) + +
inverted list refcount (calculated) + +
is revoked + +
aidattr namevidvalue + match +
+ + + + + + + + + + + + + + + + + + + invertedfile! + + + + + + + + + + + + + + + w_d_t: + + + + + + + + + + + + + + + + + + + + + + , + + + + x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + light + dark + + + + + + + , + + + + + + + + + + + + + + + + + + null + + + can't read + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/fulltextindex/feaindex-attach-fulltext-index.cpp b/apps/fulltextindex/feaindex-attach-fulltext-index.cpp new file mode 100644 index 0000000..8a2b662 --- /dev/null +++ b/apps/fulltextindex/feaindex-attach-fulltext-index.cpp @@ -0,0 +1,139 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindex-attach-fulltext-index command line client + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindex-attach-fulltext-index.cpp,v 1.4 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; +//using namespace Ferris::FullTextIndex; +//using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindex-attach-fulltext-index"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { +// const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + const char* EAIndexPath_CSTR = 0; + const char* FulltextIndexPath_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "ea-index-path", 'P', POPT_ARG_STRING, &EAIndexPath_CSTR, 0, + "Path to the EA index", "" }, + + { "fulltext-index-path", 'F', POPT_ARG_STRING, &FulltextIndexPath_CSTR, 0, + "Path to the fulltext index to attach to the EA index", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 3 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( !EAIndexPath_CSTR || !FulltextIndexPath_CSTR ) + { + cerr << "You must supply atleast -P and -F" << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + FullTextIndex::fh_idx fidx = + FullTextIndex::Factory::getFullTextIndex( FulltextIndexPath_CSTR ); + EAIndex::fh_idx eidx = + EAIndex::Factory::getEAIndex( EAIndexPath_CSTR ); + + eidx->setFulltextIndex( fidx ); +// eidx->setFulltextIndex( FulltextIndexPath_CSTR ); + + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindex-federation-add-index.cpp b/apps/fulltextindex/feaindex-federation-add-index.cpp new file mode 100644 index 0000000..2888458 --- /dev/null +++ b/apps/fulltextindex/feaindex-federation-add-index.cpp @@ -0,0 +1,145 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindex-federation-add-index command line client + Copyright (C) 2006 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindex-federation-add-index.cpp,v 1.3 2010/09/24 21:31:15 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include + +#include "DirectIndexConfigAccess.hh" +#include +#include + +using namespace std; +using namespace Ferris; + +//using namespace Ferris::FullTextIndex; +//using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindex-federation-add-index"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static const char* CFG_IDX_FEDERATION_URLS_K = "cfg-idx-federation-urls-k"; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { +// const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + const char* EAIndexPath_CSTR = 0; + const char* Subindex_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "ea-index-path", 'P', POPT_ARG_STRING, &EAIndexPath_CSTR, 0, + "Path to the EA index", "" }, + + { "sub-index-path", 'S', POPT_ARG_STRING, &Subindex_CSTR, 0, + "Path to the EA index to add to this federation", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 3 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( !EAIndexPath_CSTR || !Subindex_CSTR ) + { + cerr << "You must supply atleast -P and -S" << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + EAIndex::fh_idx subidx = + EAIndex::Factory::getEAIndex( Subindex_CSTR ); + EAIndex::fh_idx fedidx = + EAIndex::Factory::getEAIndex( EAIndexPath_CSTR ); + fh_database db = getDB( fedidx ); + + stringlist_t sl = Util::parseSeperatedList( getConfig( db, CFG_IDX_FEDERATION_URLS_K, "" ) ); + sl.push_back( Subindex_CSTR ); + setConfig( db, CFG_IDX_FEDERATION_URLS_K, Util::createSeperatedList( sl ) ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindex-federation-add-url-substitution-regex-for-index.cpp b/apps/fulltextindex/feaindex-federation-add-url-substitution-regex-for-index.cpp new file mode 100644 index 0000000..b073bc2 --- /dev/null +++ b/apps/fulltextindex/feaindex-federation-add-url-substitution-regex-for-index.cpp @@ -0,0 +1,175 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindex-federation-add-url-substitution-regex-for-index command line client + Copyright (C) 2006 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindex-federation-add-url-substitution-regex-for-index.cpp,v 1.3 2010/09/24 21:31:16 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include + +#include "DirectIndexConfigAccess.hh" +#include +#include + +using namespace std; +using namespace Ferris; + +//using namespace Ferris::FullTextIndex; +//using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindex-federation-add-url-substitution-regex-for-index"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +static const char* CFG_IDX_FEDERATION_SUBST_REGEX_FOR_INDEX_PRE_K = "cfg-idx-federation-subst-regex-k-for-"; +static const char* CFG_IDX_FEDERATION_SUBST_FORMAT_FOR_INDEX_PRE_K = "cfg-idx-federation-subst-format-k-for-"; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { +// const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + const char* EAIndexPath_CSTR = 0; + const char* Subindex_CSTR = 0; + const char* Regex_CSTR = 0; + const char* Format_CSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "ea-index-path", 'P', POPT_ARG_STRING, &EAIndexPath_CSTR, 0, + "Path to the EA index", "" }, + + { "sub-index-path", 'S', POPT_ARG_STRING, &Subindex_CSTR, 0, + "Path to the EA index to add to this federation", "" }, + + { "regex", 'R', POPT_ARG_STRING, &Regex_CSTR, 0, + "Regex for substitution for -S eaindex", "" }, + + { "format", 'F', POPT_ARG_STRING, &Format_CSTR, 0, + "Format of substitution for -S eaindex", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + if( !Subindex_CSTR ) + { + cerr << "You must supply atleast -S" << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + string format = "\\1"; + if( Format_CSTR ) + format = Format_CSTR; + + if( !Regex_CSTR ) + { + cerr << "You must supply a regex with -R" << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + EAIndex::fh_idx subidx = + EAIndex::Factory::getEAIndex( Subindex_CSTR ); + EAIndex::fh_idx fedidx = 0; + if( EAIndexPath_CSTR ) + fedidx = EAIndex::Factory::getEAIndex( EAIndexPath_CSTR ); + else + fedidx = EAIndex::Factory::getDefaultEAIndex(); + + fh_database db = getDB( fedidx ); + + { + stringstream kss; + kss << CFG_IDX_FEDERATION_SUBST_REGEX_FOR_INDEX_PRE_K << subidx->getPath(); + setConfig( db, tostr(kss), Regex_CSTR ); + } + { + stringstream kss; + kss << CFG_IDX_FEDERATION_SUBST_FORMAT_FOR_INDEX_PRE_K << subidx->getPath(); + setConfig( db, tostr(kss), format ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindex-ldap-tivoli-objectclass-resync.sh b/apps/fulltextindex/feaindex-ldap-tivoli-objectclass-resync.sh new file mode 100755 index 0000000..e848830 --- /dev/null +++ b/apps/fulltextindex/feaindex-ldap-tivoli-objectclass-resync.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "This script resyncs the EA index attribute list for the ferris-context" +echo "objectClass in the schema from the raw schema of the Tivoli server" + +IDX=${1:?"Supply the Tivoli LDAP index path as arg1."}; + +ATTRLIST=$(sudo su -c 'cat /etc/ldapschema/V3.modifiedschema' \ + | grep ferris-context - \ + | cut -d '(' -f 4 \ + | sed 's/ \$ /,/g' \ + | sed 's/)//g' \ + | sed 's/ //g'); + +PATH="/ferris/tests/regression:$PATH" + +#echo "ATTRLIST=$ATTRLIST" + +writecontext "$IDX/ea-index-config.db/ldapidx-ferriscontext-attrlist" "$ATTRLIST" diff --git a/apps/fulltextindex/feaindex-remove-old-instances.cpp b/apps/fulltextindex/feaindex-remove-old-instances.cpp new file mode 100644 index 0000000..b5790b0 --- /dev/null +++ b/apps/fulltextindex/feaindex-remove-old-instances.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindex-remove-old-instances command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindex-remove-old-instances.cpp,v 1.3 2010/09/24 21:31:16 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindex-remove-old-instances"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + const char* DateSTR_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "older-than", 'd', POPT_ARG_STRING, &DateSTR_CSTR, 0, + "when a document has two or more instances in the index, remove any older than the given time", "now" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + EAIndex::fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( IndexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } + + time_t tt = Time::getTime(); + + if( DateSTR_CSTR ) + { + std::string datestr = DateSTR_CSTR; + struct tm tm = Time::ParseTimeString( datestr ); + tt = mktime( &tm ); + } + idx->purgeDocumentInstancesOlderThan( tt ); + + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindexadd.cpp b/apps/fulltextindex/feaindexadd.cpp new file mode 100644 index 0000000..a0c87de --- /dev/null +++ b/apps/fulltextindex/feaindexadd.cpp @@ -0,0 +1,227 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + eaindex add command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindexadd.cpp,v 1.9 2010/09/24 21:31:16 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "feaindexadd"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +Time::Benchmark m_totalRuntime( "Total indexing time", false ); + +class Ferrisls_feaindexadd_display; +FERRIS_SMARTPTR( Ferrisls_feaindexadd_display, fh_eaindexadd_display ); +class Ferrisls_feaindexadd_display + : + public EAIndex::Ferrisls_feaindexadd_display_base +{ + typedef EAIndex::Ferrisls_feaindexadd_display_base _Base; + +public: + Ferrisls_feaindexadd_display( EAIndex::fh_idx idx = 0 ) + : + _Base( idx ) + { + } + void ShowAttributes( fh_context ctx ); + void EnteringContext(fh_context ctx); + void LeavingContext(fh_context ctx); + int main( int argc, char** argv ); +}; + + +void +Ferrisls_feaindexadd_display::ShowAttributes( fh_context ctx ) +{ + if( m_verbose ) + cerr << "Indexing context:" << ctx->getURL() << endl; + + if( shouldEAtryToAddToEAIndex() ) + { + try + { + m_indexer->addContextToIndex( ctx ); + } + catch( exception& e ) + { + cerr << "feaindexadd error:" << e.what() << endl; + } + } + + if( shouldEAtryToAddToFulltextIndex() ) + { + try + { + fh_docindexer indexer = getDocumentIndexer(); + indexer->addContextToIndex( ctx ); + } + catch( exception& e ) + { + cerr << "feaindexadd error:" << e.what() << endl; + } + } + + if( m_showTotals ) + { + cerr << "ShowAttributes() ADDING CONTEXT ctx:" << ctx->getURL() << endl; + ++m_contextCount; + } + +} + +void +Ferrisls_feaindexadd_display::EnteringContext(fh_context ctx) +{ + if( m_verbose ) + cerr << "Entering context:" << ctx->getURL() << endl; + + m_indexer->EnteringContext( ctx ); +} + +void +Ferrisls_feaindexadd_display::LeavingContext(fh_context ctx) +{ + if( m_verbose ) + cerr << "Leaving context:" << ctx->getURL() << endl; + + m_indexer->LeavingContext( ctx ); +} + +int +Ferrisls_feaindexadd_display::main( int argc, char** argv ) +{ + try + { + struct poptOption optionsTable[] = + { + FERRIS_EAINDEXADD_OPTIONS( this ) + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + m_totalRuntime.start(); + getPoptCollector()->ArgProcessingDone( optCon ); + + /******************************/ + /******************************/ + /******************************/ + + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + try + { + LG_EAIDX_D << "adding src:" << srcURL << endl; + perform( srcURL ); + } + catch( exception& e ) + { + cerr << "----------------------" << endl; + cerr << "for: " << srcURL << endl; + cerr << "cought error:" << e.what() << endl; + exit_status = 1; + } + } +// d->sync(); + printTotals(); + + m_TotalFilesDoneCount += getFilesIndexedCount(); + + m_totalRuntime.stop(); + cerr << "Total contexts indexed:" << m_TotalFilesDoneCount << endl; + m_totalRuntime.print(); + + if( m_TotalFilesDoneCount ) + { + double avgTimePerContext = m_totalRuntime.getElapsedTime() / m_TotalFilesDoneCount; + cerr << "Average time per context:" << setprecision(3) << avgTimePerContext << endl; + } + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + fh_eaindexadd_display d = new Ferrisls_feaindexadd_display(); + d->main( argc, argv ); + return d->getExitStatus(); +} diff --git a/apps/fulltextindex/feaindexcompact.cpp b/apps/fulltextindex/feaindexcompact.cpp new file mode 100644 index 0000000..fd60c77 --- /dev/null +++ b/apps/fulltextindex/feaindexcompact.cpp @@ -0,0 +1,127 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindexcompact.cpp,v 1.5 2010/09/24 21:31:16 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +#include "eaindexers_custom_plugin/libeaidxcustomferris.hh" + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindexcompact"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + EAIndex::fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( IndexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } +// fh_db4idx db4idx = dynamic_cast(GetImpl( idx )); +// if( db4idx ) + { + idx->compact( Ferris::Factory::fcout(), Verbose ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindexquery.cpp b/apps/fulltextindex/feaindexquery.cpp new file mode 100644 index 0000000..a057feb --- /dev/null +++ b/apps/fulltextindex/feaindexquery.cpp @@ -0,0 +1,511 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindexquery.cpp,v 1.12 2011/05/08 21:30:52 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include "Ferris/FerrisBoost.hh" +#include "Ferris/Medallion.hh" + +#include "eaindexers_custom_plugin/libeaidxcustomferris.hh" +#include "eaindexers_custom_plugin/libeaidxcustomferrisdb4tree.hh" + + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindexquery"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +namespace Ferris +{ + namespace FullTextIndex + { + class Lexitest + { + public: + static int TestForwardReverseIntegrity( + fh_lexicon fv, + fh_revlexicon rv, + fh_ostream oss ) + { + cerr << "TestForwardReverseIntegrity()" << endl; + termid_t tid = 0; + string term = ""; + + for( term = fv->getFirstTerm(); + !term.empty(); + term = fv->getNextTerm( term ) ) + { + tid = fv->lookup( term ); + + if( term != rv->lookup( tid ) ) + { + oss << "failed to find term from walk of forward lexicon" + << " in reverse lexicon using lookup()" + << " term:" << term + << " tid:" << tid + << " got:" << rv->lookup( tid ) + << endl; + } + } + + + for( tid = rv->getFirstTerm(); + tid; + tid = rv->getNextTerm( tid ) ) + { + term = rv->lookup( tid ); + + if( tid != fv->lookup( term ) ) + { + oss << "failed to find term from walk of reverse lexicon" + << " in forward lexicon using lookup()" + << " term:" << term + << " tid:" << tid + << " got:" << rv->lookup( tid ) + << endl; + } + } + + return 0; + } + }; + }; +}; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + unsigned long FerrisInternalAsyncMessageSlave = 0; + + try + { + const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + unsigned long Quiet = 0; + unsigned long DumpAttributeNameMap = 0; + unsigned long DumpIndex = 0; + unsigned long DumpIndexConfig = 0; + unsigned long DumpAsXML = 0; + unsigned long DumpForwardValueMap = 0; + unsigned long DumpReverseValueMap = 0; + unsigned long DumpDocumentTable = 0; + unsigned long TestValuemapInteg = 0; + unsigned long ResolveOnlyToURLStrings = 0; + unsigned long BenchDocIDResolution = 0; + unsigned long SkipDocIDResolution = 0; + unsigned long ShowOnlyCountOfMatches = 0; + + unsigned long BenchQueryResolution = 0; + unsigned long Limit = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "limit", 'l', POPT_ARG_INT, &Limit, 0, + "place a limit on the number of results", "" }, + + { "quiet", 'q', POPT_ARG_NONE, &Quiet, 0, + "show minimal output where possible", "" }, + + { "resolve-only-to-url-strings", 'Z', POPT_ARG_NONE, &ResolveOnlyToURLStrings, 0, + "do not attempt to get libferris filesystem objects for results", "" }, + + { "dump-attribute-name-map", 0, POPT_ARG_NONE, &DumpAttributeNameMap, 0, + "dump attribute name map lexicon", "" }, + + { "dump-forward-value-map", 0, POPT_ARG_NONE, &DumpForwardValueMap, 0, + "dump the forward value map lexicon", "" }, + + { "dump-reverse-value-map", 0, POPT_ARG_NONE, &DumpReverseValueMap, 0, + "dump the reverse value map lexicon", "" }, + + { "dump-index", 0, POPT_ARG_NONE, &DumpIndex, 0, + "dump out all the parts of the ea index as one XML file", "" }, + + { "dump-index-config", 0, POPT_ARG_NONE, &DumpIndexConfig, 0, + "dump information about how the index is compressed and its limits", "" }, + + { "dump-as-xml", 'x', POPT_ARG_NONE, &DumpAsXML, 0, + "produce XML output during dump", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "test-valuemap-integrity", 0, POPT_ARG_NONE, &TestValuemapInteg, 0, + "test to make sure forward and reverse value maps are identical in content", + "" }, + + { "dump-document-table", 0, POPT_ARG_NONE, &DumpDocumentTable, 0, + "dump out the mapping of docid to document url", "" }, + + { "bench-docid-resolution", 0, POPT_ARG_NONE, &BenchDocIDResolution, 0, + "benchmark the time taken to resolve the docids in the result set.", "" }, + + { "skip-docid-resolution", 0, POPT_ARG_NONE, &SkipDocIDResolution, 0, + "skip resolving the docids in the result set.", "" }, + + { "show-only-count", 'N', POPT_ARG_NONE, &ShowOnlyCountOfMatches, 0, + "show only the count of files matching the query.", "" }, + + + { "bench-query-resolution", 0, POPT_ARG_NONE, &BenchQueryResolution, 0, + "benchmark the time taken to resolve the query to its docids.", "" }, + + + { "ferris-internal-async-message-slave", 0, POPT_ARG_NONE, &FerrisInternalAsyncMessageSlave, 0, + "used by libferris itself to perform async queries through a slave process", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* ffilter1 ffilter2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + cerr << endl << "primary usage: " << argv[0] << " ffilter" << endl; + cerr << "for example: " << argv[0] << " (name==fred.txt)" << endl; + exit(1); + } + + stringlist_t queries; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string qs = tmpCSTR; + queries.push_back( qs ); + } + + // if we dont use emblems, dont even look at loading them + { + bool usingEmblems = false; + static boost::regex rex("emblem:"); + + for( stringlist_t::iterator qiter = queries.begin(); qiter != queries.end(); ++qiter ) + { + string qs = *qiter; + boost::smatch matches; + if( boost::regex_match( qs, matches, rex )) + { + usingEmblems = true; + break; + } + } +// cerr << "usingEmblems:" << usingEmblems << endl; + if( !usingEmblems ) + { + setSkipLoadingEmblems( !usingEmblems ); + } + } + + + + + if( Verbose ) + cerr << "connecting to index..." << endl; + + EAIndex::fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( IndexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } + fh_db4idx db4idx = dynamic_cast(GetImpl( idx )); + fh_db4treeidx db4treeidx = dynamic_cast(GetImpl( idx )); + + if( Verbose ) + cerr << "connected to index..." << endl; + + if( DumpAttributeNameMap ) + { + if( !db4idx ) + NoSupportExit("Operation not supported for this index format."); + + fh_lexicon lex = db4idx->getAttributeNameMap(); + lex->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); + return 0; + } + if( DumpForwardValueMap ) + { +// if( !db4idx ) +// NoSupportExit("Operation not supported for this index format."); + +// fh_lexicon lex = db4idx->getSchemaValueMap(); +// lex->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); +// return 0; + } + if( DumpReverseValueMap ) + { +// if( !db4idx ) +// NoSupportExit("Operation not supported for this index format."); + +// fh_revlexicon rlex = db4idx->getReverseValueMap(); +// rlex->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); +// return 0; + } + if( DumpDocumentTable ) + { + if( !db4idx ) + NoSupportExit("Operation not supported for this index format."); + + db4idx->getDocumentMap()->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); + return 0; + } + + if( DumpIndex ) + { + if( db4idx ) + { + fh_lexicon lex_an = db4idx->getAttributeNameMap(); + fh_ostream oss = Ferris::Factory::fcout(); + bool DumpAsXML = true; + + oss << "" << endl; + lex_an->dumpTo( oss, DumpAsXML, "attribute" ); + db4idx->getInvertedFile( EAIndexManagerDB4::INV_INT )->dumpTo( oss, DumpAsXML ); + db4idx->getInvertedFile( EAIndexManagerDB4::INV_DOUBLE )->dumpTo( oss, DumpAsXML ); + db4idx->getInvertedFile( EAIndexManagerDB4::INV_CIS )->dumpTo( oss, DumpAsXML ); + db4idx->getInvertedFile( EAIndexManagerDB4::INV_STRING )->dumpTo( oss, DumpAsXML ); + db4idx->getDocumentMap()->dumpTo( oss, DumpAsXML ); + oss << "" << endl; + return 0; + } + if( db4treeidx ) + { + fh_lexicon lex_an = db4treeidx->getAttributeNameMap(); + fh_ostream oss = Ferris::Factory::fcout(); + bool DumpAsXML = true; + + oss << "" << endl; + lex_an->dumpTo( oss, DumpAsXML, "attribute" ); + db4treeidx->getInvertedFile( EAIndex::INV_INT )->dumpTo( oss, DumpAsXML ); + db4treeidx->getInvertedFile( EAIndex::INV_DOUBLE )->dumpTo( oss, DumpAsXML ); + db4treeidx->getInvertedFile( EAIndex::INV_CIS )->dumpTo( oss, DumpAsXML ); + db4treeidx->getInvertedFile( EAIndex::INV_STRING )->dumpTo( oss, DumpAsXML ); + db4treeidx->getDocumentMap()->dumpTo( oss, DumpAsXML ); + oss << "" << endl; + return 0; + } + + NoSupportExit("Operation not supported for this index format."); + } + + + if( DumpIndexConfig ) + { + if( !db4idx ) + NoSupportExit("Operation not supported for this index format."); + + fh_ostream oss = Ferris::Factory::fcout(); + + oss << "attribute name class :" << db4idx->getAttributeNameMapClassName() << endl; + oss << "ea names to ignore :" << db4idx->getEANamesIgnore() << endl; + stringlist_t sl = db4idx->getEANamesIgnoreRegexes(); + for( stringlist_t::iterator si = sl.begin(); si != sl.end(); ++si ) + oss << "ea names by regex to ignore:" << *si << endl; + oss << "dgap code :" << db4idx->getDocumentNumberGapCode() << endl; + oss << "max attribute size to index:" << db4idx->getMaxValueSize() << endl; + + EAIndex::fh_invertedfile inv = db4idx->getInvertedFile( + EAIndexManagerDB4::INV_STRING ); + oss << " --- settings in string inverted file --- " << endl; + oss << "number of entries :" << inv->getNumberOfItems() << endl; + + return 0; + } + + if( TestValuemapInteg ) + { +// if( !db4idx ) +// NoSupportExit("Operation not supported for this index format."); + +// fh_lexicon fv = db4idx->getSchemaValueMap(); +// fh_revlexicon rv = db4idx->getReverseValueMap(); +// fh_ostream oss = Ferris::Factory::fcout(); + +// return Lexitest::TestForwardReverseIntegrity( fv, rv, oss ); + } + + for( stringlist_t::iterator qiter = queries.begin(); qiter != queries.end(); ++qiter ) + { + string qs = *qiter; + +// fh_context result = ExecuteQuery( qs, idx ); + fh_eaquery q = EAIndex::Factory::makeEAQuery( qs, idx ); + + if( Verbose ) + cerr << "running query..." << endl; + + EAIndex::docNumSet_t docset; + { + Time::fh_benchmark bm = BenchQueryResolution + ? new Time::Benchmark( "Resolving query to docids" ) : 0; + + q->ExecuteQueryToDocIDs( docset, Limit ); + } + + if( Quiet ) + { + if( ShowOnlyCountOfMatches ) + { + cout << docset.size() << endl; + continue; + } + } + + if( FerrisInternalAsyncMessageSlave ) + { + LG_EAIDX_D << "feaindexquery, as slave" << endl; + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["count"] = tostr(docset.size()); + XML::writeMessage( oss, m ); + LG_EAIDX_D << "feaindexquery, sent count:" << docset.size() << endl; + + m.clear(); + m["docids"] = Util::createSeperatedList( docset.begin(), docset.end() ); + XML::writeMessage( oss, m ); + LG_EAIDX_D << "feaindexquery, sent docids..." << endl; + + fh_context result = q->ResolveDocIDs( docset ); + for( Context::iterator ci = result->begin(); ci != result->end(); ++ci ) + { + m.clear(); + m["earl"] = (*ci)->getURL(); + XML::writeMessage( oss, m ); + } + oss << flush; + LG_EAIDX_D << "feaindexquery, sent earls..." << endl; + } + else + { + + fh_context result = 0; + cout << "Found " << docset.size() + << " matches at the following locations:" << endl; + + if( ShowOnlyCountOfMatches ) + continue; + + if( SkipDocIDResolution ) + continue; + + if( ResolveOnlyToURLStrings ) + { + stringset_t result; + q->ResolveDocIDsToURLs( docset, result ); + stringset_t::iterator ci = result.begin(); + stringset_t::iterator e = result.end(); + for( ; ci != e; ++ci ) + { + cout << *ci << endl; + } + } + else + { + Time::fh_benchmark bm = 0; + if( BenchDocIDResolution ) + { + bm = new Time::Benchmark( "Resolving docids" ); + } + result = q->ResolveDocIDs( docset ); + + for( Context::iterator ci = result->begin(); ci != result->end(); ++ci ) + { + cout << (*ci)->getURL() << endl; + } + } + } + } + } + catch( exception& e ) + { + string emsg = e.what(); + LG_EAIDX_D << "error:" << emsg << endl; + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["outofband-error"] = emsg; + XML::writeMessage( oss, m ); + } + cerr << "error:" << emsg << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/feaindexremove.cpp b/apps/fulltextindex/feaindexremove.cpp new file mode 100644 index 0000000..7052ef6 --- /dev/null +++ b/apps/fulltextindex/feaindexremove.cpp @@ -0,0 +1,142 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findexremove command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: feaindexremove.cpp,v 1.4 2010/09/24 21:31:16 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include + +#include "eaindexers_custom_plugin/libeaidxcustomferris.hh" + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "feaindexremove"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + const char* Regex_CSTR = 0; + const char* DateSTR_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "regex", 'r', POPT_ARG_STRING, &Regex_CSTR, 0, + "regex for URLs to remove", "" }, + + { "older-than", 'd', POPT_ARG_STRING, &DateSTR_CSTR, 0, + "remove any instances older than the given time", "now" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* ( -r regex | -d datestring ) ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 || !Regex_CSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + EAIndex::fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = EAIndex::Factory::getEAIndex( IndexPath_CSTR ); + } + else + { + idx = EAIndex::Factory::getDefaultEAIndex(); + } + + time_t tt = 0; + + if( DateSTR_CSTR ) + { + std::string datestr = DateSTR_CSTR; + struct tm tm = Time::ParseTimeString( datestr ); + tt = mktime( &tm ); + } + + string theRegex = Regex_CSTR; + idx->removeDocumentsMatchingRegexFromIndex( theRegex, tt ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/ferris-eaindex-postgresql-add-column b/apps/fulltextindex/ferris-eaindex-postgresql-add-column new file mode 100755 index 0000000..860d27f --- /dev/null +++ b/apps/fulltextindex/ferris-eaindex-postgresql-add-column @@ -0,0 +1,23 @@ +#!/bin/bash + +indexLocation="~/.ferris/eaindex" +colspec=$1 +if [ x$1 = x-P ]; then + indexLocation=$2 + colspec=$3 +fi + +if [ x$colspec = x ]; then + echo "" + echo "Usage $0 [ -P index-path ] colspec" + echo "" + echo "where colspec is like subtitles=varchar:col2=int" + exit 1 +fi + +echo "index : $indexLocation" +echo "colspec: $colspec" + +export LIBFERRIS_ADD_COLUMNS_INLINE="$colspec" +feaindexcompact -v -P $indexLocation + diff --git a/apps/fulltextindex/ferris-eaindex-postgresql-add-fulltext-index-on-column b/apps/fulltextindex/ferris-eaindex-postgresql-add-fulltext-index-on-column new file mode 100755 index 0000000..84de3b7 --- /dev/null +++ b/apps/fulltextindex/ferris-eaindex-postgresql-add-fulltext-index-on-column @@ -0,0 +1,23 @@ +#!/bin/bash + +indexLocation="~/.ferris/eaindex" +colspec=$1 +if [ x$1 = x-P ]; then + indexLocation=$2 + colspec=$3 +fi + +if [ x$colspec = x ]; then + echo "" + echo "Usage $0 [ -P index-path ] colspec" + echo "" + echo "where colspec is like subtitles,col2," + exit 1 +fi + +echo "index : $indexLocation" +echo "colspec: $colspec" + +export LIBFERRIS_ADD_FULLTEXT_INDEX_FOR_COLUMNS_INLINE="$colspec" +feaindexcompact -v -P $indexLocation + diff --git a/apps/fulltextindex/ferris-eaindex-update-existing-attributes b/apps/fulltextindex/ferris-eaindex-update-existing-attributes new file mode 100755 index 0000000..3433f6c --- /dev/null +++ b/apps/fulltextindex/ferris-eaindex-update-existing-attributes @@ -0,0 +1,27 @@ +#!/bin/bash + +indexLocation="~/.ferris/eaindex" +colspec=$1 +if [ x$1 = x-P ]; then + indexLocation=$2 + colspec=$3 + shift + shift +fi +shift + +if [ x$colspec = x ]; then + echo "" + echo "Usage $0 [ -P index-path ] colspec" + echo "" + echo "where colspec is like subtitles,col2," + exit 1 +fi + +echo "index : $indexLocation" +echo "colspec: $colspec" +echo "$@" +export LIBFERRIS_UPDATE_COLUMN_LIST="$colspec" +feaindexadd --force -P $indexLocation "$@" + + diff --git a/apps/fulltextindex/ferris-find.cpp b/apps/fulltextindex/ferris-find.cpp new file mode 100644 index 0000000..8db2fb6 --- /dev/null +++ b/apps/fulltextindex/ferris-find.cpp @@ -0,0 +1,924 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris-find command line client + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-find.cpp,v 1.5 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * More like locate than find, though with the full power of find. + * The paths themselves become index filters. + * + * FIXME: sizef() needs to consider the postfixes that find uses. + */ + +/* + * return 0 for success + * return 1 for generic error + * return 2 for parse error +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define BOOST_SPIRIT_RULE_SCANNERTYPE_LIMIT 3 + +#include +#include +using namespace boost::spirit; + +#include +#include +using namespace boost::lambda; + +typedef scanner_list, phrase_scanner_t> scanners; +typedef rule< scanners > R; + +using namespace std; +using namespace Ferris; +using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "ferris-find"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +string globToRegex( const std::string& s ) +{ + cerr << "Warning: globToRegex() is very trivial. Special regex chars are not escaped for you!" << endl; + stringstream idata; + stringstream ret; + idata << s; + char ch; + + while( idata >> noskipws >> ch ) + { + if( ch == '*' ) + ret << ".*"; + else if( ch == '?' ) + ret << '.'; + else + ret << ch; + } + + return ret.str(); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +const char* EAIndexPath_CSTR = 0; + +fh_stringstream fss; +int SearchPathRestrictionCount = 0; +stringlist_t filter_earls; + +bool action_print = false; +bool action_print0 = false; +bool action_print_count = false; +bool action_exec = false; +bool action_exec_many = false; + +unsigned long BenchQueryResolution = 0; +unsigned long BenchDocIDResolution = 0; + + +void add_filter_earl( const char* beg, const char* end ) +{ + string str( beg, end ); + LG_FFIND_D << "add_filter_earl() str:" << str << endl; + filter_earls.push_back( str ); + + if( !SearchPathRestrictionCount ) + fss << "(&(|"; + SearchPathRestrictionCount=2; + + try + { + fh_context c = Resolve( str ); + fss << "(url=~" << c->getURL() << ")"; + } + catch( exception& e ) + { + fss << "(url=~" << str << ")"; +// cerr << "Can't resolve one of the paths you gave. e:" << e.what() << endl; +// exit(1); + } +} + +void add_filter_earl_complete( const char* beg, const char* end ) +{ + if( SearchPathRestrictionCount ) + { + --SearchPathRestrictionCount; + fss << ")"; + } +} + +string tostr( const char* beg, const char* end ) +{ + return string( beg, end ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +struct NumericSpec +{ + string opcode; + string v; + + NumericSpec( const std::string& s ) + : + opcode("=="), + v("0") + { + stringstream tmp; + + if( starts_with( s, "+" ) ) + { opcode = "<="; tmp << s.substr(1); } + else if( starts_with( s, "-" ) ) + { opcode = ">="; tmp << s.substr(1); } + else + tmp << s; + + tmp >> v; + } +}; + + +void indexpathf( const char* beg, const char* end ) +{ + string v( beg, end ); + static string cache; + cache = v; + EAIndexPath_CSTR = cache.c_str(); +} + +void wholename( const char* beg, const char* end ) +{ + fss << "(url=~" << globToRegex(string( beg, end )) << ")"; +} +void iwholename( const char* beg, const char* end ) +{ + fss << "(url=~" << globToRegex(tolowerstr()( string( beg, end ) )) << ")"; +} + +void name( const char* beg, const char* end ) +{ + fss << "(name=~" << globToRegex(string( beg, end )) << ")"; +} +void iname( const char* beg, const char* end ) +{ + fss << "(name=~" << globToRegex(tolowerstr()( string( beg, end ) )) << ")"; +} + +void regex( const char* beg, const char* end ) +{ + fss << "(url=~" << (string( beg, end )) << ")"; +} +void iregex( const char* beg, const char* end ) +{ + fss << "(url=~" << (tolowerstr()( string( beg, end ) )) << ")"; +} + +void lname( const char* beg, const char* end ) +{ + fss << "(link-target=~" << globToRegex(string( beg, end )) << ")"; +} +void ilname( const char* beg, const char* end ) +{ + fss << "(link-target=~" << globToRegex(tolowerstr()( string( beg, end ) )) << ")"; +} + +void lregex( const char* beg, const char* end ) +{ + fss << "(link-target=~" << (string( beg, end )) << ")"; +} +void ilregex( const char* beg, const char* end ) +{ + fss << "(link-target=~" << (tolowerstr()( string( beg, end ) )) << ")"; +} + +void samefile( const char* beg, const char* end ) +{ + string filename = string( beg, end ); + fh_context c = Resolve( filename ); + string inode = getStrAttr( c, "inode", "", true, true ); + fss << "(inode==" << inode << ")"; +} + +void inode( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(inode" << spec.opcode << spec.v << ")"; +} + +void links( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(hard-link-count" << spec.opcode << spec.v << ")"; +} + +time_t day_offset = 24*3600; +static time_t RoundXTime( NumericSpec& spec, long offset = 24*3600, long period = 24*3600 ) +{ + long v = toType( spec.v ); + time_t tt = Time::getTime() - offset - v * period; + + time_t nowt = Time::getTime(); + LG_FFIND_D << "RoundXTime() v:" << v << endl + << " now:" << nowt << " now.disp:" << Time::toTimeString(nowt) << endl + << " tt:" << tt << " tt.disp:" << Time::toTimeString(tt) + << endl; + return tt; +} + +void daystart( const char* beg, const char* end ) +{ + time_t tt = Time::getTime(); + day_offset = tt - (tt % 24*3600); +} + +void atimef( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(atime" << spec.opcode << RoundXTime( spec, day_offset ) << ")"; +} +void ctimef( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(ctime" << spec.opcode << RoundXTime( spec, day_offset ) << ")"; +} +void mtimef( const char* beg, const char* end ) +{ + LG_FFIND_D << "mtimef:" << string( beg, end ) << endl; + NumericSpec spec( string( beg, end ) ); + fss << "(mtime" << spec.opcode << RoundXTime( spec, day_offset ) << ")"; +} + + +void aminf( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(atime" << spec.opcode << RoundXTime( spec, 0, 60 ) << ")"; +} +void cminf( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(ctime" << spec.opcode << RoundXTime( spec, 0, 60 ) << ")"; +} +void mminf( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(mtime" << spec.opcode << RoundXTime( spec, 0, 60 ) << ")"; +} + +void newerf( const std::string& attr, const std::string& v ) +{ + string filename = v; + fh_context c = Resolve( filename ); + fss << "(" << attr << ">=" << getStrAttr( c, attr, "0", true, true ) << ")"; +} +void cnewerf( const char* beg, const char* end ) +{ + newerf( "ctime", string( beg, end ) ); +} +void anewerf( const char* beg, const char* end ) +{ + newerf( "atime", string( beg, end ) ); +} +void mnewerf( const char* beg, const char* end ) +{ + newerf( "mtime", string( beg, end ) ); +} + +void sizef( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(size" << spec.opcode << spec.v << ")"; +} + +void emptyf( const char* beg, const char* end ) +{ + fss << "(&(|(is-dir==1)(is-file==1))(size==0))"; +} + +static void TypeFunc( const std::string& attr, const std::string& v ) +{ + fss << "(" << attr << "=="; + if( v == "b" ) fss << "block device"; + else if( v == "c" ) fss << "character device"; + else if( v == "d" ) fss << "directory"; + else if( v == "p" ) fss << "fifo"; + else if( v == "f" ) fss << "regular file"; + else if( v == "l" ) fss << "symbolic link"; + else if( v == "s" ) fss << "socket"; + else if( v == "D" ) fss << "door"; + else fss << "unknown"; + fss << ")"; +} +void typef( const char* beg, const char* end ) +{ + TypeFunc( "dontfollow-filesystem-filetype", string( beg, end ) ); +} +void xtypef( const char* beg, const char* end ) +{ + TypeFunc( "filesystem-filetype", string( beg, end ) ); +} + + +void uidf( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(user-owner-number" << spec.opcode << spec.v << ")"; +} +void gidf( const char* beg, const char* end ) +{ + NumericSpec spec( string( beg, end ) ); + fss << "(group-owner-number" << spec.opcode << spec.v << ")"; +} +void userf( const char* beg, const char* end ) +{ + string v( beg, end ); + if( !v.empty() && v[0] >= '0' && v[0] <= '9' ) + uidf( beg, end ); + else + fss << "(user-owner==" << v << ")"; +} + +void groupf( const char* beg, const char* end ) +{ + string v( beg, end ); + if( !v.empty() && v[0] >= '0' && v[0] <= '9' ) + gidf( beg, end ); + else + fss << "(group-owner==" << v << ")"; +} + +void permf( const char* beg, const char* end ) +{ + string v( beg, end ); + if( !v.empty() && v[0]=='-' || v[0]=='+' ) + { + if( v[0] == '-' ) + fss << "(|"; + else + fss << "(&"; + + ::mode_t m = ::Ferris::Factory::MakeInitializationMode( &v[1] ); + LG_FFIND_D << "nested mode:" << oct << m << endl; + + if ( m == S_IFLNK ) TypeFunc( "dontfollow-filesystem-filetype", "l" ); + else if( m == S_IFSOCK ) TypeFunc( "dontfollow-filesystem-filetype", "s" ); + else if( m == S_IFBLK ) TypeFunc( "dontfollow-filesystem-filetype", "b" ); + else if( m == S_IFDIR ) TypeFunc( "dontfollow-filesystem-filetype", "d" ); + else if( m == S_IFCHR ) TypeFunc( "dontfollow-filesystem-filetype", "c" ); + else if( m == S_IFIFO ) TypeFunc( "dontfollow-filesystem-filetype", "p" ); + else if( m == S_IFREG ) TypeFunc( "dontfollow-filesystem-filetype", "f" ); + + if( m & S_IRUSR ) fss << "(user-readable==1)"; + if( m & S_IWUSR ) fss << "(user-writable==1)"; + if( m & S_ISUID ) fss << "(is-setuid==1)"; + else if( m & S_IXUSR ) fss << "(user-executable==1)"; + + if( m & S_IRGRP ) fss << "(group-readable==1)"; + if( m & S_IWGRP ) fss << "(group-writable==1)"; + if( m & S_ISGID ) fss << "(is-setgid==1)"; + else if( m & S_IXGRP ) fss << "(group-executable==1)"; + + if( m & S_IROTH ) fss << "(other-readable==1)"; + if( m & S_IWOTH ) fss << "(other-writable==1)"; + if( m & S_ISVTX ) fss << "(is-sticky==1)"; + else if( m & S_IXOTH ) fss << "(other-executable==1)"; + + + fss << ")"; + +// R plus_p = (str_p("+")); +// R minus_p = (str_p("-")); +// R number_p = (uint_p); + +// R chmod_p = +// ( +// plus_p[ ((_1, var( fss << "(&" ) )) ] | +// minus_p[ ((_1, var( fss << "(|" ) )) ] +// ) +// >> ( number_p ) +// ; + +// parse_info<> info = parse( +// v.c_str(), +// chmod_p, +// space_p ); + +// if (info.full) +// { +// } +// else +// { +// fh_stringstream ss; +// ss << "Parsing find chmod specification failed" << nl +// << "input:" << v << nl +// << "stopped at: \": " << info.stop << "\"" << nl +// << "char offset:" << ( info.stop - v.c_str() ) << nl; +// cerr << tostr(ss) << endl; +// exit(2); +// } +// fss << ")"; + } + else + { + ::mode_t m = ::Ferris::Factory::MakeInitializationMode( v ); + fss << "(mode==" << m << ")"; + } +} + +void contentsf( const char* beg, const char* end ) +{ + string v( beg, end ); + fss << "(ferris-fulltext-search==" << v << ")"; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void a_printf( const char* beg, const char* end ) +{ + string v( beg, end ); + action_print = 1; +} +void a_print0f( const char* beg, const char* end ) +{ + string v( beg, end ); + action_print0 = 1; +} +void a_printcountf( const char* beg, const char* end ) +{ + string v( beg, end ); + action_print_count = 1; +} + +string a_collect_command_string_cache = ""; +void a_collect_command_string( const char* beg, const char* end ) +{ + string v( beg, end ); + a_collect_command_string_cache = v; + +} +void a_exec( const char* beg, const char* end ) +{ + action_exec = 1; +} +void a_exec_many( const char* beg, const char* end ) +{ + action_exec_many = 1; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void start_not_pred( const char* beg, const char* end ) +{ + fss << "(!(&"; +} +void end_not_pred( const char* beg, const char* end ) +{ + fss << "))"; +} + +// +// We have to strip off the previous ffilter chunk and move +// that into the OR predicate. +// +void start_or_pred( const char* beg, const char* end ) +{ + string prevchunk = ""; + string tmp = fss.str(); + + int char_count = 0; + int paren_count = 0; + string::reverse_iterator iter = tmp.rbegin(); + while( iter != tmp.rend() ) + { + LG_FFIND_D << "iter:" << *iter << endl; + + if( *iter == ')' ) + ++paren_count; + if( *iter == '(' ) + --paren_count; + ++iter; + ++char_count; + + if( !paren_count ) + { + prevchunk = tmp.substr( tmp.length() - char_count ); + fss.seekp( -char_count, ios_base::cur ); + break; + } + } + + LG_FFIND_D << "prevchunk:" << prevchunk << endl; + fss << "(|" << prevchunk; + +} +void end_or_pred( const char* beg, const char* end ) +{ + fss << ")"; +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void parseCommand( const std::string& cmdstr ) +{ + LG_FFIND_D << "parseCommand(top) cmdstr:" << cmdstr << endl; + + R string_p = regex_p("[^ ]+"); + R commandstring_p = regex_p("[^;+]+"); + R earl_p = regex_p("[^-][^ ]*"); + R filter_earl_p = earl_p[ (&add_filter_earl) ]; + R wholename_p = (str_p("-wholename") | str_p("-path")); + R iwholename_p = (str_p("-iwholename") | str_p("-ipath")); + R name_p = (str_p("-name")); + R iname_p = (str_p("-iname")); + R regex_p = (str_p("-regex")); + R iregex_p = (str_p("-iregex")); + R lname_p = (str_p("-lname")); + R ilname_p = (str_p("-ilname")); + R lregex_p = (str_p("-lregex")); // added + R ilregex_p = (str_p("-ilregex")); // added + R samefile_p = (str_p("-samefile")); + R inode_p = (str_p("-inum") | str_p("-inode")); + R links_p = (str_p("-links") ); + R atime_p = (str_p("-atime") ); + R ctime_p = (str_p("-ctime") ); + R mtime_p = (str_p("-mtime") ); + R amin_p = (str_p("-amin") ); + R cmin_p = (str_p("-cmin") ); + R mmin_p = (str_p("-mmin") ); + R daystart_p = (str_p("-daystart") ); + R anewer_p = (str_p("-anewer") ); + R cnewer_p = (str_p("-cnewer") ); + R mnewer_p = (str_p("-newer") | str_p("-mnewer") ); +// R used_p = (str_p("-used") ); + R size_p = (str_p("-size") ); + R empty_p = (str_p("-empty") ); + R type_p = (str_p("-type") ); + R xtype_p = (str_p("-xtype") ); + R user_p = (str_p("-user") ); + R group_p = (str_p("-group") ); + R uid_p = (str_p("-uid") ); + R gid_p = (str_p("-gid") ); +// R nouser_p = (str_p("-nouser") ); +// R nogroup_p = (str_p("-nogroup") ); + R perm_p = (str_p("-perm") ); + R contents_p = (str_p("-contents") ); // added. + R indexpath_p = (str_p("-index-path")); + + + R a_print_p = (str_p("-print") ); + R a_print0_p = (str_p("-print0") ); + R a_print_count_p = (str_p("-print-count") ); + + R a_exec_p = (str_p("-exec") ); + + R name_pred_p = + ( wholename_p >> string_p[ &wholename ] ) + | + ( iwholename_p >> string_p[ &iwholename ] ) + | + ( name_p >> string_p[ &name ] ) + | + ( iname_p >> string_p[ &iname ] ) + | + ( regex_p >> string_p[ ®ex ] ) + | + ( iregex_p >> string_p[ &iregex ] ) + | + ( lname_p >> string_p[ &lname ] ) + | + ( ilname_p >> string_p[ &ilname ] ) + | + ( lregex_p >> string_p[ &lregex ] ) + | + ( ilregex_p >> string_p[ &ilregex ] ) + ; + + R time_pred_p = + daystart_p[ &daystart ] + | + ( atime_p >> string_p[ &atimef ] ) + | + ( ctime_p >> string_p[ &ctimef ] ) + | + ( mtime_p >> string_p[ &mtimef ] ) + | + ( amin_p >> string_p[ &aminf ] ) + | + ( cmin_p >> string_p[ &cminf ] ) + | + ( mmin_p >> string_p[ &mminf ] ) + | + ( anewer_p >> string_p[ &anewerf ] ) + | + ( cnewer_p >> string_p[ &cnewerf ] ) + | + ( mnewer_p >> string_p[ &mnewerf ] ) + ; + + R ea_pred_p = + ( samefile_p >> string_p[ &samefile ] ) + | + ( inode_p >> string_p[ &inode ] ) + | + ( links_p >> string_p[ &links ] ) + | + ( size_p >> string_p[ &sizef ] ) + | + ( empty_p >> string_p[ &emptyf ] ) + | + ( type_p >> string_p[ &typef ] ) + | + ( xtype_p >> string_p[ &xtypef ] ) + | + ( user_p >> string_p[ &userf ] ) + | + ( group_p >> string_p[ &groupf ] ) + | + ( uid_p >> string_p[ &uidf ] ) + | + ( gid_p >> string_p[ &gidf ] ) + | + ( perm_p >> string_p[ &permf ] ) + ; + + R ferris_options_p = + ( indexpath_p >> string_p[ &indexpathf ] ); + + R pred_p = + +( + name_pred_p + | + ferris_options_p + | + ea_pred_p + | + time_pred_p + | + ( contents_p >> str_p("\"") >> string_p[ &contentsf ] >> str_p("\"") ) + | + (((str_p("-not") | str_p("!"))[ &start_not_pred ]) + >> pred_p)[ &end_not_pred ] + | + (str_p("-and") | str_p("-a")) + | + (((str_p("-or") | str_p("-o"))[ &start_or_pred ]) + >> pred_p)[ &end_or_pred ] + ); + R find_p = (+(filter_earl_p))[ &add_filter_earl_complete ] + >> *( pred_p ) + >> + *( (a_print_count_p[ &a_printcountf ]) + | (a_print0_p[ &a_print0f ]) + | (a_print_p[ &a_printf ]) + | (a_exec_p >> commandstring_p[ &a_collect_command_string ] + >> ( str_p(";")[ &a_exec ] | str_p("+")[ &a_exec_many ] )) + ) + ; + + + + parse_info<> info = parse( + cmdstr.c_str(), + find_p, + space_p ); + + if (info.full) + { + } + else + { + fh_stringstream ss; + ss << "Parsing find specification failed" << nl + << "input:" << cmdstr << nl + << "stopped at: \": " << info.stop << "\"" << nl + << "char offset:" << ( info.stop - cmdstr.c_str() ) << nl; + cerr << tostr(ss) << endl; + exit(2); + } + + //////////////////////////////////////////////////////////// + // + // Close the path filter predicate off + // + //////////////////////////////////////////////////////////// + for( int i=0; isetCommandLine( cmd ); + r->setSpawnFlags( GSpawnFlags( r->getSpawnFlags() | (G_SPAWN_DO_NOT_REAP_CHILD))); + r->setConnect_ChildStdOut_To_ParentStdOut( true ); + r->setConnect_ChildStdErr_To_ParentStdErr( true ); + +// cerr << "spawn() cmd:" << cmd << endl; + r->Run(); + r->getExitStatus(); +} + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + { + stringstream ss; + for( int i=1; iExecuteQueryToDocIDs( docset ); + } + + fh_context result = 0; + + if( action_print_count ) + { + cout << "Found " << docset.size() << " matches. exiting" << endl; + exit( 0 ); + } + + cerr << "Found " << docset.size() << " matches...." << endl; + { + Time::fh_benchmark bm = 0; + if( BenchDocIDResolution ) + { + bm = new Time::Benchmark( "Resolving docids" ); + } + result = q->ResolveDocIDs( docset ); + } + + if( action_exec_many ) + { + string given_cmd = a_collect_command_string_cache; + Context::iterator ci = result->begin(); + + while( ci != result->end() ) + { + stringstream given_cmd_ss; + given_cmd_ss << given_cmd; + stringstream cmdss; + char ch; + while( given_cmd_ss >> noskipws >> ch ) + { + if( ch != '{' ) + cmdss << ch; + else + { + given_cmd_ss >> ch; + break; + } + } + + int len = given_cmd.length() + 2; + for( ; ci != result->end(); ) + { + string earl = (*ci)->getURL(); + int earllen = earl.length(); + +// cerr << "len:" << len << " earllen:" << earllen << endl; + if( len + earllen >= _POSIX_ARG_MAX ) + break; + + len += earllen + 2; + cmdss << " " << earl << " "; + ++ci; + } + while( given_cmd_ss >> noskipws >> ch ) + cmdss << ch; + + spawn( cmdss.str() ); + } + return 0; + } + + for( Context::iterator ci = result->begin(); ci != result->end(); ++ci ) + { + if( action_print0 ) + cout << (*ci)->getURL() << '\0'; + else if( action_exec ) + { + string earl = (*ci)->getURL(); + string given_cmd = a_collect_command_string_cache; +// cerr << "given_cmd:" << given_cmd << " url:" << earl << endl; + string cmd = Util::replace_all( given_cmd, "{}", earl ); + spawn( cmd ); + } + else + cout << (*ci)->getURL() << endl; + } + + exit( 0 ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/ferris-index-remove b/apps/fulltextindex/ferris-index-remove new file mode 100755 index 0000000..45f5b9f --- /dev/null +++ b/apps/fulltextindex/ferris-index-remove @@ -0,0 +1,6 @@ +#!/bin/bash + +regex=${1:?give a regex for documents as arg1}; + +feaindexremove -r "$1"; +findexremove -r "$1"; diff --git a/apps/fulltextindex/ferris-search.cpp b/apps/fulltextindex/ferris-search.cpp new file mode 100644 index 0000000..364d77e --- /dev/null +++ b/apps/fulltextindex/ferris-search.cpp @@ -0,0 +1,260 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + feaindexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-search.cpp,v 1.3 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::FullTextIndex; +//using namespace Ferris::EAIndex; + +const string PROGRAM_NAME = "ferris-search"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +typedef list< fh_context > results_t; +results_t results; + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +void +tryRunFulltextQuery( fh_idx fidx, const char* q, QueryMode mode ) +{ + if( q ) + { + fh_context result = ExecuteQuery( q, mode, fidx ); + results.push_back( result ); + } +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { +// const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + unsigned long ShowOnlyCountOfMatches = 0; + unsigned long BenchQueryResolution = 0; + const char* ftxBool = 0; + const char* ftxRanked = 0; + const char* ftxXapian = 0; + const char* ftxTSearch2 = 0; + const char* eaquery = 0; + unsigned long CombineWithOR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "or", 0, POPT_ARG_NONE, &CombineWithOR, 0, + "combine various searches with logical OR instead of AND", "" }, + +// { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, +// "which index to use", "" }, + + { "show-only-count", 'N', POPT_ARG_NONE, &ShowOnlyCountOfMatches, 0, + "show only the count of files matching the query.", "" }, + + { "ftx-boolean", 'B', POPT_ARG_STRING, &ftxBool, 0, + "combine boolean full text query", "" }, + + { "ftx-ranked", 'R', POPT_ARG_STRING, &ftxRanked, 0, + "combine ranked full text query", "" }, + + { "ftx-xapian", 'X', POPT_ARG_STRING, &ftxXapian, 0, + "combine Xapian full text query", "" }, + + { "ftx-tsearch2", 'T', POPT_ARG_STRING, &ftxTSearch2, 0, + "combine tsearch2 full text query", "" }, + + { "ea", 'E', POPT_ARG_STRING, &eaquery, 0, + "combine eaquery full text query", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx fidx = FullTextIndex::Factory::getDefaultFullTextIndex(); + EAIndex::fh_idx eidx = EAIndex::Factory::getDefaultEAIndex(); + + if( eaquery ) + { + cerr << "eaquery:" << eaquery << endl; + EAIndex::fh_eaquery q = EAIndex::Factory::makeEAQuery( eaquery, eidx ); + + EAIndex::docNumSet_t docset; + q->ExecuteQueryToDocIDs( docset ); + fh_context result = q->ResolveDocIDs( docset ); + results.push_back( result ); + } + + tryRunFulltextQuery( fidx, ftxBool, QUERYMODE_BOOLEAN ); + tryRunFulltextQuery( fidx, ftxRanked, QUERYMODE_RANKED ); + tryRunFulltextQuery( fidx, ftxXapian, QUERYMODE_XAPIAN ); + tryRunFulltextQuery( fidx, ftxTSearch2, QUERYMODE_TSEARCH2 ); + + + results_t combinedResults; + + if( CombineWithOR ) + { + for( results_t::const_iterator ri = results.begin(); ri!=results.end(); ++ri ) + { + fh_context result = *ri; + copy( result->begin(), result->end(), back_inserter( combinedResults )); + } + } + else + { + if( !results.empty() ) + { + // + // Start with the smallest result and remove contexts from that + // if they are not found in another result. + // + fh_context smallestIndividualResult = *results.begin(); + for( results_t::const_iterator ri = results.begin(); ri!=results.end(); ++ri ) + { + fh_context result = *ri; + if( result->getSubContextCount() < + smallestIndividualResult->getSubContextCount() ) + { + smallestIndividualResult = result; + } + } + + copy( smallestIndividualResult->begin(), + smallestIndividualResult->end(), + back_inserter( combinedResults ) ); + + for( results_t::const_iterator ri = results.begin(); ri!=results.end(); ++ri ) + { + fh_context result = *ri; + if( result == smallestIndividualResult ) + continue; + + set< fh_context > tmpset; + copy( result->begin(), result->end(), inserter( tmpset, tmpset.end() )); + + for( results_t::iterator cri = combinedResults.begin(); + cri != combinedResults.end(); ) + { + if( tmpset.find( *cri ) == tmpset.end() ) + { + results_t::iterator t = cri; + ++cri; + combinedResults.erase( t ); + } + ++cri; + } + + } + } + } + + cerr << "Result count:" << combinedResults.size() << endl; + for( results_t::const_iterator ri = combinedResults.begin(); + ri!=combinedResults.end(); ++ri ) + { + fh_context c = *ri; + cout << c->getURL() << endl; + } + + +// for( results_t::const_iterator ri = results.begin(); ri!=results.end(); ++ri ) +// { +// fh_context result = *ri; +// for( Context::iterator ci = result->begin(); ci != result->end(); ++ci ) +// { +// cout << (*ci)->getURL() << endl; +// } +// } + + + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/findex-remove-old-instances.cpp b/apps/fulltextindex/findex-remove-old-instances.cpp new file mode 100644 index 0000000..ea7778c --- /dev/null +++ b/apps/fulltextindex/findex-remove-old-instances.cpp @@ -0,0 +1,135 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findex-remove-old-instances command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: findex-remove-old-instances.cpp,v 1.3 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "findex-remove-old-instances"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + const char* DateSTR_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "older-than", 'd', POPT_ARG_STRING, &DateSTR_CSTR, 0, + "when a document has two or more instances in the index, remove any older than the given time", "now" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = FullTextIndex::Factory::getFullTextIndex( IndexPath_CSTR ); + } + else + { + idx = FullTextIndex::Factory::getDefaultFullTextIndex(); + } + + time_t tt = Time::getTime(); + + if( DateSTR_CSTR ) + { + std::string datestr = DateSTR_CSTR; + struct tm tm = Time::ParseTimeString( datestr ); + tt = mktime( &tm ); + } + idx->purgeDocumentInstancesOlderThan( tt ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/findexadd.cpp b/apps/fulltextindex/findexadd.cpp new file mode 100644 index 0000000..4a45a5e --- /dev/null +++ b/apps/fulltextindex/findexadd.cpp @@ -0,0 +1,229 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + index add command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: findexadd.cpp,v 1.7 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "findexadd"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +void progressf( fh_context c, streamsize bytesDone, streamsize totalBytes ) +{ + cerr << c->getURL() << " " << bytesDone << " / " << totalBytes << endl; +} + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int exit_status = 0; +int TotalFilesDoneCount = 0; +unsigned long DontCheckIfAlreadyThere = 0; +unsigned long Verbose = 0; +unsigned long userSelectedTotalFilesToIndexPerRun = 0; + +void addToIndexFromFileList( fh_idx& idx, fh_istream& fiss ) +{ + string srcURL; + + fh_docindexer indexer = FullTextIndex::Factory::makeDocumentIndexer( idx ); + indexer->setDontCheckIfAlreadyThere( DontCheckIfAlreadyThere ); + if( Verbose ) + { + indexer->getProgressSig().connect( sigc::ptr_fun( progressf ) ); + } + + while( getline( fiss, srcURL )) + { + try + { + if( srcURL.empty() ) + continue; + + fh_context c = Resolve( srcURL ); + + if( idx->getIndexMethodSupportsIsFileNewerThanIndexedVersion() ) + { + if( !idx->isFileNewerThanIndexedVersion( c ) ) + { + if( Verbose ) + { + cerr << "Skipping:" << srcURL << endl; + } + continue; + } + } + + indexer->addContextToIndex( c ); + ++TotalFilesDoneCount; + + if( userSelectedTotalFilesToIndexPerRun + && TotalFilesDoneCount >= userSelectedTotalFilesToIndexPerRun ) + { + cerr << "Have reached the selected max number of files to index for this run..." << endl; + return; + } + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit_status = 1; + } + } +} + +int main( int argc, char** argv ) +{ + try + { +// const char* CreateTypeName_CSTR = 0; + const char* IndexPath_CSTR = 0; + const char* FilelistFile_CSTR = 0; + unsigned long FilelistStdin = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "skip-already-indexed-check", 'S', POPT_ARG_NONE, &DontCheckIfAlreadyThere, 0, + "don't check if the context is already indexed, just add it.", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "filelist-file", 'f', POPT_ARG_STRING, &FilelistFile_CSTR, 0, + "file containing the URLs of the files to index (eg. made by find . >foo)", "" }, + + { "filelist-stdin", '1', POPT_ARG_NONE, &FilelistStdin, 0, + "read filenames from stdin to index", "" }, + + { "total-files-to-index-per-run", 'N', POPT_ARG_INT, &userSelectedTotalFilesToIndexPerRun, 0, + "only add this many files to the index and then exit. Note that skipped files do not count towards this total, files must be really (re)indexed to count.", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = FullTextIndex::Factory::getFullTextIndex( IndexPath_CSTR ); + } + else + { + idx = FullTextIndex::Factory::getDefaultFullTextIndex(); + } + + if( FilelistFile_CSTR ) + { + string filelistFile = FilelistFile_CSTR; + fh_ifstream fiss( filelistFile ); + addToIndexFromFileList( idx, fiss ); + } + if( FilelistStdin ) + { + fh_istream fiss = Ferris::Factory::fcin(); + addToIndexFromFileList( idx, fiss ); + } + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + try + { + string srcURL = tmpCSTR; + fh_context c = Resolve( srcURL ); + + fh_docindexer indexer = FullTextIndex::Factory::makeDocumentIndexer( idx ); + indexer->setDontCheckIfAlreadyThere( DontCheckIfAlreadyThere ); + if( Verbose ) + indexer->getProgressSig().connect( sigc::ptr_fun( progressf ) ); + indexer->addContextToIndex( c ); + ++TotalFilesDoneCount; + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit_status = 1; + } + } + idx->sync(); + cerr << "Total contexts indexed:" << TotalFilesDoneCount << endl; + } + catch( exception& e ) + { + cerr << "cought error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/findexcompact.cpp b/apps/fulltextindex/findexcompact.cpp new file mode 100644 index 0000000..d00aa40 --- /dev/null +++ b/apps/fulltextindex/findexcompact.cpp @@ -0,0 +1,129 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: findexcompact.cpp,v 1.4 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include "fulltextindexers_custom_plugin/libftxcustomferris.hh" + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "findexcompact"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = FullTextIndex::Factory::getFullTextIndex( IndexPath_CSTR ); + } + else + { + idx = FullTextIndex::Factory::getDefaultFullTextIndex(); + } + + fh_nidx nidx = dynamic_cast(GetImpl( idx )); + if( nidx ) + { + fh_invertedfile inv = nidx->getInvertedFile(); + inv->compact( Ferris::Factory::fcout(), Verbose ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/findexquery.cpp b/apps/fulltextindex/findexquery.cpp new file mode 100644 index 0000000..039b0ec --- /dev/null +++ b/apps/fulltextindex/findexquery.cpp @@ -0,0 +1,482 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: findexquery.cpp,v 1.9 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include + +#include "fulltextindexers_custom_plugin/libftxcustomferris.hh" + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "findexquery"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void +NoSupportExit( const std::string& msg ) +{ + cerr << msg << endl; + exit( 1 ); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + unsigned long FerrisInternalAsyncMessageSlave = 0; + + try + { + const char* CreateTypeName_CSTR = 0; + const char* IndexPath_CSTR = 0; + unsigned long UseRanked = 0; + unsigned long UseXapian = 0; + unsigned long UseTSearch2 = 0; + unsigned long UseExternal = 0; + unsigned long UseBeagle = 0; + unsigned long ShowStats = 0; + unsigned long DumpAsXML = 0; + unsigned long DumpLexicon = 0; + unsigned long DumpInvertedFile = 0; + unsigned long DumpDocumentTable = 0; + unsigned long DumpIndex = 0; + unsigned long DumpIndexConfig = 0; + unsigned long DontSortByRank = 0; + unsigned long Verbose = 0; + unsigned long Quiet = 0; + unsigned long Dummy = 0; + unsigned long getNumberOfTerms = 0; + unsigned long getNumberOfDocuments = 0; + unsigned long getSizeOfInvertedListChunks = 0; + unsigned long getDocumentNumberGapCode = 0; + unsigned long getFrequencyOfTermInDocumentCode = 0; + unsigned long getLexiconClass = 0; + unsigned long Limit = 0; + unsigned long ShowOnlyCountOfMatches = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "limit", 'l', POPT_ARG_INT, &Limit, 0, + "place a limit on the number of results", "" }, + + { "quiet", 'q', POPT_ARG_NONE, &Quiet, 0, + "show minimal output where possible", "" }, + + { "ranked", 'r', POPT_ARG_NONE, &UseRanked, 0, + "perform ranked query", "" }, + + { "xapian", 'X', POPT_ARG_NONE, &UseXapian, 0, + "query is in the xapian query format for use on the xapian backend", "" }, + + { "tsearch2", 'T', POPT_ARG_NONE, &UseTSearch2, 0, + "query is in the tsearch2 query format for use on the tsearch2 backend", "" }, + + { "external", 'E', POPT_ARG_NONE, &UseExternal, 0, + "query is in the external query format for use on the external backend", "" }, + + { "beagle", 'B', POPT_ARG_NONE, &UseBeagle, 0, + "query is in the beagle query format for use on the beagle backend", "" }, + + { "boolean", 0, POPT_ARG_NONE, &Dummy, 0, + "perform boolean query (default)", "" }, + + { "dont-sort-by-rank", '9', POPT_ARG_NONE, &DontSortByRank, 0, + "dont sort ranked query results by rank for display", "" }, + + { "stats", '0', POPT_ARG_NONE, &ShowStats, 0, + "collect stats from query", "" }, + + { "dump-lexicon", 0, POPT_ARG_NONE, &DumpLexicon, 0, + "dump out the lexicon", "" }, + + { "dump-inverted-file", 0, POPT_ARG_NONE, &DumpInvertedFile, 0, + "dump out the index", "" }, + + { "dump-document-table", 0, POPT_ARG_NONE, &DumpDocumentTable, 0, + "dump out the mapping of docid to document url", "" }, + + { "dump-index", 0, POPT_ARG_NONE, &DumpIndex, 0, + "dump out the lexicon, inverted file and document map as one XML file", "" }, + + { "dump-index-config", 0, POPT_ARG_NONE, &DumpIndexConfig, 0, + "dump information about how the index is compressed and its limits", "" }, + + { "dump-as-xml", 'x', POPT_ARG_NONE, &DumpAsXML, 0, + "produce XML output during dump", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "get-number-of-terms", 0, POPT_ARG_NONE, &getNumberOfTerms, 0, + "display the number of distinct terms in the index and quit", "" }, + + { "get-number-of-documents", 0, POPT_ARG_NONE, &getNumberOfDocuments, 0, + "display the number of documents in the index and quit", "" }, + + { "get-size-of-inverted-list-chunks", 0, POPT_ARG_NONE, &getSizeOfInvertedListChunks, 0, + "display the max size of inverted list chunks in the index and quit", "" }, + + { "get-document-number-gap-code", 0, POPT_ARG_NONE, &getDocumentNumberGapCode, 0, + "display the codec used to store document numbers in the index and quit", "" }, + + { "get-frequency-of-term-in-document-code", 0, POPT_ARG_NONE, &getFrequencyOfTermInDocumentCode, 0, + "display the codec used to store f(d,t) numbers in the index and quit", "" }, + + { "get-lexicon-class", 0, POPT_ARG_NONE, &getLexiconClass, 0, + "display the classname of the lexicon storage handler for the index and quit", "" }, + +// { "create-type", 0, POPT_ARG_STRING, &CreateTypeName_CSTR, 0, +// "what form of context to store the chunks in (dir/db4/gdbm/xml/etc)", 0 }, + + { "ferris-internal-async-message-slave", 0, POPT_ARG_NONE, &FerrisInternalAsyncMessageSlave, 0, + "used by libferris itself to perform async queries through a slave process", "" }, + + { "show-only-count", 'N', POPT_ARG_NONE, &ShowOnlyCountOfMatches, 0, + "show only the count of files matching the query.", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* query-string-here"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = FullTextIndex::Factory::getFullTextIndex( IndexPath_CSTR ); + } + else + { + idx = FullTextIndex::Factory::getDefaultFullTextIndex(); + } + + fh_nidx nidx = dynamic_cast(GetImpl( idx )); + + /** + * These single shot methods are mainly handy for testing. + */ + if( getNumberOfTerms ) + { + if( !nidx ) + NoSupportExit("Getting the number of terms not supported for this index type"); + + fh_ostream oss = Ferris::Factory::fcout(); + fh_invertedfile inv = nidx->getInvertedFile(); + oss << inv->getNumberOfTerms() + << endl; + exit(0); + } + if( getNumberOfDocuments ) + { + if( !nidx ) + NoSupportExit("Getting the number of docs not supported for this index type"); + fh_ostream oss = Ferris::Factory::fcout(); + oss << nidx->getDocumentMap()->size() + << endl; + exit(0); + } + if( getSizeOfInvertedListChunks ) + { + if( !nidx ) + NoSupportExit("Getting the size of list chunks not supported for this index type"); + fh_ostream oss = Ferris::Factory::fcout(); + oss << nidx->getInvertedSkiplistMaxSize() + << endl; + exit(0); + } + if( getDocumentNumberGapCode ) + { + if( !nidx ) + NoSupportExit("Getting the doc gap code not supported for this index type"); + fh_ostream oss = Ferris::Factory::fcout(); + oss << nidx->getDocumentNumberGapCode() + << endl; + exit(0); + } + if( getFrequencyOfTermInDocumentCode ) + { + if( !nidx ) + NoSupportExit("Getting f_t in doc not supported for this index type"); + fh_ostream oss = Ferris::Factory::fcout(); + oss << nidx->getFrequencyOfTermInDocumentCode() + << endl; + exit(0); + } + if( getLexiconClass ) + { + if( !nidx ) + NoSupportExit("Getting the lexicon class name" + "not supported for this index type"); + + fh_ostream oss = Ferris::Factory::fcout(); + oss << nidx->getLexiconClassName() + << endl; + exit(0); + } + + + if( DumpLexicon ) + { + if( !nidx ) + NoSupportExit("dumping Lexicon not supported for this index type"); + + fh_lexicon lex = nidx->getLexicon(); + lex->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); + return 0; + } + + if( DumpInvertedFile ) + { + if( !nidx ) + NoSupportExit("dumping inverted file not supported for this index type"); + + fh_invertedfile inv = nidx->getInvertedFile(); + inv->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); + return 0; + } + + if( DumpDocumentTable ) + { + if( !nidx ) + NoSupportExit("dumping document table not supported for this index type"); + + nidx->getDocumentMap()->dumpTo( Ferris::Factory::fcout(), DumpAsXML ); + return 0; + } + + if( DumpIndex ) + { + if( !nidx ) + NoSupportExit("dumping index not supported for this index type"); + + fh_lexicon lex = nidx->getLexicon(); + fh_invertedfile inv = nidx->getInvertedFile(); + fh_ostream oss = Ferris::Factory::fcout(); + bool DumpAsXML = true; + + oss << "" << endl; + lex->dumpTo( oss, DumpAsXML ); + inv->dumpTo( oss, DumpAsXML ); + nidx->getDocumentMap()->dumpTo( oss, DumpAsXML ); + oss << "" << endl; + return 0; + } + + if( DumpIndexConfig ) + { + if( !nidx ) + NoSupportExit("dumping index config not supported for this index type"); + + fh_lexicon lex = nidx->getLexicon(); + fh_invertedfile inv = nidx->getInvertedFile(); + fh_docmap dm = nidx->getDocumentMap(); + fh_ostream oss = Ferris::Factory::fcout(); + + oss << "Document number gap code : " << nidx->getDocumentNumberGapCode() << endl; + oss << "Frequency of term in document code: " << nidx->getFrequencyOfTermInDocumentCode() << endl; + oss << "Lexicon class : " << nidx->getLexiconClassName() << endl; + oss << "Dropping stop words : " << nidx->getDropStopWords() << endl; + oss << "Case sensitive : " << nidx->isCaseSensitive() << endl; + oss << "Support for ranked query : " << nidx->supportsRankedQuery() << endl; + oss << "Size of chunks in inverted lists : " << nidx->getInvertedSkiplistMaxSize() << endl; + oss << endl; + std::set< docid_t > revd = dm->getRevokedDocumentIDs(); + oss << "Revoked document IDs count : " << revd.size() << endl; + oss << Util::createSeperatedList( revd.begin(), revd.end() ) << endl; + oss << endl; + oss << "Number of..." << endl; + oss << " Distinct terms : " << inv->getNumberOfTerms() << endl; + oss << " Documents : " << nidx->getDocumentMap()->size() << endl; + oss << endl; + oss << "Version of..." << endl; + oss << " Lexicon :" << nidx->getLexiconFileVersion() << endl + << " Inverted File:" << nidx->getInvertedFileVersion() << endl + << " Document Map :" << nidx->getDocumentMapFileVersion() << endl + << endl; + + + + } + + string qs = ""; + + bool virgin = true; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + if( virgin ) virgin = false; + else qs += " "; + + qs += tmpCSTR; + } + + + try + { + QueryMode mode = QUERYMODE_USERPREF; + + if( UseRanked ) + mode = QUERYMODE_RANKED; + else if( UseXapian ) + mode = QUERYMODE_XAPIAN; + else if( UseTSearch2 ) + mode = QUERYMODE_TSEARCH2; + else if( UseExternal ) + mode = QUERYMODE_EXTERNAL; + else if( UseBeagle ) + mode = QUERYMODE_BEAGLE; + else + mode = QUERYMODE_BOOLEAN; + + fh_context result = ExecuteQuery( qs, mode, idx, Limit ); + + if( Quiet ) + { + if( ShowOnlyCountOfMatches ) + { + cout << result->getSubContextCount() << endl; + exit(0); + } + } + + cout << "Found " << result->SubContextCount() + << " matches at the following locations:" << endl; + + if( mode == QUERYMODE_RANKED && !DontSortByRank ) + { + fh_context c = Ferris::Factory::MakeSortedContext( result, ":!#FLOAT:rank" ); + result = c; + } + + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["count"] = tostr(result->getSubContextCount()); + XML::writeMessage( oss, m ); + } + + for( Context::iterator ci = result->begin(); ci != result->end(); ++ci ) + { + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + string earl = (*ci)->getURL(); + m["earl"] = earl; + if( mode == QUERYMODE_RANKED ) + m["rank"] = getStrAttr( *ci, "rank", "" ); + LG_IDX_D << "Sending earl:" << earl << endl; + XML::writeMessage( oss, m ); + oss << flush; + } + else + { + if( mode == QUERYMODE_RANKED ) + { + string r = getStrAttr( *ci, "rank", "" ); + if( !r.empty() ) + cout << r << "\t"; + } + cout << (*ci)->getURL() << endl; + } + } + cout << flush; + } + catch( exception& e ) + { + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["outofband-error"] = e.what(); + XML::writeMessage( oss, m ); + } + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + catch( exception& e ) + { + if( FerrisInternalAsyncMessageSlave ) + { + fh_ostream oss = ::Ferris::Factory::fcout(); + stringmap_t m; + m["outofband-error"] = e.what(); + XML::writeMessage( oss, m ); + } + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/findexremove.cpp b/apps/fulltextindex/findexremove.cpp new file mode 100644 index 0000000..b294ad5 --- /dev/null +++ b/apps/fulltextindex/findexremove.cpp @@ -0,0 +1,142 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + findexquery command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: findexremove.cpp,v 1.3 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include +#include +#include +#include +#include "fulltextindexers_custom_plugin/libftxcustomferris.hh" + +#include +#include + +using namespace std; +using namespace Ferris; +using namespace FullTextIndex; + +const string PROGRAM_NAME = "findexremove"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + const char* IndexPath_CSTR = 0; + const char* Regex_CSTR = 0; + const char* DateSTR_CSTR = 0; + unsigned long Verbose = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "index-path", 'P', POPT_ARG_STRING, &IndexPath_CSTR, 0, + "which index to use", "" }, + + { "regex", 'r', POPT_ARG_STRING, &Regex_CSTR, 0, + "regex for URLs to remove", "" }, + + { "older-than", 'd', POPT_ARG_STRING, &DateSTR_CSTR, 0, + "remove any instances older than the given time", "now" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]*"); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 0 || !Regex_CSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + fh_idx idx; + + if( IndexPath_CSTR ) + { + idx = FullTextIndex::Factory::getFullTextIndex( IndexPath_CSTR ); + } + else + { + idx = FullTextIndex::Factory::getDefaultFullTextIndex(); + } + + time_t tt = 0; + + if( DateSTR_CSTR ) + { + std::string datestr = DateSTR_CSTR; + struct tm tm = Time::ParseTimeString( datestr ); + tt = mktime( &tm ); + } + + string theRegex = Regex_CSTR; + idx->removeDocumentsMatchingRegexFromIndex( theRegex, tt ); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/fulltextindex/inverted_file_to_html_table.xsl b/apps/fulltextindex/inverted_file_to_html_table.xsl new file mode 100644 index 0000000..28ff902 --- /dev/null +++ b/apps/fulltextindex/inverted_file_to_html_table.xsl @@ -0,0 +1,357 @@ + + + + + + + + + + + + /tmp/lexicon.dump + /tmp/index.dump + + + + + + + + + + + + + + Ferris index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index
doc weight + +
inverted list refcount (given) + +
inverted list refcount (calculated) + +
is revoked + +
term_idtermf(t)w(t)listlistavgb/avgb/ + f(d,t) + + w(d,t) +
sizecnksdocidf(d,t) + +
+
+ + +
+ + + + + + + + + + + + + + + invertedfile! + + + + term! + + + + + + + + + + + + w_d_t: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + light + dark + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/apps/head/Makefile.am b/apps/head/Makefile.am new file mode 100644 index 0000000..e61833a --- /dev/null +++ b/apps/head/Makefile.am @@ -0,0 +1,18 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fhead + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +fhead_SOURCES = fhead.cpp +fhead_LDADD = -lpopt @LIBFERRIS_LA@ + diff --git a/apps/head/Makefile.in b/apps/head/Makefile.in new file mode 100644 index 0000000..f6d1a50 --- /dev/null +++ b/apps/head/Makefile.in @@ -0,0 +1,987 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fhead$(EXEEXT) +subdir = apps/head +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fhead_OBJECTS = fhead.$(OBJEXT) +fhead_OBJECTS = $(am_fhead_OBJECTS) +fhead_DEPENDENCIES = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fhead_SOURCES) +DIST_SOURCES = $(fhead_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +fhead_SOURCES = fhead.cpp +fhead_LDADD = -lpopt @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/head/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/head/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fhead$(EXEEXT): $(fhead_OBJECTS) $(fhead_DEPENDENCIES) + @rm -f fhead$(EXEEXT) + $(CXXLINK) $(fhead_OBJECTS) $(fhead_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhead.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/head/fhead.cpp b/apps/head/fhead.cpp new file mode 100644 index 0000000..27b9dfd --- /dev/null +++ b/apps/head/fhead.cpp @@ -0,0 +1,253 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fhead + Copyright (C) 2005 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fhead.cpp,v 1.3 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * + * + * + * + * +*/ + + +#include +#include +#include + +#ifdef STLPORT +#else +#include +using namespace __gnu_cxx; +#endif + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fhead"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +unsigned long Verbose = 0; +unsigned long Quiet = 0; +long FirstBytes = 0; +long FirstLines = 10; +//const char* SourceAttrName = "content"; + + +int main( int argc, char** argv ) +{ + int exit_status = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "quiet", 'q', POPT_ARG_NONE, &Quiet, 0, + "never print headers giving file names", "" }, + { "silent", 0, POPT_ARG_NONE, &Quiet, 0, + "never print headers giving file names", "" }, + + { "bytes", 'c', POPT_ARG_INT, &FirstBytes, 0, + "print the first N bytes of each file. With leading '-' print all but last N bytes.", "" }, + + { "lines", 'n', POPT_ARG_INT, &FirstLines, 0, + "print the first N lines of each file. With leading '-' print all but last N lines.", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 1) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + stringlist_t srcs; + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + string srcURL = tmpCSTR; + srcs.push_back( srcURL ); + } + if( srcs.empty() ) + { + srcs.push_back("-"); + } + + int srcs_sz = srcs.size(); + fh_ostream oss = Factory::MakeFdOStream( STDOUT_FILENO ); + for( stringlist_t::const_iterator si = srcs.begin(); si != srcs.end(); ++si ) + { + string earl = *si; + + if( srcs_sz > 1 && !Quiet ) + { + oss << "==> " << earl << " <==" << endl; + } + +// streamsize filesz = -1; + fh_istream iss; + if( earl == "-" ) + { + iss = Factory::MakeFdIStream( STDIN_FILENO ); + } + else + { + fh_context c = Resolve( earl ); + iss = c->getIStream(); +// streamsize filesz = toType(getStrAttr( c, "size", "", true, true )); + } + + if( FirstBytes != 0 ) + { + char ch = 0; + + if( FirstBytes > 0 ) + { +// copy_n( istreambuf_iterator(iss), min( filesz, FirstBytes ), +// ostreambuf_iterator(oss)); + + for( int i = 0; i < FirstBytes; ++i ) + { + if( !(iss >> noskipws >> ch) ) break; + if( !(oss << ch) ) exit( 1 ); + } + oss << flush; + } + else + { +// fh_istream limitedss = Factory::MakeLimitingIStream( iss, 0, filesz + FirstBytes ); +// copy( istreambuf_iterator(limitedss), istreambuf_iterator(), +// ostreambuf_iterator(oss)); +// oss << flush; + + typedef list< char > buffer_t; + buffer_t buffer; + for( int i = 0; i < (-1*FirstBytes); ++i ) + { + if( !(iss >> noskipws >> ch) ) + break; + + buffer.push_back( ch ); + } + if( buffer.size() < (-1*FirstBytes) ) + continue; + + while( iss >> noskipws >> ch ) + { + buffer.push_back( ch ); + ch = buffer.front(); + buffer.pop_front(); + oss << ch; + } + oss << flush; + + } + } + else + { + string s; + if( !FirstLines ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if( FirstLines > 0 ) + { + for( int i = 0; i < FirstLines; ++i ) + { + if( !getline( iss, s ) ) + { + oss << flush; + continue; + } + + oss << s << nl; + } + oss << flush; + } + else + { + stringlist_t buffer; + for( int i = 0; i < (-1*FirstLines); ++i ) + { + getline( iss, s ); + buffer.push_back( s ); + } + while( getline( iss, s ) ) + { + buffer.push_back( s ); + s = buffer.front(); + buffer.pop_front(); + oss << s << endl; + } + oss << flush; + } + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/importdesktop/Makefile.am b/apps/importdesktop/Makefile.am new file mode 100644 index 0000000..176900d --- /dev/null +++ b/apps/importdesktop/Makefile.am @@ -0,0 +1,26 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = dot-desktop-files + +bin_PROGRAMS = ferris-import-desktop-file + +bin_SCRIPTS = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.sh + + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_import_desktop_file_SOURCES = ferris-import-desktop-file.cpp +ferris_import_desktop_file_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_import_desktop_file_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/importdesktop/Makefile.in b/apps/importdesktop/Makefile.in new file mode 100644 index 0000000..fd0541a --- /dev/null +++ b/apps/importdesktop/Makefile.in @@ -0,0 +1,1208 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-import-desktop-file$(EXEEXT) +subdir = apps/importdesktop +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_import_desktop_file_OBJECTS = \ + ferris-import-desktop-file.$(OBJEXT) +ferris_import_desktop_file_OBJECTS = \ + $(am_ferris_import_desktop_file_OBJECTS) +ferris_import_desktop_file_DEPENDENCIES = +ferris_import_desktop_file_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_import_desktop_file_LDFLAGS) $(LDFLAGS) -o $@ +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_import_desktop_file_SOURCES) +DIST_SOURCES = $(ferris_import_desktop_file_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = dot-desktop-files +bin_SCRIPTS = $(srcdir)/*.sh +EXTRA_DIST = $(srcdir)/*.sh +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_import_desktop_file_SOURCES = ferris-import-desktop-file.cpp +ferris_import_desktop_file_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_import_desktop_file_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/importdesktop/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/importdesktop/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-import-desktop-file$(EXEEXT): $(ferris_import_desktop_file_OBJECTS) $(ferris_import_desktop_file_DEPENDENCIES) + @rm -f ferris-import-desktop-file$(EXEEXT) + $(ferris_import_desktop_file_LINK) $(ferris_import_desktop_file_OBJECTS) $(ferris_import_desktop_file_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-import-desktop-file.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-binSCRIPTS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/importdesktop/dot-desktop-files/Graphics/Makefile.am b/apps/importdesktop/dot-desktop-files/Graphics/Makefile.am new file mode 100644 index 0000000..990b26a --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Graphics/Makefile.am @@ -0,0 +1,10 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +DESKTOP_FILES = $(srcdir)/*.desktop +EXTRA_DIST = $(DESKTOP_FILES) +DESKTOP_INSTALL_DIR = @DESKTOP_FILE_DIR@/Graphics + +desktopdir = $(DESKTOP_INSTALL_DIR) +desktop_DATA = $(DESKTOP_FILES) diff --git a/apps/importdesktop/dot-desktop-files/Graphics/Makefile.in b/apps/importdesktop/dot-desktop-files/Graphics/Makefile.in new file mode 100644 index 0000000..9a81dd0 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Graphics/Makefile.in @@ -0,0 +1,875 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/importdesktop/dot-desktop-files/Graphics +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(desktopdir)" +DATA = $(desktop_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +DESKTOP_FILES = $(srcdir)/*.desktop +EXTRA_DIST = $(DESKTOP_FILES) +DESKTOP_INSTALL_DIR = @DESKTOP_FILE_DIR@/Graphics +desktopdir = $(DESKTOP_INSTALL_DIR) +desktop_DATA = $(DESKTOP_FILES) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Graphics/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Graphics/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(desktopdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-desktopDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-desktopDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-desktopDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/importdesktop/dot-desktop-files/Graphics/entice.desktop b/apps/importdesktop/dot-desktop-files/Graphics/entice.desktop new file mode 100644 index 0000000..a5c6ba2 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Graphics/entice.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=entice +Comment=entice +Exec=entice +Icon=icons://entice.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Graphics/feh.desktop b/apps/importdesktop/dot-desktop-files/Graphics/feh.desktop new file mode 100644 index 0000000..c5bbdf7 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Graphics/feh.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=feh +Comment=feh +Exec=feh +Icon=icons://feh.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Graphics/slideshow.desktop b/apps/importdesktop/dot-desktop-files/Graphics/slideshow.desktop new file mode 100644 index 0000000..193dbb2 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Graphics/slideshow.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=slideshow +Comment=slideshow using feh +Exec=feh -FZ +Icon=icons://feh.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Makefile.am b/apps/importdesktop/dot-desktop-files/Makefile.am new file mode 100644 index 0000000..7b64bbf --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Makefile.am @@ -0,0 +1,6 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = Graphics Multimedia + diff --git a/apps/importdesktop/dot-desktop-files/Makefile.in b/apps/importdesktop/dot-desktop-files/Makefile.in new file mode 100644 index 0000000..883c578 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Makefile.in @@ -0,0 +1,1025 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/importdesktop/dot-desktop-files +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = Graphics Multimedia +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.am b/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.am new file mode 100644 index 0000000..4607071 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.am @@ -0,0 +1,10 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +DESKTOP_FILES = $(srcdir)/*.desktop +EXTRA_DIST = $(DESKTOP_FILES) +DESKTOP_INSTALL_DIR = @DESKTOP_FILE_DIR@/Multimedia + +desktopdir = $(DESKTOP_INSTALL_DIR) +desktop_DATA = $(DESKTOP_FILES) diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.in b/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.in new file mode 100644 index 0000000..0ba7404 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/Makefile.in @@ -0,0 +1,875 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/importdesktop/dot-desktop-files/Multimedia +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(desktopdir)" +DATA = $(desktop_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +DESKTOP_FILES = $(srcdir)/*.desktop +EXTRA_DIST = $(DESKTOP_FILES) +DESKTOP_INSTALL_DIR = @DESKTOP_FILE_DIR@/Multimedia +desktopdir = $(DESKTOP_INSTALL_DIR) +desktop_DATA = $(DESKTOP_FILES) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Multimedia/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/importdesktop/dot-desktop-files/Multimedia/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(desktopdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-desktopDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-desktopDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-desktopDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-fullscreen.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-fullscreen.desktop new file mode 100644 index 0000000..8dea8d4 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-fullscreen.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer fullscreen +Comment=Whole display play +Exec=mplayer -fs -pp 8 +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-nosound.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-nosound.desktop new file mode 100644 index 0000000..0137cb6 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-nosound.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer NOSOUND +Comment=Play any animation known to man +Exec=mplayer -pp 8 -nosound +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-wide.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-wide.desktop new file mode 100644 index 0000000..ef24d47 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-wide.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer widescreen +Comment=16:9 ani view +Exec=mplayer -aspect 16:9 -pp 8 +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x2.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x2.desktop new file mode 100644 index 0000000..ae9eaff --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x2.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer x2 +Comment=2 fold scaled play +Exec=mplayer -xy 2 -pp 8 +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x3.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x3.desktop new file mode 100644 index 0000000..32b0399 --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer-x3.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer x3 +Comment=3 fold scaled play +Exec=mplayer -xy 3 -pp 8 +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/dot-desktop-files/Multimedia/mplayer.desktop b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer.desktop new file mode 100644 index 0000000..274760d --- /dev/null +++ b/apps/importdesktop/dot-desktop-files/Multimedia/mplayer.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=MPlayer +Comment=Play any animation known to man +Exec=mplayer -pp 8 +Icon=icons://mplayer.png +Terminal=0 +Type=Application + diff --git a/apps/importdesktop/ferris-generate-gnome-menu.sh b/apps/importdesktop/ferris-generate-gnome-menu.sh new file mode 100755 index 0000000..4622d69 --- /dev/null +++ b/apps/importdesktop/ferris-generate-gnome-menu.sh @@ -0,0 +1,307 @@ +#!/bin/sh +# +# This file is based on e_gen_gnome_menu from e16. +# +# +############################################################################### +# generates a file.menu format for Enlightenment out of a GNOME menu hierarchy# +# +# Copyright (C) 1999 Carsten Haitzler, Geoff Harrison and various contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies of the Software, its documentation and marketing & publicity +# materials, and acknowledgment shall be given in the documentation, materials +# and software packages that this Software was used. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +############################################################################### + +# setup variables +BASE=$1; +OUTDB=${2:-~/.ferris/apps.db}; +DIR=${3:-${ADIR}}; + +find_app_base_dir() { + ADIR="`gnome-config --prefix`/share/gnome/apps" + if [ ! -d "$ADIR" ]; then + ADIR="/usr/share/gnome/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/usr/share/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/usr/local/share/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/usr/gnome/share/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/usr/local/gnome/share/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/opt/gnome/share/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/opt/gnome/share/gnome/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/usr/X11R6/share/gnome/apps" + else + return + fi + if [ ! -d "$ADIR" ]; then + ADIR="/opt/local/share/apps" + else + return + fi +} + +find_icon_base_dir() { + IDIR="`gnome-config --prefix`/share/pixmaps" + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/share/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/share/gnome/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/local/share/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/gnome/share/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/local/gnome/share/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/opt/gnome/share/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/opt/gnome/share/gnome/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/usr/X11R6/share/gnome/pixmaps" + else + return + fi + if [ ! -f "${IDIR}/gnome-help.png" ]; then + IDIR="/opt/local/share/pixmaps" + else + return + fi +} + +find_app_base_dir +# echo "ADIR: $ADIR" +DIR=${3:-${ADIR}}; +# echo "DIR: $DIR " +# echo "BASE: $BASE" +# echo "OUTDB: $OUTDB" + +if [ -z "$BASE" ]; then + BASE=$DIR; +fi; + + +# In most cases I believe the icons can be found in the directory that is +# ../../pixmaps from $ADIR. +find_icon_base_dir +GICONDIR="$IDIR" + +# if the apps dir doesn't exist in the end then exit +if [ ! -d "$DIR" ]; then + echo "import directory doesn't exist: $DIR" + exit +fi +# if the destination dir doesnt exist - create it +if [ ! -d "~/.ferris" ]; then + mkdir -p "~/.ferris" +fi + +# function to check its a GNOME desktop file +is_desktop() { + VAL="`grep "\[Desktop Entry\]" $1`" + if [ -n "$VAL" ]; then + IS_DESKTOP_RESULT="`awk -F= 'BEGIN { n="" } END { printf("%s", n) } $1 ~ "^Name\\\['$LANG'\\\]" {n=$2;exit} $1 ~ "^Name$" {n=$2}' $1`" + if [ -n "$IS_DESKTOP_RESULT" ]; then + return 0 + fi + fi + IS_DESKTOP_RESULT="" + return 1 +} + +# function to get the sortorder list -if there is one +get_sortorder() { + if [ -f "${1}/.order" ]; then + VAL="`awk '{printf("%s ", $1);}' $1"/.order" | sed 's/,/ /g'`" + else + VAL="" + fi + GET_SORT_ORDER_RESULT="$VAL" + for I in `/bin/ls "$1"`; do + IS_IN="n" + for J in $VAL; do + if [ "$J" = "$I" ]; then + IS_IN="y" + continue 2 + fi + done + GET_SORT_ORDER_RESULT="${GET_SORT_ORDER_RESULT}${I} " + done + return 0 +} + +get_icon() { + VAL2="`awk -F= '$1 ~ "^Icon$" {printf("%s", $2); exit;}' $1`" + if [ -z "$VAL2" ]; then + GET_ICON_RETURN="" + return 1 + fi + + # If we have "convert" and the icon havsn't already been scaled down, scale + # it down now! + + GET_ICON_RETURNDIR="${ODIR}/gnome_icons" +# if [ ! -d "$GET_ICON_RETURNDIR" ];then +# mkdir "$GET_ICON_RETURNDIR" +# fi + + # The "Icon" entery can contain an absolute path, if it does forget the + # $GICONDIR + VAL3="`echo $VAL2 | grep /`" + if [ "$VAL3" != "$VAL2" ];then + if [ -n "$VAL2" ]; then + GICON="$GICONDIR/$VAL2" + GET_ICON_RETURN="$GET_ICON_RETURNDIR/$VAL2" + fi + else + if [ -n "$VAL3" ]; then + GICON="$VAL3" + GET_ICON_RETURN="$GET_ICON_RETURNDIR/`basename "$VAL3"`" + fi + fi + + GET_ICON_RETURN=$GICON; + +# if [ -n "$CONVERT_CMD" -a -n "$GICON" -a -f "$GICON" -a ! \ +# -f "$GET_ICON_RETURN" ]; then +# "$CONVERT_CMD" "$GICON" -geometry 16x16 "$GET_ICON_RETURN" +# fi + + return 0 +} + +get_exec() { + GET_EXEC_RETURN="`awk -F= '$1 ~ "^Exec$" {printf("%s", $2);}' $1`" + if [ -z "$GET_EXEC_RETURN" ]; then + GET_EXEC_RETURN="" + return 1 + fi + return 0 +} + +E_TITLE="" + +ORDER="" +# if a .directory file exists - read it +F=$DIR"/.directory" +if [ -f $F ]; then + is_desktop $F + NAME="$IS_DESKTOP_RESULT" + if [ -n "$NAME" ]; then + E_TITLE="$NAME" + fi +fi + +get_sortorder "$DIR" +ORDER="$GET_SORT_ORDER_RESULT" + +# print the menu title +echo \"Importing $E_TITLE\" +# echo "ORDER: $ORDER" + +# for every subdir in the dir list or order - import it +for F in $ORDER; do + FF="${DIR}/${F}" + IMPORTPATH="${FF#$BASE}" + IMPORTPATH="${IMPORTPATH##/}" + + if [ -d "$FF" ]; then + FFF="${FF}/.directory" + if [ -f "$FFF" ]; then + is_desktop "$FFF" + NAME="$IS_DESKTOP_RESULT" + else + NAME="`echo $F | sed 's/_/ /g'`" + fi + FFF="${ODIR}/${BASE}" +# if [ ! -d "$FFF" ]; then +# mkdir "$FFF" +# fi + MFILE="${FFF}/${F}.menu" + +# echo "$0" "${BASE}/${F}" "$ODIR" "$MFILE" "${DIR}/${F}" +# "$0" "${BASE}/${F}" "$ODIR" "$MFILE" "${DIR}/${F}" + echo "$0 $BASE $OUTDB ${DIR}/${F} path:$IMPORTPATH" + "$0" "$BASE" "$OUTDB" "${DIR}/${F}" + get_icon "${FF}/.directory" + ICO="$GET_ICON_RETURN" + echo "\"$NAME\" \"$ICO\" menu \"$MFILE\"" + else + if [ -r "$FF" ]; then + is_desktop $FF + NAME="$IS_DESKTOP_RESULT" + if [ -n "$NAME" ]; then + IMPORTPATH=`dirname $IMPORTPATH`; + get_exec "$FF" + EXE="$GET_EXEC_RETURN" + get_icon "$FF" + ICO="$GET_ICON_RETURN" +# echo "OUT: $OUT" + echo "desktop=\"${FF}\" name=\"$NAME\" icon=\"$ICO\" exec=\"$EXE\" path=\"$IMPORTPATH\"" + ferris-import-desktop-file -p -d "$OUTDB/$IMPORTPATH" "${FF}" + fi + fi + fi +done diff --git a/apps/importdesktop/ferris-import-desktop-file.cpp b/apps/importdesktop/ferris-import-desktop-file.cpp new file mode 100644 index 0000000..07e768b --- /dev/null +++ b/apps/importdesktop/ferris-import-desktop-file.cpp @@ -0,0 +1,124 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-import-desktop-file.cpp,v 1.3 2010/09/24 21:31:17 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-import-desktop-file"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +int main( int argc, char** argv ) +{ + try + { + const char* DstNameCSTR = 0; + unsigned long Verbose = 0; + unsigned long MakeTargetDirectory = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "target-directory", 'd', POPT_ARG_STRING, &DstNameCSTR, 0, + "Explicitly specify where in the apps tree to import to", "Applications" }, + + { "create-target-directory", 'p', POPT_ARG_NONE, &MakeTargetDirectory, 0, + "create target-directory if it doesn't exist already", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + while( const char* pathCSTR = poptGetArg(optCon) ) + { + string path = pathCSTR; + + try + { + fh_context c = Resolve( path ); + + if( DstNameCSTR ) + { + if( MakeTargetDirectory ) + { + fh_context c = Shell::acquireContext( DstNameCSTR ); + } + + fh_context destc = Resolve( DstNameCSTR ); + importDesktopFileTo( destc, c ); + } + else + { + importDesktopFile( c ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return 0; +} + + diff --git a/apps/importdesktop/ferris-import-desktop-hive.sh b/apps/importdesktop/ferris-import-desktop-hive.sh new file mode 100755 index 0000000..6da61e1 --- /dev/null +++ b/apps/importdesktop/ferris-import-desktop-hive.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# +# +# Import a whole hive of .desktop files +# +# + +hiveroot=${1:-/etc/X11/applnk}; + +for if in `find ${hiveroot} -type f -name "*.desktop" ` +do + echo Importing file $if; + ferris-import-desktop-file $if; +done diff --git a/apps/libferris-googleearth b/apps/libferris-googleearth new file mode 100755 index 0000000..63a15ea --- /dev/null +++ b/apps/libferris-googleearth @@ -0,0 +1,11 @@ +#!/bin/bash + +export LIBFERRISBROWSER="$BROWSER" +export BROWSER=~/bin/libferris-googleearth-bouncer.pl +if [ ! -f $BROWSER ]; then + export BROWSER=/usr/local/bin/libferris-googleearth-bouncer.pl +fi + +#echo $BROWSER +googleearth "$@" + diff --git a/apps/libferris-googleearth-bouncer.pl b/apps/libferris-googleearth-bouncer.pl new file mode 100755 index 0000000..a95b552 --- /dev/null +++ b/apps/libferris-googleearth-bouncer.pl @@ -0,0 +1,104 @@ +#!/usr/bin/perl -w + +print "libferris-googleearth-bouncer.pl called!\n"; +$cmd=$ARGV[0]; +print "cmd:$cmd\n"; +if( $cmd =~ s|^file:///LIBFERRIS-SEARCH-EMBLEM-BY-ID(.*)|$1|) + { + $sidePanelToShow = ""; + $radius = 0; + $majorMime = ""; + @extraColumnsToView = ("size-human-readable","mtime-display"); + + $cmd = lc( $cmd ); + print "TOP cmd:$cmd\n"; + + if( $cmd =~ s@^-radius([0-9]+)([%-].*)$@$1,$2@) { + print "OO cmd:$cmd\n"; + ($radius,$cmd) = split /,/, $cmd; + print "R radius:$radius cmd:$cmd\n"; + } + + if( $cmd =~ s@^-(image|video|text)-only%20([0-9]+)$@$1,$2@) { + ($majorMime,$emblemid) = split /,/, $cmd; + } + if( $cmd =~ s|^%20([0-9]+)$|$1|) { + $emblemid = $cmd; + } + + if( $emblemid =~ m/^$/ ) { + print "No emblem ID found!\n"; + exit; + } + + if( $radius > 0 ) { + @emblemlist = split /,/, `ferris-get-emblems-within-range -i $emblemid -A $radius -O $radius -k`; + } + + + print "ok emblem:$emblemid majorMime:$majorMime\n"; + $cmd = "(ego-read-dir \"eaq://(emblem:id-$emblemid==1)\")"; + + $q = ""; + if( length $majorMime ) { + $t = "image"; + if( $majorMime eq "video" ) { + $t = "animation"; + $sidePanelToShow = "HotActions"; + push @extraColumnsToView, ("width","height"); + } + if( $majorMime eq "image" ) { + $t = "image"; + $sidePanelToShow = "HotActions"; + push @extraColumnsToView, ("width","height"); + } + if( $majorMime eq "text" ) { + $q = $q . "(&(!(is-animation-object==1)(is-image-object==1)(is-audio-object==1))"; + } + else { + $q = $q . "(&(is-$t-object==1)"; + } + } + if( scalar(@emblemlist) > 0 ) { + $q = $q . "(|"; + foreach $emblemid (@emblemlist) { + chomp ($emblemid); + $q = $q . "(emblem:id-$emblemid==1)"; + } + $q = $q . ")"; + } + else { + $q = $q . "(emblem:id-$emblemid==1)"; + } + if( length $majorMime ) { + $q = $q . ")"; + } + + $cmd = "(define gec ( new-cview \"GTreeView\" ))\n"; + $cmd = $cmd . "(cview-set-root-url gec \"eaq://$q\")\n"; + foreach $col ( @extraColumnsToView ) { + $cmd = $cmd . "(cview-addColumn gec \"$col\")\n"; + } + if( length $sidePanelToShow > 0 ) { + $cmd = $cmd . "(cview-show-sidepanel-page gec \"$sidePanelToShow\")\n"; + } + $cmd = $cmd . "(cview-set-visible gec #t )\n"; + + print "extraColumnsToView:@extraColumnsToView\n"; + print $cmd; + open( EGO, "| Ego-send-command" ); + print EGO "$cmd\n"; + } +else + { + $brow = $ENV{LIBFERRISBROWSER}; + if( $brow =~ m/^$/ ) { + print "no browser set!\n"; + $brow="firefox"; + } + print "browser:$brow\n"; + $flatarg = join " ", @ARGV; + print "flat:$flatarg\n"; + system "$brow $flatarg"; + } +print "CALLED WITH @ARGV" #>>/tmp/outtt diff --git a/apps/ls/Makefile.am b/apps/ls/Makefile.am new file mode 100644 index 0000000..3bb40d4 --- /dev/null +++ b/apps/ls/Makefile.am @@ -0,0 +1,21 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferrisls + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferrisls_SOURCES = ls.cpp +ferrisls_LDADD = -lpopt @LIBFERRIS_LA@ +ferrisls_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/ls/Makefile.in b/apps/ls/Makefile.in new file mode 100644 index 0000000..eda113c --- /dev/null +++ b/apps/ls/Makefile.in @@ -0,0 +1,993 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferrisls$(EXEEXT) +subdir = apps/ls +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferrisls_OBJECTS = ls.$(OBJEXT) +ferrisls_OBJECTS = $(am_ferrisls_OBJECTS) +ferrisls_DEPENDENCIES = +ferrisls_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferrisls_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferrisls_SOURCES) +DIST_SOURCES = $(ferrisls_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferrisls_SOURCES = ls.cpp +ferrisls_LDADD = -lpopt @LIBFERRIS_LA@ +ferrisls_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/ls/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/ls/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferrisls$(EXEEXT): $(ferrisls_OBJECTS) $(ferrisls_DEPENDENCIES) + @rm -f ferrisls$(EXEEXT) + $(ferrisls_LINK) $(ferrisls_OBJECTS) $(ferrisls_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/ls/ls.cpp b/apps/ls/ls.cpp new file mode 100644 index 0000000..f63baca --- /dev/null +++ b/apps/ls/ls.cpp @@ -0,0 +1,1338 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris ls + Copyright (C) 2001 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ls.cpp,v 1.16 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ +/* + + +FIXME: -a and -A are the same as there are no . and .. fake contexts created + at the moment. + + + +Note that this command will show you what types of filesystem your Ferris (TM) +can access. + +./tests/ls/ls --root-context-class=Context / --show-columns=name --record-seperator=" " --seperate-each-context-with-new-line --hide-headings + + + + +The following are some fileutils 'ls' to Ferrisls conversions. + + +ls /tmp/test + ./tests/ls/ls --show-columns=name /tmp/test --field-seperator=" " --record-seperator=" " --seperate-each-context-with-new-line --hide-headings + + +ls -l /tmp/test +./tests/ls/ls --show-columns=protection-raw,block-count,user-owner-number,group-owner-number,size,atime-ctime,name /tmp/test --field-seperator=" " + + +./tests/ls/ls --show-columns=size,name,sha1 /tmp/test --field-seperator=" " --columns-widths=8,15,40,15 --fill-char='x' --seperate-each-context-with-new-line + + + +*/ + + + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + +using namespace std; +using namespace Ferris; + +#define DEBUG 0 + +const string PROGRAM_NAME = "ls"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +string subst( string s, const string& oldv, const string& newv ) +{ + string::size_type loc = s.find( oldv ); + while( loc != string::npos ) + { + s = s.replace( loc, oldv.length(), newv ); + loc = s.find( oldv ); + } + return s; +} + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +#include +//#include + +int main( int argc, const char** argv ) +{ + LG_JOURNAL_D << " debug! " << endl; + LG_JOURNAL_I << " info! " << endl; + + Ferrisls ls; + +// fh_etagere et = Factory::getEtagere(); +// cerr << "calling et sync!" << endl; +// et->sync(); +// cerr << "DONE calling et sync!" << endl; +// cerr << "------------------------------------" << endl; + +// cerr << "Loading smushes" << endl; +// redlandea::fh_TreeSmushing sm = redlandea::getDefaultImplicitTreeSmushing(); +// cerr << "Saving smushes" << endl; +// sm->sync(); +// cerr << "syncing done!" << endl; + +// { +// string earl = "~/.ego/history.db/ea-dir"; +// string rdn = "cursor-object-always-remake"; + +// fh_context c = Resolve( earl ); +// fh_attribute a = c->getAttribute( rdn ); +// fh_iostream ss = a->getIOStream(); +// cerr << StreamToString(ss) << endl; +// cerr << "ok" << endl; +// exit(0); +// } + + + + const char* ShowColumnsDefault= "name"; + const char* ShowColumnsCSTR = ShowColumnsDefault; + const char* AppendShowColumnsRegexCSTR = 0; + const char* ColumnsWidthsCSTR= 0; + const char* FieldSeperator = " "; + const char* RecordSeperator = "\n"; + const char* RootNameCSTR = 0; + const char* NoSuchAttributeIndicator = " "; + const char* FilterStringCSTR = 0; + const char* SortStringDefault= "name"; + const char* SortStringCSTR = SortStringDefault; + unsigned long HideHeadings = 1; + unsigned long ShowHeadings = 0; + const char* ContextSeperator = ""; + unsigned long SeperateEachContextWithNewLine = 0; + const char* FillString = " "; + unsigned long ShowContextNameInHeading = 0; + unsigned long HideContextNameInHeading = 0; + unsigned long ShowAllAttributes = 0; + unsigned long ListDirectoryNodeOnly = 0; + unsigned long NoImplicitListDirectoryNodeOnly = 0; + unsigned long ForceReadRootDirectoryNodes = 0; + unsigned long RecursiveList = 0; + unsigned long MonitorCreate = 0; + unsigned long MonitorDelete = 0; + unsigned long MonitorChange = 0; + unsigned long MonitorAll = 0; + unsigned long ShowRecommendedEA = 0; + unsigned long ShowNameAndEANamesOnly = 0; + + /* + * Fileutils ls like options + */ + unsigned long SortByMTime = 0; + unsigned long LongList = 0; + unsigned long XMLList = 0; + unsigned long XMLListElements = 0; + unsigned long XMLListRAW = 0; + unsigned long XMLListXSLTFSDebug = 0; + unsigned long RDFList = 0; + unsigned long DiredList = 0; + unsigned long CSVList = 0; + unsigned long HorizList = 0; + unsigned long VerticalList = 0; + unsigned long LongListNoGroup = 0; + unsigned long HideGroupInfo = 0; + unsigned long NoSort = 0; + unsigned long SortByVersion = 0; + unsigned long SortByExtension = 0; + unsigned long SortByATime = 0; + unsigned long SortByCTime = 0; + unsigned long HumanReadableSizes = 0; + unsigned long SortByFileSize = 0; + unsigned long ReverseSort = 0; + unsigned long ShowAllFiles = 0; + unsigned long ShowAlmostAllFiles = 0; + unsigned long IgnoreBackupFiles = 0; + unsigned long OptionMinusF = 0; + unsigned long ShowFullTime = 0; + unsigned long ShowINode = 0; + unsigned long ShowNumericUIDGID = 0; + unsigned long FullClassify = 0; + unsigned long Classify = 0; + unsigned long ClassifyDirs = 0; + unsigned long QuoteName = 0; + unsigned long ShowNonPrintableNameAsOctal = 0; + unsigned long ShowNonPrintableNameAsQ = 0; + unsigned long ShowNonPrintableName = 0; + unsigned long LongListNameOnly = 0; + + unsigned long ShowSELinuxContext = 0; + unsigned long ShowSELinuxContextLong = 0; + + unsigned long ConsoleWidth = 0; + unsigned long HideXMLDeclaration = 0; + + const char* QuoteNameSelectCSTR= 0; + const char* IndicatorStyleCSTR = 0; + const char* SortByCSTR = 0; + const char* ShowTimeCSTR = 0; + const char* FormatDisplayCSTR = 0; + const char* DontDescendRegexCSTR = 0; + + unsigned long ShowVersion = 0; + + const char* EAIndexPath_CSTR = 0; + + unsigned long OutputPrecision = 0; + + struct poptOption optionsTable[] = { + + { "show-columns", 0, POPT_ARG_STRING, &ShowColumnsCSTR, 0, + "Same as --show-ea", + "size,mimetype,name" }, + + { "append-ea-regex", 0, POPT_ARG_STRING, &AppendShowColumnsRegexCSTR, 0, + "regex for attributes to also show. handy for showing a namespace.", + "" }, + + + { "show-ea", 0, POPT_ARG_STRING, &ShowColumnsCSTR, 0, + "A comma seperated list of EA to show in the order listed", + "size,mimetype,name" }, + + { "columns-widths", 0, POPT_ARG_STRING, &ColumnsWidthsCSTR, 0, + "A comma seperated list of widths of each column in show-columns." + "0 is unlimited length", "6,6,8,15,0" }, + + { "field-seperator", 0, POPT_ARG_STRING, &FieldSeperator, 0, + "The seperator to use between attributes", " " }, + + { "record-seperator", 0, POPT_ARG_STRING, &RecordSeperator, 0, + "The seperator to use between contexts", "\\n" }, + + { "hide-headings", 0, POPT_ARG_NONE, &HideHeadings, 0, + "Prohibit the display of column headings", 0 }, + + { "show-headings", 0, POPT_ARG_NONE, &ShowHeadings, 0, + "Display column headings", 0 }, + + { "show-context-name-in-heading", 0, POPT_ARG_NONE, &ShowContextNameInHeading, 0, + "Show the context name that is being listed in the heading", 0 }, + + { "hide-context-name-in-heading", 0, POPT_ARG_NONE, &HideContextNameInHeading, 0, + "Hide the context name from heading even in -R mode", 0 }, + + { "seperate-each-context-with-new-line", 0, POPT_ARG_NONE, + &SeperateEachContextWithNewLine, 0, + "Seperate each context with an extra newline", 0 }, + + { "context-seperator", 0, POPT_ARG_STRING, &ContextSeperator, 0, + "Data to be printed after the display of each context", "" }, + + { "fill-char", 0, POPT_ARG_STRING, &FillString, 0, + "Padding char to fill out small columns with", "' '" }, + + { "force-read-root-dir-nodes", 0, POPT_ARG_NONE, + &ForceReadRootDirectoryNodes, 0, + "Always read the context given on cmd line." + "Handy in use with -d to force EA generation", 0 }, + + { "no-such-attribute-indicator", 0, POPT_ARG_STRING, + &NoSuchAttributeIndicator, 0, + "Item to print when EA is not available for a context", " " }, + + { "ferris-filter", 0, POPT_ARG_STRING, &FilterStringCSTR, 0, + "an LDAP filter string to apply to contexts to match", + "(name=fred*)" }, + + { "ferris-sort", 0, POPT_ARG_STRING, &SortStringCSTR, 0, + "a sorting predicate", + "name" }, + + { "monitor-create", 0, POPT_ARG_NONE, &MonitorCreate, 0, + "Monitor the given context for changes.", 0 }, + + { "monitor-delete", 0, POPT_ARG_NONE, &MonitorDelete, 0, + "Monitor the given context for changes.", 0 }, + + { "monitor-change", 0, POPT_ARG_NONE, &MonitorChange, 0, + "Monitor the given context for changes.", 0 }, + + { "monitor-all", 0, POPT_ARG_NONE, &MonitorAll, 0, + "Monitor the given context for changes on all event types.", 0 }, + + { "show-recommended-ea", '0', POPT_ARG_NONE, &ShowRecommendedEA, 0, + "Show the EA that is recommended by the context itself.", 0 }, + + { "show-name-and-ea-names", '7', POPT_ARG_NONE, &ShowNameAndEANamesOnly, 0, + "equal to --show-columns=name,ea-names", 0 }, + + { "xml", '2', POPT_ARG_NONE, &XMLList, 0, + "Show output as XML", 0 }, + + { "rdf", '3', POPT_ARG_NONE, &RDFList, 0, + "Show output as RDF/XML", 0 }, + + { "xmle", '4', POPT_ARG_NONE, &XMLListElements, 0, + "Show output as XML with full data in elements", 0 }, + + { "xmlraw", 0, POPT_ARG_NONE, &XMLListRAW, 0, + "Show output as XML using specialized adhoc serialization", 0 }, + + { "xml-xsltfs-debug", 0, POPT_ARG_NONE, &XMLListXSLTFSDebug, 0, + "Show output as XML in the style that xsltfs:// would expect an input filesystem", 0 }, + + { "hide-xml-declaration", 0, POPT_ARG_NONE, &HideXMLDeclaration, 0, + "do not show initial declaration", 0 }, + + + /* + * Fileutils ls like options + */ + { 0, '1', POPT_ARG_NONE, &LongListNameOnly, 0, + "list one file per line", 0 }, + + { "all", 'a', POPT_ARG_NONE, &ShowAllFiles, 0, + "do not hide entries starting with .", 0 }, + + { "almost-all", 'A', POPT_ARG_NONE, &ShowAlmostAllFiles, 0, + "do not list implied . and ..", 0 }, + + { "escape", 'b', POPT_ARG_NONE, &ShowNonPrintableNameAsOctal, 0, + "print octal escapes for nongraphic characters", 0 }, + + { "ignore-backups", 'B', POPT_ARG_NONE, &IgnoreBackupFiles, 0, + "do not list implied entries ending with ~", 0 }, + + { 0, 'C', POPT_ARG_NONE, &VerticalList, 0, + "list entries by columns", 0 }, + + { "sort-by-ctime", 'c', POPT_ARG_NONE, &SortByCTime, 0, + "with -lt: sort by, and show, ctime (time of last " + "modification of file status information). " + "with -l: show ctime and sort by name" + "otherwise: sort by ctime", 0 }, + + { "directory", 'd', POPT_ARG_NONE, + &ListDirectoryNodeOnly, 0, + "list directory entries instead of contents", 0 }, + + { "no-auto-directory-mode", 0, POPT_ARG_NONE, + &NoImplicitListDirectoryNodeOnly, 0, + "Don't imply -d for files", 0 }, + + { "dired", 'D', POPT_ARG_NONE, &DiredList, 0, + "generate output designed for Emacs' dired mode", 0 }, + + { 0, 'f', POPT_ARG_NONE, &OptionMinusF, 0, + "do not sort, enable -aU, disable -lst", 0 }, + + { "classify", 'F', POPT_ARG_NONE, &FullClassify, 0, + "append indicator (one of */=@|) to entries", 0 }, + + { "classify-directories", 0, POPT_ARG_NONE, &ClassifyDirs, 0, + "append '/' indicator to directories", 0 }, + + { "format", 0, POPT_ARG_NONE, &FormatDisplayCSTR, 0, + "across -x, commas -m, horizontal -x, long -l, " + "single-column -1, verbose -l, vertical -C, xml --xml", 0 }, + + { "full-time", 0, POPT_ARG_NONE, &ShowFullTime, 0, + "list both full date and full time", 0 }, + + { "no-group", 'G', POPT_ARG_NONE, &HideGroupInfo, 0, + "inhibit display of group information", 0 }, + + { "human-readable", 'h', POPT_ARG_NONE, &HumanReadableSizes, 0, + "print sizes in human readable format (e.g., 1K 234M 2G)", 0 }, + + { "indicator-style", 0, POPT_ARG_STRING, &IndicatorStyleCSTR, 0, + "append indicator with style STRING to entry names: " + "none (default), classify (-F), file-type (-p)", 0 }, + + { "inode", 'i', POPT_ARG_NONE, &ShowINode, 0, + "print inode number of each file", 0 }, + + { "long-list", 'l', POPT_ARG_NONE, &LongList, 0, + "use a long listing format", 0 }, + + { 0, 'm', POPT_ARG_NONE, &CSVList, 0, + "fill width with a comma separated list of entries", 0 }, + + { "numeric-uid-gid", 'n', POPT_ARG_NONE, &ShowNumericUIDGID, 0, + "list numeric UIDs and GIDs instead of names", 0 }, + + { "literal", 'N', POPT_ARG_NONE, &ShowNonPrintableName, 0, + "print raw entry names (don't treat e.g. control " + "characters specially)" , 0 }, + + { 0, 'o', POPT_ARG_NONE, &LongListNoGroup, 0, + "use long listing format without group info", 0 }, + + { "file-type", 'p', POPT_ARG_NONE, &Classify, 0, + "append indicator (one of /=@|) to entries", 0 }, + + { "hide-control-chars", 'q', POPT_ARG_NONE, &ShowNonPrintableNameAsQ, 0, + "print ? instead of non graphic characters", 0 }, + + { "show-control-chars", 0, POPT_ARG_NONE, &ShowNonPrintableName, 0, + "show non graphic characters as-is (default " + "unless program is `ls' and output is a terminal)", 0 }, + + { "quote-name", 'Q', POPT_ARG_NONE, &QuoteName, 0, + "enclose entry names in double quotes", 0 }, + + { "quoting-style", 0, POPT_ARG_STRING, &QuoteNameSelectCSTR, 0, + "use quoting style STRING for entry names: " + "literal, locale, shell, shell-always, c, escape", 0 }, + + { "recursive", 'R', POPT_ARG_NONE, &RecursiveList, 0, + "list directorys recursively", 0 }, + + { "reverse", 'r', POPT_ARG_NONE, &ReverseSort, 0, + "reverse order while sorting", 0 }, + + { 0, 'S', POPT_ARG_NONE, &SortByFileSize, 0, + "sort by file size", 0 }, + + { "sort", 0, POPT_ARG_STRING, &SortByCSTR, 0, + "extension -X, none -U, size -S, time -t, version -v " + "status -c, time -t, atime -u, access -u, use -u", 0 }, + + { "time", 0, POPT_ARG_STRING, &ShowTimeCSTR, 0, + "show time as STRING instead of modification time: atime, access, use," + "ctime or status; use specified time as sort key if --sort=time", 0 }, + + { "sort-by-time", 't', POPT_ARG_NONE, &SortByMTime, 0, + "sort by modification time unless -c or -u are also used", 0 }, + + { "no-sort", 'U', POPT_ARG_NONE, &NoSort, 0, + "do not sort; list entries in hashed order", 0 }, + + { "sort-by-atime", 'u', POPT_ARG_NONE, &SortByATime, 0, + "with -lt: sort by, and show, access time. " + "with -l: show access time and sort by name. " + "otherwise: sort by access time", 0 }, + + { "sort-by-version", 'v', POPT_ARG_NONE, &SortByVersion, 0, + "sort by version", 0 }, + + { "width", 'w', POPT_ARG_INT, &ConsoleWidth, 0, + "assume screen width instead of current value", 0 }, + + { "sort-by-extension", 'X', POPT_ARG_NONE, &SortByExtension, 0, + "sort alphabetically by entry extension", 0 }, + + { 0, 'x', POPT_ARG_NONE, &HorizList, 0, + "list entries by lines instead of by columns", 0 }, + + { "context", 'Z', POPT_ARG_NONE, &ShowSELinuxContext, 0, + "Display SELinux security context so it fits on most displays.", 0 }, + + { "lcontext", 0, POPT_ARG_NONE, &ShowSELinuxContextLong, 0, + "Display SELinux security context in wide display mode", 0 }, + + { "dont-descend-regex", 0, POPT_ARG_STRING, &DontDescendRegexCSTR, 0, + "Don't descend into urls which match this regex in -R mode", 0 }, + + { "ea-index-path", 0, POPT_ARG_STRING, &EAIndexPath_CSTR, 0, + "which EA Index to use", "" }, + +// { "output-precision", 0, POPT_ARG_INT, &OutputPrecision, 0, +// "precision of numerical output", "" }, + + /* + * Other handy stuff + */ + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + + /* + * Standard Ferris options + */ + FERRIS_POPT_OPTIONS + + /** + * Expansion of strange-url://foo* + */ + FERRIS_SHELL_GLOB_POPT_OPTIONS + +// { "show-all-attributes", 0, POPT_ARG_NONE, +// &ShowAllAttributes, 0, +// "Show every available bit of metadata about each object in context", +// 0 }, + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* url1 url2 ..."); + + if (argc < 1) { +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if( ShowVersion ) + { + cout << "ferrisls version: $Id: ls.cpp,v 1.16 2010/09/24 21:31:18 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2001 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + if( EAIndexPath_CSTR ) + { + ::Ferris::EAIndex::Factory::setDefaultEAIndexPath( EAIndexPath_CSTR ); + } + + /* Having these both on gives side effects */ + if( ShowRecommendedEA ) + { + LongList = 0; + } + if( ShowNameAndEANamesOnly ) + { + ShowColumnsCSTR = "name,ea-names"; + LongList = 1; + } + + if( ShowHeadings ) + { + HideHeadings = !ShowHeadings; + } + + if( RecursiveList ) + { + ShowContextNameInHeading = true; + if( HideContextNameInHeading ) + ShowContextNameInHeading = false; + } + + if( FormatDisplayCSTR ) + { + string s = FormatDisplayCSTR; + + if( s == "across" || s == "horizontal" ) + { + HorizList = 1; + } + else if( s == "commas" ) + { + CSVList = 1; + } + else if( s == "long" || s == "verbose" ) + { + LongList = 1; + } + else if( s == "single-column" ) + { + LongListNameOnly = 1; + } + else if( s == "vertical" ) + { + VerticalList = 1; + } + else if( s == "xml" ) + { + XMLList = 1; + } + else if( s == "xmle" ) + { + XMLListElements = 1; + } + else if( s == "xmlraw" ) + { + XMLListRAW = 1; + } + else if( s == "xml-xsltfs-debug" ) + { + XMLListXSLTFSDebug = 1; + } + else if( s == "rdf" ) + { + RDFList = 1; + } + } + + + if( IndicatorStyleCSTR ) + { + string IndicatorStyle = IndicatorStyleCSTR; + + if( IndicatorStyle == "classify" ) + { + FullClassify = 1; + } + else if( IndicatorStyle == "file-type" ) + { + Classify = 1; + } + else if( IndicatorStyle == "directories" ) + { + ClassifyDirs = 1; + } + } + + if( SortByCSTR ) + { + string s = SortByCSTR; + + if( s == "extension" ) { SortByExtension = 1; } + else if( s == "none" ) { NoSort = 1; } + else if( s == "size" ) { SortByFileSize = 1; } + else if( s == "time" ) { SortByMTime = 1; } + else if( s == "version" ) { SortByVersion = 1; } + else if( s == "status" ) { SortByCTime = 1; } + else if( s == "time" ) { SortByMTime = 1; } + else if( s == "atime" ) { SortByATime = 1; } + else if( s == "use" ) { SortByATime = 1; } + } + + /* + * NOTE ABOUT SORTING + * + * `-u' alone means sort by atime, -lu means show atime and sort by name, + * -lut means show atime and sort by atime. + */ + if( ShowTimeCSTR ) + { + string s = ShowTimeCSTR; + + if( s == "atime" || s == "access" || s == "use" ) + { + SortByATime = 1; + } + else if( s == "ctime" || s == "status" ) + { + SortByCTime = 1; + } + } + + + + + /* FIXME disable '-s' when that option is added */ + if( OptionMinusF ) + { + ShowAllFiles = 1; + NoSort = 1; + + LongList = 0; + SortByMTime = 0; + } + + + try + { + bool ShowColumnsNotSetByUser = ShowColumnsCSTR==ShowColumnsDefault + && AppendShowColumnsRegexCSTR == 0; + bool SortStringNotSetByUser = SortStringCSTR==SortStringDefault; + bool FilterStringNotSetByUser = FilterStringCSTR==0; + bool ColumnsWidthsNotSetByUser = ColumnsWidthsCSTR==0; + + if( !ShowColumnsNotSetByUser ) + { + LongList = 1; + ShowRecommendedEA = 0; + } + + string ShowColumns = ShowColumnsCSTR; + string SortString = SortStringCSTR; + string FilterString = FilterStringCSTR ? FilterStringCSTR : ""; + string ColumnsWidths = ColumnsWidthsCSTR ? ColumnsWidthsCSTR : ""; + + /* + * If they want a long list and have not overriden the column names + */ + if( ShowColumnsNotSetByUser ) + { + /* Implicitly full time enables long list mode */ + if( ShowFullTime ) + { + LongList = 1; + } + + if( LongList ) + { + ShowColumns = + "protection-ls,user-owner-name," + "group-owner-name,size,mtime-display,name"; + + if( ColumnsWidthsNotSetByUser ) + { + ColumnsWidths = "10,10,10,7,12,0"; + FieldSeperator = " "; + } + } + else if( LongListNoGroup ) + { + ShowColumns = + "protection-ls,user-owner-name," + "size,mtime-display,name"; + + if( ColumnsWidthsNotSetByUser ) + { + ColumnsWidths = "10,10,7,12,0"; + FieldSeperator = " "; + } + } + else if( LongListNameOnly ) + { + ShowColumns = "name"; + ColumnsWidths = ""; + FieldSeperator = ""; + } + else if( XMLList || XMLListElements || XMLListRAW || XMLListXSLTFSDebug || RDFList ) + { + ShowColumns = "recommended-ea"; + } + if( ShowSELinuxContext ) + { + ShowColumns = "protection-ls,user-owner-name,group-owner-name,selinux-identity,selinux-type,name"; + LongList = 1; + } + else if( ShowSELinuxContextLong ) + { + ShowColumns = "protection-ls,selinux-identity,selinux-type,user-owner-name,group-owner-name,size,mtime-display,name"; + LongList = 1; + } + + if( HumanReadableSizes ) + { + ShowColumns = subst( ShowColumns, "size,", "size-human-readable," ); + } + } + + /* + * Only allow override of sorting string if the user has not set it explicitly. + * + * SEE ALSO: NOTE ABOUT SORTING (comment above) + */ + if( SortStringNotSetByUser ) + { + /* + * Optionally show the ctime/atime given the right option combination. + */ + if( SortByATime && LongList && ShowColumnsNotSetByUser ) + { + ShowColumns = subst( ShowColumns, "mtime-display", "atime-display" ); + } + else if( SortByCTime && LongList && ShowColumnsNotSetByUser ) + { + ShowColumns = subst( ShowColumns, "mtime-display", "ctime-display" ); + } + + + /* + * Sort by time + */ + if( !LongList || (LongList && SortByMTime) ) + { + /* + * Check which time to sort by + */ + if( SortByATime ) + { + SortString = ":!#:atime"; + } + else if( SortByCTime ) + { + SortString = ":!#:ctime"; + } + else if( SortByMTime ) + { + SortString = ":!#:mtime"; + } + } + } + + /* + * Sorting by other properties. + */ + if( SortStringNotSetByUser ) + { + if( SortByExtension ) + { + SortString = "name-extension"; + } + else if( SortByVersion ) + { + SortString = ":VER:name"; + } + else if( SortByFileSize ) + { + SortString = ":!#:size"; + } + + } + + + if( ReverseSort && SortString.length() ) + { + SortString = ::Ferris::Factory::ReverseSortStringOrder( SortString ); + } + + + if( FilterStringNotSetByUser ) + { + FilterString = "(!(name=~^\\..*))"; + + if( ShowAllFiles ) + { + FilterString = ""; + } + else if( ShowAlmostAllFiles ) + { + FilterString = ""; +// FilterString = "(!(|(name=.)(name=..)))"; + } + else if( IgnoreBackupFiles ) + { + FilterString = "(!(name=~^.*~$))"; + } + } + + + + if( ShowFullTime ) + { + ShowColumns = subst( ShowColumns, "atime-display,", "atime-ctime," ); + ShowColumns = subst( ShowColumns, "ctime-display,", "ctime-ctime," ); + ShowColumns = subst( ShowColumns, "mtime-display,", "mtime-ctime," ); + } + if( ShowINode ) + { + string tmp = "inode,"; + tmp += ShowColumns; + ShowColumns = tmp; + + tmp = "7,"; + tmp += ColumnsWidths; + ColumnsWidths = tmp; + } + if( HideGroupInfo ) + { + ShowColumns = subst( ShowColumns, "group-owner-name,", "" ); + ShowColumns = subst( ShowColumns, "group-owner-number,", "" ); + } + if( ShowNumericUIDGID ) + { + ShowColumns = subst( ShowColumns, "group-owner-name,", "group-owner-number," ); + ShowColumns = subst( ShowColumns, "user-owner-name,", "user-owner-number," ); + } + + +// ls.setContextClass( RootContextClass ); + + ls.setListDirectoryNodeOnly( ListDirectoryNodeOnly ); + ls.setForceReadRootDirectoryNodes( ForceReadRootDirectoryNodes ); + ls.setRecursiveList( RecursiveList ); + if( DontDescendRegexCSTR ) + ls.setDontDescendRegex( DontDescendRegexCSTR ); + +// Ferrisls_long_display d = new Ferrisls_long_display(); +// fh_lsdisplay d_cleaner = d; + + + fh_lsdisplay d; + + if( CSVList ) + { + fh_lsdisplay_csv ld = new Ferrisls_csv_display(); + d = ld; + + if( ConsoleWidth ) + { + ld->setConsoleWidth( ConsoleWidth ); + } + + FieldSeperator = ", "; + RecordSeperator = ""; + } + else if( XMLList ) + { + fh_lsdisplay_xml ld = new Ferrisls_xml_display(); + d = ld; + + ld->setHideXMLDeclaration( HideXMLDeclaration ); + ld->setColumns( ShowColumns ); + ColumnsWidths = ""; + RecordSeperator = ""; + FieldSeperator = ""; + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + if( OutputPrecision ) + ld->setOutputPrecision( OutputPrecision ); + } + else if( XMLListElements ) + { + fh_lsdisplay_xmle ld = new Ferrisls_xmle_display(); + d = ld; + + ld->setHideXMLDeclaration( HideXMLDeclaration ); + ld->setColumns( ShowColumns ); + ColumnsWidths = ""; + RecordSeperator = ""; + FieldSeperator = ""; + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + if( OutputPrecision ) + ld->setOutputPrecision( OutputPrecision ); + } + else if( XMLListRAW ) + { + fh_lsdisplay_xmlraw ld = new Ferrisls_xmlraw_display(); + d = ld; + + ld->setColumns( ShowColumns ); + ColumnsWidths = ""; + RecordSeperator = ""; + FieldSeperator = ""; + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + } + else if( XMLListXSLTFSDebug ) + { + fh_lsdisplay_xml_xsltfs_debug ld = new Ferrisls_xml_xsltfs_debug_display(); + d = ld; + + ld->setColumns( ShowColumns ); + ColumnsWidths = ""; + RecordSeperator = ""; + FieldSeperator = ""; + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + } + else if( RDFList ) + { + fh_lsdisplay_rdf ld = new Ferrisls_rdf_display(); + d = ld; + + ld->setColumns( ShowColumns ); + ColumnsWidths = ""; + RecordSeperator = ""; + FieldSeperator = ""; + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + } + else if( HorizList ) + { + fh_lsdisplay_horiz ld = new Ferrisls_horiz_display(); + d = ld; + + + if( ConsoleWidth ) + { + ld->setConsoleWidth( ConsoleWidth ); + } + RecordSeperator = ""; + FieldSeperator = " "; + } + else if( LongList || LongListNoGroup || LongListNameOnly + || DiredList || ShowRecommendedEA ) + { + fh_lsdisplay_long ld; + + if( DiredList ) + { + ld = new Ferrisls_dired_display(); + } + else + { + ld = new Ferrisls_long_display(); + } + d = ld; + + if( ColumnsWidths.length() && !ld->setColumnWidths( ColumnsWidths )) + { + usage(optCon, 1, "Column widths are wrong", ".e.g. 10,12,12,0"); + exit(1); + } + + if( ShowRecommendedEA ) + { + ShowColumns = "recommended-ea"; + } + + ld->setColumns( ShowColumns ); + ld->setShowAllAttributes( ShowAllAttributes ); + + if( AppendShowColumnsRegexCSTR ) + { + string AppendShowColumnsRegex = AppendShowColumnsRegexCSTR; + ld->appendShowColumnsRegex( AppendShowColumnsRegex ); + } + if( OutputPrecision ) + ld->setOutputPrecision( OutputPrecision ); + } + else if( VerticalList || !isBound(d) ) + { + fh_lsdisplay_vert ld = new Ferrisls_vert_display(); + d = ld; + + if( ConsoleWidth ) + { + ld->setConsoleWidth( ConsoleWidth ); + } + RecordSeperator = ""; + FieldSeperator = " "; + } + + if( MonitorAll ) + { + MonitorCreate = MonitorDelete = MonitorChange = true; + } + d->setMonitorCreate( MonitorCreate ); + d->setMonitorDelete( MonitorDelete ); + d->setMonitorChanged( MonitorChange ); + + d->setFillChar( FillString[0] ); + d->setShowHeadings( !HideHeadings ); + d->setShowContextNameInHeading( ShowContextNameInHeading ); + d->setFieldSeperator( FieldSeperator ); + d->setRecordSeperator( RecordSeperator ); + d->setNoSuchAttributeIndicator( NoSuchAttributeIndicator ); + + /* + * Filename quoting + */ + if( QuoteNameSelectCSTR ) + { + string s = QuoteNameSelectCSTR; + + if( s == "c" ) + { + d->setQuoteStyle( StringQuote::C_QUOTING ); + } + else if( s == "literal" ) + { + d->setQuoteStyle( StringQuote::LITERAL_QUOTING ); + } + else if( s == "shell" ) + { + d->setQuoteStyle( StringQuote::SHELL_QUOTING ); + } + else if( s == "shell-always" ) + { + d->setQuoteStyle( StringQuote::SHELL_ALWAYS_QUOTING ); + } + else if( s == "escape" ) + { + d->setQuoteStyle( StringQuote::ESCAPE_QUOTING ); + } + } + else if( QuoteName ) + { + d->setQuoteStyle( StringQuote::C_QUOTING ); + } + else if( ShowNonPrintableNameAsOctal ) + { + d->setQuoteStyle( StringQuote::ESCAPE_QUOTING ); + } + else if( ShowNonPrintableNameAsQ ) + { + d->setQuoteStyle( StringQuote::ESCAPE_QUOTING ); + } + else if( ShowNonPrintableName ) + { + d->setQuoteStyle( StringQuote::LITERAL_QUOTING ); + } + + if( FullClassify ) + { + d->setNameClassification( + Ferrisls_display::CLASSIFY_EXE | + Ferrisls_display::CLASSIFY_DIR | + Ferrisls_display::CLASSIFY_SOCKET | + Ferrisls_display::CLASSIFY_FIFO | + Ferrisls_display::CLASSIFY_SYMLINK ); + } + else if( Classify ) + { + d->setNameClassification( + Ferrisls_display::CLASSIFY_DIR | + Ferrisls_display::CLASSIFY_SOCKET | + Ferrisls_display::CLASSIFY_FIFO | + Ferrisls_display::CLASSIFY_SYMLINK ); + } + if( ClassifyDirs ) + { + d->setNameClassification( + d->getNameClassification() | + Ferrisls_display::CLASSIFY_DIR ); + } + + + ls.setDisplay( d ); + + +// cout << "NoSort:" << NoSort << " SortString:" << SortString << endl; + if( !NoSort ) + { + ls.setSortString( SortString ); + } + + if( FilterString.length() ) + { + ls.setFilterString( FilterString ); + } + + stringlist_t srcs; + srcs = expandShellGlobs( srcs, optCon ); + if( srcs.empty() ) + { + srcs.push_back("."); + } + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + + bool Done = false; + for( int First_Time = 1; !Done && srcsiter != srcsend ; ++srcsiter ) + { +// RootName = poptGetArg(optCon); + string RootName = *srcsiter; + + + if( NoImplicitListDirectoryNodeOnly ) + { + ls.setImplyListDirectoryNodeOnly( !NoImplicitListDirectoryNodeOnly ); + } + +// /* +// * If there are no dirs specified we use "." and are done after this dir. +// */ +// if( !RootName && First_Time ) +// { +// Done = true; +// RootName = "."; +// } +// else if (c < -1 && First_Time ) +// { +// /* an error occurred during option processing */ +// fprintf(stderr, "%s: %s\n", +// poptBadOption(optCon, POPT_BADOPTION_NOALIAS), +// poptStrerror(c)); +// return 1; +// } +// else if( !RootName ) +// { +// break; +// } + + +// cout << "About to read dir:" << RootName << endl; + + + First_Time = 0; +// ls.setRoot( RootName ); + + // imply -d for directories. + try + { + static const fh_rex rex = toregexh( "^branch(es|fs-[a-z]+):" ); + + if( regex_search( RootName, rex, boost::match_any ) ) + { + ls.setImplyListDirectoryNodeOnly( false ); + } + else + { + if( !NoImplicitListDirectoryNodeOnly ) + { + fh_context c = Resolve( RootName ); + if( !ListDirectoryNodeOnly + && !isTrue( getStrAttr( c, "is-dir-try-automounting", "1" ) ) ) + { + ListDirectoryNodeOnly = true; + ls.setListDirectoryNodeOnly( ListDirectoryNodeOnly ); + } + } + } + } + catch( exception& e ) + {} + + + ls.setURL( RootName ); + ls(); + +// // FIXME! +// cerr << "entering main loop" << endl; +// Main::mainLoop(); + + d->DetachAllSignals(); + + +// CacheManager* c = CacheManager::getCacheManager(); +// cerr << "==========================================================" << endl; +// cerr << "=================== Dump and Clean =======================" << endl; +// cerr << "==========================================================" << endl; +// c->dumpFreeListTo( cerr ); +// c->cleanUp(); +// c->dumpFreeListTo( cerr ); +// cerr << "==========================================================" << endl; +// cerr << "==================== ls again ============================" << endl; +// cerr << "==========================================================" << endl; +// ls(); +// cerr << "==========================================================" << endl; +// cerr << "=================== Dump and Clean =======================" << endl; +// cerr << "==========================================================" << endl; +// c->dumpFreeListTo( cerr ); +// c->cleanUp(); +// c->dumpFreeListTo( cerr ); +// cerr << "==========================================================" << endl; + + + cout << ContextSeperator; + + if(SeperateEachContextWithNewLine) + cout << endl; + } + } + catch( NoSuchContextClass& e ) + { +// cerr << "Invalid context class given:" << RootContextClass << endl; + cerr << "e:" << e.what() << endl; + exit(1); + } + catch( exception& e ) + { + cerr << "ls.cpp cought:" << e.what() << endl; + exit(1); + } + + + + poptFreeContext(optCon); + +#ifdef FERRIS_DEBUG_LS_VM + { + CacheManager* cc = getCacheManager(); + DEBUG_dumpcl( "about to cleanup sweep 1" ); + cc->cleanUp( true ); + DEBUG_dumpcl( "about to cleanup sweep 2" ); + cc->cleanUp( true ); + DEBUG_dumpcl("exiting"); + } +#endif + +// #ifdef FERRIS_DEBUG_VM +// CacheManager* cc = getCacheManager(); +// DEBUG_dumpcl( "about to cleanup sweep 1" ); +// cc->cleanUp( true ); +// DEBUG_dumpcl( "about to cleanup sweep 2" ); +// cc->cleanUp( true ); +// DEBUG_dumpcl( "about to cleanup sweep 3" ); +// cc->cleanUp( true ); +// DEBUG_dumpcl("exiting"); +// #endif + + cout << flush; + return ls.hadErrors(); +} diff --git a/apps/metadataserver/Makefile.am b/apps/metadataserver/Makefile.am new file mode 100644 index 0000000..23280fd --- /dev/null +++ b/apps/metadataserver/Makefile.am @@ -0,0 +1,64 @@ +if HAVE_QTDBUS + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = + +MOC_DEP_SRCS=ferris-internal-metadata-broker.moc ferris-internal-metadata-worker.moc ferris-internal-metadata-broker-direct-client.moc metadata-clients-common.moc + +CLEANFILES = $(MOC_DEP_SRCS) +mocimpls.cpp: $(MOC_DEP_SRCS) + touch mocimpls.cpp +ferris-internal-metadata-broker.moc: ferris-internal-metadata-broker.cpp + moc-qt4 $(srcdir)/ferris-internal-metadata-broker.cpp -o ferris-internal-metadata-broker.moc + +ferris-internal-metadata-worker.moc: ferris-internal-metadata-worker.cpp + moc-qt4 $(srcdir)/ferris-internal-metadata-worker.cpp -o ferris-internal-metadata-worker.moc + +ferris-internal-metadata-broker-direct-client.moc: ferris-internal-metadata-broker-direct-client.cpp + moc-qt4 $(srcdir)/ferris-internal-metadata-broker-direct-client.cpp -o ferris-internal-metadata-broker-direct-client.moc + +metadata-clients-common.moc: metadata-clients-common.cpp + moc-qt4 $(srcdir)/metadata-clients-common.hh -o metadata-clients-common.moc + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(includedir) \ + -I$(top_srcdir)/plugins/eagenerators/ \ + -I$(top_srcdir)/DBusGlue/ \ + -I$(top_builddir)/DBusGlue/ \ + -I/usr/local/include \ + @GLIB_CFLAGS@ \ + @QT_CFLAGS@ @QTNETWORK_CFLAGS@ \ + @QTDBUS_CFLAGS@ \ + @CFLAGS@ + + +METADATA_COMMANDS = \ + ferris-internal-metadata-broker ferris-internal-metadata-worker \ + ferris-internal-metadata-broker-direct-client ferris-internal-metadata-worker-direct-client + +bin_PROGRAMS = $(METADATA_COMMANDS) + +ferris_internal_metadata_broker_SOURCES = mocimpls.cpp ferris-internal-metadata-broker.cpp metadata-clients-common.cpp metadata-clients-common.hh +ferris_internal_metadata_broker_LDADD = -lm -lpopt +ferris_internal_metadata_broker_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ + +ferris_internal_metadata_worker_SOURCES = mocimpls.cpp ferris-internal-metadata-worker.cpp metadata-clients-common.cpp metadata-clients-common.hh +ferris_internal_metadata_worker_LDADD = -lm -lpopt +ferris_internal_metadata_worker_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ + +ferris_internal_metadata_broker_direct_client_SOURCES = mocimpls.cpp ferris-internal-metadata-broker-direct-client.cpp +ferris_internal_metadata_broker_direct_client_LDADD = -lm -lpopt +ferris_internal_metadata_broker_direct_client_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ + +ferris_internal_metadata_worker_direct_client_SOURCES = mocimpls.cpp ferris-internal-metadata-worker-direct-client.cpp +ferris_internal_metadata_worker_direct_client_LDADD = -lm -lpopt +ferris_internal_metadata_worker_direct_client_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ + + +endif diff --git a/apps/metadataserver/Makefile.in b/apps/metadataserver/Makefile.in new file mode 100644 index 0000000..e55f0d4 --- /dev/null +++ b/apps/metadataserver/Makefile.in @@ -0,0 +1,1109 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@HAVE_QTDBUS_TRUE@bin_PROGRAMS = $(am__EXEEXT_1) +subdir = apps/metadataserver +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@HAVE_QTDBUS_TRUE@am__EXEEXT_1 = \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker$(EXEEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-worker$(EXEEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker-direct-client$(EXEEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-worker-direct-client$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__ferris_internal_metadata_broker_SOURCES_DIST = mocimpls.cpp \ + ferris-internal-metadata-broker.cpp \ + metadata-clients-common.cpp metadata-clients-common.hh +@HAVE_QTDBUS_TRUE@am_ferris_internal_metadata_broker_OBJECTS = \ +@HAVE_QTDBUS_TRUE@ mocimpls.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ metadata-clients-common.$(OBJEXT) +ferris_internal_metadata_broker_OBJECTS = \ + $(am_ferris_internal_metadata_broker_OBJECTS) +ferris_internal_metadata_broker_DEPENDENCIES = +ferris_internal_metadata_broker_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_internal_metadata_broker_LDFLAGS) $(LDFLAGS) -o $@ +am__ferris_internal_metadata_broker_direct_client_SOURCES_DIST = \ + mocimpls.cpp ferris-internal-metadata-broker-direct-client.cpp +@HAVE_QTDBUS_TRUE@am_ferris_internal_metadata_broker_direct_client_OBJECTS = \ +@HAVE_QTDBUS_TRUE@ mocimpls.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker-direct-client.$(OBJEXT) +ferris_internal_metadata_broker_direct_client_OBJECTS = \ + $(am_ferris_internal_metadata_broker_direct_client_OBJECTS) +ferris_internal_metadata_broker_direct_client_DEPENDENCIES = +ferris_internal_metadata_broker_direct_client_LINK = $(LIBTOOL) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_internal_metadata_broker_direct_client_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__ferris_internal_metadata_worker_SOURCES_DIST = mocimpls.cpp \ + ferris-internal-metadata-worker.cpp \ + metadata-clients-common.cpp metadata-clients-common.hh +@HAVE_QTDBUS_TRUE@am_ferris_internal_metadata_worker_OBJECTS = \ +@HAVE_QTDBUS_TRUE@ mocimpls.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-worker.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ metadata-clients-common.$(OBJEXT) +ferris_internal_metadata_worker_OBJECTS = \ + $(am_ferris_internal_metadata_worker_OBJECTS) +ferris_internal_metadata_worker_DEPENDENCIES = +ferris_internal_metadata_worker_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_internal_metadata_worker_LDFLAGS) $(LDFLAGS) -o $@ +am__ferris_internal_metadata_worker_direct_client_SOURCES_DIST = \ + mocimpls.cpp ferris-internal-metadata-worker-direct-client.cpp +@HAVE_QTDBUS_TRUE@am_ferris_internal_metadata_worker_direct_client_OBJECTS = \ +@HAVE_QTDBUS_TRUE@ mocimpls.$(OBJEXT) \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-worker-direct-client.$(OBJEXT) +ferris_internal_metadata_worker_direct_client_OBJECTS = \ + $(am_ferris_internal_metadata_worker_direct_client_OBJECTS) +ferris_internal_metadata_worker_direct_client_DEPENDENCIES = +ferris_internal_metadata_worker_direct_client_LINK = $(LIBTOOL) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_internal_metadata_worker_direct_client_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_internal_metadata_broker_SOURCES) \ + $(ferris_internal_metadata_broker_direct_client_SOURCES) \ + $(ferris_internal_metadata_worker_SOURCES) \ + $(ferris_internal_metadata_worker_direct_client_SOURCES) +DIST_SOURCES = $(am__ferris_internal_metadata_broker_SOURCES_DIST) \ + $(am__ferris_internal_metadata_broker_direct_client_SOURCES_DIST) \ + $(am__ferris_internal_metadata_worker_SOURCES_DIST) \ + $(am__ferris_internal_metadata_worker_direct_client_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +@HAVE_QTDBUS_TRUE@MAINTAINERCLEANFILES = Makefile.in +@HAVE_QTDBUS_TRUE@EXTRA_DIST = +@HAVE_QTDBUS_TRUE@MOC_DEP_SRCS = ferris-internal-metadata-broker.moc ferris-internal-metadata-worker.moc ferris-internal-metadata-broker-direct-client.moc metadata-clients-common.moc +@HAVE_QTDBUS_TRUE@CLEANFILES = $(MOC_DEP_SRCS) +@HAVE_QTDBUS_TRUE@INCLUDES = \ +@HAVE_QTDBUS_TRUE@ @STLPORT_CFLAGS@ \ +@HAVE_QTDBUS_TRUE@ -I. \ +@HAVE_QTDBUS_TRUE@ -I$(srcdir) -I$(top_srcdir) \ +@HAVE_QTDBUS_TRUE@ -I$(top_builddir) \ +@HAVE_QTDBUS_TRUE@ -I$(includedir) \ +@HAVE_QTDBUS_TRUE@ -I$(top_srcdir)/plugins/eagenerators/ \ +@HAVE_QTDBUS_TRUE@ -I$(top_srcdir)/DBusGlue/ \ +@HAVE_QTDBUS_TRUE@ -I$(top_builddir)/DBusGlue/ \ +@HAVE_QTDBUS_TRUE@ -I/usr/local/include \ +@HAVE_QTDBUS_TRUE@ @GLIB_CFLAGS@ \ +@HAVE_QTDBUS_TRUE@ @QT_CFLAGS@ @QTNETWORK_CFLAGS@ \ +@HAVE_QTDBUS_TRUE@ @QTDBUS_CFLAGS@ \ +@HAVE_QTDBUS_TRUE@ @CFLAGS@ + +@HAVE_QTDBUS_TRUE@METADATA_COMMANDS = \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker ferris-internal-metadata-worker \ +@HAVE_QTDBUS_TRUE@ ferris-internal-metadata-broker-direct-client ferris-internal-metadata-worker-direct-client + +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_SOURCES = mocimpls.cpp ferris-internal-metadata-broker.cpp metadata-clients-common.cpp metadata-clients-common.hh +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_LDADD = -lm -lpopt +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_SOURCES = mocimpls.cpp ferris-internal-metadata-worker.cpp metadata-clients-common.cpp metadata-clients-common.hh +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_LDADD = -lm -lpopt +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_direct_client_SOURCES = mocimpls.cpp ferris-internal-metadata-broker-direct-client.cpp +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_direct_client_LDADD = -lm -lpopt +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_broker_direct_client_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_direct_client_SOURCES = mocimpls.cpp ferris-internal-metadata-worker-direct-client.cpp +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_direct_client_LDADD = -lm -lpopt +@HAVE_QTDBUS_TRUE@ferris_internal_metadata_worker_direct_client_LDFLAGS = @GLIB_LIBS@ @QTDBUS_LIBS@ @LIBFERRIS_LA@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/metadataserver/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/metadataserver/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-internal-metadata-broker$(EXEEXT): $(ferris_internal_metadata_broker_OBJECTS) $(ferris_internal_metadata_broker_DEPENDENCIES) + @rm -f ferris-internal-metadata-broker$(EXEEXT) + $(ferris_internal_metadata_broker_LINK) $(ferris_internal_metadata_broker_OBJECTS) $(ferris_internal_metadata_broker_LDADD) $(LIBS) +ferris-internal-metadata-broker-direct-client$(EXEEXT): $(ferris_internal_metadata_broker_direct_client_OBJECTS) $(ferris_internal_metadata_broker_direct_client_DEPENDENCIES) + @rm -f ferris-internal-metadata-broker-direct-client$(EXEEXT) + $(ferris_internal_metadata_broker_direct_client_LINK) $(ferris_internal_metadata_broker_direct_client_OBJECTS) $(ferris_internal_metadata_broker_direct_client_LDADD) $(LIBS) +ferris-internal-metadata-worker$(EXEEXT): $(ferris_internal_metadata_worker_OBJECTS) $(ferris_internal_metadata_worker_DEPENDENCIES) + @rm -f ferris-internal-metadata-worker$(EXEEXT) + $(ferris_internal_metadata_worker_LINK) $(ferris_internal_metadata_worker_OBJECTS) $(ferris_internal_metadata_worker_LDADD) $(LIBS) +ferris-internal-metadata-worker-direct-client$(EXEEXT): $(ferris_internal_metadata_worker_direct_client_OBJECTS) $(ferris_internal_metadata_worker_direct_client_DEPENDENCIES) + @rm -f ferris-internal-metadata-worker-direct-client$(EXEEXT) + $(ferris_internal_metadata_worker_direct_client_LINK) $(ferris_internal_metadata_worker_direct_client_OBJECTS) $(ferris_internal_metadata_worker_direct_client_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-internal-metadata-broker-direct-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-internal-metadata-broker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-internal-metadata-worker-direct-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-internal-metadata-worker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metadata-clients-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mocimpls.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +@HAVE_QTDBUS_TRUE@mocimpls.cpp: $(MOC_DEP_SRCS) +@HAVE_QTDBUS_TRUE@ touch mocimpls.cpp +@HAVE_QTDBUS_TRUE@ferris-internal-metadata-broker.moc: ferris-internal-metadata-broker.cpp +@HAVE_QTDBUS_TRUE@ moc-qt4 $(srcdir)/ferris-internal-metadata-broker.cpp -o ferris-internal-metadata-broker.moc + +@HAVE_QTDBUS_TRUE@ferris-internal-metadata-worker.moc: ferris-internal-metadata-worker.cpp +@HAVE_QTDBUS_TRUE@ moc-qt4 $(srcdir)/ferris-internal-metadata-worker.cpp -o ferris-internal-metadata-worker.moc + +@HAVE_QTDBUS_TRUE@ferris-internal-metadata-broker-direct-client.moc: ferris-internal-metadata-broker-direct-client.cpp +@HAVE_QTDBUS_TRUE@ moc-qt4 $(srcdir)/ferris-internal-metadata-broker-direct-client.cpp -o ferris-internal-metadata-broker-direct-client.moc + +@HAVE_QTDBUS_TRUE@metadata-clients-common.moc: metadata-clients-common.cpp +@HAVE_QTDBUS_TRUE@ moc-qt4 $(srcdir)/metadata-clients-common.hh -o metadata-clients-common.moc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/metadataserver/ferris-internal-metadata-broker-direct-client.cpp b/apps/metadataserver/ferris-internal-metadata-broker-direct-client.cpp new file mode 100644 index 0000000..4e4fa22 --- /dev/null +++ b/apps/metadataserver/ferris-internal-metadata-broker-direct-client.cpp @@ -0,0 +1,292 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata worker direct client + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-broker-direct-client.cpp,v 1.8 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#define NEW_QBUS_IMPL 1 + +#include "Ferris/MetadataServer_private.hh" +#include + +#include + +#include +#include +#include + +#include +#include +#include + +//#include "broker_interface.h" +#include "broker_interface.cpp" + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-internal-metadata-worker-direct-client"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +static const char* DBUS_SERVER_NAME = "com.libferris.Metadata.Broker"; +static const char* DBUS_SERVER_PATH = "/com/libferris/Metadata"; + +int RETURN_CODE = 0; +stringlist_t srcs; + + +namespace Ferris +{ + class MetadataBrokerClientApp : public QCoreApplication + { + Q_OBJECT; + int m_getCount; + + public: + + MetadataBrokerClientApp( int & argc, char ** argv ) + : + QCoreApplication( argc, argv ), + m_getCount(0) + { + } + + void incrGetCount() + { + m_getCount++; + if( m_getCount == srcs.size() ) + { + cerr << "processing complete..." << endl; + exit(0); + } + + } + + public slots: + + + void onAsyncGetFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc) + { + cerr << "onAsyncGetFailed() " + << " earl:" << tostr(earl) + << " ename:" << tostr(ename) + << " edesc:" << tostr(edesc) + << endl; + incrGetCount(); + } + + void onAsyncGetResult(int reqid, const QString &earl, const QString &name, const QByteArray &value) + { + cerr << "onAsyncGetResult() req:" << reqid + << " earl:" << tostr(earl) + << " rdn:" << tostr(name) + << " value:" << tostr(value) + << endl; + incrGetCount(); + } + + + + void onAsyncPutCommitted(int reqid, const QString &earl, const QString &name) + { + cerr << "onAsyncPutCommitted() req:" << reqid + << " earl:" << tostr(earl) + << " rdn:" << tostr(name) + << endl; + incrGetCount(); + } + + void onAsyncPutFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc ) + { + cerr << "onAsyncPutFailed() " + << " earl:" << tostr(earl) + << " ename:" << tostr(ename) + << " edesc:" << tostr(edesc) + << endl; + incrGetCount(); + } + }; +}; + + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + +int main( int argc, const char** argv ) +{ + unsigned long ShowVersion = 0; + unsigned long UseSyncAPI = 0; + const char* Metadata_CSTR = 0; + + struct poptOption optionsTable[] = { + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + { "metadata", 'a', POPT_ARG_STRING, &Metadata_CSTR, 0, + "metadata to extract", 0 }, + + { "sync", 's', POPT_ARG_NONE, &UseSyncAPI, 0, + "use the sync API to read the value", 0 }, + + /* + * Standard Ferris options + */ +// FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* url1 url2 ..."); + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 1 || !Metadata_CSTR ) + { + cerr << "Arguments incorrect!" << endl; +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + if( ShowVersion ) + { + cout << "ferris-internal-metadata-worker" << endl + << "version: $Id: ferris-internal-metadata-broker-direct-client.cpp,v 1.8 2010/09/24 21:31:18 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << endl + << endl + << "Copyright (C) 2007 Ben Martin" << endl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + string RootName = RootNameCSTR; + srcs.push_back( RootName ); + } + + string rdn = Metadata_CSTR; + if( UseSyncAPI ) + { + cout << "using blocking API..." << endl; + } + + try + { + MetadataBrokerClientApp* app = new MetadataBrokerClientApp( argc, (char**)argv ); + broker* client = new broker( + DBUS_SERVER_NAME, DBUS_SERVER_PATH, + QDBusConnection::sessionBus(), app ); + + // { + // bool rc = QDBusConnection::sessionBus().connect( + // DBUS_SERVER_NAME, DBUS_SERVER_PATH, DBUS_SERVER_NAME, "asyncGetResult", + // app, SLOT(onAsyncGetResult(int, const QString&, const QString&, const QByteArray& ))); + // // const QString & service, const QString & path, const QString & interface, + // // const QString & name, QObject * receiver, const char * slot ); + // cerr << "rc:" << rc << endl; + // } + + + QObject::connect( + client, SIGNAL(asyncGetFailed(int, const QString &, int , const QString &, const QString &)), + app, SLOT(onAsyncGetFailed(int, const QString &, int , const QString &, const QString &))); + QObject::connect( + client, SIGNAL(asyncGetResult(int, const QString&, const QString&, const QByteArray& )), + app, SLOT(onAsyncGetResult(int, const QString&, const QString&, const QByteArray& ))); + QObject::connect( + client, SIGNAL(asyncPutFailed(int, const QString &, int , const QString &, const QString &)), + app, SLOT(onAsyncPutFailed(int, const QString &, int , const QString &, const QString &))); + QObject::connect( + client, SIGNAL(asyncPutCommitted(int, const QString&, const QString& )), + app, SLOT(onAsyncPutCommitted(int, const QString&, const QString& ))); + + cerr << "connecting to DBUS_SERVER_NAME:" << DBUS_SERVER_NAME << endl; + cerr << "connecting to DBUS_SERVER_PATH:" << DBUS_SERVER_PATH << endl; + + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + for( ; srcsiter != srcsend ; ++srcsiter ) + { + string earl = *srcsiter; + + if( UseSyncAPI ) + { + cout << Ferris::syncMetadataServerGet( earl, rdn ) << endl; + } + else + { + cout << "rand():" << client->Random() << endl; + cout << "rand():" << client->Random() << endl; + cout << "rand():" << client->Random() << endl; + + cout << "getting earl:" << earl << endl; + cout << client->asyncGet( earl.c_str(), rdn.c_str() ) << endl; + } + } + + if( !UseSyncAPI ) + { + app->exec(); + } + } + catch( exception& e ) + { + cerr << "cought:" << e.what() << endl; + exit(1); + } + + poptFreeContext(optCon); + cout << flush; + return RETURN_CODE; +} + +#include "ferris-internal-metadata-broker-direct-client.moc" diff --git a/apps/metadataserver/ferris-internal-metadata-broker.cpp b/apps/metadataserver/ferris-internal-metadata-broker.cpp new file mode 100644 index 0000000..2782aef --- /dev/null +++ b/apps/metadataserver/ferris-internal-metadata-broker.cpp @@ -0,0 +1,714 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata broker + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-broker.cpp,v 1.8 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "metadata-clients-common.hh" + +#include +#include + +#include "worker_interface.h" +//#include "worker_interface.cpp" +//#include "broker_adaptor.h" +//#include "broker_adaptor.cpp" + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-internal-metadata-broker"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +static const char* DBUS_SERVER_NAME = "com.libferris.Metadata.Broker"; +static const char* DBUS_SERVER_PATH = "/com/libferris/Metadata"; +static const char* WORKER_OBJECT = "com.libferris.Metadata.Worker"; +static string WORKER_PREFIX = (string)WORKER_OBJECT + "."; + +int RETURN_CODE = 0; +bool running = true; + +namespace Ferris +{ + class MetadataBrokerDispatchInformation + : + public Handlable + { + typedef map< string, stringlist_t > m_plugins_t; + + string getEAGeneratorName( const string& earl, + const string& rdn, + bool writable ) + { + LG_MDSERV_D << "getEAGeneratorName(called) earl:" << earl + << " rdn:" << rdn + << " writable:" << writable + << endl; + string ret = ""; + + try + { + fh_context ctx = Resolve( earl ); + LG_MDSERV_D << "resolve()ed ctx:" << ctx->getURL() << endl; + + StaticEAGenFactorys_t fac; + getOutOfProcess_EAGeneratorsStaticFactories( fac ); + + LG_MDSERV_D << "Looking at factories - start... fac.sz:" << fac.size() << endl; + { + StaticEAGenFactorys_t::iterator end = fac.end(); + for( StaticEAGenFactorys_t::iterator fi = fac.begin(); fi != end; ++fi ) + { + Context::fh_MatchedEAGeneratorFactory f = *fi; +// if( f->hasState() ) +// { +// f = f->clone(); +// } + + if( f->hasInterest( ctx ) ) + { + if( StaticGModuleMatchedEAGeneratorFactory* fd = + dynamic_cast(GetImpl( f ))) + { + string sn = fd->getShortName(); + LG_MDSERV_D << "getEAGeneratorName(called) earl:" << earl + << " rdn:" << rdn + << " writable:" << writable + << " sn:" << sn + << endl; + return sn; + } + } + } + } + } + catch( exception& e ) + { + LG_MDSERV_I << "getEAGeneratorName(called) earl:" << earl + << " rdn:" << rdn + << " writable:" << writable + << " e:" << e.what() + << endl; + } + + return ret; + } + + string getImageEAGeneratorName( const string& earl, + const string& rdn, + bool writable ) + { + LG_MDSERV_D << "getImageEAGeneratorName(called) earl:" << earl + << " rdn:" << rdn + << " writable:" << writable + << endl; + + if( isImageMetadataAttribute( rdn ) ) + { + LG_MDSERV_D << "getImageEAGeneratorName(not image metadata) earl:" << earl + << " rdn:" << rdn + << " writable:" << writable + << endl; + return ""; + } + + + string ret = ""; + string nameExtension = ""; + string::size_type pos = earl.rfind('.'); + if( string::npos != pos ) + { + nameExtension = earl.substr( pos+1 ); + } + nameExtension = tolowerstr()( nameExtension ); + + LG_MDSERV_D << "getImageEAGeneratorName() earl:" << earl + << " nameExtension:" << nameExtension + << " writable:" << writable + << endl; + + if( !nameExtension.empty() ) + { + s_ImageEAGeneratorsExtensionToShortName_t& genmap = getOutOfProcess_ImageEAGeneratorsExtensionToShortName(); + s_ImageEAGeneratorsExtensionToShortName_t::iterator giter = genmap.find( nameExtension ); + + LG_MDSERV_D << "getImageEAGeneratorName() earl:" << earl + << " nameExtension:" << nameExtension + << " writable:" << writable + << " genmap.sz:" << genmap.size() + << " found:" << ( giter != genmap.end() ) + << endl; + + if( giter != genmap.end() ) + { + string pshortname = giter->second.first; + bool pwritable = giter->second.second; + + if( !writable || (writable && pwritable) ) + ret = pshortname; + } + } + + return ret; + } + + + public: + MetadataBrokerDispatchInformation() + { + } + ~MetadataBrokerDispatchInformation() + { + } + + string getServiceName( string& earl, const string& name, bool writable = false ) + { + LG_MDSERV_D << "getServiceName() earl:" << earl << " name:" << name << " writable:" << writable << endl; + + string ret = ""; + ret = getImageEAGeneratorName( earl, name, writable ); + if( !ret.empty() ) + { + LG_MDSERV_D << "getServiceName(img) earl:" << earl + << " name:" << name + << " writable:" << writable + << " ret:" << ret + << endl; + return WORKER_PREFIX + ret; + } + + + ret = getEAGeneratorName( earl, name, writable ); + if( !ret.empty() ) + { + LG_MDSERV_D << "getServiceName(ea) earl:" << earl + << " name:" << name + << " writable:" << writable + << " ret:" << ret + << endl; + return WORKER_PREFIX + ret; + } + + + LG_MDSERV_D << "getServiceName(done) earl:" << earl + << " name:" << name + << " writable:" << writable + << " ret:" << ret + << endl; + return ret; + } + + typedef map< std::string, worker* > m_workerCache_t; + m_workerCache_t m_workerCache; + + worker* getWorker( string& earl, const string& name, bool writable = false ) + { + string workerName = getServiceName( earl, name, writable ); + LG_MDSERV_D << "getWorker() earl:" << earl + << " rdn:" << name + << " workerName:" << workerName + << endl; + m_workerCache_t::iterator iter = m_workerCache.find( workerName ); + if( iter != m_workerCache.end() ) + { + worker* client = iter->second; + LG_MDSERV_D << "getWorker() cache for worker:" << workerName + << " client:" << client << endl; + return client; + } + + worker* client = new worker( + workerName.c_str(), DBUS_SERVER_PATH, + QDBusConnection::sessionBus(), 0 ); + LG_MDSERV_D << "getWorker() client:" << client << endl; + m_workerCache.insert( make_pair( workerName, client )); + return client; + } + + + }; + FERRIS_SMARTPTR( MetadataBrokerDispatchInformation, fh_MetadataBrokerDispatchInformation ); +}; + + +namespace Ferris +{ + typedef long reqid_t; + + + class GetOrPut_QDBusPendingCallWatcher + : public QDBusPendingCallWatcher + { + public: + + GetOrPut_QDBusPendingCallWatcher( reqid_t _reqid, + string _earl, + string _attr, + const QDBusPendingCall & call, + QObject * parent = 0 ) + : + QDBusPendingCallWatcher( call, parent ), + reqid( _reqid ), + earl( _earl ), + attr( _attr ) + { + } + + reqid_t reqid; + string earl; + string attr; + }; + + + class MetadataBroker : public QDBusAbstractAdaptor + { + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.libferris.Metadata.Broker"); + ExitOnIdle idler; + + reqid_t m_nextReqID; + fh_MetadataBrokerDispatchInformation m_mdDispatchInfo; + + public: + // typedef QList< QDBusPendingReply > m_pendingGetCalls_t; + // m_pendingGetCalls_t m_pendingGetCalls; + + public slots: + + void asyncGetFireReplySlot(QDBusPendingCallWatcher *bcall) + { + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot()" << endl; + + QDBusPendingReply reply = *bcall; + GetOrPut_QDBusPendingCallWatcher* call + = dynamic_cast(bcall); + + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot() bcall:" << toVoid(bcall) << endl; + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot() call:" << toVoid(call) << endl; + + reqid_t reqid = call->reqid; + string earl = call->earl; + string attr = call->attr; + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot() reqid:" << reqid + << " attr:" << attr + << " earl:" << earl + << endl; + + if( reply.isError() ) + { + LG_MDSERV_D << "asyncGetFireReply(error)" << endl; + QDBusMessage m = reply.reply(); + QString ename = m.errorName(); + QString emsg = m.errorMessage(); + LG_MDSERV_D << "asyncGetFireReply(error) name:" << tostr(ename) << endl; + LG_MDSERV_D << "asyncGetFireReply(error) msg:" << tostr(emsg) << endl; + int ecode = 1; + // emit asyncGetFailed( reqid, earl.c_str(), + // ecode, ename, emsg ); + + QDBusMessage sig = QDBusMessage::createSignal( + "/com/libferris/Metadata", + "com.libferris.Metadata.Broker", + "asyncGetFailed" ); + QList arguments; + arguments << qVariantFromValue((int)reqid) + << qVariantFromValue(QString(earl.c_str())) + << qVariantFromValue((int)ecode) + << qVariantFromValue(ename) + << qVariantFromValue(emsg); + sig.setArguments( arguments ); + bool rc = QDBusConnection::sessionBus().send( sig ); + LG_MDSERV_D << "asyncGetFireReply(failed emit) hand sig rc:" << rc << endl; + } + else + { + QByteArray ba = reply.argumentAt<0>(); + + LG_MDSERV_D << "asyncGetFireReply(ok emit)" + << " reqid:" << reqid + << " attr:" << attr + << " earl:" << earl + << " value:" << tostr(ba) + << endl; + +// emit asyncGetResult( (int)reqid, earl.c_str(), attr.c_str(), ba ); + + QDBusMessage sig = QDBusMessage::createSignal( + "/com/libferris/Metadata", + "com.libferris.Metadata.Broker", + "asyncGetResult" ); + QList arguments; + arguments << qVariantFromValue((int)reqid) + << qVariantFromValue(QString(earl.c_str())) + << qVariantFromValue(QString(attr.c_str())) + << qVariantFromValue(ba); + sig.setArguments( arguments ); + bool rc = QDBusConnection::sessionBus().send( sig ); + LG_MDSERV_D << "asyncGetFireReply(ok emit) hand sig rc:" << rc << endl; + } + + delete bcall; + } + + + void asyncPutFireReplySlot(QDBusPendingCallWatcher *bcall) + { + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot()" << endl; + + QDBusPendingReply reply = *bcall; + GetOrPut_QDBusPendingCallWatcher* call + = dynamic_cast(bcall); + + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot() bcall:" << toVoid(bcall) << endl; + LG_MDSERV_D << "MetadataBroker::asyncGetFireReplySlot() call:" << toVoid(call) << endl; + + reqid_t reqid = call->reqid; + string earl = call->earl; + string attr = call->attr; + + if( reply.isError() ) + { + QDBusMessage m = reply.reply(); + QString ename = m.errorName(); + QString emsg = m.errorMessage(); + LG_MDSERV_D << "asyncGetFireReply(error) name:" << tostr(ename) << endl; + LG_MDSERV_D << "asyncGetFireReply(error) msg:" << tostr(emsg) << endl; + int ecode = 1; + + if( ename == "org.freedesktop.DBus.Error.NoReply" ) + { + } +// emit asyncPutFailed( reqid, earl, ecode, ename, edesc ); + + QDBusMessage sig = QDBusMessage::createSignal( + "/com/libferris/Metadata", + "com.libferris.Metadata.Broker", + "asyncPutFailed" ); + QList arguments; + arguments << qVariantFromValue((int)reqid) + << qVariantFromValue(QString(earl.c_str())) + << qVariantFromValue((int)ecode) + << qVariantFromValue(ename) + << qVariantFromValue(emsg); + sig.setArguments( arguments ); + bool rc = QDBusConnection::sessionBus().send( sig ); + LG_MDSERV_D << "asyncPutFireReplySlot(failed emit) hand sig rc:" << rc << endl; + } + else + { + LG_MDSERV_D << "asyncPutCommitted(ok emit)" + << " reqid:" << reqid + << " attr:" << attr + << " earl:" << earl + << endl; + + +// emit asyncPutCommitted( reqid, earl, attr ); + + QDBusMessage sig = QDBusMessage::createSignal( + "/com/libferris/Metadata", + "com.libferris.Metadata.Broker", + "asyncPutCommitted" ); + QList arguments; + arguments << qVariantFromValue((int)reqid) + << qVariantFromValue(QString(earl.c_str())) + << qVariantFromValue(QString(attr.c_str())); + sig.setArguments( arguments ); + bool rc = QDBusConnection::sessionBus().send( sig ); + LG_MDSERV_D << "asyncPutCommitted(ok emit) hand sig rc:" << rc << endl; + } + + delete bcall; + } + + + public: + + MetadataBroker( QCoreApplication* parent = 0 ); + ~MetadataBroker(); + + bool pingWorker( worker* client, const QDBusMessage &message ); + + public slots: + + int Random() + { + idler.resetIdleTimer(); + LG_MDSERV_D << "random()" << endl; + + static int v = 1; + int ret = v++; + return ret; + } + + int asyncGet(const QString &earl, const QString &name, const QDBusMessage &message); + int asyncPut(const QString &earl, const QString &name, const QByteArray &value, const QDBusMessage &message ); + + signals: + void asyncGetFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); + void asyncGetResult(int reqid, const QString &earl, const QString &name, const QByteArray &value); + void asyncPutCommitted(int reqid, const QString &earl, const QString &name); + void asyncPutFailed(int reqid, const QString &earl, int eno, const QString &ename, const QString &edesc); + + }; + + MetadataBroker::MetadataBroker( QCoreApplication* parent ) + : + QDBusAbstractAdaptor( parent ), + idler( parent ), + m_nextReqID( 10 ), + m_mdDispatchInfo( new MetadataBrokerDispatchInformation() ) + { + idler.resetIdleTimer(); + LG_MDSERV_D << "MetadataBroker()" << endl; + setAutoRelaySignals( true ); + } + + MetadataBroker::~MetadataBroker() + { + LG_MDSERV_D << "~MetadataBroker()" << endl; + } + + bool + MetadataBroker::pingWorker( worker* client, const QDBusMessage &message ) + { + bool ret = true; + + try + { + LG_MDSERV_D << "MetadataBroker::pingWorker()" << endl; + int rc = client->ping(); + LG_MDSERV_D << "MetadataBroker::pingWorker(ok) rc:" << rc << endl; + } + catch( exception& e ) + { + LG_MDSERV_D << "MetadataBroker::pingWorker(failed)" + << " reason:" << e.what() + << endl; + dbus_error( message, "can't ping worker..." ); + return false; + } + return ret; + } + + + int + MetadataBroker::asyncGet(const QString &qearl, const QString &qname, const QDBusMessage &message ) + { + idler.resetIdleTimer(); + int timeout = 10000; + std::string earl = tostr(qearl); + std::string name = tostr(qname); + int ret = ++m_nextReqID; + LG_MDSERV_D << "MetadataBroker::asyncGet(called) earl:" << earl << endl; + + + string workerName = m_mdDispatchInfo->getServiceName( earl, name, false ); + worker* client = m_mdDispatchInfo->getWorker( earl, name, false ); + LG_MDSERV_D << "MetadataBroker::asyncGet() earl:" << earl + << " rdn:" << name << " workerName:" << workerName + << endl; + + if( !pingWorker( client, message )) + { + return 0; + } + + LG_MDSERV_D << "MetadataBroker::asyncGet(calling async_send) earl:" << earl + << " rdn:" << name << " workerName:" << workerName + << endl; + + QList argumentList; + argumentList << qVariantFromValue(qearl) << qVariantFromValue(qname); + QDBusPendingReply reply = client->asyncCallWithArgumentList("get",argumentList); + +// m_pendingGetCalls.push_back( reply ); + GetOrPut_QDBusPendingCallWatcher* watcher = new GetOrPut_QDBusPendingCallWatcher( + ret, earl, name, reply, 0 ); + + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), + this, SLOT(asyncGetFireReplySlot(QDBusPendingCallWatcher*))); + + LG_MDSERV_D << "MetadataBroker::asyncGet(done) earl:" << earl + << " rdn:" << name << " workerName:" << workerName + << endl; + return ret; + } + + int MetadataBroker::asyncPut(const QString &qearl, + const QString &qname, + const QByteArray &qvalue, + const QDBusMessage &message ) + { + idler.resetIdleTimer(); + std::string earl = tostr(qearl); + std::string name = tostr(qname); + std::string value = tostr(qvalue); + int ret = ++m_nextReqID; + LG_MDSERV_D << "MetadataBroker::asyncPut(called) earl:" << earl << endl; + + string workerName = m_mdDispatchInfo->getServiceName( earl, name, false ); + worker* client = m_mdDispatchInfo->getWorker( earl, name, false ); + LG_MDSERV_D << "MetadataBroker::asyncPut() earl:" << earl + << " rdn:" << name << " workerName:" << workerName + << endl; + + if( !pingWorker( client, message )) + { + return 0; + } + + QList argumentList; + argumentList << qVariantFromValue(qearl) + << qVariantFromValue(qname) + << qVariantFromValue(qvalue); + QDBusPendingReply reply = client->asyncCallWithArgumentList("put",argumentList); + GetOrPut_QDBusPendingCallWatcher* watcher = new GetOrPut_QDBusPendingCallWatcher( + ret, earl, name, reply, 0 ); + + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), + this, SLOT(asyncPutFireReplySlot(QDBusPendingCallWatcher*))); + + LG_MDSERV_D << "MetadataBroker::PutGet(done) earl:" << earl + << " rdn:" << name << " workerName:" << workerName + << endl; + return ret; + } +}; + + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + +int main( int argc, const char** argv ) +{ + setForceOutOfProcessMetadataOff( true ); + + unsigned long ShowVersion = 0; + const char* PluginNames_CSTR = 0; + const char* FormatDisplayCSTR = 0; + + struct poptOption optionsTable[] = { + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + /* + * Standard Ferris options + */ +// FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* ..."); + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 1 ) + { + cerr << "Arguments incorrect!" << endl; + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + if( ShowVersion ) + { + cout << "ferris-internal-metadata-worker" << nl + << "version: $Id: ferris-internal-metadata-broker.cpp,v 1.8 2010/09/24 21:31:18 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2010 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + + try + { + LG_MDSERV_D << "broker starting up..." << endl; + QCoreApplication* app = new QCoreApplication( argc, (char**)argv ); + app->setApplicationName("com.libferris.broker"); + + string DBusServerName = "com.libferris.Metadata.Broker"; + // QDBusConnection conn = QDBusConnection::connectToBus ( QDBusConnection::SessionBus, + // DBusServerName.c_str() ); + QDBusConnection conn = QDBusConnection::sessionBus(); + conn.registerService( DBUS_SERVER_NAME ); + + + MetadataBroker* obj = new MetadataBroker( app ); +// broker* b = new broker(obj); + conn.registerObject( "/com/libferris/Metadata", obj, + QDBusConnection::ExportAllSlots + | QDBusConnection::ExportAllSignals + | QDBusConnection::ExportAllProperties + | QDBusConnection::ExportAllContents ); + cerr << "running..." << endl; + app->exec(); + } + catch( NoSuchContextClass& e ) + { + LG_MDSERV_W << "broker error:" << e.what() << endl; + cerr << "e:" << e.what() << endl; + exit(1); + } + catch( exception& e ) + { + LG_MDSERV_W << "broker error:" << e.what() << endl; + cerr << "cought:" << e.what() << endl; + exit(1); + } + + LG_MDSERV_D << "broker exiting..." << endl; + poptFreeContext(optCon); + cout << flush; + return RETURN_CODE; +} + +#include "ferris-internal-metadata-broker.moc" diff --git a/apps/metadataserver/ferris-internal-metadata-worker-direct-client.cpp b/apps/metadataserver/ferris-internal-metadata-worker-direct-client.cpp new file mode 100644 index 0000000..91ecec3 --- /dev/null +++ b/apps/metadataserver/ferris-internal-metadata-worker-direct-client.cpp @@ -0,0 +1,180 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata worker direct client + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-worker-direct-client.cpp,v 1.6 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#define NEW_QBUS_IMPL 1 + +#include "Ferris/MetadataServer_private.hh" +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "worker_interface.h" +#include "worker_interface.cpp" + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-internal-metadata-worker-direct-client"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +static const char* DBUS_SERVER_NAME = "com.libferris.Metadata.Worker"; +static const char* DBUS_SERVER_PATH = "/com/libferris/Metadata"; +int RETURN_CODE = 0; + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + +int main( int argc, const char** argv ) +{ + unsigned long ShowVersion = 0; + const char* Metadata_CSTR = 0; + const char* DBusServerName_CSTR = 0; + + struct poptOption optionsTable[] = { + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + { "metadata", 'a', POPT_ARG_STRING, &Metadata_CSTR, 0, + "metadata to extract", 0 }, + + { "dbus-server-name", 0, POPT_ARG_STRING, &DBusServerName_CSTR, 0, + "name to use for this dbus server object", 0 }, + + /* + * Standard Ferris options + */ +// FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* url1 url2 ..."); + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 1 || !Metadata_CSTR ) + { + cerr << "Arguments incorrect!" << endl; +// poptPrintHelp(optCon, stderr, 0); + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + if( ShowVersion ) + { + cout << "ferris-internal-metadata-worker" << endl + << "version: $Id: ferris-internal-metadata-worker-direct-client.cpp,v 1.6 2010/09/24 21:31:18 ben Exp $\n" + << "Written by Ben Martin, aka monkeyiq" << endl + << endl + << "Copyright (C) 2007 Ben Martin" << endl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + string DBusServerName = DBUS_SERVER_NAME; + if( DBusServerName_CSTR ) + DBusServerName = string("") + DBUS_SERVER_NAME + "." + DBusServerName_CSTR; + + + stringlist_t srcs; + while( const char* RootNameCSTR = poptGetArg(optCon) ) + { + string RootName = RootNameCSTR; + srcs.push_back( RootName ); + } + + string rdn = Metadata_CSTR; + + try + { + QCoreApplication* app = new QCoreApplication( argc, (char**)argv ); + worker* client = new worker( + DBusServerName.c_str(), DBUS_SERVER_PATH, + QDBusConnection::sessionBus(), app ); + + stringlist_t::iterator srcsiter = srcs.begin(); + stringlist_t::iterator srcsend = srcs.end(); + for( ; srcsiter != srcsend ; ++srcsiter ) + { + string earl = *srcsiter; + + QByteArray ba = client->get( earl.c_str(), rdn.c_str() ); + cout << tostr(ba) << endl; + } + } + catch( exception& e ) + { + cerr << "cought:" << e.what() << endl; + exit(1); + } + + poptFreeContext(optCon); + cout << flush; + return RETURN_CODE; +} + + +// ~std::cout +// << +// net::sf::witme::Libferris::Metadata::Worker::get(const DBus::String&, +// const DBus::String&)(((const DBus::String&)((const DBus::String*)(& earl))), +// ((const DBus::String&)((const DBus::String*)(& rdn))))~ + diff --git a/apps/metadataserver/ferris-internal-metadata-worker.cpp b/apps/metadataserver/ferris-internal-metadata-worker.cpp new file mode 100644 index 0000000..2973f31 --- /dev/null +++ b/apps/metadataserver/ferris-internal-metadata-worker.cpp @@ -0,0 +1,284 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata worker + Copyright (C) 2007 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-worker.cpp,v 1.6 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "metadata-clients-common.hh" +//#include "worker_adaptor.h" + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferris-internal-metadata-worker"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +int RETURN_CODE = 0; + +namespace Ferris +{ + class MetadataWorker : public QDBusAbstractAdaptor + { + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.libferris.Metadata.Worker"); + ExitOnIdle idler; + + typedef stringset_t m_pluginNames_t; + m_pluginNames_t m_pluginNames; + + public: + + MetadataWorker( const stringset_t& pluginNames, QObject *parent = 0 ); + ~MetadataWorker(); + + public slots: + int ping(); + QByteArray get(const QString &earl, const QString &name, const QDBusMessage &message ); + void set(const QString &earl, const QString &name, const QByteArray &value, const QDBusMessage &message); + }; + + MetadataWorker::MetadataWorker( const stringset_t& pluginNames, QObject *parent ) + : + QDBusAbstractAdaptor( parent ), + idler( (QCoreApplication*)parent ), + m_pluginNames( pluginNames ) + { + idler.resetIdleTimer(); + LG_MDSERV_D << "MetadataWorker()" << endl; + } + + MetadataWorker::~MetadataWorker() + { + LG_MDSERV_D << "~MetadataWorker()" << endl; + } + + QByteArray + MetadataWorker::get(const QString &qearl, const QString &qeaname, const QDBusMessage &message ) + { + idler.resetIdleTimer(); + + cerr << "MetadataWorker::get() " << endl; + LG_MDSERV_I << "MetadataWorker::get() " << endl; + + std::string earl = tostr(qearl); + std::string eaname = tostr(qeaname); + + LG_MDSERV_I << "MetadataWorker::get() url:" << earl << " eaname:" << eaname << endl; + + stringstream ss; + try + { + fh_context c = Resolve( earl ); + + LG_MDSERV_D << "MetadataWorker::get() calling getStrAttr()." + << " url:" << earl << " eaname:" << eaname << endl; + + std::string v = c->getStrAttr_UsingRestrictedPlugins( eaname, m_pluginNames ); +// ss << v; + + LG_MDSERV_D << "MetadataWorker::get(ok) url:" << earl + << " eaname:" << eaname + << " ret.sz:" << v.size() + << endl; + if( eaname != "rgba-32bpp" ) + { + LG_MDSERV_D << "MetadataWorker::get(ok) url:" << earl + << " eaname:" << eaname + << " ret:" << v + << endl; + } + + QByteArray ba = toba( v ); + return ba; + } + catch( exception& e ) + { + ss << "MetadataExtractionError:" << e.what(); + cerr << ss.str() << endl; + LG_MDSERV_W << "MetadataWorker::get(fail) url:" << earl + << " eaname:" << eaname + << " e:" << ss.str() + << endl; + dbus_error( message, ss ); + } + return QByteArray(); + } + + + + void + MetadataWorker::set(const QString &earl, + const QString &name, + const QByteArray &value, + const QDBusMessage &message ) + { + idler.resetIdleTimer(); + + LG_MDSERV_ER << "MetadataWorker::set() not implemented!" << endl; + dbus_error( message, "MetadataWorker::set() not implemented yet!" ); + } + + int + MetadataWorker::ping() + { + idler.resetIdleTimer(); + + cerr << "MetadataWorker::ping()" << endl; + LG_MDSERV_D << "MetadataWorker::ping()" << endl; + + int t = time( 0 ); + return t; + } +}; + + + + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +using namespace Ferris; + +int main( int argc, const char** argv ) +{ + setForceOutOfProcessMetadataOff( true ); + + unsigned long ShowVersion = 0; + const char* PluginNames_CSTR = 0; + const char* FormatDisplayCSTR = 0; + const char* DBusServerName_CSTR = 0; + + struct poptOption optionsTable[] = { + + { "version", 0, POPT_ARG_NONE, &ShowVersion, 0, + "show version information and quit", 0 }, + + { "plugin-names", 0, POPT_ARG_STRING, &PluginNames_CSTR, 0, + "comma seperated list of plugins to use for metadata handling", 0 }, + + { "dbus-server-name", 0, POPT_ARG_STRING, &DBusServerName_CSTR, 0, + "name to use for this dbus server object", 0 }, + + /* + * Standard Ferris options + */ +// FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* ..."); + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 1 || !PluginNames_CSTR ) + { + cerr << "Arguments incorrect!" << endl; + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + if( ShowVersion ) + { + cout << "ferris-internal-metadata-worker" << nl + << "version: $Id: ferris-internal-metadata-worker.cpp,v 1.6 2010/09/24 21:31:18 ben Exp $\n" + << "ferris version: " << VERSION << nl + << "Written by Ben Martin, aka monkeyiq" << nl + << nl + << "Copyright (C) 2007 Ben Martin" << nl + << "This is free software; see the source for copying conditions. There is NO\n" + << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + << endl; + exit(0); + } + + string DBusServerName = "com.libferris.Metadata.Worker"; + if( DBusServerName_CSTR ) + DBusServerName = DBusServerName_CSTR; + + + stringset_t pluginNames; + Util::parseCommaSeperatedList( PluginNames_CSTR, pluginNames ); + + LG_MDSERV_D << "about to start new worker process" << endl; + LG_MDSERV_D << "Registering as:" << DBusServerName << endl; + + try + { + QCoreApplication* app = new QCoreApplication( argc, (char**)argv ); + app->setApplicationName("com.libferris"); + + QDBusConnection conn = QDBusConnection::connectToBus ( QDBusConnection::SessionBus, + DBusServerName.c_str() ); + conn.registerService( DBusServerName.c_str() ); + + MetadataWorker* w = new MetadataWorker( pluginNames, app ); + conn.registerObject( "/com/libferris/Metadata", w, + QDBusConnection::ExportAllSlots + | QDBusConnection::ExportAllSignals + | QDBusConnection::ExportAllProperties + | QDBusConnection::ExportAllContents ); + cerr << "running..." << endl; + app->exec(); + } + catch( NoSuchContextClass& e ) + { + cerr << "e:" << e.what() << endl; + LG_MDSERV_W << "Worker process exiting with error:" << e.what() << endl; + exit(1); + } + catch( exception& e ) + { + cerr << "cought:" << e.what() << endl; + LG_MDSERV_W << "Worker process exiting with error:" << e.what() << endl; + exit(1); + } + + poptFreeContext(optCon); + cout << flush; + LG_MDSERV_D << "Worker process exiting" << endl; + return RETURN_CODE; +} + +#include "ferris-internal-metadata-worker.moc" diff --git a/apps/metadataserver/metadata-clients-common.cpp b/apps/metadataserver/metadata-clients-common.cpp new file mode 100644 index 0000000..6cdca5e --- /dev/null +++ b/apps/metadataserver/metadata-clients-common.cpp @@ -0,0 +1,79 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata dbus stuff + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-worker.cpp,v 1.4 2008/04/27 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include "metadata-clients-common.hh" + +namespace Ferris +{ + ExitOnIdle::ExitOnIdle( QCoreApplication* app ) + : + m_app(app) + { + m_timer = new QTimer(this); + connect(m_timer, SIGNAL(timeout()), this, SLOT(exitApp())); + resetIdleTimer(); + } + ExitOnIdle::~ExitOnIdle() + { + if(m_timer) + m_timer->stop(); + } + + void + ExitOnIdle::resetIdleTimer() + { + m_timer->stop(); + m_timer->start( 30 * 1000 ); + } + void + ExitOnIdle::exitApp() + { + std::cout << endl; + std::cerr << "been idle too long, exiting..." << endl; + m_app->exit(0); + } + + ////////////////////////// + ////////////////////////// + ////////////////////////// + + void dbus_error( const QDBusMessage &message, const std::string& desc ) + { + QDBusMessage reply = message.createErrorReply( QDBusError::Failed, desc.c_str() ); + QDBusConnection::sessionBus().send( reply ); + } + void dbus_error( const QDBusMessage &message, std::stringstream& ss ) + { + dbus_error( message, ss.str() ); + } + + +}; + +#include "metadata-clients-common.moc" diff --git a/apps/metadataserver/metadata-clients-common.hh b/apps/metadataserver/metadata-clients-common.hh new file mode 100644 index 0000000..63a3407 --- /dev/null +++ b/apps/metadataserver/metadata-clients-common.hh @@ -0,0 +1,86 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris internal metadata dbus stuff + Copyright (C) 2010 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-internal-metadata-worker.cpp,v 1.4 2008/04/27 21:30:11 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#ifndef _ALREADY_INCLUDED_FERRIS_METADATA_CLIENTS_COMMON_H_ +#define _ALREADY_INCLUDED_FERRIS_METADATA_CLIENTS_COMMON_H_ + +#define NEW_QBUS_IMPL 1 +#include "config.h" +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +namespace Ferris +{ + class ExitOnIdle : QObject + { + Q_OBJECT + QCoreApplication* m_app; + QTimer* m_timer; + public: + ExitOnIdle( QCoreApplication* app ); + ~ExitOnIdle(); + + public slots: + + void resetIdleTimer(); + void exitApp(); + }; + + + void dbus_error( const QDBusMessage &message, const std::string& desc ); + void dbus_error( const QDBusMessage &message, std::stringstream& ss ); + + +#define DBUS_MARSHALL_EXCEPTIONS \ + catch( FerrisExceptionBase& e ) \ + { \ + dbus_error( message, e.what() ); \ + } \ + catch( std::exception& e ) \ + { \ + dbus_error( message, e.what() ); \ + } \ + catch( ... ) \ + { \ + dbus_error( message, "unknown catch all (...) exception!" ); \ + } + +}; + +#endif diff --git a/apps/metadataserver/mocimpls.cpp b/apps/metadataserver/mocimpls.cpp new file mode 100644 index 0000000..e69de29 diff --git a/apps/mv/Makefile.am b/apps/mv/Makefile.am new file mode 100644 index 0000000..bacb963 --- /dev/null +++ b/apps/mv/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferrismv + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferrismv_SOURCES = ferrismv.cpp +ferrismv_LDADD = -lpopt @LIBFERRIS_LA@ +ferrismv_LDFLAGS = @GLIB_LIBS@ + + diff --git a/apps/mv/Makefile.in b/apps/mv/Makefile.in new file mode 100644 index 0000000..baa7c74 --- /dev/null +++ b/apps/mv/Makefile.in @@ -0,0 +1,991 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferrismv$(EXEEXT) +subdir = apps/mv +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferrismv_OBJECTS = ferrismv.$(OBJEXT) +ferrismv_OBJECTS = $(am_ferrismv_OBJECTS) +ferrismv_DEPENDENCIES = +ferrismv_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ferrismv_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferrismv_SOURCES) +DIST_SOURCES = $(ferrismv_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + -I/usr/local/include \ + @CFLAGS@ + +ferrismv_SOURCES = ferrismv.cpp +ferrismv_LDADD = -lpopt @LIBFERRIS_LA@ +ferrismv_LDFLAGS = @GLIB_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/mv/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/mv/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferrismv$(EXEEXT): $(ferrismv_OBJECTS) $(ferrismv_DEPENDENCIES) + @rm -f ferrismv$(EXEEXT) + $(ferrismv_LINK) $(ferrismv_OBJECTS) $(ferrismv_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferrismv.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/mv/ferrismv.cpp b/apps/mv/ferrismv.cpp new file mode 100644 index 0000000..2e5b54e --- /dev/null +++ b/apps/mv/ferrismv.cpp @@ -0,0 +1,163 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris mv + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferrismv.cpp,v 1.5 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "ferrismv"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +int main( int argc, const char** argv ) +{ + fh_mv fmv = new FerrisMv(); + + const char* DstNameCSTR = 0; + + struct poptOption optionsTable[] = + { + { "target-directory", 0, POPT_ARG_STRING, &DstNameCSTR, 0, + "Specify destination explicity, all remaining URLs are assumed to be source files", + "DIR" }, + + FERRIS_MOVE_OPTIONS( fmv ) + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ... dst"); + + if (argc < 3) + { + poptPrintHelp(optCon, stderr, 0); +// poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + /* Now do options processing, get portname */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { + } + + fmv->getPoptCollector()->ArgProcessingDone( optCon ); + + try + { + typedef stringlist_t srcs_t; + srcs_t srcs; + + srcs = expandShellGlobs( srcs, optCon ); + + if( srcs.empty() ) + { + cerr << "No objects need to be moved\n" << endl; + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + /* + * Setup the destination from either explicit command line or last arg + */ + string DstName; + if( DstNameCSTR ) + { + DstName = DstNameCSTR; + } + else + { + DstName = srcs.back(); + srcs.pop_back(); + } + + fmv->setDstURL( DstName ); + + /* + * See if user is smoking crack + */ + if( srcs.empty() ) + { + cerr << "not enough source urls given" << endl; + poptPrintUsage(optCon, stderr, 0); + exit(1); + } + + bool MovingToDir = srcs.size() > 1; + try + { + fh_context c = Resolve( DstName ); + if( toint( getStrAttr( c, "is-dir-try-automounting", "0" ))) + { + MovingToDir = true; + } + } + catch( NoSuchSubContext& e ) + { + } + fmv->setMovingToDir( MovingToDir ); + + +// cerr << "dst:" << DstName << endl; + + for( srcs_t::iterator iter = srcs.begin(); iter != srcs.end(); ++iter ) + { + string SrcName = *iter; +// cerr << "src:" << SrcName << endl; + + fmv->setSrcURL( SrcName ); + fmv->move(); + } + } + catch( exception& e ) + { + cerr << "Error:" << e.what() << endl; + } + + poptFreeContext(optCon); + return 0; +} + + diff --git a/apps/namespaces/Makefile.am b/apps/namespaces/Makefile.am new file mode 100644 index 0000000..bbcff60 --- /dev/null +++ b/apps/namespaces/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = fnamespace + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fnamespace_SOURCES = fnamespace.cpp +fnamespace_LDADD = -lpopt @LIBFERRIS_LA@ +fnamespace_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/namespaces/Makefile.in b/apps/namespaces/Makefile.in new file mode 100644 index 0000000..1b12b31 --- /dev/null +++ b/apps/namespaces/Makefile.in @@ -0,0 +1,992 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fnamespace$(EXEEXT) +subdir = apps/namespaces +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_fnamespace_OBJECTS = fnamespace.$(OBJEXT) +fnamespace_OBJECTS = $(am_fnamespace_OBJECTS) +fnamespace_DEPENDENCIES = +fnamespace_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(fnamespace_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fnamespace_SOURCES) +DIST_SOURCES = $(fnamespace_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +fnamespace_SOURCES = fnamespace.cpp +fnamespace_LDADD = -lpopt @LIBFERRIS_LA@ +fnamespace_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/namespaces/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/namespaces/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fnamespace$(EXEEXT): $(fnamespace_OBJECTS) $(fnamespace_DEPENDENCIES) + @rm -f fnamespace$(EXEEXT) + $(fnamespace_LINK) $(fnamespace_OBJECTS) $(fnamespace_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnamespace.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/namespaces/fnamespace.cpp b/apps/namespaces/fnamespace.cpp new file mode 100644 index 0000000..6857e6e --- /dev/null +++ b/apps/namespaces/fnamespace.cpp @@ -0,0 +1,168 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + fnamespace command line client + Copyright (C) 2003 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: fnamespace.cpp,v 1.3 2010/09/24 21:31:18 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error +*/ + +#include + +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; + +const string PROGRAM_NAME = "fnamespace"; + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +int main( int argc, char** argv ) +{ + int exit_status = 0; + const char* Prefix_CSTR = 0; + const char* URI_CSTR = 0; + unsigned long SetMode = 0; + unsigned long GetMode = 0; + unsigned long ListMode = 0; + unsigned long Verbose = 0; + + try + { + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "prefix", 'p', POPT_ARG_STRING, &Prefix_CSTR, 0, + "prefix to use", "" }, + + { "uri", 'a', POPT_ARG_STRING, &URI_CSTR, 0, + "URI to set prefix to use", "" }, + + { "set", 's', POPT_ARG_NONE, &SetMode, 0, + "set URI for given prefix", "" }, + + { "get", 'g', POPT_ARG_NONE, &GetMode, 0, + "get URI for given prefix", "" }, + + { "list-prefixes", 'l', POPT_ARG_NONE, &ListMode, 0, + "list active prefixes and their resolution for a context", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* src1 src2 ..."); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + { +// switch (c) { +// } + } + + if (argc < 2 ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if( SetMode && ( !Prefix_CSTR || !URI_CSTR )) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + if( GetMode && !Prefix_CSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + + while( const char* tmpCSTR = poptGetArg(optCon) ) + { + try + { + string srcURL = tmpCSTR; + fh_context c = Resolve( srcURL ); + + if( ListMode ) + { + stringlist_t sl = c->getNamespacePrefixes(); + + cerr << "listing prefixes in use for context," << endl + << " c:" << c->getURL() << endl; + + for( stringlist_t::iterator si = sl.begin(); si!=sl.end(); ++si ) + { + cerr << *si << " = " << c->resolveNamespace( *si ) << endl; + } + } + else if( SetMode ) + { + c->setNamespace( Prefix_CSTR, URI_CSTR ); + } + else if( GetMode ) + { + c->resolveNamespace( Prefix_CSTR ); + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit_status = 1; + } + } + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/oprocdeamon/Makefile.am b/apps/oprocdeamon/Makefile.am new file mode 100644 index 0000000..cc0bc49 --- /dev/null +++ b/apps/oprocdeamon/Makefile.am @@ -0,0 +1,20 @@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in + +bin_PROGRAMS = ferris-out-of-proc-notification-deamon + +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_out_of_proc_notification_deamon_SOURCES = ferris-out-of-proc-notification-deamon.cpp +ferris_out_of_proc_notification_deamon_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_out_of_proc_notification_deamon_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ + diff --git a/apps/oprocdeamon/Makefile.in b/apps/oprocdeamon/Makefile.in new file mode 100644 index 0000000..ec602f4 --- /dev/null +++ b/apps/oprocdeamon/Makefile.in @@ -0,0 +1,996 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ferris-out-of-proc-notification-deamon$(EXEEXT) +subdir = apps/oprocdeamon +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ferris_out_of_proc_notification_deamon_OBJECTS = \ + ferris-out-of-proc-notification-deamon.$(OBJEXT) +ferris_out_of_proc_notification_deamon_OBJECTS = \ + $(am_ferris_out_of_proc_notification_deamon_OBJECTS) +ferris_out_of_proc_notification_deamon_DEPENDENCIES = +ferris_out_of_proc_notification_deamon_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(ferris_out_of_proc_notification_deamon_LDFLAGS) $(LDFLAGS) \ + -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ferris_out_of_proc_notification_deamon_SOURCES) +DIST_SOURCES = $(ferris_out_of_proc_notification_deamon_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = \ + @STLPORT_CFLAGS@ \ + @SIGC_CFLAGS@ \ + -I. \ + -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/src \ + -I$(top_builddir) \ + -I$(includedir) \ + @GLIB_CFLAGS@ \ + @CFLAGS@ + +ferris_out_of_proc_notification_deamon_SOURCES = ferris-out-of-proc-notification-deamon.cpp +ferris_out_of_proc_notification_deamon_LDADD = -lpopt @LIBFERRIS_LA@ +ferris_out_of_proc_notification_deamon_LDFLAGS = $(GLIB_LIBS) @SIGC_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/oprocdeamon/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/oprocdeamon/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ferris-out-of-proc-notification-deamon$(EXEEXT): $(ferris_out_of_proc_notification_deamon_OBJECTS) $(ferris_out_of_proc_notification_deamon_DEPENDENCIES) + @rm -f ferris-out-of-proc-notification-deamon$(EXEEXT) + $(ferris_out_of_proc_notification_deamon_LINK) $(ferris_out_of_proc_notification_deamon_OBJECTS) $(ferris_out_of_proc_notification_deamon_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ferris-out-of-proc-notification-deamon.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/oprocdeamon/ferris-out-of-proc-notification-deamon.cpp b/apps/oprocdeamon/ferris-out-of-proc-notification-deamon.cpp new file mode 100644 index 0000000..d596350 --- /dev/null +++ b/apps/oprocdeamon/ferris-out-of-proc-notification-deamon.cpp @@ -0,0 +1,408 @@ +/****************************************************************************** +******************************************************************************* +******************************************************************************* + + ferris-out-of-proc-notification-deamon + Copyright (C) 2002 Ben Martin + + libferris is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + libferris is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libferris. If not, see . + + For more details see the COPYING file in the root directory of this + distribution. + + $Id: ferris-out-of-proc-notification-deamon.cpp,v 1.6 2010/09/24 21:31:19 ben Exp $ + +******************************************************************************* +******************************************************************************* +******************************************************************************/ + +/* + * return 0 for success + * return 1 for generic error + * return 2 if cant create incoming fifo + * return 3 if cant open incoming fifo + **/ + + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace Ferris; +using namespace Ferris::OProcMessage; + +const string PROGRAM_NAME = "ferris-out-of-proc-notification-deamon"; +string TargetDir = ""; +unsigned long Verbose = 0; + + +void usage(poptContext optCon, int exitcode, char *error, char *addl) +{ + poptPrintUsage(optCon, stderr, 0); + if (error) fprintf(stderr, "%s: %s0", error, addl); + exit(exitcode); +} + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ + +void writePID( pid_t pid = 0 ) +{ + stringstream ss; + ss << pid; + string path = TargetDir + "/pid"; + int fd = open( path.c_str(), O_WRONLY | O_CREAT | O_TRUNC ); + write( fd, ss.str().c_str(), ss.str().length() ); + close( fd ); + +// fh_context c = Shell::acquireContext( TargetDir ); +// fh_context s = Shell::acquireSubContext( c, "pid" ); +// setStrAttr( s, "content", tostr( pid ) ); +} + +void sig_term_cb(int sign) +{ + try + { + LG_JOURNAL_W << "closing server at:" << getpid() << endl; + writePID( 0 ); + } + catch( ... ) + {} + exit(0); +} + +void sig_usr1_cb(int sign) +{ +} + +void sig_usr2_cb(int sign) +{ + /* ping */ + if( Verbose ) + { + cerr << "got a ping! pid:" << getpid() << endl; + LG_JOURNAL_W << "got a ping! pid:" << getpid() << endl; + } +} + +void +setupSignalHandlers() +{ + struct sigaction newinth; + newinth.sa_handler = sig_term_cb; + sigemptyset(&newinth.sa_mask); + newinth.sa_flags = SA_RESTART; + if( -1 == sigaction( SIGTERM, &newinth, NULL)) + { + cerr << "ERROR: signal handling is not active. " << endl; + exit(2); + } + + newinth.sa_handler = sig_usr1_cb; + sigemptyset(&newinth.sa_mask); + newinth.sa_flags = SA_RESTART; + if( -1 == sigaction( SIGUSR1, &newinth, NULL)) + { + cerr << "ERROR: signal handling is not active. " << endl; + exit(2); + } + + newinth.sa_handler = sig_usr2_cb; + sigemptyset(&newinth.sa_mask); + newinth.sa_flags = SA_RESTART; + if( -1 == sigaction( SIGUSR2, &newinth, NULL)) + { + cerr << "ERROR: signal handling is not active. " << endl; + exit(2); + } +} + +static string infifopath = ""; +static string outfifopath = ""; +static fh_context outfifoc = 0; + +typedef map< string, int > outgoing_t; +outgoing_t outgoing; + +void xml_msg_arrived( fh_xstreamcol h ) +{ + cerr << "xml_msg_arrived(begin)" << endl; + + const std::string& msg = h->getXMLString(); + stringmap_t& m = h->getStringMap(); + + const string& pid = m[ KEY_OBAND_PID ]; + LG_JOURNAL_W << "ferris-oproc from pid:" << pid << " msg:" << msg << endl; + + cerr << "xml_msg_arrived(1)" << endl; + + /* + * Check for new fifos + */ + ImplicitIteratorUpdateLock ciLock; + for( Context::iterator ci = outfifoc->begin(); ci != outfifoc->end(); ++ci ) + { + string rdn = (*ci)->getDirName(); + string path = (*ci)->getDirPath(); + + if( outgoing.find( rdn ) != outgoing.end() ) + continue; + + cerr << "Discovered new outgoing pipe at:" << (*ci)->getURL() << endl; + int fd = open( path.c_str(), O_RDWR | O_NONBLOCK ); + if( fd == -1 ) + { + string es = errnum_to_string( "", errno ); + fh_stringstream ss; + ss << "Can not open fifo for incomming requests at:" << path << endl + << " reason:" << es << endl; + LG_JOURNAL_ER << tostr(ss) << endl; + } + + LG_JOURNAL_D << "Discovered new outgoing pipe at url:" << (*ci)->getURL() + << " path:" << path + << " rdn:" << rdn + << " fd:" << fd + << endl; + + cerr << "unlink1 :" << path << " rdn:" << rdn << endl; + if( int r = unlink( path.c_str() )) + { + string es = errnum_to_string( "", errno ); + fh_stringstream ss; + ss << "Can not remove opened fifo for incomming requests at:" << path << endl + << " reason:" << es << endl; + LG_JOURNAL_ER << tostr(ss) << endl; + cerr << tostr(ss) << endl; + } + cerr << "unlink2 :" << path << " rdn:" << rdn << endl; + outgoing[ rdn ] = fd; + LG_JOURNAL_D << "unlinked new pipe from:" << path + << " rdn:" << rdn + << " fd:" << fd + << endl; + } + cerr << "xml_msg_arrived(2)" << endl; + cerr << "xml_msg_arrived(3) msg:" << msg << endl; + + /* + * Write to each proc, warn if one has died and remove it from write list. + */ + for( outgoing_t::iterator fi = outgoing.begin(); fi != outgoing.end(); ++fi ) + { + string rdn = fi->first; + int fd = fi->second; + + LG_JOURNAL_D << "Sending notification rdn:" << rdn << " msg:" << msg << endl; + + if( rdn == pid ) + { + LG_JOURNAL_D << "Detected that message came from pid:" << pid + << " not sending it back" << endl; + continue; + } + + cerr << "Sending notification rdn:" << rdn << " msg:" << msg << endl; + + ssize_t bwrite = write( fd, msg.data(), msg.length() ); + if( msg.length() != bwrite ) + { + int en = errno; + string es = errnum_to_string( "", errno ); + fh_stringstream ss; + ss << "Error writing rdn:" << rdn << " msg:" << msg << " to proc:" << rdn + << " bwrite:" << bwrite + << " msg.length:" << msg.length() + << " errno:" << en + << " reason:" << es + << endl; + LG_JOURNAL_ER << tostr(ss) << endl; + } + } + + +// // for( Context::iterator ci = outfifoc->begin(); ci != outfifoc->end(); ++ci ) +// // { +// // string rdn = (*ci)->getDirName(); +// // if( rdn != pid ) +// // { +// // if( Verbose ) +// // LG_JOURNAL_W << "Sending pid:" << rdn << " msg:" << msg << endl; +// // fh_iostream ioss = (*ci)->getIOStream(); +// // ioss << msg << flush; +// // } +// // } + + + cerr << "xml_msg_arrived(end)" << endl; +} + + +int main( int argc, char** argv ) +{ + Factory::setDontConnectWithFerrisOutOfProcDeamon( true ); + + int exit_status = 0; + + try + { + unsigned long DontStartAsDaemon = 0; + unsigned long DontRecreateFIFO = 0; + unsigned long NiceValue = 5; + const char* TargetDirCSTR = 0; + + struct poptOption optionsTable[] = + { + { "verbose", 'v', POPT_ARG_NONE, &Verbose, 0, + "show what is happening", "" }, + + { "dont-daemon", 'D', POPT_ARG_NONE, &DontStartAsDaemon, 0, + "Dont detach as a daemon", "" }, + + { "dont-recreate-fifo", 0, POPT_ARG_NONE, &DontRecreateFIFO, 0, + "Dont remake client to server fifo", "" }, + + { "target-directory", 0, POPT_ARG_STRING, &TargetDirCSTR, 0, + "(NEEDED) Specify the root for the client to server communication fifos", "" }, + + { "nice-value", 0, POPT_ARG_INT, &NiceValue, 0, + "Run deamon at nice value (default 5)", "" }, + + FERRIS_POPT_OPTIONS + POPT_AUTOHELP + POPT_TABLEEND + }; + poptContext optCon; + + optCon = poptGetContext(PROGRAM_NAME.c_str(), argc, (const char**)argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[OPTIONS]* "); + + /* Now do options processing */ + int c=-1; + while ((c = poptGetNextOpt(optCon)) >= 0) + {} + + if (argc < 2 || !TargetDirCSTR ) + { + poptPrintHelp(optCon, stderr, 0); + exit(1); + } + + { + fh_context c = Shell::acquireContext( TargetDirCSTR ); + TargetDir = c->getDirPath(); + } + + string lockPath = TargetDir + "/" + "lockfile"; + ExitIfAlreadyRunning( lockPath ); + + infifopath = appendToServPath( TargetDir ); + outfifopath = appendFromServPrefix( TargetDir ); + + int fd = -1; + + cerr << "infifopath:" << infifopath << endl; + + if( !DontStartAsDaemon ) + { + SwitchToDaemonMode(); + } + + setupSignalHandlers(); + LG_JOURNAL_W << "server starting at pid:" << getpid() << endl; + writePID( getpid() ); + LG_JOURNAL_W << "written PID pid:" << getpid() << endl; + + if( DontRecreateFIFO ) + { + LG_JOURNAL_W << "opening read only incoming pipe at:" << infifopath << endl; + fd = open( infifopath.c_str(), O_RDONLY ); + if( fd == -1 ) + { + string es = errnum_to_string( "", errno ); + cerr << "Can not open fifo for incomming requests at:" << infifopath << endl + << " reason:" << es << endl + << "exiting" << endl; + LG_JOURNAL_W << "Can not open fifo for incomming requests at:" << infifopath << endl + << " reason:" << es << endl + << "exiting" << endl; + return( 3 ); + } + close( fd ); + fd = open( infifopath.c_str(), O_RDWR | O_NONBLOCK ); + if( fd == -1 ) + { + string es = errnum_to_string( "", errno ); + cerr << "Can not open fifo for incomming requests at:" << infifopath << endl + << " reason:" << es << endl + << "exiting" << endl; + LG_JOURNAL_W << "Can not open fifo for incomming requests at:" << infifopath << endl + << " reason:" << es << endl + << "exiting" << endl; + return( 3 ); + } + LG_JOURNAL_W << "opened read only incoming pipe at:" << infifopath << endl; + } + else + { + fd = Factory::MakeFIFO( infifopath, true, O_RDWR | O_NONBLOCK ); + } + outfifoc = Shell::acquireContext( outfifopath ); + + nice( NiceValue ); + + fh_aiohandler aio = new AsyncIOHandler( fd ); + fh_xstreamcol xs = Factory::MakeXMLStreamCol(); + xs->attach( aio ); + xs->getMessageArrivedSig().connect( sigc::ptr_fun( xml_msg_arrived )); + + setupSignalHandlers(); + LG_JOURNAL_W << "server starting at pid:" << getpid() << endl; + writePID( getpid() ); + + GMainContext* gmc = g_main_context_default(); + GMainLoop* gml = g_main_loop_new( gmc, 0 ); + g_main_loop_run( gml ); + g_main_destroy( gml ); + } + catch( CreateFIFO& e ) + { + cerr << "error:" << e.what() << endl; + exit(2); + } + catch( exception& e ) + { + cerr << "error:" << e.what() << endl; + exit(1); + } + return exit_status; +} + + diff --git a/apps/phpsearchinterface/Makefile.am b/apps/phpsearchinterface/Makefile.am new file mode 100644 index 0000000..291a0b6 --- /dev/null +++ b/apps/phpsearchinterface/Makefile.am @@ -0,0 +1,9 @@ + +SUBDIRS = dhtmlxSuite + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = $(srcdir)/*.xsl $(srcdir)/*.php + + + diff --git a/apps/phpsearchinterface/Makefile.in b/apps/phpsearchinterface/Makefile.in new file mode 100644 index 0000000..78c2a57 --- /dev/null +++ b/apps/phpsearchinterface/Makefile.in @@ -0,0 +1,1026 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/phpsearchinterface +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = dhtmlxSuite + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = $(srcdir)/*.xsl $(srcdir)/*.php +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/phpsearchinterface/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/phpsearchinterface/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/phpsearchinterface/dhtmlxSuite/Makefile.am b/apps/phpsearchinterface/dhtmlxSuite/Makefile.am new file mode 100644 index 0000000..5d0a390 --- /dev/null +++ b/apps/phpsearchinterface/dhtmlxSuite/Makefile.am @@ -0,0 +1,8 @@ + + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = $(srcdir)/*.xsl $(srcdir)/*.php + + + diff --git a/apps/phpsearchinterface/dhtmlxSuite/Makefile.in b/apps/phpsearchinterface/dhtmlxSuite/Makefile.in new file mode 100644 index 0000000..638e56e --- /dev/null +++ b/apps/phpsearchinterface/dhtmlxSuite/Makefile.in @@ -0,0 +1,823 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = apps/phpsearchinterface/dhtmlxSuite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ferrismacros.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ +ANNODEX_LIBS = @ANNODEX_LIBS@ +ANTLR = @ANTLR@ +ANTLR_H = @ANTLR_H@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ +BEAGLE_LIBS = @BEAGLE_LIBS@ +BONOBO_CFLAGS = @BONOBO_CFLAGS@ +BONOBO_LIBS = @BONOBO_LIBS@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +BZIP2_CFLAGS = @BZIP2_CFLAGS@ +BZIP2_LIBS = @BZIP2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CGICC_CFLAGS = @CGICC_CFLAGS@ +CGICC_LIBS = @CGICC_LIBS@ +CLIENTUI_APP_CFLAGS = @CLIENTUI_APP_CFLAGS@ +CLIENTUI_APP_LIBS = @CLIENTUI_APP_LIBS@ +CLIENTXSLT_APP_CFLAGS = @CLIENTXSLT_APP_CFLAGS@ +CLIENTXSLT_APP_LIBS = @CLIENTXSLT_APP_LIBS@ +CLIENT_APP_CFLAGS = @CLIENT_APP_CFLAGS@ +CLIENT_APP_LIBS = @CLIENT_APP_LIBS@ +CLUCENE_CFLAGS = @CLUCENE_CFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CMML_CFLAGS = @CMML_CFLAGS@ +CMML_LIBS = @CMML_LIBS@ +COMMONDBDIR = @COMMONDBDIR@ +COMMONDB_LA = @COMMONDB_LA@ +COMMONSQLDBDIR = @COMMONSQLDBDIR@ +COMMONSQLDBDIR_LA = @COMMONSQLDBDIR_LA@ +COMPILE_SYMBOLS_AS_PUBLIC = @COMPILE_SYMBOLS_AS_PUBLIC@ +CONTEXT_PLUGIN_CFLAGS = @CONTEXT_PLUGIN_CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTXFACEBOOKDIR = @CTXFACEBOOKDIR@ +CTXFACEBOOK_LA = @CTXFACEBOOK_LA@ +CTXGOOGLEDIR = @CTXGOOGLEDIR@ +CTXGOOGLE_LA = @CTXGOOGLE_LA@ +CTXGSTREAMERDIR = @CTXGSTREAMERDIR@ +CTXGSTREAMER_LA = @CTXGSTREAMER_LA@ +CTXIDENTICADIR = @CTXIDENTICADIR@ +CTXIDENTICA_LA = @CTXIDENTICA_LA@ +CTXVIMEODIR = @CTXVIMEODIR@ +CTXVIMEO_LA = @CTXVIMEO_LA@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CUSTOMALLOC_LA = @CUSTOMALLOC_LA@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXCPPFLAGS = @CXXCPPFLAGS@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB4_CFLAGS = @DB4_CFLAGS@ +DB4_LIBS = @DB4_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBXML_CFLAGS = @DBXML_CFLAGS@ +DBXML_LIBS = @DBXML_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_FILE_DIR = @DESKTOP_FILE_DIR@ +DLG = @DLG@ +DLLTOOL = @DLLTOOL@ +DOTFILE_ETC = @DOTFILE_ETC@ +DSYMUTIL = @DSYMUTIL@ +DTLMODDIR = @DTLMODDIR@ +DTL_CFLAGS = @DTL_CFLAGS@ +DTL_LIBS = @DTL_LIBS@ +DUMPBIN = @DUMPBIN@ +DVDREAD_CFLAGS = @DVDREAD_CFLAGS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +EAIDXCUSTOMFERRISDB4TREE_LA = @EAIDXCUSTOMFERRISDB4TREE_LA@ +EAIDXCUSTOMFERRISDIR = @EAIDXCUSTOMFERRISDIR@ +EAIDXCUSTOMFERRIS_LA = @EAIDXCUSTOMFERRIS_LA@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_CFLAGS = @ECORE_CFLAGS@ +ECORE_LIBS = @ECORE_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFSD_CFLAGS = @EFSD_CFLAGS@ +EFSD_LIBS = @EFSD_LIBS@ +EGREP = @EGREP@ +EMACS_GNUCLIENT_PATH = @EMACS_GNUCLIENT_PATH@ +EMACS_MOUNT_CFLAGS = @EMACS_MOUNT_CFLAGS@ +EMACS_MOUNT_LIBS = @EMACS_MOUNT_LIBS@ +EPEG_CFLAGS = @EPEG_CFLAGS@ +EPEG_LIBS = @EPEG_LIBS@ +EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE = @EVOLUTION_BUG__EXTRA_HEADERS_TO_PREINCLUDE@ +EVOLUTION_CFLAGS = @EVOLUTION_CFLAGS@ +EVOLUTION_LIBS = @EVOLUTION_LIBS@ +EXEEXT = @EXEEXT@ +FAMPP2_CFLAGS = @FAMPP2_CFLAGS@ +FAMPP2_LIBS = @FAMPP2_LIBS@ +FERRISGCJ_LA = @FERRISGCJ_LA@ +FERRIS_AS_TEXT_PLUGIN_DIR = @FERRIS_AS_TEXT_PLUGIN_DIR@ +FERRIS_CREATION_PLUGIN_DIR = @FERRIS_CREATION_PLUGIN_DIR@ +FERRIS_IOSIZE = @FERRIS_IOSIZE@ +FERRIS_IOSIZE_WARNING = @FERRIS_IOSIZE_WARNING@ +FERRIS_MODULE_COMPILE_LIST = @FERRIS_MODULE_COMPILE_LIST@ +FERRIS_SMARTPTR_ASSERT = @FERRIS_SMARTPTR_ASSERT@ +FERRIS_VERSION = @FERRIS_VERSION@ +FGREP = @FGREP@ +FIREFOX_MOUNT_CFLAGS = @FIREFOX_MOUNT_CFLAGS@ +FIREFOX_MOUNT_LIBS = @FIREFOX_MOUNT_LIBS@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +FSPOT_CFLAGS = @FSPOT_CFLAGS@ +FSPOT_LIBS = @FSPOT_LIBS@ +FSTREAM_CFLAGS = @FSTREAM_CFLAGS@ +FSTREAM_LIBS = @FSTREAM_LIBS@ +FTXIDXCUSTOMFERRISDIR = @FTXIDXCUSTOMFERRISDIR@ +FTXIDXCUSTOMFERRIS_LA = @FTXIDXCUSTOMFERRIS_LA@ +FTXIDXLUCENEANALYZERDIR = @FTXIDXLUCENEANALYZERDIR@ +FTXIDXLUCENEANALYZER_LA = @FTXIDXLUCENEANALYZER_LA@ +FXD_BINARY = @FXD_BINARY@ +FXD_BINARY_A52PIPE = @FXD_BINARY_A52PIPE@ +FXD_BINARY_NATIVE_EA = @FXD_BINARY_NATIVE_EA@ +FXD_BINARY_PGMPIPE = @FXD_BINARY_PGMPIPE@ +FXD_BINARY_RGBA32 = @FXD_BINARY_RGBA32@ +FXD_CIPHER_BITS = @FXD_CIPHER_BITS@ +FXD_CIPHER_NAME = @FXD_CIPHER_NAME@ +FXD_CIPHER_NAME_LIST = @FXD_CIPHER_NAME_LIST@ +FXD_CIPHER_VERSION = @FXD_CIPHER_VERSION@ +FXD_DIGEST = @FXD_DIGEST@ +FXD_DISTINGUISHED_PERSON = @FXD_DISTINGUISHED_PERSON@ +FXD_EANAMES = @FXD_EANAMES@ +FXD_ENUMERATED_STRING = @FXD_ENUMERATED_STRING@ +FXD_EXIF_COMPRESSION = @FXD_EXIF_COMPRESSION@ +FXD_EXIF_COPYRIGHT = @FXD_EXIF_COPYRIGHT@ +FXD_EXIF_DATETIME_STRING = @FXD_EXIF_DATETIME_STRING@ +FXD_EXIF_EXPOSURE_PROGRAM = @FXD_EXIF_EXPOSURE_PROGRAM@ +FXD_EXIF_FLASH = @FXD_EXIF_FLASH@ +FXD_EXIF_LIGHT_SOURCE = @FXD_EXIF_LIGHT_SOURCE@ +FXD_EXIF_METERING_MODE = @FXD_EXIF_METERING_MODE@ +FXD_EXIF_ORIENTATION = @FXD_EXIF_ORIENTATION@ +FXD_EXIF_SENSING_METHOD = @FXD_EXIF_SENSING_METHOD@ +FXD_EXIF_USER_COMMENT = @FXD_EXIF_USER_COMMENT@ +FXD_EXIF_VERSION = @FXD_EXIF_VERSION@ +FXD_EXIF_YCBCR_POSITIONING = @FXD_EXIF_YCBCR_POSITIONING@ +FXD_FFILTER = @FXD_FFILTER@ +FXD_FILESIZE = @FXD_FILESIZE@ +FXD_FSID_T = @FXD_FSID_T@ +FXD_FTX_RANK = @FXD_FTX_RANK@ +FXD_GID_T = @FXD_GID_T@ +FXD_GROUPNAME = @FXD_GROUPNAME@ +FXD_HEIGHT_PIXELS = @FXD_HEIGHT_PIXELS@ +FXD_INODE_T = @FXD_INODE_T@ +FXD_INT32 = @FXD_INT32@ +FXD_INT64 = @FXD_INT64@ +FXD_INTLIST = @FXD_INTLIST@ +FXD_IP4PORT = @FXD_IP4PORT@ +FXD_LATITUDE = @FXD_LATITUDE@ +FXD_LATLONG = @FXD_LATLONG@ +FXD_LONG = @FXD_LONG@ +FXD_LONGITUDE = @FXD_LONGITUDE@ +FXD_MACHINE_NAME = @FXD_MACHINE_NAME@ +FXD_MIMETYPE = @FXD_MIMETYPE@ +FXD_MODE_STRING_T = @FXD_MODE_STRING_T@ +FXD_MODE_T = @FXD_MODE_T@ +FXD_PID = @FXD_PID@ +FXD_PIXELCOUNT = @FXD_PIXELCOUNT@ +FXD_PRIMARY_KEY = @FXD_PRIMARY_KEY@ +FXD_PRIMARY_KEY_REAL = @FXD_PRIMARY_KEY_REAL@ +FXD_PRIMARY_KEY_VIRTUAL = @FXD_PRIMARY_KEY_VIRTUAL@ +FXD_STRINGLIST = @FXD_STRINGLIST@ +FXD_STR_IP4ADDR = @FXD_STR_IP4ADDR@ +FXD_UID_T = @FXD_UID_T@ +FXD_UINT32 = @FXD_UINT32@ +FXD_UINT64 = @FXD_UINT64@ +FXD_UNIT_NAME_LENGTH = @FXD_UNIT_NAME_LENGTH@ +FXD_UNIXEPOCH_STRING = @FXD_UNIXEPOCH_STRING@ +FXD_UNIXEPOCH_T = @FXD_UNIXEPOCH_T@ +FXD_URL = @FXD_URL@ +FXD_URLLIST = @FXD_URLLIST@ +FXD_URL_IMPLICIT_RESOLVE = @FXD_URL_IMPLICIT_RESOLVE@ +FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM = @FXD_URL_IMPLICIT_RESOLVE_FILESYSTEM@ +FXD_USERNAME = @FXD_USERNAME@ +FXD_WIDTH_PIXELS = @FXD_WIDTH_PIXELS@ +FXD_XLIST = @FXD_XLIST@ +FXD_XMLDOCSTRING = @FXD_XMLDOCSTRING@ +GCJ = @GCJ@ +GCJDEPMODE = @GCJDEPMODE@ +GCJFLAGS = @GCJFLAGS@ +GCJLUCENE_CFLAGS = @GCJLUCENE_CFLAGS@ +GCJLUCENE_GCJFLAGS = @GCJLUCENE_GCJFLAGS@ +GCJLUCENE_LIBS = @GCJLUCENE_LIBS@ +GCJ_CFLAGS = @GCJ_CFLAGS@ +GCJ_LIBS = @GCJ_LIBS@ +GDBM_CFLAGS = @GDBM_CFLAGS@ +GDBM_LIBS = @GDBM_LIBS@ +GIMP_MP_FLAGS = @GIMP_MP_FLAGS@ +GIMP_MP_LIBS = @GIMP_MP_LIBS@ +GIMP_THREAD_FLAGS = @GIMP_THREAD_FLAGS@ +GIMP_THREAD_LIBS = @GIMP_THREAD_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ +GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GPHOTO2_CFLAGS = @GPHOTO2_CFLAGS@ +GPHOTO2_CONFIG = @GPHOTO2_CONFIG@ +GPHOTO2_LIBS = @GPHOTO2_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKEXTRA2_CFLAGS = @GTKEXTRA2_CFLAGS@ +GTKEXTRA2_LIBS = @GTKEXTRA2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ID3_CFLAGS = @ID3_CFLAGS@ +ID3_LIBS = @ID3_LIBS@ +IMLIB_CFLAGS = @IMLIB_CFLAGS@ +IMLIB_LIBS = @IMLIB_LIBS@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IOSIZE = @IOSIZE@ +IPC_CONTEXT_CFLAGS = @IPC_CONTEXT_CFLAGS@ +IPC_CONTEXT_LIBS = @IPC_CONTEXT_LIBS@ +KDE_CFLAGS = @KDE_CFLAGS@ +KDE_EAGENERATOR_CFLAGS = @KDE_EAGENERATOR_CFLAGS@ +KDE_EAGENERATOR_LIBS = @KDE_EAGENERATOR_LIBS@ +KDE_LIBS = @KDE_LIBS@ +KSANE_CFLAGS = @KSANE_CFLAGS@ +KSANE_LIBS = @KSANE_LIBS@ +LD = @LD@ +LDAPMODDIR = @LDAPMODDIR@ +LDAP_CFLAGS = @LDAP_CFLAGS@ +LDAP_LIBS = @LDAP_LIBS@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_APP = @LDFLAGS_APP@ +LIBA52_CFLAGS = @LIBA52_CFLAGS@ +LIBA52_LIBS = @LIBA52_LIBS@ +LIBAMAROK_CFLAGS = @LIBAMAROK_CFLAGS@ +LIBAMAROK_LIBS = @LIBAMAROK_LIBS@ +LIBASTEXT_PLUGIN_FACTORIES_LA = @LIBASTEXT_PLUGIN_FACTORIES_LA@ +LIBATTR_CFLAGS = @LIBATTR_CFLAGS@ +LIBATTR_LIBS = @LIBATTR_LIBS@ +LIBBTPARSE_CFLAGS = @LIBBTPARSE_CFLAGS@ +LIBBTPARSE_LIBS = @LIBBTPARSE_LIBS@ +LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ +LIBCAP_LIBS = @LIBCAP_LIBS@ +LIBCREATION_PLUGIN_FACTORIES_LA = @LIBCREATION_PLUGIN_FACTORIES_LA@ +LIBDIR = @LIBDIR@ +LIBDJVULIBRE_CFLAGS = @LIBDJVULIBRE_CFLAGS@ +LIBDJVULIBRE_LIBS = @LIBDJVULIBRE_LIBS@ +LIBEAGEN_PLUGIN_FACTORIES_LA = @LIBEAGEN_PLUGIN_FACTORIES_LA@ +LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@ +LIBEXIF_LIBS = @LIBEXIF_LIBS@ +LIBEXTRACTOR_CFLAGS = @LIBEXTRACTOR_CFLAGS@ +LIBEXTRACTOR_LIBS = @LIBEXTRACTOR_LIBS@ +LIBFERRISINDEXING_LA = @LIBFERRISINDEXING_LA@ +LIBFERRISMG_LA = @LIBFERRISMG_LA@ +LIBFERRISQTGUI_LA = @LIBFERRISQTGUI_LA@ +LIBFERRISUI_LA = @LIBFERRISUI_LA@ +LIBFERRISXSLT_LA = @LIBFERRISXSLT_LA@ +LIBFERRIS_ASTEXTPLUGIN_LT_LINE = @LIBFERRIS_ASTEXTPLUGIN_LT_LINE@ +LIBFERRIS_BETA = @LIBFERRIS_BETA@ +LIBFERRIS_CREATIONPLUGIN_LT_LINE = @LIBFERRIS_CREATIONPLUGIN_LT_LINE@ +LIBFERRIS_EAPLUGIN_LT_LINE = @LIBFERRIS_EAPLUGIN_LT_LINE@ +LIBFERRIS_FULLV = @LIBFERRIS_FULLV@ +LIBFERRIS_LA = @LIBFERRIS_LA@ +LIBFERRIS_LT_AGE = @LIBFERRIS_LT_AGE@ +LIBFERRIS_LT_CURRENT = @LIBFERRIS_LT_CURRENT@ +LIBFERRIS_LT_REVISION = @LIBFERRIS_LT_REVISION@ +LIBFERRIS_MAJOR = @LIBFERRIS_MAJOR@ +LIBFERRIS_MINOR = @LIBFERRIS_MINOR@ +LIBFERRIS_PLUGIN_FACTORY_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_LIBADD@ +LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD = @LIBFERRIS_PLUGIN_FACTORY_SMALL_LIBADD@ +LIBFERRIS_PLUGIN_LIBADD = @LIBFERRIS_PLUGIN_LIBADD@ +LIBFERRIS_PLUGIN_LT_LINE = @LIBFERRIS_PLUGIN_LT_LINE@ +LIBFILE_CFLAGS = @LIBFILE_CFLAGS@ +LIBFILE_LIBS = @LIBFILE_LIBS@ +LIBGISTMIQ_CFLAGS = @LIBGISTMIQ_CFLAGS@ +LIBGISTMIQ_LIBS = @LIBGISTMIQ_LIBS@ +LIBIMAGEMAGICKNAMESPACEGLUE_LA = @LIBIMAGEMAGICKNAMESPACEGLUE_LA@ +LIBJASPER_CFLAGS = @LIBJASPER_CFLAGS@ +LIBJASPER_LIBS = @LIBJASPER_LIBS@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ +LIBJPEG_LIBS = @LIBJPEG_LIBS@ +LIBMAGIC_CFLAGS = @LIBMAGIC_CFLAGS@ +LIBMAGIC_LIBS = @LIBMAGIC_LIBS@ +LIBMPEG3_CFLAGS = @LIBMPEG3_CFLAGS@ +LIBMPEG3_LIBS = @LIBMPEG3_LIBS@ +LIBMPG2_CFLAGS = @LIBMPG2_CFLAGS@ +LIBMPG2_LIBS = @LIBMPG2_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPLATINUM_CFLAGS = @LIBPLATINUM_CFLAGS@ +LIBPLATINUM_LIBS = @LIBPLATINUM_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBPQXX_CFLAGS = @LIBPQXX_CFLAGS@ +LIBPQXX_LIBS = @LIBPQXX_LIBS@ +LIBRPM_CFLAGS = @LIBRPM_CFLAGS@ +LIBRPM_LIBS = @LIBRPM_LIBS@ +LIBS = @LIBS@ +LIBSELINUX_CFLAGS = @LIBSELINUX_CFLAGS@ +LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBTEXTCAT_CFLAGS = @LIBTEXTCAT_CFLAGS@ +LIBTEXTCAT_LIBS = @LIBTEXTCAT_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXMMS_CFLAGS = @LIBXMMS_CFLAGS@ +LIBXMMS_LIBS = @LIBXMMS_LIBS@ +LIBZ_CFLAGS = @LIBZ_CFLAGS@ +LIBZ_LIBS = @LIBZ_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOKI_CFLAGS = @LOKI_CFLAGS@ +LOKI_LIBS = @LOKI_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_RELEASE = @LT_RELEASE@ +MAGICK_CFLAGS = @MAGICK_CFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEDIAINFO_CFLAGS = @MEDIAINFO_CFLAGS@ +MEDIAINFO_LIBS = @MEDIAINFO_LIBS@ +MIMETYPE_DIRECTORY = @MIMETYPE_DIRECTORY@ +MKDIR_P = @MKDIR_P@ +MP3_CFLAGS = @MP3_CFLAGS@ +MP3_LIBS = @MP3_LIBS@ +NEPOMUK_CFLAGS = @NEPOMUK_CFLAGS@ +NEPOMUK_LIBS = @NEPOMUK_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBBYMODDIR = @OBBYMODDIR@ +OBBY_CFLAGS = @OBBY_CFLAGS@ +OBBY_LIBS = @OBBY_LIBS@ +OBBY_MOUNT_CFLAGS = @OBBY_MOUNT_CFLAGS@ +OBBY_MOUNT_LIBS = @OBBY_MOUNT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OGGZ_CFLAGS = @OGGZ_CFLAGS@ +OGGZ_LIBS = @OGGZ_LIBS@ +OGG_CFLAGS = @OGG_CFLAGS@ +OGG_LIBS = @OGG_LIBS@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PASTEBINDIR = @PASTEBINDIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCCTS_CFLAGS = @PCCTS_CFLAGS@ +PGCTXMODDIR = @PGCTXMODDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLASMA_CFLAGS = @PLASMA_CFLAGS@ +PLASMA_LIBS = @PLASMA_LIBS@ +PREFIX = @PREFIX@ +PREFIXSTR = @PREFIXSTR@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +QJSON_CFLAGS = @QJSON_CFLAGS@ +QJSON_LIBS = @QJSON_LIBS@ +QOAUTH_CFLAGS = @QOAUTH_CFLAGS@ +QOAUTH_LIBS = @QOAUTH_LIBS@ +QPRINTER_CFLAGS = @QPRINTER_CFLAGS@ +QPRINTER_LIBS = @QPRINTER_LIBS@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +QTDBUS_CFLAGS = @QTDBUS_CFLAGS@ +QTDBUS_LIBS = @QTDBUS_LIBS@ +QTGUI_CFLAGS = @QTGUI_CFLAGS@ +QTGUI_LIBS = @QTGUI_LIBS@ +QTNETWORK_CFLAGS = @QTNETWORK_CFLAGS@ +QTNETWORK_LIBS = @QTNETWORK_LIBS@ +QTSQLCTXMODDIR = @QTSQLCTXMODDIR@ +QTSQL_CFLAGS = @QTSQL_CFLAGS@ +QTSQL_LIBS = @QTSQL_LIBS@ +QT_CFLAGS = @QT_CFLAGS@ +QT_CXXFLAGS = @QT_CXXFLAGS@ +QT_LDADD = @QT_LDADD@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +REQUIREMENTS = @REQUIREMENTS@ +REQUIREMENTSUI = @REQUIREMENTSUI@ +REQUIREMENTSXSLT = @REQUIREMENTSXSLT@ +RPM_BUILD_ROOT = @RPM_BUILD_ROOT@ +SANE_CFLAGS = @SANE_CFLAGS@ +SANE_LIBS = @SANE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHAREDDTL_LA = @SHAREDDTL_LA@ +SHAREDLDAP_LA = @SHAREDLDAP_LA@ +SHAREDOBBY_LA = @SHAREDOBBY_LA@ +SHAREDPASTEBIN_LA = @SHAREDPASTEBIN_LA@ +SHAREDPGCTX_LA = @SHAREDPGCTX_LA@ +SHAREDQTSQLCTX_LA = @SHAREDQTSQLCTX_LA@ +SHAREDSOPRANOEA_LA = @SHAREDSOPRANOEA_LA@ +SHAREDSQLPLUS_LA = @SHAREDSQLPLUS_LA@ +SHAREDWEBPHOTOS_LA = @SHAREDWEBPHOTOS_LA@ +SHAREDWIKI_LA = @SHAREDWIKI_LA@ +SHAREDXAPIANEA_LA = @SHAREDXAPIANEA_LA@ +SHAREDXAPIANMODDIR = @SHAREDXAPIANMODDIR@ +SHELL = @SHELL@ +SIGC_CFLAGS = @SIGC_CFLAGS@ +SIGC_LIBS = @SIGC_LIBS@ +SOCKETPP_CFLAGS = @SOCKETPP_CFLAGS@ +SOCKETPP_LIBS = @SOCKETPP_LIBS@ +SOPRANOEAMODDIR = @SOPRANOEAMODDIR@ +SOPRANO_CFLAGS = @SOPRANO_CFLAGS@ +SOPRANO_LIBS = @SOPRANO_LIBS@ +SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ +SQLITE3_LIBS = @SQLITE3_LIBS@ +SQLPLUSMODDIR = @SQLPLUSMODDIR@ +SQLPLUS_CFLAGS = @SQLPLUS_CFLAGS@ +SQLPLUS_LIBS = @SQLPLUS_LIBS@ +SSHCMD = @SSHCMD@ +STLDB4_CFLAGS = @STLDB4_CFLAGS@ +STLDB4_LIBS = @STLDB4_LIBS@ +STLPORT_CFLAGS = @STLPORT_CFLAGS@ +STLPORT_LDFLAGS = @STLPORT_LDFLAGS@ +STLPORT_LIB = @STLPORT_LIB@ +STLPORT_LIBS = @STLPORT_LIBS@ +STREAMS_CFLAGS = @STREAMS_CFLAGS@ +STREAMS_LIBS = @STREAMS_LIBS@ +STRIGI_CFLAGS = @STRIGI_CFLAGS@ +STRIGI_LIBS = @STRIGI_LIBS@ +STRIP = @STRIP@ +SVMLIGHT_CFLAGS = @SVMLIGHT_CFLAGS@ +SVMLIGHT_LIBS = @SVMLIGHT_LIBS@ +SWIG_OCAML_CFLAGS = @SWIG_OCAML_CFLAGS@ +SWIG_OCAML_HEADERDIR = @SWIG_OCAML_HEADERDIR@ +SWIG_PERL_CFLAGS = @SWIG_PERL_CFLAGS@ +SWIG_PERL_PMDIR = @SWIG_PERL_PMDIR@ +SWIG_PYTHON_CFLAGS = @SWIG_PYTHON_CFLAGS@ +SWIG_PYTHON_LIBDIR = @SWIG_PYTHON_LIBDIR@ +SWIG_PYTHON_MODULEDIR = @SWIG_PYTHON_MODULEDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ +TAGLIB_LIBS = @TAGLIB_LIBS@ +TDB_CFLAGS = @TDB_CFLAGS@ +TDB_LIBS = @TDB_LIBS@ +TSEARCH2_CFLAGS = @TSEARCH2_CFLAGS@ +TSEARCH2_LIBS = @TSEARCH2_LIBS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +WAV_CFLAGS = @WAV_CFLAGS@ +WAV_LIBS = @WAV_LIBS@ +WEBPHOTOSDIR = @WEBPHOTOSDIR@ +WIKIDIR = @WIKIDIR@ +XALAN_CFLAGS = @XALAN_CFLAGS@ +XALAN_LIBS = @XALAN_LIBS@ +XAPIAN_CFLAGS = @XAPIAN_CFLAGS@ +XAPIAN_CONFIG = @XAPIAN_CONFIG@ +XAPIAN_LIBS = @XAPIAN_LIBS@ +XERCESC_CFLAGS = @XERCESC_CFLAGS@ +XERCESC_LIBS = @XERCESC_LIBS@ +XERCES_INTERNAL_HEADERS_CFLAGS = @XERCES_INTERNAL_HEADERS_CFLAGS@ +XFSPROGS_CFLAGS = @XFSPROGS_CFLAGS@ +XFSPROGS_LIBS = @XFSPROGS_LIBS@ +XINE_ACFLAGS = @XINE_ACFLAGS@ +XINE_CFLAGS = @XINE_CFLAGS@ +XINE_CONFIG = @XINE_CONFIG@ +XINE_EAGENERATOR_CFLAGS = @XINE_EAGENERATOR_CFLAGS@ +XINE_EAGENERATOR_LIBS = @XINE_EAGENERATOR_LIBS@ +XINE_LIBS = @XINE_LIBS@ +XML4C_CFLAGS = @XML4C_CFLAGS@ +XML4C_LIBS = @XML4C_LIBS@ +XMP_CFLAGS = @XMP_CFLAGS@ +XMP_LIBS = @XMP_LIBS@ +XQILLA_CFLAGS = @XQILLA_CFLAGS@ +XQILLA_LIBS = @XQILLA_LIBS@ +XSD_BASIC_BOOL = @XSD_BASIC_BOOL@ +XSD_BASIC_DOUBLE = @XSD_BASIC_DOUBLE@ +XSD_BASIC_FLOAT = @XSD_BASIC_FLOAT@ +XSD_BASIC_INT = @XSD_BASIC_INT@ +XSD_BASIC_INTEGER = @XSD_BASIC_INTEGER@ +XSD_BASIC_STRING = @XSD_BASIC_STRING@ +XSD_SCHEMA = @XSD_SCHEMA@ +XSD_UNKNOWN = @XSD_UNKNOWN@ +XSLTFS_MOUNT_CFLAGS = @XSLTFS_MOUNT_CFLAGS@ +XSLTFS_MOUNT_LIBS = @XSLTFS_MOUNT_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_GCJ = @ac_ct_GCJ@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_bogofilter = @have_bogofilter@ +have_bonobo = @have_bonobo@ +have_curl = @have_curl@ +have_dbus = @have_dbus@ +have_edb = @have_edb@ +have_eet = @have_eet@ +have_efsd = @have_efsd@ +have_epeg = @have_epeg@ +have_fsh = @have_fsh@ +have_hevea = @have_hevea@ +have_imlib2 = @have_imlib2@ +have_lynx = @have_lynx@ +have_magick = @have_magick@ +have_openssl = @have_openssl@ +have_ps2ascii = @have_ps2ascii@ +have_stlportcfg = @have_stlportcfg@ +have_swig_ocaml = @have_swig_ocaml@ +have_swig_perl = @have_swig_perl@ +have_swig_python = @have_swig_python@ +have_unrtf = @have_unrtf@ +have_wv = @have_wv@ +have_xmms = @have_xmms@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sqlite3_CFLAGS = @sqlite3_CFLAGS@ +sqlite3_LIBS = @sqlite3_LIBS@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# A list of all the files in the current directory which can be regenerated +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = $(srcdir)/*.xsl $(srcdir)/*.php +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/phpsearchinterface/dhtmlxSuite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu apps/phpsearchinterface/dhtmlxSuite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/phpsearchinterface/dhtmlxSuite/ferrisls-xml-to-dhtmlxSuite.xsl b/apps/phpsearchinterface/dhtmlxSuite/ferrisls-xml-to-dhtmlxSuite.xsl new file mode 100644 index 0000000..5fb8b44 --- /dev/null +++ b/apps/phpsearchinterface/dhtmlxSuite/ferrisls-xml-to-dhtmlxSuite.xsl @@ -0,0 +1,42 @@ + + + + + + + 3 + + + + mtime + sz + purl + name + size + mtime-d + url + + + + + + + + + + + + + + + + + + + + + ^ + + + + diff --git a/apps/phpsearchinterface/dhtmlxSuite/index.php b/apps/phpsearchinterface/dhtmlxSuite/index.php new file mode 100644 index 0000000..96a8161 --- /dev/null +++ b/apps/phpsearchinterface/dhtmlxSuite/index.php @@ -0,0 +1,120 @@ + + + + Ferris Query + + + + + + + + + + + + + +
+ Only search for files: +
+ + + + + + + + + + + + \n"; + print "\n"; + print "\n"; + print "\n"; + } +?> + +
Search by URL (regex) +
+
+
Modified within 30 days +
+
+
Direct query string\n"; + print "
\n"; + print "
\n"; + print "
+ + + +
+ + + +
+ + + + + diff --git a/apps/phpsearchinterface/dhtmlxSuite/query.php b/apps/phpsearchinterface/dhtmlxSuite/query.php new file mode 100755 index 0000000..c74175f --- /dev/null +++ b/apps/phpsearchinterface/dhtmlxSuite/query.php @@ -0,0 +1,31 @@ +importStyleSheet(DomDocument::load($STYLESHEET)); +print $xslt->transformToXML(DomDocument::loadXML($xmldata)); + +?> + + + + diff --git a/apps/phpsearchinterface/index.php b/apps/phpsearchinterface/index.php new file mode 100644 index 0000000..c37ba64 --- /dev/null +++ b/apps/phpsearchinterface/index.php @@ -0,0 +1,59 @@ + + + + Ferris Query + + + + + + +
+ Only search for files: +
+ + + + + + + + + + +
Search by URL (regex) +
+
+
Search full text +
+
+
+ +
+